Exemple #1
0
if (!is_numeric($_GET['id'])) {
    header("Location: /staff/?id=notFound");
    exit;
}
$addsid = $r->addsid;
if (isset($_GET['remove']) && $_GET['remove'] == "y" && isset($_GET['id']) && is_numeric($_GET['id'])) {
    db_delete("staff", $_GET['id'], 'staffid');
    header("Location: /staff/");
    exit;
}
if (isset($_GET['go']) && $_GET['go'] == "y") {
    // Add to Address table
    $addsid = db_updateAddress($_POST, $addsid);
    # Update DB
    $staffUpdate = new Staff();
    $staffUpdate->setStaffid($_POST['staffid']);
    $staffUpdate->setFname($_POST['fname']);
    $staffUpdate->setSname($_POST['sname']);
    $staffUpdate->setNotes($_POST['notes']);
    $staffUpdate->setJobtitle($_POST['jobtitle']);
    $staffUpdate->setStatus($_POST['status']);
    $staffUpdate->updateDB();
    header("Location: /staff/");
    exit;
}
$pagetitle = "Edit Staff Member";
include "../tmpl/header.php";
?>

<h1>Edit Staff Members Details</h1>
<?php 
Exemple #2
0
$usr = $parts[0];
$pw = $parts[1];
// $staffid = pass ( $usr, $pw, 'staff' );
if (!isset($_POST['pt']) || $_POST['pt'] == '') {
    $staffid = pass($usr, $pw, 'staff');
} else {
    $cke = base64_decode($_POST['pt']);
    $keywords = preg_split("/\\./", $cke);
    if ($keywords[4] == 'ATHENASECCHK') {
        $sid = $keywords[0];
        $staffid = $keywords[1];
        $usr = $keywords[2];
        $pw = $keywords[3];
        // echo "$staffid, $usr, $pw";
        // exit();
    }
}
if ($staffid > -1) {
    dropCookie($staffid, $usr, $pw);
    // logEvent("26",$staffid,"Username:"******"Location: {$staff_url}");
} else {
    killCookie();
    // logEvent("31",0,"Username:"******"Location: {$login_url}/?pf=y");
}
Exemple #3
0
include "/srv/athenace/lib/shared/functions_form.php";
if (!is_numeric($_GET['id'])) {
    header("Location: /staff/?id=notFound");
    exit;
}
if (isset($_GET['go']) && $_GET['go'] == "y") {
    $staffDelete = new Staff();
    $staffDelete->setStaffid($_GET['id']);
    $staffDelete->deleteFromDB();
    header("Location: /staff/?ItemDeleted=y");
    exit;
}
include "../tmpl/header.php";
$staff = new Staff();
// Load DB data into object
$staff->setStaffid($_GET['id']);
$staff->loadStaff();
$all = $staff->getAll();
if (isset($all)) {
    ?>

<div class="panel panel-info">
	<div class="panel-heading">
		<strong>Delete <?php 
    echo $staff->getFname() . ' ' . $staff->getSname();
    ?>
?</strong>
	</div>
	<div class="panel-body">
		
		<dl class="dl-horizontal">