"; }else{ $xoopsOption['show_rblock'] =0; include(XOOPS_ROOT_PATH."/header.php"); } $myts =& MyTextSanitizer::getInstance(); echo ""; OpenTable(); $useroffset = ""; if($xoopsUser){ $timezone = $xoopsUser->timezone(); if(isset($timezone)){ $useroffset = $xoopsUser->timezone(); }else{ $useroffset = $xoopsConfig['default_TZ']; } } $usertimevent = time() + ($useroffset*3600); $currentday = date("j", $usertimevent); $currentmonth = date("m", $usertimevent); $currentyear = date("Y", $usertimevent); $lastday = 1; if (!$month) { $month = date("m", $usertimevent); $year = date("Y", $usertimevent); } $Date = date('F', mktime(0,0,0,$month,1,$year)); $firstday = date( 'w', mktime(0,0,0,$month,1,$year)); while (checkdate($month,$lastday,$year)) { $lastday++; } $nextmonth = $month+1; $nextyear = $year; if ($nextmonth == 13) { $nextmonth = 1; $nextyear = $year + 1; } $lastmonth = $month-1; $lastyear = $year; if ($lastmonth == 0) { $lastmonth = 12; $lastyear = $year-1; } echo ""._CALENDEVENT."

"; echo ""; echo ""; echo ""; echo "
"._BAC."
"; echo "  
"._FOR."
"; echo ""; echo ""; for ($i=0; $i<7; $i++) { if ($i < $firstday) { echo ""; } else { $thisday = ($i+1)-$firstday; if ($currentyear > $year) { echo ""; } } echo "\n"; $nextday = ($i+1)-$firstday; for ($j = 0; $j<5; $j++) { //echo ""; for ($k = 0; $k<7; $k++) { if ($nextday < $lastday) { if ($currentyear > $year) { echo ""; $nextday++; } } echo "\n"; } echo "
"._SUN.""._MON." "._TUE.""._WED." "._THU.""._FRI." "._SAT."
$month && $currentyear == $year) { echo ""; } else if ($currentmonth == $month && $currentday > $thisday && $currentyear == $year) { echo ""; } else if ($currentmonth == $month && $currentday == $thisday && $currentyear == $year) { echo ""; } else { echo ""; } echo "$thisday

"; $query2 = $xoopsDB->query("SELECT id, subject FROM ".$xoopsDB->prefix("eCal")." WHERE (stamp >= \"$year-$month-$thisday 00:00:00\" and stamp <= \"$year-$month-$thisday 23:59:59\") AND valid = 'yes' ORDER BY stamp"); for ($j = 0; $j<$xoopsDB->getRowsNum($query2); $j++) { $results = $xoopsDB->fetchArray($query2); if ($results["subject"]) { $subject = $myts->makeTboxData4Show($results["subject"]); echo "+ $subject
"; } } if ($xoopsDB->getRowsNum($query2) < 4) { for ($j=0; $j<(4-$xoopsDB->getRowsNum($query2)); $j++) echo "
"; } echo "
"; } else if ($currentmonth > $month && $currentyear == $year) { echo ""; } else if ($currentmonth == $month && $currentday > $nextday && $currentyear == $year) { echo ""; } else if ($currentmonth == $month && $currentday == $nextday && $currentyear == $year) { echo ""; } else { echo ""; } echo "$nextday

"; $query3 = $xoopsDB->query("SELECT id, subject FROM ".$xoopsDB->prefix("eCal")." WHERE (stamp >= \"$year-$month-$nextday 00:00:00\" AND stamp <= \"$year-$month-$nextday 23:59:59\") AND valid = 'yes' ORDER BY stamp"); for ($i = 0; $i<$xoopsDB->getRowsNum($query3)+4; $i++) { $results2 = $xoopsDB->fetchArray($query3); if ($results2["subject"]) { $subject2 = $myts->makeTboxData4Show($results2["subject"]); echo "+ $subject2
"; } else if ($i < 4) { echo "
"; } } echo "
"; echo ""; echo ""; if ($anoevent ==1 || $xoopsUser) { echo ""; } else { echo ""; } echo "
"._BAC.""._ADDITEM." "._FOR."
"; CloseTable(); #echo "

"; #OpenTable(); #include ("xoops_version.php"); #echo "

"._COPYEVENT."

"; #CloseTable(); include(XOOPS_ROOT_PATH."/footer.php"); ?>