示例#1
0
     if (substr($listTasks->tas_start_date[$g], 0, 7) == substr($dateCalend, 0, 7)) {
         $gantt = "true";
     }
 }
 for ($i = 1; $i < $daysmonth + $firstday; $i++) {
     $a = $i - $firstday + 1;
     $day = $i - $firstday + 1;
     if (strlen($a) == 1) {
         $a = "0{$a}";
     }
     if (strlen($month) == 1) {
         $month = "0{$month}";
     }
     $dateLink = "{$year}-{$month}-{$a}";
     $todayClass = "";
     $dayRecurr = _dayOfWeek(mktime(12, 12, 12, $month, $a, $year));
     $comptListCalendarScan = "0";
     if ($viewCalend == 0) {
         $tmpquery = "WHERE cal.owner = '" . $_SESSION['idSession'] . "' AND ((cal.date_start <= '{$dateLink}' AND cal.date_end >= '{$dateLink}' AND cal.recurring = '0') OR ((cal.date_start <= '{$dateLink}' AND cal.date_end <= '{$dateLink}') AND cal.recurring = '1' AND cal.recur_day = '{$dayRecurr}')) ORDER BY cal.shortname";
     } else {
         $tmpquery = "WHERE cal.project = '{$viewCalend}' AND ((cal.date_start <= '{$dateLink}' AND cal.date_end >= '{$dateLink}' AND cal.recurring = '0') OR ((cal.date_start <= '{$dateLink}' AND cal.date_end <= '{$dateLink}') AND cal.recurring = '1' AND cal.recur_day = '{$dayRecurr}')) ORDER BY cal.shortname";
     }
     $listCalendarScan = new request();
     $listCalendarScan->openCalendar($tmpquery);
     $comptListCalendarScan = count($listCalendarScan->cal_id);
     if ($i < $firstday || $a == "00") {
         echo "<td width=14% class=even>&nbsp;</td>";
     } else {
         if ($dateLink == $dateToday) {
             $classCell = "old";
         } else {
示例#2
0
 }
 $weekremain = $daysmonth - (7 - ($firstday - 1));
 $daysremain = $weekremain - floor($weekremain / 7) * 7;
 $colsremain = 7 - $daysremain;
 for ($i = 1; $i < $daysmonth + $firstday; $i++) {
     $a = $i - $firstday + 1;
     $day = $i - $firstday + 1;
     if (strlen($a) == 1) {
         $a = "0{$a}";
     }
     if (strlen($month) == 1) {
         $month = "0{$month}";
     }
     $dateLink = "{$year}-{$month}-{$a}";
     $todayClass = "";
     $dayRecurr = _dayOfWeek(mktime(0, 0, 0, $month, $a, $year));
     $tmpquery = "WHERE (cal.owner = '{$idSession}' AND ((cal.date_start <= '{$dateLink}' AND cal.date_end >= '{$dateLink}' AND cal.recurring = '0') OR ((cal.date_start <= '{$dateLink}' AND cal.date_end >= '{$dateLink}') AND cal.recurring = '1' AND cal.recur_day = '{$dayRecurr}'))) OR (cal.broadcast = '1' AND ((cal.date_start <= '{$dateLink}' AND cal.date_end >= '{$dateLink}' AND cal.recurring = '0') OR ((cal.date_start <= '{$dateLink}' AND cal.date_end >= '{$dateLink}') AND cal.recurring = '1' AND cal.recur_day = '{$dayRecurr}'))) ORDER BY cal.shortname";
     $listCalendarScan = new request();
     $listCalendarScan->openCalendar($tmpquery);
     $comptListCalendarScan = count($listCalendarScan->cal_id);
     if ($i < $firstday || $a == "00") {
         echo "<td width='14%' class='even'>&nbsp;</td>";
     } else {
         if ($dateLink == $dateToday) {
             $classCell = "evenassigned";
         } else {
             $classCell = "odd";
         }
         echo "<td width='14%' height='100' align='left' valign='top' class='{$classCell}' onmouseover=\"this.style.backgroundColor='" . $block2->highlightOn . "'\" onmouseout=\"this.style.backgroundColor='" . $highlightOff . "'\"><div align='right'><h3>{$day}</h3></div>";
         if ($comptListCalendarScan != "0") {
             for ($h = 0; $h < $comptListCalendarScan; $h++) {