Exemplo n.º 1
0
<?php

require_once "atc.class.php";
$ATC = new ATC();
if ($ATC->logout()) {
    header('Location: ./', true, 302);
}
$ATC->gui_output_page_header('Logout');
?>
<h1> Goodbye </h1>
<p> You have been logged out </h1>
	
<?php 
$ATC->gui_output_page_footer('Logout');
Exemplo n.º 2
0
<?php

require_once "atc.class.php";
$ATC = new ATC();
$id = isset($_GET['id']) ? (int) $_GET['id'] : null;
if (!isset($_GET['showall'])) {
    $_GET['showall'] = 0;
}
$user = $ATC->get_personnel($id, 'ASC', null, (int) $_GET['showall']);
$ATC->gui_output_page_header('Personnel');
if (is_object($user)) {
    ?>
		<div id="personnelform">
			<h2 href="personal.php?id=<?php 
    echo $user->personnel_id;
    ?>
"> Personal details &mdash; <?php 
    echo $user->rank . ' ' . $user->display_name;
    ?>
 </h2>
			<div id="personal">
			</div>
	
			<h2 href="nok.php?id=<?php 
    echo $user->personnel_id;
    ?>
"> Next of Kin </h2>
			<div id="nok">
			</div>
	
			<h2 href="attendance.php?id=<?php 
Exemplo n.º 3
0
        break;
    }
}
// Default to all this year if we can't find a term start time matching what we asked for.
if (!isset($termstart)) {
    $termstart = date('Y') . '-01-01';
    $termend = date('Y') . '-12-31';
}
$users = $ATC->get_personnel(isset($_GET['id']) ? (int) $_GET['id'] : null, 'ASC', isset($_GET['id']) ? null : ATC_USER_GROUP_PERSONNEL, false);
if (!is_array($users)) {
    $foo[] = $users;
    $users = $foo;
}
$calendar = $ATC->get_attendance_register(date('Y') . '-01-01', date('Y') . '-12-31');
if (!isset($_GET['id'])) {
    $ATC->gui_output_page_header('Attendance');
    ?>
		<form name="datepicker" id="datepicker">
			<fieldset>
				<legend>Choose term</legend>
				<label for="term">Pick a term:</label>
				<select name="termstart" id="term">
					<?php 
    $y = 0;
    $t = 0;
    foreach ($terms as $term) {
        if ($y != date('Y', $term->startdate)) {
            $y = date('Y', $term->startdate);
            $t = 0;
        }
        $t++;