Ejemplo n.º 1
0
$mode = 'invalid';
$current_page = null;
$db_connected = false;
$user_loggedin = false;
$conn = null;
$user_id = null;
/* Database Table */
define('USER_TABLE', 'hs_users');
/* External Functions and Variables */
require_once __ISN_PATH__ . 'functions.php';
require_once __ISN_PATH__ . 'functions_template.php';
require_once __ISN_PATH__ . 'functions_challenges.php';
require_once __ISN_PATH__ . 'db_config.php';
require_once __ROOTPATH__ . 'extension.php';
require_once __ROOTPATH__ . 'welcomemessage.php';
process_uri($_SERVER['REQUEST_URI']);
//Process the REQUEST_URI and set the mode and current_page
session_start();
//Start the Session
db_connect();
//Connect to the Database
if (!isset($_SESSION['hs_uname']) && !isset($_SESSION['hs_unique'])) {
    $_SESSION['hs_uname'] = null;
    $_SESSION['hs_unique'] = null;
}
$pwdlist = null;
/* Check if the User has Already Logged in and set the Global */
if (isset($_SESSION['hs_uname']) && isset($_SESSION['hs_unique']) && $_SESSION['hs_uname'] != '' && $_SESSION['hs_unique'] != '') {
    $query = "SELECT user_id, user_pwdset FROM " . USER_TABLE . " WHERE " . "user_name='" . $_SESSION['hs_uname'] . "' AND " . "user_lastsession='" . session_id() . "' AND " . "user_uniqueid='" . $_SESSION['hs_unique'] . "' " . "LIMIT 1";
    $result = $conn->query($query);
    if ($result) {
Ejemplo n.º 2
0
function a_tag($content, $href, $attributes = array())
{
    $attributes['href'] = process_uri($href);
    return open_tag('a', $content, $attributes);
}