Exemple #1
0
<?php

include 'configuration.php';
require 'coreclass.php';
//global $db;
$auth = new user_authentication();
$db = new database();
//$database->connect('localhost', 'root', '', 'brcms', false );
if (isset($_POST['submit'])) {
    $username = $_POST['username'];
    $password = $_POST['password'];
    $auth->checkUserLogin($username, $password, 'index.php', 'failed.php');
}
if (isset($_POST['cancel'])) {
    header('location: ../index.php');
}
Exemple #2
0
<?php

include 'configuration.php';
require 'coreclass.php';
session_start();
// Log the activity
$action = new activity();
$action->track_activity($_SESSION['userID'], $action->logout, '--');
// log-out the user
$auth = new user_authentication();
$auth->set_User_logout($_SESSION['userID']);
$auth->logout();
header('Location: index.php');
// back to main page