Last update before closing project. Thank you!

git-svn-id: https://svn.pioder.pl/uf-svn/uF@38 72ec579a-5ced-4fa4-82f3-afba5d98df2f
This commit is contained in:
pioder
2010-03-27 17:41:57 +00:00
parent 43657534ab
commit 01741920b0
46 changed files with 652 additions and 661 deletions

View File

@@ -40,12 +40,12 @@ if (empty($_SESSION['sessionid']))
if (empty($_COOKIE['queries']))
{
$_COOKIE['queries']=0;
setcookie('queries','0',time()+31104000);
setcookie('queries','0',$_SERVER['REQUEST_TIME']+31104000);
}
if($_COOKIE['queries']>0)
{
setcookie('queries','0',time()+31104000);
setcookie('queries','0',$_SERVER['REQUEST_TIME']+31104000);
$_COOKIE['uid']='0';
}
@@ -56,7 +56,7 @@ function SessRegister()
if ($uid>0)
{
SessDelete($uid);
$time = time();
$time = $_SERVER['REQUEST_TIME'];
$sql = "INSERT INTO ".SESSIONS_TABLE." VALUES ('', '".$_COOKIE[SESS_NAME]."','$uid','$time')";
$query = DataBase::sql_query($sql,GENERAL,'Could not add new session.',true);
if (DataBase::num_rows($query)>0)
@@ -73,7 +73,7 @@ function SessRegister()
function SessDeleteOld()
{
$time = time();
$time = $_SERVER['REQUEST_TIME'];
$sql = "DELETE FROM ".SESSIONS_TABLE." WHERE time+129600<$time;";
DataBase::sql_query($sql, GENERAL,'Could not delete session',true);
}
@@ -96,7 +96,7 @@ function SessDelInvalid()
function SessDelete($uid)
{
$time = time();
$time = $_SERVER['REQUEST_TIME'];
$sql = "DELETE FROM ".SESSIONS_TABLE." WHERE u_id='$uid'";
$query = DataBase::sql_query($sql, GENERAL,'Could not delete session',true);
if (DataBase::num_rows($query)>0)
@@ -113,7 +113,7 @@ function SessView()
global $user;
global $forum_config;
$name = '';
$time = time();
$time = $_SERVER['REQUEST_TIME'];
$sql = "SELECT ".SESSIONS_TABLE.".*, ".USERS_TABLE.".*, ".SESSIONS_TABLE.".u_id AS u_id FROM ".SESSIONS_TABLE." LEFT JOIN ".USERS_TABLE." ON ".SESSIONS_TABLE.".u_id = ".USERS_TABLE.".u_id WHERE time+1250>$time;";
$query = DataBase::sql_query($sql, GENERAL,'Could not obtain sessions information.');
if (DataBase::num_rows($query)>0)