. . monday . tuesday . wednesday . thursday . friday . saturday . sunday .
; } public function getcalendarfooter() { $this->retunrhtml .=
; } public function getbegintr() { $this->retunrhtml .= ; } public function getendtr() { $this->retunrhtml .=
; } protected function getday() { return $this->day; } protected function getmonth() { return $this->month; } protected function getyear() { return $this->year; } protected function isweekend() { return $this->weekend; } protected function iscurrent() { return $this->currentdate; } public function gettdhref() { return $this->getday(); } public function gettd() { $class = ''; $td = td; if ($this->iscurrent()) { $class = 'today'; } $this->retunrhtml .= . $this->gettdhref() . $td>; } public function gettdweekend() { $class = ''; $td = td; if ($this->iscurrent()) { $class = 'today'; } $this->retunrhtml .= . $this->gettdhref() . $td>; } protected function makecodemonth($year, $month) { $this->makeweeks($year, $month); $this->getcalendarheader(); for ($i = 0; $i week); $i++) { $this->getbegintr(); for ($j = 0; $j if (!empty($this->week[$i][$j])) { $this->day = $this->week[$i][$j]; $this->currentdate = 0; if ($this->year == date('y') && $this->month == date('m') && $this->day == date('j')) { $this->currentdate = 1; } if ($j == 5 || $j == 6) { $this->weekend = 1; $this->gettdweekend(); } else { $this->weekend = 0; $this->gettd(); } } else { $this->retunrhtml .= ; } } $this->getendtr(); } $this->getcalendarfooter(); } public function getcodemonth() { $this->makecodemonth($this->year, $this->month); return $this->retunrhtml; } public function showcodemonth() { echo $this->getcodemonth(); } } class techcalendarform extends calendarform { public function gettdhref() { if ($this->isweekend()) { $font = ; } else { $font = ; } return . $font . parent::getday() . ; }}
复制代码
php
