<html> <?php error_reporting(0); $date=time(); $day=date('d',$date); // current day in number. $month=date('m',$date); // current month in number. $year=date('Y',$date); // current year in number. $currentTimeStamp= strtotime("$year-$month-$day"); $monthName = date("F", $currentTimeStamp); // Get Current Month Name. $numDays = date("t",$currentTimeStamp); // Get how many days are there in the current month. ?> <?php if(isset($_GET['p'])) { $month=$month-1; $currentTimeStamp= strtotime("$year-$month-$day"); $monthName = date("F", $currentTimeStamp); } else if (isset($_GET['q'])) { $month=$month+1; $currentTimeStamp= strtotime("$year-$month-$day"); $monthName = date("F", $currentTimeStamp); } ?> <table> <tr> <td> <td> <?php echo "<a href='cal.php?p=$month'> << </a> "; ?> </td> <th> <?php echo $monthName.", ".$year." "; ?> </th> <td colspan=5 align="left"> <?php echo " <a href='cal.php?q=$month'> >> </a> "; ?> </td> </tr> </table> </html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)