+ 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:
@@ -24,7 +24,7 @@ class User
|
||||
function UserInformation($uid, $inf)
|
||||
{
|
||||
$sql = "SELECT `$inf` FROM ".USERS_TABLE." WHERE u_id='$uid';";
|
||||
$query = DataBase::sql_query($sql,'GENERAL','Could not obtain user information.');
|
||||
$query = DataBase::sql_query($sql,GENERAL,'Could not obtain user information.');
|
||||
$result = DataBase::fetch($query);
|
||||
$result = $result[$inf];
|
||||
return $result;
|
||||
@@ -33,7 +33,7 @@ class User
|
||||
function UserIdByNick($nick)
|
||||
{
|
||||
$sql = "SELECT * FROM `".USERS_TABLE."` WHERE `nick`='$nick';";
|
||||
$result = DataBase::fetch(DataBase::sql_query($sql,'GENERAL','Could not obtain user information.'));
|
||||
$result = DataBase::fetch(DataBase::sql_query($sql,GENERAL,'Could not obtain user information.'));
|
||||
$result = $result['u_id'];
|
||||
/*if ($result=='')
|
||||
{
|
||||
@@ -46,13 +46,13 @@ class User
|
||||
{
|
||||
$last= DataBase::new_id(USERS_GROUP_TABLE);
|
||||
$sql = "INSERT INTO `".USERS_GROUP_TABLE."` VALUES ('$last','$uid', '$gid')";
|
||||
DataBase::sql_query($sql,'GENERAL','Could not add user to group.');
|
||||
DataBase::sql_query($sql,GENERAL,'Could not add user to group.');
|
||||
}
|
||||
|
||||
function DeleteFromGroup($uid, $gid)
|
||||
{
|
||||
$sql = "DELETE FROM `".USERS_GROUP_TABLE."` WHERE `u_id`='$uid' AND `g_id`='$gid'";
|
||||
DataBase::sql_query($sql,'GENERAL','Could not delete user for group.');
|
||||
DataBase::sql_query($sql,GENERAL,'Could not delete user for group.');
|
||||
}
|
||||
|
||||
function LogedAs($sid, $uid)
|
||||
@@ -119,7 +119,7 @@ class User
|
||||
if ($uid>0)
|
||||
{
|
||||
$sql = "SELECT * FROM ".USERS_TABLE." WHERE u_id='$uid'";
|
||||
$query = DataBase::sql_query($sql,'GENERAL','Could not obtain user`s rank information.');
|
||||
$query = DataBase::sql_query($sql,GENERAL,'Could not obtain user`s rank information.');
|
||||
$result = DataBase::fetch($query);
|
||||
$rank = $result['rank'];
|
||||
if (($rank=='1') or ($rank=='2'))
|
||||
@@ -156,7 +156,7 @@ class User
|
||||
`view_shoutbox` = '$allow_shoutbox',
|
||||
`limit_users` = '$limit_users'
|
||||
WHERE `u_id` ='$uid' LIMIT 1 ;";
|
||||
DataBase::sql_query($sql,'CRITICAL','Could not update user information');
|
||||
DataBase::sql_query($sql,CRITICAL,'Could not update user information');
|
||||
}
|
||||
|
||||
function UpdateAdminPools($uid, $posts, $rank, $active, $nick)
|
||||
@@ -167,7 +167,7 @@ class User
|
||||
`active` = '$active',
|
||||
`nick` = '$nick'
|
||||
WHERE `u_id` ='$uid' LIMIT 1 ;";
|
||||
DataBase::sql_query($sql,'CRITICAL','Could not update user information');
|
||||
DataBase::sql_query($sql,CRITICAL,'Could not update user information');
|
||||
}
|
||||
|
||||
function UpdatePassword($uid, $pass)
|
||||
@@ -175,7 +175,7 @@ class User
|
||||
$sql ="UPDATE `".USERS_TABLE."` SET
|
||||
`pass` = '$pass'
|
||||
WHERE `u_id` ='$uid' LIMIT 1 ;";
|
||||
DataBase::sql_query($sql,'CRITICAL','Could not update user information');
|
||||
DataBase::sql_query($sql,CRITICAL,'Could not update user information');
|
||||
}
|
||||
|
||||
function CreateProfile($nick, $pass, $email, $gg, $allow_gg, $allow_email, $allow_qr, $sig, $av, $interests)
|
||||
@@ -185,7 +185,7 @@ class User
|
||||
$time = time();
|
||||
$sql = "INSERT INTO ".USERS_TABLE." VALUES
|
||||
('$last', '$nick', '$pass', '$email', '0', '$time', '0', '$gg', '$allow_gg', '$allow_email', '$allow_qr', '".$forum_config['view_shoutbox']."', '".$forum_config['defaultskin']."', '".$forum_config['defaultlang']."','".$forum_config['limit_tpid']."', '".$forum_config['limit_ftid']."', '".$forum_config['limit_users']."', '$sig', '$av', '1','0','$interests');";
|
||||
DataBase::sql_query($sql,'CRITICAL','Could not create new user');
|
||||
DataBase::sql_query($sql,CRITICAL,'Could not create new user');
|
||||
}
|
||||
|
||||
function UserMsgs()
|
||||
@@ -194,7 +194,7 @@ class User
|
||||
if($uid>0)
|
||||
{
|
||||
$sql = "SELECT count(*) as `m_id` FROM ".PM_INBOX_TABLE." WHERE `u_id`='$uid' AND `read`='0'";
|
||||
$result = DataBase::fetch(DataBase::sql_query($sql,'GENERAL','Could not obtain amounts PM of User.'));
|
||||
$result = DataBase::fetch(DataBase::sql_query($sql,GENERAL,'Could not obtain amounts PM of User.'));
|
||||
$result = $result['m_id'];
|
||||
if ($result>0)
|
||||
{
|
||||
@@ -210,14 +210,14 @@ class User
|
||||
function UserAddWarn($uid, $value, $motive)
|
||||
{
|
||||
$sql = "INSERT INTO `".WARNINGS_TABLE."` ( `w_id` , `u_id` , `value` , `motive` ) VALUES('','$uid','$value','$motive');";
|
||||
DataBase::sql_query($sql,'GENERAL','Could not add new warn.');
|
||||
DataBase::sql_query($sql,GENERAL,'Could not add new warn.');
|
||||
if (User::UserLevelWarns($uid)==100)
|
||||
{
|
||||
$ban_ip = '0.0.0.0';
|
||||
$ban_uid = $uid;
|
||||
$ban_motive = $lng['warns_ban'];
|
||||
$sql = "INSERT INTO ".BANLIST_TABLE." VALUES ('', '$ban_uid', '$ban_ip', '$ban_motive')";
|
||||
DataBase::sql_query($sql,'GENERAL','Could not update add ban.');
|
||||
DataBase::sql_query($sql,GENERAL,'Could not update add ban.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user