Пример #1
0
<?php

session_start();
require_once 'inc/global.inc.php';
$UserTools = new UserTools();
$UserTools->logout();
header('location:index.php');
Пример #2
0
<?php

/**
 * Created by PhpStorm.
 * User: Alexandr
 * Date: 01.02.16
 * Time: 18:03
 */
if (isset($_GET['key1'])) {
    $logout = new UserTools();
    $logout->logout($_GET['key1']);
}
Пример #3
0
// the currently active form.
//
require_once 'includes/global.inc.php';
require_once 'classes/Answer.class.php';
require_once 'classes/AnswerTools.class.php';
//check to see if they're logged in
if (!isset($_SESSION['logged_in'])) {
    header("Location: login.php");
}
$aTool = new AnswerTools();
$uTool = new UserTools();
//get the user object from the session
$userID = $_SESSION["userID"];
if ($userID == "") {
    echo "Lost userID SESSION variable...<br>";
    $uTool->logout();
    header("Location: login.php");
}
$user = $uTool->get($userID);
$toID = "";
$toUser = null;
//
// See who is selected from the user popup menu. This is
// who we want to send comments to.
//
if (isset($_POST['toID'])) {
    $toID = $_POST['toID'];
} else {
    // If no one is selected, select the first one in the menu.
    $db = new DB();
    $rows = $db->select2("id", "users", "userPriv='S'", "lastName");