/*
# UBB.threads, Version 6
# Official Release Date for UBB.threads Version6: 06/05/2002
# First version of UBB.threads created July 30, 1996 (by Rick Baker).
# This entire program is copyright Groupee, Inc., 2005.
# For more info on UBB.threads and other Groupee Services
# visit http://www.groupee.com/ & http://www.ubbcentral.com/
# Program Author: Rick Baker.
# File Version 6.5.5
# You may not distribute this program in any manner, modified or otherwise,
# without the express, written written consent from Groupee, Inc..
# Note: if you modify ANY code within UBB.threads, we at Groupee, Inc.
# cannot offer you support-- thus modify at your own peril :)
# ---------------------------------------------------------------------------
*/
// Require the library
require ("./includes/main.inc.php");
// -------------
// Get the input
$Cat = get_input("Cat","get","cat");
// --------------------------------
// require the proper language file
require "languages/{$_SESSION['myprefs']['language']}/login.php";
// Send a html header
$html = new html;
$userob = new user;
$user = $userob -> authenticate("U_Groups, U_TimeOffset,U_Display");
// --------------------------------------------------------
// Delete their cookie and remove them from the online page
$Username_q = addslashes($user['U_Username']);
$query = "
DELETE FROM {$config['tbprefix']}Online
WHERE O_Username = '$Username_q'
";
$dbh -> do_query($query,__LINE__,__FILE__);
// -------------------------------------------
// Get rid of the values in the TempRead field
$date = $html->get_date();
$query = "
UPDATE {$config['tbprefix']}Users
SET U_LastOn = '$date',
U_SessionId = '0'
WHERE U_Username = '$Username_q'
";
$dbh -> do_query($query,__LINE__,__FILE__);
// ----------------------------------
// get rid of their session or cookie
if ($config['tracking'] == "sessions") {
session_destroy();
}
else {
$html -> ubbt_setcookie("{$config['cookieprefix']}w3t_myid","", time() - 86400);
$html -> ubbt_setcookie("{$config['cookieprefix']}w3t_mysess","", time() - 86400);
$html -> ubbt_setcookie("{$config['cookieprefix']}w3t_key","", time() - 86400);
$_SESSION['forumvisit'] = array(); // *o_O*
}
// Generate any content island feeds for recent visitors
define('visitors','1');
define('CI_BUILDER','1');
include("ci_builder.php");
// ----------------------------------
// Give them a new login box
$html -> send_header($ubbt_lang['LOGIN_PROMPT'],$Cat,0,$user,0,0,1);
if ($config['tracking'] == "cookies") {
$rememberme = " {$ubbt_lang['REMEMBER_ME']}
";
}
// ---------------------
// Grab the tablewrapper
list($tbopen,$tbclose) = $html -> table_wrapper();
if (!$debug) {
include ("$thispath/templates/$tempstyle/login.tmpl");
}
// Send the footer
$html -> send_footer();
?>