Go to the documentation of this file.00001 <?php
00002
00003
00004 ?>
00005 <div class="pc_calendar" id="user_cal" style="width:100%">
00006 <?php echo $month_year?>
00007 <?php if ($zoom == 1 ): ?>
00008 <table style="width:100%;height:80%">
00009 <?php else: ?>
00010 <table style="width:100%;">
00011 <?php endif; ?>
00012 <tr>
00013 <?php
00014 for ($i=0;$i<=6;$i++){
00015 echo "<th>";
00016 echo $week[$i];
00017 echo "</th>";
00018 }
00019 ?>
00020 </tr>
00021 <?php
00022 $ind=1;
00023 $week=0;
00024 $today_month=date('m');
00025 $today_day=date('j');
00026 while ($ind <= $this->day) {
00027 if ( $week == 0 ) echo "<tr>";
00028 $class="workday";
00029 if ( $week == 0 || $week == 6) $class="weekend";
00030
00031 $timestamp_date=mktime(0,0,0,$this->month,$ind,$this->year);
00032 $date_calendar=date('w',$timestamp_date);
00033 $st="";
00034 if ( $today_month==$this->month && $today_day==$ind)
00035 $st=' style="border:1px solid red" ';
00036 if ( $date_calendar == $week ) {
00037 echo '<td class="'.$class.'" '.$st.'>'.'<span class="day">'.$ind."</span>";
00038 echo $cell[$ind];
00039 echo '</td>';
00040 $ind++;$week++;
00041 } else {
00042 echo "<td></td>";
00043 $week++;
00044 }
00045
00046 if ( $week == 7 ) { echo "</tr>";$week=0;}
00047 }
00048 if ( $week != 0 ) { echo "</tr>";}
00049 ?>
00050
00051 </table>
00052 </div>