+ 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:
pioder
2009-05-03 21:00:21 +00:00
parent b1f37b6ea5
commit c2ba3eb804
70 changed files with 371 additions and 395 deletions

View File

@@ -44,27 +44,27 @@ switch($_GET['mode'])
//delete from users table
$sql = "DELETE FROM ".USERS_TABLE." WHERE `u_id`='$uid'";
DataBase::sql_query($sql,'GENERAL','Could not delete user.');
DataBase::sql_query($sql,GENERAL,'Could not delete user.');
//delete from PM SentBox table
$sql = "DELETE FROM ".PM_SENTBOX_TABLE." WHERE `u_n_id`='$uid'";
DataBase::sql_query($sql,'GENERAL','Could not delete user sentbox messages.');
DataBase::sql_query($sql,GENERAL,'Could not delete user sentbox messages.');
//update PM InBox table -> change u_n_id to Anonymous
$sql = "UPDATE ".PM_INBOX_TABLE." SET `u_n_id`='-1' WHERE `u_n_id`='$uid'";
DataBase::sql_query($sql,'GENERAL','Could not update user inbox messages.');
DataBase::sql_query($sql,GENERAL,'Could not update user inbox messages.');
//update user posts -> change u_id to Anonymous
$sql = "UPDATE ".POSTS_TABLE." SET `u_id`='-1' WHERE `u_id`='$uid'";
DataBase::sql_query($sql,'GENERAL','Could edit post.');
DataBase::sql_query($sql,GENERAL,'Could edit post.');
//update shoutbox messages -> change u_id to Anonymous
$sql = "UPDATE ".SHOUTBOX_TABLE." SET `u_id`='-1' WHERE `u_id`='$uid'";
DataBase::sql_query($sql,'GENERAL','Could edit shoutbox messages.');
DataBase::sql_query($sql,GENERAL,'Could edit shoutbox messages.');
//update user topics -> change u_id to Anonymous
$sql = "UPDATE ".TOPICS_TABLE." SET `author`='-1' WHERE `author`='$uid'";
DataBase::sql_query($sql,'GENERAL','Could edit post.');
DataBase::sql_query($sql,GENERAL,'Could edit post.');
//back to admin users
admin_message_forum($lng['user_deleted'],'admin_users.php');
@@ -196,7 +196,7 @@ switch($_GET['mode'])
}
}
$sql = "SELECT * FROM ".USERS_TABLE." WHERE `u_id`='$uid'";
$userinfo = DataBase::fetch(DataBase::sql_query($sql,'GENERAL','Could not obtain user information'));
$userinfo = DataBase::fetch(DataBase::sql_query($sql,GENERAL,'Could not obtain user information'));
if ($userinfo['rank']=='')
{
admin_message_forum($lng['no_user'],'admin_users.php?mode=view');
@@ -297,7 +297,7 @@ switch($_GET['mode'])
$page=1;
}
$count = DataBase::fetch(DataBase::sql_query("SELECT COUNT(`u_id`) as `u_id`
FROM ".USERS_TABLE,'GENERAL','Could not obtain count amout of users'));
FROM ".USERS_TABLE,GENERAL,'Could not obtain count amout of users'));
$count = $count['u_id'];
$count = ceil($count /30);
if(isset($_GET['page']) && ($_GET['page']>$count))
@@ -428,7 +428,7 @@ switch($_GET['mode'])
break;
}
}
$query = DataBase::sql_query($sql,'CRITICAL','Could not obtain user information.');
$query = DataBase::sql_query($sql,CRITICAL,'Could not obtain user information.');
while($result = DataBase::fetch($query))
{
$skin = array(