Ejemplo n.º 1
0
SOFTWARE.
*/
$pagetitle = "staff";
$navtitle = 'Staff';
$keywords = '';
$description = '';
include "/srv/athenace/lib/shared/common.php";
include "/srv/athenace/lib/intranet/common.php";
include "/srv/athenace/lib/shared/functions_form.php";
if (!is_numeric($_GET['id'])) {
    header("Location: /staff/?id=notFound");
    exit;
}
$pwhelp = '';
if (isset($_GET['go']) && $_GET['go'] == "y") {
    $pwdid = getPwdID($_GET['id']);
    # Update DB
    $pwdUpdate = new Pwd();
    $pwdUpdate->setPwdid($pwdid);
    $pwdUpdate->setStaffid($_GET['id']);
    $pwdUpdate->setSeclev($_POST['seclev']);
    $pwdUpdate->updateDB();
    #	$logresult = logEvent(15,$logContent);
    $done = 1;
}
$pagetitle = "staff";
include "../tmpl/header.php";
?>

<h1>Staff Access</h1>
Ejemplo n.º 2
0
    } elseif (!chkLowercase($_POST['npw1'])) {
        $pwhelp = 'No lower case letters in password';
        $errors[] = 'npw1';
    } elseif (!chkUppercase($_POST['npw1'])) {
        $pwhelp = 'No upper case letters in password';
        $errors[] = 'npw1';
    } elseif (!chkDigit($_POST['npw1'])) {
        $pwhelp = 'No numbers in password';
        $errors[] = 'npw1';
    } elseif ($_POST['npw1'] != $_POST['npw2']) {
        $pwhelp = 'New passwords are not the same';
        $errors[] = 'npw1';
    }
    if (empty($errors)) {
        $newPwd = mkPwd($_POST['npw1']);
        $pwdid = getPwdID($staffid);
        // Update DB
        $pwdUpdate = new Pwd();
        $pwdUpdate->setPwdid($pwdid);
        $pwdUpdate->setPw($newPwd);
        $pwdUpdate->updateDB();
        $logresult = logEvent(33, $logContent);
        $done = 1;
        $token = base64_encode(encrypt($rrt->usr . "|" . $_POST['npw1']));
        header("Location: /pass.php?t={$token}");
    }
}
$pagetitle = "staff";
$pagescript = array();
$pagestyle = array();
include "tmpl/header.php";