+ Changed generating last post and post count in forum and topic.php
+ Deleted not used template file: post_add_body.tpl + Replaced MCP images git-svn-id: https://svn.pioder.pl/uf-svn/uF@21 72ec579a-5ced-4fa4-82f3-afba5d98df2f
This commit is contained in:
@@ -65,7 +65,7 @@ if (isset($_GET['mode']))
|
||||
$user = strip_tags(addslashes($_POST['user']));
|
||||
$pass = md5(strip_tags($_POST['pass']));
|
||||
$sql = "SELECT `u_id`, `nick`, `pass` FROM `".USERS_TABLE."` WHERE nick='$user'";
|
||||
$query = DataBase::sql_query($sql,'GENERAL','Could not obtain user inforamtion');
|
||||
$query = DataBase::sql_query($sql,GENERAL,'Could not obtain user inforamtion');
|
||||
$result = DataBase::fetch($query);
|
||||
$nick = $result['nick'];
|
||||
if ($result['nick']==$user)
|
||||
@@ -76,7 +76,7 @@ if (isset($_GET['mode']))
|
||||
{
|
||||
$user_id = $result['u_id'];
|
||||
$sql = "DELETE FROM `".SESSIONS_TABLE."` WHERE `u_id`='$user_id'";
|
||||
DataBase::sql_query($sql,'GENERAL','Could not delete session.');
|
||||
DataBase::sql_query($sql,GENERAL,'Could not delete session.');
|
||||
if (User::UserInformation($user_id,'active')==0)
|
||||
{
|
||||
SessDelete($_SESSION['uid']);
|
||||
@@ -88,10 +88,10 @@ if (isset($_GET['mode']))
|
||||
$_SESSION['sessionid']=$ssid;
|
||||
//session register
|
||||
$sql = "INSERT INTO `".SESSIONS_TABLE."` VALUES ('', '".$_COOKIE[SESS_NAME]."','$user_id','".time()."')";//query
|
||||
DataBase::sql_query($sql,'GENERAL','Could not add new session.');//run query
|
||||
DataBase::sql_query($sql,GENERAL,'Could not add new session.');//run query
|
||||
//next...
|
||||
$sql = "UPDATE `".USERS_TABLE."` SET lastvisit='".time()."' WHERE u_id='$user_id'";//update lastvisit for user
|
||||
DataBase::sql_query($sql,'GENERAL','Could not update user lastvisit');//run query
|
||||
DataBase::sql_query($sql,GENERAL,'Could not update user lastvisit');//run query
|
||||
$msg = $lng['youareloggedas'].': <b>'.$nick.'</b>';// messaage "login as.."
|
||||
$skin['pa_link']='';
|
||||
$stop = TimeGeneration();//generate generation's time
|
||||
|
||||
Reference in New Issue
Block a user