Exemple #1
0
	require "functions.php";
	require "includes.php";
	require "menu.php";

	/* setup variables */
	$action = GetVariable("action");
	$year = GetVariable("year");
	$datestart = GetVariable("datestart");
	$dateend = GetVariable("dateend");
	$modality = GetVariable("modality");
	$studysite = GetVariable("studysite");
	
	switch ($action) {
		case 'yearstudy':
			DisplayMenu();
			DisplayYear($year, "studies", $modality, $studysite);
			break;
		case 'viewreport':
			ViewReport($datestart, $dateend, $modality, $studysite);
			break;
		case 'menu':
		default:
			DisplayMenu();
			break;
	}
	
	
	/* ----------------------------------------------- */
	/* --------- DisplayMenu ------------------------- */
	/* ----------------------------------------------- */
	function DisplayMenu() {
Exemple #2
0
/* check for blank dates */
if ($year == "") {
    $year = date("Y");
}
if ($month == "") {
    $month = date("m");
}
if ($day == "") {
    $day = date("d");
}
$holidays = CalculateHolidays($year);
/* check the action */
if ($action == "year") {
    setcookie("currentview", "year");
    DisplayMenu($year, $month, $day, "year");
    DisplayYear($year, $currentcal);
} elseif ($action == "month") {
    setcookie("currentview", "month");
    DisplayMenu($year, $month, $day, "month");
    DisplayMonth($year, $month, $holidays, $currentcal);
} elseif ($action == "day") {
    setcookie("currentview", "day");
    DisplayMenu($year, $month, $day, "day");
    DisplayDay($year, $month, $day, $holidays, $currentcal);
} elseif ($action == "manage") {
    DisplayManagementMenu();
} elseif ($action == "" || $action == "week") {
    setcookie("currentview", "week");
    DisplayMenu($year, $month, $day, "week");
    DisplayWeek($year, $month, $day, $holidays, $currentcal);
}