Esempio n. 1
0
function displaySettings()
{
    $tpl = new FastTemplate("templates/");
    $tpl->define(array("web_main" => "web_main.html", "web_header" => "web_header.html", "head_script" => "settings/head_script.html", "profile" => "settings/profile.html", "department" => "settings/department.html", "department_option" => "settings/department_option.html", "authority" => "settings/authority.html", "body" => "settings/body.html", "web_nav" => "web_nav.html", "web_footer" => "web_footer.html"));
    $userDAO = new UserDAO();
    $user = $userDAO->getUserByID($_SESSION["userID"]);
    //display profile
    displayProfile($user, $tpl);
    //display group
    displayGroup($user, $tpl);
    $role = $user->getRole();
    if ($role->getRoleID() == "1" || $role->getRoleID() == "2") {
        //display user
        displayUser($user, $tpl);
        desplayDepartment($user, $tpl);
        //display record
        displayRecord($user, $tpl);
        $tpl->parse("SETTINGS_AUTHORITY", "authority");
    } else {
        $tpl->assign("SETTINGS_DEPARTMENT", "");
        $tpl->assign("SETTINGS_USER", "");
        $tpl->assign("SETTINGS_RECORD", "");
        $tpl->assign("SETTINGS_AUTHORITY", "");
    }
    $tpl->assign("TITLE", "My Profile");
    $tpl->parse("WEB_HEADER", "web_header");
    $tpl->parse("HEAD_SCRIPT", "head_script");
    $tpl->parse("WEB_NAV", "web_nav");
    $tpl->parse("SETTINGS_PROFILE", "profile");
    $tpl->parse("BODY", ".body");
    $tpl->parse("WEB_FOOTER", "web_footer");
    $tpl->parse("MAIN", "web_main");
    $tpl->FastPrint();
}
Esempio n. 2
0
$User = $_SESSION["UserN"];
$sql = "SELECT `id`, `firstName`, `lastName` FROM `Proj2Advisors` WHERE `Username` = '{$User}'";
$rs = $COMMON->executeQuery($sql, "Advising Appointments");
$row = mysql_fetch_row($rs);
$id = $row[0];
$FirstName = $row[1];
$LastName = $row[2];
echo "<h2>Schedule for {$FirstName} {$LastName}<br>{$date}</h2>";
$date = date('Y-m-d', strtotime($date));
if ($_POST["type"] == 'Both') {
    displayGroup($id, $date);
    displayIndividual($id, $date);
} elseif ($_POST["type"] == 'Individual') {
    displayIndividual($id, $date);
} elseif ($_POST["type"] == 'Group') {
    displayGroup($id, $date);
} else {
    echo "Selection invalid";
}
?>
	<form method="link" action="AdminUI.php">
	<input type="submit" name="next" class="button large go" value="Return to Home">
	<input type="button" name="print" class="button large go" value="Print" onClick="window.print()">
	</form>

	</div>
	</div>
	<?php 
include './workOrder/workButton.php';
?>
	</div>