echo "
月份:
for($ttmpa=1;$ttmpa<13;$ttmpa++){//打印12个月
$ttmpb=sprintf("%02d",$ttmpa);
if(strcmp($ttmpb,$this->MONTH)==0){
$select="selected style=\"background-color:$this->COLOR_THIS_MONTH\"";
}else{
$select="";
}
echo ".$this->_MONTH[$ttmpb]."";
}
echo " 年份:;//打印年份
for($ctmpa=$this->YEAR-$this->NUMS_YEAR;$ctmpa<=$this->YEAR+$this->NUMS_YEAR;$ctmpa++){
if($ctmpa>2037){
break;
}
if($ctmpa<1970){
continue;
}
if(strcmp($ctmpa,$this->YEAR)==0){
$select="selected style=\"background-color:$this->COLOR_THIS_YEAR\"";
}else{
$select="";
}
echo "";
}
echo "
| ";
for($Tmpa=0;$Tmpa<count($this->WEEK);$Tmpa++){//打印星期标头
echo "".$this->WEEK[$Tmpa]." | ";
}
echo " ";
for($Tmpc=0;$Tmpc<$fweek;$Tmpc++){
echo " | ";
}
for($Tmpb=1;$Tmpb<=date("t",mktime(0,0,0,$this->MONTH,$this->DAY,$this->YEAR));$Tmpb++){//打印所有日期
$Tmpb=sprintf("%02d",$Tmpb);
if((strcmp($Tmpb,$this->DAY)==0) && ($this->MONTH == date("m")) && ($this->YEAR == date("Y")) ){//获得当前日期,做标记
$flag=" bgcolor='$this->COLOR_TODAY'";
}else{
$flag=" bgcolor='white'";
}
if((strcmp($this->getWeek($this->YEAR,$this->MONTH,$Tmpb),0)==0) && (1==$Tmpb)){ //第一天是星期日则不用加
echo "$Tmpb | "; //星期日则换行,添加行首
}else if(strcmp($this->getWeek($this->YEAR,$this->MONTH,$Tmpb),0)==0){
echo "$Tmpb | "; //星期日则换行,添加行首
}else if(strcmp($this->getWeek($this->YEAR,$this->MONTH,$Tmpb),6)==0){
echo "$Tmpb | ";//星期六为行尾
}else{
echo "$Tmpb | ";
}
}//for($Tmpb=1;$Tmpb<=date("t",mktime(0,0,0,$this->MONTH,$this->DAY,$this->YEAR));$Tmpb++)
//最后一天是星期六不用再加
if(strcmp($this->getWeek($this->YEAR,$this->MONTH,date("t",mktime(0,0,0,$this->MONTH,$this->DAY,$this->YEAR))),6)==0)
echo " ";
else
echo " |