NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

<?php
//*****************************************************************************
//
// MICRO CALENDAR - Version: 1.0
//
// You may use this code or any modified version of it on your website.
//
// NO WARRANTY
// This code is provided "as is" without warranty of any kind, either
// expressed or implied, including, but not limited to, the implied warranties
// of merchantability and fitness for a particular purpose. You expressly
// acknowledge and agree that use of this code is at your own risk.
//
//*****************************************************************************
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Micro Calendar</title>
<link href="style/style.css" rel="stylesheet" type="text/css" />
</head>
<body>

<?php
function showCalendar(){
// Get key day informations.
// We need the first and last day of the month and the actual day
$today = getdate();
$firstDay = getdate(mktime(0,0,0,$today['mon'],1,$today['year']));
$lastDay = getdate(mktime(0,0,0,$today['mon']+1,0,$today['year']));


// Create a table with the necessary header informations
echo '<table>';
echo ' <tr><th colspan="7">'.$today['month']." - ".$today['year']."</th></tr>";
echo '<tr class="days">';
echo ' <td>Mo</td><td>Tu</td><td>We</td><td>Th</td>';
echo ' <td>Fr</td><td>Sa</td><td>Su</td></tr>';


// Display the first calendar row with correct positioning
echo '<tr>';
if ($firstDay['wday'] == 0) $firstDay['wday'] = 7;
for($i=1;$i<$firstDay['wday'];$i++){
echo '<td>&nbsp;</td>';
}
$actday = 0;
for($i=$firstDay['wday'];$i<=7;$i++){
$actday++;
if ($actday == $today['mday']) {
$class = ' class="actday"';
} else {
$class = '';
}
echo "<td$class>$actday</td>";
}
echo '</tr>';

//Get how many complete weeks are in the actual month
$fullWeeks = floor(($lastDay['mday']-$actday)/7);

for ($i=0;$i<$fullWeeks;$i++){
echo '<tr>';
for ($j=0;$j<7;$j++){
$actday++;
if ($actday == $today['mday']) {
$class = ' class="actday"';
} else {
$class = '';
}
echo "<td$class>$actday</td>";
}
echo '</tr>';
}

//Now display the rest of the month
if ($actday < $lastDay['mday']){
echo '<tr>';

for ($i=0; $i<7;$i++){
$actday++;
if ($actday == $today['mday']) {
$class = ' class="actday"';
} else {
$class = '';
}

if ($actday <= $lastDay['mday']){
echo "<td$class>$actday</td>";
}
else {
echo '<td>&nbsp;</td>';
}
}


echo '</tr>';
}

echo '</table>';
}

showCalendar();
?>

</body>
</html>
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.