+ 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:
@@ -67,7 +67,7 @@ switch($_GET['mode'])
|
||||
}
|
||||
$ban_motive = strip_tags($_POST['motive']);
|
||||
$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.');
|
||||
admin_message_forum($lng['ban_added'],'banlist.php?mode=view');
|
||||
}
|
||||
else
|
||||
@@ -114,12 +114,12 @@ switch($_GET['mode'])
|
||||
message_forum($lng['no_ban_me'],'banlist.php?mode=view');
|
||||
}
|
||||
$bid =$bid = DataBase::fetch(DataBase::sql_query("SELECT
|
||||
`b_id` FROM ".BANLIST_TABLE." ORDER BY `b_id` DESC",'GENERAL',
|
||||
`b_id` FROM ".BANLIST_TABLE." ORDER BY `b_id` DESC",GENERAL,
|
||||
'Could not obtain last ban id'));
|
||||
$bid = $bid['b_id'];
|
||||
$bid = $bid +1;
|
||||
$sql = "INSERT INTO ".BANLIST_TABLE." VALUES ('$bid', '$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.');
|
||||
admin_message_forum($lng['ban_added'],'banlist.php?mode=view');
|
||||
}
|
||||
else
|
||||
@@ -168,12 +168,12 @@ switch($_GET['mode'])
|
||||
message_forum($lng['no_ban_me'],'banlist.php?mode=view');
|
||||
}
|
||||
$bid =$bid = DataBase::fetch(DataBase::sql_query("SELECT
|
||||
`b_id` FROM ".BANLIST_TABLE." ORDER BY `b_id` DESC",'GENERAL',
|
||||
`b_id` FROM ".BANLIST_TABLE." ORDER BY `b_id` DESC",GENERAL,
|
||||
'Could not obtain last ban id'));
|
||||
$bid = $bid['b_id'];
|
||||
$bid = $bid +1;
|
||||
$sql = "INSERT INTO ".BANLIST_TABLE." VALUES ('$bid', '$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.');
|
||||
admin_message_forum($lng['ban_added'],'banlist.php?mode=view');
|
||||
}
|
||||
else
|
||||
@@ -209,13 +209,13 @@ switch($_GET['mode'])
|
||||
$catalog = '../tmp/';
|
||||
if(!move_uploaded_file($_FILES['file']['tmp_name'], $catalog.$_FILES['file']['name']))
|
||||
{
|
||||
message_die('GENERAL','Could not upload file.','');
|
||||
message_die(GENERAL,'Could not upload file.','');
|
||||
}
|
||||
$open = fopen($catalog.$_FILES['file']['name'],'r');
|
||||
$file = fread($open, filesize($catalog.$_FILES['file']['name']));
|
||||
$item = @explode("\n",$file);
|
||||
$bid = $bid = DataBase::fetch(DataBase::sql_query("SELECT
|
||||
`b_id` FROM ".BANLIST_TABLE." ORDER BY `b_id` DESC",'GENERAL',
|
||||
`b_id` FROM ".BANLIST_TABLE." ORDER BY `b_id` DESC",GENERAL,
|
||||
'Could not obtain last ban id'));
|
||||
$bid = $bid['b_id'];
|
||||
$bid = $bid +1;
|
||||
@@ -223,7 +223,7 @@ switch($_GET['mode'])
|
||||
{
|
||||
$ban_ip = $item[$i];
|
||||
$sql = "INSERT INTO ".BANLIST_TABLE." VALUES ('$bid', '$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.');
|
||||
$bid = $bid +1;
|
||||
}
|
||||
admin_message_forum($lng['ban_added'],'banlist.php?mode=view');
|
||||
@@ -255,7 +255,7 @@ switch($_GET['mode'])
|
||||
{
|
||||
$bid = $_GET['id'];
|
||||
$sql = "DELETE FROM ".BANLIST_TABLE." WHERE `b_id`='$bid'";
|
||||
DataBase::sql_query($sql,'GENERAL','Could not delete banlist item.');
|
||||
DataBase::sql_query($sql,GENERAL,'Could not delete banlist item.');
|
||||
admin_message_forum($lng['ban_deleted'],'banlist.php?mode=view');
|
||||
break;
|
||||
}
|
||||
@@ -288,14 +288,14 @@ switch($_GET['mode'])
|
||||
`u_id`='$ban_uid',
|
||||
`motive`='$ban_motive'
|
||||
WHERE `b_id`='$bid'";
|
||||
DataBase::sql_query($sql,'GENERAL','Could not update ban.');
|
||||
DataBase::sql_query($sql,GENERAL,'Could not update ban.');
|
||||
admin_message_forum($lng['ban_edited'],'banlist.php?mode=view');
|
||||
}
|
||||
else
|
||||
{
|
||||
$bid = $_GET['id'];
|
||||
$sql = "SELECT * FROM ".BANLIST_TABLE." WHERE `b_id`='$bid'";
|
||||
$query = DataBase::sql_query($sql,'CRITICAL','Could not obtain banlist item information');
|
||||
$query = DataBase::sql_query($sql,CRITICAL,'Could not obtain banlist item information');
|
||||
$result = DataBase::fetch($query);
|
||||
$_POST['ip']=$result['IP'];
|
||||
$_POST['motive'] = $result['motive'];
|
||||
@@ -321,18 +321,18 @@ switch($_GET['mode'])
|
||||
case 'clear':
|
||||
{
|
||||
$sql = "TRUNCATE `".BANLIST_TABLE."`";
|
||||
DataBase::sql_query($sql, 'GENERAL','Could not empty banlist');
|
||||
DataBase::sql_query($sql, GENERAL,'Could not empty banlist');
|
||||
admin_message_forum($lng['banlist_cleanout'],'banlist.php?mode=view');
|
||||
}
|
||||
case 'view':
|
||||
{
|
||||
$query = DataBase::sql_query("SELECT `u_id`, `nick` FROM ".USERS_TABLE,'GENERAL','Could not obtain user information');
|
||||
$query = DataBase::sql_query("SELECT `u_id`, `nick` FROM ".USERS_TABLE,GENERAL,'Could not obtain user information');
|
||||
while($result = DataBase::fetch($query))
|
||||
{
|
||||
$user[$result['u_id']]['nick'] = $result['nick'];
|
||||
}
|
||||
$sql = "SELECT * FROM ".BANLIST_TABLE."";
|
||||
$query = DataBase::sql_query($sql,'CRITICAL','Could not obtain banlist items');
|
||||
$query = DataBase::sql_query($sql,CRITICAL,'Could not obtain banlist items');
|
||||
$skin=array(
|
||||
'L.banlist'=>$lng['admin_banlist'],
|
||||
'L.select_mode'=>$lng['what_do_you_want'],
|
||||
|
||||
Reference in New Issue
Block a user