0) showmessage($msg); echo "
"; /*"; echo date('F', mktime(0,0,0,$month,1,$year)); echo " $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; } if (strlen($lastmonth) == 1) $lastmonth = "0" . $lastmonth; if (strlen($nextmonth) == 1) $nextmonth = "0" . $nextmonth; echo ""; echo ""; //echo ""; if (!empty($USER["uid"])) { echo ""; } } else { echo ""; } echo "
if ($mode <> "personal") { echo "
"; echo ""; 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 "
"; echo date('F', mktime(0,0,0,$month,1,$year)); echo " $year
{$LANG30[1]} {$LANG30[2]} {$LANG30[3]} {$LANG30[4]} {$LANG30[5]} {$LANG30[6]} {$LANG30[7]}
"; } else if ($currentmonth > $month && $currentyear == $year) { echo ""; } else if ($currentmonth == $month && $currentday > $thisday && $currentyear == $year) { echo ""; } else { echo ""; } if (strlen($thisday) == 1) $thisday = "0" . $thisday; echo "$thisday

"; //if ($thisday < 10) $thisday = "0" . $thisday; if ($mode == "personal") { $calsql = "SELECT events.title,userevent.eid FROM events,userevent WHERE (events.eid = userevent.eid) AND (userevent.uid = {$USER["uid"]}) AND ((datestart >= \"$year-$month-$thisday 00:00:00\" AND datestart <= \"$year-$month-$thisday 23:59:59\") OR (dateend >= \"$year-$month-$thisday 00:00:00\" AND dateend <= \"$year-$month-$thisday 23:59:59\") OR (\"$year-$month-$thisday\" between datestart and dateend)) ORDER BY datestart"; } else { $calsql = "SELECT title,eid FROM events WHERE (datestart >= \"$year-$month-$thisday 00:00:00\" AND datestart <= \"$year-$month-$thisday 23:59:59\") OR (dateend >= \"$year-$month-$thisday 00:00:00\" AND dateend <= \"$year-$month-$thisday 23:59:59\") OR (\"$year-$month-$thisday\" between datestart and dateend) ORDER BY datestart"; } $query2 = mysql_query($calsql); for ($j = 0; $j$results[title]

"; } } if (mysql_num_rows($query2) < 4) { for ($j=0; $j<(4-mysql_num_rows($query2)); $j++) echo "
"; } echo "
"; } else if ($currentmonth > $month && $currentyear == $year) { echo ""; } else if ($currentmonth == $month && $currentday > $nextday && $currentyear == $year) { echo ""; } else { echo ""; } if (strlen($nextday) == 1) $nextday = "0" . $nextday; echo "$nextday

"; if ($mode == "personal") { $query3 = mysql_query("SELECT events.title,userevent.eid FROM events,userevent WHERE (events.eid = userevent.eid) AND (userevent.uid = {$USER["uid"]}) AND ((datestart >= \"$year-$month-$nextday 00:00:00\" AND datestart <= \"$year-$month-$nextday 23:59:59\") OR (dateend >= \"$year-$month-$nextday 00:00:00\" AND dateend <= \"$year-$month-$nextday 23:59:59\") OR (\"$year-$month-$nextday\" between datestart and dateend)) ORDER BY datestart"); } else { $query3 = mysql_query("SELECT title,eid FROM events WHERE (datestart >= \"$year-$month-$nextday 00:00:00\" AND datestart <= \"$year-$month-$nextday 23:59:59\") OR (dateend >= \"$year-$month-$nextday 00:00:00\" AND dateend <= \"$year-$month-$nextday 23:59:59\") OR (\"$year-$month-$nextday\" between datestart and dateend) ORDER BY datestart"); } for ($i = 0; $i$results2[title]

"; } else if ($i < 4) { echo "
"; } } echo "
"; echo ""; echo ""; //echo ""; if (!empty($USER["uid"])) { echo ""; } } else { echo ""; } echo "
if ($mode <> "personal") { echo "
"; include ("layout/footer.php"); ?>