<?php
/* Modified by NATYS */
/* $Id: smenu.php,v 1.5 2003/11/17 11:26:43 leyeti Exp $ */

if(isset($_POST["gotodate"])){
    $date = mktime($_SESSION["MGW"]->settings["calendar_viewfrom"], 0, 0, $_POST["gmonat"], $_POST["gtag"], $_POST["gjahr"]);
}
else $date = isset($_GET["date"]) ? $_GET["date"] : "";

if ($date == "") {
    $newapp_date = mktime($_SESSION["MGW"]->settings["calendar_viewfrom"], 0, 0, date("m", time()), date("d", time()), date("Y", time()));
}
else {
    $da = getdate($date);
    $newapp_date = mktime($_SESSION["MGW"]->settings["calendar_viewfrom"], 0, 0, $da["mon"], $da["mday"], $da["year"]);
}

$o = 0;

$smenu[$o]["name"] = Lang::getLanguageString("temp_newappointment");
$smenu[$o]["link"] = ROOTURL."modules/calendar/index.php?action=new1&date=$newapp_date&".SID;
//$smenu[$o]["pic"] = "";
//$smenu[$o]["target"] = "";
//$smenu[$o]["static_menu"]["show_only_pic"] = false;
$o++;

$smenu[$o]["name"] = "empty";
$o++;

$smenu[$o]["name"] = Lang::getLanguageString("today");
$smenu[$o]["link"] = ROOTURL."modules/calendar/index.php?submenu=yes&".SID;
//$smenu[$o]["pic"] = "";
//$smenu[$o]["target"] = "";
//$smenu[$o]["static_menu"]["show_only_pic"] = false;
$o++;

$smenu[$o]["name"] = Lang::getLanguageString("this_week");
$smenu[$o]["link"] = ROOTURL."modules/calendar/week.php?".SID;
//$smenu[$o]["pic"] = "";
//$smenu[$o]["target"] = "";
//$smenu[$o]["static_menu"]["show_only_pic"] = false;
$o++;

$smenu[$o]["name"] = Lang::getLanguageString("this_month");
$smenu[$o]["link"] = ROOTURL."modules/calendar/month.php?".SID;
//$smenu[$o]["pic"] = "";
//$smenu[$o]["target"] = "";
//$smenu[$o]["static_menu"]["show_only_pic"] = false;
$o++;

$smenu[$o]["name"] = "empty";
$o++;

$smenu[$o]["name"] = Lang::getLanguageString("gentemp_view_avail");
$smenu[$o]["link"] = ROOTURL."modules/calendar/view_avail.php?action=choose&".SID;
//$smenu[$o]["pic"] = "";
//$smenu[$o]["target"] = "";
//$smenu[$o]["static_menu"]["show_only_pic"] = false;
$o++;

$smenu[$o]["name"] = Lang::getLanguageString("gentemp_subjection_followup");
$smenu[$o]["link"] = ROOTURL."modules/calendar/subj_followup.php?action=view&".SID;
//$smenu[$o]["pic"] = "";
//$smenu[$o]["target"] = "";
//$smenu[$o]["static_menu"]["show_only_pic"] = false;
$o++;

$smenu[$o]["name"] = "empty";
$o++;

$smenu[$o]["name"] = Lang::getLanguageString("gentemp_rights_management");
$smenu[$o]["link"] = ROOTURL."modules/calendar/rights_manage.php?action=view&".SID;
//$smenu[$o]["pic"] = "";
//$smenu[$o]["target"] = "";
//$smenu[$o]["static_menu"]["show_only_pic"] = false;


createSubmenu($smenu);
?>
