Example #1
0
 public static function sendError($error = 1)
 {
     header('HTTP/1.1 500 Internal Server Error');
     //header('Content-Type: application/json; charset=UTF-8');
     DB::close();
     User::destroySession();
     exit(self::encodeError($error));
 }
Example #2
0
// check the username/password to auth if present
if (!$errors && strlen($username) && strlen($password)) {
    if ($User->login($username, $password)) {
        // redirect after login -AZ
        //print "ref = $REF<br/>";
        if ($REF) {
            header('location:' . $REF);
        } else {
            header('location:index.php');
        }
        exit;
    } else {
        // user login failed
        $Message .= "<span class='error'>Invalid login: {$username} </span><br/>" . "Please check your username and password and make sure your account is activated.";
        // Clear the current session cookie
        $User->destroySession();
    }
}
// top header links
$EXTRA_LINKS = "<span class='extralinks'>";
$EXTRA_LINKS .= "<a  class='active' href='{$CONFADMIN_URL}/index.php' title='Sakai accounts home'><strong>Home</strong></a>:";
$EXTRA_LINKS .= "<a href='{$CONFADMIN_URL}/registration/index.php'>Register</a>" . "<a href='{$CONFADMIN_URL}/proposals/index.php'>Call for Proposals</a>";
if ($SCHEDULE_PUBLISHED) {
    $EXTRA_LINKS .= "<a href='{$CONFADMIN_URL}/admin/schedule.php'>Schedule (table view)</a>";
    $EXTRA_LINKS .= "<a href='{$CONFADMIN_URL}/admin/schedule_details.php'>Schedule (list view)</a>";
    $EXTRA_LINKS .= "<a href='{$CONFADMIN_URL}/volunteer.php'>VOLUNTEER</a>";
} else {
    $EXTRA_LINKS .= "<a href='{$CONFADMIN_URL}/admin/draft_schedule.php'>Schedule</a>";
}
$EXTRA_LINKS .= "</span>";
//INCLUDE THE HEADER
Example #3
0
<?php

require_once "boot.php";
User::destroySession();
header("Location: index.php");