Changeset 178 for minimanager/banned.php
- Timestamp:
- Dec 23, 2007, 2:55:36 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
minimanager/banned.php
r142 r178 8 8 * License: GNU General Public License v2(GPL) 9 9 */ 10 10 11 11 require_once("header.php"); 12 12 valid_login(1); … … 29 29 $order_dir = ($dir) ? "ASC" : "DESC"; 30 30 $dir = ($dir) ? 0 : 1; 31 31 32 32 $query_1 = $sql->query("SELECT count(*) FROM $ban_type"); 33 33 $all_record = $sql->result($query_1,0); … … 53 53 </script> 54 54 <table class=\"lined\"> 55 <tr> 55 <tr> 56 56 <th width=\"5%\">{$lang_global['delete_short']}</td> 57 57 <th width=\"19%\"><a href=\"banned.php?order_by=$key_field&ban_type=$ban_type&dir=$dir\"".($order_by==$key_field ? " class=\"$order_dir\"" : "").">{$lang_banned['ip_acc']}</a></th> … … 72 72 $owner_acc_name = $ban[0]; 73 73 } 74 74 75 75 $output .= "<tr> 76 76 <td><img src=\"img/aff_cross.png\" alt=\"\" onclick=\"answerBox('{$lang_global['delete']}: <font color=white>$owner_acc_name</font><br />{$lang_global['are_you_sure']}', del_banned + '$ban[0]');\" style=\"cursor:pointer;\" /></td> … … 98 98 $sql = new SQL; 99 99 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 100 100 101 101 if(isset($_GET['ban_type'])) $ban_type = $sql->quote_smart($_GET['ban_type']); 102 102 else redirect("banned.php?error=1"); … … 166 166 //######################################################################################################################## 167 167 function do_add_entry() { 168 global $lang_global, $realm_db, $user_name ;168 global $lang_global, $realm_db, $user_name, $lang_banned, $output; 169 169 170 170 if((empty($_GET['ban_type']))||(empty($_GET['entry'])) ||(empty($_GET['bantime']))) … … 173 173 $sql = new SQL; 174 174 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 175 175 176 176 $ban_type = $sql->quote_smart($_GET['ban_type']); 177 177 … … 182 182 else $entry = $sql->result($result1, 0, 'id'); 183 183 } 184 184 185 185 $bantime = time() + (3600 * $sql->quote_smart($_GET['bantime'])); 186 187 $banreason = (isset($_GET['banreason']) && ($_ POST['banreason'] != '')) ? $sql->quote_smart($_GET['banreason']) : "none";186 187 $banreason = (isset($_GET['banreason']) && ($_GET['banreason'] != '')) ? $sql->quote_smart($_GET['banreason']) : "none"; 188 188 189 189 if ($ban_type === "account_banned"){ 190 190 $result = $sql->query("SELECT count(*) FROM account_banned WHERE id = '$entry'"); 191 191 if(!$sql->result($result, 0)) 192 $sql->query("INSERT INTO account_banned (id, bandate, unbandate, bannedby, banreason, active) 192 $sql->query("INSERT INTO account_banned (id, bandate, unbandate, bannedby, banreason, active) 193 193 VALUES ('$entry',".time().",$bantime,'$user_name','$banreason', 1)"); 194 194 … … 197 197 VALUES ('$entry',".time().",$bantime,'$user_name','$banreason')"); 198 198 } 199 199 200 200 if ($sql->affected_rows()) { 201 201 $sql->close(); … … 213 213 //######################################################################################################################## 214 214 $err = (isset($_GET['error'])) ? $_GET['error'] : NULL; 215 215 216 216 $output .= "<div class=\"top\">"; 217 217 switch ($err) {
Note:
See TracChangeset
for help on using the changeset viewer.