// // ------------------------------------------------------------------------- // // Original Author: Nobse, Bama // Author Website : http://www.e-xoops.de, http://service.bama-webdesign.de // License Type : GPL: See /manual/LICENSES/GPL.txt // ------------------------------------------------------------------------- // include("header.php"); include(XOOPS_ROOT_PATH."/header.php"); include(XOOPS_ROOT_PATH."/modules/ecal/cache/config.php"); $day = !empty($_POST['week']) ? $_POST['week'] : $_GET['week']; if ($xoopsUser) { $useroffset = $xoopsUser->getVar("timezone_offset"); } else { $useroffset = $bcoosConfig['default_TZ']; } $usertimevent = (time() + (($useroffset - ($bcoosConfig['server_TZ'] - date('I'))) * 3600)); $currentday = date("j", $usertimevent); $currentmonth = date("m", $usertimevent); $currentyear = date("Y", $usertimevent); $wochentag = date("l", $usertimevent); $month = date("m", $usertimevent); $year = date("Y", $usertimevent); $lastweek = $week -1; $nextweek = $week +1; if ($beginn == 1) { if ($wochentag == "Monday") { $usertimevent = time() + ($useroffset*3600+86400); } $lastmonday = date("Y/m/d",strtotime ("last Monday +$week week",$usertimevent)); //Datum letzter Montag $lastmondaytime = strtotime("$lastmonday") ; $lastmonday1 = date("Y-m-d",strtotime ("last Monday +$week week",$usertimevent)); //Datum letzter Montag für Datenbankabfrage $nextmonday = date("Y-m-d",strtotime ("last Monday +$nextweek week",$usertimevent)); //Datum nächster Montag $tag1[0] = _MON; $tag1[1] = _TUE; $tag1[2] = _WED; $tag1[3] = _THU; $tag1[4] = _FRI; $tag1[5] = _SAT; $tag1[6] = _SUN; }else{ if ($wochentag == "Sunday") { $usertimevent = time() + ($useroffset*3600+86400); } $lastmonday = date("Y/m/d",strtotime ("last Sunday +$week week",$usertimevent)); //Datum letzter Montag $lastmondaytime = strtotime("$lastmonday") ; $lastmonday1 = date("Y-m-d",strtotime ("last Sunday +$week week",$usertimevent)); //Datum letzter Montag für Datenbankabfrage $nextmonday = date("Y-m-d",strtotime ("last Sunday +$nextweek week",$usertimevent)); //Datum nächster Montag $nextmondaytime = strtotime("last Sunday +$nextweek week",$usertimevent); $tag1[0] = _SUN; $tag1[1] = _MON; $tag1[2] = _TUE; $tag1[3] = _WED; $tag1[4] = _THU; $tag1[5] = _FRI; $tag1[6] = _SAT; } $query = $db->query("SELECT id, stamp, subject, username, privat, high FROM ".$db->prefix("ecal")." WHERE (stamp >= \"$lastmonday1 00:00:00\" and stamp <= \"$nextmonday 00:00:00\") AND valid = 'yes' ORDER BY stamp"); while($myrow = $db->fetchArray($query)) { $jahr = substr($myrow['stamp'],0,4); $monat = substr($myrow['stamp'],5,2); $tag = substr($myrow['stamp'],8,2); $datum = $tag.".".$monat.".".$jahr; //Datum anpassen für ausgabeabfrage if ($xoopsUser) { if ($myrow["privat"] == 1 and $myrow["username"] == $xoopsUser->uname()) { if ($myrow['high'] == 1) { $high = _CAL_TIPP; }else{ $high = ""; } $termin[$datum] .= "$high "; $termin[$datum] .= ""._CAL_TERMIN." ".$myrow['subject']."
"; } } if($myrow["privat"] == 0) { if ($myrow['high'] == 1) { $high = _CAL_TIPP; }else{ $high = ""; } $termin[$datum] .= "$high "; $termin[$datum] .= ""._CAL_TERMIN." ".$myrow['subject']."
"; if ($myrow['high'] == 1) { $high[$datum] = _CAL_TIPP; }else{ $high[$datum] = ""; } } } //news ************** if ($shownews == 1) { $result=$db->query("SELECT storyid, published, title FROM ".$db->prefix("stories")." WHERE published >= ".strtotime("$lastmonday1 00:00:00")." and published <= ".strtotime("$nextmonday 23:59:59")." and published <= ". time().""); while (list( $storyid, $published, $title) = $db->fetchRow($result)){ $tagnews = date("d",$published); $monatnews = date("m",$published); $jahrnews = date("Y",$published); $datumnews = $tagnews.".".$monatnews.".".$jahrnews; //Datum anpassen für ausgabeabfrage $news[$datumnews] .= ""._CAL_NEWS." $title
"; } } OpenTable(); define("_NAVPAGE","WEEK"); include ("include/nav.php"); echo ""; echo ""; echo ""; echo "
"; form_last_week($lastweek); echo ""._WEEKCAL.""; form_next_week($nextweek); echo "
"; echo ""; for ($i=0; $i<=6;$i++){ $wochentag = date("l", $lastmondaytime + 3600 * 24 * $i); $daycal = date("d.m.Y",strtotime ("+$i day",$lastmondaytime)); $dayheute = date("d.m",strtotime ("+$i day",$lastmondaytime)); $yy = $currentday.".".$currentmonth; if ($yy == $dayheute) { echo ""; }elseif ($wochentag == "Saturday" or $wochentag == "Sunday"){ echo ""; }else{ echo ""; } } echo "
".$tag1[$i]."
".$daycal."



$termin[$daycal]$news[$daycal]
".$tag1[$i]."
".$daycal."



$termin[$daycal]$news[$daycal]
".$tag1[$i]."
".$daycal."



$termin[$daycal]$news[$daycal]
"; echo ""; echo ""; if ($xoopsUser) { $group = $xoopsUser->groups(); }else{ $group[] = 3; } $anno = explode("|", $anoevent); $is = array_intersect ($group, $anno); if (count($is) > 0) { echo ""; } else { echo ""; } echo "
"; form_last_week($lastweek); echo ""; form_add_event($month, $year); echo " "; form_next_week($nextweek); echo "
"; CloseTable(); include(XOOPS_ROOT_PATH."/footer.php"); ?>