Exemplo n.º 1
0
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>

<h2>Choose which site this user should log in to ...</h2>

<p>&nbsp;</p>

<form role="form" 
	action="<?php 
Exemplo n.º 2
0
        $pw_errors[] = 'npw1';
    } elseif (!chkDigit($_POST['npw1'])) {
        $pwhelp = 'No numbers in password';
        $pw_errors[] = 'npw1';
    } elseif ($_POST['npw1'] != $_POST['npw2']) {
        $pwhelp = 'New passwords are not the same';
        $pw_errors[] = 'npw1';
    }
    $stfid = $_POST['stfid'];
    if (empty($pw_errors)) {
        $cryptPwd = mkPwd($_POST['npw1']);
        # Update DB
        $pwdUpdate = new Pwd();
        $pwdUpdate->setUsr($rrt->usr);
        $pwdUpdate->setPw($cryptPwd);
        $result = $pwdUpdate->updateDB();
        $logresult = logEvent(33, $logContent);
        $done = 1;
    }
}
$pagetitle = "staff";
include "../tmpl/header.php";
?>

<h1>Staff Log In</h1>
<?php 
if (isset($done) && $done) {
    echo '<h2 style="color:red;margin-top:40px;margin-left:150px;">The password has been changed</h2>';
} else {
    if ($pwhelp != '') {
        echo '<li style="margin-left:40px;color:red;font-size:100%;">There is a problem with the new password: '******'</li>';