Changeset 19
- Timestamp:
- Aug 13, 2007, 9:05:34 PM (17 years ago)
- Location:
- minimanager
- Files:
-
- 125 added
- 9 deleted
- 62 edited
Legend:
- Unmodified
- Added
- Removed
-
minimanager/README/Changelog.txt
r5 r19 1 -------------------------------------------------- 2 0.1.4a 3 -------------------------------------------------- 4 + PostgreSQL, MySQLi, SQL-Lite support added. Make sure to configure the $db_type variable in config.php. 5 + Farsi(Pesian) Translation added thanks to Fe3c. 6 + Russian translation updated thanks to Loosingar. 7 + Added support for RacialLeader field in creature_template. 8 + Search options added to Auction House browser. 9 + The way Terms of Service displayed changed to simpler manner. 10 + Added the option to make direct links for specific realm. Add "&r_id=RALM_ID" after the url. 11 This will allow dirct links to characters on different realm. 12 + Major speed improvment in guild.php/realm.php all the data required selected in single query. 13 + Total number characters shown in guild list and it is sortable. 14 + Deletion confirmation boxes added to varius parts. 15 + The character position system remade using data provided by mangos. 16 + Code cleanup and optimization. 17 + Structural changes. 18 19 - Changes made by Larv. Thanks. 20 + Spanish translation updated. 21 + Tiny arrows next to order field added to indicate the ordering direction. 22 + Icons used instead of plain text for race/class. 23 + Option to hide/show other commands for levels added to command.php 24 + Selected text box highlighting added. 25 + Deletion confirmation boxes added to varius parts. 26 + Icons used instead of plan text in few places. 27 + Sorting for character's quests/skills added. 28 + bbcode based editor added to motd.php 29 + Option to edit posted motd added. 30 + Various visual tweaks. 31 1 32 -------------------------------------------------- 2 33 0.1.3d -
minimanager/README/Readme.txt
r5 r19 1 MiniManager for Project MANGOS Server ver 0.1. 3d1 MiniManager for Project MANGOS Server ver 0.1.4a 2 2 3 3 ABOUT: -
minimanager/ahstats.php
r5 r19 17 17 //######################################################################################################################## 18 18 function browse_auctions() { 19 global $lang_auctionhouse, $lang_global, $output, $mangos_db, $realm_id, $itemperpage, $item_datasite, $server, $user_lvl, $user_id; 19 global $lang_auctionhouse, $lang_global, $lang_item, $output, $mangos_db, $realm_id, 20 $itemperpage, $item_datasite, $server, $user_lvl, $user_id; 20 21 21 22 $red = "#DD5047"; … … 24 25 $hiddencols = array(1,8,9,10); 25 26 26 $ mysql = new MySQL;27 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);28 29 $start = (isset($_GET['start'])) ? $ mysql->quote_smart($_GET['start']) : 0;30 $order_by = (isset($_GET['order_by'])) ? $ mysql->quote_smart($_GET['order_by']) : "time";31 $dir = (isset($_GET['dir'])) ? $ mysql->quote_smart($_GET['dir']) : 1;27 $sql = new SQL; 28 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 29 30 $start = (isset($_GET['start'])) ? $sql->quote_smart($_GET['start']) : 0; 31 $order_by = (isset($_GET['order_by'])) ? $sql->quote_smart($_GET['order_by']) : "time"; 32 $dir = (isset($_GET['dir'])) ? $sql->quote_smart($_GET['dir']) : 1; 32 33 $order_dir = ($dir) ? "ASC" : "DESC"; 33 34 $dir = ($dir) ? 0 : 1; 34 35 35 $query_1 = $ mysql->query("SELECT count(*) FROM auctionhouse");36 $all_record = $ mysql->result($query_1,0);36 $query_1 = $sql->query("SELECT count(*) FROM auctionhouse"); 37 $all_record = $sql->result($query_1,0); 37 38 38 39 if( !$user_lvl && !$server[$realm_id]['both_factions']){ 39 $result = $ mysql->query("SELECT race FROM `character` WHERE account = '$user_id' AND totaltime = (SELECT MAX(totaltime) FROM `character` WHERE account = '$user_id') LIMIT 1");40 if ($ mysql->num_rows($result)){41 $order_side = (in_array($ mysql->result($result, 0, 'race'),array(2,5,6,8,10))) ?40 $result = $sql->query("SELECT race FROM `character` WHERE account = '$user_id' AND totaltime = (SELECT MAX(totaltime) FROM `character` WHERE account = '$user_id') LIMIT 1"); 41 if ($sql->num_rows($result)){ 42 $order_side = (in_array($sql->result($result, 0, 'race'),array(2,5,6,8,10))) ? 42 43 " AND `character`.`race` IN (2,5,6,8,10) " : " AND `character`.`race` IN (1,3,4,7,11) "; 43 44 } else $order_side = ""; 44 45 } else $order_side = ""; 45 46 46 $result = $ mysql->query("SELECT `character`.`name` AS `seller`, `auctionhouse`.`item_template` AS `itemid`, `item_template`.`name` AS `itemname`, `auctionhouse`.`buyoutprice` AS `buyout`,47 $result = $sql->query("SELECT `character`.`name` AS `seller`, `auctionhouse`.`item_template` AS `itemid`, `item_template`.`name` AS `itemname`, `auctionhouse`.`buyoutprice` AS `buyout`, 47 48 `auctionhouse`.`time`-unix_timestamp(), `c2`.`name` AS `encherisseur`, `auctionhouse`.`lastbid`, `auctionhouse`.`startbid`, SUBSTRING_INDEX(SUBSTRING_INDEX(`item_instance`.`data`, ' ',15), ' ',-1) AS qty, `character`.`race` AS seller_race, `c2`.`race` AS buyer_race 48 49 FROM `character`, `item_instance`,`item_template`, `auctionhouse` LEFT JOIN `character` c2 ON `c2`.`guid`=`auctionhouse`.`buyguid` 49 50 WHERE `auctionhouse`.`itemowner`=`character`.`guid` AND `auctionhouse`.`item_template`=`item_template`.`entry` AND `auctionhouse`.`itemguid`=`item_instance`.`guid` 50 51 $order_side ORDER BY `auctionhouse`.`$order_by` $order_dir LIMIT $start, $itemperpage"); 51 $this_page = $ mysql->num_rows($result);52 $this_page = $sql->num_rows($result); 52 53 53 54 $output .="<center><table class=\"top_hidden\"> 54 <tr><td width=\"80%\">"; 55 /* 56 <table class=\"hidden\"> 57 <tr><td> 58 <form action=\"ahstats.php\" method=\"get\" name=\"form\"> 55 <tr><td width=\"80%\"> 56 <form action=\"ahstats.php\" method=\"get\" name=\"form\"> 59 57 <input type=\"hidden\" name=\"action\" value=\"search_auctions\" /> 60 58 <input type=\"hidden\" name=\"error\" value=\"2\" /> 61 <input type=\"text\" size=\"30\" name=\"search_value\" /> 62 <select name=\"search_by\"> 63 <option value=\"item\">{$lang_auctionhouse['item']}</option> 64 </select></form></td><td>"; 59 <table class=\"hidden\"> 60 <tr><td> 61 <td><input type=\"text\" size=\"25\" name=\"search_value\" /></td> 62 63 <td><select name=\"search_by\"> 64 <option value=\"item_name\">{$lang_auctionhouse['item_name']}</option> 65 <option value=\"item_id\">{$lang_auctionhouse['item_id']}</option> 66 <option value=\"seller_name\">{$lang_auctionhouse['seller_name']}</option> 67 <option value=\"buyer_name\">{$lang_auctionhouse['buyer_name']}</option> 68 </select></td> 69 70 <td><select name=\"search_class\"> 71 <option value=\"-1\">{$lang_auctionhouse['all']}</option> 72 <option value=\"0\">{$lang_item['consumable']}</option> 73 <option value=\"1\">{$lang_item['bag']}</option> 74 <option value=\"2\">{$lang_item['weapon']}</option> 75 <option value=\"4\">{$lang_item['armor']}</option> 76 <option value=\"5\">{$lang_item['reagent']}</option> 77 <option value=\"7\">{$lang_item['trade_goods']}</option> 78 <option value=\"9\">{$lang_item['recipe']}</option> 79 <option value=\"11\">{$lang_item['quiver']}</option> 80 <option value=\"14\">{$lang_item['permanent']}</option> 81 <option value=\"15\">{$lang_item['misc_short']}</option> 82 </select></td> 83 84 <td><select name=\"search_quality\"> 85 <option value=\"-1\">{$lang_auctionhouse['all']}</option> 86 <option value=\"0\">{$lang_item['poor']}</option> 87 <option value=\"1\">{$lang_item['common']}</option> 88 <option value=\"2\">{$lang_item['uncommon']}</option> 89 <option value=\"3\">{$lang_item['rare']}</option> 90 <option value=\"4\">{$lang_item['epic']}</option> 91 <option value=\"5\">{$lang_item['legendary']}</option> 92 <option value=\"6\">{$lang_item['artifact']}</option> 93 </select></td> 94 <td>"; 65 95 makebutton($lang_global['search'], "javascript:do_submit()",80); 66 $output .= "</td></tr></table> 67 */ 68 69 $output .= "<td width=\"20%\" align=\"right\">"; 96 $output .= "</td></tr></table></form> 97 <td width=\"20%\" align=\"right\">"; 70 98 $output .= generate_pagination("ahstats.php?action=browse_auctions&order_by=$order_by&dir=".!$dir, $all_record, $itemperpage, $start); 71 99 $output .= "</td></tr></table> … … 73 101 <table class=\"lined\"> 74 102 <tr> 75 <t d width=\"10%\" class=\"head\"><a href=\"ahstats.php?order_by=itemowner&start=$start&dir=$dir\" class=\"head_link\">{$lang_auctionhouse['seller']}</a></td>76 <t d width=\"20%\" class=\"head\"><a href=\"ahstats.php?order_by=item_template&start=$start&dir=$dir\" class=\"head_link\">{$lang_auctionhouse['item']}</a></td>77 <t d width=\"15%\" class=\"head\"><a href=\"ahstats.php?order_by=buyoutprice&start=$start&dir=$dir\" class=\"head_link\">{$lang_auctionhouse['buyoutprice']}</a></td>78 <t d width=\"15%\" class=\"head\"><a href=\"ahstats.php?order_by=time&start=$start&dir=$dir\" class=\"head_link\">{$lang_auctionhouse['timeleft']}</a></td>79 <t d width=\"10%\" class=\"head\"><a href=\"ahstats.php?order_by=buyguid&start=$start&dir=$dir\" class=\"head_link\">{$lang_auctionhouse['buyer']}</a></td>80 <t d width=\"15%\" class=\"head\"><a href=\"ahstats.php?order_by=lastbid&start=$start&dir=$dir\" class=\"head_link\">{$lang_auctionhouse['lastbid']}</a></td>81 <t d width=\"15%\" class=\"head\"><a href=\"ahstats.php?order_by=startbid&start=$start&dir=$dir\" class=\"head_link\">{$lang_auctionhouse['firstbid']}</a></td>103 <th width=\"10%\"><a href=\"ahstats.php?order_by=itemowner&start=$start&dir=$dir\">".($order_by=='itemowner' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_auctionhouse['seller']}</a></th> 104 <th width=\"20%\"><a href=\"ahstats.php?order_by=item_template&start=$start&dir=$dir\">".($order_by=='item_template' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_auctionhouse['item']}</a></th> 105 <th width=\"15%\"><a href=\"ahstats.php?order_by=buyoutprice&start=$start&dir=$dir\">".($order_by=='buyoutprice' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_auctionhouse['buyoutprice']}</a></th> 106 <th width=\"15%\"><a href=\"ahstats.php?order_by=time&start=$start&dir=$dir\">".($order_by=='time' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_auctionhouse['timeleft']}</a></th> 107 <th width=\"10%\"><a href=\"ahstats.php?order_by=buyguid&start=$start&dir=$dir\">".($order_by=='buyguid' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_auctionhouse['buyer']}</a></th> 108 <th width=\"15%\"><a href=\"ahstats.php?order_by=lastbid&start=$start&dir=$dir\">".($order_by=='lastbid' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_auctionhouse['lastbid']}</a></th> 109 <th width=\"15%\"><a href=\"ahstats.php?order_by=startbid&start=$start&dir=$dir\">".($order_by=='startbid' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_auctionhouse['firstbid']}</a></th> 82 110 </tr>"; 83 111 84 while ($rows =$mysql->fetch_row($result)) {112 while ($rows = $sql->fetch_row($result)) { 85 113 $output .= "<tr>"; 86 114 foreach($rows as $row => $value) { … … 113 141 $output .= "</tr>"; 114 142 } 115 $ mysql->close();143 $sql->close(); 116 144 117 145 $output .= "<tr><td colspan=\"7\" class=\"hidden\" align=\"right\">{$lang_auctionhouse['total_auctions']} : $all_record</td></tr> … … 124 152 //######################################################################################################################## 125 153 function search_auctions() { 126 //TODO... 154 global $lang_auctionhouse, $lang_global, $lang_item, $output, $mangos_db, $realm_id, 155 $itemperpage, $item_datasite, $server, $user_lvl, $user_id, $sql_search_limit; 156 157 $red = "#DD5047"; 158 $blue = "#0097CD"; 159 $sidecolor = array(1 => $blue,2 => $red,3 => $blue,4 => $blue,5 => $red,6 => $red,7 => $blue,8 => $red,10 => $red); 160 $hiddencols = array(1,8,9,10); 161 162 $sql = new SQL; 163 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 164 165 $order_by = (isset($_GET['order_by'])) ? $sql->quote_smart($_GET['order_by']) : "time"; 166 $dir = (isset($_GET['dir'])) ? $sql->quote_smart($_GET['dir']) : 1; 167 $order_dir = ($dir) ? "ASC" : "DESC"; 168 $dir = ($dir) ? 0 : 1; 169 170 if( ($_GET['search_class'] == "-1")&&($_GET['search_quality'] == "-1") 171 &&(!isset($_GET['search_value']))&&(!isset($_GET['search_by'])) ) 172 redirect("ahstats.php?error=1"); 173 174 $search_class = $sql->quote_smart($_GET['search_class']); 175 $search_quality = $sql->quote_smart($_GET['search_quality']); 176 $search_value = $sql->quote_smart($_GET['search_value']); 177 $search_by = $sql->quote_smart($_GET['search_by']); 178 179 if( !$user_lvl && !$server[$realm_id]['both_factions']){ 180 $result = $sql->query("SELECT race FROM `character` WHERE account = '$user_id' AND totaltime = (SELECT MAX(totaltime) FROM `character` WHERE account = '$user_id') LIMIT 1"); 181 if ($sql->num_rows($result)){ 182 $order_side = (in_array($sql->result($result, 0, 'race'),array(2,5,6,8,10))) ? 183 " AND `character`.`race` IN (2,5,6,8,10) " : " AND `character`.`race` IN (1,3,4,7,11) "; 184 } else $order_side = ""; 185 } else $order_side = ""; 186 187 switch ($search_by) { 188 case "item_name": 189 190 if(( ($search_class >= 0) || ($search_quality >= 0))&&(!isset($search_value))){ 191 if ($search_class >= 0) $search_filter = " AND item_template.class = '$search_class'"; 192 if ($search_quality >= 0) $search_filter = " AND item_template.Quality = '$search_quality'"; 193 } 194 else 195 { 196 $item_prefix = ""; 197 if ($search_class >= 0) $item_prefix .= "AND class = '$search_class' "; 198 if ($search_quality >= 0) $item_prefix .= "AND Quality = '$search_quality' "; 199 200 $result = $sql->query("SELECT entry FROM item_template WHERE name LIKE '%$search_value%' $item_prefix"); 201 $search_filter = "AND auctionhouse.item_template IN(0"; 202 while ($item = $sql->fetch_row($result)) $search_filter .= ", $item[0]"; 203 $search_filter .= ")"; 204 } 205 break; 206 207 case "item_id": 208 $search_filter = "AND auctionhouse.item_template = '$search_value'"; 209 break; 210 211 case "seller_name": 212 $result = $sql->query("SELECT guid FROM `character` WHERE name LIKE '%$search_value%'"); 213 $search_filter = "AND auctionhouse.itemowner IN(0"; 214 while ($char = $sql->fetch_row($result)) $search_filter .= ", $char[0]"; 215 $search_filter .= ")"; 216 break; 217 case "buyer_name": 218 $result = $sql->query("SELECT guid FROM `character` WHERE name LIKE '%$search_value%'"); 219 $search_filter = "AND auctionhouse.buyguid IN(-1"; 220 while ($char = $sql->fetch_row($result)) $search_filter .= ", $char[0]"; 221 $search_filter .= ")"; 222 break; 223 default: 224 redirect("ahstats.php?error=1"); 225 } 226 227 $result = $sql->query("SELECT `character`.`name` AS `seller`, `auctionhouse`.`item_template` AS `itemid`, `item_template`.`name` AS `itemname`, `auctionhouse`.`buyoutprice` AS `buyout`, 228 `auctionhouse`.`time`-unix_timestamp(), `c2`.`name` AS `encherisseur`, `auctionhouse`.`lastbid`, `auctionhouse`.`startbid`, SUBSTRING_INDEX(SUBSTRING_INDEX(`item_instance`.`data`, ' ',15), ' ',-1) AS qty, `character`.`race` AS seller_race, `c2`.`race` AS buyer_race 229 FROM `character`, `item_instance`,`item_template`, `auctionhouse` LEFT JOIN `character` c2 ON `c2`.`guid`=`auctionhouse`.`buyguid` 230 WHERE `auctionhouse`.`itemowner`=`character`.`guid` AND `auctionhouse`.`item_template`=`item_template`.`entry` AND `auctionhouse`.`itemguid`=`item_instance`.`guid` $search_filter 231 $order_side ORDER BY `auctionhouse`.`$order_by` $order_dir LIMIT $sql_search_limit"); 232 $tot_found = $sql->num_rows($result); 233 234 $output .="<center> 235 <form action=\"ahstats.php\" method=\"get\" name=\"form\"> 236 <input type=\"hidden\" name=\"action\" value=\"search_auctions\" /> 237 <input type=\"hidden\" name=\"error\" value=\"2\" /> 238 <table class=\"top_hidden\"> 239 <tr><td> 240 <input type=\"text\" size=\"30\" name=\"search_value\" /> 241 242 <select name=\"search_by\"> 243 <option value=\"item_name\">{$lang_auctionhouse['item_name']}</option> 244 <option value=\"item_id\">{$lang_auctionhouse['item_id']}</option> 245 <option value=\"seller_name\">{$lang_auctionhouse['seller_name']}</option> 246 <option value=\"buyer_name\">{$lang_auctionhouse['buyer_name']}</option> 247 </select></form> 248 249 <select name=\"search_class\"> 250 <option value=\"-1\">{$lang_auctionhouse['all']}</option> 251 <option value=\"0\">{$lang_item['consumable']}</option> 252 <option value=\"1\">{$lang_item['bag']}</option> 253 <option value=\"2\">{$lang_item['weapon']}</option> 254 <option value=\"4\">{$lang_item['armor']}</option> 255 <option value=\"5\">{$lang_item['reagent']}</option> 256 <option value=\"7\">{$lang_item['trade_goods']}</option> 257 <option value=\"9\">{$lang_item['recipe']}</option> 258 <option value=\"11\">{$lang_item['quiver']}</option> 259 <option value=\"14\">{$lang_item['permanent']}</option> 260 <option value=\"15\">{$lang_item['misc_short']}</option> 261 </select> 262 263 <select name=\"search_quality\"> 264 <option value=\"-1\">{$lang_auctionhouse['all']}</option> 265 <option value=\"0\">{$lang_item['poor']}</option> 266 <option value=\"1\">{$lang_item['common']}</option> 267 <option value=\"2\">{$lang_item['uncommon']}</option> 268 <option value=\"3\">{$lang_item['rare']}</option> 269 <option value=\"4\">{$lang_item['epic']}</option> 270 <option value=\"5\">{$lang_item['legendary']}</option> 271 <option value=\"6\">{$lang_item['artifact']}</option> 272 </select> 273 </td><td>"; 274 makebutton($lang_global['search'], "javascript:do_submit()",80); 275 makebutton($lang_global['back'], "javascript:window.history.back()",80); 276 $output .= "</td> 277 </tr></table></form> 278 279 <table class=\"lined\"> 280 <tr> 281 <th width=\"10%\"><a href=\"ahstats.php?action=search_auctions&error=2&order_by=itemowner&search_by=$search_by&search_value=$search_value&search_quality=$search_quality&search_class=$search_class&dir=$dir\">".($order_by=='itemowner' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_auctionhouse['seller']}</a></th> 282 <th width=\"20%\"><a href=\"ahstats.php?action=search_auctions&error=2&order_by=item_template&search_by=$search_by&search_value=$search_value&search_quality=$search_quality&search_class=$search_class&dir=$dir\">".($order_by=='item_template' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_auctionhouse['item']}</a></th> 283 <th width=\"15%\"><a href=\"ahstats.php?action=search_auctions&error=2&order_by=buyoutprice&search_by=$search_by&search_value=$search_value&search_quality=$search_quality&search_class=$search_class&dir=$dir\">".($order_by=='buyoutprice' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_auctionhouse['buyoutprice']}</a></th> 284 <th width=\"15%\"><a href=\"ahstats.php?action=search_auctions&error=2&order_by=time&search_by=$search_by&search_value=$search_value&search_quality=$search_quality&search_class=$search_class&dir=$dir\">".($order_by=='time' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_auctionhouse['timeleft']}</a></th> 285 <th width=\"10%\"><a href=\"ahstats.php?action=search_auctions&error=2&order_by=buyguid&search_by=$search_by&search_value=$search_value&search_quality=$search_quality&search_class=$search_class&dir=$dir\">".($order_by=='buyguid' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_auctionhouse['buyer']}</a></th> 286 <th width=\"15%\"><a href=\"ahstats.php?action=search_auctions&error=2&order_by=lastbid&search_by=$search_by&search_value=$search_value&search_quality=$search_quality&search_class=$search_class&dir=$dir\">".($order_by=='lastbid' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_auctionhouse['lastbid']}</a></th> 287 <th width=\"15%\"><a href=\"ahstats.php?action=search_auctions&error=2&order_by=startbid&search_by=$search_by&search_value=$search_value&search_quality=$search_quality&search_class=$search_class&dir=$dir\">".($order_by=='startbid' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_auctionhouse['firstbid']}</a></th> 288 </tr>"; 289 290 while ($rows = $sql->fetch_row($result)) { 291 $output .= "<tr>"; 292 foreach($rows as $row => $value) { 293 switch ($row) { 294 case 4: 295 $value = ($value >= 0)? (floor($value / 86400).$lang_auctionhouse['dayshortcut']." ". floor(($value % 86400)/3600).$lang_auctionhouse['hourshortcut']." ".floor((($value % 86400)%3600)/60).$lang_auctionhouse['mnshortcut']) : $lang_auctionhouse['auction_over']; 296 break; 297 case 5: 298 $value = "<b>".((!empty($rows[10])) ? "<font color=".$sidecolor[$rows[10]].">$value</font>" : "N/A")."</b>"; 299 break; 300 case 7: 301 case 6: 302 case 3: 303 $g = floor($value/10000); 304 $value -= $g*10000; 305 $s = floor($value/100); 306 $value -= $s*100; 307 $c = $value; 308 $value = $g."<img src=\"./img/gold.gif\" /> ".$s."<img src=\"./img/silver.gif\" /> ".$c."<img src=\"./img/copper.gif\" /> "; 309 break; 310 case 2: 311 $value = "<a href=\"$item_datasite$rows[1]\" target=\"_blank\" onmouseover=\"toolTip('".addslashes(get_item_tooltip($rows[1]))."','item_tooltip')\" onmouseout=\"toolTip()\"><img src=\"".get_icon($rows[1])."\" class=\"icon_border\" alt=\"$value\"><br/>$value".(($rows[8]>1) ? " (x$rows[8])" : "")."</img></a>"; 312 break; 313 case 0: 314 $value = "<b>".((!empty($rows[9])) ? "<font color=".$sidecolor[$rows[9]].">$value</font>" : "N/A")."</b>"; 315 break; 316 } 317 if (!in_array($row,$hiddencols)) $output .= "<td><center>".$value."</center></td>"; 318 } 319 $output .= "</tr>"; 320 } 321 $sql->close(); 322 323 $output .= "<tr><td colspan=\"7\" class=\"hidden\" align=\"right\">{$lang_auctionhouse['tot_found']} : $tot_found {$lang_global['limit']} : $sql_search_limit</td></tr> 324 </table></center>"; 127 325 } 128 326 -
minimanager/backup.php
r5 r19 172 172 move_uploaded_file($_FILES["uploaded_file"]["tmp_name"], "$backup_dir/$file_name_new") or die (error("{$lang_backup['upload_err_write_permission']} $backup_dir")); 173 173 if (file_exists("$backup_dir/$file_name_new")){ 174 require_once("scripts/ mysql_lib.php");174 require_once("scripts/db_layer/sql_lib.php"); 175 175 $use_db = addslashes($_POST['use_db']); 176 176 177 if ($use_db == $realm_db['name']) $queries = mysql_run_sql_script($realm_db['addr'], $realm_db['user'], $realm_db['pass'], "$backup_dir/$file_name_new",true);177 if ($use_db == $realm_db['name']) $queries = run_sql_script($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name'], "$backup_dir/$file_name_new",true); 178 178 else { 179 179 foreach ($mangos_db as $db) 180 if ($use_db == $db['name']) $queries = mysql_run_sql_script($db['addr'], $db['user'], $db['pass'], "$backup_dir/$file_name_new",true);180 if ($use_db == $db['name']) $queries = run_sql_script($db['addr'], $db['user'], $db['pass'], $db['name'], "$backup_dir/$file_name_new",true); 181 181 } 182 182 … … 191 191 192 192 if (file_exists("$backup_dir/$file_name")){ 193 require_once("scripts/ mysql_lib.php");193 require_once("scripts/db_layer/sql_lib.php"); 194 194 $use_db = addslashes($_POST['use_db']); 195 195 196 if ($use_db == $realm_db['name']) $queries = mysql_run_sql_script($realm_db['addr'], $realm_db['user'], $realm_db['pass'], "$backup_dir/$file_name",false);196 if ($use_db == $realm_db['name']) $queries = run_sql_script($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name'], "$backup_dir/$file_name",false); 197 197 else { 198 198 foreach ($mangos_db as $db) 199 if ($use_db == $db['name']) $queries = mysql_run_sql_script($db['addr'], $db['user'], $db['pass'], "$backup_dir/$file_name",false);199 if ($use_db == $db['name']) $queries = run_sql_script($db['addr'], $db['user'], $db['pass'], $db['name'], "$backup_dir/$file_name",false); 200 200 } 201 201 … … 219 219 fclose($fp); 220 220 221 require_once("scripts/ mysql_lib.php");221 require_once("scripts/db_layer/sql_lib.php"); 222 222 223 223 foreach ($tables_backup_realmd as $value) { 224 mysql_table_dump ($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name'],$value,$struc_backup,"$backup_dir/$file_name_new");224 sql_table_dump ($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name'],$value,$struc_backup,"$backup_dir/$file_name_new"); 225 225 } 226 226 … … 234 234 235 235 foreach ($tables_backup_mangos as $value) { 236 mysql_table_dump ($db['addr'], $db['user'], $db['pass'], $db['name'],$value,$struc_backup,"$backup_dir/$file_name_new");236 sql_table_dump ($db['addr'], $db['user'], $db['pass'], $db['name'],$value,$struc_backup,"$backup_dir/$file_name_new"); 237 237 } 238 238 } … … 245 245 246 246 foreach ($tables_backup_mangos as $value) { 247 mysql_table_dump ($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name'],$value,$struc_backup,"$backup_dir/$file_name_new");247 sql_table_dump ($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name'],$value,$struc_backup,"$backup_dir/$file_name_new"); 248 248 } 249 249 } … … 273 273 fclose($fp); 274 274 275 require_once("scripts/ mysql_lib.php");275 require_once("scripts/db_layer/sql_lib.php"); 276 276 277 277 foreach ($tables_backup_realmd as $value) { 278 mysql_table_dump ($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name'],$value,$struc_backup,"$backup_dir/$file_name_new");278 sql_table_dump ($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name'],$value,$struc_backup,"$backup_dir/$file_name_new"); 279 279 } 280 280 fclose($fp); … … 291 291 292 292 foreach ($tables_backup_mangos as $value) { 293 mysql_table_dump ($db['addr'], $db['user'], $db['pass'], $db['name'],$value,$struc_backup,"$backup_dir/$file_name_new");293 sql_table_dump ($db['addr'], $db['user'], $db['pass'], $db['name'],$value,$struc_backup,"$backup_dir/$file_name_new"); 294 294 } 295 295 fclose($fp); … … 304 304 305 305 foreach ($tables_backup_mangos as $value) { 306 mysql_table_dump ($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name'],$value,$struc_backup,"$backup_dir/$file_name_new");306 sql_table_dump ($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name'],$value,$struc_backup,"$backup_dir/$file_name_new"); 307 307 } 308 308 fclose($fp); … … 317 317 $save_all_realms = addslashes($_GET['save_all_realms']); 318 318 319 $ mysql = new MySQL;320 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);321 322 $query = $ mysql->query("SELECT id FROM account");319 $sql = new SQL; 320 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 321 322 $query = $sql->query("SELECT id FROM account"); 323 323 $subdir = "$backup_dir/accounts/".date("m_d_y_H_i_s"); 324 324 mkdir($subdir, 0750); 325 325 326 326 327 while ($acc = $ mysql->fetch_array($query)){327 while ($acc = $sql->fetch_array($query)){ 328 328 $file_name_new = $acc[0]."_{$realm_db['name']}.sql"; 329 329 $fp = fopen("$subdir/$file_name_new", 'w') or die (error($lang_backup['file_write_err'])); … … 331 331 fwrite($fp, "USE {$realm_db['name']};\n\n")or die (error($lang_backup['file_write_err'])); 332 332 333 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);333 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 334 334 335 335 foreach ($tab_backup_user_realmd as $value) { 336 $acc_query = $ mysql->query("SELECT * FROM $value[0] WHERE $value[1] = $acc[0]");337 $num_fields = $ mysql->num_fields($acc_query);338 $numrow = $ mysql->num_rows($acc_query);336 $acc_query = $sql->query("SELECT * FROM $value[0] WHERE $value[1] = $acc[0]"); 337 $num_fields = $sql->num_fields($acc_query); 338 $numrow = $sql->num_rows($acc_query); 339 339 340 340 $result = "-- Dumping data for $value[0] ".date("m.d.y_H.i.s")."\n"; … … 346 346 347 347 for($count = 0; $count < $num_fields; $count++) { 348 $result .= "`". mysql_field_name($acc_query,$count)."`";348 $result .= "`".$sql->field_name($acc_query,$count)."`"; 349 349 if ($count < ($num_fields-1)) $result .= ","; 350 350 } … … 353 353 for ($i =0; $i<$numrow; $i++) { 354 354 $result .= "\t("; 355 $row = $ mysql->fetch_row($acc_query);355 $row = $sql->fetch_row($acc_query); 356 356 for($j=0; $j<$num_fields; $j++) { 357 357 $row[$j] = addslashes($row[$j]); 358 358 $row[$j] = ereg_replace("\n","\\n",$row[$j]); 359 359 if (isset($row[$j])) { 360 if ( mysql_field_type($acc_query,$j) == "int") $result .= "$row[$j]";360 if ($sql->field_type($acc_query,$j) == "int") $result .= "$row[$j]"; 361 361 else $result .= "'$row[$j]'" ; 362 362 }else $result .= "''"; … … 378 378 fwrite($fp, "CREATE DATABASE /*!32312 IF NOT EXISTS*/ {$db['name']};\n")or die (error($lang_backup['file_write_err'])); 379 379 fwrite($fp, "USE {$db['name']};\n\n")or die (error($lang_backup['file_write_err'])); 380 $ mysql->connect($db['addr'], $db['user'], $db['pass'], $db['name']);381 $all_char_query = $ mysql->query("SELECT guid,name FROM `character` WHERE account = $acc[0]");382 383 while ($char = $ mysql->fetch_array($all_char_query)){380 $sql->connect($db['addr'], $db['user'], $db['pass'], $db['name']); 381 $all_char_query = $sql->query("SELECT guid,name FROM `character` WHERE account = $acc[0]"); 382 383 while ($char = $sql->fetch_array($all_char_query)){ 384 384 fwrite($fp, "-- Dumping data for character $char[1]\n")or die (error($lang_backup['file_write_err'])); 385 385 foreach ($tab_backup_user_mangos as $value) { 386 $sql = "SELECT * FROM $value[0] WHERE $value[1] = $char[0]"; 387 $char_query = $mysql->query($sql); 388 $num_fields = $mysql->num_fields($char_query); 389 $numrow = $mysql->num_rows($char_query); 386 $char_query = $sql->query("SELECT * FROM $value[0] WHERE $value[1] = $char[0]"); 387 $num_fields = $sql->num_fields($char_query); 388 $numrow = $sql->num_rows($char_query); 390 389 391 390 $result = "LOCK TABLES $value[0] WRITE;\n"; … … 394 393 if ($numrow){ 395 394 $result .= "INSERT INTO $value[0] ("; 396 395 397 396 for($count = 0; $count < $num_fields; $count++) { 398 $result .= "`". mysql_field_name($char_query,$count)."`";397 $result .= "`".$sql->field_name($char_query,$count)."`"; 399 398 if ($count < ($num_fields-1)) $result .= ","; 400 399 } … … 403 402 for ($i =0; $i<$numrow; $i++) { 404 403 $result .= "\t("; 405 $row = $ mysql->fetch_row($char_query);404 $row = $sql->fetch_row($char_query); 406 405 for($j=0; $j<$num_fields; $j++) { 407 406 $row[$j] = addslashes($row[$j]); 408 407 $row[$j] = ereg_replace("\n","\\n",$row[$j]); 409 408 if (isset($row[$j])) { 410 if ( mysql_field_type($char_query,$j) == "int") $result .= "$row[$j]";409 if ($sql->field_type($char_query,$j) == "int") $result .= "$row[$j]"; 411 410 else $result .= "'$row[$j]'" ; 412 411 }else $result .= "''"; … … 426 425 } 427 426 } 428 $ mysql->close();427 $sql->close(); 429 428 redirect("backup.php?error=2"); 430 429 … … 441 440 $file_tmp = "$backup_dir/accounts/$file_dir/".$file_name."_$use_db.sql"; 442 441 if (file_exists($file_tmp)){ 443 require_once("scripts/ mysql_lib.php");444 445 if ($use_db == $realm_db['name']) $queries = mysql_run_sql_script($realm_db['addr'], $realm_db['user'], $realm_db['pass'], "$backup_dir/accounts/$file_dir/$file_name.sql",true);442 require_once("scripts/db_layer/sql_lib.php"); 443 444 if ($use_db == $realm_db['name']) $queries = run_sql_script($realm_db['addr'], $realm_db['user'], $realm_db['pass'],$realm_db['name'], "$backup_dir/accounts/$file_dir/$file_name.sql",true); 446 445 else { 447 446 foreach ($mangos_db as $db) 448 if ($use_db == $db['name']) $queries = mysql_run_sql_script($db['addr'], $db['user'], $db['pass'], "$backup_dir/accounts/$file_dir/$file_name.sql",true);447 if ($use_db == $db['name']) $queries = run_sql_script($db['addr'], $db['user'], $db['pass'],$db['name'], "$backup_dir/accounts/$file_dir/$file_name.sql",true); 449 448 } 450 449 -
minimanager/banned.php
r5 r19 18 18 global $lang_global, $lang_banned, $output, $realm_db, $itemperpage; 19 19 20 $ mysql = new MySQL;21 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);22 23 $start = (isset($_GET['start'])) ? $ mysql->quote_smart($_GET['start']) : 0;24 $ban_type = (isset($_GET['ban_type'])) ? $ mysql->quote_smart($_GET['ban_type']) : "account_banned";20 $sql = new SQL; 21 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 22 23 $start = (isset($_GET['start'])) ? $sql->quote_smart($_GET['start']) : 0; 24 $ban_type = (isset($_GET['ban_type'])) ? $sql->quote_smart($_GET['ban_type']) : "account_banned"; 25 25 $key_field = ($ban_type == "account_banned") ? "id" :"ip"; 26 $order_by = (isset($_GET['order_by'])) ? $ mysql->quote_smart($_GET['order_by']) : $key_field;27 28 $dir = (isset($_GET['dir'])) ? $ mysql->quote_smart($_GET['dir']) : 1;26 $order_by = (isset($_GET['order_by'])) ? $sql->quote_smart($_GET['order_by']) : $key_field; 27 28 $dir = (isset($_GET['dir'])) ? $sql->quote_smart($_GET['dir']) : 1; 29 29 $order_dir = ($dir) ? "ASC" : "DESC"; 30 30 $dir = ($dir) ? 0 : 1; 31 31 32 $query_1 = $ mysql->query("SELECT count(*) FROM $ban_type");33 $all_record = $ mysql->result($query_1,0);34 35 $result = $ mysql->query("SELECT $key_field, bandate, unbandate, bannedby, SUBSTRING_INDEX(banreason,' ',3) FROM $ban_type ORDER BY $order_by $order_dir LIMIT $start, $itemperpage");36 $this_page = $ mysql->num_rows($result);32 $query_1 = $sql->query("SELECT count(*) FROM $ban_type"); 33 $all_record = $sql->result($query_1,0); 34 35 $result = $sql->query("SELECT $key_field, bandate, unbandate, bannedby, SUBSTRING_INDEX(banreason,' ',3) FROM $ban_type ORDER BY $order_by $order_dir LIMIT $start, $itemperpage"); 36 $this_page = $sql->num_rows($result); 37 37 38 38 $output .= "<center> … … 47 47 <td align=\"right\">".generate_pagination("banned.php?action=show_list&order_by=$order_by&ban_type=$ban_type&dir=".!$dir, $all_record, $itemperpage, $start)."</td> 48 48 </tr></table> 49 <table class=\"lined\"> 49 <script type=\"text/javascript\"> 50 answerbox.btn_ok='{$lang_global['yes_low']}'; 51 answerbox.btn_cancel='{$lang_global['no']}'; 52 var del_banned = 'banned.php?action=do_delete_entry&ban_type=$ban_type&$key_field='; 53 </script> 54 <table class=\"lined\"> 50 55 <tr> 51 <t d width=\"5%\" class=\"head\">{$lang_global['delete']}</td>52 <t d width=\"19%\" class=\"head\"><a href=\"banned.php?order_by=$key_field&ban_type=$ban_type&dir=$dir\" class=\"head_link\">{$lang_banned['ip_acc']}</a></td>53 <t d width=\"18%\" class=\"head\"><a href=\"banned.php?order_by=bandate&ban_type=$ban_type&dir=$dir\" class=\"head_link\">{$lang_banned['bandate']}</a></td>54 <t d width=\"18%\" class=\"head\"><a href=\"banned.php?order_by=unbandate&ban_type=$ban_type&dir=$dir\" class=\"head_link\">{$lang_banned['unbandate']}</a></td>55 <t d width=\"15%\" class=\"head\"><a href=\"banned.php?order_by=bannedby&ban_type=$ban_type&dir=$dir\" class=\"head_link\">{$lang_banned['bannedby']}</a></td>56 <t d width=\"25%\" class=\"head\"><a href=\"banned.php?order_by=banreason&ban_type=$ban_type&dir=$dir\" class=\"head_link\">{$lang_banned['banreason']}</a></td>56 <th width=\"5%\">{$lang_global['delete_short']}</td> 57 <th width=\"19%\"><a href=\"banned.php?order_by=$key_field&ban_type=$ban_type&dir=$dir\">".($order_by==$key_field ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_banned['ip_acc']}</a></th> 58 <th width=\"18%\"><a href=\"banned.php?order_by=bandate&ban_type=$ban_type&dir=$dir\">".($order_by=='bandate' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_banned['bandate']}</a></th> 59 <th width=\"18%\"><a href=\"banned.php?order_by=unbandate&ban_type=$ban_type&dir=$dir\">".($order_by=='unbandate' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_banned['unbandate']}</a></th> 60 <th width=\"15%\"><a href=\"banned.php?order_by=bannedby&ban_type=$ban_type&dir=$dir\">".($order_by=='bannedby' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_banned['bannedby']}</a></th> 61 <th width=\"25%\"><a href=\"banned.php?order_by=banreason&ban_type=$ban_type&dir=$dir\">".($order_by=='banreason' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_banned['banreason']}</a></th> 57 62 </tr>"; 58 63 59 $looping = ($this_page < $itemperpage) ? $this_page : $itemperpage; 60 61 for ($i=1; $i <= $looping; $i++){ 62 $ban = $mysql->fetch_row($result); 63 64 while ($ban = $sql->fetch_row($result)){ 65 64 66 if ($ban_type === "account_banned"){ 65 $result1 = $ mysql->query("SELECT username FROM account WHERE id ='$ban[0]'");66 $owner_acc_name = $ mysql->result($result1, 0, 'username');67 $result1 = $sql->query("SELECT username FROM account WHERE id ='$ban[0]'"); 68 $owner_acc_name = $sql->result($result1, 0, 'username'); 67 69 $name_out = "<a href=\"user.php?action=edit_user&error=11&id=$ban[0]\">$owner_acc_name</a>"; 68 } else $name_out = $ban[0]; 69 70 } else { 71 $name_out = $ban[0]; 72 $owner_acc_name = $ban[0]; 73 } 74 70 75 $output .= "<tr> 71 <td>< a href=\"banned.php?action=do_delete_entry&$key_field=$ban[0]&ban_type=$ban_type\"><img src=\"img/x.ico\" class=\"no_border\" alt=\"\" /></a></td>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> 72 77 <td>$name_out</td> 73 78 <td>".date('d-m-Y G:i', $ban[1])."</td> … … 81 86 </tr> 82 87 </table></center><br/>"; 83 $ mysql->close();88 $sql->close(); 84 89 } 85 90 … … 91 96 global $lang_global, $realm_db; 92 97 93 $ mysql = new MySQL;94 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);95 96 if(isset($_GET['ban_type'])) $ban_type = $ mysql->quote_smart($_GET['ban_type']);98 $sql = new SQL; 99 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 100 101 if(isset($_GET['ban_type'])) $ban_type = $sql->quote_smart($_GET['ban_type']); 97 102 else redirect("banned.php?error=1"); 98 103 99 104 $key_field = ($ban_type == "account_banned") ? "id" : "ip"; 100 105 101 if(isset($_GET[$key_field])) $entry = $ mysql->quote_smart($_GET[$key_field]);106 if(isset($_GET[$key_field])) $entry = $sql->quote_smart($_GET[$key_field]); 102 107 else redirect("banned.php?error=1"); 103 108 104 $ mysql->query("DELETE FROM $ban_type WHERE $key_field = '$entry'");105 106 if ($ mysql->affected_rows()) {107 $ mysql->close();109 $sql->query("DELETE FROM $ban_type WHERE $key_field = '$entry'"); 110 111 if ($sql->affected_rows()) { 112 $sql->close(); 108 113 redirect("banned.php?error=3&ban_type=$ban_type"); 109 114 } else { 110 $ mysql->close();115 $sql->close(); 111 116 redirect("banned.php?error=2&ban_type=$ban_type"); 112 117 } … … 166 171 redirect("banned.php?error=1&action=add_entry"); 167 172 168 $ mysql = new MySQL;169 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);170 171 $ban_type = $ mysql->quote_smart($_GET['ban_type']);172 173 $entry = $ mysql->quote_smart($_GET['entry']);173 $sql = new SQL; 174 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 175 176 $ban_type = $sql->quote_smart($_GET['ban_type']); 177 178 $entry = $sql->quote_smart($_GET['entry']); 174 179 if ($ban_type == "account_banned") { 175 $result1 = $ mysql->query("SELECT id FROM account WHERE username ='$entry'");176 if (!$ mysql->num_rows($result1)) redirect("banned.php?error=4&action=add_entry");177 else $entry = $ mysql->result($result1, 0, 'id');180 $result1 = $sql->query("SELECT id FROM account WHERE username ='$entry'"); 181 if (!$sql->num_rows($result1)) redirect("banned.php?error=4&action=add_entry"); 182 else $entry = $sql->result($result1, 0, 'id'); 178 183 } 179 184 180 $bantime = time() + (3600 * $ mysql->quote_smart($_GET['bantime']));181 182 $banreason = (isset($_GET['banreason']) && ($_POST['banreason'] != '')) ? $ mysql->quote_smart($_GET['banreason']) : "none";185 $bantime = time() + (3600 * $sql->quote_smart($_GET['bantime'])); 186 187 $banreason = (isset($_GET['banreason']) && ($_POST['banreason'] != '')) ? $sql->quote_smart($_GET['banreason']) : "none"; 183 188 184 189 if ($ban_type === "account_banned"){ 185 $result = $ mysql->query("SELECT count(*) FROM account_banned WHERE id = '$entry'");186 if(!$ mysql->result($result, 0))187 $ mysql->query("INSERT INTO account_banned (id, bandate, unbandate, bannedby, banreason, active)190 $result = $sql->query("SELECT count(*) FROM account_banned WHERE id = '$entry'"); 191 if(!$sql->result($result, 0)) 192 $sql->query("INSERT INTO account_banned (id, bandate, unbandate, bannedby, banreason, active) 188 193 VALUES ('$entry',".time().",$bantime,'$user_name','$banreason', 1)"); 189 194 190 195 } else { 191 $ mysql->query("INSERT INTO ip_banned (ip, bandate, unbandate, bannedby, banreason)196 $sql->query("INSERT INTO ip_banned (ip, bandate, unbandate, bannedby, banreason) 192 197 VALUES ('$entry',".time().",$bantime,'$user_name','$banreason')"); 193 198 } 194 199 195 if ($ mysql->affected_rows()) {196 $ mysql->close();200 if ($sql->affected_rows()) { 201 $sql->close(); 197 202 redirect("banned.php?error=3&ban_type=$ban_type"); 198 203 } else { 199 $ mysql->close();204 $sql->close(); 200 205 redirect("banned.php?error=2&ban_type=$ban_type"); 201 206 } 202 $ mysql->close();207 $sql->close(); 203 208 } 204 209 -
minimanager/char.php
r5 r19 23 23 if (empty($_GET['id'])) error($lang_global['empty_fields']); 24 24 25 $ mysql = new MySQL;26 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);27 28 $id = $ mysql->quote_smart($_GET['id']);29 30 $result = $ mysql->query("SELECT account,race FROM `character` WHERE guid = $id LIMIT 1");31 32 if ($ mysql->num_rows($result)){25 $sql = new SQL; 26 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 27 28 $id = $sql->quote_smart($_GET['id']); 29 30 $result = $sql->query("SELECT account,race FROM `character` WHERE guid = $id LIMIT 1"); 31 32 if ($sql->num_rows($result)){ 33 33 //resrict by owner's gmlvl 34 $owner_acc_id = $ mysql->result($result, 0, 'account');35 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);36 $query = $ mysql->query("SELECT gmlevel,username FROM account WHERE id = $owner_acc_id");37 $owner_gmlvl = $ mysql->result($query, 0, 'gmlevel');38 $owner_name = $ mysql->result($query, 0, 'username');39 40 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);34 $owner_acc_id = $sql->result($result, 0, 'account'); 35 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 36 $query = $sql->query("SELECT gmlevel,username FROM account WHERE id = $owner_acc_id"); 37 $owner_gmlvl = $sql->result($query, 0, 'gmlevel'); 38 $owner_name = $sql->result($query, 0, 'username'); 39 40 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 41 41 42 42 if( !$user_lvl && !$server[$realm_id]['both_factions']){ 43 $side_p = (in_array($ mysql->result($result, 0, 'race'),array(2,5,6,8,10))) ? 1 : 2;44 $result_1 = $ mysql->query("SELECT race FROM `character` WHERE account = '$user_id' LIMIT 1");45 if ($ mysql->num_rows($result)){46 $side_v = (in_array($ mysql->result($result_1, 0, 'race'),array(2,5,6,8,10))) ? 1 : 2;43 $side_p = (in_array($sql->result($result, 0, 'race'),array(2,5,6,8,10))) ? 1 : 2; 44 $result_1 = $sql->query("SELECT race FROM `character` WHERE account = '$user_id' LIMIT 1"); 45 if ($sql->num_rows($result)){ 46 $side_v = (in_array($sql->result($result_1, 0, 'race'),array(2,5,6,8,10))) ? 1 : 2; 47 47 } else $side_v = 0; 48 48 unset($result_1); … … 54 54 if ($user_lvl >= $owner_gmlvl && (($side_v == $side_p) || !$side_v)){ 55 55 56 $result = $ mysql->query("SELECT data,name,race,class,position_x,position_y,map,online,totaltime FROM `character` WHERE guid = '$id'");57 $char = $ mysql->fetch_row($result);56 $result = $sql->query("SELECT data,name,race,class,zone,map,online,totaltime FROM `character` WHERE guid = '$id'"); 57 $char = $sql->fetch_row($result); 58 58 $char_data = explode(' ',$char[0]); 59 59 60 $online = ($char[ 7]) ? $lang_char['online'] : $lang_char['offline'];60 $online = ($char[6]) ? $lang_char['online'] : $lang_char['offline']; 61 61 62 62 if($char_data[CHAR_DATA_OFFSET_GUILD_ID]){ 63 $query = $ mysql->query("SELECT name FROM guild WHERE guildid ='{$char_data[CHAR_DATA_OFFSET_GUILD_ID]}'");64 $guild_name = $ mysql->result($query, 0, 'name');63 $query = $sql->query("SELECT name FROM guild WHERE guildid ='{$char_data[CHAR_DATA_OFFSET_GUILD_ID]}'"); 64 $guild_name = $sql->result($query, 0, 'name'); 65 65 if ($user_lvl > 0 ) $guild_name = "<a href=\"guild.php?action=view_guild&error=3&id={$char_data[CHAR_DATA_OFFSET_GUILD_ID]}\" >$guild_name</a>"; 66 66 if ($char_data[CHAR_DATA_OFFSET_GUILD_RANK]){ 67 $guild_rank_query = $ mysql->query("SELECT rname FROM guild_rank WHERE guildid ='{$char_data[CHAR_DATA_OFFSET_GUILD_ID]}' AND rid='{$char_data[CHAR_DATA_OFFSET_GUILD_RANK]}'");68 $guild_rank = $ mysql->result($guild_rank_query, 0, 'rname');67 $guild_rank_query = $sql->query("SELECT rname FROM guild_rank WHERE guildid ='{$char_data[CHAR_DATA_OFFSET_GUILD_ID]}' AND rid='{$char_data[CHAR_DATA_OFFSET_GUILD_RANK]}'"); 68 $guild_rank = $sql->result($guild_rank_query, 0, 'rname'); 69 69 } else $guild_rank = $lang_char['guild_leader']; 70 70 } else { … … 128 128 else $output .= "<img src=\"img/INV/INV_empty_32.gif\" class=\"icon_border\" alt=\"\" />"; 129 129 $output .= "</td> 130 <td class=\"half_line\" colspan=\"4\">".get_map_name($char[ 6])." - ".get_zone_name($char[6], $char[4], $char[5])."</td>130 <td class=\"half_line\" colspan=\"4\">".get_map_name($char[5])." - ".get_zone_name($char[4])."</td> 131 131 <td width=\"6%\">"; 132 132 if (!empty($equiped_items[10][1])) $output .= maketooltip("<img src=\"{$equiped_items[10][1]}\" class=\"icon_border\" alt=\"\" />", "$item_datasite{$char_data[CHAR_DATA_OFFSET_EQU_GLOVES]}", $equiped_items[10][0], "item_tooltip", "target=\"_blank\""); … … 299 299 if (($user_lvl > $owner_gmlvl)||($owner_name == $user_name)){ 300 300 //total time played 301 $tot_time = $char[ 8];301 $tot_time = $char[7]; 302 302 $tot_days = (int)($tot_time/86400); 303 303 $tot_time = $tot_time - ($tot_days*86400); … … 333 333 } 334 334 } else { 335 $ mysql->close();335 $sql->close(); 336 336 error($lang_char['no_permission']); 337 337 } 338 338 339 339 } else error($lang_char['no_char_found']); 340 $ mysql->close();340 $sql->close(); 341 341 } 342 342 … … 351 351 if (empty($_GET['id'])) error($lang_global['empty_fields']); 352 352 353 $ mysql = new MySQL;354 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);355 356 $id = $ mysql->quote_smart($_GET['id']);357 358 $result = $ mysql->query("SELECT account FROM `character` WHERE guid = '$id' LIMIT 1");359 360 if ($ mysql->num_rows($result)){361 $owner_acc_id = $ mysql->result($result, 0, 'account');362 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);363 $query = $ mysql->query("SELECT gmlevel,username FROM account WHERE id ='$owner_acc_id'");364 $owner_gmlvl = $ mysql->result($query, 0, 'gmlevel');365 $owner_name = $ mysql->result($query, 0, 'username');353 $sql = new SQL; 354 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 355 356 $id = $sql->quote_smart($_GET['id']); 357 358 $result = $sql->query("SELECT account FROM `character` WHERE guid = '$id' LIMIT 1"); 359 360 if ($sql->num_rows($result)){ 361 $owner_acc_id = $sql->result($result, 0, 'account'); 362 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 363 $query = $sql->query("SELECT gmlevel,username FROM account WHERE id ='$owner_acc_id'"); 364 $owner_gmlvl = $sql->result($query, 0, 'gmlevel'); 365 $owner_name = $sql->result($query, 0, 'username'); 366 366 367 367 if (($user_lvl > $owner_gmlvl)||($owner_name == $user_name)){ 368 368 369 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);370 371 $result = $ mysql->query("SELECT name,race,class,SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_GOLD+1)."), ' ', -1) FROM `character` WHERE guid = '$id'");372 $char = $ mysql->fetch_row($result);373 374 $result = $ mysql->query("SELECT bag,slot,item,item_template FROM character_inventory WHERE guid = '$id' ORDER BY bag,slot");369 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 370 371 $result = $sql->query("SELECT name,race,class,SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_GOLD+1)."), ' ', -1) FROM `character` WHERE guid = '$id'"); 372 $char = $sql->fetch_row($result); 373 374 $result = $sql->query("SELECT bag,slot,item,item_template FROM character_inventory WHERE guid = '$id' ORDER BY bag,slot"); 375 375 $bag = array( 376 376 0=>array(), … … 388 388 4=>array(), 389 389 5=>array(), 390 6=>array() 390 6=>array(), 391 7=>array() 391 392 ); 392 393 … … 394 395 $bag_id = array(); 395 396 $equiped_bag_id = array(0,0,0,0,0); 396 $equip_bnk_bag_id = array(0,0,0,0,0,0,0 );397 $equip_bnk_bag_id = array(0,0,0,0,0,0,0,0); 397 398 398 399 399 while ($slot = $ mysql->fetch_row($result))400 while ($slot = $sql->fetch_row($result)) 400 401 { 401 402 if ($slot[0] == 0 && $slot[1] > 18) … … 404 405 { 405 406 $bag_id[$slot[2]] = ($slot[1]-18); 406 $equiped_bag_id[$slot[1]-18] = array($slot[3], $ mysql->result($mysql->query("SELECT ContainerSlots FROM item_template WHERE entry ='{$slot[3]}'"), 0, 'ContainerSlots'));407 $equiped_bag_id[$slot[1]-18] = array($slot[3], $sql->result($sql->query("SELECT ContainerSlots FROM item_template WHERE entry ='{$slot[3]}'"), 0, 'ContainerSlots')); 407 408 } 408 409 elseif($slot[1] < 39) // SLOT 23 TO 38 (BackPack) … … 416 417 $bank[0][$slot[1]-39] = $slot[3]; 417 418 } 418 elseif($slot[1] < 7 3) // SLOT 67 TO 72(Bank Bags)419 elseif($slot[1] < 74) // SLOT 67 TO 73 (Bank Bags) 419 420 { 420 421 $bank_bag_id[$slot[2]] = ($slot[1]-66); 421 $equip_bnk_bag_id[$slot[1]-66] = array($slot[3], $ mysql->result($mysql->query("SELECT ContainerSlots FROM item_template WHERE entry ='{$slot[3]}'"), 0, 'ContainerSlots'));422 $equip_bnk_bag_id[$slot[1]-66] = array($slot[3], $sql->result($sql->query("SELECT ContainerSlots FROM item_template WHERE entry ='{$slot[3]}'"), 0, 'ContainerSlots')); 422 423 } 423 424 } … … 455 456 <table class=\"lined\" style=\"width: 700px;\"> 456 457 <tr> 457 <th><img class=\"bag_icon\" src=\"".get_icon(3960)."\" alt=\"\" />{$lang_char['backpack']}</th> 458 <th>"; 458 <th>"; 459 459 if($equiped_bag_id[1]){ 460 460 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equiped_bag_id[1][0])."\" alt=\"\" />", "$item_datasite{$equiped_bag_id[1][0]}", get_item_name($equiped_bag_id[1][0]), "item_tooltip", "target=\"_blank\""); 461 $output .= "{$lang_item['bag']} I ({$equiped_bag_id[1][1]} {$lang_item['slots']})";462 } 463 461 $output .= "{$lang_item['bag']} I<br /><font class=\"small\">({$equiped_bag_id[1][1]} {$lang_item['slots']})</font"; 462 } 463 $output .= "</th><th>"; 464 464 if($equiped_bag_id[2]){ 465 465 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equiped_bag_id[2][0])."\" alt=\"\" />", "$item_datasite{$equiped_bag_id[2][0]}", get_item_name($equiped_bag_id[2][0]), "item_tooltip", "target=\"_blank\""); 466 $output .= "{$lang_item['bag']} II ({$equiped_bag_id[2][1]} {$lang_item['slots']})"; 467 } 468 $output .= "</th> 466 $output .= "{$lang_item['bag']} II<br /><font class=\"small\">({$equiped_bag_id[2][1]} {$lang_item['slots']})</font>"; 467 } 468 $output .= "</th><th>"; 469 if($equiped_bag_id[3]){ 470 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equiped_bag_id[3][0])."\" alt=\"\" />", "$item_datasite{$equiped_bag_id[3][0]}", get_item_name($equiped_bag_id[3][0]), "item_tooltip", "target=\"_blank\""); 471 $output .= "{$lang_item['bag']} III<br /><font class=\"small\">({$equiped_bag_id[3][1]} {$lang_item['slots']})</font>"; 472 } 473 $output .= "</th><th>"; 474 if($equiped_bag_id[4]){ 475 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equiped_bag_id[4][0])."\" alt=\"\" />", "$item_datasite{$equiped_bag_id[4][0]}", get_item_name($equiped_bag_id[4][0]), "item_tooltip", "target=\"_blank\""); 476 $output .= "{$lang_item['bag']} IV<br /><font class=\"small\">({$equiped_bag_id[4][1]} {$lang_item['slots']})</font>"; 477 } 478 $output .= "</th> 469 479 </tr> 470 480 <tr>"; 471 481 472 $output .= "<td class=\"bag\" align=\"center\"><div style=\"width:".(4*43)."px;height:".(ceil(16/4)*41)."px;\">";473 foreach ($bag[0] as $pos => $item){474 $output .= "<div style=\"left:".($pos%4*42)."px;top:".(floor($pos/4)*41)."px;\">";475 $output .= maketooltip("<img src=\"".get_icon($item[0])."\" alt=\"\" />".($item[1] ? ($item[1]+1) : ""), "$item_datasite{$item[0]}", get_item_name($item[0]), "item_tooltip", "target=\"_blank\"");476 $output .= "</div>";477 }478 $output .= "</div></td>";479 480 482 for($t = 1; $t < count($bag); $t++){ 481 if($t == 3){ 482 483 $money_gold = (int)($char[3]/10000); 484 $money_silver = (int)(($char[3]-$money_gold*10000)/100); 485 $money_cooper = (int)($char[3]-$money_gold*10000-$money_silver*100); 486 487 $output .= "<tr> 488 <td rowspan=\"2\" class=\"hidden\"> 489 {$lang_char['gold']}: 490 $money_gold <img src=\"img/gold.gif\" class=\"no_border\" alt=\"\" /> 491 $money_silver <img src=\"img/silver.gif\" class=\"no_border\" alt=\"\" /> 492 $money_cooper <img src=\"img/copper.gif\" class=\"no_border\" alt=\"\" /> 493 </td> 494 <th>"; 495 if($equiped_bag_id[3]){ 496 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equiped_bag_id[3][0])."\" alt=\"\" />", "$item_datasite{$equiped_bag_id[3][0]}", get_item_name($equiped_bag_id[3][0]), "item_tooltip", "target=\"_blank\""); 497 $output .= "{$lang_item['bag']} III ({$equiped_bag_id[3][1]} {$lang_item['slots']})"; 498 } 499 $output .= "</th><th>"; 500 if($equiped_bag_id[4]){ 501 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equiped_bag_id[4][0])."\" alt=\"\" />", "$item_datasite{$equiped_bag_id[4][0]}", get_item_name($equiped_bag_id[4][0]), "item_tooltip", "target=\"_blank\""); 502 $output .= "{$lang_item['bag']} IV ({$equiped_bag_id[4][1]} {$lang_item['slots']})"; 503 } 504 $output .= "</th> 505 </tr>"; 506 } 483 $output .= "<td class=\"bag\" valign=\"bottom\" align=\"center\"> 484 <div style=\"width:".(4*43)."px;height:".(ceil($equiped_bag_id[$t][1]/4)*41)."px;\">"; 507 485 508 $output .= "<td class=\"bag\" align=\"center\"><div style=\"width:".(4*43)."px;height:".(ceil($equiped_bag_id[$t][1]/4)*41)."px;\">";509 510 486 $dsp = $equiped_bag_id[$t][1]%4; 511 487 if ($dsp) $output .= "<div class=\"no_slot\" /></div>"; 512 513 foreach ($bag[$t] as $pos => $item){ 488 foreach ($bag[$t] as $pos => $item){ 514 489 $output .= "<div style=\"left:".(($pos+$dsp)%4*42)."px;top:".(floor(($pos+$dsp)/4)*41)."px;\">"; 515 490 $output .= maketooltip("<img src=\"".get_icon($item[0])."\" alt=\"\" />".($item[1] ? ($item[1]+1) : ""), "$item_datasite{$item[0]}", get_item_name($item[0]), "item_tooltip", "target=\"_blank\""); … … 519 494 } 520 495 521 $output .= "</tr></table> 522 523 <table class=\"lined\" style=\"width: 700px;\"> 524 <tr><th colspan=\"3\">{$lang_char['bank_items']}</th></tr> 525 <tr> 526 <td colspan=\"3\" width=\"700\" class=\"bag\" align=\"center\"> 527 <div style=\"width:".(14*43)."px;height:".(ceil(24/14)*41)."px;\">"; 528 529 foreach ($bank[0] as $pos => $item){ 530 $output .= "<div style=\"left:".($pos%14*43)."px;top:".(floor($pos/14)*41)."px;\">"; 531 $output .= maketooltip("<img src=\"".get_icon($item)."\" class=\"inv_icon\" alt=\"\" />", "$item_datasite$item", get_item_name($item), "item_tooltip", "target=\"_blank\""); 532 $output .= "</div>"; 533 } 534 $output .= "</div> 535 </td> 536 </tr> 537 <tr> 538 <th>"; 539 if($equip_bnk_bag_id[1]){ 540 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equip_bnk_bag_id[1][0])."\" alt=\"\" />", "$item_datasite{$equip_bnk_bag_id[1][0]}", get_item_name($equip_bnk_bag_id[1][0]), "item_tooltip", "target=\"_blank\""); 541 $output .= "{$lang_item['bag']} I<br />({$equip_bnk_bag_id[1][1]} {$lang_item['slots']})"; 542 } 543 $output .= "</th><th>"; 544 if($equip_bnk_bag_id[2]){ 545 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equip_bnk_bag_id[2][0])."\" alt=\"\" />", "$item_datasite{$equip_bnk_bag_id[2][0]}", get_item_name($equip_bnk_bag_id[2][0]), "item_tooltip", "target=\"_blank\""); 546 $output .= "{$lang_item['bag']} II<br />({$equip_bnk_bag_id[2][1]} {$lang_item['slots']})"; 547 } 548 $output .= "</th><th>"; 549 if($equip_bnk_bag_id[3]){ 550 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equip_bnk_bag_id[3][0])."\" alt=\"\" />", "$item_datasite{$equip_bnk_bag_id[3][0]}", get_item_name($equip_bnk_bag_id[3][0]), "item_tooltip", "target=\"_blank\""); 551 $output .= "{$lang_item['bag']} III<br />({$equip_bnk_bag_id[3][1]} {$lang_item['slots']})"; 552 } 553 $output .= "</th> 554 </tr> 555 <tr>"; 496 $output .= "</tr> 497 <tr> 498 <th colspan=\"2\" align=\"left\"> 499 <img class=\"bag_icon\" src=\"".get_icon(3960)."\" alt=\"\" align=\"absmiddle\" style=\"margin-left:100px;\" /> 500 <font style=\"margin-left:30px;\">{$lang_char['backpack']}</font> 501 </th> 502 <th colspan=\"2\"> 503 {$lang_char['bank_items']} 504 </th> 505 </tr> 506 <tr> 507 <td colspan=\"2\" class=\"bag\" align=\"center\" height=\"220px\"> 508 <div style=\"width:".(4*43)."px;height:".(ceil(16/4)*41)."px;\">"; 509 510 foreach ($bag[0] as $pos => $item){ 511 $output .= "<div style=\"left:".($pos%4*42)."px;top:".(floor($pos/4)*41)."px;\">"; 512 $output .= maketooltip("<img src=\"".get_icon($item[0])."\" alt=\"\" />".($item[1] ? ($item[1]+1) : ""), "$item_datasite{$item[0]}", get_item_name($item[0]), "item_tooltip", "target=\"_blank\""); 513 $output .= "</div>"; 514 } 515 516 $money_gold = (int)($char[3]/10000); 517 $money_silver = (int)(($char[3]-$money_gold*10000)/100); 518 $money_cooper = (int)($char[3]-$money_gold*10000-$money_silver*100); 519 520 $output .= "</div> 521 <div style=\"text-align:right;width:168px;background-image:none;background-color:#393936;padding:2px;\"> 522 <b> 523 $money_gold <img src=\"img/gold.gif\" alt=\"\" align=\"absmiddle\" /> 524 $money_silver <img src=\"img/silver.gif\" alt=\"\" align=\"absmiddle\" /> 525 $money_cooper <img src=\"img/copper.gif\" alt=\"\" align=\"absmiddle\" /> 526 </b> 527 "; 528 529 $output .= "</div> 530 </td> 531 <td colspan=\"2\" class=\"bank\" align=\"center\"> 532 <div style=\"width:".(7*43)."px;height:".(ceil(24/7)*41)."px;\">"; 533 534 foreach ($bank[0] as $pos => $item){ 535 $output .= "<div style=\"left:".($pos%7*43)."px;top:".(floor($pos/7)*41)."px;\">"; 536 $output .= maketooltip("<img src=\"".get_icon($item)."\" class=\"inv_icon\" alt=\"\" />", "$item_datasite$item", get_item_name($item), "item_tooltip", "target=\"_blank\""); 537 $output .= "</div>"; 538 } 539 540 $output .= "</div> 541 </td> 542 </tr> 543 <tr> 544 <th>"; 545 if($equip_bnk_bag_id[1]){ 546 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equip_bnk_bag_id[1][0])."\" alt=\"\" />", "$item_datasite{$equip_bnk_bag_id[1][0]}", get_item_name($equip_bnk_bag_id[1][0]), "item_tooltip", "target=\"_blank\""); 547 $output .= "{$lang_item['bag']} I<br /><font class=\"small\">({$equip_bnk_bag_id[1][1]} {$lang_item['slots']})</font>"; 548 } 549 $output .= "</th><th>"; 550 if($equip_bnk_bag_id[2]){ 551 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equip_bnk_bag_id[2][0])."\" alt=\"\" />", "$item_datasite{$equip_bnk_bag_id[2][0]}", get_item_name($equip_bnk_bag_id[2][0]), "item_tooltip", "target=\"_blank\""); 552 $output .= "{$lang_item['bag']} II<br /><font class=\"small\">({$equip_bnk_bag_id[2][1]} {$lang_item['slots']})</font>"; 553 } 554 $output .= "</th><th>"; 555 if($equip_bnk_bag_id[3]){ 556 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equip_bnk_bag_id[3][0])."\" alt=\"\" />", "$item_datasite{$equip_bnk_bag_id[3][0]}", get_item_name($equip_bnk_bag_id[3][0]), "item_tooltip", "target=\"_blank\""); 557 $output .= "{$lang_item['bag']} III<br /><font class=\"small\">({$equip_bnk_bag_id[3][1]} {$lang_item['slots']})</font>"; 558 } 559 $output .= "</th><th>"; 560 if($equip_bnk_bag_id[4]){ 561 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equip_bnk_bag_id[4][0])."\" alt=\"\" />", "$item_datasite{$equip_bnk_bag_id[4][0]}", get_item_name($equip_bnk_bag_id[4][0]), "item_tooltip", "target=\"_blank\""); 562 $output .= "{$lang_item['bag']} IV<br /><font class=\"small\">({$equip_bnk_bag_id[4][1]} {$lang_item['slots']})</font>"; 563 } 564 $output .= "</th> 565 </tr> 566 <tr>"; 567 556 568 for($t=1; $t < count($bank); $t++){ 557 if($t== 4){569 if($t==5){ 558 570 $output .= "</tr> 559 571 <tr> 560 572 <th>"; 561 if($equip_bnk_bag_id[4]){ 562 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equip_bnk_bag_id[4][0])."\" alt=\"\" />", "$item_datasite{$equip_bnk_bag_id[4][0]}", get_item_name($equip_bnk_bag_id[4][0]), "item_tooltip", "target=\"_blank\""); 563 $output .= "{$lang_item['bag']} IV<br />({$equip_bnk_bag_id[4][1]} {$lang_item['slots']})"; 564 } 565 $output .= "</th><th>"; 566 if($equip_bnk_bag_id[5]){ 567 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equip_bnk_bag_id[5][0])."\" alt=\"\" />", "$item_datasite{$equip_bnk_bag_id[5][0]}", get_item_name($equip_bnk_bag_id[5][0]), "item_tooltip", "target=\"_blank\""); 568 $output .= "{$lang_item['bag']} V<br />({$equip_bnk_bag_id[5][1]} {$lang_item['slots']})"; 569 } 570 $output .= "</th><th>"; 571 if($equip_bnk_bag_id[6]){ 572 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equip_bnk_bag_id[6][0])."\" alt=\"\" />", "$item_datasite{$equip_bnk_bag_id[6][0]}", get_item_name($equip_bnk_bag_id[6][0]), "item_tooltip", "target=\"_blank\""); 573 $output .= "{$lang_item['bag']} VI<br />({$equip_bnk_bag_id[6][1]} {$lang_item['slots']})"; 574 } 575 $output .= "</th> 573 if($equip_bnk_bag_id[5]){ 574 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equip_bnk_bag_id[5][0])."\" alt=\"\" />", "$item_datasite{$equip_bnk_bag_id[5][0]}", get_item_name($equip_bnk_bag_id[5][0]), "item_tooltip", "target=\"_blank\""); 575 $output .= "{$lang_item['bag']} V<br /><font class=\"small\">({$equip_bnk_bag_id[5][1]} {$lang_item['slots']})</font>"; 576 } 577 $output .= "</th><th>"; 578 if($equip_bnk_bag_id[6]){ 579 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equip_bnk_bag_id[6][0])."\" alt=\"\" />", "$item_datasite{$equip_bnk_bag_id[6][0]}", get_item_name($equip_bnk_bag_id[6][0]), "item_tooltip", "target=\"_blank\""); 580 $output .= "{$lang_item['bag']} VI<br /><font class=\"small\">({$equip_bnk_bag_id[6][1]} {$lang_item['slots']})</font>"; 581 } 582 $output .= "</th><th>"; 583 if($equip_bnk_bag_id[7]){ 584 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equip_bnk_bag_id[7][0])."\" alt=\"\" />", "$item_datasite{$equip_bnk_bag_id[7][0]}", get_item_name($equip_bnk_bag_id[7][0]), "item_tooltip", "target=\"_blank\""); 585 $output .= "{$lang_item['bag']} VII<br /><font class=\"small\">({$equip_bnk_bag_id[7][1]} {$lang_item['slots']})</font>"; 586 } 587 $output .= "</th> 588 <th></th> 576 589 </tr> 577 590 <tr>"; 578 591 } 579 592 580 $output .= "<td class=\"bag\" align=\"center\"><div style=\"width:".(4*43)."px;height:".(ceil($equip_bnk_bag_id[$t][1]/4)*41)."px;\">"; 593 $output .= "<td class=\"bank\" align=\"center\"> 594 <div style=\"width:".(4*43)."px;height:".(ceil($equip_bnk_bag_id[$t][1]/4)*41)."px;\">"; 581 595 582 596 $dsp=$equip_bnk_bag_id[$t][1]%4; 583 597 if ($dsp) $output .= "<div class=\"no_slot\" /></div>"; 584 585 foreach ($bank[$t] as $pos => $item){ 586 $output .= "<div style=\"left:".(($pos+$dsp)%4*43)."px;top:".(floor(($pos+$dsp)/4)*41)."px;\">"; 587 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($item)."\" alt=\"\" />", "$item_datasite$item", get_item_name($item), "item_tooltip", "target=\"_blank\""); 588 $output .= "</div>"; 589 } 590 $output .= "</td>"; 598 foreach ($bank[$t] as $pos => $item){ 599 $output .= "<div style=\"left:".(($pos+$dsp)%4*43)."px;top:".(floor(($pos+$dsp)/4)*41)."px;\">"; 600 $output .= maketooltip("<img src=\"".get_icon($item)."\" alt=\"\" />", "$item_datasite$item", get_item_name($item), "item_tooltip", "target=\"_blank\""); 601 $output .= "</div>"; 602 } 603 $output .= "</td>"; 591 604 } 592 605 593 $output .= "< /tr>606 $output .= "<td class=\"bank\"></td></tr> 594 607 </table> 595 608 </div><br /> … … 609 622 610 623 } else { 611 $ mysql->close();624 $sql->close(); 612 625 error($lang_char['no_permission']); 613 626 } 614 627 615 628 } else error($lang_char['no_char_found']); 616 $ mysql->close();629 $sql->close(); 617 630 } 618 631 … … 627 640 if (empty($_GET['id'])) error($lang_global['empty_fields']); 628 641 629 $mysql = new MySQL; 630 $mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 631 632 $id = $mysql->quote_smart($_GET['id']); 633 $result = $mysql->query("SELECT account,name,race,class FROM `character` WHERE guid = '$id' LIMIT 1"); 634 635 if ($mysql->num_rows($result)){ 636 $char = $mysql->fetch_row($result); 642 $sql = new SQL; 643 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 644 645 $id = $sql->quote_smart($_GET['id']); 646 $order_by = (isset($_GET['order_by'])) ? $sql->quote_smart($_GET['order_by']) : 1; 647 $dir = (isset($_GET['dir'])) ? $sql->quote_smart($_GET['dir']) : 0; 648 $dir = ($dir) ? 0 : 1; 649 $result = $sql->query("SELECT account,name,race,class FROM `character` WHERE guid = '$id' LIMIT 1"); 650 651 if ($sql->num_rows($result)){ 652 $char = $sql->fetch_row($result); 637 653 638 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);639 $result = $ mysql->query("SELECT gmlevel,username FROM account WHERE id ='$char[0]'");640 $owner_gmlvl = $ mysql->result($result, 0, 'gmlevel');641 $owner_name = $ mysql->result($result, 0, 'username');654 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 655 $result = $sql->query("SELECT gmlevel,username FROM account WHERE id ='$char[0]'"); 656 $owner_gmlvl = $sql->result($result, 0, 'gmlevel'); 657 $owner_name = $sql->result($result, 0, 'username'); 642 658 643 659 if (($user_lvl > $owner_gmlvl)||($owner_name == $user_name)){ 644 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);645 646 $result = $ mysql->query("SELECT quest,status FROM character_queststatus WHERE guid ='$id' AND ( status = 3 OR status = 1 ) ORDER BY status DESC");660 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 661 662 $result = $sql->query("SELECT quest,status FROM character_queststatus WHERE guid ='$id' AND ( status = 3 OR status = 1 ) ORDER BY status DESC"); 647 663 $output .= "<center> 648 664 <div id=\"tab\"> … … 660 676 <table class=\"lined\" style=\"width: 550px;\"> 661 677 <tr>"; 662 if ($user_lvl) $output .= "<th width=\"14%\">{$lang_char['quest_id']}</th>"; 663 $output .= "<th width=\"5%\"></th> 664 <th width=\"80%\">{$lang_char['quest_title']}</th> 665 <th width=\"1%\"></th>"; 666 667 if ($mysql->num_rows($result)){ 668 while ($quest = $mysql->fetch_row($result)){ 669 $query1 = $mysql->query("SELECT QuestLevel,Title FROM quest_template WHERE entry ='$quest[0]'"); 670 $quest_templ = $mysql->fetch_row($query1); 671 678 if ($user_lvl) $output .= "<th width=\"10%\"><a href=\"char.php?id=$id&action=char_quest&order_by=0&dir=$dir\">".($order_by==0 ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char['quest_id']}</a></th>"; 679 $output .= "<th width=\"7%\"><a href=\"char.php?id=$id&action=char_quest&order_by=1&dir=$dir\">".($order_by==1 ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char['quest_level']}</a></th> 680 <th width=\"78%\"><a href=\"char.php?id=$id&action=char_quest&order_by=2&dir=$dir\">".($order_by==2 ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char['quest_title']}</a></th> 681 <th width=\"5%\"><img src=\"img/aff_qst.png\" width=\"14\" height=\"14\" border=\"0\" /></a></th>"; 682 683 $quests_1 = array(); 684 $quests_3 = array(); 685 686 if ($sql->num_rows($result)){ 687 while ($quest = $sql->fetch_row($result)){ 688 $query1 = $sql->query("SELECT QuestLevel,Title FROM quest_template WHERE entry ='$quest[0]'"); 689 $quest_info = $sql->fetch_row($query1); 690 if($quest[1]==1) 691 array_push($quests_1, array($quest[0], $quest_info[0], $quest_info[1])); 692 else 693 array_push($quests_3, array($quest[0], $quest_info[0], $quest_info[1])); 694 } 695 aasort($quests_1, $order_by, $dir); 696 aasort($quests_3, $order_by, $dir); 697 698 foreach ($quests_3 as $data){ 672 699 $output .= "<tr>"; 673 if($user_lvl) $output .= "<td>$quest[0]</td>"; 674 $output .= "<td>($quest_templ[0])</td> 675 <td align=\"left\"><a href=\"$quest_datasite$quest[0]\" target=\"_blank\">$quest_templ[1]</a></td> 676 <td><img src=\"img/aff_".(($quest[1]==1) ? "tick" : "qst").".png\" width=\"14\" height=\"14\" /></td></tr>"; 677 } 678 } else $output .= "<tr><td colspan=\"3\"><p>{$lang_char['no_act_quests']}</p></td></tr>"; 700 if($user_lvl) $output .= "<td>$data[0]</td>"; 701 $output .= "<td>($data[1])</td> 702 <td align=\"left\"><a href=\"$quest_datasite$data[0]\" target=\"_blank\">$data[2]</a></td> 703 <td><img src=\"img/aff_qst.png\" width=\"14\" height=\"14\" /></td></tr>"; 704 } 705 706 if(count($quests_1)) $output .= "<tr><th class=\"title\" colspan=\"".($user_lvl ? "4" : "3")."\" align=\"left\"></th></tr>"; 707 foreach ($quests_1 as $data){ 708 $output .= "<tr>"; 709 if($user_lvl) $output .= "<td>$data[0]</td>"; 710 $output .= "<td>($data[1])</td> 711 <td align=\"left\"><a href=\"$quest_datasite$data[0]\" target=\"_blank\">$data[2]</a></td> 712 <td><img src=\"img/aff_tick.png\" width=\"14\" height=\"14\" /></td></tr>"; 713 } 714 715 } else $output .= "<tr><td colspan=\"".($user_lvl ? "4" : "3")."\"><p>{$lang_char['no_act_quests']}</p></td></tr>"; 679 716 680 717 $output .= "</table></div><br /> … … 697 734 else 698 735 { 699 $ mysql->close();736 $sql->close(); 700 737 error($lang_char['no_permission']); 701 738 } 702 739 } 703 740 else error($lang_char['no_char_found']); 704 $ mysql->close();741 $sql->close(); 705 742 } 706 743 … … 715 752 if (empty($_GET['id'])) error($lang_global['empty_fields']); 716 753 717 $ mysql = new MySQL;718 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);719 720 $id = $ mysql->quote_smart($_GET['id']);721 $result = $ mysql->query("SELECT account,name,race,class FROM `character` WHERE guid = '$id' LIMIT 1");722 723 if ($ mysql->num_rows($result)){724 $char = $ mysql->fetch_row($result);725 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);726 $result = $ mysql->query("SELECT gmlevel,username FROM account WHERE id ='$char[0]'");727 $owner_gmlvl = $ mysql->result($result, 0, 'gmlevel');728 $owner_name = $ mysql->result($result, 0, 'username');754 $sql = new SQL; 755 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 756 757 $id = $sql->quote_smart($_GET['id']); 758 $result = $sql->query("SELECT account,name,race,class FROM `character` WHERE guid = '$id' LIMIT 1"); 759 760 if ($sql->num_rows($result)){ 761 $char = $sql->fetch_row($result); 762 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 763 $result = $sql->query("SELECT gmlevel,username FROM account WHERE id ='$char[0]'"); 764 $owner_gmlvl = $sql->result($result, 0, 'gmlevel'); 765 $owner_name = $sql->result($result, 0, 'username'); 729 766 730 767 if (($user_lvl > $owner_gmlvl)||($owner_name == $user_name)){ 731 768 732 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);733 $result = $ mysql->query("SELECT faction, standing, flags FROM character_reputation WHERE guid ='$id' AND (flags = 1 OR flags = 17)");769 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 770 $result = $sql->query("SELECT faction, standing, flags FROM character_reputation WHERE guid ='$id' AND (flags = 1 OR flags = 17)"); 734 771 735 772 $output .= "<center> … … 769 806 ); 770 807 771 if ($ mysql->num_rows($result)){772 while ($fact = $ mysql->fetch_row($result)){808 if ($sql->num_rows($result)){ 809 while ($fact = $sql->fetch_row($result)){ 773 810 $temp_out[get_faction_tree($fact[0])][0] .= "<tr><td width=\"60%\">".get_faction_name($fact[0])."</td> 774 811 <td width=\"40%\">$fact[1]</td></tr>"; … … 795 832 796 833 } else { 797 $ mysql->close();834 $sql->close(); 798 835 error($lang_char['no_permission']); 799 836 } 800 837 801 838 } else error($lang_char['no_char_found']); 802 $ mysql->close();839 $sql->close(); 803 840 804 841 } … … 814 851 if (empty($_GET['id'])) error($lang_global['empty_fields']); 815 852 816 $mysql = new MySQL; 817 $mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 818 819 $id = $mysql->quote_smart($_GET['id']); 820 $result = $mysql->query("SELECT account FROM `character` WHERE guid = '$id'"); 821 822 if ($mysql->num_rows($result) == 1){ 823 $owner_acc_id = $mysql->result($result, 0, 'account'); 824 $mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 825 $result = $mysql->query("SELECT gmlevel,username FROM account WHERE id ='$owner_acc_id'"); 826 $owner_gmlvl = $mysql->result($result, 0, 'gmlevel'); 827 $owner_name = $mysql->result($result, 0, 'username'); 853 $sql = new SQL; 854 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 855 856 $id = $sql->quote_smart($_GET['id']); 857 $order_by = (isset($_GET['order_by'])) ? $sql->quote_smart($_GET['order_by']) : 1; 858 $dir = (isset($_GET['dir'])) ? $sql->quote_smart($_GET['dir']) : 1; 859 $dir = ($dir) ? 0 : 1; 860 861 $result = $sql->query("SELECT account FROM `character` WHERE guid = '$id'"); 862 863 if ($sql->num_rows($result) == 1){ 864 $owner_acc_id = $sql->result($result, 0, 'account'); 865 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 866 $result = $sql->query("SELECT gmlevel,username FROM account WHERE id ='$owner_acc_id'"); 867 $owner_gmlvl = $sql->result($result, 0, 'gmlevel'); 868 $owner_name = $sql->result($result, 0, 'username'); 828 869 829 870 if (($user_lvl > $owner_gmlvl)||($owner_name == $user_name)){ 830 871 831 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);832 833 $result = $ mysql->query("SELECT data,name,race,class,CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1) AS UNSIGNED) AS level FROM `character` WHERE guid = '$id'");834 $char = $ mysql->fetch_row($result);872 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 873 874 $result = $sql->query("SELECT data,name,race,class,CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1) AS UNSIGNED) AS level FROM `character` WHERE guid = '$id'"); 875 $char = $sql->fetch_row($result); 835 876 $char_data = explode(' ',$char[0]); 836 877 … … 850 891 <table class=\"lined\" style=\"width: 550px;\"> 851 892 <tr> 852 <th colspan=\"3\" align=\"left\">{$lang_char['skills']}</th></tr>"; 893 <th class=\"title\" colspan=\"".($user_lvl ? "3" : "2")."\" align=\"left\">{$lang_char['skills']}</th></tr> 894 <tr>" 895 .($user_lvl ? "<th><a href=\"char.php?id=$id&action=char_skill&order_by=0&dir=$dir\">".($order_by==0 ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char['skill_id']}</a></th>" : "") 896 ."<th align=\"right\"><a href=\"char.php?id=$id&action=char_skill&order_by=1&dir=$dir\">".($order_by==1 ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char['skill_name']}</a></th> 897 <th><a href=\"char.php?id=$id&action=char_skill&order_by=2&dir=$dir\">".($order_by==2 ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char['skill_value']}</a></th> 898 </tr>"; 853 899 require_once("scripts/id_tab.php"); 854 900 … … 858 904 859 905 $skill_rank_array = array( 860 75 => 'Apprentice',861 150 => 'Journeyman',862 225 => 'Expert',863 300 => 'Artisan',864 350 => 'Master',865 375 => 'Inherent',866 385 => 'Wise'906 75 => $lang_char['apprentice'], 907 150 => $lang_char['journeyman'], 908 225 => $lang_char['expert'], 909 300 => $lang_char['artisan'], 910 350 => $lang_char['master'], 911 375 => $lang_char['inherent'], 912 385 => $lang_char['wise'] 867 913 ); 868 914 … … 870 916 if (($char_data[$i])&&(get_skill_name($char_data[$i] & 0x0000FFFF ))){ 871 917 $temp = unpack("S", pack("L", $char_data[$i+1])); 872 $skill = ($char_data[$i] & 0x0000FFFF);918 $skill = ($char_data[$i] & 0x0000FFFF); 873 919 874 920 if( $skill == 185 || $skill == 129 || $skill == 356 || $skill == 762) … … 891 937 unset($char_data); 892 938 893 a sort($skill_array);894 a sort($prof_1_array);895 a sort($prof_2_array);896 939 aasort($skill_array, $order_by, $dir); 940 aasort($prof_1_array, $order_by, $dir); 941 aasort($prof_2_array, $order_by, $dir); 942 897 943 foreach ($skill_array as $data){ 898 944 $max = ($data[2] < $char[4]*5) ? $char[4]*5 : $data[2]; 899 $output .= "<tr> 900 <td>$data[0]</td> 901 <td align=\"right\">$data[1]</td> 902 <td class=\"bar skill_bar\" style=\"background-position: ".(round(385*$data[2]/$max)-385)."px;\"><span>$data[2]/$max</span></td> 945 $output .= "<tr>" 946 .($user_lvl ? "<td>$data[0]</td>" : "") 947 ." <td align=\"right\">$data[1]</td> 948 <td valign=\"top\" class=\"bar skill_bar\" style=\"background-position: ".(round(385*$data[2]/$max)-385)."px;\"> 949 <span>$data[2]/$max</span> 950 </td> 903 951 </tr>"; 904 952 } 905 953 906 if(count($prof_1_array)) $output .= "<tr><th c olspan=\"3\" align=\"left\">{$lang_char['professions']} 1º</th></tr>";954 if(count($prof_1_array)) $output .= "<tr><th class=\"title\" colspan=\"".($user_lvl ? "3" : "2")."\" align=\"left\">{$lang_char['professions']} 1º</th></tr>"; 907 955 foreach ($prof_1_array as $data){ 908 956 $max = ($data[2]<76 ? 75 : ($data[2]<151 ? 150 : ($data[2]<226 ? 225 : ($data[2]<301 ? 300 : ($data[2]<351 ? 350 : ($data[2]<376 ? 375 : 385)))))); 909 $output .= "<tr> 910 <td>$data[0]</td>911 <td align=\"right\"><a href=\"{$skill_datasite}11.$data[0]\" target=\"_blank\">$data[1]</a></td>912 <td class=\"bar skill_bar\" style=\"background-position: ".(round(385*$data[2]/$max)-385)."px;\">957 $output .= "<tr>" 958 .($user_lvl ? "<td>$data[0]</td>" : "") 959 ." <td align=\"right\"><a href=\"{$skill_datasite}11.$data[0]\" target=\"_blank\">$data[1]</a></td> 960 <td valign=\"top\" class=\"bar skill_bar\" style=\"background-position: ".(round(385*$data[2]/$max)-385)."px;\"> 913 961 <span>$data[2]/$max ({$skill_rank_array[$max]})</span> 914 962 </td> 915 963 </tr>"; 916 964 } 917 if(count($prof_2_array)) $output .= "<tr><th c olspan=\"3\" align=\"left\">{$lang_char['professions']} 2º</th></tr>";965 if(count($prof_2_array)) $output .= "<tr><th class=\"title\" colspan=\"".($user_lvl ? "3" : "2")."\" align=\"left\">{$lang_char['professions']} 2º</th></tr>"; 918 966 foreach ($prof_2_array as $data){ 919 967 $max = ($data[2]<76 ? 75 : ($data[2]<151 ? 150 : ($data[2]<226 ? 225 : ($data[2]<301 ? 300 : ($data[2]<351 ? 350 : ($data[2]<376 ? 375 : 385)))))); 920 $output .= "<tr> 921 <td>$data[0]</td>922 <td align=\"right\"><a href=\"{$skill_datasite}9.$data[0]\" target=\"_blank\">$data[1]</a></td>923 <td class=\"bar skill_bar\" style=\"background-position: ".(round(385*$data[2]/$max)-385)."px;\">968 $output .= "<tr>" 969 .($user_lvl ? "<td>$data[0]</td>" : "") 970 ." <td align=\"right\"><a href=\"{$skill_datasite}9.$data[0]\" target=\"_blank\">$data[1]</a></td> 971 <td valign=\"top\" class=\"bar skill_bar\" style=\"background-position: ".(round(385*$data[2]/$max)-385)."px;\"> 924 972 <span>$data[2]/$max ({$skill_rank_array[$max]})</span> 925 973 </td> … … 942 990 943 991 } else { 944 $ mysql->close();992 $sql->close(); 945 993 error($lang_char['no_permission']); 946 994 } 947 995 948 996 } else error($lang_char['no_char_found']); 949 $ mysql->close();997 $sql->close(); 950 998 } 951 999 -
minimanager/char_edit.php
r5 r19 24 24 if (empty($_GET['id'])) error($lang_global['empty_fields']); 25 25 26 $ mysql = new MySQL;27 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);26 $sql = new SQL; 27 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 28 28 29 $id = $ mysql->quote_smart($_GET['id']);30 31 $result = $ mysql->query("SELECT account FROM `character` WHERE guid = '$id'");32 33 if ($ mysql->num_rows($result)){29 $id = $sql->quote_smart($_GET['id']); 30 31 $result = $sql->query("SELECT account FROM `character` WHERE guid = '$id'"); 32 33 if ($sql->num_rows($result)){ 34 34 //resrict by owner's gmlvl 35 $owner_acc_id = $ mysql->result($result, 0, 'account');36 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);37 $query = $ mysql->query("SELECT gmlevel,username FROM account WHERE id ='$owner_acc_id'");38 $owner_gmlvl = $ mysql->result($query, 0, 'gmlevel');39 $owner_name = $ mysql->result($query, 0, 'username');35 $owner_acc_id = $sql->result($result, 0, 'account'); 36 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 37 $query = $sql->query("SELECT gmlevel,username FROM account WHERE id ='$owner_acc_id'"); 38 $owner_gmlvl = $sql->result($query, 0, 'gmlevel'); 39 $owner_name = $sql->result($query, 0, 'username'); 40 40 41 41 if ($user_lvl >= $owner_gmlvl){ 42 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);43 44 $result = $ mysql->query("SELECT guid,account,data,name,race,class,position_x,position_y,map,online,totaltime,position_zFROM `character` WHERE guid = '$id'");45 $char = $ mysql->fetch_row($result);42 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 43 44 $result = $sql->query("SELECT guid,account,data,name,race,class,position_x,position_y,map,online,totaltime,position_z,zone FROM `character` WHERE guid = '$id'"); 45 $char = $sql->fetch_row($result); 46 46 $char_data = explode(' ',$char[2]); 47 47 … … 50 50 51 51 if($char_data[CHAR_DATA_OFFSET_GUILD_ID]){ 52 $query = $ mysql->query("SELECT name FROM guild WHERE guildid ='{$char_data[CHAR_DATA_OFFSET_GUILD_ID]}'");53 $guild_name = $ mysql->result($query, 0, 'name');52 $query = $sql->query("SELECT name FROM guild WHERE guildid ='{$char_data[CHAR_DATA_OFFSET_GUILD_ID]}'"); 53 $guild_name = $sql->result($query, 0, 'name'); 54 54 if ($user_lvl > 0 ) $guild_name = "<a href=\"guild.php?action=view_guild&error=3&id={$char_data[CHAR_DATA_OFFSET_GUILD_ID]}\" >$guild_name</a>"; 55 55 if ($char_data[CHAR_DATA_OFFSET_GUILD_RANK]){ 56 $guild_rank_query = $ mysql->query("SELECT rname FROM guild_rank WHERE guildid ='{$char_data[CHAR_DATA_OFFSET_GUILD_ID]}' AND rid='{$char_data[CHAR_DATA_OFFSET_GUILD_RANK]}'");57 $guild_rank = $ mysql->result($guild_rank_query, 0, 'rname');56 $guild_rank_query = $sql->query("SELECT rname FROM guild_rank WHERE guildid ='{$char_data[CHAR_DATA_OFFSET_GUILD_ID]}' AND rid='{$char_data[CHAR_DATA_OFFSET_GUILD_RANK]}'"); 57 $guild_rank = $sql->result($guild_rank_query, 0, 'rname'); 58 58 } else $guild_rank = $lang_char['guild_leader']; 59 59 } else { … … 82 82 </tr> 83 83 <tr> 84 <td colspan=\"8\">".get_map_name($char[9])." - ".get_zone_name($char[ 8], $char[6], $char[7])."</td>84 <td colspan=\"8\">".get_map_name($char[9])." - ".get_zone_name($char[12])."</td> 85 85 </tr> 86 86 <tr> … … 169 169 170 170 //inventory+bank items 171 $mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 172 $sql = "SELECT bag,slot,item,item_template FROM character_inventory WHERE guid = '$id' ORDER BY bag,slot"; 173 $query2 = $mysql->query($sql); 171 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 172 $query2 = $sql->query("SELECT bag,slot,item,item_template FROM character_inventory WHERE guid = '$id' ORDER BY bag,slot"); 174 173 175 174 $inv = array(); 176 175 $count = 0; 177 176 178 while ($slot = $ mysql->fetch_row($query2)){177 while ($slot = $sql->fetch_row($query2)){ 179 178 if ($slot[0] == 0) { 180 179 if($slot[1] >= 23 && $slot[1] <= 62) { … … 218 217 //case of non auth request 219 218 } else { 220 $ mysql->close();219 $sql->close(); 221 220 error($lang_char['no_permission']); 222 221 exit(); … … 224 223 225 224 } else error($lang_char['no_char_found']); 226 $ mysql->close();225 $sql->close(); 227 226 } 228 227 … … 237 236 if ( empty($_GET['id']) || empty($_GET['name']) ) error($lang_global['empty_fields']); 238 237 239 $ mysql = new MySQL;240 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);241 242 $id = $ mysql->quote_smart($_GET['id']);243 244 $result = $ mysql->query("SELECT account,online FROM `character` WHERE guid = '$id'");245 246 if ($ mysql->num_rows($result)){238 $sql = new SQL; 239 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 240 241 $id = $sql->quote_smart($_GET['id']); 242 243 $result = $sql->query("SELECT account,online FROM `character` WHERE guid = '$id'"); 244 245 if ($sql->num_rows($result)){ 247 246 //we cannot edit online chars 248 if(!$ mysql->result($result, 0, 'online')){247 if(!$sql->result($result, 0, 'online')){ 249 248 //resrict by owner's gmlvl 250 $owner_acc_id = $ mysql->result($result, 0, 'account');251 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);252 $query = $ mysql->query("SELECT gmlevel FROM account WHERE id ='$owner_acc_id'");253 $owner_gmlvl = $ mysql->result($query, 0, 'gmlevel');249 $owner_acc_id = $sql->result($result, 0, 'account'); 250 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 251 $query = $sql->query("SELECT gmlevel FROM account WHERE id ='$owner_acc_id'"); 252 $owner_gmlvl = $sql->result($query, 0, 'gmlevel'); 254 253 255 254 if ($user_lvl > $owner_gmlvl){ 256 255 257 if(isset($_GET['check'])) $check = $ mysql->quote_smart($_GET['check']);256 if(isset($_GET['check'])) $check = $sql->quote_smart($_GET['check']); 258 257 else $check = NULL; 259 258 260 $new_name = $ mysql->quote_smart($_GET['name']);259 $new_name = $sql->quote_smart($_GET['name']); 261 260 262 if (isset($_GET['tot_time'])) $new_tot_time = $ mysql->quote_smart($_GET['tot_time']);261 if (isset($_GET['tot_time'])) $new_tot_time = $sql->quote_smart($_GET['tot_time']); 263 262 else $new_tot_time = 0; 264 if (isset($_GET['res_holy'])) $new_res_holy = $ mysql->quote_smart($_GET['res_holy']);263 if (isset($_GET['res_holy'])) $new_res_holy = $sql->quote_smart($_GET['res_holy']); 265 264 else $new_res_holy = 0; 266 if (isset($_GET['res_arcane'])) $new_res_arcane = $ mysql->quote_smart($_GET['res_arcane']);265 if (isset($_GET['res_arcane'])) $new_res_arcane = $sql->quote_smart($_GET['res_arcane']); 267 266 else $new_res_arcane = 0; 268 if (isset($_GET['res_fire'])) $new_res_fire = $ mysql->quote_smart($_GET['res_fire']);267 if (isset($_GET['res_fire'])) $new_res_fire = $sql->quote_smart($_GET['res_fire']); 269 268 else $new_res_fire = 0; 270 if (isset($_GET['res_nature'])) $new_res_nature = $ mysql->quote_smart($_GET['res_nature']);269 if (isset($_GET['res_nature'])) $new_res_nature = $sql->quote_smart($_GET['res_nature']); 271 270 else $new_res_nature = 0; 272 if (isset($_GET['res_frost'])) $new_res_frost = $ mysql->quote_smart($_GET['res_frost']);271 if (isset($_GET['res_frost'])) $new_res_frost = $sql->quote_smart($_GET['res_frost']); 273 272 else $new_res_frost = 0; 274 if (isset($_GET['res_shadow'])) $new_res_shadow = $ mysql->quote_smart($_GET['res_shadow']);273 if (isset($_GET['res_shadow'])) $new_res_shadow = $sql->quote_smart($_GET['res_shadow']); 275 274 else $new_res_shadow = 0; 276 if (isset($_GET['attack_power'])) $new_attack_power = $ mysql->quote_smart($_GET['attack_power']);275 if (isset($_GET['attack_power'])) $new_attack_power = $sql->quote_smart($_GET['attack_power']); 277 276 else $new_attack_power = 0; 278 if (isset($_GET['range_attack_power'])) $new_range_attack_power = $ mysql->quote_smart($_GET['range_attack_power']);277 if (isset($_GET['range_attack_power'])) $new_range_attack_power = $sql->quote_smart($_GET['range_attack_power']); 279 278 else $new_range_attack_power = 0; 280 if (isset($_GET['money'])) $new_money = $ mysql->quote_smart($_GET['money']);279 if (isset($_GET['money'])) $new_money = $sql->quote_smart($_GET['money']); 281 280 else $new_money = 0; 282 if (isset($_GET['arena_points'])) $new_arena_points = $ mysql->quote_smart($_GET['arena_points']);281 if (isset($_GET['arena_points'])) $new_arena_points = $sql->quote_smart($_GET['arena_points']); 283 282 else $new_arena_points = 0; 284 if (isset($_GET['honor_points'])) $new_honor_points = $ mysql->quote_smart($_GET['honor_points']);283 if (isset($_GET['honor_points'])) $new_honor_points = $sql->quote_smart($_GET['honor_points']); 285 284 else $new_honor_points = 0; 286 if (isset($_GET['total_kills'])) $new_total_kills = $ mysql->quote_smart($_GET['total_kills']);285 if (isset($_GET['total_kills'])) $new_total_kills = $sql->quote_smart($_GET['total_kills']); 287 286 else $new_total_kills = 0; 288 287 … … 292 291 error($lang_char['use_numeric']); 293 292 294 if (isset($_GET['health'])) $new_health = $ mysql->quote_smart($_GET['health']);293 if (isset($_GET['health'])) $new_health = $sql->quote_smart($_GET['health']); 295 294 else $new_health = 1; 296 if (isset($_GET['mana'])) $new_mana = $ mysql->quote_smart($_GET['mana']);295 if (isset($_GET['mana'])) $new_mana = $sql->quote_smart($_GET['mana']); 297 296 else $new_mana = 0; 298 if (isset($_GET['str'])) $new_str = $ mysql->quote_smart($_GET['str']);297 if (isset($_GET['str'])) $new_str = $sql->quote_smart($_GET['str']); 299 298 else $new_str = 1; 300 if (isset($_GET['agi'])) $new_agi = $ mysql->quote_smart($_GET['agi']);299 if (isset($_GET['agi'])) $new_agi = $sql->quote_smart($_GET['agi']); 301 300 else $new_agi = 1; 302 if (isset($_GET['sta'])) $new_sta = $ mysql->quote_smart($_GET['sta']);301 if (isset($_GET['sta'])) $new_sta = $sql->quote_smart($_GET['sta']); 303 302 else $new_sta = 1; 304 if (isset($_GET['int'])) $new_int = $ mysql->quote_smart($_GET['int']);303 if (isset($_GET['int'])) $new_int = $sql->quote_smart($_GET['int']); 305 304 else $new_int = 1; 306 if (isset($_GET['spi'])) $new_spi = $ mysql->quote_smart($_GET['spi']);305 if (isset($_GET['spi'])) $new_spi = $sql->quote_smart($_GET['spi']); 307 306 else $new_spi = 1; 308 if (isset($_GET['exp'])) $new_exp = $ mysql->quote_smart($_GET['exp']);307 if (isset($_GET['exp'])) $new_exp = $sql->quote_smart($_GET['exp']); 309 308 else $new_exp = 0; 310 if (isset($_GET['armor'])) $new_armor = $ mysql->quote_smart($_GET['armor']);309 if (isset($_GET['armor'])) $new_armor = $sql->quote_smart($_GET['armor']); 311 310 else $new_armor = 0; 312 if (isset($_GET['block'])) $new_block = $ mysql->quote_smart($_GET['block']);311 if (isset($_GET['block'])) $new_block = $sql->quote_smart($_GET['block']); 313 312 else $new_block = 0; 314 if (isset($_GET['dodge'])) $new_dodge = $ mysql->quote_smart($_GET['dodge']);313 if (isset($_GET['dodge'])) $new_dodge = $sql->quote_smart($_GET['dodge']); 315 314 else $new_dodge = 0; 316 if (isset($_GET['parry'])) $new_parry = $ mysql->quote_smart($_GET['parry']);315 if (isset($_GET['parry'])) $new_parry = $sql->quote_smart($_GET['parry']); 317 316 else $new_parry = 0; 318 if (isset($_GET['crit'])) $new_crit = $ mysql->quote_smart($_GET['crit']);317 if (isset($_GET['crit'])) $new_crit = $sql->quote_smart($_GET['crit']); 319 318 else $new_crit = 0; 320 if (isset($_GET['range_crit'])) $new_range_crit = $ mysql->quote_smart($_GET['range_crit']);319 if (isset($_GET['range_crit'])) $new_range_crit = $sql->quote_smart($_GET['range_crit']); 321 320 else $new_range_crit = 0; 322 321 … … 326 325 ||(!is_numeric($new_crit))||(!is_numeric($new_range_crit))) error($lang_char['use_numeric']); 327 326 328 $x = (isset($_GET['x'])) ? $ mysql->quote_smart($_GET['x']) : 0;329 $y = (isset($_GET['y'])) ? $ mysql->quote_smart($_GET['y']) : 0;330 $z = (isset($_GET['z'])) ? $ mysql->quote_smart($_GET['z']) : 0;331 $map = (isset($_GET['map'])) ? $ mysql->quote_smart($_GET['map']) : 0;332 $tp_to = (isset($_GET['tp_to'])) ? $ mysql->quote_smart($_GET['tp_to']) : 0;333 334 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);335 336 $result = $ mysql->query("SELECT data FROM `character` WHERE guid = '$id'");337 $char = $ mysql->fetch_row($result);327 $x = (isset($_GET['x'])) ? $sql->quote_smart($_GET['x']) : 0; 328 $y = (isset($_GET['y'])) ? $sql->quote_smart($_GET['y']) : 0; 329 $z = (isset($_GET['z'])) ? $sql->quote_smart($_GET['z']) : 0; 330 $map = (isset($_GET['map'])) ? $sql->quote_smart($_GET['map']) : 0; 331 $tp_to = (isset($_GET['tp_to'])) ? $sql->quote_smart($_GET['tp_to']) : 0; 332 333 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 334 335 $result = $sql->query("SELECT data FROM `character` WHERE guid = '$id'"); 336 $char = $sql->fetch_row($result); 338 337 $char_data = explode(' ',$char[0]); 339 338 … … 401 400 402 401 sscanf($item_num, "a%d",$item_num); 403 $result = $ mysql->query("SELECT item FROM character_inventory WHERE guid = '$id' AND slot = $item_num AND bag = 0");404 $item_inst_id = $ mysql->result($result, 0, 'item');405 406 $ mysql->query("DELETE FROM character_inventory WHERE guid = '$id' AND slot = $item_num AND bag = 0");407 $ mysql->query("DELETE FROM item_instance WHERE guid = '$item_inst_id' AND owner_guid = '$id'");408 $ mysql->query("DELETE FROM item_text WHERE id = '$item_inst_id'");402 $result = $sql->query("SELECT item FROM character_inventory WHERE guid = '$id' AND slot = $item_num AND bag = 0"); 403 $item_inst_id = $sql->result($result, 0, 'item'); 404 405 $sql->query("DELETE FROM character_inventory WHERE guid = '$id' AND slot = $item_num AND bag = 0"); 406 $sql->query("DELETE FROM item_instance WHERE guid = '$item_inst_id' AND owner_guid = '$id'"); 407 $sql->query("DELETE FROM item_text WHERE id = '$item_inst_id'"); 409 408 } else { //deleting inv/bank items 410 $ mysql->query("DELETE FROM character_inventory WHERE guid = '$id' AND item = '$item_num'");411 $ mysql->query("DELETE FROM item_instance WHERE guid = '$item_num' AND owner_guid = '$id'");412 $ mysql->query("DELETE FROM item_text WHERE id = '$item_num'");409 $sql->query("DELETE FROM character_inventory WHERE guid = '$id' AND item = '$item_num'"); 410 $sql->query("DELETE FROM item_instance WHERE guid = '$item_num' AND owner_guid = '$id'"); 411 $sql->query("DELETE FROM item_text WHERE id = '$item_num'"); 413 412 } 414 413 } … … 418 417 419 418 if ($tp_to){ 420 $query = $ mysql->query("SELECT map, position_x, position_y, position_z, orientation FROM game_tele WHERE LOWER(name) = '".strtolower($tp_to)."'");421 $tele = $ mysql->fetch_row($query);419 $query = $sql->query("SELECT map, position_x, position_y, position_z, orientation FROM game_tele WHERE LOWER(name) = '".strtolower($tp_to)."'"); 420 $tele = $sql->fetch_row($query); 422 421 if($tele) $teleport = "map='$tele[0]', position_x='$tele[1]', position_y='$tele[2]', position_z='$tele[3]', orientation='$tele[4]',"; 423 422 else error($lang_char['no_tp_location']); 424 423 } else $teleport = "map='$map', position_x='$x', position_y='$y', position_z='$z',"; 425 424 426 $result = $ mysql->query("UPDATE `character` SET data = '$data', name = '$new_name', $teleport totaltime = '$new_tot_time' WHERE guid = '$id'");427 $ mysql->close();425 $result = $sql->query("UPDATE `character` SET data = '$data', name = '$new_name', $teleport totaltime = '$new_tot_time' WHERE guid = '$id'"); 426 $sql->close(); 428 427 429 428 if ($result) redirect("char_edit.php?action=edit_char&id=$id&error=3"); 430 429 else redirect("char_edit.php?action=edit_char&id=$id&error=4"); 431 430 } else { 432 $ mysql->close();431 $sql->close(); 433 432 error($lang_char['no_permission']); 434 433 } 435 434 } else { 436 $ mysql->close();435 $sql->close(); 437 436 redirect("char_edit.php?action=edit_char&id=$id&error=2"); 438 437 } 439 438 } else error($lang_char['no_char_found']); 440 $ mysql->close();439 $sql->close(); 441 440 } 442 441 -
minimanager/char_list.php
r5 r19 21 21 $user_lvl,$user_name; 22 22 23 $ mysql = new MySQL;24 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);25 26 $start = (isset($_GET['start'])) ? $ mysql->quote_smart($_GET['start']) : 0;27 $order_by = (isset($_GET['order_by'])) ? $ mysql->quote_smart($_GET['order_by']) :"guid";28 29 $dir = (isset($_GET['dir'])) ? $ mysql->quote_smart($_GET['dir']) : 1;23 $sql = new SQL; 24 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 25 26 $start = (isset($_GET['start'])) ? $sql->quote_smart($_GET['start']) : 0; 27 $order_by = (isset($_GET['order_by'])) ? $sql->quote_smart($_GET['order_by']) :"guid"; 28 29 $dir = (isset($_GET['dir'])) ? $sql->quote_smart($_GET['dir']) : 1; 30 30 $order_dir = ($dir) ? "ASC" : "DESC"; 31 31 $dir = ($dir) ? 0 : 1; 32 32 33 $query_1 = $ mysql->query("SELECT count(*) FROM `character`");34 $all_record = $ mysql->result($query_1,0);35 36 $query = $ mysql->query("SELECT guid,name,account,race,class,position_x,position_y,map,33 $query_1 = $sql->query("SELECT count(*) FROM `character`"); 34 $all_record = $sql->result($query_1,0); 35 36 $query = $sql->query("SELECT guid,name,account,race,class,zone,map, 37 37 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_KILL+1)."), ' ', -1) AS UNSIGNED) AS highest_rank, 38 38 online,CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1) AS UNSIGNED) AS level 39 39 FROM `character` ORDER BY $order_by $order_dir LIMIT $start, $itemperpage"); 40 $this_page = $ mysql->num_rows($query) or die(error($lang_global['err_no_result']));40 $this_page = $sql->num_rows($query) or die(error($lang_global['err_no_result'])); 41 41 42 42 //==========================top tage navigaion starts here======================== … … 55 55 <input type=\"text\" size=\"14\" maxlength=\"50\" name=\"search_value\" /> 56 56 <select name=\"search_by\"> 57 <option value=\"name\">{$lang_char_list['by_name']}</option> 57 58 <option value=\"guid\">{$lang_char_list['by_id']}</option> 58 <option value=\"name\">{$lang_char_list['by_name']}</option>59 59 <option value=\"account\">{$lang_char_list['by_account']}</option> 60 60 <option value=\"level\">{$lang_char_list['by_level']}</option> … … 83 83 <table class=\"lined\"> 84 84 <tr> 85 <t d width=\"5%\" class=\"head\"><input name=\"allbox\" type=\"checkbox\" value=\"Check All\" onclick=\"CheckAll(document.form1);\" /></td>86 <t d width=\"5%\" class=\"head\"><a href=\"char_list.php?order_by=guid&start=$start&dir=$dir\" class=\"head_link\">{$lang_char_list['id']}</a></td>87 <t d width=\"15%\" class=\"head\"><a href=\"char_list.php?order_by=name&start=$start&dir=$dir\" class=\"head_link\">{$lang_char_list['char_name']}</a></td>88 <t d width=\"15%\" class=\"head\"><a href=\"char_list.php?order_by=account&start=$start&dir=$dir\" class=\"head_link\">{$lang_char_list['account']}</a></td>89 <t d width=\"7%\" class=\"head\"><a href=\"char_list.php?order_by=race&start=$start&dir=$dir\" class=\"head_link\">{$lang_char_list['race']}</a></td>90 <t d width=\"6%\" class=\"head\"><a href=\"char_list.php?order_by=class&start=$start&dir=$dir\" class=\"head_link\">{$lang_char_list['class']}</a></td>91 <t d width=\"5%\" class=\"head\"><a href=\"char_list.php?order_by=level&start=$start&dir=$dir\" class=\"head_link\">{$lang_char_list['level']}</a></td>92 <t d width=\"15%\" class=\"head\"><a href=\"char_list.php?order_by=map&start=$start&dir=$dir\" class=\"head_link\">{$lang_char_list['map']}</a></td>93 <t d width=\"17%\" class=\"head\">{$lang_char_list['zone']}</td>94 <t d width=\"5%\" class=\"head\"><a href=\"char_list.php?order_by=highest_rank&start=$start&dir=$dir\" class=\"head_link\">{$lang_char_list['honor_kills']}</a></td>95 <t d width=\"5%\" class=\"head\"><a href=\"char_list.php?order_by=online&start=$start&dir=$dir\" class=\"head_link\">{$lang_char_list['online']}</a></td>85 <th width=\"5%\"><input name=\"allbox\" type=\"checkbox\" value=\"Check All\" onclick=\"CheckAll(document.form1);\" /></th> 86 <th width=\"5%\"><a href=\"char_list.php?order_by=guid&start=$start&dir=$dir\">".($order_by=='guid' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char_list['id']}</a></th> 87 <th width=\"15%\"><a href=\"char_list.php?order_by=name&start=$start&dir=$dir\">".($order_by=='name' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char_list['char_name']}</a></th> 88 <th width=\"15%\"><a href=\"char_list.php?order_by=account&start=$start&dir=$dir\">".($order_by=='account' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char_list['account']}</a></th> 89 <th width=\"7%\"><a href=\"char_list.php?order_by=race&start=$start&dir=$dir\">".($order_by=='race' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char_list['race']}</a></th> 90 <th width=\"6%\"><a href=\"char_list.php?order_by=class&start=$start&dir=$dir\">".($order_by=='class' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char_list['class']}</a></th> 91 <th width=\"5%\"><a href=\"char_list.php?order_by=level&start=$start&dir=$dir\">".($order_by=='level' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char_list['level']}</a></th> 92 <th width=\"15%\"><a href=\"char_list.php?order_by=map&start=$start&dir=$dir\">".($order_by=='map' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char_list['map']}</a></th> 93 <th width=\"17%\">{$lang_char_list['zone']}</th> 94 <th width=\"5%\"><a href=\"char_list.php?order_by=highest_rank&start=$start&dir=$dir\">".($order_by=='highest_rank' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char_list['honor_kills']}</a></th> 95 <th width=\"5%\"><a href=\"char_list.php?order_by=online&start=$start&dir=$dir\">".($order_by=='online' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char_list['online']}</a></th> 96 96 </tr>"; 97 97 98 98 $looping = ($this_page < $itemperpage) ? $this_page : $itemperpage; 99 99 100 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);100 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 101 101 102 102 for ($i=1; $i<=$looping; $i++) { 103 $char = $ mysql->fetch_row($query) or die(error($lang_global['err_no_user']));103 $char = $sql->fetch_row($query) or die(error($lang_global['err_no_user'])); 104 104 //to disalow lower lvl gm to view accounts of other gms 105 $result = $ mysql->query("SELECT gmlevel,username FROM account WHERE id ='$char[2]'");106 $owner_gmlvl = $ mysql->result($result, 0, 'gmlevel');107 $owner_acc_name = $ mysql->result($result, 0, 'username');105 $result = $sql->query("SELECT gmlevel,username FROM account WHERE id ='$char[2]'"); 106 $owner_gmlvl = $sql->result($result, 0, 'gmlevel'); 107 $owner_acc_name = $sql->result($result, 0, 'username'); 108 108 109 109 if (($user_lvl >= $owner_gmlvl)||($owner_acc_name == $user_name)){ … … 112 112 $output .= "<td><input type=\"checkbox\" name=\"check[]\" value=\"$char[0]\" onclick=\"CheckCheckAll(document.form1);\" /></td>"; 113 113 else $output .= "<td></td>"; 114 $output .= " 115 <td>$char[0]</td> 114 $output .= "<td>$char[0]</td> 116 115 <td><a href=\"char.php?id=$char[0]\">$char[1]</a></td> 117 116 <td><a href=\"user.php?action=edit_user&error=11&id=$char[2]\">$owner_acc_name</a></td> 118 <td> ".get_player_race($char[3])."</td>119 <td> ".get_player_class($char[4])."</td>120 <td>$char[ 10]</td>121 <td>".get_map_name($char[ 7])."</td>122 <td>".get_zone_name($char[ 7], $char[5], $char[6])."</td>123 <td>$char[ 8]</td>124 <td>".(($char[ 9]) ? "ON" : "-")."</td>117 <td><img src='img/c_icons/{$char[3]}-0.gif' onmousemove='toolTip(\"".get_player_race($char[3])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td> 118 <td><img src='img/c_icons/{$char[4]}.gif' onmousemove='toolTip(\"".get_player_class($char[4])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td> 119 <td>$char[9]</td> 120 <td>".get_map_name($char[6])."</td> 121 <td>".get_zone_name($char[5])."</td> 122 <td>$char[7]</td> 123 <td>".(($char[8]) ? "<img src=\"img/up.gif\" alt=\"\" />" : "-")."</td> 125 124 </tr>"; 126 125 }else{ … … 140 139 </form><br /></center>"; 141 140 142 $ mysql->close();141 $sql->close(); 143 142 } 144 143 … … 153 152 if(!isset($_GET['search_value'])) redirect("char_list.php?error=2"); 154 153 155 $ mysql = new MySQL;156 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass']);157 158 $search_value = $ mysql->quote_smart($_GET['search_value']);159 $search_by = (isset($_GET['search_by'])) ? $ mysql->quote_smart($_GET['search_by']) : "name";160 $order_by = (isset($_GET['order_by'])) ? $ mysql->quote_smart($_GET['order_by']) : "guid";161 162 $dir = (isset($_GET['dir'])) ? $ mysql->quote_smart($_GET['dir']) : 1;154 $sql = new SQL; 155 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 156 157 $search_value = $sql->quote_smart($_GET['search_value']); 158 $search_by = (isset($_GET['search_by'])) ? $sql->quote_smart($_GET['search_by']) : "name"; 159 $order_by = (isset($_GET['order_by'])) ? $sql->quote_smart($_GET['order_by']) : "guid"; 160 161 $dir = (isset($_GET['dir'])) ? $sql->quote_smart($_GET['dir']) : 1; 163 162 $order_dir = ($dir) ? "ASC" : "DESC"; 164 163 $dir = ($dir) ? 0 : 1; … … 167 166 //need to get the acc id from other table since input comes as name 168 167 case "account": 169 { 170 $mysql->db($realm_db['name']); 171 $result = $mysql->query("SELECT id FROM account WHERE username LIKE '%$search_value%' LIMIT $sql_search_limit"); 172 173 //acc = 0 added just in case there will be NO result 174 $where_out = "account = 0 "; 175 while ($acc = $mysql->fetch_row($result)){ 176 $where_out .= "OR account = $acc[0] "; 177 } 178 179 $sql = "SELECT guid,name,account,race,class,position_x,position_y,map, 168 $sql->db($realm_db['name']); 169 $result = $sql->query("SELECT id FROM account WHERE username LIKE '%$search_value%' LIMIT $sql_search_limit"); 170 171 $where_out = "account IN (0 "; 172 while ($char = $sql->fetch_row($result)) $where_out .= " ,$acc[0]"; 173 $where_out = ") "; 174 175 $sql_query = "SELECT guid,name,account,race,class,zone,map, 180 176 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_KILL+1)."), ' ', -1) AS UNSIGNED) AS highest_rank,online, 181 177 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1) AS UNSIGNED) AS level 182 178 FROM `character` WHERE $where_out ORDER BY $order_by $order_dir LIMIT $sql_search_limit"; 183 }184 179 break; 185 180 186 181 case "level": 187 {188 182 if (!is_numeric($search_value)) $search_value = 1; 189 $sql = "SELECT guid,name,account,race,class,position_x,position_y,map,183 $sql_query = "SELECT guid,name,account,race,class,zone,map, 190 184 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_KILL+1)."), ' ', -1) AS UNSIGNED) AS highest_rank,online, 191 185 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1) AS UNSIGNED) AS level FROM `character` 192 186 WHERE SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1) = $search_value ORDER BY $order_by $order_dir LIMIT $sql_search_limit"; 193 }194 187 break; 195 188 196 189 case "greater_level": 197 190 if (!is_numeric($search_value)) $search_value = 1; 198 $sql = "SELECT guid,name,account,race,class,position_x,position_y,map,191 $sql_query = "SELECT guid,name,account,race,class,zone,map, 199 192 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_KILL+1)."), ' ', -1) AS UNSIGNED) AS highest_rank,online, 200 193 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1) AS UNSIGNED) AS level FROM `character` … … 203 196 204 197 case "gold": 205 {206 //used to avoid wrong input - cant use quotes on search value due to mysql bug.207 198 if (!is_numeric($search_value)) $search_value = 1; 208 $sql = "SELECT guid,name,account,race,class,position_x,position_y,map,199 $sql_query = "SELECT guid,name,account,race,class,zone,map, 209 200 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_KILL+1)."), ' ', -1) AS UNSIGNED) AS highest_rank,online, 210 201 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1) AS UNSIGNED) AS level FROM `character` 211 202 WHERE SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_GOLD+1)."), ' ', -1) > $search_value ORDER BY $order_by $order_dir LIMIT $sql_search_limit"; 212 }213 203 break; 214 204 215 205 case "guild": 216 $mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 217 $result = $mysql->query("SELECT guildid FROM guild WHERE name LIKE '%$search_value%'"); 218 $guildid = $mysql->result($result, 0, 'guildid'); 219 220 $result = $mysql->query("SELECT guid FROM guild_member WHERE guildid = $guildid"); 221 222 //guid = 0 added just in case there will be NO result 223 $where_out = "guid = 0 "; 224 while ($char = $mysql->fetch_row($result)){ 225 $where_out .= " OR guid = $char[0]"; 226 } 227 228 $sql = "SELECT guid,name,account,race,class,position_x,position_y,map, 206 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 207 $result = $sql->query("SELECT guildid FROM guild WHERE name LIKE '%$search_value%'"); 208 $guildid = $sql->result($result, 0, 'guildid'); 209 210 $result = $sql->query("SELECT guid FROM guild_member WHERE guildid = $guildid"); 211 212 $where_out = "guid IN (0 "; 213 while ($char = $sql->fetch_row($result)) $where_out .= " ,$char[0]"; 214 $where_out = ") "; 215 216 $sql_query = "SELECT guid,name,account,race,class,zone,map, 229 217 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_KILL+1)."), ' ', -1) AS UNSIGNED) AS highest_rank,online, 230 218 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1) AS UNSIGNED) AS level FROM `character` … … 233 221 234 222 case "item": 235 $mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 236 $result = $mysql->query("SELECT guid FROM character_inventory WHERE item_template = '$search_value'"); 237 238 //guid = 0 added just in case there will be NO result 239 $where_out = " guid = 0"; 240 while ($char = $mysql->fetch_row($result)){ 241 $where_out .= " OR guid = $char[0]"; 242 } 243 244 $sql = "SELECT guid,name,account,race,class,position_x,position_y,map, 223 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 224 $result = $sql->query("SELECT guid FROM character_inventory WHERE item_template = '$search_value'"); 225 226 $where_out = "guid IN (0 "; 227 while ($char = $sql->fetch_row($result)) $where_out .= " ,$char[0]"; 228 $where_out = ") "; 229 230 $sql_query = "SELECT guid,name,account,race,class,zone,map, 245 231 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_KILL+1)."), ' ', -1) AS UNSIGNED) AS highest_rank,online, 246 232 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1) AS UNSIGNED) AS level FROM `character` … … 250 236 case "greater_rank": 251 237 if (!is_numeric($search_value)) $search_value = 0; 252 $sql = "SELECT guid,name,account,race,class,position_x,position_y,map,238 $sql_query = "SELECT guid,name,account,race,class,zone,map, 253 239 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_KILL+1)."), ' ', -1) AS UNSIGNED) AS highest_rank,online, 254 240 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1) AS UNSIGNED) AS level FROM `character` … … 257 243 case "highest_rank": 258 244 if (!is_numeric($search_value)) $search_value = 0; 259 $sql = "SELECT guid,name,account,race,class,position_x,position_y,map,245 $sql_query = "SELECT guid,name,account,race,class,zone,map, 260 246 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_KILL+1)."), ' ', -1) AS UNSIGNED) AS highest_rank,online, 261 247 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1) AS UNSIGNED) AS level FROM `character` … … 264 250 265 251 default: 266 $sql = "SELECT guid,name,account,race,class,position_x,position_y,map,252 $sql_query = "SELECT guid,name,account,race,class,zone,map, 267 253 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_KILL+1)."), ' ', -1) AS UNSIGNED) AS highest_rank,online, 268 254 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1) AS UNSIGNED) AS level FROM `character` … … 270 256 } 271 257 272 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);273 274 $query = $ mysql->query($sql);275 $total_found = $ mysql->num_rows($query);258 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 259 260 $query = $sql->query($sql_query); 261 $total_found = $sql->num_rows($query); 276 262 277 263 //==========================top tage navigaion starts here======================== … … 288 274 <input type=\"text\" size=\"17\" maxlength=\"50\" name=\"search_value\" /> 289 275 <select name=\"search_by\"> 276 <option value=\"name\">{$lang_char_list['by_name']}</option> 290 277 <option value=\"guid\">{$lang_char_list['by_id']}</option> 291 <option value=\"name\">{$lang_char_list['by_name']}</option>292 278 <option value=\"account\">{$lang_char_list['by_account']}</option> 293 279 <option value=\"level\">{$lang_char_list['by_level']}</option> … … 313 299 <table class=\"lined\"> 314 300 <tr> 315 <t d width=\"5%\" class=\"head\"><input name=\"allbox\" type=\"checkbox\" value=\"Check All\" onclick=\"CheckAll(document.form1);\" /></td>316 <t d width=\"5%\" class=\"head\"><a href=\"char_list.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=guid&dir=$dir\" class=\"head_link\">{$lang_char_list['id']}</a></td>317 <t d width=\"15%\" class=\"head\"><a href=\"char_list.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=name&dir=$dir\" class=\"head_link\">{$lang_char_list['char_name']}</a></td>318 <t d width=\"15%\" class=\"head\"><a href=\"char_list.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=account&dir=$dir\" class=\"head_link\">{$lang_char_list['account']}</a></td>319 <t d width=\"7%\" class=\"head\"><a href=\"char_list.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=race&dir=$dir\" class=\"head_link\">{$lang_char_list['race']}</a></td>320 <t d width=\"6%\" class=\"head\"><a href=\"char_list.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=class&dir=$dir\" class=\"head_link\">{$lang_char_list['class']}</a></td>321 <t d width=\"5%\" class=\"head\"><a href=\"char_list.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=level&dir=$dir\" class=\"head_link\">{$lang_char_list['level']}</a></td>322 <t d width=\"17%\" class=\"head\"><a href=\"char_list.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=map&dir=$dir\" class=\"head_link\">{$lang_char_list['map']}</a></td>323 <t d width=\"15%\" class=\"head\">{$lang_char_list['zone']}</td>324 <t d width=\"5%\" class=\"head\"><a href=\"char_list.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=highest_rank&dir=$dir\" class=\"head_link\">{$lang_char_list['honor_kills']}</a></td>325 <t d width=\"5%\" class=\"head\"><a href=\"char_list.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=online&dir=$dir\" class=\"head_link\">{$lang_char_list['online']}</a></td>301 <th width=\"5%\"><input name=\"allbox\" type=\"checkbox\" value=\"Check All\" onclick=\"CheckAll(document.form1);\" /></td> 302 <th width=\"5%\><a href=\"char_list.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=guid&dir=$dir\">".($order_by=='guid' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char_list['id']}</a></th> 303 <th width=\"15%\"><a href=\"char_list.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=name&dir=$dir\">".($order_by=='name' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char_list['char_name']}</a></th> 304 <th width=\"15%\"><a href=\"char_list.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=account&dir=$dir\">".($order_by=='account' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char_list['account']}</a></th> 305 <th width=\"7%\"><a href=\"char_list.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=race&dir=$dir\">".($order_by=='race' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char_list['race']}</a></th> 306 <th width=\"6%\"><a href=\"char_list.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=class&dir=$dir\">".($order_by=='class' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char_list['class']}</a></th> 307 <th width=\"5%\"><a href=\"char_list.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=level&dir=$dir\">".($order_by=='level' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char_list['level']}</a></th> 308 <th width=\"17%\"><a href=\"char_list.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=map&dir=$dir\">".($order_by=='map' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char_list['map']}</a></th> 309 <th width=\"15%\">{$lang_char_list['zone']}</th> 310 <th width=\"5%\"><a href=\"char_list.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=highest_rank&dir=$dir\">".($order_by=='highest_rank' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char_list['honor_kills']}</a></th> 311 <th width=\"5%\"><a href=\"char_list.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=online&dir=$dir\">".($order_by=='online' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_char_list['online']}</a></th> 326 312 </tr>"; 327 313 328 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);314 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 329 315 330 for ($i=1; $i<=$total_found; $i++){ 331 $char = $mysql->fetch_row($query); 332 //to disalow lower lvl gm to view accounts of other gms 333 $result = $mysql->query("SELECT gmlevel,username FROM account WHERE id ='$char[2]'"); 334 $owner_gmlvl = $mysql->result($result, 0, 'gmlevel'); 335 $owner_acc_name = $mysql->result($result, 0, 'username'); 316 while ($char = $sql->fetch_row($query)){ 317 318 $result = $sql->query("SELECT gmlevel,username FROM account WHERE id ='$char[2]'"); 319 $owner_gmlvl = $sql->result($result, 0, 'gmlevel'); 320 $owner_acc_name = $sql->result($result, 0, 'username'); 336 321 337 if (($user_lvl >= $owner_gmlvl)||($owner_acc_name == $user_name)){322 if (($user_lvl >= $owner_gmlvl)||($owner_acc_name == $user_name)){ 338 323 $output .= "<tr>"; 339 324 if (($user_lvl > $owner_gmlvl)||($owner_acc_name == $user_name))$output .= " … … 344 329 <td><a href=\"char.php?id=$char[0]\">$char[1]</a></td> 345 330 <td><a href=\"user.php?action=edit_user&error=11&id=$char[2]\">$owner_acc_name</a></td> 346 <td> ".get_player_race($char[3])."</td>347 <td >".get_player_class($char[4])."</td>348 <td>$char[ 10]</td>349 <td>".get_map_name($char[ 7])."</td>350 <td>".get_zone_name($char[ 7], $char[5], $char[6])."</td>351 <td>$char[ 8]</td>352 <td>".(($char[ 9]) ? "ON" : "-")."</td>331 <td><img src='img/c_icons/{$char[3]}-0.gif' onmousemove='toolTip(\"".get_player_race($char[3])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td> 332 <td><img src='img/c_icons/{$char[4]}.gif' onmousemove='toolTip(\"".get_player_class($char[4])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td> 333 <td>$char[9]</td> 334 <td>".get_map_name($char[6])."</td> 335 <td>".get_zone_name($char[5])."</td> 336 <td>$char[7]</td> 337 <td>".(($char[8]) ? "<img src=\"img/up.gif\" alt=\"\" />" : "-")."</td> 353 338 </tr>"; 354 339 }else{ … … 368 353 </form><br /></center>"; 369 354 370 $ mysql->close();355 $sql->close(); 371 356 } 372 357 … … 376 361 //######################################################################################################################## 377 362 function del_char_form() { 378 global $lang_global, $lang_char_list, $output ;363 global $lang_global, $lang_char_list, $output, $realm_id, $mangos_db; 379 364 if(isset($_GET['check'])) $check = $_GET['check']; 380 365 else redirect("char_list.php?error=1"); 381 366 382 $output .= "<center>< h1><font class=\"error\">{$lang_global['are_you_sure']}</font></h1><br />";383 $output .= "<font class=\"bold\">{$lang_char_list['char_ids']}: "; 384 385 //this array needed to pass multiple values from check boxes down to delete by post method 367 $output .= "<center><img src=\"img/warn_red.gif\" width=\"48\" height=\"48\" alt=\"\" /> 368 <h1><font class=\"error\">{$lang_global['are_you_sure']}</font></h1><br /> 369 <font class=\"bold\">{$lang_char_list['char_ids']}: "; 370 386 371 $pass_array = ""; 387 372 373 $sql = new SQL; 374 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 375 388 376 for ($i=0; $i<count($check); $i++){ 389 $output .= "<a href=\"char.php?id=$check[$i]\" target=\"_blank\">$check[$i], </a>"; 377 $name = $sql->result($sql->query("SELECT name FROM `character` WHERE guid = {$check[$i]}"),0); 378 $output .= "<a href=\"char.php?id=$check[$i]\" target=\"_blank\">$name, </a>"; 390 379 $pass_array .= "&check%5B%5D=$check[$i]"; 391 380 } 392 381 393 $output .= "<br />{$lang_global['will_be_erased']}</font><br /><br />"; 394 395 $output .= "<table class=\"hidden\"> 382 $sql->close(); 383 384 $output .= "<br />{$lang_global['will_be_erased']}</font><br /><br /> 385 <table class=\"hidden\"> 396 386 <tr><td>"; 397 387 makebutton($lang_global['yes'], "char_list.php?action=dodel_char$pass_array",120); … … 410 400 $tab_del_user_mangos, $user_name; 411 401 412 $ mysql = new MySQL;413 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);414 415 if(isset($_GET['check'])) $check = $ mysql->quote_smart($_GET['check']);402 $sql = new SQL; 403 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 404 405 if(isset($_GET['check'])) $check = $sql->quote_smart($_GET['check']); 416 406 else redirect("char_list.php?error=1"); 417 407 … … 425 415 } 426 416 427 $ mysql->close();417 $sql->close(); 428 418 $output .= "<center>"; 429 419 if (!$deleted_chars) $output .= "<h1><font class=\"error\">{$lang_char_list['no_chars_del']}</font></h1>"; -
minimanager/cleanup.php
r5 r19 66 66 if( empty($_GET['cleanup_by']) || empty($_GET['cleanup_sign']) ) redirect("cleanup.php?error=1"); 67 67 68 $ mysql = new MySQL;69 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass']);70 71 $cleanup_by = $ mysql->quote_smart($_GET['cleanup_by']);72 $cleanup_sign = $ mysql->quote_smart($_GET['cleanup_sign']);73 $cleanup_value = $ mysql->quote_smart($_GET['cleanup_value']);68 $sql = new SQL; 69 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 70 71 $cleanup_by = $sql->quote_smart($_GET['cleanup_by']); 72 $cleanup_sign = $sql->quote_smart($_GET['cleanup_sign']); 73 $cleanup_value = $sql->quote_smart($_GET['cleanup_value']); 74 74 75 75 switch ($cleanup_by) { 76 76 // clean by lvl 77 77 case "char_lvl": 78 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);79 80 $result = $ mysql->query("SELECT guid FROM `character` WHERE SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 35), ' ', -1) $cleanup_sign $cleanup_value");81 $total_chars = $ mysql->num_rows($result);78 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 79 80 $result = $sql->query("SELECT guid FROM `character` WHERE SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 35), ' ', -1) $cleanup_sign $cleanup_value"); 81 $total_chars = $sql->num_rows($result); 82 82 83 83 $output .= "<center>"; … … 90 90 $pass_array = ""; 91 91 92 while($char = $ mysql->fetch_row($result)){92 while($char = $sql->fetch_row($result)){ 93 93 $output .= "<a href=\"char.php?id=$char[0]\" target=\"_blank\">$char[0], </a>"; 94 94 $pass_array .= "-$char[0]"; … … 117 117 //last loggin 118 118 case "last_login": 119 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);120 121 $result = $ mysql->query("SELECT id FROM account WHERE last_login $cleanup_sign '$cleanup_value' AND gmlevel < $user_lvl");122 $total_accounts = $ mysql->num_rows($result);119 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 120 121 $result = $sql->query("SELECT id FROM account WHERE last_login $cleanup_sign '$cleanup_value' AND gmlevel < $user_lvl"); 122 $total_accounts = $sql->num_rows($result); 123 123 124 124 $output .= "<center>"; … … 131 131 $pass_array = ""; 132 132 133 while($acc = $ mysql->fetch_row($result)){133 while($acc = $sql->fetch_row($result)){ 134 134 $output .= "<a href=\"user.php?action=edit_user&id=$acc[0]\" target=\"_blank\">$acc[0], </a>"; 135 135 $pass_array .= "-$acc[0]"; … … 158 158 //failed loggin attempts 159 159 case "failed_login": 160 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);161 162 $result = $ mysql->query("SELECT id FROM account WHERE failed_logins $cleanup_sign $cleanup_value AND gmlevel < $user_lvl");163 $total_accounts = $ mysql->num_rows($result);160 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 161 162 $result = $sql->query("SELECT id FROM account WHERE failed_logins $cleanup_sign $cleanup_value AND gmlevel < $user_lvl"); 163 $total_accounts = $sql->num_rows($result); 164 164 165 165 $output .= "<center>"; … … 172 172 $pass_array = ""; 173 173 174 while($acc = $ mysql->fetch_row($result)){174 while($acc = $sql->fetch_row($result)){ 175 175 $output .= "<a href=\"user.php?action=edit_user&id=$acc[0]\" target=\"_blank\">$acc[0], </a>"; 176 176 $pass_array .= "-$acc[0]"; … … 200 200 //clean banned accounts 201 201 case "banned": 202 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);203 204 $result = $ mysql->query("SELECT id FROM account_banned");205 $total_accounts = $ mysql->num_rows($result);202 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 203 204 $result = $sql->query("SELECT id FROM account_banned"); 205 $total_accounts = $sql->num_rows($result); 206 206 207 207 $output .= "<center>"; … … 214 214 $pass_array = ""; 215 215 216 while($acc = $ mysql->fetch_row($result)){216 while($acc = $sql->fetch_row($result)){ 217 217 $output .= "<a href=\"user.php?action=edit_user&id=$acc[0]\" target=\"_blank\">$acc[0], </a>"; 218 218 $pass_array .= "-$acc[0]"; … … 241 241 //clean chars with given total time played 242 242 case "totaltime": 243 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);244 245 $result = $ mysql->query("SELECT guid FROM `character` WHERE totaltime $cleanup_sign $cleanup_value");246 $total_chars = $ mysql->num_rows($result);243 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 244 245 $result = $sql->query("SELECT guid FROM `character` WHERE totaltime $cleanup_sign $cleanup_value"); 246 $total_chars = $sql->num_rows($result); 247 247 248 248 $output .= "<center>"; … … 255 255 $pass_array = ""; 256 256 257 while($char = $ mysql->fetch_row($result)){257 while($char = $sql->fetch_row($result)){ 258 258 $output .= "<a href=\"char.php?id=$char[0]\" target=\"_blank\">$char[0], </a>"; 259 259 $pass_array .= "-$char[0]"; … … 283 283 //clean locked acc 284 284 case "locked": 285 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);286 287 $result = $ mysql->query("SELECT id FROM account WHERE locked $cleanup_sign $cleanup_value AND gmlevel < $user_lvl");288 $total_accounts = $ mysql->num_rows($result);285 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 286 287 $result = $sql->query("SELECT id FROM account WHERE locked $cleanup_sign $cleanup_value AND gmlevel < $user_lvl"); 288 $total_accounts = $sql->num_rows($result); 289 289 290 290 $output .= "<center>"; … … 297 297 $pass_array = ""; 298 298 299 while($acc = $ mysql->fetch_row($result)){299 while($acc = $sql->fetch_row($result)){ 300 300 $output .= "<a href=\"user.php?action=edit_user&id=$acc[0]\" target=\"_blank\">$acc[0], </a>"; 301 301 $pass_array .= "-$acc[0]"; … … 325 325 //accounts without chars or specified number of chars 326 326 case "num_of_char_in_acc": 327 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);328 329 $result = $ mysql->query("SELECT id FROM account WHERE gmlevel < $user_lvl");327 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 328 329 $result = $sql->query("SELECT id FROM account WHERE gmlevel < $user_lvl"); 330 330 331 331 $acc_output_array = array(); 332 332 333 while($acc = $ mysql->fetch_row($result)){333 while($acc = $sql->fetch_row($result)){ 334 334 $total_chars_in_acc = 0; 335 335 foreach ($mangos_db as $db){ 336 $ mysql->connect($db['addr'], $db['user'], $db['pass'], $db['name']);337 338 $query = $ mysql->query("SELECT count(*) FROM `character` WHERE account = '$acc[0]'");339 $total_chars_in_acc = $total_chars_in_acc + $ mysql->result($query, 0);336 $sql->connect($db['addr'], $db['user'], $db['pass'], $db['name']); 337 338 $query = $sql->query("SELECT count(*) FROM `character` WHERE account = '$acc[0]'"); 339 $total_chars_in_acc = $total_chars_in_acc + $sql->result($query, 0); 340 340 } 341 341 … … 401 401 //guild without chars or specified number of chars 402 402 case "num_of_char_in_guild": 403 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);404 405 $result = $ mysql->query("SELECT guildid FROM guild");403 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 404 405 $result = $sql->query("SELECT guildid FROM guild"); 406 406 407 407 $guild_output_array = array(); 408 408 409 while($guild = $ mysql->fetch_row($result)){410 $query = $ mysql->query("SELECT count(*) FROM guild_member WHERE guildid = '$guild[0]'");411 $total_chars_in_guild = $ mysql->result($query, 0);409 while($guild = $sql->fetch_row($result)){ 410 $query = $sql->query("SELECT count(*) FROM guild_member WHERE guildid = '$guild[0]'"); 411 $total_chars_in_guild = $sql->result($query, 0); 412 412 413 413 switch ($cleanup_sign){ … … 473 473 } 474 474 475 $ mysql->close();475 $sql->close(); 476 476 } 477 477 … … 486 486 if (!isset($_POST['type']) || $_POST['type'] === '') redirect("cleanup.php?error=1"); 487 487 488 $ mysql = new MySQL;489 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass']);490 491 $type = $ mysql->quote_smart($_POST['type']);488 $sql = new SQL; 489 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 490 491 $type = $sql->quote_smart($_POST['type']); 492 492 if(isset($_POST['check']) && $_POST['check'] != '') { 493 $check = $ mysql->quote_smart($_POST['check']);493 $check = $sql->quote_smart($_POST['check']); 494 494 $check = explode('-',$check); 495 495 } else redirect("cleanup.php?error=1"); … … 538 538 } 539 539 540 $ mysql->close();540 $sql->close(); 541 541 542 542 $output .= "<center>"; -
minimanager/command.php
r5 r19 25 25 ); 26 26 27 $ mysql = new MySQL;28 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);27 $sql = new SQL; 28 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 29 29 30 $query = $ mysql->query("SELECT name,help,`security` FROM command WHERE `security` <= $user_lvl");30 $query = $sql->query("SELECT name,help,`security` FROM command WHERE `security` <= $user_lvl"); 31 31 32 while ($data = $ mysql->fetch_row($query)){32 while ($data = $sql->fetch_row($query)){ 33 33 $tmp_output = "<tr>"; 34 34 $tmp_output .= ($user_lvl > 2) ? "<td><input type=\"checkbox\" name=\"check[$data[0]]\" value=\"$data[2]\" /></td>" : "<td></td>"; 35 $tmp_output .= "<td nowrap align=right>.$data[0]</td>";35 $tmp_output .= "<td align=\"right\">.$data[0]</td>"; 36 36 $comm = explode("\r\n",$data[1],2); 37 37 $syntax = ereg_replace("[a-zA-Z ]+:* *\.".$data[0]." *", "", str_replace("/", "<br />",$comm[0])); … … 52 52 for ($i=0; $i<=$user_lvl; $i++){ 53 53 $output .= "<fieldset style=\"width: 770px;\"> 54 <legend>{$lang_command[$levels[$i][0]]}</legend> 55 <br /> 54 <legend>". 55 (($user_lvl) ? "<a href=\"#\" onclick=\"showHide('{$levels[$i][0]}')\">{$lang_command[$levels[$i][0]]}</a>" : "{$lang_command[$levels[$i][0]]}"). 56 "</legend> 57 <div id=\"{$levels[$i][0]}\"> 58 <br /> 56 59 <table class=\"lined\" style=\"width: 720px;text-align: left;\"> 57 60 <tr style=\"text-align: center;\"> 58 <t d width=\"2%\" class=\"head\"></td>59 <t d width=\"13%\" class=\"head\">{$lang_command['command']}</td>60 <t d width=\"20%\" class=\"head\">{$lang_command['syntax']}</td>61 <t d width=\"65%\" class=\"head\">{$lang_command['description']}</td>61 <th width=\"2%\"></th> 62 <th width=\"13%\">{$lang_command['command']}</th> 63 <th width=\"20%\">{$lang_command['syntax']}</th> 64 <th width=\"65%\">{$lang_command['description']}</th> 62 65 </tr>" . $levels[$i][1]; 63 66 if ($user_lvl > 2) { … … 65 68 makebutton($lang_command['change_level'], "javascript:do_submit()",280); 66 69 } 67 $output .= "</table></ fieldset>";70 $output .= "</table></div></fieldset>"; 68 71 } 69 72 $output .= "</form><br /></center>"; 70 73 71 $ mysql->close();74 $sql->close(); 72 75 } 73 76 … … 77 80 //####################################################################################################### 78 81 function update_commands(){ 79 global $lang_global, $lang_command, $output ;82 global $lang_global, $lang_command, $output, $user_lvl; 80 83 valid_login(3); 81 84 … … 88 91 <table class=\"lined\" style=\"width: 720px;\"> 89 92 <tr> 90 <t d width=\"20%\" class=\"head\"></td>91 <t d width=\"20%\" class=\"head\">{$lang_command['level0']}</td>92 <t d width=\"20%\" class=\"head\">{$lang_command['level1']}</td>93 <t d width=\"20%\" class=\"head\">{$lang_command['level2']}</td>94 <t d width=\"20%\" class=\"head\">{$lang_command['level3']}</td>93 <th width=\"20%\"></th> 94 <th width=\"20%\">{$lang_command['level0']}</th> 95 <th width=\"20%\">{$lang_command['level1']}</th> 96 <th width=\"20%\">{$lang_command['level2']}</th> 97 <th width=\"20%\">{$lang_command['level3']}</th> 95 98 </tr>"; 96 99 … … 128 131 valid_login(3); 129 132 130 $ mysql = new MySQL;131 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);132 if(isset($_GET['change'])) $change = $ mysql->quote_smart($_GET['change']);133 $sql = new SQL; 134 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 135 if(isset($_GET['change'])) $change = $sql->quote_smart($_GET['change']); 133 136 else redirect("command.php?error=1"); 134 137 … … 142 145 143 146 for ($i=0; $i<count($change); $i++) { 144 $query = $ mysql->query("UPDATE command SET `security` = '".$change[$commands[$i]]."' WHERE name= '$commands[$i]'");147 $query = $sql->query("UPDATE command SET `security` = '".$change[$commands[$i]]."' WHERE name= '$commands[$i]'"); 145 148 } 146 149 147 $ mysql->close();150 $sql->close(); 148 151 redirect("command.php"); 149 152 } -
minimanager/creature.php
r5 r19 51 51 global $lang_global, $lang_creature, $output, $mangos_db, $realm_id, $creature_type; 52 52 53 $ mysql = new MySQL;54 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);55 56 $result = $ mysql->query("SELECT count(*) FROM creature_template");57 $tot_items = $ mysql->result($result, 0);58 $ mysql->close();53 $sql = new SQL; 54 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 55 56 $result = $sql->query("SELECT count(*) FROM creature_template"); 57 $tot_items = $sql->result($result, 0); 58 $sql->close(); 59 59 60 60 $output .= "<center> … … 195 195 } 196 196 197 $ mysql = new MySQL;198 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);199 200 if ($_POST['npcflag'] != '') $npcflag = $ mysql->quote_smart($_POST['npcflag']);201 if ($_POST['type'] != '') $type = $ mysql->quote_smart($_POST['type']);202 if ($_POST['rank'] != '') $rank = $ mysql->quote_smart($_POST['rank']);203 if ($_POST['family'] != '') $family = $ mysql->quote_smart($_POST['family']);204 if ($_POST['entry'] != '') $entry = $ mysql->quote_smart($_POST['entry']);205 if ($_POST['name'] != '') $name = $ mysql->quote_smart($_POST['name']);206 if ($_POST['level'] != '') $level = $ mysql->quote_smart($_POST['level']);207 if ($_POST['health'] != '') $health = $ mysql->quote_smart($_POST['health']);208 if ($_POST['faction'] != '') $faction = $ mysql->quote_smart($_POST['faction']);209 if ($_POST['spell'] != '') $spell = $ mysql->quote_smart($_POST['spell']);210 if ($_POST['lootid'] != '') $lootid = $ mysql->quote_smart($_POST['lootid']);211 if ($_POST['ScriptName'] != '') $ScriptName = $ mysql->quote_smart($_POST['ScriptName']);212 if ($_POST['custom_search'] != '') $custom_search = $ mysql->quote_smart($_POST['custom_search']);197 $sql = new SQL; 198 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 199 200 if ($_POST['npcflag'] != '') $npcflag = $sql->quote_smart($_POST['npcflag']); 201 if ($_POST['type'] != '') $type = $sql->quote_smart($_POST['type']); 202 if ($_POST['rank'] != '') $rank = $sql->quote_smart($_POST['rank']); 203 if ($_POST['family'] != '') $family = $sql->quote_smart($_POST['family']); 204 if ($_POST['entry'] != '') $entry = $sql->quote_smart($_POST['entry']); 205 if ($_POST['name'] != '') $name = $sql->quote_smart($_POST['name']); 206 if ($_POST['level'] != '') $level = $sql->quote_smart($_POST['level']); 207 if ($_POST['health'] != '') $health = $sql->quote_smart($_POST['health']); 208 if ($_POST['faction'] != '') $faction = $sql->quote_smart($_POST['faction']); 209 if ($_POST['spell'] != '') $spell = $sql->quote_smart($_POST['spell']); 210 if ($_POST['lootid'] != '') $lootid = $sql->quote_smart($_POST['lootid']); 211 if ($_POST['ScriptName'] != '') $ScriptName = $sql->quote_smart($_POST['ScriptName']); 212 if ($_POST['custom_search'] != '') $custom_search = $sql->quote_smart($_POST['custom_search']); 213 213 else $custom_search = ""; 214 214 … … 230 230 if($where == "WHERE entry > 0 ") redirect("creature.php?error=1"); 231 231 232 $result = $ mysql->query("SELECT entry,name,maxlevel,maxhealth,rank,npcflag FROM creature_template $where ORDER BY entry LIMIT $sql_search_limit");233 $total_found = $ mysql->num_rows($result);232 $result = $sql->query("SELECT entry,name,maxlevel,maxhealth,rank,npcflag FROM creature_template $where ORDER BY entry LIMIT $sql_search_limit"); 233 $total_found = $sql->num_rows($result); 234 234 235 235 $output .= "<center> … … 243 243 $output .= "<table class=\"lined\"> 244 244 <tr> 245 <t d width=\"10%\" class=\"head\">{$lang_creature['entry']}</td>246 <t d width=\"40%\" class=\"head\">{$lang_creature['name']}</td>247 <t d width=\"10%\" class=\"head\">{$lang_creature['level']}</td>248 <t d width=\"10%\" class=\"head\">{$lang_creature['health']}</td>249 <t d width=\"10%\" class=\"head\">{$lang_creature['rank']}</td>250 <t d width=\"20%\" class=\"head\">{$lang_creature['npc_flag']}</td>245 <th width=\"10%\">{$lang_creature['entry']}</th> 246 <th width=\"40%\">{$lang_creature['name']}</th> 247 <th width=\"10%\">{$lang_creature['level']}</th> 248 <th width=\"10%\">{$lang_creature['health']}</th> 249 <th width=\"10%\">{$lang_creature['rank']}</th> 250 <th width=\"20%\">{$lang_creature['npc_flag']}</th> 251 251 </tr>"; 252 252 253 253 for ($i=1; $i<=$total_found; $i++){ 254 $creature = $ mysql->fetch_row($result);254 $creature = $sql->fetch_row($result); 255 255 256 256 $output .= "<tr> … … 265 265 $output .= "</table></center><br />"; 266 266 267 $ mysql->close();267 $sql->close(); 268 268 } 269 269 … … 597 597 598 598 <td>".makeinfocell($lang_creature['class'],$lang_creature['class_desc'])."</td> 599 <td colspan=\"2\"><select name=\"class\">599 <td><select name=\"class\"> 600 600 <option value=\"0\">0 - {$lang_creature['none']}</option> 601 601 <option value=\"1\">1 - {$lang_id_tab['warrior']}</option> … … 611 611 612 612 <td>".makeinfocell($lang_creature['race'],$lang_creature['race_desc'])."</td> 613 <td colspan=\"2\"><select name=\"race\">613 <td><select name=\"race\"> 614 614 <option value=\"0\">0 - {$lang_creature['none']}</option> 615 615 <option value=\"1\">1 - {$lang_id_tab['human']}</option> … … 623 623 <option value=\"10\">10 - {$lang_id_tab['bloodelf']}</option> 624 624 <option value=\"11\">11 - {$lang_id_tab['draenei']}</option> 625 </select></td> 625 </select></td> 626 627 <td>".makeinfocell($lang_creature['RacialLeader'],$lang_creature['RacialLeader_desc'])."</td> 628 <td><input type=\"checkbox\" name=\"RacialLeader\" value=\"1\" /></td> 626 629 </tr> 627 630 <tr> … … 681 684 if (!isset($_GET['entry'])) redirect("creature.php?error=1"); 682 685 683 $ mysql = new MySQL;684 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);685 686 $entry = $ mysql->quote_smart($_GET['entry']);687 $result = $ mysql->query("SELECT * FROM creature_template WHERE entry = '$entry'");688 689 if ($mob = $ mysql->fetch_assoc($result)){686 $sql = new SQL; 687 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 688 689 $entry = $sql->quote_smart($_GET['entry']); 690 $result = $sql->query("SELECT * FROM creature_template WHERE entry = '$entry'"); 691 692 if ($mob = $sql->fetch_assoc($result)){ 690 693 691 694 $output .= "<script type=\"text/javascript\" src=\"js/tab.js\"></script> … … 935 938 unset($family); 936 939 937 $result1 = $ mysql->query("SELECT COUNT(*) FROM creature WHERE id = '{$mob['entry']}'");938 $output .= "<tr><td colspan=\"6\">{$lang_creature['creature_swapned']} : ".$ mysql->result($result1, 0)." {$lang_creature['times']}.</td></tr>940 $result1 = $sql->query("SELECT COUNT(*) FROM creature WHERE id = '{$mob['entry']}'"); 941 $output .= "<tr><td colspan=\"6\">{$lang_creature['creature_swapned']} : ".$sql->result($result1, 0)." {$lang_creature['times']}.</td></tr> 939 942 940 943 </table> … … 1095 1098 1096 1099 $output .= "<td>".makeinfocell($lang_creature['class'],$lang_creature['class_desc'])."</td> 1097 <td colspan=\"2\"><select name=\"class\">1100 <td><select name=\"class\"> 1098 1101 <option value=\"0\" {$class[0]}>0 - {$lang_creature['none']}</option> 1099 1102 <option value=\"1\" {$class[1]}>1 - {$lang_id_tab['warrior']}</option> … … 1112 1115 $race[$mob['race']] = " selected=\"selected\" "; 1113 1116 1114 $output .= "<td>".makeinfocell($lang_creature['race'],$lang_creature['race_desc'])."</td>1115 <td colspan=\"2\"><select name=\"race\">1117 $output .= "<td>".makeinfocell($lang_creature['race'],$lang_creature['race_desc'])."</td> 1118 <td><select name=\"race\"> 1116 1119 <option value=\"0\" {$race[0]}>0 - {$lang_creature['none']}</option> 1117 1120 <option value=\"1\" {$race[1]}>1 - {$lang_id_tab['human']}</option> … … 1125 1128 <option value=\"10\" {$race[10]}>10 - {$lang_id_tab['bloodelf']}</option> 1126 1129 <option value=\"11\" {$race[11]}>11 - {$lang_id_tab['draenei']}</option> 1127 </select></td> 1130 </select></td>"; 1131 1132 if ($mob['RacialLeader']) $RacialLeader = "checked"; 1133 else $RacialLeader = ""; 1134 1135 $output .= "<td>".makeinfocell($lang_creature['RacialLeader'],$lang_creature['RacialLeader_desc'])."</td> 1136 <td><input type=\"checkbox\" name=\"RacialLeader\" value=\"1\" $RacialLeader /></td> 1128 1137 </tr> 1129 1138 <tr> … … 1176 1185 $row_flag = 0; 1177 1186 $output .= "<table class=\"hidden\" align=\"center\"><tr>"; 1178 $result1 = $ mysql->query("SELECT item,ChanceOrRef,QuestChanceOrGroup,mincount,maxcount,quest_freeforall FROM creature_loot_template WHERE entry = {$mob['lootid']} ORDER BY ChanceOrRef DESC");1179 while ($item = $ mysql->fetch_row($result1)){1187 $result1 = $sql->query("SELECT item,ChanceOrRef,QuestChanceOrGroup,mincount,maxcount,quest_freeforall FROM creature_loot_template WHERE entry = {$mob['lootid']} ORDER BY ChanceOrRef DESC"); 1188 while ($item = $sql->fetch_row($result1)){ 1180 1189 $cel_counter++; 1181 1190 $tooltip = get_item_name($item[0])." ($item[0])<br />{$lang_creature['drop_chance']}: $item[1]%<br />{$lang_creature['quest_drop_chance']}: $item[2]%<br />{$lang_creature['drop_chance']}: $item[3]-$item[4]<br />{$lang_creature['quest_freeforall']}: $item[5]"; … … 1220 1229 <tr class=\"large_bold\"><td colspan=\"2\" class=\"hidden\" align=\"left\">{$lang_creature['start_quests']}:</td></tr>"; 1221 1230 1222 $result1 = $ mysql->query("SELECT quest FROM creature_questrelation WHERE id = {$mob['entry']}");1223 while ($quest = $ mysql->fetch_row($result1)){1224 $query1 = $ mysql->query("SELECT QuestLevel,Title FROM quest_template WHERE entry ='$quest[0]'");1225 $quest_templ = $ mysql->fetch_row($query1);1231 $result1 = $sql->query("SELECT quest FROM creature_questrelation WHERE id = {$mob['entry']}"); 1232 while ($quest = $sql->fetch_row($result1)){ 1233 $query1 = $sql->query("SELECT QuestLevel,Title FROM quest_template WHERE entry ='$quest[0]'"); 1234 $quest_templ = $sql->fetch_row($query1); 1226 1235 1227 1236 $output .= "<tr><td width=\"5%\"><input type=\"checkbox\" name=\"del_questrelation[]\" value=\"$quest[0]\" /></td> … … 1235 1244 <tr class=\"large_bold\"><td colspan=\"2\" class=\"hidden\" align=\"left\">{$lang_creature['ends_quests']}:</td></tr>"; 1236 1245 1237 $result1 = $ mysql->query("SELECT quest FROM creature_involvedrelation WHERE id = {$mob['entry']}");1238 while ($quest = $ mysql->fetch_row($result1)){1239 $query1 = $ mysql->query("SELECT QuestLevel,Title FROM quest_template WHERE entry ='$quest[0]'");1240 $quest_templ = $ mysql->fetch_row($query1);1246 $result1 = $sql->query("SELECT quest FROM creature_involvedrelation WHERE id = {$mob['entry']}"); 1247 while ($quest = $sql->fetch_row($result1)){ 1248 $query1 = $sql->query("SELECT QuestLevel,Title FROM quest_template WHERE entry ='$quest[0]'"); 1249 $quest_templ = $sql->fetch_row($query1); 1241 1250 1242 1251 $output .= "<tr><td width=\"5%\"><input type=\"checkbox\" name=\"del_involvedrelation[]\" value=\"$quest[0]\" /></td> … … 1261 1270 $row_flag = 0; 1262 1271 $output .= "<table class=\"hidden\" align=\"center\"><tr>"; 1263 $result1 = $ mysql->query("SELECT item, maxcount, incrtime FROM npc_vendor WHERE entry = {$mob['entry']}");1264 while ($item = $ mysql->fetch_row($result1)){1272 $result1 = $sql->query("SELECT item, maxcount, incrtime FROM npc_vendor WHERE entry = {$mob['entry']}"); 1273 while ($item = $sql->fetch_row($result1)){ 1265 1274 $cel_counter++; 1266 1275 if (!$item[1]) $count = "{$lang_creature['unlimited']}"; … … 1303 1312 $row_flag = 0; 1304 1313 $output .= "<table class=\"hidden\" align=\"center\"><tr>"; 1305 $result1 = $ mysql->query("SELECT spell, spellcost, reqskill, reqskillvalue, reqlevel FROM npc_trainer WHERE entry = {$mob['entry']} ORDER BY reqlevel");1306 while ($spell = $ mysql->fetch_row($result1)){1314 $result1 = $sql->query("SELECT spell, spellcost, reqskill, reqskillvalue, reqlevel FROM npc_trainer WHERE entry = {$mob['entry']} ORDER BY reqlevel"); 1315 while ($spell = $sql->fetch_row($result1)){ 1307 1316 $cel_counter++; 1308 1317 $tooltip = "{$lang_creature['spell_id']} : $spell[0]<br />{$lang_creature['cost']} : $spell[1](c)<br />{$lang_creature['req_skill']} : $spell[2]<br />{$lang_creature['req_skill_lvl']} : $spell[3]<br />{$lang_creature['req_level']} $spell[4]"; … … 1350 1359 $row_flag = 0; 1351 1360 $output .= "<table class=\"hidden\" align=\"center\"><tr>"; 1352 $result1 = $ mysql->query("SELECT item,ChanceOrRef,QuestChanceOrGroup,mincount,maxcount,quest_freeforall FROM skinning_loot_template WHERE entry = {$mob['skinloot']} ORDER BY ChanceOrRef DESC");1353 while ($item = $ mysql->fetch_row($result1)){1361 $result1 = $sql->query("SELECT item,ChanceOrRef,QuestChanceOrGroup,mincount,maxcount,quest_freeforall FROM skinning_loot_template WHERE entry = {$mob['skinloot']} ORDER BY ChanceOrRef DESC"); 1362 while ($item = $sql->fetch_row($result1)){ 1354 1363 $cel_counter++; 1355 1364 $tooltip = get_item_name($item[0])." ($item[0])<br />{$lang_creature['drop_chance']}: $item[1]%<br />{$lang_creature['quest_drop_chance']}: $item[2]%<br />{$lang_creature['drop_chance']}: $item[3]-$item[4]<br />{$lang_creature['quest_freeforall']}: $item[5]"; … … 1399 1408 $row_flag = 0; 1400 1409 $output .= "<table class=\"hidden\" align=\"center\"><tr>"; 1401 $result1 = $ mysql->query("SELECT item,ChanceOrRef,QuestChanceOrGroup,mincount,maxcount,quest_freeforall FROM pickpocketing_loot_template WHERE entry = {$mob['pickpocketloot']} ORDER BY ChanceOrRef DESC");1402 while ($item = $ mysql->fetch_row($result1)){1410 $result1 = $sql->query("SELECT item,ChanceOrRef,QuestChanceOrGroup,mincount,maxcount,quest_freeforall FROM pickpocketing_loot_template WHERE entry = {$mob['pickpocketloot']} ORDER BY ChanceOrRef DESC"); 1411 while ($item = $sql->fetch_row($result1)){ 1403 1412 $cel_counter++; 1404 1413 $tooltip = get_item_name($item[0])." ($item[0])<br />{$lang_creature['drop_chance']}: $item[1]%<br />{$lang_creature['quest_drop_chance']}: $item[2]%<br />{$lang_creature['drop_chance']}: $item[3]-$item[4]<br />{$lang_creature['quest_freeforall']}: $item[5]"; … … 1455 1464 </table></center>"; 1456 1465 1457 $ mysql->close();1466 $sql->close(); 1458 1467 } else { 1459 $ mysql->close();1468 $sql->close(); 1460 1469 error($lang_creature['item_not_found']); 1461 1470 exit(); … … 1473 1482 if (!isset($_POST['entry']) || $_POST['entry'] === '') redirect("creature.php?error=1"); 1474 1483 1475 $ mysql = new MySQL;1476 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);1477 1478 $entry = $ mysql->quote_smart($_POST['entry']);1479 if (isset($_POST['modelid_m']) && $_POST['modelid_m'] != '') $modelid_m = $ mysql->quote_smart($_POST['modelid_m']);1484 $sql = new SQL; 1485 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 1486 1487 $entry = $sql->quote_smart($_POST['entry']); 1488 if (isset($_POST['modelid_m']) && $_POST['modelid_m'] != '') $modelid_m = $sql->quote_smart($_POST['modelid_m']); 1480 1489 else $modelid_m = 0; 1481 if (isset($_POST['modelid_f']) && $_POST['modelid_f'] != '') $modelid_f = $ mysql->quote_smart($_POST['modelid_f']);1490 if (isset($_POST['modelid_f']) && $_POST['modelid_f'] != '') $modelid_f = $sql->quote_smart($_POST['modelid_f']); 1482 1491 else $modelid_f = 0; 1483 if (isset($_POST['name']) && $_POST['name'] != '') $name = $ mysql->quote_smart($_POST['name']);1492 if (isset($_POST['name']) && $_POST['name'] != '') $name = $sql->quote_smart($_POST['name']); 1484 1493 else $name = ""; 1485 if (isset($_POST['subname']) && $_POST['subname'] != '') $subname = $ mysql->quote_smart($_POST['subname']);1494 if (isset($_POST['subname']) && $_POST['subname'] != '') $subname = $sql->quote_smart($_POST['subname']); 1486 1495 else $subname = ""; 1487 if (isset($_POST['minlevel']) && $_POST['minlevel'] != '') $minlevel = $ mysql->quote_smart($_POST['minlevel']);1496 if (isset($_POST['minlevel']) && $_POST['minlevel'] != '') $minlevel = $sql->quote_smart($_POST['minlevel']); 1488 1497 else $minlevel = 0; 1489 if (isset($_POST['maxlevel']) && $_POST['maxlevel'] != '') $maxlevel = $ mysql->quote_smart($_POST['maxlevel']);1498 if (isset($_POST['maxlevel']) && $_POST['maxlevel'] != '') $maxlevel = $sql->quote_smart($_POST['maxlevel']); 1490 1499 else $maxlevel = 0; 1491 if (isset($_POST['minhealth']) && $_POST['minhealth'] != '') $minhealth = $ mysql->quote_smart($_POST['minhealth']);1500 if (isset($_POST['minhealth']) && $_POST['minhealth'] != '') $minhealth = $sql->quote_smart($_POST['minhealth']); 1492 1501 else $minhealth = 0; 1493 if (isset($_POST['maxhealth']) && $_POST['maxhealth'] != '') $maxhealth = $ mysql->quote_smart($_POST['maxhealth']);1502 if (isset($_POST['maxhealth']) && $_POST['maxhealth'] != '') $maxhealth = $sql->quote_smart($_POST['maxhealth']); 1494 1503 else $maxhealth = 0; 1495 if (isset($_POST['minmana']) && $_POST['minmana'] != '') $minmana = $ mysql->quote_smart($_POST['minmana']);1504 if (isset($_POST['minmana']) && $_POST['minmana'] != '') $minmana = $sql->quote_smart($_POST['minmana']); 1496 1505 else $minmana = 0; 1497 if (isset($_POST['maxmana']) && $_POST['maxmana'] != '') $maxmana = $ mysql->quote_smart($_POST['maxmana']);1506 if (isset($_POST['maxmana']) && $_POST['maxmana'] != '') $maxmana = $sql->quote_smart($_POST['maxmana']); 1498 1507 else $maxmana = 0; 1499 if (isset($_POST['armor']) && $_POST['armor'] != '') $armor = $ mysql->quote_smart($_POST['armor']);1508 if (isset($_POST['armor']) && $_POST['armor'] != '') $armor = $sql->quote_smart($_POST['armor']); 1500 1509 else $armor = 0; 1501 if (isset($_POST['faction']) && $_POST['faction'] != '') $faction = $ mysql->quote_smart($_POST['faction']);1510 if (isset($_POST['faction']) && $_POST['faction'] != '') $faction = $sql->quote_smart($_POST['faction']); 1502 1511 else $faction = 0; 1503 if (isset($_POST['npcflag'])) $npcflag = $ mysql->quote_smart($_POST['npcflag']);1512 if (isset($_POST['npcflag'])) $npcflag = $sql->quote_smart($_POST['npcflag']); 1504 1513 else $npcflag = 0; 1505 if (isset($_POST['speed']) && $_POST['speed'] != '') $speed = $ mysql->quote_smart($_POST['speed']);1514 if (isset($_POST['speed']) && $_POST['speed'] != '') $speed = $sql->quote_smart($_POST['speed']); 1506 1515 else $speed = 0; 1507 if (isset($_POST['rank']) && $_POST['rank'] != '') $rank = $ mysql->quote_smart($_POST['rank']);1516 if (isset($_POST['rank']) && $_POST['rank'] != '') $rank = $sql->quote_smart($_POST['rank']); 1508 1517 else $rank = 0; 1509 if (isset($_POST['mindmg']) && $_POST['mindmg'] != '') $mindmg = $ mysql->quote_smart($_POST['mindmg']);1518 if (isset($_POST['mindmg']) && $_POST['mindmg'] != '') $mindmg = $sql->quote_smart($_POST['mindmg']); 1510 1519 else $mindmg = 0; 1511 if (isset($_POST['maxdmg']) && $_POST['maxdmg'] != '') $maxdmg = $ mysql->quote_smart($_POST['maxdmg']);1520 if (isset($_POST['maxdmg']) && $_POST['maxdmg'] != '') $maxdmg = $sql->quote_smart($_POST['maxdmg']); 1512 1521 else $maxdmg = 0; 1513 if (isset($_POST['attackpower']) && $_POST['attackpower'] != '') $attackpower = $ mysql->quote_smart($_POST['attackpower']);1522 if (isset($_POST['attackpower']) && $_POST['attackpower'] != '') $attackpower = $sql->quote_smart($_POST['attackpower']); 1514 1523 else $attackpower = 0; 1515 if (isset($_POST['baseattacktime']) && $_POST['baseattacktime'] != '') $baseattacktime = $ mysql->quote_smart($_POST['baseattacktime']);1524 if (isset($_POST['baseattacktime']) && $_POST['baseattacktime'] != '') $baseattacktime = $sql->quote_smart($_POST['baseattacktime']); 1516 1525 else $baseattacktime = 0; 1517 if (isset($_POST['rangeattacktime']) && $_POST['rangeattacktime'] != '') $rangeattacktime = $ mysql->quote_smart($_POST['rangeattacktime']);1526 if (isset($_POST['rangeattacktime']) && $_POST['rangeattacktime'] != '') $rangeattacktime = $sql->quote_smart($_POST['rangeattacktime']); 1518 1527 else $rangeattacktime = 0; 1519 if (isset($_POST['flags']) && $_POST['flags'] != '') $flags = $ mysql->quote_smart($_POST['flags']);1528 if (isset($_POST['flags']) && $_POST['flags'] != '') $flags = $sql->quote_smart($_POST['flags']); 1520 1529 else $flags = 0; 1521 if (isset($_POST['dynamicflags']) && $_POST['dynamicflags'] != '') $dynamicflags = $ mysql->quote_smart($_POST['dynamicflags']);1530 if (isset($_POST['dynamicflags']) && $_POST['dynamicflags'] != '') $dynamicflags = $sql->quote_smart($_POST['dynamicflags']); 1522 1531 else $dynamicflags = 0; 1523 if (isset($_POST['size']) && $_POST['size'] != '') $size = $ mysql->quote_smart($_POST['size']);1532 if (isset($_POST['size']) && $_POST['size'] != '') $size = $sql->quote_smart($_POST['size']); 1524 1533 else $size = 0; 1525 if (isset($_POST['family']) && $_POST['family'] != '') $family = $ mysql->quote_smart($_POST['family']);1534 if (isset($_POST['family']) && $_POST['family'] != '') $family = $sql->quote_smart($_POST['family']); 1526 1535 else $family = 0; 1527 if (isset($_POST['bounding_radius']) && $_POST['bounding_radius'] != '') $bounding_radius = $ mysql->quote_smart($_POST['bounding_radius']);1536 if (isset($_POST['bounding_radius']) && $_POST['bounding_radius'] != '') $bounding_radius = $sql->quote_smart($_POST['bounding_radius']); 1528 1537 else $bounding_radius = 0; 1529 if (isset($_POST['trainer_type']) && $_POST['trainer_type'] != '') $trainer_type = $ mysql->quote_smart($_POST['trainer_type']);1538 if (isset($_POST['trainer_type']) && $_POST['trainer_type'] != '') $trainer_type = $sql->quote_smart($_POST['trainer_type']); 1530 1539 else $trainer_type = 0; 1531 if (isset($_POST['trainer_spell']) && $_POST['trainer_spell'] != '') $trainer_spell = $ mysql->quote_smart($_POST['trainer_spell']);1540 if (isset($_POST['trainer_spell']) && $_POST['trainer_spell'] != '') $trainer_spell = $sql->quote_smart($_POST['trainer_spell']); 1532 1541 else $trainer_spell = 0; 1533 if (isset($_POST['class']) && $_POST['class'] != '') $class = $ mysql->quote_smart($_POST['class']);1542 if (isset($_POST['class']) && $_POST['class'] != '') $class = $sql->quote_smart($_POST['class']); 1534 1543 else $class = 0; 1535 if (isset($_POST['race']) && $_POST['race'] != '') $race = $ mysql->quote_smart($_POST['race']);1544 if (isset($_POST['race']) && $_POST['race'] != '') $race = $sql->quote_smart($_POST['race']); 1536 1545 else $race = 0; 1537 if (isset($_POST['minrangedmg']) && $_POST['minrangedmg'] != '') $minrangedmg = $ mysql->quote_smart($_POST['minrangedmg']);1546 if (isset($_POST['minrangedmg']) && $_POST['minrangedmg'] != '') $minrangedmg = $sql->quote_smart($_POST['minrangedmg']); 1538 1547 else $minrangedmg = 0; 1539 if (isset($_POST['maxrangedmg']) && $_POST['maxrangedmg'] != '') $maxrangedmg = $ mysql->quote_smart($_POST['maxrangedmg']);1548 if (isset($_POST['maxrangedmg']) && $_POST['maxrangedmg'] != '') $maxrangedmg = $sql->quote_smart($_POST['maxrangedmg']); 1540 1549 else $maxrangedmg = 0; 1541 if (isset($_POST['rangedattackpower']) && $_POST['rangedattackpower'] != '') $rangedattackpower = $ mysql->quote_smart($_POST['rangedattackpower']);1550 if (isset($_POST['rangedattackpower']) && $_POST['rangedattackpower'] != '') $rangedattackpower = $sql->quote_smart($_POST['rangedattackpower']); 1542 1551 else $rangedattackpower = 0; 1543 if (isset($_POST['combat_reach']) && $_POST['combat_reach'] != '') $combat_reach = $ mysql->quote_smart($_POST['combat_reach']);1552 if (isset($_POST['combat_reach']) && $_POST['combat_reach'] != '') $combat_reach = $sql->quote_smart($_POST['combat_reach']); 1544 1553 else $combat_reach = 0; 1545 if (isset($_POST['type']) && $_POST['type'] != '') $type = $ mysql->quote_smart($_POST['type']);1554 if (isset($_POST['type']) && $_POST['type'] != '') $type = $sql->quote_smart($_POST['type']); 1546 1555 else $type = 0; 1547 if (isset($_POST['civilian']) && $_POST['civilian'] != '') $civilian = $ mysql->quote_smart($_POST['civilian']);1556 if (isset($_POST['civilian']) && $_POST['civilian'] != '') $civilian = $sql->quote_smart($_POST['civilian']); 1548 1557 else $civilian = 0; 1549 if (isset($_POST['flag1']) && $_POST['flag1'] != '') $flag1 = $ mysql->quote_smart($_POST['flag1']);1558 if (isset($_POST['flag1']) && $_POST['flag1'] != '') $flag1 = $sql->quote_smart($_POST['flag1']); 1550 1559 else $flag1 = 0; 1551 if (isset($_POST['equipmodel1']) && $_POST['equipmodel1'] != '') $equipmodel1 = $ mysql->quote_smart($_POST['equipmodel1']);1560 if (isset($_POST['equipmodel1']) && $_POST['equipmodel1'] != '') $equipmodel1 = $sql->quote_smart($_POST['equipmodel1']); 1552 1561 else $equipmodel1 = 0; 1553 if (isset($_POST['equipmodel2']) && $_POST['equipmodel2'] != '') $equipmodel2 = $ mysql->quote_smart($_POST['equipmodel2']);1562 if (isset($_POST['equipmodel2']) && $_POST['equipmodel2'] != '') $equipmodel2 = $sql->quote_smart($_POST['equipmodel2']); 1554 1563 else $equipmodel2 = 0; 1555 if (isset($_POST['equipmodel3']) && $_POST['equipmodel3'] != '') $equipmodel3 = $ mysql->quote_smart($_POST['equipmodel3']);1564 if (isset($_POST['equipmodel3']) && $_POST['equipmodel3'] != '') $equipmodel3 = $sql->quote_smart($_POST['equipmodel3']); 1556 1565 else $equipmodel3 = 0; 1557 if (isset($_POST['equipinfo1']) && $_POST['equipinfo1'] != '') $equipinfo1 = $ mysql->quote_smart($_POST['equipinfo1']);1566 if (isset($_POST['equipinfo1']) && $_POST['equipinfo1'] != '') $equipinfo1 = $sql->quote_smart($_POST['equipinfo1']); 1558 1567 else $equipinfo1 = 0; 1559 if (isset($_POST['equipinfo2']) && $_POST['equipinfo2'] != '') $equipinfo2 = $ mysql->quote_smart($_POST['equipinfo2']);1568 if (isset($_POST['equipinfo2']) && $_POST['equipinfo2'] != '') $equipinfo2 = $sql->quote_smart($_POST['equipinfo2']); 1560 1569 else $equipinfo2 = 0; 1561 if (isset($_POST['equipinfo3']) && $_POST['equipinfo3'] != '') $equipinfo3 = $ mysql->quote_smart($_POST['equipinfo3']);1570 if (isset($_POST['equipinfo3']) && $_POST['equipinfo3'] != '') $equipinfo3 = $sql->quote_smart($_POST['equipinfo3']); 1562 1571 else $equipinfo3 = 0; 1563 if (isset($_POST['equipslot1']) && $_POST['equipslot1'] != '') $equipslot1 = $ mysql->quote_smart($_POST['equipslot1']);1572 if (isset($_POST['equipslot1']) && $_POST['equipslot1'] != '') $equipslot1 = $sql->quote_smart($_POST['equipslot1']); 1564 1573 else $equipslot1 = 0; 1565 if (isset($_POST['equipslot2']) && $_POST['equipslot2'] != '') $equipslot2 = $ mysql->quote_smart($_POST['equipslot2']);1574 if (isset($_POST['equipslot2']) && $_POST['equipslot2'] != '') $equipslot2 = $sql->quote_smart($_POST['equipslot2']); 1566 1575 else $equipslot2 = 0; 1567 if (isset($_POST['equipslot3']) && $_POST['equipslot3'] != '') $equipslot3 = $ mysql->quote_smart($_POST['equipslot3']);1576 if (isset($_POST['equipslot3']) && $_POST['equipslot3'] != '') $equipslot3 = $sql->quote_smart($_POST['equipslot3']); 1568 1577 else $equipslot3 = 0; 1569 if (isset($_POST['lootid']) && $_POST['lootid'] != '') $lootid = $ mysql->quote_smart($_POST['lootid']);1578 if (isset($_POST['lootid']) && $_POST['lootid'] != '') $lootid = $sql->quote_smart($_POST['lootid']); 1570 1579 else $lootid = 0; 1571 if (isset($_POST['pickpocketloot']) && $_POST['pickpocketloot'] != '') $pickpocketloot = $ mysql->quote_smart($_POST['pickpocketloot']);1580 if (isset($_POST['pickpocketloot']) && $_POST['pickpocketloot'] != '') $pickpocketloot = $sql->quote_smart($_POST['pickpocketloot']); 1572 1581 else $pickpocketloot = 0; 1573 if (isset($_POST['skinloot']) && $_POST['skinloot'] != '') $skinloot = $ mysql->quote_smart($_POST['skinloot']);1582 if (isset($_POST['skinloot']) && $_POST['skinloot'] != '') $skinloot = $sql->quote_smart($_POST['skinloot']); 1574 1583 else $skinloot = 0; 1575 if (isset($_POST['resistance1']) && $_POST['resistance1'] != '') $resistance1 = $ mysql->quote_smart($_POST['resistance1']);1584 if (isset($_POST['resistance1']) && $_POST['resistance1'] != '') $resistance1 = $sql->quote_smart($_POST['resistance1']); 1576 1585 else $resistance1 = 0; 1577 if (isset($_POST['resistance2']) && $_POST['resistance2'] != '') $resistance2 = $ mysql->quote_smart($_POST['resistance2']);1586 if (isset($_POST['resistance2']) && $_POST['resistance2'] != '') $resistance2 = $sql->quote_smart($_POST['resistance2']); 1578 1587 else $resistance2 = 0; 1579 if (isset($_POST['resistance3']) && $_POST['resistance3'] != '') $resistance3 = $ mysql->quote_smart($_POST['resistance3']);1588 if (isset($_POST['resistance3']) && $_POST['resistance3'] != '') $resistance3 = $sql->quote_smart($_POST['resistance3']); 1580 1589 else $resistance3 = 0; 1581 if (isset($_POST['resistance4']) && $_POST['resistance4'] != '') $resistance4 = $ mysql->quote_smart($_POST['resistance4']);1590 if (isset($_POST['resistance4']) && $_POST['resistance4'] != '') $resistance4 = $sql->quote_smart($_POST['resistance4']); 1582 1591 else $resistance4 = 0; 1583 if (isset($_POST['resistance5']) && $_POST['resistance5'] != '') $resistance5 = $ mysql->quote_smart($_POST['resistance5']);1592 if (isset($_POST['resistance5']) && $_POST['resistance5'] != '') $resistance5 = $sql->quote_smart($_POST['resistance5']); 1584 1593 else $resistance5 = 0; 1585 if (isset($_POST['resistance6']) && $_POST['resistance6'] != '') $resistance6 = $ mysql->quote_smart($_POST['resistance6']);1594 if (isset($_POST['resistance6']) && $_POST['resistance6'] != '') $resistance6 = $sql->quote_smart($_POST['resistance6']); 1586 1595 else $resistance6 = 0; 1587 if (isset($_POST['spell1']) && $_POST['spell1'] != '') $spell1 = $ mysql->quote_smart($_POST['spell1']);1596 if (isset($_POST['spell1']) && $_POST['spell1'] != '') $spell1 = $sql->quote_smart($_POST['spell1']); 1588 1597 else $spell1 = 0; 1589 if (isset($_POST['spell2']) && $_POST['spell2'] != '') $spell2 = $ mysql->quote_smart($_POST['spell2']);1598 if (isset($_POST['spell2']) && $_POST['spell2'] != '') $spell2 = $sql->quote_smart($_POST['spell2']); 1590 1599 else $spell2 = 0; 1591 if (isset($_POST['spell3']) && $_POST['spell3'] != '') $spell3 = $ mysql->quote_smart($_POST['spell3']);1600 if (isset($_POST['spell3']) && $_POST['spell3'] != '') $spell3 = $sql->quote_smart($_POST['spell3']); 1592 1601 else $spell3 = 0; 1593 if (isset($_POST['spell4']) && $_POST['spell4'] != '') $spell4 = $ mysql->quote_smart($_POST['spell4']);1602 if (isset($_POST['spell4']) && $_POST['spell4'] != '') $spell4 = $sql->quote_smart($_POST['spell4']); 1594 1603 else $spell4 = 0; 1595 if (isset($_POST['mingold']) && $_POST['mingold'] != '') $mingold = $ mysql->quote_smart($_POST['mingold']);1604 if (isset($_POST['mingold']) && $_POST['mingold'] != '') $mingold = $sql->quote_smart($_POST['mingold']); 1596 1605 else $mingold = 0; 1597 if (isset($_POST['maxgold']) && $_POST['maxgold'] != '') $maxgold = $ mysql->quote_smart($_POST['maxgold']);1606 if (isset($_POST['maxgold']) && $_POST['maxgold'] != '') $maxgold = $sql->quote_smart($_POST['maxgold']); 1598 1607 else $maxgold = 0; 1599 if (isset($_POST['AIName']) && $_POST['AIName'] != '') $AIName = $ mysql->quote_smart($_POST['AIName']);1608 if (isset($_POST['AIName']) && $_POST['AIName'] != '') $AIName = $sql->quote_smart($_POST['AIName']); 1600 1609 else $AIName = ""; 1601 if (isset($_POST['MovementType']) && $_POST['MovementType'] != '') $MovementType = $ mysql->quote_smart($_POST['MovementType']);1610 if (isset($_POST['MovementType']) && $_POST['MovementType'] != '') $MovementType = $sql->quote_smart($_POST['MovementType']); 1602 1611 else $MovementType = 0; 1603 if (isset($_POST['InhabitType']) && $_POST['InhabitType'] != '') $InhabitType = $mysql->quote_smart($_POST['InhabitType']);1612 if (isset($_POST['InhabitType']) && $_POST['InhabitType'] != '') $InhabitType = $sql->quote_smart($_POST['InhabitType']); 1604 1613 else $InhabitType = 0; 1605 if (isset($_POST['ScriptName']) && $_POST['ScriptName'] != '') $ScriptName = $ mysql->quote_smart($_POST['ScriptName']);1614 if (isset($_POST['ScriptName']) && $_POST['ScriptName'] != '') $ScriptName = $sql->quote_smart($_POST['ScriptName']); 1606 1615 else $ScriptName = ""; 1607 1608 if (isset($_POST['ChanceOrRef']) && $_POST['ChanceOrRef'] != '') $ChanceOrRef = $mysql->quote_smart($_POST['ChanceOrRef']); 1616 if (isset($_POST['RacialLeader']) && $_POST['RacialLeader'] != '') $RacialLeader = $sql->quote_smart($_POST['RacialLeader']); 1617 else $RacialLeader = 0; 1618 1619 if (isset($_POST['ChanceOrRef']) && $_POST['ChanceOrRef'] != '') $ChanceOrRef = $sql->quote_smart($_POST['ChanceOrRef']); 1609 1620 else $ChanceOrRef = 0; 1610 if (isset($_POST['QuestChanceOrGroup']) && $_POST['QuestChanceOrGroup'] != '') $QuestChanceOrGroup = $ mysql->quote_smart($_POST['QuestChanceOrGroup']);1621 if (isset($_POST['QuestChanceOrGroup']) && $_POST['QuestChanceOrGroup'] != '') $QuestChanceOrGroup = $sql->quote_smart($_POST['QuestChanceOrGroup']); 1611 1622 else $QuestChanceOrGroup = 0; 1612 if (isset($_POST['mincount']) && $_POST['mincount'] != '') $mincount = $ mysql->quote_smart($_POST['mincount']);1623 if (isset($_POST['mincount']) && $_POST['mincount'] != '') $mincount = $sql->quote_smart($_POST['mincount']); 1613 1624 else $mincount = 0; 1614 if (isset($_POST['maxcount']) && $_POST['maxcount'] != '') $maxcount = $ mysql->quote_smart($_POST['maxcount']);1625 if (isset($_POST['maxcount']) && $_POST['maxcount'] != '') $maxcount = $sql->quote_smart($_POST['maxcount']); 1615 1626 else $maxcount = 0; 1616 if (isset($_POST['quest_freeforall']) && $_POST['quest_freeforall'] != '') $quest_freeforall = $ mysql->quote_smart($_POST['quest_freeforall']);1627 if (isset($_POST['quest_freeforall']) && $_POST['quest_freeforall'] != '') $quest_freeforall = $sql->quote_smart($_POST['quest_freeforall']); 1617 1628 else $quest_freeforall = 0; 1618 if (isset($_POST['item']) && $_POST['item'] != '') $item = $ mysql->quote_smart($_POST['item']);1629 if (isset($_POST['item']) && $_POST['item'] != '') $item = $sql->quote_smart($_POST['item']); 1619 1630 else $item = 0; 1620 if (isset($_POST['del_loot_items']) && $_POST['del_loot_items'] != '') $del_loot_items = $ mysql->quote_smart($_POST['del_loot_items']);1631 if (isset($_POST['del_loot_items']) && $_POST['del_loot_items'] != '') $del_loot_items = $sql->quote_smart($_POST['del_loot_items']); 1621 1632 else $del_loot_items = NULL; 1622 1633 1623 if (isset($_POST['involvedrelation']) && $_POST['involvedrelation'] != '') $involvedrelation = $ mysql->quote_smart($_POST['involvedrelation']);1634 if (isset($_POST['involvedrelation']) && $_POST['involvedrelation'] != '') $involvedrelation = $sql->quote_smart($_POST['involvedrelation']); 1624 1635 else $involvedrelation = 0; 1625 if (isset($_POST['del_involvedrelation']) && $_POST['del_involvedrelation'] != '') $del_involvedrelation = $ mysql->quote_smart($_POST['del_involvedrelation']);1636 if (isset($_POST['del_involvedrelation']) && $_POST['del_involvedrelation'] != '') $del_involvedrelation = $sql->quote_smart($_POST['del_involvedrelation']); 1626 1637 else $del_involvedrelation = NULL; 1627 if (isset($_POST['questrelation']) && $_POST['questrelation'] != '') $questrelation = $ mysql->quote_smart($_POST['questrelation']);1638 if (isset($_POST['questrelation']) && $_POST['questrelation'] != '') $questrelation = $sql->quote_smart($_POST['questrelation']); 1628 1639 else $questrelation = 0; 1629 if (isset($_POST['del_questrelation']) && $_POST['del_questrelation'] != '') $del_questrelation = $ mysql->quote_smart($_POST['del_questrelation']);1640 if (isset($_POST['del_questrelation']) && $_POST['del_questrelation'] != '') $del_questrelation = $sql->quote_smart($_POST['del_questrelation']); 1630 1641 else $del_questrelation = NULL; 1631 1642 1632 if (isset($_POST['del_vendor_item']) && $_POST['del_vendor_item'] != '') $del_vendor_item = $ mysql->quote_smart($_POST['del_vendor_item']);1643 if (isset($_POST['del_vendor_item']) && $_POST['del_vendor_item'] != '') $del_vendor_item = $sql->quote_smart($_POST['del_vendor_item']); 1633 1644 else $del_vendor_item = NULL; 1634 if (isset($_POST['vendor_item']) && $_POST['vendor_item'] != '') $vendor_item = $ mysql->quote_smart($_POST['vendor_item']);1645 if (isset($_POST['vendor_item']) && $_POST['vendor_item'] != '') $vendor_item = $sql->quote_smart($_POST['vendor_item']); 1635 1646 else $vendor_item = 0; 1636 if (isset($_POST['vendor_maxcount']) && $_POST['vendor_maxcount'] != '') $vendor_maxcount = $ mysql->quote_smart($_POST['vendor_maxcount']);1647 if (isset($_POST['vendor_maxcount']) && $_POST['vendor_maxcount'] != '') $vendor_maxcount = $sql->quote_smart($_POST['vendor_maxcount']); 1637 1648 else $vendor_maxcount = 0; 1638 if (isset($_POST['vendor_incrtime']) && $_POST['vendor_incrtime'] != '') $vendor_incrtime = $ mysql->quote_smart($_POST['vendor_incrtime']);1649 if (isset($_POST['vendor_incrtime']) && $_POST['vendor_incrtime'] != '') $vendor_incrtime = $sql->quote_smart($_POST['vendor_incrtime']); 1639 1650 else $vendor_incrtime = 0; 1640 1651 1641 if (isset($_POST['skin_ChanceOrRef']) && $_POST['skin_ChanceOrRef'] != '') $skin_ChanceOrRef = $ mysql->quote_smart($_POST['skin_ChanceOrRef']);1652 if (isset($_POST['skin_ChanceOrRef']) && $_POST['skin_ChanceOrRef'] != '') $skin_ChanceOrRef = $sql->quote_smart($_POST['skin_ChanceOrRef']); 1642 1653 else $skin_ChanceOrRef = 0; 1643 if (isset($_POST['skin_QuestChanceOrGroup']) && $_POST['skin_QuestChanceOrGroup'] != '') $skin_QuestChanceOrGroup = $ mysql->quote_smart($_POST['skin_QuestChanceOrGroup']);1654 if (isset($_POST['skin_QuestChanceOrGroup']) && $_POST['skin_QuestChanceOrGroup'] != '') $skin_QuestChanceOrGroup = $sql->quote_smart($_POST['skin_QuestChanceOrGroup']); 1644 1655 else $skin_QuestChanceOrGroup = 0; 1645 if (isset($_POST['skin_mincount']) && $_POST['skin_mincount'] != '') $skin_mincount = $ mysql->quote_smart($_POST['skin_mincount']);1656 if (isset($_POST['skin_mincount']) && $_POST['skin_mincount'] != '') $skin_mincount = $sql->quote_smart($_POST['skin_mincount']); 1646 1657 else $skin_mincount = 0; 1647 if (isset($_POST['skin_maxcount']) && $_POST['skin_maxcount'] != '') $skin_maxcount = $ mysql->quote_smart($_POST['skin_maxcount']);1658 if (isset($_POST['skin_maxcount']) && $_POST['skin_maxcount'] != '') $skin_maxcount = $sql->quote_smart($_POST['skin_maxcount']); 1648 1659 else $skin_maxcount = 0; 1649 if (isset($_POST['skin_quest_freeforall']) && $_POST['skin_quest_freeforall'] != '') $skin_quest_freeforall = $ mysql->quote_smart($_POST['skin_quest_freeforall']);1660 if (isset($_POST['skin_quest_freeforall']) && $_POST['skin_quest_freeforall'] != '') $skin_quest_freeforall = $sql->quote_smart($_POST['skin_quest_freeforall']); 1650 1661 else $skin_quest_freeforall = 0; 1651 if (isset($_POST['skin_item']) && $_POST['skin_item'] != '') $skin_item = $ mysql->quote_smart($_POST['skin_item']);1662 if (isset($_POST['skin_item']) && $_POST['skin_item'] != '') $skin_item = $sql->quote_smart($_POST['skin_item']); 1652 1663 else $skin_item = 0; 1653 if (isset($_POST['del_skin_items']) && $_POST['del_skin_items'] != '') $del_skin_items = $ mysql->quote_smart($_POST['del_skin_items']);1664 if (isset($_POST['del_skin_items']) && $_POST['del_skin_items'] != '') $del_skin_items = $sql->quote_smart($_POST['del_skin_items']); 1654 1665 else $del_skin_items = NULL; 1655 1666 1656 if (isset($_POST['pp_ChanceOrRef']) && $_POST['pp_ChanceOrRef'] != '') $pp_ChanceOrRef = $ mysql->quote_smart($_POST['pp_ChanceOrRef']);1667 if (isset($_POST['pp_ChanceOrRef']) && $_POST['pp_ChanceOrRef'] != '') $pp_ChanceOrRef = $sql->quote_smart($_POST['pp_ChanceOrRef']); 1657 1668 else $pp_ChanceOrRef = 0; 1658 if (isset($_POST['pp_QuestChanceOrGroup']) && $_POST['pp_QuestChanceOrGroup'] != '') $pp_QuestChanceOrGroup = $ mysql->quote_smart($_POST['pp_QuestChanceOrGroup']);1669 if (isset($_POST['pp_QuestChanceOrGroup']) && $_POST['pp_QuestChanceOrGroup'] != '') $pp_QuestChanceOrGroup = $sql->quote_smart($_POST['pp_QuestChanceOrGroup']); 1659 1670 else $pp_QuestChanceOrGroup = 0; 1660 if (isset($_POST['pp_mincount']) && $_POST['pp_mincount'] != '') $pp_mincount = $ mysql->quote_smart($_POST['pp_mincount']);1671 if (isset($_POST['pp_mincount']) && $_POST['pp_mincount'] != '') $pp_mincount = $sql->quote_smart($_POST['pp_mincount']); 1661 1672 else $pp_mincount = 0; 1662 if (isset($_POST['pp_maxcount']) && $_POST['pp_maxcount'] != '') $pp_maxcount = $ mysql->quote_smart($_POST['pp_maxcount']);1673 if (isset($_POST['pp_maxcount']) && $_POST['pp_maxcount'] != '') $pp_maxcount = $sql->quote_smart($_POST['pp_maxcount']); 1663 1674 else $pp_maxcount = 0; 1664 if (isset($_POST['pp_quest_freeforall']) && $_POST['pp_quest_freeforall'] != '') $pp_quest_freeforall = $ mysql->quote_smart($_POST['pp_quest_freeforall']);1675 if (isset($_POST['pp_quest_freeforall']) && $_POST['pp_quest_freeforall'] != '') $pp_quest_freeforall = $sql->quote_smart($_POST['pp_quest_freeforall']); 1665 1676 else $pp_quest_freeforall = 0; 1666 if (isset($_POST['pp_item']) && $_POST['pp_item'] != '') $pp_item = $ mysql->quote_smart($_POST['pp_item']);1677 if (isset($_POST['pp_item']) && $_POST['pp_item'] != '') $pp_item = $sql->quote_smart($_POST['pp_item']); 1667 1678 else $pp_item = 0; 1668 if (isset($_POST['del_pp_items']) && $_POST['del_pp_items'] != '') $del_pp_items = $ mysql->quote_smart($_POST['del_pp_items']);1679 if (isset($_POST['del_pp_items']) && $_POST['del_pp_items'] != '') $del_pp_items = $sql->quote_smart($_POST['del_pp_items']); 1669 1680 else $del_pp_items = NULL; 1670 1681 1671 if (isset($_POST['trainer_spell']) && $_POST['trainer_spell'] != '') $trainer_spell = $ mysql->quote_smart($_POST['trainer_spell']);1682 if (isset($_POST['trainer_spell']) && $_POST['trainer_spell'] != '') $trainer_spell = $sql->quote_smart($_POST['trainer_spell']); 1672 1683 else $trainer_spell = 0; 1673 if (isset($_POST['spellcost']) && $_POST['spellcost'] != '') $spellcost = $ mysql->quote_smart($_POST['spellcost']);1684 if (isset($_POST['spellcost']) && $_POST['spellcost'] != '') $spellcost = $sql->quote_smart($_POST['spellcost']); 1674 1685 else $spellcost = 0; 1675 if (isset($_POST['reqskill']) && $_POST['reqskill'] != '') $reqskill = $ mysql->quote_smart($_POST['reqskill']);1686 if (isset($_POST['reqskill']) && $_POST['reqskill'] != '') $reqskill = $sql->quote_smart($_POST['reqskill']); 1676 1687 else $reqskill = 0; 1677 if (isset($_POST['reqskillvalue']) && $_POST['reqskillvalue'] != '') $reqskillvalue = $ mysql->quote_smart($_POST['reqskillvalue']);1688 if (isset($_POST['reqskillvalue']) && $_POST['reqskillvalue'] != '') $reqskillvalue = $sql->quote_smart($_POST['reqskillvalue']); 1678 1689 else $reqskillvalue = 0; 1679 if (isset($_POST['reqlevel']) && $_POST['reqlevel'] != '') $reqlevel = $ mysql->quote_smart($_POST['reqlevel']);1690 if (isset($_POST['reqlevel']) && $_POST['reqlevel'] != '') $reqlevel = $sql->quote_smart($_POST['reqlevel']); 1680 1691 else $reqlevel = 0; 1681 if (isset($_POST['del_trainer_spell']) && $_POST['del_trainer_spell'] != '') $del_trainer_spell = $ mysql->quote_smart($_POST['del_trainer_spell']);1692 if (isset($_POST['del_trainer_spell']) && $_POST['del_trainer_spell'] != '') $del_trainer_spell = $sql->quote_smart($_POST['del_trainer_spell']); 1682 1693 else $del_trainer_spell = NULL; 1683 1694 … … 1703 1714 1704 1715 if ($_POST['opp_type'] == "add_new"){ 1705 $sql = "INSERT INTO creature_template ( entry, modelid_m, modelid_f, name, subname, minlevel,1716 $sql_query = "INSERT INTO creature_template ( entry, modelid_m, modelid_f, name, subname, minlevel, 1706 1717 maxlevel, minhealth, maxhealth, minmana, maxmana, armor, faction, npcflag, speed, rank, mindmg, 1707 1718 maxdmg, attackpower, baseattacktime, rangeattacktime, flags, dynamicflags, size, family, … … 1710 1721 equipinfo3, equipslot1, equipslot2, equipslot3, lootid, pickpocketloot, skinloot, resistance1, 1711 1722 resistance2, resistance3, resistance4, resistance5, resistance6, spell1, spell2, spell3, spell4, 1712 mingold, maxgold, AIName, MovementType, InhabitType, ScriptName) VALUES ( '$entry', '$modelid_m', '$modelid_f', '$name',1723 mingold, maxgold, AIName, MovementType, InhabitType, RacialLeader, ScriptName) VALUES ( '$entry', '$modelid_m', '$modelid_f', '$name', 1713 1724 '$subname', '$minlevel', '$maxlevel', '$minhealth', '$maxhealth', '$minmana', '$maxmana', '$armor', '$faction', '$npcflag', 1714 1725 '$speed', '$rank', '$mindmg', '$maxdmg', '$attackpower', '$baseattacktime', '$rangeattacktime', '$flags', … … 1718 1729 '$equipslot2', '$equipslot3', '$lootid', '$pickpocketloot', '$skinloot', '$resistance1', '$resistance2', 1719 1730 '$resistance3', '$resistance4', '$resistance5', '$resistance6', '$spell1', '$spell2', '$spell3', '$spell4', 1720 '$mingold', '$maxgold', '$AIName', '$MovementType', '$InhabitType', '$ ScriptName' )";1731 '$mingold', '$maxgold', '$AIName', '$MovementType', '$InhabitType', '$RacialLeader', '$ScriptName' )"; 1721 1732 1722 1733 } elseif ($_POST['opp_type'] == "edit"){ 1723 1734 1724 $sql = "UPDATE creature_template SET "; 1725 1726 $result = $mysql->query("SELECT * FROM creature_template WHERE entry = '$entry'"); 1727 if ($mob_templ = $mysql->fetch_assoc($result)){ 1728 if ($mob_templ['modelid_m'] != $modelid_m) $sql .= "modelid_m='$modelid_m',"; 1729 if ($mob_templ['modelid_f'] != $modelid_f) $sql .= "modelid_f='$modelid_f',"; 1730 if ($mob_templ['name'] != $name) $sql .= "name='$name',"; 1731 if ($mob_templ['subname'] != $subname) $sql .= "subname='$subname',"; 1732 if ($mob_templ['minlevel'] != $minlevel) $sql .= "minlevel='$minlevel',"; 1733 if ($mob_templ['maxlevel'] != $maxlevel) $sql .= "maxlevel='$maxlevel',"; 1734 if ($mob_templ['minhealth'] != $minhealth) $sql .= "minhealth='$minhealth',"; 1735 if ($mob_templ['maxhealth'] != $maxhealth) $sql .= "maxhealth='$maxhealth',"; 1736 if ($mob_templ['minmana'] != $minmana) $sql .= "minmana='$minmana',"; 1737 if ($mob_templ['maxmana'] != $maxmana) $sql .= "maxmana='$maxmana',"; 1738 if ($mob_templ['armor'] != $armor) $sql .= "armor='$armor',"; 1739 if ($mob_templ['faction'] != $faction) $sql .= "faction='$faction',"; 1740 if ($mob_templ['npcflag'] != $npcflag) $sql .= "npcflag='$npcflag',"; 1741 if ($mob_templ['speed'] != $speed) $sql .= "speed='$speed',"; 1742 if ($mob_templ['rank'] != $rank) $sql .= "rank='$rank',"; 1743 if ($mob_templ['mindmg'] != $mindmg) $sql .= "mindmg='$mindmg',"; 1744 if ($mob_templ['maxdmg'] != $maxdmg) $sql .= "maxdmg='$maxdmg',"; 1745 if ($mob_templ['attackpower'] != $attackpower) $sql .= "attackpower='$attackpower',"; 1746 if ($mob_templ['baseattacktime'] != $baseattacktime) $sql .= "baseattacktime='$baseattacktime',"; 1747 if ($mob_templ['rangeattacktime'] != $rangeattacktime) $sql .= "rangeattacktime='$rangeattacktime',"; 1748 if ($mob_templ['flags'] != $flags) $sql .= "flags='$flags',"; 1749 if ($mob_templ['dynamicflags'] != $dynamicflags) $sql .= "dynamicflags='$dynamicflags',"; 1750 if ($mob_templ['size'] != $size) $sql .= "size='$size',"; 1751 if ($mob_templ['family'] != $family) $sql .= "family='$family',"; 1752 if ($mob_templ['bounding_radius'] != $bounding_radius) $sql .= "bounding_radius='$bounding_radius',"; 1753 if ($mob_templ['trainer_type'] != $trainer_type) $sql .= "trainer_type='$trainer_type',"; 1754 if ($mob_templ['trainer_spell'] != $trainer_spell) $sql .= "trainer_spell='$trainer_spell',"; 1755 if ($mob_templ['class'] != $class) $sql .= "class='$class',"; 1756 if ($mob_templ['race'] != $race) $sql .= "race='$race',"; 1757 if ($mob_templ['minrangedmg'] != $minrangedmg) $sql .= "minrangedmg='$minrangedmg',"; 1758 if ($mob_templ['maxrangedmg'] != $maxrangedmg) $sql .= "maxrangedmg='$maxrangedmg',"; 1759 if ($mob_templ['rangedattackpower'] != $rangedattackpower) $sql .= "rangedattackpower='$rangedattackpower',"; 1760 if ($mob_templ['combat_reach'] != $combat_reach) $sql .= "combat_reach='$combat_reach',"; 1761 if ($mob_templ['type'] != $type) $sql .= "type='$type',"; 1762 if ($mob_templ['civilian'] != $civilian) $sql .= "civilian='$civilian',"; 1763 if ($mob_templ['flag1'] != $flag1) $sql .= "flag1='$flag1',"; 1764 if ($mob_templ['equipmodel1'] != $equipmodel1) $sql .= "equipmodel1='$equipmodel1',"; 1765 if ($mob_templ['equipmodel2'] != $equipmodel2) $sql .= "equipmodel2='$equipmodel2',"; 1766 if ($mob_templ['equipmodel3'] != $equipmodel3) $sql .= "equipmodel3='$equipmodel3',"; 1767 if ($mob_templ['equipinfo1'] != $equipinfo1) $sql .= "equipinfo1='$equipinfo1',"; 1768 if ($mob_templ['equipinfo2'] != $equipinfo2) $sql .= "equipinfo2='$equipinfo2',"; 1769 if ($mob_templ['equipinfo3'] != $equipinfo3) $sql .= "equipinfo3='$equipinfo3',"; 1770 if ($mob_templ['equipslot1'] != $equipslot1) $sql .= "equipslot1='$equipslot1',"; 1771 if ($mob_templ['equipslot2'] != $equipslot2) $sql .= "equipslot2='$equipslot2',"; 1772 if ($mob_templ['equipslot3'] != $equipslot3) $sql .= "equipslot3='$equipslot3',"; 1773 if ($mob_templ['lootid'] != $lootid) $sql .= "lootid='$lootid',"; 1774 if ($mob_templ['pickpocketloot'] != $pickpocketloot) $sql .= "pickpocketloot='$pickpocketloot',"; 1775 if ($mob_templ['skinloot'] != $skinloot) $sql .= "skinloot='$skinloot',"; 1776 if ($mob_templ['resistance1'] != $resistance1) $sql .= "resistance1='$resistance1',"; 1777 if ($mob_templ['resistance2'] != $resistance2) $sql .= "resistance2='$resistance2',"; 1778 if ($mob_templ['resistance3'] != $resistance3) $sql .= "resistance3='$resistance3',"; 1779 if ($mob_templ['resistance4'] != $resistance4) $sql .= "resistance4='$resistance4',"; 1780 if ($mob_templ['resistance5'] != $resistance5) $sql .= "resistance5='$resistance5',"; 1781 if ($mob_templ['resistance6'] != $resistance6) $sql .= "resistance6='$resistance6',"; 1782 if ($mob_templ['spell1'] != $spell1) $sql .= "spell1='$spell1',"; 1783 if ($mob_templ['spell2'] != $spell2) $sql .= "spell2='$spell2',"; 1784 if ($mob_templ['spell3'] != $spell3) $sql .= "spell3='$spell3',"; 1785 if ($mob_templ['spell4'] != $spell4) $sql .= "spell4='$spell4',"; 1786 if ($mob_templ['mingold'] != $mingold) $sql .= "mingold='$mingold',"; 1787 if ($mob_templ['maxgold'] != $maxgold) $sql .= "maxgold='$maxgold',"; 1788 if ($mob_templ['AIName'] != $AIName) $sql .= "AIName='$AIName',"; 1789 if ($mob_templ['MovementType'] != $MovementType) $sql .= "MovementType='$MovementType',"; 1790 if ($mob_templ['InhabitType'] != $InhabitType) $sql .= "InhabitType='$InhabitType',"; 1791 if ($mob_templ['ScriptName'] != $ScriptName) $sql .= "ScriptName='$ScriptName',"; 1792 1793 $mysql->free_result($result); 1735 $sql_query = "UPDATE creature_template SET "; 1736 1737 $result = $sql->query("SELECT * FROM creature_template WHERE entry = '$entry'"); 1738 if ($mob_templ = $sql->fetch_assoc($result)){ 1739 if ($mob_templ['modelid_m'] != $modelid_m) $sql_query .= "modelid_m='$modelid_m',"; 1740 if ($mob_templ['modelid_f'] != $modelid_f) $sql_query .= "modelid_f='$modelid_f',"; 1741 if ($mob_templ['name'] != $name) $sql_query .= "name='$name',"; 1742 if ($mob_templ['subname'] != $subname) $sql_query .= "subname='$subname',"; 1743 if ($mob_templ['minlevel'] != $minlevel) $sql_query .= "minlevel='$minlevel',"; 1744 if ($mob_templ['maxlevel'] != $maxlevel) $sql_query .= "maxlevel='$maxlevel',"; 1745 if ($mob_templ['minhealth'] != $minhealth) $sql_query .= "minhealth='$minhealth',"; 1746 if ($mob_templ['maxhealth'] != $maxhealth) $sql_query .= "maxhealth='$maxhealth',"; 1747 if ($mob_templ['minmana'] != $minmana) $sql_query .= "minmana='$minmana',"; 1748 if ($mob_templ['maxmana'] != $maxmana) $sql_query .= "maxmana='$maxmana',"; 1749 if ($mob_templ['armor'] != $armor) $sql_query .= "armor='$armor',"; 1750 if ($mob_templ['faction'] != $faction) $sql_query .= "faction='$faction',"; 1751 if ($mob_templ['npcflag'] != $npcflag) $sql_query .= "npcflag='$npcflag',"; 1752 if ($mob_templ['speed'] != $speed) $sql_query .= "speed='$speed',"; 1753 if ($mob_templ['rank'] != $rank) $sql_query .= "rank='$rank',"; 1754 if ($mob_templ['mindmg'] != $mindmg) $sql_query .= "mindmg='$mindmg',"; 1755 if ($mob_templ['maxdmg'] != $maxdmg) $sql_query .= "maxdmg='$maxdmg',"; 1756 if ($mob_templ['attackpower'] != $attackpower) $sql_query .= "attackpower='$attackpower',"; 1757 if ($mob_templ['baseattacktime'] != $baseattacktime) $sql_query .= "baseattacktime='$baseattacktime',"; 1758 if ($mob_templ['rangeattacktime'] != $rangeattacktime) $sql_query .= "rangeattacktime='$rangeattacktime',"; 1759 if ($mob_templ['flags'] != $flags) $sql_query .= "flags='$flags',"; 1760 if ($mob_templ['dynamicflags'] != $dynamicflags) $sql_query .= "dynamicflags='$dynamicflags',"; 1761 if ($mob_templ['size'] != $size) $sql_query .= "size='$size',"; 1762 if ($mob_templ['family'] != $family) $sql_query .= "family='$family',"; 1763 if ($mob_templ['bounding_radius'] != $bounding_radius) $sql_query .= "bounding_radius='$bounding_radius',"; 1764 if ($mob_templ['trainer_type'] != $trainer_type) $sql_query .= "trainer_type='$trainer_type',"; 1765 if ($mob_templ['trainer_spell'] != $trainer_spell) $sql_query .= "trainer_spell='$trainer_spell',"; 1766 if ($mob_templ['class'] != $class) $sql_query .= "class='$class',"; 1767 if ($mob_templ['race'] != $race) $sql_query .= "race='$race',"; 1768 if ($mob_templ['minrangedmg'] != $minrangedmg) $sql_query .= "minrangedmg='$minrangedmg',"; 1769 if ($mob_templ['maxrangedmg'] != $maxrangedmg) $sql_query .= "maxrangedmg='$maxrangedmg',"; 1770 if ($mob_templ['rangedattackpower'] != $rangedattackpower) $sql_query .= "rangedattackpower='$rangedattackpower',"; 1771 if ($mob_templ['combat_reach'] != $combat_reach) $sql_query .= "combat_reach='$combat_reach',"; 1772 if ($mob_templ['type'] != $type) $sql_query .= "type='$type',"; 1773 if ($mob_templ['civilian'] != $civilian) $sql_query .= "civilian='$civilian',"; 1774 if ($mob_templ['flag1'] != $flag1) $sql_query .= "flag1='$flag1',"; 1775 if ($mob_templ['equipmodel1'] != $equipmodel1) $sql_query .= "equipmodel1='$equipmodel1',"; 1776 if ($mob_templ['equipmodel2'] != $equipmodel2) $sql_query .= "equipmodel2='$equipmodel2',"; 1777 if ($mob_templ['equipmodel3'] != $equipmodel3) $sql_query .= "equipmodel3='$equipmodel3',"; 1778 if ($mob_templ['equipinfo1'] != $equipinfo1) $sql_query .= "equipinfo1='$equipinfo1',"; 1779 if ($mob_templ['equipinfo2'] != $equipinfo2) $sql_query .= "equipinfo2='$equipinfo2',"; 1780 if ($mob_templ['equipinfo3'] != $equipinfo3) $sql_query .= "equipinfo3='$equipinfo3',"; 1781 if ($mob_templ['equipslot1'] != $equipslot1) $sql_query .= "equipslot1='$equipslot1',"; 1782 if ($mob_templ['equipslot2'] != $equipslot2) $sql_query .= "equipslot2='$equipslot2',"; 1783 if ($mob_templ['equipslot3'] != $equipslot3) $sql_query .= "equipslot3='$equipslot3',"; 1784 if ($mob_templ['lootid'] != $lootid) $sql_query .= "lootid='$lootid',"; 1785 if ($mob_templ['pickpocketloot'] != $pickpocketloot) $sql_query .= "pickpocketloot='$pickpocketloot',"; 1786 if ($mob_templ['skinloot'] != $skinloot) $sql_query .= "skinloot='$skinloot',"; 1787 if ($mob_templ['resistance1'] != $resistance1) $sql_query .= "resistance1='$resistance1',"; 1788 if ($mob_templ['resistance2'] != $resistance2) $sql_query .= "resistance2='$resistance2',"; 1789 if ($mob_templ['resistance3'] != $resistance3) $sql_query .= "resistance3='$resistance3',"; 1790 if ($mob_templ['resistance4'] != $resistance4) $sql_query .= "resistance4='$resistance4',"; 1791 if ($mob_templ['resistance5'] != $resistance5) $sql_query .= "resistance5='$resistance5',"; 1792 if ($mob_templ['resistance6'] != $resistance6) $sql_query .= "resistance6='$resistance6',"; 1793 if ($mob_templ['spell1'] != $spell1) $sql_query .= "spell1='$spell1',"; 1794 if ($mob_templ['spell2'] != $spell2) $sql_query .= "spell2='$spell2',"; 1795 if ($mob_templ['spell3'] != $spell3) $sql_query .= "spell3='$spell3',"; 1796 if ($mob_templ['spell4'] != $spell4) $sql_query .= "spell4='$spell4',"; 1797 if ($mob_templ['mingold'] != $mingold) $sql_query .= "mingold='$mingold',"; 1798 if ($mob_templ['maxgold'] != $maxgold) $sql_query .= "maxgold='$maxgold',"; 1799 if ($mob_templ['AIName'] != $AIName) $sql_query .= "AIName='$AIName',"; 1800 if ($mob_templ['MovementType'] != $MovementType) $sql_query .= "MovementType='$MovementType',"; 1801 if ($mob_templ['InhabitType'] != $InhabitType) $sql_query .= "InhabitType='$InhabitType',"; 1802 if ($mob_templ['ScriptName'] != $ScriptName) $sql_query .= "ScriptName='$ScriptName',"; 1803 if ($mob_templ['RacialLeader'] != $RacialLeader) $sql_query .= "RacialLeader='$RacialLeader',"; 1804 1805 $sql->free_result($result); 1794 1806 unset($mob_templ); 1795 1807 1796 if (($sql == "UPDATE creature_template SET ")&&(!$item)&&(!$del_loot_items)1808 if (($sql_query == "UPDATE creature_template SET ")&&(!$item)&&(!$del_loot_items) 1797 1809 &&(!$del_questrelation)&&(!$questrelation)&&(!$del_involvedrelation)&&(!$involvedrelation) 1798 1810 &&(!$del_vendor_item)&&(!$vendor_item)&&(!$del_skin_items)&&(!$skin_item) 1799 1811 &&(!$del_pp_items)&&(!$pp_item)&&(!$trainer_spell)&&(!$del_trainer_spell)){ 1800 $ mysql->close();1812 $sql->close(); 1801 1813 redirect("creature.php?action=edit&entry=$entry&error=6"); 1802 1814 } else { 1803 if ($sql != "UPDATE creature_template SET "){1804 $sql [strlen($sql)-1] = " ";1805 $sql .= " WHERE entry = '$entry';\n";1806 } else $sql = "";1815 if ($sql_query != "UPDATE creature_template SET "){ 1816 $sql_query[strlen($sql_query)-1] = " "; 1817 $sql_query .= " WHERE entry = '$entry';\n"; 1818 } else $sql_query = ""; 1807 1819 } 1808 1820 1809 1821 if ($trainer_spell){ 1810 $sql .= "INSERT INTO npc_trainer (entry, spell, spellcost, reqskill, reqskillvalue, reqlevel)1822 $sql_query .= "INSERT INTO npc_trainer (entry, spell, spellcost, reqskill, reqskillvalue, reqlevel) 1811 1823 VALUES ($entry,$trainer_spell,$spellcost,$reqskill ,$reqskillvalue ,$reqlevel);\n"; 1812 1824 } … … 1814 1826 if ($del_trainer_spell){ 1815 1827 foreach($del_trainer_spell as $spell_id) 1816 $sql .= "DELETE FROM npc_trainer WHERE entry = $entry AND spell = $spell_id;\n";1828 $sql_query .= "DELETE FROM npc_trainer WHERE entry = $entry AND spell = $spell_id;\n"; 1817 1829 } 1818 1830 1819 1831 if ($item){ 1820 $sql .= "INSERT INTO creature_loot_template (entry, item, ChanceOrRef, QuestChanceOrGroup, mincount, maxcount, quest_freeforall)1832 $sql_query .= "INSERT INTO creature_loot_template (entry, item, ChanceOrRef, QuestChanceOrGroup, mincount, maxcount, quest_freeforall) 1821 1833 VALUES ($lootid,$item,'$ChanceOrRef', '$QuestChanceOrGroup' ,$mincount ,$maxcount ,$quest_freeforall);\n"; 1822 1834 } … … 1824 1836 if ($del_loot_items){ 1825 1837 foreach($del_loot_items as $item_id) 1826 $sql .= "DELETE FROM creature_loot_template WHERE entry = $lootid AND item = $item_id;\n";1838 $sql_query .= "DELETE FROM creature_loot_template WHERE entry = $lootid AND item = $item_id;\n"; 1827 1839 } 1828 1840 1829 1841 if ($skin_item){ 1830 $sql .= "INSERT INTO skinning_loot_template (entry, item, ChanceOrRef, QuestChanceOrGroup, mincount, maxcount, quest_freeforall)1842 $sql_query .= "INSERT INTO skinning_loot_template (entry, item, ChanceOrRef, QuestChanceOrGroup, mincount, maxcount, quest_freeforall) 1831 1843 VALUES ($skinloot,$skin_item,'$skin_ChanceOrRef', '$skin_QuestChanceOrGroup' ,$skin_mincount ,$skin_maxcount ,$skin_quest_freeforall);\n"; 1832 1844 } … … 1834 1846 if ($del_skin_items){ 1835 1847 foreach($del_skin_items as $item_id) 1836 $sql .= "DELETE FROM skinning_loot_template WHERE entry = $skinloot AND item = $item_id;\n";1848 $sql_query .= "DELETE FROM skinning_loot_template WHERE entry = $skinloot AND item = $item_id;\n"; 1837 1849 } 1838 1850 1839 1851 if ($pp_item){ 1840 $sql .= "INSERT INTO pickpocketing_loot_template (entry, item, ChanceOrRef, QuestChanceOrGroup, mincount, maxcount, quest_freeforall)1852 $sql_query .= "INSERT INTO pickpocketing_loot_template (entry, item, ChanceOrRef, QuestChanceOrGroup, mincount, maxcount, quest_freeforall) 1841 1853 VALUES ($pickpocketloot,$pp_item,'$pp_ChanceOrRef', '$pp_QuestChanceOrGroup' ,$pp_mincount ,$pp_maxcount ,$pp_quest_freeforall);\n"; 1842 1854 } … … 1844 1856 if ($del_pp_items){ 1845 1857 foreach($del_pp_items as $item_id) 1846 $sql .= "DELETE FROM pickpocketing_loot_template WHERE entry = $pickpocketloot AND item = $item_id;\n";1858 $sql_query .= "DELETE FROM pickpocketing_loot_template WHERE entry = $pickpocketloot AND item = $item_id;\n"; 1847 1859 } 1848 1860 1849 1861 if ($questrelation){ 1850 $sql .= "INSERT INTO creature_questrelation (id, quest) VALUES ($entry,$questrelation);\n";1862 $sql_query .= "INSERT INTO creature_questrelation (id, quest) VALUES ($entry,$questrelation);\n"; 1851 1863 } 1852 1864 1853 1865 if ($involvedrelation){ 1854 $sql .= "INSERT INTO creature_involvedrelation (id, quest) VALUES ($entry,$involvedrelation);\n";1866 $sql_query .= "INSERT INTO creature_involvedrelation (id, quest) VALUES ($entry,$involvedrelation);\n"; 1855 1867 } 1856 1868 1857 1869 if ($del_questrelation){ 1858 1870 foreach($del_questrelation as $quest_id) 1859 $sql .= "DELETE FROM creature_questrelation WHERE id = $entry AND quest = $quest_id;\n";1871 $sql_query .= "DELETE FROM creature_questrelation WHERE id = $entry AND quest = $quest_id;\n"; 1860 1872 } 1861 1873 1862 1874 if ($del_involvedrelation){ 1863 1875 foreach($del_involvedrelation as $quest_id) 1864 $sql .= "DELETE FROM creature_involvedrelation WHERE id = $entry AND quest = $quest_id;\n";1876 $sql_query .= "DELETE FROM creature_involvedrelation WHERE id = $entry AND quest = $quest_id;\n"; 1865 1877 } 1866 1878 1867 1879 if ($del_vendor_item){ 1868 1880 foreach($del_vendor_item as $item_id) 1869 $sql .= "DELETE FROM npc_vendor WHERE entry = $entry AND item = $item_id;\n";1881 $sql_query .= "DELETE FROM npc_vendor WHERE entry = $entry AND item = $item_id;\n"; 1870 1882 } 1871 1883 1872 1884 if ($vendor_item){ 1873 $sql .= "INSERT INTO npc_vendor (entry, item, maxcount, incrtime)1885 $sql_query .= "INSERT INTO npc_vendor (entry, item, maxcount, incrtime) 1874 1886 VALUES ($entry,$vendor_item,$vendor_maxcount,$vendor_incrtime);\n"; 1875 1887 } 1876 1888 1877 1889 } else { 1878 $ mysql->close();1890 $sql->close(); 1879 1891 redirect("creature.php?error=5"); 1880 1892 } 1881 1893 } else { 1882 $ mysql->close();1894 $sql->close(); 1883 1895 redirect("creature.php?error=5"); 1884 1896 } 1885 1897 1886 1898 if ( isset($_POST['backup_op']) && ($_POST['backup_op'] == 1) ){ 1887 $ mysql->close();1899 $sql->close(); 1888 1900 Header("Content-type: application/octet-stream"); 1889 1901 Header("Content-Disposition: attachment; filename=creatureid_$entry.sql"); 1890 echo $sql ;1902 echo $sql_query; 1891 1903 exit(); 1892 1904 redirect("creature.php?action=edit&entry=$entry&error=4"); 1893 1905 } else { 1894 $sql = explode(';',$sql);1895 foreach($sql as $tmp_query) if(($tmp_query)&&($tmp_query != "\n")) $result = $mysql->query($tmp_query);1896 $ mysql->close();1906 $sql_query = explode(';',$sql_query); 1907 foreach($sql_query as $tmp_query) if(($tmp_query)&&($tmp_query != "\n")) $result = $sql->query($tmp_query); 1908 $sql->close(); 1897 1909 } 1898 1910 … … 1934 1946 else redirect("creature.php?error=1"); 1935 1947 1936 $ mysql = new MySQL;1937 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);1938 1939 $result = $ mysql->query("SELECT guid FROM creature WHERE id = '$entry'");1940 while ($guid = $ mysql->fetch_row($result)){1941 $ mysql->query("DELETE FROM creature_movement WHERE id = '$guid'");1948 $sql = new SQL; 1949 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 1950 1951 $result = $sql->query("SELECT guid FROM creature WHERE id = '$entry'"); 1952 while ($guid = $sql->fetch_row($result)){ 1953 $sql->query("DELETE FROM creature_movement WHERE id = '$guid'"); 1942 1954 } 1943 $ mysql->query("DELETE FROM creature WHERE id = '$entry'");1944 $ mysql->query("DELETE FROM creature_template WHERE entry = '$entry'");1945 $ mysql->query("DELETE FROM creature_onkill_reputation WHERE creature_id = '$entry'");1946 $ mysql->query("DELETE FROM creature_involvedrelation WHERE id = '$entry'");1947 $ mysql->query("DELETE FROM creature_questrelation WHERE id = '$entry'");1948 $ mysql->query("DELETE FROM npc_vendor WHERE entry = '$entry'");1949 $ mysql->query("DELETE FROM npc_trainer WHERE entry = '$entry'");1950 $ mysql->query("DELETE FROM npc_gossip WHERE npc_guid = '$entry'");1951 1952 $ mysql->close();1955 $sql->query("DELETE FROM creature WHERE id = '$entry'"); 1956 $sql->query("DELETE FROM creature_template WHERE entry = '$entry'"); 1957 $sql->query("DELETE FROM creature_onkill_reputation WHERE creature_id = '$entry'"); 1958 $sql->query("DELETE FROM creature_involvedrelation WHERE id = '$entry'"); 1959 $sql->query("DELETE FROM creature_questrelation WHERE id = '$entry'"); 1960 $sql->query("DELETE FROM npc_vendor WHERE entry = '$entry'"); 1961 $sql->query("DELETE FROM npc_trainer WHERE entry = '$entry'"); 1962 $sql->query("DELETE FROM npc_gossip WHERE npc_guid = '$entry'"); 1963 1964 $sql->close(); 1953 1965 redirect("creature.php"); 1954 1966 } … … 1964 1976 else redirect("creature.php?error=1"); 1965 1977 1966 $ mysql = new MySQL;1967 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);1968 1969 $result = $ mysql->query("SELECT guid FROM creature WHERE id = '$entry'");1970 while ($guid = $ mysql->fetch_row($result)){1971 $ mysql->query("DELETE FROM creature_movement WHERE id = '$guid'");1978 $sql = new SQL; 1979 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 1980 1981 $result = $sql->query("SELECT guid FROM creature WHERE id = '$entry'"); 1982 while ($guid = $sql->fetch_row($result)){ 1983 $sql->query("DELETE FROM creature_movement WHERE id = '$guid'"); 1972 1984 } 1973 1985 1974 $ mysql->query("DELETE FROM creature WHERE id = '$entry'");1975 $ mysql->close();1986 $sql->query("DELETE FROM creature WHERE id = '$entry'"); 1987 $sql->close(); 1976 1988 redirect("creature.php?action=edit&entry=$entry&error=4"); 1977 1989 } -
minimanager/edit.php
r5 r19 19 19 $lang_id_tab, $gm_level_arr; 20 20 21 $ mysql = new MySQL;22 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);23 24 $result = $ mysql->query("SELECT email,gmlevel,joindate,tbc FROM account WHERE username ='$user_name'");25 26 if ($acc = $ mysql->fetch_row($result)) {21 $sql = new SQL; 22 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 23 24 $result = $sql->query("SELECT email,gmlevel,joindate,tbc FROM account WHERE username ='$user_name'"); 25 26 if ($acc = $sql->fetch_row($result)) { 27 27 require_once("scripts/id_tab.php"); 28 28 … … 79 79 </tr>"; 80 80 81 $result = $ mysql->query("SELECT SUM(numchars) FROM realmcharacters WHERE acctid = '$user_id'");81 $result = $sql->query("SELECT SUM(numchars) FROM realmcharacters WHERE acctid = '$user_id'"); 82 82 $output .= "<tr> 83 83 <td>{$lang_edit['tot_chars']}</td> 84 <td>".$ mysql->result($result, 0)."</td>84 <td>".$sql->result($result, 0)."</td> 85 85 </tr>"; 86 86 87 $mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 88 $result = $mysql->query("SELECT guid,name,race,class,SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 35), ' ', -1) FROM `character` WHERE account = $user_id"); 89 $chars_on_realm = $mysql->num_rows($result); 87 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 88 $result = $sql->query("SELECT guid,name,race,class,SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 35), ' ', -1) FROM `character` WHERE account = $user_id"); 90 89 91 90 $output .= "<tr> 92 91 <td>{$lang_edit['characters']}</td> 93 <td> $chars_on_realm</td>92 <td>".$sql->num_rows($result)."</td> 94 93 </tr>"; 95 94 96 while ($char = $ mysql->fetch_array($result)){95 while ($char = $sql->fetch_array($result)){ 97 96 $output .= "<tr> 98 97 <td> '---></td> … … 171 170 } else error($lang_global['err_no_records_found']); 172 171 173 $ mysql->close();172 $sql->close(); 174 173 } 175 174 … … 184 183 redirect("edit.php?error=1"); 185 184 186 $ mysql = new MySQL;187 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);188 189 $new_pass = ($ mysql->quote_smart($_POST['pass']) != sha1(strtoupper($user_name).":******")) ? "I='".$mysql->quote_smart($_POST['pass'])."', " : "";190 $new_mail = $ mysql->quote_smart(trim($_POST['mail']));191 $new_tbc = $ mysql->quote_smart(trim($_POST['tbc']));185 $sql = new SQL; 186 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 187 188 $new_pass = ($sql->quote_smart($_POST['pass']) != sha1(strtoupper($user_name).":******")) ? "I='".$sql->quote_smart($_POST['pass'])."', " : ""; 189 $new_mail = $sql->quote_smart(trim($_POST['mail'])); 190 $new_tbc = $sql->quote_smart(trim($_POST['tbc'])); 192 191 193 192 //make sure the mail is valid mail format … … 195 194 if ((!is_email($new_mail))||(strlen($new_mail) > 224)) redirect("edit.php?error=2"); 196 195 197 $ mysql->query("UPDATE account SET email='$new_mail', $new_pass tbc='$new_tbc' WHERE username = '$user_name'");198 199 if ($ mysql->affected_rows()) {200 $ mysql->close();196 $sql->query("UPDATE account SET email='$new_mail', $new_pass tbc='$new_tbc' WHERE username = '$user_name'"); 197 198 if ($sql->affected_rows()) { 199 $sql->close(); 201 200 redirect("edit.php?error=3"); 202 201 } else { 203 $ mysql->close();202 $sql->close(); 204 203 redirect("edit.php?error=4"); 205 204 } -
minimanager/error.php
r5 r19 15 15 $output .= "<center><br /><table width=\"300\" class=\"flat\"> 16 16 <tr> 17 <td align=\"center\"><h1><font class=\"error\"> ERR!</font></h1>17 <td align=\"center\"><h1><font class=\"error\"><img src=\"img/warn_red.gif\" width=\"48\" height=\"48\" alt=\"\" /><br />ERR!</font></h1> 18 18 <br />$err<br /><br /> 19 19 </td> -
minimanager/game_object.php
r5 r19 63 63 global $lang_global, $lang_game_object, $output, $mangos_db, $realm_id, $go_type; 64 64 65 $ mysql = new MySQL;66 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);67 68 $result = $ mysql->query("SELECT count(*) FROM gameobject_template");69 $tot_go = $ mysql->result($result, 0);70 $ mysql->close();65 $sql = new SQL; 66 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 67 68 $result = $sql->query("SELECT count(*) FROM gameobject_template"); 69 $tot_go = $sql->result($result, 0); 70 $sql->close(); 71 71 72 72 $output .= "<center> … … 133 133 } 134 134 135 $ mysql = new MySQL;136 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);137 138 if ($_POST['entry'] != '') $entry = $ mysql->quote_smart($_POST['entry']);139 if ($_POST['name'] != '') $name = $ mysql->quote_smart($_POST['name']);140 if ($_POST['type'] != -1) $type = $ mysql->quote_smart($_POST['type']);141 if ($_POST['ScriptName'] != '') $ScriptName = $ mysql->quote_smart($_POST['ScriptName']);142 if ($_POST['displayId'] != '') $displayId = $ mysql->quote_smart($_POST['displayId']);143 if ($_POST['faction'] != '') $faction = $ mysql->quote_smart($_POST['faction']);144 if ($_POST['flags'] != '') $flags = $ mysql->quote_smart($_POST['flags']);145 if ($_POST['custom_search'] != '') $custom_search = $ mysql->quote_smart($_POST['custom_search']);135 $sql = new SQL; 136 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 137 138 if ($_POST['entry'] != '') $entry = $sql->quote_smart($_POST['entry']); 139 if ($_POST['name'] != '') $name = $sql->quote_smart($_POST['name']); 140 if ($_POST['type'] != -1) $type = $sql->quote_smart($_POST['type']); 141 if ($_POST['ScriptName'] != '') $ScriptName = $sql->quote_smart($_POST['ScriptName']); 142 if ($_POST['displayId'] != '') $displayId = $sql->quote_smart($_POST['displayId']); 143 if ($_POST['faction'] != '') $faction = $sql->quote_smart($_POST['faction']); 144 if ($_POST['flags'] != '') $flags = $sql->quote_smart($_POST['flags']); 145 if ($_POST['custom_search'] != '') $custom_search = $sql->quote_smart($_POST['custom_search']); 146 146 else $custom_search = ""; 147 147 … … 158 158 if($where == "WHERE entry > 0 ") redirect("game_object.php?error=1"); 159 159 160 $result = $ mysql->query("SELECT entry, type, displayId, name, faction FROM gameobject_template $where ORDER BY entry LIMIT $sql_search_limit");161 $total_found = $ mysql->num_rows($result);160 $result = $sql->query("SELECT entry, type, displayId, name, faction FROM gameobject_template $where ORDER BY entry LIMIT $sql_search_limit"); 161 $total_found = $sql->num_rows($result); 162 162 163 163 $output .= "<center> … … 171 171 $output .= "<table class=\"lined\"> 172 172 <tr> 173 <t d width=\"10%\" class=\"head\">{$lang_game_object['entry']}</td>174 <t d width=\"40%\" class=\"head\">{$lang_game_object['name']}</td>175 <t d width=\"20%\" class=\"head\">{$lang_game_object['type']}</td>176 <t d width=\"15%\" class=\"head\">{$lang_game_object['displayId']}</td>177 <t d width=\"15%\" class=\"head\">{$lang_game_object['faction']}</td>173 <th width=\"10%\">{$lang_game_object['entry']}</th> 174 <th width=\"40%\">{$lang_game_object['name']}</th> 175 <th width=\"20%\">{$lang_game_object['type']}</th> 176 <th width=\"15%\">{$lang_game_object['displayId']}</th> 177 <th width=\"15%\">{$lang_game_object['faction']}</th> 178 178 </tr>"; 179 179 180 180 for ($i=1; $i<=$total_found; $i++){ 181 $go = $ mysql->fetch_row($result);181 $go = $sql->fetch_row($result); 182 182 183 183 $output .= "<tr> … … 191 191 $output .= "</table></center><br />"; 192 192 193 $ mysql->close();193 $sql->close(); 194 194 } 195 195 … … 364 364 if (!isset($_GET['entry'])) redirect("game_object.php?error=1"); 365 365 366 $ mysql = new MySQL;367 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);368 369 $entry = $ mysql->quote_smart($_GET['entry']);370 $result = $ mysql->query("SELECT * FROM gameobject_template WHERE entry = '$entry'");371 372 if ($go = $ mysql->fetch_assoc($result)){366 $sql = new SQL; 367 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 368 369 $entry = $sql->quote_smart($_GET['entry']); 370 $result = $sql->query("SELECT * FROM gameobject_template WHERE entry = '$entry'"); 371 372 if ($go = $sql->fetch_assoc($result)){ 373 373 374 374 $output .= "<script type=\"text/javascript\" src=\"js/tab.js\"></script> … … 449 449 </table><br />"; 450 450 451 $result1 = $ mysql->query("SELECT COUNT(*) FROM gameobject WHERE id = '{$go['entry']}'");452 $output .= "<tr><td colspan=\"6\">{$lang_game_object['go_swapned']} : ".$ mysql->result($result1, 0)." {$lang_game_object['times']}.</td></tr>451 $result1 = $sql->query("SELECT COUNT(*) FROM gameobject WHERE id = '{$go['entry']}'"); 452 $output .= "<tr><td colspan=\"6\">{$lang_game_object['go_swapned']} : ".$sql->result($result1, 0)." {$lang_game_object['times']}.</td></tr> 453 453 454 454 <br /> … … 534 534 $row_flag = 0; 535 535 $output .= "<table class=\"hidden\" align=\"center\"><tr>"; 536 $result1 = $ mysql->query("SELECT item,ChanceOrRef,QuestChanceOrGroup,mincount,maxcount,quest_freeforall FROM gameobject_loot_template WHERE entry = {$go['entry']} ORDER BY ChanceOrRef DESC");537 while ($item = $ mysql->fetch_row($result1)){536 $result1 = $sql->query("SELECT item,ChanceOrRef,QuestChanceOrGroup,mincount,maxcount,quest_freeforall FROM gameobject_loot_template WHERE entry = {$go['entry']} ORDER BY ChanceOrRef DESC"); 537 while ($item = $sql->fetch_row($result1)){ 538 538 $cel_counter++; 539 539 $tooltip = get_item_name($item[0])." ($item[0])<br />{$lang_game_object['drop_chance']}: $item[1]%<br />{$lang_game_object['quest_drop_chance']}: $item[2]%<br />{$lang_game_object['drop_chance']}: $item[3]-$item[4]<br />{$lang_game_object['quest_freeforall']}: $item[5]"; … … 577 577 <tr class=\"large_bold\"><td colspan=\"2\" class=\"hidden\" align=\"left\">{$lang_game_object['start_quests']}:</td></tr>"; 578 578 579 $result1 = $ mysql->query("SELECT quest FROM gameobject_questrelation WHERE id = {$go['entry']}");580 while ($quest = $ mysql->fetch_row($result1)){581 $query1 = $ mysql->query("SELECT QuestLevel,Title FROM quest_template WHERE entry ='$quest[0]'");582 $quest_templ = $ mysql->fetch_row($query1);579 $result1 = $sql->query("SELECT quest FROM gameobject_questrelation WHERE id = {$go['entry']}"); 580 while ($quest = $sql->fetch_row($result1)){ 581 $query1 = $sql->query("SELECT QuestLevel,Title FROM quest_template WHERE entry ='$quest[0]'"); 582 $quest_templ = $sql->fetch_row($query1); 583 583 584 584 $output .= "<tr><td width=\"5%\"><input type=\"checkbox\" name=\"del_questrelation[]\" value=\"$quest[0]\" /></td> … … 592 592 <tr class=\"large_bold\"><td colspan=\"2\" class=\"hidden\" align=\"left\">{$lang_game_object['ends_quests']}:</td></tr>"; 593 593 594 $result1 = $ mysql->query("SELECT quest FROM gameobject_involvedrelation WHERE id = {$go['entry']}");595 while ($quest = $ mysql->fetch_row($result1)){596 $query1 = $ mysql->query("SELECT QuestLevel,Title FROM quest_template WHERE entry ='$quest[0]'");597 $quest_templ = $ mysql->fetch_row($query1);594 $result1 = $sql->query("SELECT quest FROM gameobject_involvedrelation WHERE id = {$go['entry']}"); 595 while ($quest = $sql->fetch_row($result1)){ 596 $query1 = $sql->query("SELECT QuestLevel,Title FROM quest_template WHERE entry ='$quest[0]'"); 597 $quest_templ = $sql->fetch_row($query1); 598 598 599 599 $output .= "<tr><td width=\"5%\"><input type=\"checkbox\" name=\"del_involvedrelation[]\" value=\"$quest[0]\" /></td> … … 626 626 </table></center>"; 627 627 628 $ mysql->close();628 $sql->close(); 629 629 } else { 630 $ mysql->close();630 $sql->close(); 631 631 error($lang_game_object['tmpl_not_found']); 632 632 exit(); … … 644 644 if (!isset($_POST['entry']) || $_POST['entry'] === '') redirect("game_object.php?error=1"); 645 645 646 $ mysql = new MySQL;647 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);648 649 $entry = $ mysql->quote_smart($_POST['entry']);650 if (isset($_POST['type']) && $_POST['type'] != '') $type = $ mysql->quote_smart($_POST['type']);646 $sql = new SQL; 647 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 648 649 $entry = $sql->quote_smart($_POST['entry']); 650 if (isset($_POST['type']) && $_POST['type'] != '') $type = $sql->quote_smart($_POST['type']); 651 651 else $type = 0; 652 if (isset($_POST['displayId']) && $_POST['displayId'] != '') $displayId = $ mysql->quote_smart($_POST['displayId']);652 if (isset($_POST['displayId']) && $_POST['displayId'] != '') $displayId = $sql->quote_smart($_POST['displayId']); 653 653 else $displayId = 0; 654 if (isset($_POST['name']) && $_POST['name'] != '') $name = $ mysql->quote_smart($_POST['name']);654 if (isset($_POST['name']) && $_POST['name'] != '') $name = $sql->quote_smart($_POST['name']); 655 655 else $name = ""; 656 if (isset($_POST['faction']) && $_POST['faction'] != '') $faction = $ mysql->quote_smart($_POST['faction']);656 if (isset($_POST['faction']) && $_POST['faction'] != '') $faction = $sql->quote_smart($_POST['faction']); 657 657 else $faction = 0; 658 if (isset($_POST['flags']) && $_POST['flags'] != '') $flags = $ mysql->quote_smart($_POST['flags']);658 if (isset($_POST['flags']) && $_POST['flags'] != '') $flags = $sql->quote_smart($_POST['flags']); 659 659 else $flags = 0; 660 if (isset($_POST['size']) && $_POST['size'] != '') $size = $ mysql->quote_smart($_POST['size']);660 if (isset($_POST['size']) && $_POST['size'] != '') $size = $sql->quote_smart($_POST['size']); 661 661 else $size = 0; 662 if (isset($_POST['ScriptName']) && $_POST['ScriptName'] != '') $ScriptName = $ mysql->quote_smart($_POST['ScriptName']);662 if (isset($_POST['ScriptName']) && $_POST['ScriptName'] != '') $ScriptName = $sql->quote_smart($_POST['ScriptName']); 663 663 else $ScriptName = ""; 664 if (isset($_POST['sound0']) && $_POST['sound0'] != '') $sound0 = $ mysql->quote_smart($_POST['sound0']);664 if (isset($_POST['sound0']) && $_POST['sound0'] != '') $sound0 = $sql->quote_smart($_POST['sound0']); 665 665 else $sound0 = 0; 666 if (isset($_POST['sound1']) && $_POST['sound1'] != '') $sound1 = $ mysql->quote_smart($_POST['sound1']);666 if (isset($_POST['sound1']) && $_POST['sound1'] != '') $sound1 = $sql->quote_smart($_POST['sound1']); 667 667 else $sound1 = 0; 668 if (isset($_POST['sound2']) && $_POST['sound2'] != '') $sound2 = $ mysql->quote_smart($_POST['sound2']);668 if (isset($_POST['sound2']) && $_POST['sound2'] != '') $sound2 = $sql->quote_smart($_POST['sound2']); 669 669 else $sound2 = 0; 670 if (isset($_POST['sound3']) && $_POST['sound3'] != '') $sound3 = $ mysql->quote_smart($_POST['sound3']);670 if (isset($_POST['sound3']) && $_POST['sound3'] != '') $sound3 = $sql->quote_smart($_POST['sound3']); 671 671 else $sound3 = 0; 672 if (isset($_POST['sound4']) && $_POST['sound4'] != '') $sound4 = $ mysql->quote_smart($_POST['sound4']);672 if (isset($_POST['sound4']) && $_POST['sound4'] != '') $sound4 = $sql->quote_smart($_POST['sound4']); 673 673 else $sound4 = 0; 674 if (isset($_POST['sound5']) && $_POST['sound5'] != '') $sound5 = $ mysql->quote_smart($_POST['sound5']);674 if (isset($_POST['sound5']) && $_POST['sound5'] != '') $sound5 = $sql->quote_smart($_POST['sound5']); 675 675 else $sound5 = 0; 676 if (isset($_POST['sound6']) && $_POST['sound6'] != '') $sound6 = $ mysql->quote_smart($_POST['sound6']);676 if (isset($_POST['sound6']) && $_POST['sound6'] != '') $sound6 = $sql->quote_smart($_POST['sound6']); 677 677 else $sound6 = 0; 678 if (isset($_POST['sound7']) && $_POST['sound7'] != '') $sound7 = $ mysql->quote_smart($_POST['sound7']);678 if (isset($_POST['sound7']) && $_POST['sound7'] != '') $sound7 = $sql->quote_smart($_POST['sound7']); 679 679 else $sound7 = 0; 680 if (isset($_POST['sound8']) && $_POST['sound8'] != '') $sound8 = $ mysql->quote_smart($_POST['sound8']);680 if (isset($_POST['sound8']) && $_POST['sound8'] != '') $sound8 = $sql->quote_smart($_POST['sound8']); 681 681 else $sound8 = 0; 682 if (isset($_POST['sound9']) && $_POST['sound9'] != '') $sound9 = $ mysql->quote_smart($_POST['sound9']);682 if (isset($_POST['sound9']) && $_POST['sound9'] != '') $sound9 = $sql->quote_smart($_POST['sound9']); 683 683 else $sound9 = 0; 684 if (isset($_POST['sound10']) && $_POST['sound10'] != '') $sound10 = $ mysql->quote_smart($_POST['sound10']);684 if (isset($_POST['sound10']) && $_POST['sound10'] != '') $sound10 = $sql->quote_smart($_POST['sound10']); 685 685 else $sound10 = 0; 686 if (isset($_POST['sound11']) && $_POST['sound11'] != '') $sound11 = $ mysql->quote_smart($_POST['sound11']);686 if (isset($_POST['sound11']) && $_POST['sound11'] != '') $sound11 = $sql->quote_smart($_POST['sound11']); 687 687 else $sound11 = 0; 688 if (isset($_POST['sound12']) && $_POST['sound12'] != '') $sound12 = $ mysql->quote_smart($_POST['sound12']);688 if (isset($_POST['sound12']) && $_POST['sound12'] != '') $sound12 = $sql->quote_smart($_POST['sound12']); 689 689 else $sound12 = 0; 690 if (isset($_POST['sound13']) && $_POST['sound13'] != '') $sound13 = $ mysql->quote_smart($_POST['sound13']);690 if (isset($_POST['sound13']) && $_POST['sound13'] != '') $sound13 = $sql->quote_smart($_POST['sound13']); 691 691 else $sound13 = 0; 692 if (isset($_POST['sound14']) && $_POST['sound14'] != '') $sound14 = $ mysql->quote_smart($_POST['sound14']);692 if (isset($_POST['sound14']) && $_POST['sound14'] != '') $sound14 = $sql->quote_smart($_POST['sound14']); 693 693 else $sound14 = 0; 694 if (isset($_POST['sound15']) && $_POST['sound15'] != '') $sound15 = $ mysql->quote_smart($_POST['sound15']);694 if (isset($_POST['sound15']) && $_POST['sound15'] != '') $sound15 = $sql->quote_smart($_POST['sound15']); 695 695 else $sound15 = 0; 696 if (isset($_POST['sound16']) && $_POST['sound16'] != '') $sound16 = $ mysql->quote_smart($_POST['sound16']);696 if (isset($_POST['sound16']) && $_POST['sound16'] != '') $sound16 = $sql->quote_smart($_POST['sound16']); 697 697 else $sound16 = 0; 698 if (isset($_POST['sound17']) && $_POST['sound17'] != '') $sound17 = $ mysql->quote_smart($_POST['sound17']);698 if (isset($_POST['sound17']) && $_POST['sound17'] != '') $sound17 = $sql->quote_smart($_POST['sound17']); 699 699 else $sound17 = 0; 700 if (isset($_POST['sound18']) && $_POST['sound18'] != '') $sound18 = $ mysql->quote_smart($_POST['sound18']);700 if (isset($_POST['sound18']) && $_POST['sound18'] != '') $sound18 = $sql->quote_smart($_POST['sound18']); 701 701 else $sound18 = 0; 702 if (isset($_POST['sound19']) && $_POST['sound19'] != '') $sound19 = $ mysql->quote_smart($_POST['sound19']);702 if (isset($_POST['sound19']) && $_POST['sound19'] != '') $sound19 = $sql->quote_smart($_POST['sound19']); 703 703 else $sound19 = 0; 704 if (isset($_POST['sound20']) && $_POST['sound20'] != '') $sound20 = $ mysql->quote_smart($_POST['sound20']);704 if (isset($_POST['sound20']) && $_POST['sound20'] != '') $sound20 = $sql->quote_smart($_POST['sound20']); 705 705 else $sound20 = 0; 706 if (isset($_POST['sound21']) && $_POST['sound21'] != '') $sound21 = $ mysql->quote_smart($_POST['sound21']);706 if (isset($_POST['sound21']) && $_POST['sound21'] != '') $sound21 = $sql->quote_smart($_POST['sound21']); 707 707 else $sound21 = 0; 708 if (isset($_POST['sound22']) && $_POST['sound22'] != '') $sound22 = $ mysql->quote_smart($_POST['sound22']);708 if (isset($_POST['sound22']) && $_POST['sound22'] != '') $sound22 = $sql->quote_smart($_POST['sound22']); 709 709 else $sound22 = 0; 710 if (isset($_POST['sound23']) && $_POST['sound23'] != '') $sound23 = $ mysql->quote_smart($_POST['sound23']);710 if (isset($_POST['sound23']) && $_POST['sound23'] != '') $sound23 = $sql->quote_smart($_POST['sound23']); 711 711 else $sound23 = 0; 712 712 713 if (isset($_POST['ChanceOrRef']) && $_POST['ChanceOrRef'] != '') $ChanceOrRef = $ mysql->quote_smart($_POST['ChanceOrRef']);713 if (isset($_POST['ChanceOrRef']) && $_POST['ChanceOrRef'] != '') $ChanceOrRef = $sql->quote_smart($_POST['ChanceOrRef']); 714 714 else $ChanceOrRef = 0; 715 if (isset($_POST['QuestChanceOrGroup']) && $_POST['QuestChanceOrGroup'] != '') $QuestChanceOrGroup = $ mysql->quote_smart($_POST['QuestChanceOrGroup']);715 if (isset($_POST['QuestChanceOrGroup']) && $_POST['QuestChanceOrGroup'] != '') $QuestChanceOrGroup = $sql->quote_smart($_POST['QuestChanceOrGroup']); 716 716 else $QuestChanceOrGroup = 0; 717 if (isset($_POST['mincount']) && $_POST['mincount'] != '') $mincount = $ mysql->quote_smart($_POST['mincount']);717 if (isset($_POST['mincount']) && $_POST['mincount'] != '') $mincount = $sql->quote_smart($_POST['mincount']); 718 718 else $mincount = 0; 719 if (isset($_POST['maxcount']) && $_POST['maxcount'] != '') $maxcount = $ mysql->quote_smart($_POST['maxcount']);719 if (isset($_POST['maxcount']) && $_POST['maxcount'] != '') $maxcount = $sql->quote_smart($_POST['maxcount']); 720 720 else $maxcount = 0; 721 if (isset($_POST['quest_freeforall']) && $_POST['quest_freeforall'] != '') $quest_freeforall = $ mysql->quote_smart($_POST['quest_freeforall']);721 if (isset($_POST['quest_freeforall']) && $_POST['quest_freeforall'] != '') $quest_freeforall = $sql->quote_smart($_POST['quest_freeforall']); 722 722 else $quest_freeforall = 0; 723 if (isset($_POST['item']) && $_POST['item'] != '') $item = $ mysql->quote_smart($_POST['item']);723 if (isset($_POST['item']) && $_POST['item'] != '') $item = $sql->quote_smart($_POST['item']); 724 724 else $item = 0; 725 if (isset($_POST['del_loot_items']) && $_POST['del_loot_items'] != '') $del_loot_items = $ mysql->quote_smart($_POST['del_loot_items']);725 if (isset($_POST['del_loot_items']) && $_POST['del_loot_items'] != '') $del_loot_items = $sql->quote_smart($_POST['del_loot_items']); 726 726 else $del_loot_items = NULL; 727 727 728 if (isset($_POST['involvedrelation']) && $_POST['involvedrelation'] != '') $involvedrelation = $ mysql->quote_smart($_POST['involvedrelation']);728 if (isset($_POST['involvedrelation']) && $_POST['involvedrelation'] != '') $involvedrelation = $sql->quote_smart($_POST['involvedrelation']); 729 729 else $involvedrelation = 0; 730 if (isset($_POST['del_involvedrelation']) && $_POST['del_involvedrelation'] != '') $del_involvedrelation = $ mysql->quote_smart($_POST['del_involvedrelation']);730 if (isset($_POST['del_involvedrelation']) && $_POST['del_involvedrelation'] != '') $del_involvedrelation = $sql->quote_smart($_POST['del_involvedrelation']); 731 731 else $del_involvedrelation = NULL; 732 if (isset($_POST['questrelation']) && $_POST['questrelation'] != '') $questrelation = $ mysql->quote_smart($_POST['questrelation']);732 if (isset($_POST['questrelation']) && $_POST['questrelation'] != '') $questrelation = $sql->quote_smart($_POST['questrelation']); 733 733 else $questrelation = 0; 734 if (isset($_POST['del_questrelation']) && $_POST['del_questrelation'] != '') $del_questrelation = $ mysql->quote_smart($_POST['del_questrelation']);734 if (isset($_POST['del_questrelation']) && $_POST['del_questrelation'] != '') $del_questrelation = $sql->quote_smart($_POST['del_questrelation']); 735 735 else $del_questrelation = NULL; 736 736 737 737 if ($_POST['opp_type'] == "add_new"){ 738 $sql = "INSERT INTO gameobject_template ( entry, type, displayId, name, faction, flags, size, sound0, sound1,738 $sql_query = "INSERT INTO gameobject_template ( entry, type, displayId, name, faction, flags, size, sound0, sound1, 739 739 sound2, sound3, sound4, sound5, sound6, sound7, sound8, sound9, sound10, sound11, sound12, sound13, 740 740 sound14, sound15, sound16, sound17, sound18, sound19, sound20, sound21, sound22, sound23, ScriptName ) … … 746 746 } elseif ($_POST['opp_type'] == "edit"){ 747 747 748 $sql = "UPDATE gameobject_template SET ";749 750 $result = $ mysql->query("SELECT * FROM gameobject_template WHERE entry = '$entry'");751 if ($go_templ = $ mysql->fetch_assoc($result)){752 if ($go_templ['type'] != $type) $sql .= "type='$type',";753 if ($go_templ['displayId'] != $displayId) $sql .= "displayId='$displayId',";754 if ($go_templ['name'] != $name) $sql .= "name='$name',";755 if ($go_templ['faction'] != $faction) $sql .= "faction='$faction',";756 if ($go_templ['flags'] != $flags) $sql .= "flags='$flags',";757 if ($go_templ['size'] != $size) $sql .= "size='$size',";758 if ($go_templ['sound0'] != $sound0) $sql .= "sound0='$sound0',";759 if ($go_templ['sound1'] != $sound1) $sql .= "sound1='$sound1',";760 if ($go_templ['sound2'] != $sound2) $sql .= "sound2='$sound2',";761 if ($go_templ['sound3'] != $sound3) $sql .= "sound3='$sound3',";762 if ($go_templ['sound4'] != $sound4) $sql .= "sound4='$sound4',";763 if ($go_templ['sound5'] != $sound5) $sql .= "sound5='$sound5',";764 if ($go_templ['sound6'] != $sound6) $sql .= "sound6='$sound6',";765 if ($go_templ['sound7'] != $sound7) $sql .= "sound7='$sound7',";766 if ($go_templ['sound8'] != $sound8) $sql .= "sound8='$sound8',";767 if ($go_templ['sound9'] != $sound9) $sql .= "sound9='$sound9',";768 if ($go_templ['sound10'] != $sound10) $sql .= "sound10='$sound10',";769 if ($go_templ['sound11'] != $sound11) $sql .= "sound11='$sound11',";770 if ($go_templ['sound12'] != $sound12) $sql .= "sound12='$sound12',";771 if ($go_templ['sound13'] != $sound13) $sql .= "sound13='$sound13',";772 if ($go_templ['sound14'] != $sound14) $sql .= "sound14='$sound14',";773 if ($go_templ['sound15'] != $sound15) $sql .= "sound15='$sound15',";774 if ($go_templ['sound16'] != $sound16) $sql .= "sound16='$sound16',";775 if ($go_templ['sound17'] != $sound17) $sql .= "sound17='$sound17',";776 if ($go_templ['sound18'] != $sound18) $sql .= "sound18='$sound18',";777 if ($go_templ['sound19'] != $sound19) $sql .= "sound19='$sound19',";778 if ($go_templ['sound20'] != $sound20) $sql .= "sound20='$sound20',";779 if ($go_templ['sound21'] != $sound21) $sql .= "sound21='$sound21',";780 if ($go_templ['sound22'] != $sound22) $sql .= "sound22='$sound22',";781 if ($go_templ['sound23'] != $sound23) $sql .= "sound23='$sound23',";782 if ($go_templ['ScriptName'] != $ScriptName) $sql .= "ScriptName='$ScriptName',";783 784 $ mysql->free_result($result);748 $sql_query = "UPDATE gameobject_template SET "; 749 750 $result = $sql->query("SELECT * FROM gameobject_template WHERE entry = '$entry'"); 751 if ($go_templ = $sql->fetch_assoc($result)){ 752 if ($go_templ['type'] != $type) $sql_query .= "type='$type',"; 753 if ($go_templ['displayId'] != $displayId) $sql_query .= "displayId='$displayId',"; 754 if ($go_templ['name'] != $name) $sql_query .= "name='$name',"; 755 if ($go_templ['faction'] != $faction) $sql_query .= "faction='$faction',"; 756 if ($go_templ['flags'] != $flags) $sql_query .= "flags='$flags',"; 757 if ($go_templ['size'] != $size) $sql_query .= "size='$size',"; 758 if ($go_templ['sound0'] != $sound0) $sql_query .= "sound0='$sound0',"; 759 if ($go_templ['sound1'] != $sound1) $sql_query .= "sound1='$sound1',"; 760 if ($go_templ['sound2'] != $sound2) $sql_query .= "sound2='$sound2',"; 761 if ($go_templ['sound3'] != $sound3) $sql_query .= "sound3='$sound3',"; 762 if ($go_templ['sound4'] != $sound4) $sql_query .= "sound4='$sound4',"; 763 if ($go_templ['sound5'] != $sound5) $sql_query .= "sound5='$sound5',"; 764 if ($go_templ['sound6'] != $sound6) $sql_query .= "sound6='$sound6',"; 765 if ($go_templ['sound7'] != $sound7) $sql_query .= "sound7='$sound7',"; 766 if ($go_templ['sound8'] != $sound8) $sql_query .= "sound8='$sound8',"; 767 if ($go_templ['sound9'] != $sound9) $sql_query .= "sound9='$sound9',"; 768 if ($go_templ['sound10'] != $sound10) $sql_query .= "sound10='$sound10',"; 769 if ($go_templ['sound11'] != $sound11) $sql_query .= "sound11='$sound11',"; 770 if ($go_templ['sound12'] != $sound12) $sql_query .= "sound12='$sound12',"; 771 if ($go_templ['sound13'] != $sound13) $sql_query .= "sound13='$sound13',"; 772 if ($go_templ['sound14'] != $sound14) $sql_query .= "sound14='$sound14',"; 773 if ($go_templ['sound15'] != $sound15) $sql_query .= "sound15='$sound15',"; 774 if ($go_templ['sound16'] != $sound16) $sql_query .= "sound16='$sound16',"; 775 if ($go_templ['sound17'] != $sound17) $sql_query .= "sound17='$sound17',"; 776 if ($go_templ['sound18'] != $sound18) $sql_query .= "sound18='$sound18',"; 777 if ($go_templ['sound19'] != $sound19) $sql_query .= "sound19='$sound19',"; 778 if ($go_templ['sound20'] != $sound20) $sql_query .= "sound20='$sound20',"; 779 if ($go_templ['sound21'] != $sound21) $sql_query .= "sound21='$sound21',"; 780 if ($go_templ['sound22'] != $sound22) $sql_query .= "sound22='$sound22',"; 781 if ($go_templ['sound23'] != $sound23) $sql_query .= "sound23='$sound23',"; 782 if ($go_templ['ScriptName'] != $ScriptName) $sql_query .= "ScriptName='$ScriptName',"; 783 784 $sql->free_result($result); 785 785 unset($go_templ); 786 787 if (($sql == "UPDATE gameobject_template SET ")&&(!$item)&&(!$del_loot_items)786 787 if (($sql_query == "UPDATE gameobject_template SET ")&&(!$item)&&(!$del_loot_items) 788 788 &&(!$del_questrelation)&&(!$questrelation)&&(!$del_involvedrelation)&&(!$involvedrelation)){ 789 $ mysql->close();789 $sql->close(); 790 790 redirect("game_object.php?action=edit&entry=$entry&error=6"); 791 791 } else { 792 if ($sql != "UPDATE gameobject_template SET "){793 $sql [strlen($sql)-1] = " ";794 $sql .= " WHERE entry = '$entry';\n";795 } else $sql = "";792 if ($sql_query != "UPDATE gameobject_template SET "){ 793 $sql_query[strlen($sql_query)-1] = " "; 794 $sql_query .= " WHERE entry = '$entry';\n"; 795 } else $sql_query = ""; 796 796 } 797 797 798 798 if ($item){ 799 $sql .= "INSERT INTO gameobject_loot_template (entry, item, ChanceOrRef, QuestChanceOrGroup, mincount, maxcount, quest_freeforall)799 $sql_query .= "INSERT INTO gameobject_loot_template (entry, item, ChanceOrRef, QuestChanceOrGroup, mincount, maxcount, quest_freeforall) 800 800 VALUES ($entry,$item,'$ChanceOrRef', '$QuestChanceOrGroup' ,$mincount ,$maxcount ,$quest_freeforall);\n"; 801 801 } … … 803 803 if ($del_loot_items){ 804 804 foreach($del_loot_items as $item_id) 805 $sql .= "DELETE FROM gameobject_loot_template WHERE entry = $entry AND item = $item_id;\n";805 $sql_query .= "DELETE FROM gameobject_loot_template WHERE entry = $entry AND item = $item_id;\n"; 806 806 } 807 807 808 808 if ($questrelation){ 809 $sql .= "INSERT INTO gameobject_questrelation (id, quest) VALUES ($entry,$questrelation);\n";809 $sql_query .= "INSERT INTO gameobject_questrelation (id, quest) VALUES ($entry,$questrelation);\n"; 810 810 } 811 811 812 812 if ($involvedrelation){ 813 $sql .= "INSERT INTO gameobject_involvedrelation (id, quest) VALUES ($entry,$involvedrelation);\n";813 $sql_query .= "INSERT INTO gameobject_involvedrelation (id, quest) VALUES ($entry,$involvedrelation);\n"; 814 814 } 815 815 816 816 if ($del_questrelation){ 817 817 foreach($del_questrelation as $quest_id) 818 $sql .= "DELETE FROM gameobject_questrelation WHERE id = $entry AND quest = $quest_id;\n";818 $sql_query .= "DELETE FROM gameobject_questrelation WHERE id = $entry AND quest = $quest_id;\n"; 819 819 } 820 820 821 821 if ($del_involvedrelation){ 822 822 foreach($del_involvedrelation as $quest_id) 823 $sql .= "DELETE FROM gameobject_involvedrelation WHERE id = $entry AND quest = $quest_id;\n";823 $sql_query .= "DELETE FROM gameobject_involvedrelation WHERE id = $entry AND quest = $quest_id;\n"; 824 824 } 825 825 826 826 827 827 } else { 828 $ mysql->close();828 $sql->close(); 829 829 redirect("game_object.php?error=5"); 830 830 } 831 831 } else { 832 $ mysql->close();832 $sql->close(); 833 833 redirect("game_object.php?error=5"); 834 834 } 835 835 836 836 if ( isset($_POST['backup_op']) && ($_POST['backup_op'] == 1) ){ 837 $ mysql->close();837 $sql->close(); 838 838 Header("Content-type: application/octet-stream"); 839 839 Header("Content-Disposition: attachment; filename=goid_$entry.sql"); 840 echo $sql ;840 echo $sql_query; 841 841 exit(); 842 842 redirect("game_object.php?action=edit&entry=$entry&error=4"); 843 843 } else { 844 $sql = explode(';',$sql);845 foreach($sql as $tmp_query) if(($tmp_query)&&($tmp_query != "\n")) $result = $mysql->query($tmp_query);846 $ mysql->close();844 $sql_query = explode(';',$sql_query); 845 foreach($sql_query as $tmp_query) if(($tmp_query)&&($tmp_query != "\n")) $result = $sql->query($tmp_query); 846 $sql->close(); 847 847 } 848 848 … … 884 884 else redirect("game_object.php?error=1"); 885 885 886 $ mysql = new MySQL;887 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);888 889 $result = $ mysql->query("SELECT guid FROM gameobject WHERE id = '$entry'");890 while ($guid = $ mysql->fetch_row($result)){891 $result = $ mysql->query("DELETE FROM gameobject_respawn WHERE guid = '$guid'");886 $sql = new SQL; 887 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 888 889 $result = $sql->query("SELECT guid FROM gameobject WHERE id = '$entry'"); 890 while ($guid = $sql->fetch_row($result)){ 891 $result = $sql->query("DELETE FROM gameobject_respawn WHERE guid = '$guid'"); 892 892 } 893 $ mysql->query("DELETE FROM gameobject_involvedrelation WHERE id = '$entry'");894 $ mysql->query("DELETE FROM gameobject_questrelation WHERE id = '$entry'");895 $ mysql->query("DELETE FROM gameobject_loot_template WHERE entry = '$entry'");896 $ mysql->query("DELETE FROM gameobject_template WHERE entry = '$entry'");897 898 $ mysql->close();893 $sql->query("DELETE FROM gameobject_involvedrelation WHERE id = '$entry'"); 894 $sql->query("DELETE FROM gameobject_questrelation WHERE id = '$entry'"); 895 $sql->query("DELETE FROM gameobject_loot_template WHERE entry = '$entry'"); 896 $sql->query("DELETE FROM gameobject_template WHERE entry = '$entry'"); 897 898 $sql->close(); 899 899 redirect("game_object.php"); 900 900 } … … 910 910 else redirect("game_object.php?error=1"); 911 911 912 $ mysql = new MySQL;913 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);914 $ mysql->query("DELETE FROM gameobject WHERE id = '$entry'");915 $ mysql->close();912 $sql = new SQL; 913 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 914 $sql->query("DELETE FROM gameobject WHERE id = '$entry'"); 915 $sql->close(); 916 916 redirect("game_object.php?action=edit&entry=$entry&error=4"); 917 917 } -
minimanager/guild.php
r5 r19 18 18 global $lang_guild, $lang_global, $output, $mangos_db, $realm_id, $itemperpage; 19 19 20 $ mysql = new MySQL;21 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);22 23 $start = (isset($_GET['start'])) ? $ mysql->quote_smart($_GET['start']) : 0;24 $order_by = (isset($_GET['order_by'])) ? $ mysql->quote_smart($_GET['order_by']) : "guildid";25 26 $dir = (isset($_GET['dir'])) ? $ mysql->quote_smart($_GET['dir']) : 1;20 $sql = new SQL; 21 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 22 23 $start = (isset($_GET['start'])) ? $sql->quote_smart($_GET['start']) : 0; 24 $order_by = (isset($_GET['order_by'])) ? $sql->quote_smart($_GET['order_by']) : "gid"; 25 26 $dir = (isset($_GET['dir'])) ? $sql->quote_smart($_GET['dir']) : 1; 27 27 $order_dir = ($dir) ? "ASC" : "DESC"; 28 28 $dir = ($dir) ? 0 : 1; 29 29 30 //get total number of items 31 $ query_1 = $mysql->query("SELECT count(*) FROM guild");32 $all_record = $mysql->result($query_1,0); 33 34 $query = $mysql->query("SELECT guildid, name, leaderguid, SUBSTRING_INDEX(MOTD,' ',6), createdate 35 FROM guild ORDER BY $order_by $order_dir LIMIT $start, $itemperpage");36 $this_page = $ mysql->num_rows($query);30 $query_1 = $sql->query("SELECT count(*) FROM guild"); 31 $all_record = $sql->result($query_1,0); 32 33 $query = $sql->query("SELECT guild.guildid AS gid, guild.name AS gname,guild.leaderguid AS lguid,SUBSTRING_INDEX(guild.MOTD,' ',6), guild.createdate, 34 (SELECT name FROM `character` WHERE guid = lguid) AS l_name,(SELECT COUNT(*) FROM guild_member WHERE guildid = gid) AS tot_chars 35 FROM guild ORDER BY $order_by $order_dir LIMIT $start, $itemperpage"); 36 $this_page = $sql->num_rows($query); 37 37 38 38 //==========================top tage navigaion starts here======================== … … 46 46 <input type=\"text\" size=\"45\" name=\"search_value\" /> 47 47 <select name=\"search_by\"> 48 <option value=\" name\">{$lang_guild['by_name']}</option>48 <option value=\"gname\">{$lang_guild['by_name']}</option> 49 49 <option value=\"leaderguid\">{$lang_guild['by_guild_leader']}</option> 50 50 <option value=\"createdate\">{$lang_guild['by_create_date']}</option> … … 60 60 $output .= "<table class=\"lined\"> 61 61 <tr> 62 <td width=\"5%\" class=\"head\"><a href=\"guild.php?order_by=guildid&start=$start&dir=$dir\" class=\"head_link\">{$lang_guild['id']}</a></td> 63 <td width=\"25%\" class=\"head\"><a href=\"guild.php?order_by=name&start=$start&dir=$dir\" class=\"head_link\">{$lang_guild['guild_name']}</a></td> 64 <td width=\"15%\" class=\"head\"><a href=\"guild.php?order_by=leaderguid&start=$start&dir=$dir\" class=\"head_link\">{$lang_guild['guild_leader']}</a></td> 65 <td width=\"40%\" class=\"head\"><a href=\"guild.php?order_by=MOTD&start=$start&dir=$dir\" class=\"head_link\">{$lang_guild['guild_motd']}</a></td> 66 <td width=\"15%\" class=\"head\"><a href=\"guild.php?order_by=createdate&start=$start&dir=$dir\" class=\"head_link\">{$lang_guild['create_date']}</a></td> 62 <th width=\"5%\"><a href=\"guild.php?order_by=gid&start=$start&dir=$dir\">".($order_by=='gid' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_guild['id']}</a></th> 63 <th width=\"25%\"><a href=\"guild.php?order_by=gname&start=$start&dir=$dir\">".($order_by=='gname' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_guild['guild_name']}</a></th> 64 <th width=\"5%\"><a href=\"guild.php?order_by=tot_chars&start=$start&dir=$dir\">".($order_by=='tot_chars' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_guild['tot_members']}</a></th> 65 <th width=\"15%\"><a href=\"guild.php?order_by=leaderguid&start=$start&dir=$dir\">".($order_by=='leaderguid' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_guild['guild_leader']}</a></th> 66 <th width=\"35%\">{$lang_guild['guild_motd']}</th> 67 <th width=\"15%\"><a href=\"guild.php?order_by=createdate&start=$start&dir=$dir\">".($order_by=='createdate' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_guild['create_date']}</a></th> 67 68 </tr>"; 68 69 69 $looping = ($this_page < $itemperpage) ? $this_page : $itemperpage; 70 71 for ($i=1; $i<=$looping; $i++) { 72 $data = $mysql->fetch_row($query); 73 74 $result = $mysql->query("SELECT name FROM `character` WHERE guid ='$data[2]'"); 75 $guild_leader = ($mysql->num_rows($result)) ? $mysql->result($result, 0, 'name') : ""; 76 77 $output .= "<tr> 78 <td>$data[0]</td> 79 <td><a href=\"guild.php?action=view_guild&error=3&id=$data[0]\">$data[1]</a></td> 80 <td><a href=\"char.php?id=$data[2]\">$guild_leader</a></td> 81 <td>$data[3] ...</td> 82 <td class=\"small\">$data[4]</td> 70 while ($data = $sql->fetch_row($query)) { 71 $output .= "<tr> 72 <td>$data[0]</td> 73 <td><a href=\"guild.php?action=view_guild&error=3&id=$data[0]\">$data[1]</a></td> 74 <td>$data[6]</td> 75 <td><a href=\"char.php?id=$data[2]\">$data[5]</a></td> 76 <td>$data[3] ...</td> 77 <td class=\"small\">$data[4]</td> 83 78 </tr>"; 84 79 } … … 87 82 </table></center>"; 88 83 89 $ mysql->close();84 $sql->close(); 90 85 } 91 86 … … 99 94 if(!isset($_GET['search_value']) || !isset($_GET['search_by'])) redirect("guild.php?error=2"); 100 95 101 $ mysql = new MySQL;102 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);103 104 $search_value = $ mysql->quote_smart($_GET['search_value']);105 $search_by = $ mysql->quote_smart($_GET['search_by']);106 107 if(isset($_GET['order_by'])) $order_by = $ mysql->quote_smart($_GET['order_by']);96 $sql = new SQL; 97 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 98 99 $search_value = $sql->quote_smart($_GET['search_value']); 100 $search_by = $sql->quote_smart($_GET['search_by']); 101 102 if(isset($_GET['order_by'])) $order_by = $sql->quote_smart($_GET['order_by']); 108 103 else $order_by = "guildid"; 109 104 110 $dir = (isset($_GET['dir'])) ? $ mysql->quote_smart($_GET['dir']) : 1;105 $dir = (isset($_GET['dir'])) ? $sql->quote_smart($_GET['dir']) : 1; 111 106 $order_dir = ($dir) ? "ASC" : "DESC"; 112 107 $dir = ($dir) ? 0 : 1; 113 114 if ($search_by == "leaderguid") { 115 $temp = $mysql->query("SELECT guid FROM `character` WHERE name ='$search_value'"); 116 $search_value = $mysql->result($temp, 0, 'guid'); 117 } 118 119 $query = $mysql->query("SELECT guildid, name, leaderguid, SUBSTRING_INDEX(MOTD,' ',6), createdate 120 FROM guild WHERE $search_by LIKE '%$search_value%' ORDER BY $order_by $order_dir LIMIT $sql_search_limit"); 121 $total_found = $mysql->num_rows($query); 108 109 if ($search_by == "leaderguid"){ 110 $temp = $sql->query("SELECT guid FROM `character` WHERE name ='$search_value'"); 111 $search_value = $sql->result($temp, 0, 'guid'); 112 } 113 114 $query = $sql->query("SELECT guild.guildid AS gid, guild.name AS gname,guild.leaderguid AS lguid,SUBSTRING_INDEX(guild.MOTD,' ',6), guild.createdate, 115 (SELECT name FROM `character` WHERE guid = lguid) AS l_name, (SELECT COUNT(*) FROM guild_member WHERE guildid = gid) AS tot_chars 116 FROM guild WHERE $search_by LIKE '%$search_value%' ORDER BY $order_by $order_dir LIMIT $sql_search_limit"); 117 $total_found = $sql->num_rows($query); 122 118 123 119 //==========================top tage navigaion starts here======================== … … 131 127 <input type=\"text\" size=\"30\" name=\"search_value\" /> 132 128 <select name=\"search_by\"> 133 <option value=\" name\">{$lang_guild['by_name']}</option>129 <option value=\"gname\">{$lang_guild['by_name']}</option> 134 130 <option value=\"leaderguid\">{$lang_guild['by_guild_leader']}</option> 135 131 <option value=\"createdate\">{$lang_guild['by_create_date']}</option> … … 143 139 $output .= "<table class=\"lined\"> 144 140 <tr> 145 <td width=\"5%\" class=\"head\"><a href=\"guild.php?action=search&error=4&order_by=guildid&search_by=$search_by&search_value=$search_value&dir=$dir\" class=\"head_link\">{$lang_guild['id']}</a></td> 146 <td width=\"25%\" class=\"head\"><a href=\"guild.php?action=search&error=4&order_by=name&search_by=$search_by&search_value=$search_value&dir=$dir\" class=\"head_link\">{$lang_guild['guild_name']}</a></td> 147 <td width=\"15%\" class=\"head\"><a href=\"guild.php?action=search&error=4&order_by=leaderguid&search_by=$search_by&search_value=$search_value&dir=$dir\" class=\"head_link\">{$lang_guild['guild_leader']}</a></td> 148 <td width=\"40%\" class=\"head\"><a href=\"guild.php?action=search&error=4&order_by=MOTD&search_by=$search_by&search_value=$search_value&dir=$dir\" class=\"head_link\">{$lang_guild['guild_motd']}</a></td> 149 <td width=\"15%\" class=\"head\"><a href=\"guild.php?action=search&error=4&order_by=createdate&search_by=$search_by&search_value=$search_value&dir=$dir\" class=\"head_link\">{$lang_guild['create_date']}</a></td> 141 <th width=\"5%\"><a href=\"guild.php?action=search&error=4&order_by=guildid&search_by=$search_by&search_value=$search_value&dir=$dir\">".($order_by=='guildid' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_guild['id']}</a></th> 142 <th width=\"25%\"><a href=\"guild.php?action=search&error=4&order_by=gname&search_by=$search_by&search_value=$search_value&dir=$dir\">".($order_by=='gname' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_guild['guild_name']}</a></th> 143 <th width=\"5%\"><a href=\"guild.php?action=search&error=4&order_by=tot_chars&search_by=$search_by&search_value=$search_value&dir=$dir\">".($order_by=='tot_chars' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_guild['tot_members']}</a></th> 144 <th width=\"15%\"><a href=\"guild.php?action=search&error=4&order_by=leaderguid&search_by=$search_by&search_value=$search_value&dir=$dir\">".($order_by=='leaderguid' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_guild['guild_leader']}</a></th> 145 <th width=\"35%\">{$lang_guild['guild_motd']}</th> 146 <th width=\"15%\"><a href=\"guild.php?action=search&error=4&order_by=createdate&search_by=$search_by&search_value=$search_value&dir=$dir\">".($order_by=='createdate' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_guild['create_date']}</a></th> 150 147 </tr>"; 151 148 152 for ($i=1; $i<=$total_found; $i++){ 153 $data =$mysql->fetch_row($query); 154 155 $result = $mysql->query("SELECT name FROM `character` WHERE guid ='$data[2]'"); 156 $guild_leader = ($mysql->num_rows($result)) ? $mysql->result($result, 0, 'name') : ""; 157 158 $output .= "<tr>"; 159 $output .= "<td>$data[0]</td> 160 <td><a href=\"guild.php?action=view_guild&error=3&id=$data[0]\">$data[1]</a></td> 161 <td><a href=\"char.php?id=$data[2]\">$guild_leader</a></td> 162 <td>$data[3] ...</td> 163 <td class=\"small\">$data[4]</td> 149 while ($data =$sql->fetch_row($query)){ 150 $output .= "<tr> 151 <td>$data[0]</td> 152 <td><a href=\"guild.php?action=view_guild&error=3&id=$data[0]\">$data[1]</a></td> 153 <td>$data[6]</td> 154 <td><a href=\"char.php?id=$data[2]\">$data[5]</a></td> 155 <td>$data[3] ...</td> 156 <td class=\"small\">$data[4]</td> 164 157 </tr>"; 165 158 } … … 170 163 </table></center>"; 171 164 172 $ mysql->close();165 $sql->close(); 173 166 } 174 167 … … 182 175 if(!isset($_GET['id'])) redirect("guild.php?error=1"); 183 176 184 $mysql = new MySQL; 185 $mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 186 187 $guild_id = $mysql->quote_smart($_GET['id']); 188 189 $query = $mysql->query("SELECT guildid, name, info, MOTD, createdate FROM guild WHERE guildid = '$guild_id'"); 190 $guild_data = $mysql->fetch_row($query); 191 192 $members = $mysql->query("SELECT guid, rank FROM guild_member WHERE guildid = '$guild_id' ORDER BY rank"); 193 $total_members = $mysql->num_rows($members); 177 $sql = new SQL; 178 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 179 180 $guild_id = $sql->quote_smart($_GET['id']); 181 182 $query = $sql->query("SELECT guildid, name, info, MOTD, createdate FROM guild WHERE guildid = '$guild_id'"); 183 $guild_data = $sql->fetch_row($query); 184 185 $members = $sql->query("SELECT guild_member.guid, guild_member.rank AS mrank, 186 `character`.name, SUBSTRING_INDEX(SUBSTRING_INDEX(`character`.`data`, ' ', 35), ' ', -1) AS level, 187 (SELECT rname FROM guild_rank WHERE guildid ='$guild_id' AND rid = mrank) AS rname 188 FROM guild_member,`character` 189 LEFT JOIN guild_member k1 ON k1.`guid`=`character`.`guid` 190 WHERE guild_member.guildid = '$guild_id' AND guild_member.guid=`character`.guid 191 ORDER BY mrank"); 192 $total_members = $sql->num_rows($members); 194 193 195 194 if (!$guild_data[2]) $guild_data[2] = $lang_global['none']; 196 195 197 $output .= "<center> 196 $output .= "<script type=\"text/javascript\"> 197 answerbox.btn_ok='{$lang_global['yes_low']}'; 198 answerbox.btn_cancel='{$lang_global['no']}'; 199 </script> 200 <center> 198 201 <fieldset style=\"width: 600px;\"> 199 202 <legend>{$lang_guild['guild']}</legend> … … 215 218 </tr> 216 219 <tr> 217 <t d width=\"5%\" class=\"head\">{$lang_guild['remove']}</td>218 <t d width=\"45%\" class=\"head\">{$lang_guild['name']}</td>219 <t d width=\"5%\" class=\"head\">{$lang_guild['level']}</td>220 <t d width=\"45%\" class=\"head\">{$lang_guild['rank']}</td>220 <th width=\"5%\">{$lang_guild['remove']}</th> 221 <th width=\"45%\">{$lang_guild['name']}</th> 222 <th width=\"5%\">{$lang_guild['level']}</th> 223 <th width=\"45%\">{$lang_guild['rank']}</th> 221 224 </tr>"; 222 223 while ($member = $mysql->fetch_row($members)){ 224 $result = $mysql->query("SELECT name,SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 35), ' ', -1) FROM `character` WHERE guid ='$member[0]'"); 225 $member_data = $mysql->fetch_row($result); 226 227 if ($member[1]){ 228 $result = $mysql->query("SELECT rname FROM guild_rank WHERE guildid ='$guild_data[0]' AND rid='$member[1]'"); 229 $member_rank = $mysql->result($result, 0, 'rname'); 230 } else $member_rank = $lang_guild['guild_leader']; 231 225 226 while ($member = $sql->fetch_row($members)){ 232 227 $output .= " <tr> 233 <td>< a href=\"guild.php?action=rem_char_from_guild&id=$member[0]&guld_id=$guild_id\"><img src=\"img/x.ico\" class=\"no_border\" alt=\"\" /></a></td>234 <td><a href=\"char.php?id=$member[0]\">$member _data[0]</a></td>235 <td>$member _data[1]</td>236 <td> $member_rank($member[1])</td>228 <td><img src=\"img/aff_cross.png\" alt=\"\" onclick=\"answerBox('{$lang_global['delete']}: <font color=white>{$member[2]}</font><br />{$lang_global['are_you_sure']}', 'guild.php?action=rem_char_from_guild&id=$member[0]&guld_id=$guild_id');\" style=\"cursor:pointer;\" /></td> 229 <td><a href=\"char.php?id=$member[0]\">$member[2]</a></td> 230 <td>$member[3]</td> 231 <td>".($member[4]?$member[4]:$lang_guild['guild_leader'])." ($member[1])</td> 237 232 </tr>"; 238 233 } 239 234 240 235 $output .= "</table><br />"; 241 $ mysql->close();236 $sql->close(); 242 237 243 238 $output .= "<table class=\"hidden\"> … … 296 291 else redirect("guild.php?error=1"); 297 292 298 $ mysql = new MySQL;299 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);300 301 $char_data = $ mysql->query("SELECT data FROM `character` WHERE guid = '$guid' LIMIT 1");302 $data = $ mysql->result($char_data, 0, 'data');293 $sql = new SQL; 294 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 295 296 $char_data = $sql->query("SELECT data FROM `character` WHERE guid = '$guid' LIMIT 1"); 297 $data = $sql->result($char_data, 0, 'data'); 303 298 $data = explode(' ',$data); 304 299 $data[CHAR_DATA_OFFSET_GUILD_ID] = 0; 305 300 $data[CHAR_DATA_OFFSET_GUILD_RANK] = 0; 306 301 $data = implode(' ',$data); 307 $ mysql->query("UPDATE `character` SET data = '$data' WHERE guid = '$guid'");308 $ mysql->query("DELETE FROM guild_member WHERE guid = '$guid'");309 310 $ mysql->close();302 $sql->query("UPDATE `character` SET data = '$data' WHERE guid = '$guid'"); 303 $sql->query("DELETE FROM guild_member WHERE guid = '$guid'"); 304 305 $sql->close(); 311 306 redirect("guild.php?action=view_guild&id=$guld_id"); 312 307 } -
minimanager/header.php
r5 r19 15 15 require_once("scripts/config.php"); 16 16 if($debug) $tot_queries = 0; 17 require_once("scripts/db_layer.php"); 17 18 18 19 if (isset($_COOKIE["lang"])){ … … 22 23 23 24 if (isset($_COOKIE["css_template"])){ 24 $template = $_COOKIE["css_template"]; 25 if (is_dir("templates/$template")) { 26 if (is_file("templates/$template/$template"."_1024.css")) $css_template = $template; 27 } 25 if (is_dir("templates/".$_COOKIE["css_template"])) 26 if (is_file("templates/".$_COOKIE["css_template"]."/".$_COOKIE["css_template"]."_1024.css")) $css_template = $_COOKIE["css_template"]; 28 27 } 29 28 30 29 require_once("lang/$lang.php"); 31 30 require_once("scripts/global_lib.php"); 32 require_once("scripts/mysql.php"); 31 33 32 //application/xhtml+xml 34 33 $output .= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> … … 44 43 <script type=\"text/javascript\" src=\"js/general.js\"></script> 45 44 <script type=\"text/javascript\" src=\"js/layout.js\"></script> 46 47 <!--[if lte IE 7]> 45 <!--[if lte IE 7]> 48 46 <style> 49 47 #menuwrapper, #menubar ul a {height: 1%;} 50 48 a:active {width: auto;} 51 </style> 49 legend{margin:5px 0px 20px 0px;} 50 span.button{margin:15px 0px 0px 0px;} 51 </style> 52 52 <![endif]--> 53 53 54 54 </head> 55 <body onload=\"dynamicLayout(); Menu();\">55 <body onload=\"dynamicLayout();\"> 56 56 <center> 57 57 <table class=\"table_top\"> … … 61 61 if ( (isset($_SESSION['user_lvl'])) && (isset($_SESSION['uname'])) && (isset($_SESSION['realm_id']))&& (!isset($_GET['err'])) ){ 62 62 63 if(ini_get('max_execution_time') < 1200 ){ 64 if(!ini_set('max_execution_time',1200)) error("Error - max_execution_time not set.<br /> Please set it manually to 1200 or more, in php.ini for full functionality."); 63 if(ini_get('max_execution_time') < 1800){ 64 if(!ini_set('max_execution_time',0)) 65 error("Error - max_execution_time not set.<br /> Please set it manually to 0, in php.ini for full functionality."); 65 66 } 66 67 … … 72 73 $user_lvl = $_SESSION['user_lvl']; 73 74 $user_name = $_SESSION['uname']; 74 $realm_id = $_SESSION['realm_id'];75 75 $user_id = $_SESSION['user_id']; 76 $realm_id = (isset($_GET['r_id'])) ? addslashes($_GET['r_id']) : $_SESSION['realm_id']; 76 77 77 78 //override PHP error reporting … … 79 80 else error_reporting (E_COMPILE_ERROR); 80 81 81 $ mysql = new MySQL;82 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);83 $result = $ mysql->query("SELECT id,name FROM `realmlist` LIMIT 10");82 $sql = new SQL; 83 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 84 $result = $sql->query("SELECT id,name FROM `realmlist` LIMIT 10"); 84 85 85 86 $output .= "<div id=\"menuwrapper\"> … … 89 90 90 91 foreach ($menu_array[$user_lvl][1] as $trunk){ 91 $output .= "<li><a href=\"{$trunk[0]}\">{$lang_header[$trunk[1]]}</a>"; 92 $output .= "<li><a href=\"{$trunk[0]}\">{$lang_header[$trunk[1]]}<!--[if IE 7]><!--></a><!--<![endif]--> 93 <!--[if lte IE 6]><table><tr><td><![endif]-->"; 92 94 if(isset($trunk[2][0])) $output .= "<ul>"; 93 95 foreach ($trunk[2] as $branch){ … … 95 97 } 96 98 if(isset($trunk[2][0])) $output .= "</ul>"; 97 $output .= "< /li>";99 $output .= "<!--[if lte IE 6]></td></tr></table></a><![endif]--></li>"; 98 100 } 99 101 100 $output .= "<li><a class=\"trigger\" href=\"edit.php\">{$lang_header['my_acc']}</a> 102 $output .= "<li><a class=\"trigger\" href=\"edit.php\">{$lang_header['my_acc']}<!--[if IE 7]><!--></a><!--<![endif]--> 103 <!--[if lte IE 6]><table><tr><td><![endif]--> 101 104 <ul>"; 102 if ($ mysql->num_rows($result) > 1){103 while ($realm = $ mysql->fetch_row($result)){105 if ($sql->num_rows($result) > 1){ 106 while ($realm = $sql->fetch_row($result)){ 104 107 $set = ($realm[0] == $realm_id) ? ">" : ""; 105 108 $output .= "<li><a href=\"realm.php?action=set_def_realm&id=$realm[0]&url={$_SERVER['PHP_SELF']}\">$set $realm[1]</a></li>"; … … 110 113 <li><a href=\"logout.php\">{$lang_header['logout']}</a></li> 111 114 </ul> 115 <!--[if lte IE 6]></td></tr></table></a><![endif]--> 112 116 </li> 113 117 </ul> … … 120 124 </table>"; 121 125 122 $ mysql->close();126 $sql->close(); 123 127 124 128 } else { -
minimanager/index.php
r5 r19 13 13 14 14 require_once("scripts/get_lib.php"); 15 require_once("scripts\bbcode_lib.php"); 15 16 16 $ mysql = new MySQL;17 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);17 $sql = new SQL; 18 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 18 19 19 20 $output .= "<div class=\"top\">"; 20 21 if (test_port($server[$realm_id]['addr'],$server[$realm_id]['game_port'])) { 21 22 22 $query = $ mysql->query("SELECT uptime/60 FROM uptime ORDER BY starttime DESC LIMIT 1");23 $uptime = $ mysql->result($query, 0);23 $query = $sql->query("SELECT uptime/60 FROM uptime ORDER BY starttime DESC LIMIT 1"); 24 $uptime = $sql->result($query, 0); 24 25 $output .= "<h1><font color=\"#55aa55\">{$lang_index['realm']} ".get_realm_name($realm_id)." {$lang_index['online']} : (".(int)($uptime/60).":".(($uptime >= 60 )?(int)($uptime-60*(int)($uptime/60)):(int)$uptime)."h)</font></h1>"; 25 26 $online = true; … … 30 31 $output .= "Mangos: {$server[$realm_id]['rev']} Using DB: {$mangos_db[$realm_id]['db_rev']}</div>"; 31 32 32 $ mysql->db($mangos_db[$realm_id]['name']);33 $sql->db($mangos_db[$realm_id]['name']); 33 34 //MOTD part 34 $start = (isset($_GET['start'])) ? $ mysql->quote_smart($_GET['start']) : 0;35 $start = (isset($_GET['start'])) ? $sql->quote_smart($_GET['start']) : 0; 35 36 36 $query_1 = $ mysql->query("SELECT count(*) FROM bugreport");37 $all_record = $ mysql->result($query_1, 0);37 $query_1 = $sql->query("SELECT count(*) FROM bugreport"); 38 $all_record = $sql->result($query_1, 0); 38 39 40 if ($user_lvl > 0) $output .= "<script type=\"text/javascript\"> 41 answerbox.btn_ok='{$lang_global['yes_low']}'; 42 answerbox.btn_cancel='{$lang_global['no']}'; 43 var del_motd = 'motd.php?action=delete_motd&id='; 44 </script>"; 39 45 $output .= "<center> 40 46 <table class=\"lined\"> 41 47 <tr> 42 <t d class=\"head\"align=\"right\">";43 if ($user_lvl) $output .= "<a href=\"motd.php?action=add_motd\" class=\"head_link\">{$lang_index['add_motd']}</a>";48 <th align=\"right\">"; 49 if ($user_lvl) $output .= "<a href=\"motd.php?action=add_motd\">{$lang_index['add_motd']}</a>"; 44 50 $output .= "</td></tr>"; 45 51 if($all_record){ 46 $result = $ mysql->query("SELECT id, type, content FROM bugreport ORDER BY id DESC LIMIT $start, 3");47 while($post = $ mysql->fetch_row($result)){48 $output .= "<tr><td align=\"left\" class=\"large\"><blockquote> $post[2]</blockquote></td></tr>52 $result = $sql->query("SELECT id, type, content FROM bugreport ORDER BY id DESC LIMIT $start, 3"); 53 while($post = $sql->fetch_row($result)){ 54 $output .= "<tr><td align=\"left\" class=\"large\"><blockquote>".bbcode2html($post[2])."</blockquote></td></tr> 49 55 <tr><td align=\"right\">$post[1] "; 50 if ($user_lvl > 0) $output .= "<a href=\"motd.php?action=delete_motd&id=$post[0]\">{$lang_index['delete']}</a>"; 51 $output .= "</td></tr> 56 if ($user_lvl > 0) $output .= "<img src=\"img/cross.png\" width=\"12\" height=\"12\" onclick=\"answerBox('{$lang_global['delete']}: <font color=white>{$post[0]}</font><br />{$lang_global['are_you_sure']}', del_motd + $post[0]);\" style=\"cursor:pointer;\" /> 57 <a href=\"motd.php?action=edit_motd&id=$post[0]\"><img src=\"img/edit.png\" width=\"14\" height=\"14\" /></a>"; 58 $output .= "</th></tr> 52 59 <tr><td class=\"hidden\"></td></tr>"; 53 60 } … … 58 65 //print online chars 59 66 if ($online){ 60 $order_by = (isset($_GET['order_by'])) ? $ mysql->quote_smart($_GET['order_by']) : "name";67 $order_by = (isset($_GET['order_by'])) ? $sql->quote_smart($_GET['order_by']) : "name"; 61 68 62 $dir = (isset($_GET['dir'])) ? $ mysql->quote_smart($_GET['dir']) : 1;69 $dir = (isset($_GET['dir'])) ? $sql->quote_smart($_GET['dir']) : 1; 63 70 $order_dir = ($dir) ? "ASC" : "DESC"; 64 71 $dir = ($dir) ? 0 : 1; 65 72 66 $result = $ mysql->query("SELECT count(*) FROM `character` WHERE `online`= 1");67 $total_online = $ mysql->result($result, 0);73 $result = $sql->query("SELECT count(*) FROM `character` WHERE `online`= 1"); 74 $total_online = $sql->result($result, 0); 68 75 69 76 if( !$user_lvl && !$server[$realm_id]['both_factions']){ 70 $result = $ mysql->query("SELECT race FROM `character` WHERE account = '$user_id' AND totaltime = (SELECT MAX(totaltime) FROM `character` WHERE account = '$user_id') LIMIT 1");71 if ($ mysql->num_rows($result)){72 $order_side = (in_array($ mysql->result($result, 0, 'race'),array(2,5,6,8,10))) ?77 $result = $sql->query("SELECT race FROM `character` WHERE account = '$user_id' AND totaltime = (SELECT MAX(totaltime) FROM `character` WHERE account = '$user_id') LIMIT 1"); 78 if ($sql->num_rows($result)){ 79 $order_side = (in_array($sql->result($result, 0, 'race'),array(2,5,6,8,10))) ? 73 80 " AND race IN (2,5,6,8,10) " : " AND race IN (1,3,4,7,11) "; 74 81 } else $order_side = ""; … … 77 84 require_once("scripts/defines.php"); 78 85 79 $result = $ mysql->query("SELECT guid,name,race,class,position_x,position_y,map,86 $result = $sql->query("SELECT guid,name,race,class,zone,map, 80 87 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_KILL+1)."), ' ', -1) AS UNSIGNED) AS highest_rank, 81 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1) AS UNSIGNED) AS level,account 88 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1) AS UNSIGNED) AS level,account 82 89 FROM `character` WHERE `online`= 1 $order_side ORDER BY $order_by $order_dir"); 83 90 … … 86 93 <table class=\"lined\"> 87 94 <tr> 88 <t d width=\"22%\" class=\"head\"><a href=\"index.php?order_by=name&dir=$dir\" class=\"head_link\">{$lang_index['name']}</a></td>89 <t d width=\"10%\" class=\"head\"><a href=\"index.php?order_by=race&dir=$dir\" class=\"head_link\">{$lang_index['race']}</a></td>90 <t d width=\"10%\" class=\"head\"><a href=\"index.php?order_by=class&dir=$dir\" class=\"head_link\">{$lang_index['class']}</a></td>91 <t d width=\"5%\" class=\"head\"><a href=\"index.php?order_by=level&dir=$dir\" class=\"head_link\">{$lang_index['level']}</a></td>92 <t d width=\"20%\" class=\"head\"><a href=\"index.php?order_by=map&dir=$dir\" class=\"head_link\">{$lang_index['map']}</a></td>93 <t d width=\"25%\" class=\"head\">{$lang_index['zone']}</td>94 <t d width=\"8%\" class=\"head\"><a href=\"index.php?order_by=highest_rank&dir=$dir\" class=\"head_link\">{$lang_index['honor_kills']}</a></td>95 <th width=\"26%\"><a href=\"index.php?order_by=name&dir=$dir\">".($order_by=='name' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_index['name']}</a></th> 96 <th width=\"7%\"><a href=\"index.php?order_by=race&dir=$dir\">".($order_by=='race' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_index['race']}</a></th> 97 <th width=\"7%\"><a href=\"index.php?order_by=class&dir=$dir\">".($order_by=='class' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_index['class']}</a></th> 98 <th width=\"7%\"><a href=\"index.php?order_by=level&dir=$dir\">".($order_by=='level' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_index['level']}</a></th> 99 <th width=\"20%\"><a href=\"index.php?order_by=map&dir=$dir\">".($order_by=='map' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_index['map']}</a></th> 100 <th width=\"25%\">{$lang_index['zone']}</td> 101 <th width=\"10%\"><a href=\"index.php?order_by=highest_rank&dir=$dir\">".($order_by=='highest_rank' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_index['honor_kills']}</a></th> 95 102 </tr>"; 96 103 97 104 require_once("scripts/id_tab.php"); 98 105 99 while($char = $ mysql->fetch_row($result)){106 while($char = $sql->fetch_row($result)){ 100 107 $output .= "<tr> 101 108 <td><a href=\"char.php?id=$char[0]\">$char[1]</a></td> 102 <td>".get_player_race($char[2])."</td> 103 <td>".get_player_class($char[3])."</td> 104 <td>$char[8]</td> 105 <td>".get_map_name($char[6])."</td> 106 <td>".get_zone_name($char[6], $char[4], $char[5])."</td> 109 <td><img src='img/c_icons/{$char[2]}-0.gif' onmousemove='toolTip(\"".get_player_race($char[2])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td> 110 <td><img src='img/c_icons/{$char[3]}.gif' onmousemove='toolTip(\"".get_player_class($char[3])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td> 107 111 <td>$char[7]</td> 112 <td>".get_map_name($char[5])."</td> 113 <td>".get_zone_name($char[4])."</td> 114 <td>$char[6]</td> 108 115 </tr>"; 109 116 } 110 117 $output .= "</table><br /></center>"; 111 118 } 112 $ mysql->close();119 $sql->close(); 113 120 114 121 require_once("footer.php"); -
minimanager/item.php
r5 r19 22 22 global $lang_global, $lang_item, $lang_item_edit, $lang_id_tab, $output, $mangos_db, $realm_id, $itemset_id; 23 23 24 $ mysql = new MySQL;25 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);26 27 $result = $ mysql->query("SELECT count(*) FROM item_template");28 $tot_items = $ mysql->result($result, 0);29 $ mysql->close();24 $sql = new SQL; 25 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 26 27 $result = $sql->query("SELECT count(*) FROM item_template"); 28 $tot_items = $sql->result($result, 0); 29 $sql->close(); 30 30 31 31 $output .= "<center> … … 170 170 &&(!isset($_POST['ItemLevel'])||$_POST['ItemLevel'] === '')&&(!isset($_POST['itemset'])||$_POST['itemset'] === '')&&(!isset($_POST['Flags'])||$_POST['Flags'] === '') 171 171 &&(!isset($_POST['custom_search'])||$_POST['custom_search'] === '')) 172 {173 172 redirect("item.php?error=1"); 174 } 175 176 $mysql = new MySQL; 177 $mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 178 179 $class = $mysql->quote_smart($_POST['class']); 180 $Quality = $mysql->quote_smart($_POST['Quality']); 181 $InventoryType = $mysql->quote_smart($_POST['InventoryType']); 182 $bonding = $mysql->quote_smart($_POST['bonding']); 183 184 if ($_POST['entry'] != '') $entry = $mysql->quote_smart($_POST['entry']); 185 if ($_POST['name'] != '') $name = $mysql->quote_smart($_POST['name']); 186 if ($_POST['displayid'] != '') $displayid = $mysql->quote_smart($_POST['displayid']); 187 if ($_POST['RequiredLevel'] != '') $RequiredLevel = $mysql->quote_smart($_POST['RequiredLevel']); 188 if ($_POST['spellid_1'] != '') $spellid_1 = $mysql->quote_smart($_POST['spellid_1']); 189 if ($_POST['spellid_2'] != '') $spellid_2 = $mysql->quote_smart($_POST['spellid_2']); 190 if ($_POST['spellid_3'] != '') $spellid_3 = $mysql->quote_smart($_POST['spellid_3']); 191 if ($_POST['spellid_4'] != '') $spellid_4 = $mysql->quote_smart($_POST['spellid_4']); 192 if ($_POST['ItemLevel'] != '') $ItemLevel = $mysql->quote_smart($_POST['ItemLevel']); 193 if ($_POST['itemset'] != '') $itemset = $mysql->quote_smart($_POST['itemset']); 194 if ($_POST['Flags'] != '') $Flags = $mysql->quote_smart($_POST['Flags']); 195 if ($_POST['custom_search'] != '') $custom_search = $mysql->quote_smart($_POST['custom_search']); 173 174 $sql = new SQL; 175 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 176 177 $class = $sql->quote_smart($_POST['class']); 178 $Quality = $sql->quote_smart($_POST['Quality']); 179 $InventoryType = $sql->quote_smart($_POST['InventoryType']); 180 $bonding = $sql->quote_smart($_POST['bonding']); 181 182 if ($_POST['entry'] != '') $entry = $sql->quote_smart($_POST['entry']); 183 if ($_POST['name'] != '') $name = $sql->quote_smart($_POST['name']); 184 if ($_POST['displayid'] != '') $displayid = $sql->quote_smart($_POST['displayid']); 185 if ($_POST['RequiredLevel'] != '') $RequiredLevel = $sql->quote_smart($_POST['RequiredLevel']); 186 if ($_POST['spellid_1'] != '') $spellid_1 = $sql->quote_smart($_POST['spellid_1']); 187 if ($_POST['spellid_2'] != '') $spellid_2 = $sql->quote_smart($_POST['spellid_2']); 188 if ($_POST['spellid_3'] != '') $spellid_3 = $sql->quote_smart($_POST['spellid_3']); 189 if ($_POST['spellid_4'] != '') $spellid_4 = $sql->quote_smart($_POST['spellid_4']); 190 if ($_POST['ItemLevel'] != '') $ItemLevel = $sql->quote_smart($_POST['ItemLevel']); 191 if ($_POST['itemset'] != '') $itemset = $sql->quote_smart($_POST['itemset']); 192 if ($_POST['Flags'] != '') $Flags = $sql->quote_smart($_POST['Flags']); 193 if ($_POST['custom_search'] != '') $custom_search = $sql->quote_smart($_POST['custom_search']); 196 194 else $custom_search = ""; 197 195 … … 218 216 if($where == "WHERE entry > 0 ") redirect("item.php?error=1"); 219 217 220 $result = $ mysql->query("SELECT entry,displayid,name,RequiredLevel,ItemLevel FROM item_template $where ORDER BY entry LIMIT $sql_search_limit");221 $total_items_found = $ mysql->num_rows($result);218 $result = $sql->query("SELECT entry,displayid,name,RequiredLevel,ItemLevel FROM item_template $where ORDER BY entry LIMIT $sql_search_limit"); 219 $total_items_found = $sql->num_rows($result); 222 220 223 221 $output .= "<center> … … 231 229 $output .= "<table class=\"lined\"> 232 230 <tr> 233 <t d width=\"15%\" class=\"head\">{$lang_item_edit['entry']}</td>234 <t d width=\"10%\" class=\"head\">{$lang_item_edit['display_id']}</td>235 <t d width=\"55%\" class=\"head\">{$lang_item_edit['item_name']}</td>236 <t d width=\"10%\" class=\"head\">{$lang_item_edit['req_level']}</td>237 <t d width=\"10%\" class=\"head\">{$lang_item_edit['item_level']}</td>231 <th width=\"15%\">{$lang_item_edit['entry']}</th> 232 <th width=\"10%\">{$lang_item_edit['display_id']}</th> 233 <th width=\"55%\">{$lang_item_edit['item_name']}</th> 234 <th width=\"10%\">{$lang_item_edit['req_level']}</th> 235 <th width=\"10%\">{$lang_item_edit['item_level']}</th> 238 236 </tr>"; 239 237 … … 241 239 242 240 for ($i=1; $i<=$total_items_found; $i++){ 243 $item = $ mysql->fetch_row($result);241 $item = $sql->fetch_row($result); 244 242 245 243 $tooltip = get_item_tooltip($item[0]); … … 257 255 $output .= "</table></center><br />"; 258 256 259 $ mysql->close();257 $sql->close(); 260 258 } 261 259 … … 1448 1446 if (!isset($_GET['entry'])) redirect("item.php?error=1"); 1449 1447 1450 $ mysql = new MySQL;1451 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);1452 1453 $entry = $ mysql->quote_smart($_GET['entry']);1454 $result = $ mysql->query("SELECT * FROM item_template WHERE entry = '$entry'");1448 $sql = new SQL; 1449 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 1450 1451 $entry = $sql->quote_smart($_GET['entry']); 1452 $result = $sql->query("SELECT * FROM item_template WHERE entry = '$entry'"); 1455 1453 1456 1454 if ($result){ 1457 $item = $ mysql->fetch_assoc($result);1455 $item = $sql->fetch_assoc($result); 1458 1456 require_once("scripts/get_lib.php"); 1459 1457 $tooltip = get_item_tooltip($entry); … … 2856 2854 <tr class=\"large_bold\"><td colspan=\"4\" class=\"hidden\" align=\"left\">{$lang_item_edit['dropped_by']}: {$lang_item_edit['top_x']}</td></tr> 2857 2855 <tr> 2858 <t d width=\"35%\" class=\"head\">{$lang_item_edit['mob_name']}</td>2859 <t d width=\"15%\" class=\"head\">{$lang_item_edit['mob_level']}</td>2860 <t d width=\"25%\" class=\"head\">{$lang_item_edit['mob_drop_chance']}</td>2861 <t d width=\"25%\" class=\"head\">{$lang_item_edit['mob_quest_drop_chance']}</td>2856 <th width=\"35%\">{$lang_item_edit['mob_name']}</th> 2857 <th width=\"15%\">{$lang_item_edit['mob_level']}</th> 2858 <th width=\"25%\">{$lang_item_edit['mob_drop_chance']}</th> 2859 <th width=\"25%\">{$lang_item_edit['mob_quest_drop_chance']}</th> 2862 2860 </tr>"; 2863 2861 2864 $result2 = $ mysql->query("SELECT entry,ChanceOrRef,QuestChanceOrGroup FROM creature_loot_template WHERE item = {$item['entry']} ORDER BY QuestChanceOrGroup,ChanceOrRef DESC LIMIT 5");2865 while ($info = $ mysql->fetch_row($result2)){2866 $result3 = $ mysql->query("SELECT entry,name,maxlevel FROM creature_template WHERE lootid = {$info[0]} LIMIT 1");2867 while ($mob = $ mysql->fetch_row($result3)){2862 $result2 = $sql->query("SELECT entry,ChanceOrRef,QuestChanceOrGroup FROM creature_loot_template WHERE item = {$item['entry']} ORDER BY QuestChanceOrGroup,ChanceOrRef DESC LIMIT 5"); 2863 while ($info = $sql->fetch_row($result2)){ 2864 $result3 = $sql->query("SELECT entry,name,maxlevel FROM creature_template WHERE lootid = {$info[0]} LIMIT 1"); 2865 while ($mob = $sql->fetch_row($result3)){ 2868 2866 $output .= "<tr><td><a class=\"tooltip\" href=\"creature.php?action=edit&entry=$mob[0]&error=4\" target=\"_blank\">$mob[1]</a></td> 2869 2867 <td>$mob[2]</td> … … 2873 2871 } 2874 2872 2875 $result2 = $ mysql->query("SELECT entry,name,maxlevel FROM creature_template WHERE entry IN (SELECT entry FROM npc_vendor WHERE item = {$item['entry']}) ORDER BY maxlevel DESC LIMIT 5");2876 if ($ mysql->num_rows($result2)){2873 $result2 = $sql->query("SELECT entry,name,maxlevel FROM creature_template WHERE entry IN (SELECT entry FROM npc_vendor WHERE item = {$item['entry']}) ORDER BY maxlevel DESC LIMIT 5"); 2874 if ($sql->num_rows($result2)){ 2877 2875 $output .= "<tr class=\"large_bold\"><td colspan=\"4\" class=\"hidden\" align=\"left\">{$lang_item_edit['soled_by']}: {$lang_item_edit['limit_x']}</td></tr>"; 2878 while ($mob = $ mysql->fetch_row($result2)){2876 while ($mob = $sql->fetch_row($result2)){ 2879 2877 $output .= "<tr><td width=\"20%\">$mob[2]</td> 2880 2878 <td width=\"80%\" colspan=\"3\" align=\"left\"><a class=\"tooltip\" href=\"creature.php?action=edit&entry=$mob[0]&error=4\" target=\"_blank\">$mob[1]</a></td></tr>"; … … 2882 2880 } 2883 2881 2884 $result2 = $ mysql->query("SELECT entry,title,QuestLevel FROM quest_template WHERE ( SrcItemId = {$item['entry']} OR ReqItemId1 = {$item['entry']} OR2882 $result2 = $sql->query("SELECT entry,title,QuestLevel FROM quest_template WHERE ( SrcItemId = {$item['entry']} OR ReqItemId1 = {$item['entry']} OR 2885 2883 ReqItemId2 = {$item['entry']} OR ReqItemId3 = {$item['entry']} OR ReqItemId4 = {$item['entry']} OR RewItemId1 = {$item['entry']} OR 2886 2884 RewItemId2 = {$item['entry']} OR RewItemId3 = {$item['entry']} OR RewItemId4 = {$item['entry']} ) ORDER BY QuestLevel DESC"); 2887 if ($ mysql->num_rows($result2)){2885 if ($sql->num_rows($result2)){ 2888 2886 $output .= "<tr class=\"large_bold\"><td colspan=\"4\" class=\"hidden\" align=\"left\">{$lang_item_edit['involved_in_quests']}:</td></tr>"; 2889 while ($quest = $ mysql->fetch_row($result2)){2887 while ($quest = $sql->fetch_row($result2)){ 2890 2888 $output .= "<tr><td width=\"20%\">id: $quest[0]</td> 2891 2889 <td width=\"80%\" colspan=\"3\" align=\"left\"><a class=\"tooltip\" href=\"$quest_datasite$quest[0]\" target=\"_blank\">($quest[2]) $quest[1]</a></td></tr>"; … … 2894 2892 } 2895 2893 2896 $result2 = $ mysql->query("SELECT entry,title,QuestLevel FROM quest_template WHERE ( RewChoiceItemId1 = {$item['entry']} OR RewChoiceItemId2 = {$item['entry']} OR2894 $result2 = $sql->query("SELECT entry,title,QuestLevel FROM quest_template WHERE ( RewChoiceItemId1 = {$item['entry']} OR RewChoiceItemId2 = {$item['entry']} OR 2897 2895 RewChoiceItemId3 = {$item['entry']} OR RewChoiceItemId4 = {$item['entry']} OR RewChoiceItemId5 = {$item['entry']} OR RewChoiceItemId6 = {$item['entry']} ) 2898 2896 ORDER BY QuestLevel DESC"); 2899 if ($ mysql->num_rows($result2)){2897 if ($sql->num_rows($result2)){ 2900 2898 $output .= "<tr class=\"large_bold\"><td colspan=\"4\" class=\"hidden\" align=\"left\">{$lang_item_edit['reward_from_quest']}:</td></tr>"; 2901 while ($quest = $ mysql->fetch_row($result2)){2899 while ($quest = $sql->fetch_row($result2)){ 2902 2900 $output .= "<tr><td width=\"20%\">id: $quest[0]</td> 2903 2901 <td width=\"80%\" colspan=\"3\" align=\"left\"><a class=\"tooltip\" href=\"$quest_datasite$quest[0]\" target=\"_blank\">($quest[2]) $quest[1]</a></td></tr>"; … … 2916 2914 $row_flag = 0; 2917 2915 $output .= "<table class=\"hidden\" align=\"center\"><tr>"; 2918 $result1 = $ mysql->query("SELECT item,ChanceOrRef,QuestChanceOrGroup,mincount,maxcount,quest_freeforall FROM disenchant_loot_template WHERE entry = {$item['DisenchantID']} ORDER BY ChanceOrRef DESC");2919 while ($item = $ mysql->fetch_row($result1)){2916 $result1 = $sql->query("SELECT item,ChanceOrRef,QuestChanceOrGroup,mincount,maxcount,quest_freeforall FROM disenchant_loot_template WHERE entry = {$item['DisenchantID']} ORDER BY ChanceOrRef DESC"); 2917 while ($item = $sql->fetch_row($result1)){ 2920 2918 $cel_counter++; 2921 2919 $tooltip = get_item_name($item[0])." ($item[0])<br />{$lang_item_edit['drop_chance']}: $item[1]%<br />{$lang_item_edit['quest_drop_chance']}: $item[2]%<br />{$lang_item_edit['drop_chance']}: $item[3]-$item[4]<br />{$lang_item_edit['quest_freeforall']}: $item[5]"; … … 2973 2971 2974 2972 2975 $ mysql->close();2973 $sql->close(); 2976 2974 } else { 2977 $ mysql->close();2975 $sql->close(); 2978 2976 error($lang_item_edit['item_not_found']); 2979 2977 exit(); … … 2991 2989 if (!isset($_POST['entry']) || $_POST['entry'] === '') redirect("item.php?error=1"); 2992 2990 2993 $ mysql = new MySQL;2994 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);2995 2996 $entry = $ mysql->quote_smart($_POST['entry']);2997 if (isset($_POST['class']) && $_POST['class'] != '') $class = $ mysql->quote_smart($_POST['class']);2991 $sql = new SQL; 2992 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 2993 2994 $entry = $sql->quote_smart($_POST['entry']); 2995 if (isset($_POST['class']) && $_POST['class'] != '') $class = $sql->quote_smart($_POST['class']); 2998 2996 else $class = 0; 2999 if (isset($_POST['subclass']) && $_POST['subclass'] != '') $subclass = $ mysql->quote_smart($_POST['subclass']);2997 if (isset($_POST['subclass']) && $_POST['subclass'] != '') $subclass = $sql->quote_smart($_POST['subclass']); 3000 2998 else $subclass = 0; 3001 if (isset($_POST['name']) && $_POST['name'] != '') $name = $ mysql->quote_smart($_POST['name']);2999 if (isset($_POST['name']) && $_POST['name'] != '') $name = $sql->quote_smart($_POST['name']); 3002 3000 else $name = 0; 3003 if (isset($_POST['displayid']) && $_POST['displayid'] != '') $displayid = $ mysql->quote_smart($_POST['displayid']);3001 if (isset($_POST['displayid']) && $_POST['displayid'] != '') $displayid = $sql->quote_smart($_POST['displayid']); 3004 3002 else $displayid = 0; 3005 if (isset($_POST['Quality']) && $_POST['Quality'] != '') $Quality = $ mysql->quote_smart($_POST['Quality']);3003 if (isset($_POST['Quality']) && $_POST['Quality'] != '') $Quality = $sql->quote_smart($_POST['Quality']); 3006 3004 else $Quality = 0; 3007 if (isset($_POST['Flags']) && $_POST['Flags'] != '') $Flags = $ mysql->quote_smart($_POST['Flags']);3005 if (isset($_POST['Flags']) && $_POST['Flags'] != '') $Flags = $sql->quote_smart($_POST['Flags']); 3008 3006 else $Flags = 0; 3009 if (isset($_POST['BuyCount']) && $_POST['BuyCount'] != '') $BuyCount = $ mysql->quote_smart($_POST['BuyCount']);3007 if (isset($_POST['BuyCount']) && $_POST['BuyCount'] != '') $BuyCount = $sql->quote_smart($_POST['BuyCount']); 3010 3008 else $BuyCount = 0; 3011 if (isset($_POST['BuyPrice']) && $_POST['BuyPrice'] != '') $BuyPrice = $ mysql->quote_smart($_POST['BuyPrice']);3009 if (isset($_POST['BuyPrice']) && $_POST['BuyPrice'] != '') $BuyPrice = $sql->quote_smart($_POST['BuyPrice']); 3012 3010 else $BuyPrice = 0; 3013 if (isset($_POST['SellPrice']) && $_POST['SellPrice'] != '') $SellPrice = $ mysql->quote_smart($_POST['SellPrice']);3011 if (isset($_POST['SellPrice']) && $_POST['SellPrice'] != '') $SellPrice = $sql->quote_smart($_POST['SellPrice']); 3014 3012 else $SellPrice = 0; 3015 if (isset($_POST['InventoryType']) && $_POST['InventoryType'] != '') $InventoryType = $ mysql->quote_smart($_POST['InventoryType']);3013 if (isset($_POST['InventoryType']) && $_POST['InventoryType'] != '') $InventoryType = $sql->quote_smart($_POST['InventoryType']); 3016 3014 else $AllowableClass = 0; 3017 if (isset($_POST['AllowableClass'])) $AllowableClass = $ mysql->quote_smart($_POST['AllowableClass']);3015 if (isset($_POST['AllowableClass'])) $AllowableClass = $sql->quote_smart($_POST['AllowableClass']); 3018 3016 else $AllowableClass = -1; 3019 if (isset($_POST['AllowableRace'])) $AllowableRace = $ mysql->quote_smart($_POST['AllowableRace']);3017 if (isset($_POST['AllowableRace'])) $AllowableRace = $sql->quote_smart($_POST['AllowableRace']); 3020 3018 else $AllowableRace = -1; 3021 if (isset($_POST['ItemLevel']) && $_POST['ItemLevel'] != '') $ItemLevel = $ mysql->quote_smart($_POST['ItemLevel']);3019 if (isset($_POST['ItemLevel']) && $_POST['ItemLevel'] != '') $ItemLevel = $sql->quote_smart($_POST['ItemLevel']); 3022 3020 else $ItemLevel = 1; 3023 if (isset($_POST['RequiredLevel']) && $_POST['RequiredLevel'] != '') $RequiredLevel = $ mysql->quote_smart($_POST['RequiredLevel']);3021 if (isset($_POST['RequiredLevel']) && $_POST['RequiredLevel'] != '') $RequiredLevel = $sql->quote_smart($_POST['RequiredLevel']); 3024 3022 else $RequiredLevel = 0; 3025 if (isset($_POST['RequiredSkill']) && $_POST['RequiredSkill'] != '') $RequiredSkill = $ mysql->quote_smart($_POST['RequiredSkill']);3023 if (isset($_POST['RequiredSkill']) && $_POST['RequiredSkill'] != '') $RequiredSkill = $sql->quote_smart($_POST['RequiredSkill']); 3026 3024 else $RequiredSkill = 0; 3027 if (isset($_POST['RequiredSkillRank']) && $_POST['RequiredSkillRank'] != '') $RequiredSkillRank = $ mysql->quote_smart($_POST['RequiredSkillRank']);3025 if (isset($_POST['RequiredSkillRank']) && $_POST['RequiredSkillRank'] != '') $RequiredSkillRank = $sql->quote_smart($_POST['RequiredSkillRank']); 3028 3026 else $RequiredSkillRank = 0; 3029 if (isset($_POST['requiredspell']) && $_POST['requiredspell'] != '') $requiredspell = $ mysql->quote_smart($_POST['requiredspell']);3027 if (isset($_POST['requiredspell']) && $_POST['requiredspell'] != '') $requiredspell = $sql->quote_smart($_POST['requiredspell']); 3030 3028 else $requiredspell = 0; 3031 if (isset($_POST['requiredhonorrank']) && $_POST['requiredhonorrank'] != '') $requiredhonorrank = $ mysql->quote_smart($_POST['requiredhonorrank']);3029 if (isset($_POST['requiredhonorrank']) && $_POST['requiredhonorrank'] != '') $requiredhonorrank = $sql->quote_smart($_POST['requiredhonorrank']); 3032 3030 else $requiredhonorrank = 0; 3033 if (isset($_POST['RequiredCityRank']) && $_POST['RequiredCityRank'] != '') $RequiredCityRank = $ mysql->quote_smart($_POST['RequiredCityRank']);3031 if (isset($_POST['RequiredCityRank']) && $_POST['RequiredCityRank'] != '') $RequiredCityRank = $sql->quote_smart($_POST['RequiredCityRank']); 3034 3032 else $RequiredCityRank = 0; 3035 if (isset($_POST['RequiredReputationFaction']) && $_POST['RequiredReputationFaction'] != '') $RequiredReputationFaction = $ mysql->quote_smart($_POST['RequiredReputationFaction']);3033 if (isset($_POST['RequiredReputationFaction']) && $_POST['RequiredReputationFaction'] != '') $RequiredReputationFaction = $sql->quote_smart($_POST['RequiredReputationFaction']); 3036 3034 else $RequiredReputationFaction = 0; 3037 if (isset($_POST['RequiredReputationRank']) && $_POST['RequiredReputationRank'] != '') $RequiredReputationRank = $ mysql->quote_smart($_POST['RequiredReputationRank']);3035 if (isset($_POST['RequiredReputationRank']) && $_POST['RequiredReputationRank'] != '') $RequiredReputationRank = $sql->quote_smart($_POST['RequiredReputationRank']); 3038 3036 else $RequiredReputationRank = 0; 3039 if (isset($_POST['maxcount']) && $_POST['maxcount'] != '') $maxcount = $ mysql->quote_smart($_POST['maxcount']);3037 if (isset($_POST['maxcount']) && $_POST['maxcount'] != '') $maxcount = $sql->quote_smart($_POST['maxcount']); 3040 3038 else $maxcount = 0; 3041 if (isset($_POST['stackable']) && $_POST['stackable'] != '') $stackable = $ mysql->quote_smart($_POST['stackable']);3039 if (isset($_POST['stackable']) && $_POST['stackable'] != '') $stackable = $sql->quote_smart($_POST['stackable']); 3042 3040 else $description = 0; 3043 if (isset($_POST['ContainerSlots']) && $_POST['ContainerSlots'] != '') $ContainerSlots = $ mysql->quote_smart($_POST['ContainerSlots']);3041 if (isset($_POST['ContainerSlots']) && $_POST['ContainerSlots'] != '') $ContainerSlots = $sql->quote_smart($_POST['ContainerSlots']); 3044 3042 else $ContainerSlots = 0; 3045 if (isset($_POST['stat_type1']) && $_POST['stat_type1'] != '') $stat_type1 = $ mysql->quote_smart($_POST['stat_type1']);3043 if (isset($_POST['stat_type1']) && $_POST['stat_type1'] != '') $stat_type1 = $sql->quote_smart($_POST['stat_type1']); 3046 3044 else $stat_type1 = 0; 3047 if (isset($_POST['stat_value1']) && $_POST['stat_value1'] != '') $stat_value1 = $ mysql->quote_smart($_POST['stat_value1']);3045 if (isset($_POST['stat_value1']) && $_POST['stat_value1'] != '') $stat_value1 = $sql->quote_smart($_POST['stat_value1']); 3048 3046 else $stat_value1 = 0; 3049 if (isset($_POST['stat_type2']) && $_POST['stat_type2'] != '') $stat_type2 = $ mysql->quote_smart($_POST['stat_type2']);3047 if (isset($_POST['stat_type2']) && $_POST['stat_type2'] != '') $stat_type2 = $sql->quote_smart($_POST['stat_type2']); 3050 3048 else $stat_type2 = 0; 3051 if (isset($_POST['stat_value2']) && $_POST['stat_value2'] != '') $stat_value2 = $ mysql->quote_smart($_POST['stat_value2']);3049 if (isset($_POST['stat_value2']) && $_POST['stat_value2'] != '') $stat_value2 = $sql->quote_smart($_POST['stat_value2']); 3052 3050 else $stat_value2 = 0; 3053 if (isset($_POST['stat_type3']) && $_POST['stat_type3'] != '') $stat_type3 = $ mysql->quote_smart($_POST['stat_type3']);3051 if (isset($_POST['stat_type3']) && $_POST['stat_type3'] != '') $stat_type3 = $sql->quote_smart($_POST['stat_type3']); 3054 3052 else $stat_type3 = 0; 3055 if (isset($_POST['stat_value3']) && $_POST['stat_value3'] != '') $stat_value3 = $ mysql->quote_smart($_POST['stat_value3']);3053 if (isset($_POST['stat_value3']) && $_POST['stat_value3'] != '') $stat_value3 = $sql->quote_smart($_POST['stat_value3']); 3056 3054 else $stat_value3 = 0; 3057 if (isset($_POST['stat_type4']) && $_POST['stat_type4'] != '') $stat_type4 = $ mysql->quote_smart($_POST['stat_type4']);3055 if (isset($_POST['stat_type4']) && $_POST['stat_type4'] != '') $stat_type4 = $sql->quote_smart($_POST['stat_type4']); 3058 3056 else $stat_type4 = 0; 3059 if (isset($_POST['stat_value4']) && $_POST['stat_value4'] != '') $stat_value4 = $ mysql->quote_smart($_POST['stat_value4']);3057 if (isset($_POST['stat_value4']) && $_POST['stat_value4'] != '') $stat_value4 = $sql->quote_smart($_POST['stat_value4']); 3060 3058 else $stat_value4 = 0; 3061 if (isset($_POST['stat_type5']) && $_POST['stat_type5'] != '') $stat_type5 = $ mysql->quote_smart($_POST['stat_type5']);3059 if (isset($_POST['stat_type5']) && $_POST['stat_type5'] != '') $stat_type5 = $sql->quote_smart($_POST['stat_type5']); 3062 3060 else $stat_type5 = 0; 3063 if (isset($_POST['stat_value5']) && $_POST['stat_value5'] != '') $stat_value5 = $ mysql->quote_smart($_POST['stat_value5']);3061 if (isset($_POST['stat_value5']) && $_POST['stat_value5'] != '') $stat_value5 = $sql->quote_smart($_POST['stat_value5']); 3064 3062 else $stat_value5 = 0; 3065 if (isset($_POST['stat_type6']) && $_POST['stat_type6'] != '') $stat_type6 = $ mysql->quote_smart($_POST['stat_type6']);3063 if (isset($_POST['stat_type6']) && $_POST['stat_type6'] != '') $stat_type6 = $sql->quote_smart($_POST['stat_type6']); 3066 3064 else $stat_type6 = 0; 3067 if (isset($_POST['stat_value6']) && $_POST['stat_value6'] != '') $stat_value6 = $ mysql->quote_smart($_POST['stat_value6']);3065 if (isset($_POST['stat_value6']) && $_POST['stat_value6'] != '') $stat_value6 = $sql->quote_smart($_POST['stat_value6']); 3068 3066 else $stat_value6 = 0; 3069 if (isset($_POST['stat_type7']) && $_POST['stat_type7'] != '') $stat_type7 = $ mysql->quote_smart($_POST['stat_type7']);3067 if (isset($_POST['stat_type7']) && $_POST['stat_type7'] != '') $stat_type7 = $sql->quote_smart($_POST['stat_type7']); 3070 3068 else $stat_type7 = 0; 3071 if (isset($_POST['stat_value7']) && $_POST['stat_value7'] != '') $stat_value7 = $ mysql->quote_smart($_POST['stat_value7']);3069 if (isset($_POST['stat_value7']) && $_POST['stat_value7'] != '') $stat_value7 = $sql->quote_smart($_POST['stat_value7']); 3072 3070 else $stat_value7 = 0; 3073 if (isset($_POST['stat_type8']) && $_POST['stat_type8'] != '') $stat_type8 = $ mysql->quote_smart($_POST['stat_type8']);3071 if (isset($_POST['stat_type8']) && $_POST['stat_type8'] != '') $stat_type8 = $sql->quote_smart($_POST['stat_type8']); 3074 3072 else $stat_type8 = 0; 3075 if (isset($_POST['stat_value8']) && $_POST['stat_value8'] != '') $stat_value8 = $ mysql->quote_smart($_POST['stat_value8']);3073 if (isset($_POST['stat_value8']) && $_POST['stat_value8'] != '') $stat_value8 = $sql->quote_smart($_POST['stat_value8']); 3076 3074 else $stat_value8 = 0; 3077 if (isset($_POST['stat_type9']) && $_POST['stat_type9'] != '') $stat_type9 = $ mysql->quote_smart($_POST['stat_type9']);3075 if (isset($_POST['stat_type9']) && $_POST['stat_type9'] != '') $stat_type9 = $sql->quote_smart($_POST['stat_type9']); 3078 3076 else $stat_type9 = 0; 3079 if (isset($_POST['stat_value9']) && $_POST['stat_value9'] != '') $stat_value9 = $ mysql->quote_smart($_POST['stat_value9']);3077 if (isset($_POST['stat_value9']) && $_POST['stat_value9'] != '') $stat_value9 = $sql->quote_smart($_POST['stat_value9']); 3080 3078 else $stat_value9 = 0; 3081 if (isset($_POST['stat_type10']) && $_POST['stat_type10'] != '') $stat_type10 = $ mysql->quote_smart($_POST['stat_type10']);3079 if (isset($_POST['stat_type10']) && $_POST['stat_type10'] != '') $stat_type10 = $sql->quote_smart($_POST['stat_type10']); 3082 3080 else $stat_type10 = 0; 3083 if (isset($_POST['stat_value10']) && $_POST['stat_value10'] != '') $stat_value10 = $ mysql->quote_smart($_POST['stat_value10']);3081 if (isset($_POST['stat_value10']) && $_POST['stat_value10'] != '') $stat_value10 = $sql->quote_smart($_POST['stat_value10']); 3084 3082 else $stat_value10 = 0; 3085 if (isset($_POST['dmg_min1']) && $_POST['dmg_min1'] != '') $dmg_min1 = $ mysql->quote_smart($_POST['dmg_min1']);3083 if (isset($_POST['dmg_min1']) && $_POST['dmg_min1'] != '') $dmg_min1 = $sql->quote_smart($_POST['dmg_min1']); 3086 3084 else $dmg_min1 = 0; 3087 if (isset($_POST['dmg_max1']) && $_POST['dmg_max1'] != '') $dmg_max1 = $ mysql->quote_smart($_POST['dmg_max1']);3085 if (isset($_POST['dmg_max1']) && $_POST['dmg_max1'] != '') $dmg_max1 = $sql->quote_smart($_POST['dmg_max1']); 3088 3086 else $dmg_max1 = 0; 3089 if (isset($_POST['dmg_type1']) && $_POST['dmg_type1'] != '') $dmg_type1 = $ mysql->quote_smart($_POST['dmg_type1']);3087 if (isset($_POST['dmg_type1']) && $_POST['dmg_type1'] != '') $dmg_type1 = $sql->quote_smart($_POST['dmg_type1']); 3090 3088 else $dmg_type1 = 0; 3091 if (isset($_POST['dmg_min2']) && $_POST['dmg_min2'] != '') $dmg_min2 = $ mysql->quote_smart($_POST['dmg_min2']);3089 if (isset($_POST['dmg_min2']) && $_POST['dmg_min2'] != '') $dmg_min2 = $sql->quote_smart($_POST['dmg_min2']); 3092 3090 else $dmg_min2 = 0; 3093 if (isset($_POST['dmg_max2']) && $_POST['dmg_max2'] != '') $dmg_max2 = $ mysql->quote_smart($_POST['dmg_max2']);3091 if (isset($_POST['dmg_max2']) && $_POST['dmg_max2'] != '') $dmg_max2 = $sql->quote_smart($_POST['dmg_max2']); 3094 3092 else $dmg_max2 = 0; 3095 if (isset($_POST['dmg_type2']) && $_POST['dmg_type2'] != '') $dmg_type2 = $ mysql->quote_smart($_POST['dmg_type2']);3093 if (isset($_POST['dmg_type2']) && $_POST['dmg_type2'] != '') $dmg_type2 = $sql->quote_smart($_POST['dmg_type2']); 3096 3094 else $dmg_type2 = 0; 3097 if (isset($_POST['dmg_min3']) && $_POST['dmg_min3'] != '') $dmg_min3 = $ mysql->quote_smart($_POST['dmg_min3']);3095 if (isset($_POST['dmg_min3']) && $_POST['dmg_min3'] != '') $dmg_min3 = $sql->quote_smart($_POST['dmg_min3']); 3098 3096 else $dmg_min3 = 0; 3099 if (isset($_POST['dmg_max3']) && $_POST['dmg_max3'] != '') $dmg_max3 = $ mysql->quote_smart($_POST['dmg_max3']);3097 if (isset($_POST['dmg_max3']) && $_POST['dmg_max3'] != '') $dmg_max3 = $sql->quote_smart($_POST['dmg_max3']); 3100 3098 else $dmg_max3 = 0; 3101 if (isset($_POST['dmg_type3']) && $_POST['dmg_type3'] != '') $dmg_type3 = $ mysql->quote_smart($_POST['dmg_type3']);3099 if (isset($_POST['dmg_type3']) && $_POST['dmg_type3'] != '') $dmg_type3 = $sql->quote_smart($_POST['dmg_type3']); 3102 3100 else $dmg_type3 = 0; 3103 if (isset($_POST['dmg_min4']) && $_POST['dmg_min4'] != '') $dmg_min4 = $ mysql->quote_smart($_POST['dmg_min4']);3101 if (isset($_POST['dmg_min4']) && $_POST['dmg_min4'] != '') $dmg_min4 = $sql->quote_smart($_POST['dmg_min4']); 3104 3102 else $dmg_min4 = 0; 3105 if (isset($_POST['dmg_max4']) && $_POST['dmg_max4'] != '') $dmg_max4 = $ mysql->quote_smart($_POST['dmg_max4']);3103 if (isset($_POST['dmg_max4']) && $_POST['dmg_max4'] != '') $dmg_max4 = $sql->quote_smart($_POST['dmg_max4']); 3106 3104 else $dmg_max4 = 0; 3107 if (isset($_POST['dmg_type4']) && $_POST['dmg_type4'] != '') $dmg_type4 = $ mysql->quote_smart($_POST['dmg_type4']);3105 if (isset($_POST['dmg_type4']) && $_POST['dmg_type4'] != '') $dmg_type4 = $sql->quote_smart($_POST['dmg_type4']); 3108 3106 else $dmg_type4 = 0; 3109 if (isset($_POST['dmg_min5']) && $_POST['dmg_min5'] != '') $dmg_min5 = $ mysql->quote_smart($_POST['dmg_min5']);3107 if (isset($_POST['dmg_min5']) && $_POST['dmg_min5'] != '') $dmg_min5 = $sql->quote_smart($_POST['dmg_min5']); 3110 3108 else $dmg_min5 = 0; 3111 if (isset($_POST['dmg_max5']) && $_POST['dmg_max5'] != '') $dmg_max5 = $ mysql->quote_smart($_POST['dmg_max5']);3109 if (isset($_POST['dmg_max5']) && $_POST['dmg_max5'] != '') $dmg_max5 = $sql->quote_smart($_POST['dmg_max5']); 3112 3110 else $dmg_max5 = 0; 3113 if (isset($_POST['dmg_type5']) && $_POST['dmg_type5'] != '') $dmg_type5 = $ mysql->quote_smart($_POST['dmg_type5']);3111 if (isset($_POST['dmg_type5']) && $_POST['dmg_type5'] != '') $dmg_type5 = $sql->quote_smart($_POST['dmg_type5']); 3114 3112 else $dmg_type5 = 0; 3115 if (isset($_POST['armor']) && $_POST['armor'] != '') $armor = $ mysql->quote_smart($_POST['armor']);3113 if (isset($_POST['armor']) && $_POST['armor'] != '') $armor = $sql->quote_smart($_POST['armor']); 3116 3114 else $armor = 0; 3117 if (isset($_POST['holy_res']) && $_POST['holy_res'] != '') $holy_res = $ mysql->quote_smart($_POST['holy_res']);3115 if (isset($_POST['holy_res']) && $_POST['holy_res'] != '') $holy_res = $sql->quote_smart($_POST['holy_res']); 3118 3116 else $holy_res = 0; 3119 if (isset($_POST['fire_res']) && $_POST['fire_res'] != '') $fire_res = $ mysql->quote_smart($_POST['fire_res']);3117 if (isset($_POST['fire_res']) && $_POST['fire_res'] != '') $fire_res = $sql->quote_smart($_POST['fire_res']); 3120 3118 else $fire_res = 0; 3121 if (isset($_POST['nature_res']) && $_POST['nature_res'] != '') $nature_res = $ mysql->quote_smart($_POST['nature_res']);3119 if (isset($_POST['nature_res']) && $_POST['nature_res'] != '') $nature_res = $sql->quote_smart($_POST['nature_res']); 3122 3120 else $nature_res = 0; 3123 if (isset($_POST['frost_res']) && $_POST['frost_res'] != '') $frost_res = $ mysql->quote_smart($_POST['frost_res']);3121 if (isset($_POST['frost_res']) && $_POST['frost_res'] != '') $frost_res = $sql->quote_smart($_POST['frost_res']); 3124 3122 else $frost_res = 0; 3125 if (isset($_POST['shadow_res']) && $_POST['shadow_res'] != '') $shadow_res = $ mysql->quote_smart($_POST['shadow_res']);3123 if (isset($_POST['shadow_res']) && $_POST['shadow_res'] != '') $shadow_res = $sql->quote_smart($_POST['shadow_res']); 3126 3124 else $shadow_res = 0; 3127 if (isset($_POST['arcane_res']) && $_POST['arcane_res'] != '') $arcane_res = $ mysql->quote_smart($_POST['arcane_res']);3125 if (isset($_POST['arcane_res']) && $_POST['arcane_res'] != '') $arcane_res = $sql->quote_smart($_POST['arcane_res']); 3128 3126 else $arcane_res = 0; 3129 if (isset($_POST['delay']) && $_POST['delay'] != '') $delay = $ mysql->quote_smart($_POST['delay']);3127 if (isset($_POST['delay']) && $_POST['delay'] != '') $delay = $sql->quote_smart($_POST['delay']); 3130 3128 else $delay = 0; 3131 if (isset($_POST['ammo_type']) && $_POST['ammo_type'] != '') $ammo_type = $ mysql->quote_smart($_POST['ammo_type']);3129 if (isset($_POST['ammo_type']) && $_POST['ammo_type'] != '') $ammo_type = $sql->quote_smart($_POST['ammo_type']); 3132 3130 else $ammo_type = 0; 3133 if (isset($_POST['RangedModRange']) && $_POST['RangedModRange'] != '') $RangedModRange = $ mysql->quote_smart($_POST['RangedModRange']);3131 if (isset($_POST['RangedModRange']) && $_POST['RangedModRange'] != '') $RangedModRange = $sql->quote_smart($_POST['RangedModRange']); 3134 3132 else $RangedModRange = 0; 3135 if (isset($_POST['spellid_1']) && $_POST['spellid_1'] != '') $spellid_1 = $ mysql->quote_smart($_POST['spellid_1']);3133 if (isset($_POST['spellid_1']) && $_POST['spellid_1'] != '') $spellid_1 = $sql->quote_smart($_POST['spellid_1']); 3136 3134 else $spellid_1 = 0; 3137 if (isset($_POST['spelltrigger_1']) && $_POST['spelltrigger_1'] != '') $spelltrigger_1 = $ mysql->quote_smart($_POST['spelltrigger_1']);3135 if (isset($_POST['spelltrigger_1']) && $_POST['spelltrigger_1'] != '') $spelltrigger_1 = $sql->quote_smart($_POST['spelltrigger_1']); 3138 3136 else $spelltrigger_1 = 0; 3139 if (isset($_POST['spellcharges_1']) && $_POST['spellcharges_1'] != '') $spellcharges_1 = $ mysql->quote_smart($_POST['spellcharges_1']);3137 if (isset($_POST['spellcharges_1']) && $_POST['spellcharges_1'] != '') $spellcharges_1 = $sql->quote_smart($_POST['spellcharges_1']); 3140 3138 else $spellcharges_1 = 0; 3141 if (isset($_POST['spellcooldown_1']) && $_POST['spellcooldown_1'] != '') $spellcooldown_1 = $ mysql->quote_smart($_POST['spellcooldown_1']);3139 if (isset($_POST['spellcooldown_1']) && $_POST['spellcooldown_1'] != '') $spellcooldown_1 = $sql->quote_smart($_POST['spellcooldown_1']); 3142 3140 else $spellcooldown_1 = -1; 3143 if (isset($_POST['spellcategory_1']) && $_POST['spellcategory_1'] != '') $spellcategory_1 = $ mysql->quote_smart($_POST['spellcategory_1']);3141 if (isset($_POST['spellcategory_1']) && $_POST['spellcategory_1'] != '') $spellcategory_1 = $sql->quote_smart($_POST['spellcategory_1']); 3144 3142 else $description = 0; 3145 if (isset($_POST['spellcategorycooldown_1']) && $_POST['spellcategorycooldown_1'] != '') $spellcategorycooldown_1 = $ mysql->quote_smart($_POST['spellcategorycooldown_1']);3143 if (isset($_POST['spellcategorycooldown_1']) && $_POST['spellcategorycooldown_1'] != '') $spellcategorycooldown_1 = $sql->quote_smart($_POST['spellcategorycooldown_1']); 3146 3144 else $spellcategorycooldown_1 = -1; 3147 if (isset($_POST['spellid_2']) && $_POST['spellid_2'] != '') $spellid_2 = $ mysql->quote_smart($_POST['spellid_2']);3145 if (isset($_POST['spellid_2']) && $_POST['spellid_2'] != '') $spellid_2 = $sql->quote_smart($_POST['spellid_2']); 3148 3146 else $spellid_2 = 0; 3149 if (isset($_POST['spelltrigger_2']) && $_POST['spelltrigger_2'] != '') $spelltrigger_2 = $ mysql->quote_smart($_POST['spelltrigger_2']);3147 if (isset($_POST['spelltrigger_2']) && $_POST['spelltrigger_2'] != '') $spelltrigger_2 = $sql->quote_smart($_POST['spelltrigger_2']); 3150 3148 else $spelltrigger_2 = 0; 3151 if (isset($_POST['spellcharges_2']) && $_POST['spellcharges_2'] != '') $spellcharges_2 = $ mysql->quote_smart($_POST['spellcharges_2']);3149 if (isset($_POST['spellcharges_2']) && $_POST['spellcharges_2'] != '') $spellcharges_2 = $sql->quote_smart($_POST['spellcharges_2']); 3152 3150 else $spellcharges_2 = 0; 3153 if (isset($_POST['spellcooldown_2']) && $_POST['spellcooldown_2'] != '') $spellcooldown_2 = $ mysql->quote_smart($_POST['spellcooldown_2']);3151 if (isset($_POST['spellcooldown_2']) && $_POST['spellcooldown_2'] != '') $spellcooldown_2 = $sql->quote_smart($_POST['spellcooldown_2']); 3154 3152 else $spellcooldown_2 = -1; 3155 if (isset($_POST['spellcategory_2']) && $_POST['spellcategory_2'] != '') $spellcategory_2 = $ mysql->quote_smart($_POST['spellcategory_2']);3153 if (isset($_POST['spellcategory_2']) && $_POST['spellcategory_2'] != '') $spellcategory_2 = $sql->quote_smart($_POST['spellcategory_2']); 3156 3154 else $spellcategory_2 = 0; 3157 if (isset($_POST['spellcategorycooldown_2']) && $_POST['spellcategorycooldown_2'] != '') $spellcategorycooldown_2 = $ mysql->quote_smart($_POST['spellcategorycooldown_2']);3155 if (isset($_POST['spellcategorycooldown_2']) && $_POST['spellcategorycooldown_2'] != '') $spellcategorycooldown_2 = $sql->quote_smart($_POST['spellcategorycooldown_2']); 3158 3156 else $spellcategorycooldown_2 = -1; 3159 if (isset($_POST['spellid_3']) && $_POST['spellid_3'] != '') $spellid_3 = $ mysql->quote_smart($_POST['spellid_3']);3157 if (isset($_POST['spellid_3']) && $_POST['spellid_3'] != '') $spellid_3 = $sql->quote_smart($_POST['spellid_3']); 3160 3158 else $spellid_3 = 0; 3161 if (isset($_POST['spelltrigger_3']) && $_POST['spelltrigger_3'] != '') $spelltrigger_3 = $ mysql->quote_smart($_POST['spelltrigger_3']);3159 if (isset($_POST['spelltrigger_3']) && $_POST['spelltrigger_3'] != '') $spelltrigger_3 = $sql->quote_smart($_POST['spelltrigger_3']); 3162 3160 else $spelltrigger_3 = 0; 3163 if (isset($_POST['spellcharges_3']) && $_POST['spellcharges_3'] != '') $spellcharges_3 = $ mysql->quote_smart($_POST['spellcharges_3']);3161 if (isset($_POST['spellcharges_3']) && $_POST['spellcharges_3'] != '') $spellcharges_3 = $sql->quote_smart($_POST['spellcharges_3']); 3164 3162 else $spellcharges_3 = 0; 3165 if (isset($_POST['spellcooldown_3']) && $_POST['spellcooldown_3'] != '') $spellcooldown_3 = $ mysql->quote_smart($_POST['spellcooldown_3']);3163 if (isset($_POST['spellcooldown_3']) && $_POST['spellcooldown_3'] != '') $spellcooldown_3 = $sql->quote_smart($_POST['spellcooldown_3']); 3166 3164 else $spellcooldown_3 = -1; 3167 if (isset($_POST['spellcategory_3']) && $_POST['spellcategory_3'] != '') $spellcategory_3 = $ mysql->quote_smart($_POST['spellcategory_3']);3165 if (isset($_POST['spellcategory_3']) && $_POST['spellcategory_3'] != '') $spellcategory_3 = $sql->quote_smart($_POST['spellcategory_3']); 3168 3166 else $description = 0; 3169 if (isset($_POST['spellcategorycooldown_3']) && $_POST['spellcategorycooldown_3'] != '') $spellcategorycooldown_3 = $ mysql->quote_smart($_POST['spellcategorycooldown_3']);3167 if (isset($_POST['spellcategorycooldown_3']) && $_POST['spellcategorycooldown_3'] != '') $spellcategorycooldown_3 = $sql->quote_smart($_POST['spellcategorycooldown_3']); 3170 3168 else $spellcategorycooldown_3 = -1; 3171 if (isset($_POST['spellid_4']) && $_POST['spellid_4'] != '') $spellid_4 = $ mysql->quote_smart($_POST['spellid_4']);3169 if (isset($_POST['spellid_4']) && $_POST['spellid_4'] != '') $spellid_4 = $sql->quote_smart($_POST['spellid_4']); 3172 3170 else $spellid_4 = 0; 3173 if (isset($_POST['spelltrigger_4']) && $_POST['spelltrigger_4'] != '') $spelltrigger_4 = $ mysql->quote_smart($_POST['spelltrigger_4']);3171 if (isset($_POST['spelltrigger_4']) && $_POST['spelltrigger_4'] != '') $spelltrigger_4 = $sql->quote_smart($_POST['spelltrigger_4']); 3174 3172 else $spelltrigger_4 = 0; 3175 if (isset($_POST['spellcharges_4']) && $_POST['spellcharges_4'] != '') $spellcharges_4 = $ mysql->quote_smart($_POST['spellcharges_4']);3173 if (isset($_POST['spellcharges_4']) && $_POST['spellcharges_4'] != '') $spellcharges_4 = $sql->quote_smart($_POST['spellcharges_4']); 3176 3174 else $spellcharges_4 = 0; 3177 if (isset($_POST['spellcooldown_4']) && $_POST['spellcooldown_4'] != '') $spellcooldown_4 = $ mysql->quote_smart($_POST['spellcooldown_4']);3175 if (isset($_POST['spellcooldown_4']) && $_POST['spellcooldown_4'] != '') $spellcooldown_4 = $sql->quote_smart($_POST['spellcooldown_4']); 3178 3176 else $spellcooldown_4 = -1; 3179 if (isset($_POST['spellcategory_4']) && $_POST['spellcategory_4'] != '') $spellcategory_4 = $ mysql->quote_smart($_POST['spellcategory_4']);3177 if (isset($_POST['spellcategory_4']) && $_POST['spellcategory_4'] != '') $spellcategory_4 = $sql->quote_smart($_POST['spellcategory_4']); 3180 3178 else $spellcategory_4 = 0; 3181 if (isset($_POST['spellcategorycooldown_4']) && $_POST['spellcategorycooldown_4'] != '') $spellcategorycooldown_4 = $ mysql->quote_smart($_POST['spellcategorycooldown_4']);3179 if (isset($_POST['spellcategorycooldown_4']) && $_POST['spellcategorycooldown_4'] != '') $spellcategorycooldown_4 = $sql->quote_smart($_POST['spellcategorycooldown_4']); 3182 3180 else $spellcategorycooldown_4 = -1; 3183 if (isset($_POST['spellid_5']) && $_POST['spellid_5'] != '') $spellid_5 = $ mysql->quote_smart($_POST['spellid_5']);3181 if (isset($_POST['spellid_5']) && $_POST['spellid_5'] != '') $spellid_5 = $sql->quote_smart($_POST['spellid_5']); 3184 3182 else $spellid_5 = 0; 3185 if (isset($_POST['spelltrigger_5']) && $_POST['spelltrigger_5'] != '') $spelltrigger_5 = $ mysql->quote_smart($_POST['spelltrigger_5']);3183 if (isset($_POST['spelltrigger_5']) && $_POST['spelltrigger_5'] != '') $spelltrigger_5 = $sql->quote_smart($_POST['spelltrigger_5']); 3186 3184 else $spelltrigger_5 = 0; 3187 if (isset($_POST['spellcharges_5']) && $_POST['spellcharges_5'] != '') $spellcharges_5 = $ mysql->quote_smart($_POST['spellcharges_5']);3185 if (isset($_POST['spellcharges_5']) && $_POST['spellcharges_5'] != '') $spellcharges_5 = $sql->quote_smart($_POST['spellcharges_5']); 3188 3186 else $spellcharges_5 = 0; 3189 if (isset($_POST['spellcooldown_5']) && $_POST['spellcooldown_5'] != '') $spellcooldown_5 = $ mysql->quote_smart($_POST['spellcooldown_5']);3187 if (isset($_POST['spellcooldown_5']) && $_POST['spellcooldown_5'] != '') $spellcooldown_5 = $sql->quote_smart($_POST['spellcooldown_5']); 3190 3188 else $spellcooldown_5 = -1; 3191 if (isset($_POST['spellcategory_5']) && $_POST['spellcategory_5'] != '') $spellcategory_5 = $ mysql->quote_smart($_POST['spellcategory_5']);3189 if (isset($_POST['spellcategory_5']) && $_POST['spellcategory_5'] != '') $spellcategory_5 = $sql->quote_smart($_POST['spellcategory_5']); 3192 3190 else $spellcategory_5 = 0; 3193 if (isset($_POST['spellcategorycooldown_5']) && $_POST['spellcategorycooldown_5'] != '') $spellcategorycooldown_5 = $ mysql->quote_smart($_POST['spellcategorycooldown_5']);3191 if (isset($_POST['spellcategorycooldown_5']) && $_POST['spellcategorycooldown_5'] != '') $spellcategorycooldown_5 = $sql->quote_smart($_POST['spellcategorycooldown_5']); 3194 3192 else $spellcategorycooldown_5 = -1; 3195 if (isset($_POST['bonding']) && $_POST['bonding'] != '') $bonding = $ mysql->quote_smart($_POST['bonding']);3193 if (isset($_POST['bonding']) && $_POST['bonding'] != '') $bonding = $sql->quote_smart($_POST['bonding']); 3196 3194 else $bonding = 0; 3197 if (isset($_POST['description']) && $_POST['description'] != '') $description = $ mysql->quote_smart($_POST['description']);3195 if (isset($_POST['description']) && $_POST['description'] != '') $description = $sql->quote_smart($_POST['description']); 3198 3196 else $description = ""; 3199 if (isset($_POST['PageText']) && $_POST['PageText'] != '') $PageText = $ mysql->quote_smart($_POST['PageText']);3197 if (isset($_POST['PageText']) && $_POST['PageText'] != '') $PageText = $sql->quote_smart($_POST['PageText']); 3200 3198 else $PageText = 0; 3201 if (isset($_POST['LanguageID']) && $_POST['LanguageID'] != '') $LanguageID = $ mysql->quote_smart($_POST['LanguageID']);3199 if (isset($_POST['LanguageID']) && $_POST['LanguageID'] != '') $LanguageID = $sql->quote_smart($_POST['LanguageID']); 3202 3200 else $LanguageID = 0; 3203 if (isset($_POST['PageMaterial']) && $_POST['PageMaterial'] != '') $PageMaterial = $ mysql->quote_smart($_POST['PageMaterial']);3201 if (isset($_POST['PageMaterial']) && $_POST['PageMaterial'] != '') $PageMaterial = $sql->quote_smart($_POST['PageMaterial']); 3204 3202 else $PageMaterial = 0; 3205 if (isset($_POST['startquest']) && $_POST['startquest'] != '') $startquest = $ mysql->quote_smart($_POST['startquest']);3203 if (isset($_POST['startquest']) && $_POST['startquest'] != '') $startquest = $sql->quote_smart($_POST['startquest']); 3206 3204 else $startquest = 0; 3207 if (isset($_POST['lockid']) && $_POST['lockid'] != '') $lockid = $ mysql->quote_smart($_POST['lockid']);3205 if (isset($_POST['lockid']) && $_POST['lockid'] != '') $lockid = $sql->quote_smart($_POST['lockid']); 3208 3206 else $lockid = 0; 3209 if (isset($_POST['Material']) && $_POST['Material'] != '') $Material = $ mysql->quote_smart($_POST['Material']);3207 if (isset($_POST['Material']) && $_POST['Material'] != '') $Material = $sql->quote_smart($_POST['Material']); 3210 3208 else $Material = 0; 3211 if (isset($_POST['sheath']) && $_POST['sheath'] != '') $sheath = $ mysql->quote_smart($_POST['sheath']);3209 if (isset($_POST['sheath']) && $_POST['sheath'] != '') $sheath = $sql->quote_smart($_POST['sheath']); 3212 3210 else $sheath = 0; 3213 if (isset($_POST['RandomProperty']) && $_POST['RandomProperty'] != '') $RandomProperty = $ mysql->quote_smart($_POST['RandomProperty']);3211 if (isset($_POST['RandomProperty']) && $_POST['RandomProperty'] != '') $RandomProperty = $sql->quote_smart($_POST['RandomProperty']); 3214 3212 else $RandomProperty = 0; 3215 if (isset($_POST['block ']) && $_POST['block '] != '') $block = $ mysql->quote_smart($_POST['block']);3213 if (isset($_POST['block ']) && $_POST['block '] != '') $block = $sql->quote_smart($_POST['block']); 3216 3214 else $block = 0; 3217 if (isset($_POST['itemset']) && $_POST['itemset'] != '') $itemset = $ mysql->quote_smart($_POST['itemset']);3215 if (isset($_POST['itemset']) && $_POST['itemset'] != '') $itemset = $sql->quote_smart($_POST['itemset']); 3218 3216 else $itemset = 0; 3219 if (isset($_POST['MaxDurability']) && $_POST['MaxDurability'] != '') $MaxDurability = $ mysql->quote_smart($_POST['MaxDurability']);3217 if (isset($_POST['MaxDurability']) && $_POST['MaxDurability'] != '') $MaxDurability = $sql->quote_smart($_POST['MaxDurability']); 3220 3218 else $MaxDurability = 0; 3221 if (isset($_POST['area']) && $_POST['area'] != '') $area = $ mysql->quote_smart($_POST['area']);3219 if (isset($_POST['area']) && $_POST['area'] != '') $area = $sql->quote_smart($_POST['area']); 3222 3220 else $area = 0; 3223 if (isset($_POST['BagFamily']) && $_POST['BagFamily'] != '') $BagFamily = $ mysql->quote_smart($_POST['BagFamily']);3221 if (isset($_POST['BagFamily']) && $_POST['BagFamily'] != '') $BagFamily = $sql->quote_smart($_POST['BagFamily']); 3224 3222 else $BagFamily = 0; 3225 if (isset($_POST['Map']) && $_POST['Map'] != '') $Map = $ mysql->quote_smart($_POST['Map']);3223 if (isset($_POST['Map']) && $_POST['Map'] != '') $Map = $sql->quote_smart($_POST['Map']); 3226 3224 else $Map = 0; 3227 if (isset($_POST['ScriptName']) && $_POST['ScriptName'] != '') $ScriptName = $ mysql->quote_smart($_POST['ScriptName']);3225 if (isset($_POST['ScriptName']) && $_POST['ScriptName'] != '') $ScriptName = $sql->quote_smart($_POST['ScriptName']); 3228 3226 else $ScriptName = 0; 3229 if (isset($_POST['DisenchantID']) && $_POST['DisenchantID'] != '') $DisenchantID = $ mysql->quote_smart($_POST['DisenchantID']);3227 if (isset($_POST['DisenchantID']) && $_POST['DisenchantID'] != '') $DisenchantID = $sql->quote_smart($_POST['DisenchantID']); 3230 3228 else $DisenchantID = 0; 3231 if (isset($_POST['RequiredDisenchantSkill']) && $_POST['RequiredDisenchantSkill'] != '') $RequiredDisenchantSkill = $ mysql->quote_smart($_POST['RequiredDisenchantSkill']);3229 if (isset($_POST['RequiredDisenchantSkill']) && $_POST['RequiredDisenchantSkill'] != '') $RequiredDisenchantSkill = $sql->quote_smart($_POST['RequiredDisenchantSkill']); 3232 3230 else $RequiredDisenchantSkill = -1; 3233 if (isset($_POST['unk0']) && $_POST['unk0'] != '') $unk0 = $ mysql->quote_smart($_POST['unk0']);3231 if (isset($_POST['unk0']) && $_POST['unk0'] != '') $unk0 = $sql->quote_smart($_POST['unk0']); 3234 3232 else $unk0 = -1; 3235 if (isset($_POST['RandomSuffix']) && $_POST['RandomSuffix'] != '') $RandomSuffix = $ mysql->quote_smart($_POST['RandomSuffix']);3233 if (isset($_POST['RandomSuffix']) && $_POST['RandomSuffix'] != '') $RandomSuffix = $sql->quote_smart($_POST['RandomSuffix']); 3236 3234 else $RandomSuffix = 0; 3237 if (isset($_POST['TotemCategory']) && $_POST['TotemCategory'] != '') $TotemCategory = $ mysql->quote_smart($_POST['TotemCategory']);3235 if (isset($_POST['TotemCategory']) && $_POST['TotemCategory'] != '') $TotemCategory = $sql->quote_smart($_POST['TotemCategory']); 3238 3236 else $TotemCategory = 0; 3239 if (isset($_POST['socketColor_1']) && $_POST['socketColor_1'] != '') $socketColor_1 = $ mysql->quote_smart($_POST['socketColor_1']);3237 if (isset($_POST['socketColor_1']) && $_POST['socketColor_1'] != '') $socketColor_1 = $sql->quote_smart($_POST['socketColor_1']); 3240 3238 else $socketColor_1 = 0; 3241 if (isset($_POST['socketContent_1']) && $_POST['socketContent_1'] != '') $socketContent_1 = $ mysql->quote_smart($_POST['socketContent_1']);3239 if (isset($_POST['socketContent_1']) && $_POST['socketContent_1'] != '') $socketContent_1 = $sql->quote_smart($_POST['socketContent_1']); 3242 3240 else $socketContent_1 = 0; 3243 if (isset($_POST['socketColor_2']) && $_POST['socketColor_2'] != '') $socketColor_2 = $ mysql->quote_smart($_POST['socketColor_2']);3241 if (isset($_POST['socketColor_2']) && $_POST['socketColor_2'] != '') $socketColor_2 = $sql->quote_smart($_POST['socketColor_2']); 3244 3242 else $socketColor_2 = 0; 3245 if (isset($_POST['socketContent_2']) && $_POST['socketContent_2'] != '') $socketContent_2 = $ mysql->quote_smart($_POST['socketContent_2']);3243 if (isset($_POST['socketContent_2']) && $_POST['socketContent_2'] != '') $socketContent_2 = $sql->quote_smart($_POST['socketContent_2']); 3246 3244 else $socketContent_2 = 0; 3247 if (isset($_POST['socketColor_3']) && $_POST['socketColor_3'] != '') $socketColor_3 = $ mysql->quote_smart($_POST['socketColor_3']);3245 if (isset($_POST['socketColor_3']) && $_POST['socketColor_3'] != '') $socketColor_3 = $sql->quote_smart($_POST['socketColor_3']); 3248 3246 else $socketColor_3 = 0; 3249 if (isset($_POST['socketContent_3']) && $_POST['socketContent_3'] != '') $socketContent_3 = $ mysql->quote_smart($_POST['socketContent_3']);3247 if (isset($_POST['socketContent_3']) && $_POST['socketContent_3'] != '') $socketContent_3 = $sql->quote_smart($_POST['socketContent_3']); 3250 3248 else $socketContent_3 = 0; 3251 if (isset($_POST['socketBonus']) && $_POST['socketBonus'] != '') $socketBonus = $ mysql->quote_smart($_POST['socketBonus']);3249 if (isset($_POST['socketBonus']) && $_POST['socketBonus'] != '') $socketBonus = $sql->quote_smart($_POST['socketBonus']); 3252 3250 else $socketBonus = 0; 3253 if (isset($_POST['GemProperties']) && $_POST['GemProperties'] != '') $GemProperties = $ mysql->quote_smart($_POST['GemProperties']);3251 if (isset($_POST['GemProperties']) && $_POST['GemProperties'] != '') $GemProperties = $sql->quote_smart($_POST['GemProperties']); 3254 3252 else $GemProperties = 0; 3255 if (isset($_POST['ExtendedCost']) && $_POST['ExtendedCost'] != '') $ExtendedCost = $ mysql->quote_smart($_POST['ExtendedCost']);3253 if (isset($_POST['ExtendedCost']) && $_POST['ExtendedCost'] != '') $ExtendedCost = $sql->quote_smart($_POST['ExtendedCost']); 3256 3254 else $ExtendedCost = 0; 3257 if (isset($_POST['ArmorDamageModifier']) && $_POST['ArmorDamageModifier'] != '') $ArmorDamageModifier = $ mysql->quote_smart($_POST['ArmorDamageModifier']);3255 if (isset($_POST['ArmorDamageModifier']) && $_POST['ArmorDamageModifier'] != '') $ArmorDamageModifier = $sql->quote_smart($_POST['ArmorDamageModifier']); 3258 3256 else $ArmorDamageModifier = 0; 3259 3257 3260 if (isset($_POST['de_ChanceOrRef']) && $_POST['de_ChanceOrRef'] != '') $de_ChanceOrRef = $ mysql->quote_smart($_POST['de_ChanceOrRef']);3258 if (isset($_POST['de_ChanceOrRef']) && $_POST['de_ChanceOrRef'] != '') $de_ChanceOrRef = $sql->quote_smart($_POST['de_ChanceOrRef']); 3261 3259 else $de_ChanceOrRef = 0; 3262 if (isset($_POST['de_QuestChanceOrGroup']) && $_POST['de_QuestChanceOrGroup'] != '') $de_QuestChanceOrGroup = $ mysql->quote_smart($_POST['de_QuestChanceOrGroup']);3260 if (isset($_POST['de_QuestChanceOrGroup']) && $_POST['de_QuestChanceOrGroup'] != '') $de_QuestChanceOrGroup = $sql->quote_smart($_POST['de_QuestChanceOrGroup']); 3263 3261 else $de_QuestChanceOrGroup = 0; 3264 if (isset($_POST['de_mincount']) && $_POST['de_mincount'] != '') $de_mincount = $ mysql->quote_smart($_POST['de_mincount']);3262 if (isset($_POST['de_mincount']) && $_POST['de_mincount'] != '') $de_mincount = $sql->quote_smart($_POST['de_mincount']); 3265 3263 else $de_mincount = 0; 3266 if (isset($_POST['de_maxcount']) && $_POST['de_maxcount'] != '') $de_maxcount = $ mysql->quote_smart($_POST['de_maxcount']);3264 if (isset($_POST['de_maxcount']) && $_POST['de_maxcount'] != '') $de_maxcount = $sql->quote_smart($_POST['de_maxcount']); 3267 3265 else $de_maxcount = 0; 3268 if (isset($_POST['de_quest_freeforall']) && $_POST['de_quest_freeforall'] != '') $de_quest_freeforall = $ mysql->quote_smart($_POST['de_quest_freeforall']);3266 if (isset($_POST['de_quest_freeforall']) && $_POST['de_quest_freeforall'] != '') $de_quest_freeforall = $sql->quote_smart($_POST['de_quest_freeforall']); 3269 3267 else $de_quest_freeforall = 0; 3270 if (isset($_POST['de_item']) && $_POST['de_item'] != '') $de_item = $ mysql->quote_smart($_POST['de_item']);3268 if (isset($_POST['de_item']) && $_POST['de_item'] != '') $de_item = $sql->quote_smart($_POST['de_item']); 3271 3269 else $de_item = 0; 3272 if (isset($_POST['del_de_items']) && $_POST['del_de_items'] != '') $del_de_items = $ mysql->quote_smart($_POST['del_de_items']);3270 if (isset($_POST['del_de_items']) && $_POST['del_de_items'] != '') $del_de_items = $sql->quote_smart($_POST['del_de_items']); 3273 3271 else $del_de_items = NULL; 3274 3272 … … 3312 3310 3313 3311 if ($_POST['type'] == "add_new"){ 3314 $sql = "INSERT INTO item_template (entry, class, subclass, name, name2, name3, name4,displayid, Quality, Flags, BuyCount, BuyPrice, SellPrice, InventoryType, AllowableClass, AllowableRace, ItemLevel,3312 $sql_query = "INSERT INTO item_template (entry, class, subclass, name,displayid, Quality, Flags, BuyCount, BuyPrice, SellPrice, InventoryType, AllowableClass, AllowableRace, ItemLevel, 3315 3313 RequiredLevel, RequiredSkill, RequiredSkillRank, requiredspell, requiredhonorrank, RequiredCityRank, RequiredReputationFaction, RequiredReputationRank, maxcount, stackable, ContainerSlots, stat_type1, 3316 3314 stat_value1, stat_type2, stat_value2, stat_type3, stat_value3, stat_type4, stat_value4, stat_type5, stat_value5, stat_type6, stat_value6, stat_type7, stat_value7, stat_type8, stat_value8, stat_type9, … … 3321 3319 bonding, description, PageText, LanguageID, PageMaterial, startquest, lockid, Material, sheath, RandomProperty, block, itemset, MaxDurability, area, BagFamily, Map, ScriptName, DisenchantID,RequiredDisenchantSkill, 3322 3320 ArmorDamageModifier,unk0,RandomSuffix,TotemCategory, socketColor_1, socketContent_1, socketColor_2, socketContent_2, socketColor_3, socketContent_3, socketBonus, GemProperties, ExtendedCost) 3323 VALUES ('$entry', '$class', '$subclass', '$name', '$name2', '$name3', '$name4','$displayid', '$Quality', '$Flags', '$BuyCount', '$BuyPrice', '$SellPrice', '$InventoryType', '$AllowableClass', '$AllowableRace', '$ItemLevel', '$RequiredLevel',3321 VALUES ('$entry', '$class', '$subclass', '$name','$displayid', '$Quality', '$Flags', '$BuyCount', '$BuyPrice', '$SellPrice', '$InventoryType', '$AllowableClass', '$AllowableRace', '$ItemLevel', '$RequiredLevel', 3324 3322 '$RequiredSkill', '$RequiredSkillRank', '$requiredspell', '$requiredhonorrank', '$RequiredCityRank', '$RequiredReputationFaction', '$RequiredReputationRank', '$maxcount', '$stackable', '$ContainerSlots', '$stat_type1', 3325 3323 '$stat_value1', '$stat_type2', '$stat_value2', '$stat_type3', '$stat_value3', '$stat_type4', '$stat_value4', '$stat_type5', '$stat_value5', '$stat_type6', '$stat_value6', '$stat_type7', '$stat_value7', '$stat_type8', '$stat_value8', … … 3334 3332 } elseif ($_POST['type'] == "edit"){ 3335 3333 3336 $sql = "UPDATE item_template SET ";3337 3338 $result = $ mysql->query("SELECT * FROM item_template WHERE entry = '$entry'");3339 if ($item_templ = $ mysql->fetch_assoc($result)){3340 3341 if ($item_templ['class'] != $class) $sql .= "class='$class',";3342 if ($item_templ['subclass'] != $subclass) $sql .= "subclass='$subclass',";3343 if ($item_templ['name'] != $name) $sql .= "name='$name',";3344 if ($item_templ['displayid'] != $displayid) $sql .= "displayid='$displayid',";3345 if ($item_templ['Quality'] != $Quality) $sql .= "Quality='$Quality',";3346 if ($item_templ['Flags'] != $Flags) $sql .= "Flags='$Flags',";3347 if ($item_templ['BuyCount'] != $BuyCount) $sql .= "BuyCount='$BuyCount',";3348 if ($item_templ['BuyPrice'] != $BuyPrice) $sql .= "BuyPrice='$BuyPrice',";3349 if ($item_templ['SellPrice'] != $SellPrice) $sql .= "SellPrice='$SellPrice',";3350 if ($item_templ['InventoryType'] != $InventoryType) $sql .= "InventoryType='$InventoryType',";3351 if ($item_templ['AllowableClass'] != $AllowableClass) $sql .= "AllowableClass='$AllowableClass',";3352 if ($item_templ['AllowableRace'] != $AllowableRace) $sql .= "AllowableRace='$AllowableRace',";3353 if ($item_templ['ItemLevel'] != $ItemLevel) $sql .= "ItemLevel='$ItemLevel',";3354 if ($item_templ['RequiredLevel'] != $RequiredLevel) $sql .= "RequiredLevel='$RequiredLevel',";3355 if ($item_templ['RequiredSkill'] != $RequiredSkill) $sql .= "RequiredSkill='$RequiredSkill',";3356 if ($item_templ['RequiredSkillRank'] != $RequiredSkillRank) $sql .= "RequiredSkillRank='$RequiredSkillRank',";3357 if ($item_templ['requiredspell'] != $requiredspell) $sql .= "requiredspell='$requiredspell',";3358 if ($item_templ['requiredhonorrank'] != $requiredhonorrank) $sql .= "requiredhonorrank='$requiredhonorrank',";3359 if ($item_templ['RequiredCityRank'] != $RequiredCityRank) $sql .= "RequiredCityRank='$RequiredCityRank',";3360 if ($item_templ['RequiredReputationFaction'] != $RequiredReputationFaction) $sql .= "RequiredReputationFaction='$RequiredReputationFaction',";3361 if ($item_templ['RequiredReputationRank'] != $RequiredReputationRank) $sql .= "RequiredReputationRank='$RequiredReputationRank',";3362 if ($item_templ['maxcount'] != $maxcount) $sql .= "maxcount='$maxcount',";3363 if ($item_templ['stackable'] != $stackable) $sql .= "stackable='$stackable',";3364 if ($item_templ['ContainerSlots'] != $ContainerSlots) $sql .= "ContainerSlots='$ContainerSlots',";3365 if ($item_templ['stat_type1'] != $stat_type1) $sql .= "stat_type1='$stat_type1',";3366 if ($item_templ['stat_value1'] != $stat_value1) $sql .= "stat_value1='$stat_value1',";3367 if ($item_templ['stat_type2'] != $stat_type2) $sql .= "stat_type2='$stat_type2',";3368 if ($item_templ['stat_value2'] != $stat_value2) $sql .= "stat_value2='$stat_value2',";3369 if ($item_templ['stat_type3'] != $stat_type3) $sql .= "stat_type3='$stat_type3',";3370 if ($item_templ['stat_value3'] != $stat_value3) $sql .= "stat_value3='$stat_value3',";3371 if ($item_templ['stat_type4'] != $stat_type4) $sql .= "stat_type4='$stat_type4',";3372 if ($item_templ['stat_value4'] != $stat_value4) $sql .= "stat_value4='$stat_value4',";3373 if ($item_templ['stat_type5'] != $stat_type5) $sql .= "stat_type5='$stat_type5',";3374 if ($item_templ['stat_value5'] != $stat_value5) $sql .= "stat_value5='$stat_value5',";3375 if ($item_templ['stat_type6'] != $stat_type6) $sql .= "stat_type6='$stat_type6',";3376 if ($item_templ['stat_value6'] != $stat_value6) $sql .= "stat_value6='$stat_value6',";3377 if ($item_templ['stat_type7'] != $stat_type7) $sql .= "stat_type7='$stat_type7',";3378 if ($item_templ['stat_value7'] != $stat_value7) $sql .= "stat_value7='$stat_value7',";3379 if ($item_templ['stat_type8'] != $stat_type8) $sql .= "stat_type8='$stat_type8',";3380 if ($item_templ['stat_value8'] != $stat_value8) $sql .= "stat_value8='$stat_value8',";3381 if ($item_templ['stat_type9'] != $stat_type9) $sql .= "stat_type9='$stat_type9',";3382 if ($item_templ['stat_value9'] != $stat_value9) $sql .= "stat_value9='$stat_value9',";3383 if ($item_templ['stat_type10'] != $stat_type10) $sql .= "stat_type10='$stat_type10',";3384 if ($item_templ['stat_value10'] != $stat_value10) $sql .= "stat_value10='$stat_value10',";3385 if ($item_templ['dmg_min1'] != $dmg_min1) $sql .= "dmg_min1='$dmg_min1',";3386 if ($item_templ['dmg_max1'] != $dmg_max1) $sql .= "dmg_max1='$dmg_max1',";3387 if ($item_templ['dmg_type1'] != $dmg_type1) $sql .= "dmg_type1='$dmg_type1',";3388 if ($item_templ['dmg_min2'] != $dmg_min2) $sql .= "dmg_min2='$dmg_min2',";3389 if ($item_templ['dmg_max2'] != $dmg_max2) $sql .= "dmg_max2='$dmg_max2',";3390 if ($item_templ['dmg_type2'] != $dmg_type2) $sql .= "dmg_type2='$dmg_type2',";3391 if ($item_templ['dmg_min3'] != $dmg_min3) $sql .= "dmg_min3='$dmg_min3',";3392 if ($item_templ['dmg_max3'] != $dmg_max3) $sql .= "dmg_max3='$dmg_max3',";3393 if ($item_templ['dmg_type3'] != $dmg_type3) $sql .= "dmg_type3='$dmg_type3',";3394 if ($item_templ['dmg_min4'] != $dmg_min4) $sql .= "dmg_min4='$dmg_min4',";3395 if ($item_templ['dmg_max4'] != $dmg_max4) $sql .= "dmg_max4='$dmg_max4',";3396 if ($item_templ['dmg_type4'] != $dmg_type4) $sql .= "dmg_type4='$dmg_type4',";3397 if ($item_templ['dmg_min5'] != $dmg_min5) $sql .= "dmg_min5='$dmg_min5',";3398 if ($item_templ['dmg_max5'] != $dmg_max5) $sql .= "dmg_max5='$dmg_max5',";3399 if ($item_templ['dmg_type5'] != $dmg_type5) $sql .= "dmg_type5='$dmg_type5',";3400 if ($item_templ['armor'] != $armor) $sql .= "armor='$armor',";3401 if ($item_templ['holy_res'] != $holy_res) $sql .= "holy_res='$holy_res',";3402 if ($item_templ['fire_res'] != $fire_res) $sql .= "fire_res='$fire_res',";3403 if ($item_templ['nature_res'] != $nature_res) $sql .= "nature_res='$nature_res',";3404 if ($item_templ['frost_res'] != $frost_res) $sql .= "frost_res='$frost_res',";3405 if ($item_templ['shadow_res'] != $shadow_res) $sql .= "shadow_res='$shadow_res',";3406 if ($item_templ['arcane_res'] != $arcane_res) $sql .= "arcane_res='$arcane_res',";3407 if ($item_templ['delay'] != $delay) $sql .= "delay='$delay',";3408 if ($item_templ['ammo_type'] != $ammo_type) $sql .= "ammo_type='$ammo_type',";3409 if ($item_templ['RangedModRange'] != $RangedModRange) $sql .= "RangedModRange='$RangedModRange',";3410 if ($item_templ['spellid_1'] != $spellid_1) $sql .= "spellid_1='$spellid_1',";3411 if ($item_templ['spelltrigger_1'] != $spelltrigger_1) $sql .= "spelltrigger_1='$spelltrigger_1',";3412 if ($item_templ['spellcharges_1'] != $spellcharges_1) $sql .= "spellcharges_1='$spellcharges_1',";3413 if ($item_templ['spellcooldown_1'] != $spellcooldown_1) $sql .= "spellcooldown_1='$spellcooldown_1',";3414 if ($item_templ['spellcategory_1'] != $spellcategory_1) $sql .= "spellcategory_1='$spellcategory_1',";3415 if ($item_templ['spellcategorycooldown_1'] != $spellcategorycooldown_1) $sql .= "spellcategorycooldown_1='$spellcategorycooldown_1',";3416 if ($item_templ['spellid_2'] != $spellid_2) $sql .= "spellid_2='$spellid_2',";3417 if ($item_templ['spelltrigger_2'] != $spelltrigger_2) $sql .= "spelltrigger_2='$spelltrigger_2',";3418 if ($item_templ['spellcharges_2'] != $spellcharges_2) $sql .= "spellcharges_2='$spellcharges_2',";3419 if ($item_templ['spellcooldown_2'] != $spellcooldown_2) $sql .= "spellcooldown_2='$spellcooldown_2',";3420 if ($item_templ['spellcategory_2'] != $spellcategory_2) $sql .= "spellcategory_2='$spellcategory_2',";3421 if ($item_templ['spellcategorycooldown_2'] != $spellcategorycooldown_2) $sql .= "spellcategorycooldown_2='$spellcategorycooldown_2',";3422 if ($item_templ['spellid_3'] != $spellid_3) $sql .= "spellid_3='$spellid_3',";3423 if ($item_templ['spelltrigger_3'] != $spelltrigger_3) $sql .= "spelltrigger_3='$spelltrigger_3',";3424 if ($item_templ['spellcharges_3'] != $spellcharges_3) $sql .= "spellcharges_3='$spellcharges_3',";3425 if ($item_templ['spellcooldown_3'] != $spellcooldown_3) $sql .= "spellcooldown_3='$spellcooldown_3',";3426 if ($item_templ['spellcategory_3'] != $spellcategory_3) $sql .= "spellcategory_3='$spellcategory_3',";3427 if ($item_templ['spellcategorycooldown_3'] != $spellcategorycooldown_3) $sql .= "spellcategorycooldown_3='$spellcategorycooldown_3',";3334 $sql_query = "UPDATE item_template SET "; 3335 3336 $result = $sql->query("SELECT * FROM item_template WHERE entry = '$entry'"); 3337 if ($item_templ = $sql->fetch_assoc($result)){ 3338 3339 if ($item_templ['class'] != $class) $sql_query .= "class='$class',"; 3340 if ($item_templ['subclass'] != $subclass) $sql_query .= "subclass='$subclass',"; 3341 if ($item_templ['name'] != $name) $sql_query .= "name='$name',"; 3342 if ($item_templ['displayid'] != $displayid) $sql_query .= "displayid='$displayid',"; 3343 if ($item_templ['Quality'] != $Quality) $sql_query .= "Quality='$Quality',"; 3344 if ($item_templ['Flags'] != $Flags) $sql_query .= "Flags='$Flags',"; 3345 if ($item_templ['BuyCount'] != $BuyCount) $sql_query .= "BuyCount='$BuyCount',"; 3346 if ($item_templ['BuyPrice'] != $BuyPrice) $sql_query .= "BuyPrice='$BuyPrice',"; 3347 if ($item_templ['SellPrice'] != $SellPrice) $sql_query .= "SellPrice='$SellPrice',"; 3348 if ($item_templ['InventoryType'] != $InventoryType) $sql_query .= "InventoryType='$InventoryType',"; 3349 if ($item_templ['AllowableClass'] != $AllowableClass) $sql_query .= "AllowableClass='$AllowableClass',"; 3350 if ($item_templ['AllowableRace'] != $AllowableRace) $sql_query .= "AllowableRace='$AllowableRace',"; 3351 if ($item_templ['ItemLevel'] != $ItemLevel) $sql_query .= "ItemLevel='$ItemLevel',"; 3352 if ($item_templ['RequiredLevel'] != $RequiredLevel) $sql_query .= "RequiredLevel='$RequiredLevel',"; 3353 if ($item_templ['RequiredSkill'] != $RequiredSkill) $sql_query .= "RequiredSkill='$RequiredSkill',"; 3354 if ($item_templ['RequiredSkillRank'] != $RequiredSkillRank) $sql_query .= "RequiredSkillRank='$RequiredSkillRank',"; 3355 if ($item_templ['requiredspell'] != $requiredspell) $sql_query .= "requiredspell='$requiredspell',"; 3356 if ($item_templ['requiredhonorrank'] != $requiredhonorrank) $sql_query .= "requiredhonorrank='$requiredhonorrank',"; 3357 if ($item_templ['RequiredCityRank'] != $RequiredCityRank) $sql_query .= "RequiredCityRank='$RequiredCityRank',"; 3358 if ($item_templ['RequiredReputationFaction'] != $RequiredReputationFaction) $sql_query .= "RequiredReputationFaction='$RequiredReputationFaction',"; 3359 if ($item_templ['RequiredReputationRank'] != $RequiredReputationRank) $sql_query .= "RequiredReputationRank='$RequiredReputationRank',"; 3360 if ($item_templ['maxcount'] != $maxcount) $sql_query .= "maxcount='$maxcount',"; 3361 if ($item_templ['stackable'] != $stackable) $sql_query .= "stackable='$stackable',"; 3362 if ($item_templ['ContainerSlots'] != $ContainerSlots) $sql_query .= "ContainerSlots='$ContainerSlots',"; 3363 if ($item_templ['stat_type1'] != $stat_type1) $sql_query .= "stat_type1='$stat_type1',"; 3364 if ($item_templ['stat_value1'] != $stat_value1) $sql_query .= "stat_value1='$stat_value1',"; 3365 if ($item_templ['stat_type2'] != $stat_type2) $sql_query .= "stat_type2='$stat_type2',"; 3366 if ($item_templ['stat_value2'] != $stat_value2) $sql_query .= "stat_value2='$stat_value2',"; 3367 if ($item_templ['stat_type3'] != $stat_type3) $sql_query .= "stat_type3='$stat_type3',"; 3368 if ($item_templ['stat_value3'] != $stat_value3) $sql_query .= "stat_value3='$stat_value3',"; 3369 if ($item_templ['stat_type4'] != $stat_type4) $sql_query .= "stat_type4='$stat_type4',"; 3370 if ($item_templ['stat_value4'] != $stat_value4) $sql_query .= "stat_value4='$stat_value4',"; 3371 if ($item_templ['stat_type5'] != $stat_type5) $sql_query .= "stat_type5='$stat_type5',"; 3372 if ($item_templ['stat_value5'] != $stat_value5) $sql_query .= "stat_value5='$stat_value5',"; 3373 if ($item_templ['stat_type6'] != $stat_type6) $sql_query .= "stat_type6='$stat_type6',"; 3374 if ($item_templ['stat_value6'] != $stat_value6) $sql_query .= "stat_value6='$stat_value6',"; 3375 if ($item_templ['stat_type7'] != $stat_type7) $sql_query .= "stat_type7='$stat_type7',"; 3376 if ($item_templ['stat_value7'] != $stat_value7) $sql_query .= "stat_value7='$stat_value7',"; 3377 if ($item_templ['stat_type8'] != $stat_type8) $sql_query .= "stat_type8='$stat_type8',"; 3378 if ($item_templ['stat_value8'] != $stat_value8) $sql_query .= "stat_value8='$stat_value8',"; 3379 if ($item_templ['stat_type9'] != $stat_type9) $sql_query .= "stat_type9='$stat_type9',"; 3380 if ($item_templ['stat_value9'] != $stat_value9) $sql_query .= "stat_value9='$stat_value9',"; 3381 if ($item_templ['stat_type10'] != $stat_type10) $sql_query .= "stat_type10='$stat_type10',"; 3382 if ($item_templ['stat_value10'] != $stat_value10) $sql_query .= "stat_value10='$stat_value10',"; 3383 if ($item_templ['dmg_min1'] != $dmg_min1) $sql_query .= "dmg_min1='$dmg_min1',"; 3384 if ($item_templ['dmg_max1'] != $dmg_max1) $sql_query .= "dmg_max1='$dmg_max1',"; 3385 if ($item_templ['dmg_type1'] != $dmg_type1) $sql_query .= "dmg_type1='$dmg_type1',"; 3386 if ($item_templ['dmg_min2'] != $dmg_min2) $sql_query .= "dmg_min2='$dmg_min2',"; 3387 if ($item_templ['dmg_max2'] != $dmg_max2) $sql_query .= "dmg_max2='$dmg_max2',"; 3388 if ($item_templ['dmg_type2'] != $dmg_type2) $sql_query .= "dmg_type2='$dmg_type2',"; 3389 if ($item_templ['dmg_min3'] != $dmg_min3) $sql_query .= "dmg_min3='$dmg_min3',"; 3390 if ($item_templ['dmg_max3'] != $dmg_max3) $sql_query .= "dmg_max3='$dmg_max3',"; 3391 if ($item_templ['dmg_type3'] != $dmg_type3) $sql_query .= "dmg_type3='$dmg_type3',"; 3392 if ($item_templ['dmg_min4'] != $dmg_min4) $sql_query .= "dmg_min4='$dmg_min4',"; 3393 if ($item_templ['dmg_max4'] != $dmg_max4) $sql_query .= "dmg_max4='$dmg_max4',"; 3394 if ($item_templ['dmg_type4'] != $dmg_type4) $sql_query .= "dmg_type4='$dmg_type4',"; 3395 if ($item_templ['dmg_min5'] != $dmg_min5) $sql_query .= "dmg_min5='$dmg_min5',"; 3396 if ($item_templ['dmg_max5'] != $dmg_max5) $sql_query .= "dmg_max5='$dmg_max5',"; 3397 if ($item_templ['dmg_type5'] != $dmg_type5) $sql_query .= "dmg_type5='$dmg_type5',"; 3398 if ($item_templ['armor'] != $armor) $sql_query .= "armor='$armor',"; 3399 if ($item_templ['holy_res'] != $holy_res) $sql_query .= "holy_res='$holy_res',"; 3400 if ($item_templ['fire_res'] != $fire_res) $sql_query .= "fire_res='$fire_res',"; 3401 if ($item_templ['nature_res'] != $nature_res) $sql_query .= "nature_res='$nature_res',"; 3402 if ($item_templ['frost_res'] != $frost_res) $sql_query .= "frost_res='$frost_res',"; 3403 if ($item_templ['shadow_res'] != $shadow_res) $sql_query .= "shadow_res='$shadow_res',"; 3404 if ($item_templ['arcane_res'] != $arcane_res) $sql_query .= "arcane_res='$arcane_res',"; 3405 if ($item_templ['delay'] != $delay) $sql_query .= "delay='$delay',"; 3406 if ($item_templ['ammo_type'] != $ammo_type) $sql_query .= "ammo_type='$ammo_type',"; 3407 if ($item_templ['RangedModRange'] != $RangedModRange) $sql_query .= "RangedModRange='$RangedModRange',"; 3408 if ($item_templ['spellid_1'] != $spellid_1) $sql_query .= "spellid_1='$spellid_1',"; 3409 if ($item_templ['spelltrigger_1'] != $spelltrigger_1) $sql_query .= "spelltrigger_1='$spelltrigger_1',"; 3410 if ($item_templ['spellcharges_1'] != $spellcharges_1) $sql_query .= "spellcharges_1='$spellcharges_1',"; 3411 if ($item_templ['spellcooldown_1'] != $spellcooldown_1) $sql_query .= "spellcooldown_1='$spellcooldown_1',"; 3412 if ($item_templ['spellcategory_1'] != $spellcategory_1) $sql_query .= "spellcategory_1='$spellcategory_1',"; 3413 if ($item_templ['spellcategorycooldown_1'] != $spellcategorycooldown_1) $sql_query .= "spellcategorycooldown_1='$spellcategorycooldown_1',"; 3414 if ($item_templ['spellid_2'] != $spellid_2) $sql_query .= "spellid_2='$spellid_2',"; 3415 if ($item_templ['spelltrigger_2'] != $spelltrigger_2) $sql_query .= "spelltrigger_2='$spelltrigger_2',"; 3416 if ($item_templ['spellcharges_2'] != $spellcharges_2) $sql_query .= "spellcharges_2='$spellcharges_2',"; 3417 if ($item_templ['spellcooldown_2'] != $spellcooldown_2) $sql_query .= "spellcooldown_2='$spellcooldown_2',"; 3418 if ($item_templ['spellcategory_2'] != $spellcategory_2) $sql_query .= "spellcategory_2='$spellcategory_2',"; 3419 if ($item_templ['spellcategorycooldown_2'] != $spellcategorycooldown_2) $sql_query .= "spellcategorycooldown_2='$spellcategorycooldown_2',"; 3420 if ($item_templ['spellid_3'] != $spellid_3) $sql_query .= "spellid_3='$spellid_3',"; 3421 if ($item_templ['spelltrigger_3'] != $spelltrigger_3) $sql_query .= "spelltrigger_3='$spelltrigger_3',"; 3422 if ($item_templ['spellcharges_3'] != $spellcharges_3) $sql_query .= "spellcharges_3='$spellcharges_3',"; 3423 if ($item_templ['spellcooldown_3'] != $spellcooldown_3) $sql_query .= "spellcooldown_3='$spellcooldown_3',"; 3424 if ($item_templ['spellcategory_3'] != $spellcategory_3) $sql_query .= "spellcategory_3='$spellcategory_3',"; 3425 if ($item_templ['spellcategorycooldown_3'] != $spellcategorycooldown_3) $sql_query .= "spellcategorycooldown_3='$spellcategorycooldown_3',"; 3428 3426 if ($item_templ['spellid_4'] != $spellid_4) $sql .= "spellid_4='$spellid_4',"; 3429 if ($item_templ['spelltrigger_4'] != $spelltrigger_4) $sql .= "spelltrigger_4='$spelltrigger_4',";3430 if ($item_templ['spellcharges_4'] != $spellcharges_4) $sql .= "spellcharges_4='$spellcharges_4',";3431 if ($item_templ['spellcooldown_4'] != $spellcooldown_4) $sql .= "spellcooldown_4='$spellcooldown_4',";3432 if ($item_templ['spellcategory_4'] != $spellcategory_4) $sql .= "spellcategory_4='$spellcategory_4',";3433 if ($item_templ['spellcategorycooldown_4'] != $spellcategorycooldown_4) $sql .= "spellcategorycooldown_4='$spellcategorycooldown_4', ";3434 if ($item_templ['spellid_5'] != $spellid_5) $sql .= "spellid_5='$spellid_5',";3435 if ($item_templ['spelltrigger_5'] != $spelltrigger_5) $sql .= "spelltrigger_5='$spelltrigger_5',";3436 if ($item_templ['spellcharges_5'] != $spellcharges_5) $sql .= "spellcharges_5='$spellcharges_5',";3437 if ($item_templ['spellcooldown_5'] != $spellcooldown_5) $sql .= "spellcooldown_5='$spellcooldown_5',";3438 if ($item_templ['spellcategory_5'] != $spellcategory_5) $sql .= "spellcategory_5='$spellcategory_5',";3439 if ($item_templ['spellcategorycooldown_5'] != $spellcategorycooldown_5) $sql .= "spellcategorycooldown_5='$spellcategorycooldown_5',";3440 if ($item_templ['bonding'] != $bonding) $sql .= "bonding='$bonding',";3441 if ($item_templ['description'] != $description) $sql .= "description='$description',";3442 if ($item_templ['PageText'] != $PageText) $sql .= "PageText='$PageText',";3443 if ($item_templ['LanguageID'] != $LanguageID) $sql .= "LanguageID='$LanguageID',";3444 if ($item_templ['PageMaterial'] != $PageMaterial) $sql .= "PageMaterial='$PageMaterial',";3445 if ($item_templ['startquest'] != $startquest) $sql .= "startquest='$startquest',";3446 if ($item_templ['lockid'] != $lockid) $sql .= "lockid='$lockid',";3447 if ($item_templ['Material'] != $Material) $sql .= "Material='$Material',";3448 if ($item_templ['sheath'] != $sheath) $sql .= "sheath='$sheath',";3449 if ($item_templ['RandomProperty'] != $RandomProperty) $sql .= "RandomProperty='$RandomProperty',";3450 if ($item_templ['block'] != $block) $sql .= "block='$block',";3451 if ($item_templ['itemset'] != $itemset) $sql .= "itemset='$itemset',";3452 if ($item_templ['MaxDurability'] != $MaxDurability) $sql .= "MaxDurability='$MaxDurability',";3453 if ($item_templ['area'] != $area) $sql .= "area='$area',";3454 if ($item_templ['BagFamily'] != $BagFamily) $sql .= "BagFamily='$BagFamily',";3455 if ($item_templ['Map'] != $Map) $sql .= "Map='$Map',";3456 if ($item_templ['ScriptName'] != $ScriptName) $sql .= "ScriptName='$ScriptName',";3457 if ($item_templ['DisenchantID'] != $DisenchantID) $sql .= "DisenchantID='$DisenchantID',";3458 if ($item_templ['RequiredDisenchantSkill'] != $RequiredDisenchantSkill) $sql .= "RequiredDisenchantSkill='$RequiredDisenchantSkill',";3459 if ($item_templ['ArmorDamageModifier'] != $ArmorDamageModifier) $sql .= "ArmorDamageModifier='$ArmorDamageModifier',";3460 if ($item_templ['unk0'] != $unk0) $sql .= "unk0='$unk0',";3461 if ($item_templ['RandomSuffix'] != $RandomSuffix) $sql .= "RandomSuffix='$RandomSuffix',";3462 if ($item_templ['TotemCategory'] != $TotemCategory) $sql .= "TotemCategory='$TotemCategory',";3463 if ($item_templ['socketColor_1'] != $socketColor_1) $sql .= "socketColor_1='$socketColor_1',";3464 if ($item_templ['socketContent_1'] != $socketContent_1) $sql .= "socketContent_1='$socketContent_1',";3465 if ($item_templ['socketColor_2'] != $socketColor_2) $sql .= "socketColor_2='$socketColor_2',";3466 if ($item_templ['socketContent_2'] != $socketContent_2) $sql .= "socketContent_2='$socketContent_2',";3467 if ($item_templ['socketColor_3'] != $socketColor_3) $sql .= "socketColor_3='$socketColor_3',";3468 if ($item_templ['socketContent_3'] != $socketContent_3) $sql .= "socketContent_3='$socketContent_3',";3469 if ($item_templ['socketBonus'] != $socketBonus) $sql .= "socketBonus='$socketBonus',";3470 if ($item_templ['GemProperties'] != $GemProperties) $sql .= "GemProperties='$GemProperties',";3471 if ($item_templ['ExtendedCost'] != $ExtendedCost) $sql .= "ExtendedCost='$ExtendedCost',";3472 3473 $ mysql->free_result($result);3427 if ($item_templ['spelltrigger_4'] != $spelltrigger_4) $sql_query .= "spelltrigger_4='$spelltrigger_4',"; 3428 if ($item_templ['spellcharges_4'] != $spellcharges_4) $sql_query .= "spellcharges_4='$spellcharges_4',"; 3429 if ($item_templ['spellcooldown_4'] != $spellcooldown_4) $sql_query .= "spellcooldown_4='$spellcooldown_4',"; 3430 if ($item_templ['spellcategory_4'] != $spellcategory_4) $sql_query .= "spellcategory_4='$spellcategory_4',"; 3431 if ($item_templ['spellcategorycooldown_4'] != $spellcategorycooldown_4) $sql_query .= "spellcategorycooldown_4='$spellcategorycooldown_4', "; 3432 if ($item_templ['spellid_5'] != $spellid_5) $sql_query .= "spellid_5='$spellid_5',"; 3433 if ($item_templ['spelltrigger_5'] != $spelltrigger_5) $sql_query .= "spelltrigger_5='$spelltrigger_5',"; 3434 if ($item_templ['spellcharges_5'] != $spellcharges_5) $sql_query .= "spellcharges_5='$spellcharges_5',"; 3435 if ($item_templ['spellcooldown_5'] != $spellcooldown_5) $sql_query .= "spellcooldown_5='$spellcooldown_5',"; 3436 if ($item_templ['spellcategory_5'] != $spellcategory_5) $sql_query .= "spellcategory_5='$spellcategory_5',"; 3437 if ($item_templ['spellcategorycooldown_5'] != $spellcategorycooldown_5) $sql_query .= "spellcategorycooldown_5='$spellcategorycooldown_5',"; 3438 if ($item_templ['bonding'] != $bonding) $sql_query .= "bonding='$bonding',"; 3439 if ($item_templ['description'] != $description) $sql_query .= "description='$description',"; 3440 if ($item_templ['PageText'] != $PageText) $sql_query .= "PageText='$PageText',"; 3441 if ($item_templ['LanguageID'] != $LanguageID) $sql_query .= "LanguageID='$LanguageID',"; 3442 if ($item_templ['PageMaterial'] != $PageMaterial) $sql_query .= "PageMaterial='$PageMaterial',"; 3443 if ($item_templ['startquest'] != $startquest) $sql_query .= "startquest='$startquest',"; 3444 if ($item_templ['lockid'] != $lockid) $sql_query .= "lockid='$lockid',"; 3445 if ($item_templ['Material'] != $Material) $sql_query .= "Material='$Material',"; 3446 if ($item_templ['sheath'] != $sheath) $sql_query .= "sheath='$sheath',"; 3447 if ($item_templ['RandomProperty'] != $RandomProperty) $sql_query .= "RandomProperty='$RandomProperty',"; 3448 if ($item_templ['block'] != $block) $sql_query .= "block='$block',"; 3449 if ($item_templ['itemset'] != $itemset) $sql_query .= "itemset='$itemset',"; 3450 if ($item_templ['MaxDurability'] != $MaxDurability) $sql_query .= "MaxDurability='$MaxDurability',"; 3451 if ($item_templ['area'] != $area) $sql_query .= "area='$area',"; 3452 if ($item_templ['BagFamily'] != $BagFamily) $sql_query .= "BagFamily='$BagFamily',"; 3453 if ($item_templ['Map'] != $Map) $sql_query .= "Map='$Map',"; 3454 if ($item_templ['ScriptName'] != $ScriptName) $sql_query .= "ScriptName='$ScriptName',"; 3455 if ($item_templ['DisenchantID'] != $DisenchantID) $sql_query .= "DisenchantID='$DisenchantID',"; 3456 if ($item_templ['RequiredDisenchantSkill'] != $RequiredDisenchantSkill) $sql_query .= "RequiredDisenchantSkill='$RequiredDisenchantSkill',"; 3457 if ($item_templ['ArmorDamageModifier'] != $ArmorDamageModifier) $sql_query .= "ArmorDamageModifier='$ArmorDamageModifier',"; 3458 if ($item_templ['unk0'] != $unk0) $sql_query .= "unk0='$unk0',"; 3459 if ($item_templ['RandomSuffix'] != $RandomSuffix) $sql_query .= "RandomSuffix='$RandomSuffix',"; 3460 if ($item_templ['TotemCategory'] != $TotemCategory) $sql_query .= "TotemCategory='$TotemCategory',"; 3461 if ($item_templ['socketColor_1'] != $socketColor_1) $sql_query .= "socketColor_1='$socketColor_1',"; 3462 if ($item_templ['socketContent_1'] != $socketContent_1) $sql_query .= "socketContent_1='$socketContent_1',"; 3463 if ($item_templ['socketColor_2'] != $socketColor_2) $sql_query .= "socketColor_2='$socketColor_2',"; 3464 if ($item_templ['socketContent_2'] != $socketContent_2) $sql_query .= "socketContent_2='$socketContent_2',"; 3465 if ($item_templ['socketColor_3'] != $socketColor_3) $sql_query .= "socketColor_3='$socketColor_3',"; 3466 if ($item_templ['socketContent_3'] != $socketContent_3) $sql_query .= "socketContent_3='$socketContent_3',"; 3467 if ($item_templ['socketBonus'] != $socketBonus) $sql_query .= "socketBonus='$socketBonus',"; 3468 if ($item_templ['GemProperties'] != $GemProperties) $sql_query .= "GemProperties='$GemProperties',"; 3469 if ($item_templ['ExtendedCost'] != $ExtendedCost) $sql_query .= "ExtendedCost='$ExtendedCost',"; 3470 3471 $sql->free_result($result); 3474 3472 unset($item_templ); 3475 3473 3476 if (($sql == "UPDATE item_template SET ")&&(!$de_item)&&(!$del_de_items)){3477 $ mysql->close();3474 if (($sql_query == "UPDATE item_template SET ")&&(!$de_item)&&(!$del_de_items)){ 3475 $sql->close(); 3478 3476 redirect("item.php?action=edit&entry=$entry&error=6"); 3479 3477 } else { 3480 if ($sql != "UPDATE item_template SET "){3481 $sql [strlen($sql)-1] = " ";3482 $sql .= " WHERE entry = '$entry';\n";3483 } else $sql = "";3478 if ($sql_query != "UPDATE item_template SET "){ 3479 $sql_query[strlen($sql_query)-1] = " "; 3480 $sql_query .= " WHERE entry = '$entry';\n"; 3481 } else $sql_query = ""; 3484 3482 } 3485 3483 3486 3484 if ($de_item){ 3487 $sql .= "INSERT INTO disenchant_loot_template (entry, item, ChanceOrRef, QuestChanceOrGroup, mincount, maxcount, quest_freeforall)3485 $sql_query .= "INSERT INTO disenchant_loot_template (entry, item, ChanceOrRef, QuestChanceOrGroup, mincount, maxcount, quest_freeforall) 3488 3486 VALUES ($DisenchantID,$de_item,'$de_ChanceOrRef', '$de_QuestChanceOrGroup' ,$de_mincount ,$de_maxcount ,$de_quest_freeforall);\n"; 3489 3487 } … … 3491 3489 if ($del_de_items){ 3492 3490 foreach($del_de_items as $item_id) 3493 $sql .= "DELETE FROM disenchant_loot_template WHERE entry = $DisenchantID AND item = $item_id;\n";3491 $sql_query .= "DELETE FROM disenchant_loot_template WHERE entry = $DisenchantID AND item = $item_id;\n"; 3494 3492 } 3495 3493 3496 3494 } else { 3497 $ mysql->close();3495 $sql->close(); 3498 3496 redirect("item.php?error=5"); 3499 3497 } 3500 3498 } else { 3501 $ mysql->close();3499 $sql->close(); 3502 3500 redirect("item.php?error=5"); 3503 3501 } 3504 3502 3505 3503 if ( isset($_POST['backup_op']) && ($_POST['backup_op'] == 1) ){ 3506 $ mysql->close();3504 $sql->close(); 3507 3505 Header("Content-type: application/octet-stream"); 3508 3506 Header("Content-Disposition: attachment; filename=itemid_$entry.sql"); 3509 echo $sql ;3507 echo $sql_query; 3510 3508 exit(); 3511 3509 } else { 3512 $sql = explode(';',$sql);3513 foreach($sql as $tmp_query) if(($tmp_query)&&($tmp_query != "\n")) $result = $mysql->query($tmp_query);3514 $ mysql->close();3510 $sql_query = explode(';',$sql_query); 3511 foreach($sql_query as $tmp_query) if(($tmp_query)&&($tmp_query != "\n")) $result = $sql->query($tmp_query); 3512 $sql->close(); 3515 3513 } 3516 3514 … … 3552 3550 else redirect("item.php?error=1"); 3553 3551 3554 $ mysql = new MySQL;3555 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);3556 3557 $result = $ mysql->query("DELETE FROM item_template WHERE entry = '$entry'");3558 3559 $ mysql->close();3552 $sql = new SQL; 3553 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 3554 3555 $result = $sql->query("DELETE FROM item_template WHERE entry = '$entry'"); 3556 3557 $sql->close(); 3560 3558 redirect("item.php"); 3561 3559 } -
minimanager/js/general.js
r5 r19 1 function Menu(){ //thanks to :Project Seven Development2 if(navigator.appVersion.indexOf("MSIE")==-1){return;}3 var i,k,g,lg,r=/\s*hvr/,nn='',c,cs='hvr',bv='menubar';4 5 for(i=0;i<6;i++){6 g=document.getElementById(bv+nn);7 if(g){8 lg=g.getElementsByTagName("LI");9 if(lg){10 for(k=0;k<lg.length;k++){11 lg[k].onmouseover=function(){12 c=this.className;cl=(c)?c+' '+cs:cs;13 this.className=cl;14 };15 lg[k].onmouseout=function(){16 c=this.className;17 this.className=(c)?c.replace(r,''):'';18 };19 }20 }21 }nn=i+1;22 }23 }24 25 1 function do_submit (form_name,backup){ 26 2 if (form_name == 'form1') { … … 31 7 else if (form_name == 'form2') document.form2.submit(); 32 8 else document.form.submit(); 9 } 10 11 function showHide(id){ 12 var o, st; 13 if( document.getElementById ) // Standart way 14 o = document.getElementById(id); 15 else if(document.all) // for old MSIE 16 o = document.all[id]; 17 else if(document.layers) // for NN4 18 o = document.layers[id]; 19 st = o.style; 20 // if the style.display value is blank we try to figure it out here 21 if(st.display == '' && o.offsetWidth != undefined && o.offsetHeight != undefined) 22 st.display = (o.offsetWidth != 0 && o.offsetHeight != 0) ? 'block' : 'none'; 23 st.display = (st.display == '' || st.display == 'block') ? 'none' : 'block'; 33 24 } 34 25 … … 60 51 61 52 if(DOM || IE) this.obj.innerHTML = t; 62 if(DOM) this.height = this.obj.offsetHeight; 63 else if(IE) this.height = this.obj.style.pixelHeight; 53 if(DOM){ 54 this.width = this.obj.offsetWidth; 55 this.height = this.obj.offsetHeight; 56 } else if(IE){ 57 this.width = this.obj.style.pixelWidth; 58 this.height = this.obj.style.pixelHeight; 59 } 60 64 61 65 62 this.move(); … … 177 174 var mouseX = mouseY = 0; 178 175 document.onmousemove = getMouseXY; 176 177 function ANSWERBOX() { 178 this.text = ''; 179 this.btn_ok = 'OK'; 180 this.btn_cancel = 'Cancel'; 181 this.classname = 'answerbox'; 182 this.btn_icon = 'img/warn_red.gif'; 183 this.height = 0; 184 this.obj = null; 185 this.active = false; 186 187 this.create = function(action) { 188 if(!this.obj) this.init(); 189 190 var t = '<table class="' + this.classname + '"><tr><th colspan=2>'+((this.btn_icon)?'<img src="'+ this.btn_icon +'" width="48" height="48" alt="" align="absmiddle" />':'')+ this.text +'</th></tr>' 191 + '<tr align="center"><td><a class="button" style="width:120px;" href="' + action + '">' + this.btn_ok + '</a></td>' 192 + '<td><a class="button" style="width:120px;" href="#" onclick="answerbox.hide()">' + this.btn_cancel + '</a></td></tr></table>'; 193 194 if(DOM || IE) this.obj.innerHTML = t; 195 if(DOM){ 196 this.width = this.obj.offsetWidth; 197 this.height = this.obj.offsetHeight; 198 } else if(IE){ 199 this.width = this.obj.style.pixelWidth; 200 this.height = this.obj.style.pixelHeight; 201 } 202 203 this.move(); 204 this.show(); 205 } 206 207 this.init = function() { 208 if(DOM) this.obj = document.getElementById('AnswerBox'); 209 else if(IE) this.obj = document.all.AnswerBox; 210 } 211 212 this.move = function() { 213 var winX = getWinX() - (((GK && !SA) || OP) ? 17 : 0); 214 var winY = getWinY() - (((GK && !SA) || OP) ? 17 : 0); 215 216 this.obj.style.left = (winX/2 + getScrX() - this.width/2 - 5) + 'px'; 217 this.obj.style.top = (winY/2 + getScrY() - this.height/2 - 5) + 'px'; 218 } 219 220 this.show = function() { 221 this.obj.style.zIndex = 60; 222 this.active = true; 223 this.obj.style.visibility = 'visible'; 224 } 225 226 this.hide = function() { 227 this.obj.style.zIndex = -1; 228 this.active = false; 229 this.obj.style.visibility = 'hidden'; 230 } 231 232 } 233 234 function answerBox(text, action) { 235 if(text) { 236 answerbox.text = text; 237 answerbox.create(action); 238 } 239 } 240 241 document.write('<div id="AnswerBox" style="position:absolute; visibility:hidden"></div>'); 242 answerbox = new ANSWERBOX(); 243 answerbox.init(); -
minimanager/lang/deDE.php
r5 r19 28 28 'none' => 'nichts', 29 29 'delete' => 'löschen', 30 'delete_short' => 'Del.', 30 31 'edit' => 'Bearbeiten', 31 32 'yes' => 'JA', … … 256 257 'no_act_quests' => 'No active Quests Found.', //TODO: Translate 257 258 'quest_id' => 'ID', //TODO: Translate 259 'quest_level' => 'lvl', 258 260 'quest_title' => 'Quest Title', //TODO: Translate 259 261 'professions' => 'Professions', //TODO 260 262 'skills' => 'Skills', //TODO 263 'skill_id' => 'ID', //TODO 264 'skill_name' => 'Skill Name', //TODO 265 'skill_value' => 'Value', //TODO 266 // --- $skill_rank_array --- 267 'apprentice' => 'Apprentice', //TODO: Translate 268 'journeyman' => 'Journeyman', //TODO: Translate 269 'expert' => 'Expert', //TODO: Translate 270 'artisan' => 'artisan', //TODO: Translate 271 'master' => 'Master', //TODO: Translate 272 'inherent' => 'Inherent', //TODO: Translate 273 'wise' => 'Wise', //TODO: Translate 261 274 // ---- edit_char.php ---- 262 275 'update' => 'Aktualisiere Charakterdaten', … … 593 606 $lang_mail = array( 594 607 // ----- MAIL.PHP ----- 595 'mail_options_type' => 'Mail Optionen / Art', 608 'mail_type' => 'Mail Type', 609 'mail_options' => 'Mail Options', 596 610 'email' => 'Email', 597 611 'ingame_mail' => 'WoW-Post', … … 631 645 $lang_run_patch = array( 632 646 // -----RUN_PATCH.PHP ----- 633 'err_in_line' => ' MySQL Syntaxfehler in Abfrage Nummer ',647 'err_in_line' => 'SQL Syntaxfehler in Abfrage Nummer ', 634 648 'run_sql_file_only' => 'Du kannst nur .sql oder .qbquery Dateien ausführen.', 635 649 'file_not_found' => 'Datei nicht gefunden!', … … 1364 1378 'req_level_desc' => 'Character level required to learn this spell.', 1365 1379 'check_to_delete' => '* Check checkbox next to item to remove from template.', 1366 'search_results' => 'Search Results' 1380 'search_results' => 'Search Results', 1381 'RacialLeader' => 'Racial Leader', 1382 'RacialLeader_desc' => 'Set to 1 if the creature is Racial Leader' 1367 1383 ); 1368 1384 … … 1489 1505 'total_auctions' => 'Total Auctions', 1490 1506 'search_results' => 'Search Results', 1491 'auction_over' => 'Auction Over' 1507 'auction_over' => 'Auction Over', 1508 'all' => 'All', 1509 'item_id' => 'Item Id', 1510 'item_name' => 'Item Name', 1511 'seller_name' => 'Seller Name', 1512 'buyer_name' => 'Buyer Name', 1513 'tot_found' => 'Total Items Found' 1492 1514 ); 1493 1515 -
minimanager/lang/enUS.php
r5 r19 27 27 'home' => 'Home', 28 28 'none' => 'none', 29 'delete' => 'Del.', 29 'delete' => 'Delete', 30 'delete_short' => 'Del.', 30 31 'edit' => 'Edit', 31 32 'yes' => 'YES', … … 256 257 'no_act_quests' => 'No active Quests Found.', 257 258 'quest_id' => 'ID', 259 'quest_level' => 'lvl', 258 260 'quest_title' => 'Quest Title', 259 261 'professions' => 'Professions', 260 262 'skills' => 'Skills', 263 'skill_id' => 'ID', 264 'skill_name' => 'Skill Name', 265 'skill_value' => 'Value', 266 // --- $skill_rank_array --- 267 'apprentice' => 'Apprentice', 268 'journeyman' => 'Journeyman', 269 'expert' => 'Expert', 270 'artisan' => 'artisan', 271 'master' => 'Master', 272 'inherent' => 'Inherent', 273 'wise' => 'Wise', 261 274 // ---- edit_char.php ---- 262 275 'update' => 'Update Character\'s Data', … … 591 604 $lang_mail = array( 592 605 // ----- MAIL.PHP ----- 593 'mail_options_type' => 'Mail Options / Type', 606 'mail_type' => 'Mail Type', 607 'mail_options' => 'Mail Options', 594 608 'email' => 'Email', 595 609 'ingame_mail' => 'InGame Mail', … … 629 643 $lang_run_patch = array( 630 644 // -----RUN_PATCH.PHP ----- 631 'err_in_line' => ' MySQL syntax error in query number ',645 'err_in_line' => 'SQL syntax error in query number ', 632 646 'run_sql_file_only' => 'You may only run .sql or .qbquery files.', 633 647 'file_not_found' => 'File Not Found!', … … 1360 1374 'req_level_desc' => 'Character level required to learn this spell.', 1361 1375 'check_to_delete' => '* Check checkbox next to item to remove from template.', 1362 'search_results' => 'Search Results' 1376 'search_results' => 'Search Results', 1377 'RacialLeader' => 'Racial Leader', 1378 'RacialLeader_desc' => 'Set to 1 if the creature is Racial Leader' 1363 1379 ); 1364 1380 … … 1485 1501 'total_auctions' => 'Total Auctions', 1486 1502 'search_results' => 'Search Results', 1487 'auction_over' => 'Auction Over' 1503 'auction_over' => 'Auction Over', 1504 'all' => 'All', 1505 'item_id' => 'Item Id', 1506 'item_name' => 'Item Name', 1507 'seller_name' => 'Seller Name', 1508 'buyer_name' => 'Buyer Name', 1509 'tot_found' => 'Total Items Found' 1488 1510 ); 1489 1511 -
minimanager/lang/esAR.php
r5 r19 29 29 'none' => 'ninguno', 30 30 'delete' => 'Borrar', 31 'delete_short' => 'Del.', 31 32 'edit' => 'Editar', 32 33 'yes' => 'SI', … … 105 106 'name' => 'Nombre', 106 107 'race' => 'Raza', 107 'class' => 'Prof esión',108 'level' => 'N ivel',109 'map' => ' Mapa',108 'class' => 'Prof.', 109 'level' => 'Nvl', 110 'map' => 'Región', 110 111 'zone' => 'Zona', 111 'honor_kills' => ' Honor'112 'honor_kills' => 'Kills' 112 113 ); 113 114 … … 248 249 'chars_acc' => 'Ver Personajes', 249 250 'send_mail' =>'Enviar Correo', 250 'del_char' => 'Eliminar estePersonaje',251 'del_char' => 'Eliminar Personaje', 251 252 'no_char_found' => 'No posee personajes!', 252 253 'char_sheet' => 'Hoja de Personaje', … … 257 258 'no_act_quests' => 'No hay Misiones Activas.', 258 259 'quest_id' => 'ID', 259 'quest_l vl' => 'Nvl',260 'quest_level' => 'Nvl', 260 261 'quest_title' => 'Título', 261 262 'professions' => 'Profesiones', 262 263 'skills' => 'Habilidades', 264 'skill_id' => 'ID', 265 'skill_name' => 'Nombre', 266 'skill_value' => 'Valor', 267 // --- $skill_rank_array --- 268 'apprentice' => 'Apendiz', 269 'journeyman' => 'Especializado', 270 'expert' => 'Experto', 271 'artisan' => 'Artesano', 272 'master' => 'Master', 273 'inherent' => 'Innato', 274 'wise' => 'Sabio', 263 275 // ---- edit_char.php ---- 264 276 'update' => 'Actualizar Datos', 265 277 'edit_char' => 'Editar Datos', 266 278 'edit_button' => 'Editar Datos', 267 'edit_rules' => ' The values are character\'s base status without the item/spell modifiers.', //TODO279 'edit_rules' => 'Los valores de las caracteristicas están sin los modificadores de los items y hechizos.', 268 280 'edit_offline_only_char' => ' - Solo los personajes No Conectados pueden ser editados.', 269 281 'no_permission' => 'Ud. no posee permisos para editar este personaje.', … … 275 287 'to_char_view' => 'Ver Personajes', 276 288 'inv_bank' => 'Inventario y Banco', 277 'location' => ' Localización',278 'move_to' => 'T eletransportar a (igual que .tele)',289 'location' => 'Posición', 290 'move_to' => 'Transportar a', 279 291 'no_tp_location' => 'No se encontró la localización del lugar provisto.' //TODO 280 292 ); … … 368 380 'poor' => 'Pobre', 369 381 'common' => 'Común', 370 'uncommon' => 'No Común',382 'uncommon' => 'No Común', 371 383 'rare' => 'Raro', 372 384 'epic' => 'Epico', … … 382 394 'shield' => 'Escudo', 383 395 'buckler' => 'Buckler', 384 'block' => 'Bloque ',396 'block' => 'Bloqueo', 385 397 'none' => 'Ninguno', 386 398 'other' => 'Otro', … … 394 406 'arcane_dmg' => 'Arcano', 395 407 'physical_dmg' => 'Físico', 396 'lvl_req' => 'Nivel Req uerido',408 'lvl_req' => 'Nivel Req.', 397 409 'item_set' => 'Item Set', 398 410 'bag' => 'Bolsa', … … 404 416 'res_nature' => 'Res. a la Naturaleza', 405 417 'res_frost' => 'Res. al Frío', 406 'res_shadow' => 'Res. a la Sombra',418 'res_shadow' => 'Res. a la Sombra', 407 419 'strength' => 'Fuerza', 408 420 'agility' => 'Agilidad', … … 463 475 $lang_char_list = array( 464 476 // ----- CHAR_LIST.PHP ----- 465 'cleanup' =>'Depurar Datos',466 'by_name' => ' porNombre',467 'by_id' => ' porId',468 'by_account' => ' porCuenta',477 'cleanup' =>'Depurar Bases', 478 'by_name' => 'x Nombre', 479 'by_id' => 'x Id', 480 'by_account' => 'x Cuenta', 469 481 'by_level' => '= Nivel', 470 482 'greater_level' => '< Nivel', 471 'by_guild' => ' porCofradía',472 'by_race_id' => ' porId de Raza',473 'by_class_id' => ' porId de Prof.',474 'by_map_id' => ' porId de Mapa',483 'by_guild' => 'x Cofradía', 484 'by_race_id' => 'x Id de Raza', 485 'by_class_id' => 'x Id de Prof.', 486 'by_map_id' => 'x Id de Mapa', 475 487 'by_honor_kills' => '= Honor', 476 488 'greater_honor_kills' => '< Honor', 477 'by_online' => ' porConectado',489 'by_online' => 'x Conectado', 478 490 'id' => 'ID', 479 491 'char_name' => 'Nombre', 480 492 'account' => 'Usuario', 481 493 'race' => 'Raza', 482 'class' => 'Prof esión',483 'level' => 'N ivel',494 'class' => 'Prof.', 495 'level' => 'Nvl', 484 496 'map' => 'Mapa', 485 497 'zone' => 'Zona', 486 'honor_kills' => ' Honor',498 'honor_kills' => 'Kills', 487 499 'online' => 'Estado', 488 500 'del_selected_chars' => 'Eliminar Personaje(s) Marcado(s)', … … 498 510 'browse_chars' => 'Listar Personajes', 499 511 'chars_gold' => '< Monedas (C)', 500 'by_item' => ' porID de Elemento'512 'by_item' => 'x ID de Elemento' 501 513 ); 502 514 … … 526 538 'accs_deleted' => '¡Cuenta(s) Eliminada(s)!', 527 539 'chars_deleted' => '¡Personaje(s) Eliminado(s)!', 528 'back_cleaning' => 'Vo vler',529 'clean_db' => 'Depurar Datos'540 'back_cleaning' => 'Volver', 541 'clean_db' => 'Depurar Bases' 530 542 ); 531 543 532 544 $lang_edit = array( 533 545 // ----- EDIT.PHP ----- 534 'edit_acc' =>'Editar TuCuenta',535 'id' => 'I D',546 'edit_acc' =>'Editar Mi Cuenta', 547 'id' => 'Id', 536 548 'username' => 'Usuario', 537 549 'password' => 'Contraseña', 538 'mail' => ' E-Mail',539 'gm_level' => ' GMlevel',550 'mail' => 'Correo', 551 'gm_level' => 'Tipo de Cuenta', 540 552 'join_date' => 'Unido el', 541 553 'characters' => 'Personajes', … … 547 559 'error_updating' => 'Error de Actualización! - Non of the fields changed?', 548 560 'del_error' => 'Error Inesperado de Eliminación.', 549 'edit_your_acc' => 'Editar TuCuenta',550 'cms_options' => 'Opciones de l CMS',551 'select_cms_template' => ' Seleccione unTema',561 'edit_your_acc' => 'Editar Mi Cuenta', 562 'cms_options' => 'Opciones de la Página', 563 'select_cms_template' => 'Elegir Tema', 552 564 'template' => 'Tema', 553 'select_cms_layout_lang' => ' Seleccione unIdioma',565 'select_cms_layout_lang' => 'Elegir Idioma', 554 566 'language' => 'Idioma', 555 567 'save' => 'Actualizar', … … 557 569 'classic' => 'Clásico', 558 570 'expansion' => 'Expansión', 559 'tot_chars' => ' Total Characters'571 'tot_chars' => 'Personajes' 560 572 ); 561 573 562 574 $lang_guild = array( 563 575 // ----- GUILD.PHP ----- 564 'by_name' =>' porNombre',565 'by_guild_leader' => ' porLider',566 'by_create_date' => ' porFecha',567 'by_id' => ' porId',576 'by_name' =>'x Nombre', 577 'by_guild_leader' => 'x Lider', 578 'by_create_date' => 'x Fecha', 579 'by_id' => 'x Id', 568 580 'id' => 'Id', 569 581 'guild_name' => 'Nombre', … … 579 591 'info' => 'Info', 580 592 'motd' => 'Mensaje del Día', 581 'level' => 'N ivel',593 'level' => 'Nvl', 582 594 'name' => 'Nombre', 583 595 'remove' => 'Borrar', … … 593 605 $lang_mail = array( 594 606 // ----- MAIL.PHP ----- 595 'mail_options_type' => 'Opciones y Tipo de Correo', 607 'mail_type' => 'Mail Type', 608 'mail_options' => 'Mail Options', 596 609 'email' => 'E-Mail', 597 610 'ingame_mail' => 'Correo WoW', … … 610 623 'item' => 'Item (id)', 611 624 'stack' => 'Stack', 612 'mail_body' => ' Texto del Mensaje',625 'mail_body' => 'Cuerpo del Mensaje', 613 626 'dont_use_both_groupsend_and_to' => '* Nota: Si utilizala opción \'Por Grupo\' , asegurese de dejar vacio el campo \'Destinatarios\'.', 614 627 'mail_sent' => 'Correo Enviado Satisfactoriamente.', … … 631 644 $lang_run_patch = array( 632 645 // -----RUN_PATCH.PHP ----- 633 'err_in_line' => 'Error de Sintaxis MySQL en la sentencia Nº ',646 'err_in_line' => 'Error de Sintaxis SQL en la sentencia Nº ', 634 647 'run_sql_file_only' => 'Solo puede ejecutar archivos .sql o .qbquery.', 635 648 'file_not_found' => '¡Archivo No Encontrado!', … … 660 673 'icon' => 'Icono', 661 674 'color' => 'Color', 662 'timezone' => ' Zona Horaria',675 'timezone' => 'Idioma', 663 676 'edit_realm' => 'Editar Datos', 664 'id' => 'I D',677 'id' => 'Id', 665 678 'update' => 'Actualizar Datos', 666 679 'realm_id' => 'Id del Mundo', … … 669 682 'update_err' => '¡Error de Actualización de Datos!<br />¿No se modificaron los campos?', 670 683 'realm_data' => 'Datos del Mundo', 671 'online' => ' Disponible',672 'tot_char' => ' Total dePersonajes',684 'online' => 'Estado', 685 'tot_char' => 'Personajes', 673 686 'delete' => 'Eliminar Mundo', 674 687 'normal' => 'Normal', … … 680 693 'french' => 'Frances', 681 694 'others' => 'Otros', 682 'conf_from_file' => '** This realm appear not to have proper configuration in config.php file.<br />Make sure to properly configure it before using under CMS.',//TODO695 'conf_from_file' => '** Este Mundo no se encuentra correctamente configurado en el archivo config.php<br />Asegurese de verificar la configuración antes de continuar utilizando el MiniManager.', 683 696 'offline' => 'Desconectado', 684 697 'status' => 'Estado' … … 687 700 $lang_ticket = array( 688 701 // ----- TICKET.PHP ----- 689 'id' =>'I D',702 'id' =>'Id', 690 703 'sender' => 'Remitente', 691 704 'ticket_text' => 'Texto del Ticket', … … 725 738 'cleanup' => 'Depurar Bases', 726 739 'backup' => 'Resguardos', 727 'by_name' => ' porNombre',728 'by_tbc' => ' porCuenta TBC',729 'by_id' => ' porID',740 'by_name' => 'x Nombre', 741 'by_tbc' => 'x Cuenta TBC', 742 'by_id' => 'x ID', 730 743 'by_gm_level' => '= Nivel GM', 731 744 'greater_gm_level' => '< Nivel GM', 732 'by_email' => ' por Email',733 'by_join_date' => ' porFecha de Unión',734 'by_ip' => ' porIP',745 'by_email' => 'x E-Mail', 746 'by_join_date' => 'x Fecha de Unión', 747 'by_ip' => 'x IP', 735 748 'by_failed_loggins' => '< Conexiones Fallidas', 736 'by_last_login' => ' porÚltima Conexión',737 'by_online' => ' porConectado',738 'by_banned' => ' porSuspendido',739 'by_locked' => ' porBloqueado',740 'id' => 'I D',749 'by_last_login' => 'x Última Conexión', 750 'by_online' => 'x Conectado', 751 'by_banned' => 'x Suspendido', 752 'by_locked' => 'x Bloqueado', 753 'id' => 'Id', 741 754 'username' => 'Usuario', 742 755 'gm_level' => 'Tipo', … … 751 764 'del_selected_users' => 'Eliminar Seleccionados', 752 765 'backup_selected_users' => 'Resguardar Seleccionados', 753 'acc_backedup' => 'Resguardo de Cuentas Realizadas Satisfactoriamente',766 'acc_backedup' => 'Resguardo de cuentas Realizadas Satisfactoriamente', 754 767 'tot_acc' => 'Total de Cuentas', 755 768 'user_list' => 'Lista de Usuarios', … … 797 810 'srv_statistics' => 'Estadisticas del Servidor', 798 811 'general_info' => 'Información General', 799 'tot_accounts' => ' Total de Cuentas',800 'total_of' => ' Hay un total de',801 'gms_one_for' => ' GMs, Uno por cada',802 'players' => ' Jugadores',803 'tot_chars_on_realm' => 'Total de Personajes ',804 'average_of' => ' Un promedio de',805 'chars_per_acc' => ' Personajes por Cuenta',812 'tot_accounts' => '</b>Total de Cuentas<b>', 813 'total_of' => '</b>Hay un total de <b>', 814 'gms_one_for' => '</b>GMs, uno por cada <b>', 815 'players' => '</b>jugadores', 816 'tot_chars_on_realm' => 'Total de Personajes<b>', 817 'average_of' => '</b>Un promedio de<b>', 818 'chars_per_acc' => '</b>personajes por cuenta', 806 819 'horde' => 'Horda', 807 820 'alliance' => 'Alianza', 808 'chars_by_race' => 'P ersonajes por Raza',809 'chars_by_class' => 'P ersonajes por Profesión',810 'chars_by_level' => ' Niveles de Personajes',811 'reset' => ' Refescar',812 'avg_uptime' => ' Tiempo en linea Promedio del Servidor',813 'max_uptime' => ' Tiempo en linea Máximo del Servidor',814 'uptime_prec' => ' Uptime percentage since first run'821 'chars_by_race' => 'Promedio de Razas', 822 'chars_by_class' => 'Promedio de Profesiones', 823 'chars_by_level' => 'Promedio de Niveles', 824 'reset' => 'Actualizar', 825 'avg_uptime' => '</b>Tiempo Promedio en linea del Servidor<b>', 826 'max_uptime' => '</b>Tiempo Máximo en linea del Servidor<b>', 827 'uptime_prec' => '</b>Porcentaje promedio en linea del Servidor<b>' 815 828 ); 816 829 … … 1086 1099 'drop_chance' => 'Drop Chance', 1087 1100 'quest_drop_chance' => 'Quest Drop Chance', 1088 'quest_freeforall' => 'Quest free for all' 1101 'quest_freeforall' => 'Quest free for all', 1089 1102 'armor_dmg_mod' => 'Armor Damage Modifier', 1090 1103 'armor_dmg_mod_desc' => 'TODO:' … … 1363 1376 'req_level_desc' => 'Character level required to learn this spell.', 1364 1377 'check_to_delete' => '* Check checkbox next to item to delete.', 1365 'search_results' => 'Search Results' 1378 'search_results' => 'Search Results', 1379 'RacialLeader' => 'Racial Leader', 1380 'RacialLeader_desc' => 'Set to 1 if the creature is Racial Leader' 1366 1381 ); 1367 1382 … … 1488 1503 'total_auctions' => 'Total de Subastas', 1489 1504 'search_results' => 'Resultado', 1490 'auction_over' => 'Subastar' 1505 'auction_over' => 'Subastar', 1506 //todo 1507 'all' => 'All', 1508 'item_id' => 'Item Id', 1509 'item_name' => 'Item Name', 1510 'seller_name' => 'Seller Name', 1511 'buyer_name' => 'Buyer Name', 1512 'tot_found' => 'Total Items Found' 1491 1513 ); 1492 1514 … … 1565 1587 'zulaman' => 'Zul\'Aman', 1566 1588 //---class/race--- 1567 'unknown' => ' Unknown',1589 'unknown' => 'Desconocido', 1568 1590 'warrior' => 'Guerrero', 1569 1591 'paladin' => 'Paladín', -
minimanager/lang/frBE.php
r5 r19 28 28 'none' => 'aucun', 29 29 'delete' => 'Suppr.', 30 'delete_short' => 'Del.', 30 31 'edit' => 'Editer', 31 32 'yes' => 'OUI', … … 257 258 'no_act_quests' => 'No active Quests Found.', //TODO: Translate 258 259 'quest_id' => 'ID', //TODO: Translate 260 'quest_level' => 'lvl', 259 261 'quest_title' => 'Quest Title', //TODO: Translate 260 262 'professions' => 'Professions', //TODO 261 263 'skills' => 'Skills', //TODO 264 'skill_id' => 'ID', //TODO 265 'skill_name' => 'Skill Name', //TODO 266 'skill_value' => 'Value', //TODO 267 // --- $skill_rank_array --- 268 'apprentice' => 'Apprentice', //TODO: Translate 269 'journeyman' => 'Journeyman', //TODO: Translate 270 'expert' => 'Expert', //TODO: Translate 271 'artisan' => 'artisan', //TODO: Translate 272 'master' => 'Master', //TODO: Translate 273 'inherent' => 'Inherent', //TODO: Translate 274 'wise' => 'Wise', //TODO: Translate 262 275 // ---- edit_char.php ---- 263 276 'update' => 'Sauvegarder', … … 593 606 $lang_mail = array( 594 607 // ----- MAIL.PHP ----- 595 'mail_options_type' => 'Options / types d\'email', 608 'mail_type' => 'Mail Type', 609 'mail_options' => 'Mail Options', 596 610 'email' => 'Email', 597 611 'ingame_mail' => 'Mail dans le jeu', … … 1364 1378 'req_level_desc' => 'Character level required to learn this spell.', 1365 1379 'check_to_delete' => '* Check checkbox next to item to remove from template.', 1366 'search_results' => 'Search Results' 1380 'search_results' => 'Search Results', 1381 'RacialLeader' => 'Racial Leader', 1382 'RacialLeader_desc' => 'Set to 1 if the creature is Racial Leader' 1367 1383 ); 1368 1384 … … 1489 1505 'total_auctions' => 'Total Auctions', 1490 1506 'search_results' => 'Search Results', 1491 'auction_over' => 'Auction Over' 1507 'auction_over' => 'Auction Over', 1508 'all' => 'All', 1509 'item_id' => 'Item Id', 1510 'item_name' => 'Item Name', 1511 'seller_name' => 'Seller Name', 1512 'buyer_name' => 'Buyer Name', 1513 'tot_found' => 'Total Items Found' 1492 1514 ); 1493 1515 -
minimanager/lang/frFR.php
r5 r19 29 29 'none' => 'aucun', 30 30 'delete' => 'Suppr.', 31 'delete_short' => 'Del.', 31 32 'edit' => 'Editer', 32 33 'yes' => 'OUI', … … 256 257 'quests' => 'Quêtes', 257 258 'no_act_quests' => 'Aucune quête active.', 258 'quest_id' => 'ID', 259 'quest_id' => 'ID', 260 'quest_level' => 'lvl', 259 261 'quest_title' => 'Titre de Quête', 260 262 'professions' => 'Professions', 261 263 'skills' => 'Talents', 264 'skill_id' => 'ID', //TODO 265 'skill_name' => 'Skill Name', //TODO 266 'skill_value' => 'Value', //TODO 267 // --- $skill_rank_array --- 268 'apprentice' => 'Apprentice', //TODO: Translate 269 'journeyman' => 'Journeyman', //TODO: Translate 270 'expert' => 'Expert', //TODO: Translate 271 'artisan' => 'artisan', //TODO: Translate 272 'master' => 'Master', //TODO: Translate 273 'inherent' => 'Inherent', //TODO: Translate 274 'wise' => 'Wise', //TODO: Translate 262 275 // ---- edit_char.php ---- 263 276 'update' => 'Mise à jour', … … 591 604 $lang_mail = array( 592 605 // ----- MAIL.PHP ----- 593 'mail_options_type' => 'Options / types d\'email', 606 'mail_type' => 'Mail Type', 607 'mail_options' => 'Mail Options', 594 608 'email' => 'Email', 595 609 'ingame_mail' => 'Mail dans le jeu', … … 1360 1374 'req_level' => 'Req. Level', 1361 1375 'req_level_desc' => 'Niveau de personnage requis pour apprendre ce sort.', 1362 'check_to_delete' => '* Cocher la case à côté de l\'item pour enlever du modèle.' 1376 'check_to_delete' => '* Cocher la case à côté de l\'item pour enlever du modèle.', 1377 'search_results' => 'Search Results', 1378 'RacialLeader' => 'Racial Leader', 1379 'RacialLeader_desc' => 'Set to 1 if the creature is Racial Leader' 1363 1380 ); 1364 1381 … … 1488 1505 'total_auctions' => 'Total Auctions', 1489 1506 'search_results' => 'Search Results', 1490 'auction_over' => 'Auction Over' 1507 'auction_over' => 'Auction Over', 1508 'all' => 'All', 1509 'item_id' => 'Item Id', 1510 'item_name' => 'Item Name', 1511 'seller_name' => 'Seller Name', 1512 'buyer_name' => 'Buyer Name', 1513 'tot_found' => 'Total Items Found' 1491 1514 ); 1492 1515 -
minimanager/lang/hrHR.php
r5 r19 31 31 'none' => 'nita', 32 32 'delete' => 'Obrii', 33 'delete_short' => 'Del.', 33 34 'edit' => 'Izmjeni', 34 35 'yes' => 'DA', … … 259 260 'no_act_quests' => 'No active Quests Found.', 260 261 'quest_id' => 'ID', 262 'quest_level' => 'lvl', 261 263 'quest_title' => 'Naslov Questova', 262 264 'professions' => 'Profesije', 263 265 'skills' => 'Skilovi', 266 'skill_id' => 'ID', //TODO 267 'skill_name' => 'Skill Name', //TODO 268 'skill_value' => 'Value', //TODO 269 // --- $skill_rank_array --- 270 'apprentice' => 'Apprentice', //TODO: Translate 271 'journeyman' => 'Journeyman', //TODO: Translate 272 'expert' => 'Expert', //TODO: Translate 273 'artisan' => 'artisan', //TODO: Translate 274 'master' => 'Master', //TODO: Translate 275 'inherent' => 'Inherent', //TODO: Translate 276 'wise' => 'Wise', //TODO: Translate 264 277 // ---- edit_char.php ---- 265 278 'update' => 'Izmjeni podatke lika', … … 594 607 $lang_mail = array( 595 608 // ----- MAIL.PHP ----- 596 'mail_options_type' => 'Mail Options / Type', 609 'mail_type' => 'Mail Type', 610 'mail_options' => 'Mail Options', 597 611 'email' => 'Email', 598 612 'ingame_mail' => 'InGame Mail', … … 632 646 $lang_run_patch = array( 633 647 // -----RUN_PATCH.PHP ----- 634 'err_in_line' => ' MySQL syntax error in query number ',648 'err_in_line' => 'SQL syntax error in query number ', 635 649 'run_sql_file_only' => 'You may only run .sql or .qbquery files.', 636 650 'file_not_found' => 'File Not Found!', … … 1362 1376 'req_level_desc' => 'Character level required to learn this spell.', 1363 1377 'check_to_delete' => '* Check checkbox next to item to remove from template.', 1364 'search_results' => 'Search Results' 1378 'search_results' => 'Search Results', 1379 'RacialLeader' => 'Racial Leader', 1380 'RacialLeader_desc' => 'Set to 1 if the creature is Racial Leader' 1365 1381 ); 1366 1382 … … 1487 1503 'total_auctions' => 'Total Auctions', 1488 1504 'search_results' => 'Search Results', 1489 'auction_over' => 'Auction Over' 1505 'auction_over' => 'Auction Over', 1506 'all' => 'All', 1507 'item_id' => 'Item Id', 1508 'item_name' => 'Item Name', 1509 'seller_name' => 'Seller Name', 1510 'buyer_name' => 'Buyer Name', 1511 'tot_found' => 'Total Items Found' 1490 1512 ); 1491 1513 -
minimanager/lang/noBM.php
r5 r19 28 28 'none' => 'ingen', 29 29 'delete' => 'Slett', 30 'delete_short' => 'Del.', 30 31 'edit' => 'Endre', 31 32 'yes' => 'JA', … … 256 257 'quests' => 'Oppdrag', 257 258 'no_act_quests' => 'Ingen aktive oppdrag funnet.', 258 'quest_id' => 'ID', 259 'quest_id' => 'ID', 260 'quest_level' => 'lvl', 259 261 'quest_title' => 'Oppdrags navn', 260 262 'professions' => 'Professions', //TODO 261 263 'skills' => 'Skills', //TODO 264 'skill_id' => 'ID', //TODO 265 'skill_name' => 'Skill Name', //TODO 266 'skill_value' => 'Value', //TODO 267 // --- $skill_rank_array --- 268 'apprentice' => 'Apprentice', //TODO: Translate 269 'journeyman' => 'Journeyman', //TODO: Translate 270 'expert' => 'Expert', //TODO: Translate 271 'artisan' => 'artisan', //TODO: Translate 272 'master' => 'Master', //TODO: Translate 273 'inherent' => 'Inherent', //TODO: Translate 274 'wise' => 'Wise', //TODO: Translate 262 275 // ---- edit_char.php ---- 263 276 'update' => 'Oppdater person data', … … 591 604 $lang_mail = array( 592 605 // ----- MAIL.PHP ----- 593 'mail_options_type' => 'E-post innstillinger / Type', 606 'mail_type' => 'Mail Type', 607 'mail_options' => 'Mail Options', 594 608 'email' => 'E-post', 595 609 'ingame_mail' => 'InGame Mail', … … 629 643 $lang_run_patch = array( 630 644 // -----RUN_PATCH.PHP ----- 631 'err_in_line' => ' MySQL syntax fil i forespørsel nummer ',645 'err_in_line' => 'SQL syntax fil i forespørsel nummer ', 632 646 'run_sql_file_only' => 'Du kan kun kjøre .sql eller .qbquery filer.', 633 647 'file_not_found' => 'Fil ikke funnet!', … … 1090 1104 'armor_dmg_mod' => 'Armor Damage Modifier', 1091 1105 'armor_dmg_mod_desc' => 'TODO:' 1092 );1093 1094 $lang_game_object = array( //TODO:1095 // ----- GAME_OBJECT.PHP -----1096 'unknown' => 'Unknown',1097 'custom_search' => 'Custom Filter',1098 'search' => '+ Search +',1099 'add_new' => 'Add New',1100 'tot_go_templ' => 'Total Game Object Templates',1101 'search_template' => 'Search Game Object Template',1102 'select' => 'Select',1103 'new_search' => 'New Search',1104 'tot_found' => 'Total Templates Found',1105 'add_new_go_templ' => 'Add New Game Object Template',1106 'edit_go_templ' => 'Edit Game Object Template',1107 'err_adding_new' => 'Error Adding New Game Object Template',1108 'err_no_fields_updated' => 'Error: No Fields Updated',1109 'search_go' => 'Search Game Objects',1110 'general' => 'General',1111 'sounds' => 'Additional Sounds',1112 'save_to_db' => 'Save to DB',1113 'save_to_script' => 'Save to Script',1114 'lookup_go' => 'Lookup GO',1115 'DOOR' => 'DOOR',1116 'BUTTON' => 'BUTTON',1117 'QUESTGIVER' => 'QUESTGIVER',1118 'CHEST' => 'CHEST',1119 'BINDER' => 'BINDER',1120 'GENERIC' => 'GENERIC',1121 'TRAP' => 'TRAP',1122 'CHAIR' => 'CHAIR',1123 'SPELL_FOCUS' => 'SPELL_FOCUS',1124 'TEXT' => 'TEXT',1125 'GOOBER' => 'GOOBER',1126 'TRANSPORT' => 'TRANSPORT',1127 'AREADAMAGE' => 'AREADAMAGE',1128 'CAMERA' => 'CAMERA',1129 'MAP_OBJECT' => 'MAP_OBJECT',1130 'MO_TRANSPORT' => 'MO_TRANSPORT',1131 'DUEL_FLAG' => 'DUEL_FLAG',1132 'FISHING_BOBBER' => 'FISHING_BOBBER',1133 'RITUAL' => 'RITUAL',1134 'MAILBOX' => 'MAILBOX',1135 'AUCTIONHOUSE' => 'AUCTIONHOUSE',1136 'GUARDPOST' => 'GUARDPOST',1137 'SPELLCASTER' => 'SPELLCASTER',1138 'MEETING_STONE' => 'MEETING_STONE',1139 'BG_Flag' => 'BG_Flag',1140 'FISHING_HOLE' => 'FISHING_HOLE',1141 'FLAGDROP' => 'FLAGDROP',1142 'CUSTOM_TELEPORTER' => 'CUSTOM_TELEPORTER',1143 'LOTTERY_KIOSK' => 'LOTTERY_KIOSK',1144 'CAPTURE_POINT' => 'CAPTURE_POINT',1145 'AURA_GENERATOR' => 'AURA_GENERATOR',1146 'DUNGEON_DIFFICULTY' => 'DUNGEON_DIFFICULTY',1147 'general' => 'General',1148 'name' => 'Name',1149 'name_desc' => 'Object\'s name.',1150 'entry' => 'Entry',1151 'entry_desc' => 'Unique GO identifier value',1152 'displayId' => 'Display Id',1153 'displayId_desc' => 'Graphic model\'s id sent to the client.',1154 'faction' => 'Faction',1155 'faction_desc' => 'Object\'s faction, if any.',1156 'flags' => 'Flags',1157 'flags_desc' => 'TODO:',1158 'type' => 'Type',1159 'type_desc' => 'Game Object\'s type',1160 'script_name' => 'ScriptName',1161 'ScriptName_desc' => 'Script\'s name GO uses.',1162 'size' => 'Size',1163 'size_desc' => 'Object\'s size must be set because graphic models can be resample.',1164 'sound' => 'Sound',1165 'sound_desc' => 'Data fields specific for different type field values. Each type has unique fields.<br />For more informaton visit https://svn.mangosproject.org/trac/MaNGOS/wiki/Database/gameobject_template',1166 'tmpl_not_found' => 'Template not Found',1167 'del_go' => 'Delete GO',1168 'del_spawns' => 'Delete Spawns',1169 'loot' => 'Loot',1170 'quests' => 'Quests',1171 'loot_tmpl_id' => 'Loot Template',1172 'drop_chance' => 'Drop Chance',1173 'quest_drop_chance' => 'Quest Drop Chance',1174 'quest_freeforall' => 'Quest Free for All',1175 'add_items_to_templ' => 'Add Items to Template',1176 'loot_item_id' => 'Loot template ID',1177 'loot_item_id_desc' => 'ID of the item you wish to be added.',1178 'loot_drop_chance' => 'Drop Chance',1179 'loot_drop_chance_desc' => 'Item Drop chance',1180 'loot_quest_drop_chance' => 'Quest Drop Chance',1181 'loot_quest_drop_chance_desc' => 'Quest Drop chance',1182 'min_count' => 'Min. Count',1183 'min_count_desc' => 'Minimum number of stack size on drop.',1184 'max_count' => 'Max. Count',1185 'max_count_desc' => 'Maximum number of stack size on drop.',1186 'quest_loot' => 'Quest Loot Flag',1187 'quest_loot_desc' => 'Quest Free for all loot flag.',1188 'check_to_delete' => '* Check checkbox next to item to remove from template.',1189 'add_starts_quests' => 'Add Quest starts by this GO',1190 'quest_id' => 'Quest ID',1191 'quest_id_desc' => 'ID of the quest.',1192 'start_quests' => 'Start Quests',1193 'ends_quests' => 'Ends Quests',1194 'add_ends_quests' => 'Add Quest ends by this GO',1195 'go_swapned' => 'This Game Object spawned total of',1196 'times' => 'times',1197 'go_template' => 'Game Object Template',1198 'all_related_data' => 'Along with all related data.'1199 1106 ); 1200 1107 … … 1471 1378 'req_level_desc' => 'Character level required to learn this spell.', 1472 1379 'check_to_delete' => '* Check checkbox next to item to remove from template.', 1473 'search_results' => 'Search Results' 1380 'search_results' => 'Search Results', 1381 'RacialLeader' => 'Racial Leader', 1382 'RacialLeader_desc' => 'Set to 1 if the creature is Racial Leader' 1474 1383 ); 1475 1384 … … 1596 1505 'total_auctions' => 'Total Auctions', 1597 1506 'search_results' => 'Search Results', 1598 'auction_over' => 'Auction Over' 1507 'auction_over' => 'Auction Over', 1508 'all' => 'All', 1509 'item_id' => 'Item Id', 1510 'item_name' => 'Item Name', 1511 'seller_name' => 'Seller Name', 1512 'buyer_name' => 'Buyer Name', 1513 'tot_found' => 'Total Items Found' 1599 1514 ); 1600 1515 -
minimanager/lang/ptBR.php
r5 r19 28 28 'none' => 'nada', 29 29 'delete' => 'Del.', 30 'delete_short' => 'Del.', 30 31 'edit' => 'Edit', 31 32 'yes' => 'SIM', … … 257 258 'no_act_quests' => 'No active Quests Found.', //TODO: Translate 258 259 'quest_id' => 'ID', //TODO: Translate 260 'quest_level' => 'lvl', 259 261 'quest_title' => 'Quest Title', //TODO: Translate 260 262 'professions' => 'Professions', //TODO 261 263 'skills' => 'Skills', //TODO 264 'skill_id' => 'ID', //TODO 265 'skill_name' => 'Skill Name', //TODO 266 'skill_value' => 'Value', //TODO 267 // --- $skill_rank_array --- 268 'apprentice' => 'Apprentice', //TODO: Translate 269 'journeyman' => 'Journeyman', //TODO: Translate 270 'expert' => 'Expert', //TODO: Translate 271 'artisan' => 'artisan', //TODO: Translate 272 'master' => 'Master', //TODO: Translate 273 'inherent' => 'Inherent', //TODO: Translate 274 'wise' => 'Wise', //TODO: Translate 262 275 // ---- edit_char.php ---- 263 276 'update' => 'Update Char Informacao', … … 594 607 $lang_mail = array( 595 608 // ----- MAIL.PHP ----- 596 'mail_options_type' => 'Opcao de email / Tipo', 609 'mail_type' => 'Mail Type', 610 'mail_options' => 'Mail Options', 597 611 'email' => 'Email', 598 612 'ingame_mail' => 'InGame Mail', … … 632 646 $lang_run_patch = array( 633 647 // -----RUN_PATCH.PHP ----- 634 'err_in_line' => ' MySQL syntax error na query numero ',648 'err_in_line' => 'SQL syntax error na query numero ', 635 649 'run_sql_file_only' => 'Voce so pode rodar .sql ou .qbquery arquivos.', 636 650 'file_not_found' => 'Arquivo nao encontrado!!!!', … … 1367 1381 'req_level_desc' => 'Character level required to learn this spell.', 1368 1382 'check_to_delete' => '* Check checkbox next to item to remove from template.', 1369 'search_results' => 'Search Results' 1383 'search_results' => 'Search Results', 1384 'RacialLeader' => 'Racial Leader', 1385 'RacialLeader_desc' => 'Set to 1 if the creature is Racial Leader' 1370 1386 ); 1371 1387 … … 1492 1508 'total_auctions' => 'Total Auctions', 1493 1509 'search_results' => 'Search Results', 1494 'auction_over' => 'Auction Over' 1510 'auction_over' => 'Auction Over', 1511 'all' => 'All', 1512 'item_id' => 'Item Id', 1513 'item_name' => 'Item Name', 1514 'seller_name' => 'Seller Name', 1515 'buyer_name' => 'Buyer Name', 1516 'tot_found' => 'Total Items Found' 1495 1517 ); 1496 1518 -
minimanager/lang/ruRU.php
r5 r19 2 2 /* 3 3 * Project Name: Russian Translate for MiniManager for Mangos Server 4 * Date: 11.07.2007 version 0.0.8e4 * Date: 30.07.2007 version 0.0.8h 5 5 * Author: Den Wailhorn 6 6 * Copyright: Catarina WoW Server … … 28 28 'none' => 'íåò', 29 29 'delete' => 'Óäàëèòü', 30 'delete_short' => 'Del.', 30 31 'edit' => 'Ïðàâèòü', 31 32 'yes' => 'ÄÀ!', … … 79 80 'acc_type' => 'Òèï àêêàóíòà', 80 81 'acc_type_desc' => 'Òèï èñïîëüçóåìîãî êëèåíòà', 81 'classic' => ' World of Warcraft',82 'expansion' => ' WoW - The Burning Crusade',82 'classic' => 'Ìèð Âîåííîãî Ðåìåñëà', 83 'expansion' => 'Ïûëàþùèé Êðåñòîâûé Ïîõîä', 83 84 'recover_acc_password' => 'Âîññòàíîâèòü ïàðîëü àêêàóíòà', 84 85 'user_pass_rec_desc' => 'Ââåäèòå èìÿ ïîä êîòîðûì âû çàðåãèñòðèðîâàíû', … … 257 258 'no_act_quests' => 'Íåò àêòèâíûõ êâåñòîâ', 258 259 'quest_id' => 'ID', 260 'quest_level' => 'lvl', 259 261 'quest_title' => 'Íàçâàíèå êâåñòà', 260 262 'professions' => 'Ïðîôåññèè', 261 263 'skills' => 'Íàâûêè', 264 'skill_id' => 'ID', //TODO 265 'skill_name' => 'Skill Name', //TODO 266 'skill_value' => 'Value', //TODO 267 // --- $skill_rank_array --- 268 'apprentice' => 'Apprentice', //TODO: Translate 269 'journeyman' => 'Journeyman', //TODO: Translate 270 'expert' => 'Expert', //TODO: Translate 271 'artisan' => 'artisan', //TODO: Translate 272 'master' => 'Master', //TODO: Translate 273 'inherent' => 'Inherent', //TODO: Translate 274 'wise' => 'Wise', //TODO: Translate 262 275 // ---- edit_char.php ---- 263 276 'update' => 'Îáíîâèòü äàííûå ïåðñà', … … 274 287 'to_char_view' => 'Âåðíóòüñÿ ê ïðîñìîòðó ïåðñà', 275 288 'inv_bank' => 'Ñíàðÿãà è âåùè â áàíêå', 276 'location' => ' Location', //TODO277 'move_to' => ' Teleport to (.tele location name)', //TODO278 'no_tp_location' => ' No teleport location found using provided name.' //TODO289 'location' => 'Ëîêàöèÿ', 290 'move_to' => 'Òåëåïîðò â (.tele íàçâàíèå ëîêàöèè)', 291 'no_tp_location' => 'Íå íàéäåíî ëîêàöèé òåëåïîðòà â äàííîå ìåñòî' 279 292 ); 280 293 … … 331 344 'thrown' => 'Ìåòàòåëüíîå', 332 345 'consumable' => 'Ñîçäàííîå', 333 'arrows' => ' Ïðîáèâíîå- Ñòðåëû',334 'bullets' => ' Ïðîáèâíîå- Ïóëè',335 'projectile' => ' Ïðîáèâíîå',346 'arrows' => 'Ñíàðÿäû - Ñòðåëû', 347 'bullets' => 'Ñíàðÿäû - Ïóëè', 348 'projectile' => 'Ñíàðÿäû', 336 349 'trade_goods' => 'Òîâàð', 337 350 'parts' => '×àñòè', … … 491 504 'tot_found' => 'Âñåãî íàéäåíî', 492 505 'char_ids' => 'Ïåðñîíàæè id', 493 'no_chars_del' => 'Íèêòî íå óäàëåí!< /br>Íåò ðàçðåøåíèÿ?',506 'no_chars_del' => 'Íèêòî íå óäàëåí!<br>Íåò ðàçðåøåíèÿ?', 494 507 'total' => 'Âñåãî', 495 508 'chars_deleted' => 'Ïåðñîíàæè óäàëåíû!', … … 592 605 $lang_mail = array( 593 606 // ----- MAIL.PHP ----- 594 'mail_options_type' => ' - | - Íàñòðîéêè ïî÷òû - | - ', 607 'mail_type' => 'Mail Type', 608 'mail_options' => 'Mail Options', 595 609 'email' => 'Ïî÷òà', 596 610 'ingame_mail' => 'Ïî÷òà â èãðå', … … 829 843 'chars_by_level' => 'Ïåðñîíàæè ïî óðîâíþ', 830 844 'reset' => 'Ñáðîñèòü ôèëüòðû', 831 'avg_uptime' => ' Average Server Uptime', //TODO832 'max_uptime' => ' Maximum Server Uptime',833 'uptime_prec' => ' Uptime percentage since first run'845 'avg_uptime' => 'Ñåðâåð â ñðåäíåì äîñòóïåí', 846 'max_uptime' => 'Ìàêñèìóì ñåðâåð äîñòóïåí', 847 'uptime_prec' => ' ñ ïåðâîãî çàïóñêà ñåðâåð äîñòóïåí' 834 848 ); 835 849 … … 878 892 $lang_item_edit = array( 879 893 // ----- ITEM.PHP ----- 880 'search_item' => ' Search for Item(s)',894 'search_item' => 'Ïîèñê âåùåé', 881 895 'model_id' => 'Íîìåð ìîäåëè', 882 896 'all' => 'Âñå', … … 897 911 'del_item' => 'Óäàëèòü', 898 912 'general_tab' => 'Îáùèå', 899 'additional_tab' => ' Extra',913 'additional_tab' => 'Äîïîëíèòåëüíî', 900 914 'stats_tab' => 'Ñòàòèñòèêà', 901 915 'damage_tab' => 'Óùåðá', 902 916 'spell_tab' => 'Ìàãèÿ', 903 'req_tab' => ' Req.',917 'req_tab' => 'Òðåáîâàíèÿ', 904 918 'general' => 'Îáùèå', 905 919 'entry' => 'Çàïèñü', … … 1019 1033 'spell_id' => 'Ìàãèÿ', 1020 1034 'spell_id_desc' => 'Íîìåð çàêëèíàíèÿ ïî Spell.dbc', 1021 'spell_trigger' => 'Òðèããåð ñïåëà',1035 'spell_trigger' => 'Òðèããåð çàêëà', 1022 1036 'spell_trigger_desc' => 'Äåéñòâèå ïî êîòîðîìó çàêëèíàíèå ñðàáàòûâàåò', 1023 'spell_charges' => 'Çàðÿäû ñïåëà',1037 'spell_charges' => 'Çàðÿäû çàêëà', 1024 1038 'spell_charges_desc' => 'Ñêîëüêî çàðÿäîâ ó çàêëèíàíèÿ. 0: áåñêîíå÷íî, -X: item is expendable, +X: item is kept when all charges are spent).', 1025 'spell_cooldown' => 'Ïåðåçàðÿäêà ñïåëà',1026 'spell_cooldown_desc' => 'Ïåðåçàðÿäêà ñïåëà â ìñ',1027 'spell_category' => 'Êàòåãîðèÿ ñïåëà',1028 'spell_category_desc' => 'Êàòåãîðèÿ ñïåëà',1039 'spell_cooldown' => 'Ïåðåçàðÿäêà çàêëà', 1040 'spell_cooldown_desc' => 'Ïåðåçàðÿäêà çàêëà â ìñ', 1041 'spell_category' => 'Êàòåãîðèÿ çàêëà', 1042 'spell_category_desc' => 'Êàòåãîðèÿ çàêëà', 1029 1043 'spell_category_cooldown' => 'Ïåðåçàðÿäêà êàòåãîðèè', 1030 'spell_category_cooldown_desc' => 'Îáùàÿ ïåðåçàðÿäêà ïî âñåé êàòåãîðèè ñïåëîâ',1044 'spell_category_cooldown_desc' => 'Îáùàÿ ïåðåçàðÿäêà ïî âñåé êàòåãîðèè çàêëîâ', 1031 1045 'allow_class' => 'Äîñòóïíî êëàññàì', 1032 1046 'allow_class_desc' => 'Êàêèå êëàññû ìîãóò èñïîëüçîâàòü ýòó âåùü', … … 1037 1051 'req_skill_rank' => 'Ðàíã íàâûêà', 1038 1052 'req_skill_rank_desc' => 'Ìèíèìàëüíûé ðàíã íåîáõîäèìûé äëÿ èñïîëüçîâàíèÿ âåùè', 1039 'req_spell' => 'Íåîáõîäèìûé ñïåë',1040 'req_spell_desc' => 'Ïåðñ äîëæåí çíàòü äàííûé ñïåë ÷òîáû èñïîëüçîâàòü âåùü',1053 'req_spell' => 'Íåîáõîäèìûé çàêë', 1054 'req_spell_desc' => 'Ïåðñ äîëæåí çíàòü äàííûé çàêë ÷òîáû èñïîëüçîâàòü âåùü', 1041 1055 'req_honor_rank' => 'Íåîáõîäèìûé ðàíã', 1042 1056 'req_honor_rank_desc' => 'Ðàíã ÏâÏ Õîíîðà íåîáõîäèìûé äëÿ èñïîëüçîâàíèÿ âåùè', … … 1105 1119 'quest_drop_chance' => 'Øàíñ äðîïà â êâåñòå', 1106 1120 'quest_freeforall' => ' êâåñòå - äëÿ âñåõ', 1107 'armor_dmg_mod' => 'Armor Damage Modifier', 1108 'armor_dmg_mod_desc' => 'TODO:' 1121 'armor_dmg_mod' => 'Ìîäèôèêàòîð óùåðáà äîñïåõà', 1122 'armor_dmg_mod_desc' => 'TODO:', 1123 'RacialLeader' => 'Racial Leader', //TODO 1124 'RacialLeader_desc' => 'Set to 1 if the creature is Racial Leader' 1109 1125 ); 1110 1126 … … 1113 1129 'unknown' => 'Íåèçâåñòíî', 1114 1130 'custom_search' => 'Ñâîé ôèëüòð', 1115 'search' => ' + Ïîèñê +',1131 'search' => '- Ïîèñê -', 1116 1132 'add_new' => 'Ñîçäàòü', 1117 1133 'tot_go_templ' => 'Âñåãî øàáëîíîâ', … … 1129 1145 'save_to_db' => 'Ñîõðàíèòü â áàçó', 1130 1146 'save_to_script' => 'Ñîõðàíèòü ñêðèïò', 1131 'lookup_go' => 'Ïîèñê GO',1147 'lookup_go' => 'Ïîèñê Îáúåêòà', 1132 1148 'DOOR' => 'DOOR', 1133 1149 'BUTTON' => 'BUTTON', … … 1180 1196 'size_desc' => 'Ìàñøòàá ìîäåëè ãåéì-îáúåêòà', 1181 1197 'sound' => 'Äåéñòâèå', 1182 'sound_desc' => 'Ïîëå äàííûõ, óíèêàëüíîå äëÿ ðàçíîãî òèïà çíà÷åíèé.<br /> https://svn.mangosproject.org/trac/MaNGOS/wiki/Database/gameobject_template - äîïîëíèòåëüíàÿ èíôîðìàöèÿ',1198 'sound_desc' => 'Ïîëå äàííûõ, óíèêàëüíîå äëÿ ðàçíîãî òèïà çíà÷åíèé.<br /><a href=\"https://svn.mangosproject.org/trac/MaNGOS/wiki/Database/gameobject_template/\" target=\"_new\"> - äîïîëíèòåëüíàÿ èíôîðìàöèÿ</a>', 1183 1199 'tmpl_not_found' => 'Øàáëîí íå íàéäåí', 1184 1200 'del_go' => 'Óäàëåíèå', … … 1218 1234 $lang_creature = array( 1219 1235 // ----- CREATURE.PHP ----- 1220 'none' => ' None',1221 'custom' => ' Custom',1222 'gossip' => ' Gossip',1223 'quest_giver' => ' Quest Giver',1224 'vendor' => ' Vendor',1225 'taxi' => ' Taxi',1226 'trainer' => ' Trainer',1227 'spirit_healer' => ' Spirit Healer',1228 'guard' => ' Guard',1229 'inn_keeper' => ' Inn Keeper',1230 'banker' => ' Banker',1231 'retitioner' => ' Retitioner',1232 'tabard_vendor' => ' Tabard Vendor',1233 'battlemaster' => ' Battlemaster',1234 'auctioneer' => ' Auctioneer',1235 'stable_master' => ' Stable Master',1236 'armorer' => ' Armorer',1237 'normal' => ' Normal',1238 'elite' => ' Elite',1239 'rare_elite' => ' Rare Elite',1240 'world_boss' => ' World Boss',1241 'rare' => ' Rare',1236 'none' => 'Íåò', 1237 'custom' => 'Ðàçíîå', 1238 'gossip' => 'Îòâå÷àåò', 1239 'quest_giver' => 'Êâåñòåð', 1240 'vendor' => 'Ïðîäàâåö', 1241 'taxi' => 'Òàêñè', 1242 'trainer' => 'Òðåíåð', 1243 'spirit_healer' => 'Äóõ-îæèâëÿòåëü', 1244 'guard' => 'Ñòðàæà', 1245 'inn_keeper' => 'Òðàêòèðùèê', 1246 'banker' => 'Áàíêèð', 1247 'retitioner' => 'Ãèëüäååö', 1248 'tabard_vendor' => 'Ïðîäàâåö íàêèäîê', 1249 'battlemaster' => 'Îðóæåéíûé ìàñòåð', 1250 'auctioneer' => 'Àóêöèîíåð', 1251 'stable_master' => 'Êîíþøèé', 1252 'armorer' => 'Áðîííèê', 1253 'normal' => 'Îáû÷íûé', 1254 'elite' => 'Ýëèòà', 1255 'rare_elite' => 'Ðåäêàÿ ýëèòà', 1256 'world_boss' => 'Ìèðîâîé âðàã', 1257 'rare' => 'Ðåäêî', 1242 1258 'search_template' => 'Ïîèñê øàáëîíà ìîíñòðà', 1243 1259 'select' => 'Âûáðàòü', 1244 'other' => ' Other',1245 'beast' => ' Beast',1246 'dragonkin' => ' Dragonkin',1247 'demon' => ' Demon',1248 'elemental' => ' Elemental',1249 'giant' => ' Giant',1250 'undead' => ' Undead',1251 'humanoid' => ' Humanoid',1252 'critter' => ' Critter',1253 'mechanical' => ' Mechanical',1254 'not_specified' => ' Not Specified',1255 'class' => ' Class',1256 'mounts' => ' Mounts',1257 'trade_skill' => ' Trade Skill',1258 'pets' => ' Pets',1259 'wolf' => ' Wolf',1260 'cat' => ' Cat',1261 'spider' => ' Spider',1262 'bear' => ' Bear',1263 'boar' => ' Boar',1264 'crocolisk' => ' Crocolisk',1265 'carrion_bird' => ' Carrion Bird',1266 'crab' => ' Crab',1267 'gorilla' => ' Gorilla',1268 'raptor' => ' Raptor',1260 'other' => 'Äðóãîå', 1261 'beast' => 'Çâåðü', 1262 'dragonkin' => 'Äðàêîí', 1263 'demon' => 'Äåìîí', 1264 'elemental' => 'Ýëåìåíòàëü', 1265 'giant' => 'Ãèãàíò', 1266 'undead' => 'Íåæèòü', 1267 'humanoid' => 'Ãóìàíîèä', 1268 'critter' => 'Òâàðü', 1269 'mechanical' => 'Ìåõàíè÷åñêèé', 1270 'not_specified' => 'Íå óêàçàíî', 1271 'class' => 'Êëàññ', 1272 'mounts' => 'Âåðõîâîé', 1273 'trade_skill' => 'Òîðãîâûé íàâûê', 1274 'pets' => 'Ïðèðó÷åííûé', 1275 'wolf' => 'Âîëê', 1276 'cat' => 'Êîøêà', 1277 'spider' => 'Ïàóê', 1278 'bear' => 'Ìåäâåäü', 1279 'boar' => 'Êàáàí', 1280 'crocolisk' => 'Êðîêîäèë', 1281 'carrion_bird' => 'Îòâðàòèòåëüíàÿ ïòèöà', 1282 'crab' => 'Êðàá', 1283 'gorilla' => 'Ãîðèëëà', 1284 'raptor' => 'ßùåð', 1269 1285 'tallstrider' => 'Tallstrider', 1270 1286 'felhunter' => 'Felhunter', 1271 1287 'voidwalker' => 'Voidwalker', 1272 'succubus' => ' Succubus',1273 'doomguard' => ' Doomguard',1274 'scorpid' => ' Scorpid',1275 'turtle' => ' Turtle',1276 'scorpid' => ' Scorpid',1277 'imp' => ' Imp',1278 'bat' => ' Bat',1279 'hyena' => ' Hyena',1280 'owl' => ' Owl',1281 'wind_serpent' => ' Wind Serpent',1288 'succubus' => 'Ñóêêóá', 1289 'doomguard' => 'Ñóäüáîñòðàæ', 1290 'scorpid' => 'Ñêîðïèîí', 1291 'turtle' => '×åðåïàõà', 1292 'scorpid' => 'Ñêîðïèîí', 1293 'imp' => 'Èìï', 1294 'bat' => 'Ëåòó÷èé ìûøü', 1295 'hyena' => 'Ãèåíà', 1296 'owl' => 'Ñîâà', 1297 'wind_serpent' => 'Âåòðîçìåé', 1282 1298 'search' => 'Ïîèñê', 1283 1299 'new_search' => 'Íîâûé ïîèñê', … … 1322 1338 'type_desc' => 'Òèï òâàðè', 1323 1339 'npc_flag' => 'Ôëàã NPC', 1324 'npc_flag_desc' => ' This is way to cliet know how info you see if you clic(RMB) on NPC if is vendor if is auction in fact is menu how you see. Is what type of NPC it is.',1340 'npc_flag_desc' => 'Ïåðåäàåò èíôîðìàöèþ êëèåíòó, ÷òî ýòîò NPC äîëæåí äåëàòü ïî êëèêó íà íåãî - íàïðèìåð òîðãîâåö èëè àóêöèîíåð', 1325 1341 'trainer_type' => 'Òèï òðåíåðà', 1326 'trainer_type_desc' => ' If NPC flag is set to Trainer this flag will specify its type.',1342 'trainer_type_desc' => 'Åñëè ôëàã NPC ñòîèò êàê -Òðåíåð-, òî íàäî óêàçàòü òèï òðåíåðà', 1327 1343 'loot' => 'Ëóò', 1328 1344 'loot_id' => 'Ëóò òâàðè', … … 1365 1381 'bounding_radius_desc' => 'Ðàäèóñ â êîòîðîì ìîíñòð àòàêóåò', 1366 1382 'spells' => 'Ìàãèÿ', 1367 'spell' => ' Ñïåë',1368 'spell_desc' => ' Ñïåëû òâàðè',1383 'spell' => 'çàêë', 1384 'spell_desc' => 'çàêëû òâàðè', 1369 1385 'resistances' => 'Çàùèòà îò ìàãèè', 1370 1386 'resis_holy' => 'Ñâÿòîé', 1371 'resis_holy_desc' => ' Holy Resitance.',1387 'resis_holy_desc' => 'Çàùèòà îò ìàãèè ñâÿòîñòè', 1372 1388 'resis_fire' => 'Îãíåííîé', 1373 'resis_fire_desc' => ' Fire Resitance.',1389 'resis_fire_desc' => 'Çàùèòà îò ìàãèè îãíÿ', 1374 1390 'resis_nature' => 'Ïðèðîäíîé', 1375 'resis_nature_desc' => ' Nature Resitance.',1391 'resis_nature_desc' => 'Çàùèòà îò ìàãèè ïðèðîäû', 1376 1392 'resis_frost' => 'Ëåäÿíîé', 1377 'resis_frost_desc' => ' Frost Resitance.',1393 'resis_frost_desc' => 'Çàùèòà îò ìàãèè ìîðîçà', 1378 1394 'resis_shadow' => 'Òåíåâîé', 1379 'resis_shadow_desc' => ' Shadow Resitance.',1395 'resis_shadow_desc' => 'Çàùèòà îò ìàãèè òåíåé', 1380 1396 'resis_arcane' => 'Àðêàííîé', 1381 'resis_arcane_desc' => ' Arcane Resitance.',1397 'resis_arcane_desc' => 'Çàùèòà îò àðêàííîé ìàãèè', 1382 1398 'models' => 'Ìîäåëè', 1383 1399 'modelid_male' => 'Ìóæñêàÿ', 1384 'modelid_male_desc' => ' Graphical model that client must apply on this male creature.',1400 'modelid_male_desc' => 'Ãðàôè÷åñêàÿ ìóæñêàÿ ìîäåëü èç êëèåíòà', 1385 1401 'modelid_female' => 'Æåíñêàÿ', 1386 'modelid_female_desc' => ' Graphical model that client must apply on this Female creature.',1402 'modelid_female_desc' => 'Ãðàôè÷åñêàÿ æåíñêàÿ ìîäåëü èç êëèåíòà', 1387 1403 'equip_slot' => 'Ñëîòû ñíàðÿãè', 1388 1404 'equip_slot_desc' => 'TODO:', 1389 1405 'equip_model' => 'Ìîäåëè ñíàðÿãè', 1390 'equip_model_desc' => ' Equipement\'s model of the first item weared by the creature.',1406 'equip_model_desc' => 'Ìîäåëü âåùè, íàäåòîé íà òâàðü', 1391 1407 'equip_info' => 'Èíôîðìàöèÿ ñíàðÿãè', 1392 1408 'equip_info_desc' => 'TODO:', 1393 1409 'scripts' => 'Ñêðèïòû', 1394 1410 'ai_name' => 'AIName', 1395 'ai_name_desc' => ' Name of the AI function creature uses.',1411 'ai_name_desc' => 'Èìÿ èñïîëüçóåìîé òâàðüþ AI ôóíêöèè', 1396 1412 'movement_type' => 'Òèï äâèæåíèÿ', 1397 1413 'movement_type_desc' => 'TODO.', … … 1400 1416 'race' => 'Ðàñà', 1401 1417 'race_desc' => 'Creature\'s race, like character.race field. Used for check in case npcflag include trainer flag (16) and trainer_type == TRAINER_TYPE_MOUNTS.', 1402 'trainer_spell' => 'Òðåíåð ñïåë',1418 'trainer_spell' => 'Òðåíåð çàêë', 1403 1419 'trainer_spell_desc' => 'Spell ID. Used for check in case npcflag include trainer flag (16) and trainer_type == TRAINER_TYPE_TRADESKILLS. Player must known trainer_spell to start training.', 1404 1420 'inhabit_type' => 'Òèï äâèæåíèÿ', … … 1434 1450 'count' => 'Êîë-âî', 1435 1451 'trains' => 'Òðåíèðóåò', 1436 'spell_id' => ' Ñïåë ID',1452 'spell_id' => 'çàêë ID', 1437 1453 'cost' => 'Öåíà', 1438 1454 'req_skill' => 'Òðåáóåò íàâûê', … … 1447 1463 'search_creatures' => 'Ïîèñê òâàðåé', 1448 1464 'custom_search' => 'Ñâîé ôèëüòð', 1449 'pickpocketloot_tmpl_id' => ' Pickpocket Loot TemplateID',1450 'skinning_loot_tmpl_id' => ' Skinning Loot TemplateID',1451 'add_items_to_templ' => ' Add Item to Template',1452 'loot_item_id' => 'I tem ID',1453 'loot_item_id_desc' => 'ID of the item you wish to be added.',1465 'pickpocketloot_tmpl_id' => 'Âîðîâñòâî øàáëîí ID', 1466 'skinning_loot_tmpl_id' => 'Ñêîðíÿê øàáëîí ID', 1467 'add_items_to_templ' => 'Äîáàâèòü âåùü â øàáëîí', 1468 'loot_item_id' => 'ID âåùè', 1469 'loot_item_id_desc' => 'ID âåùè, êîòîðóþ äîáàâëÿòü', 1454 1470 'loot_drop_chance' => 'Øàíñ äðîïà', 1455 1471 'loot_drop_chance_desc' => 'Øàíñ äðîïà', 1456 1472 'loot_quest_drop_chance' => 'Øàíñ äðîïà â êâåñòå', 1457 1473 'loot_quest_drop_chance_desc' => 'Øàíñ äðîïà â êâåñòå', 1458 'min_count' => ' Min. Count',1459 'min_count_desc' => ' Minimum number of stack size on drop.',1460 'max_count' => 'Ma x. Count',1461 'max_count_desc' => ' Maximum number of stack size on drop.',1474 'min_count' => 'Ìèíèìóì', 1475 'min_count_desc' => 'Ìèíèìàëüíîå êîëè÷åñòâî âûïàäàåò', 1476 'max_count' => 'Maêñèìóì', 1477 'max_count_desc' => 'Ìàêñèìàëüíîå êîëè÷åñòâî âûïàäàåò', 1462 1478 'quest_loot' => 'Ôëàã êâåñòîâîãî ëóòà', 1463 'quest_loot_desc' => ' Quest Free for all loot flag.',1464 'add_item_to_loot' => ' Add item to Loot Template',1479 'quest_loot_desc' => 'Êâåñòîâûé ôëàã -Ñâîáîäíî äëÿ âñåõ-', 1480 'add_item_to_loot' => 'Äîáàâèòü âåùü â øàáëîí ëóòà', 1465 1481 'drop_chance' => 'Øàíñ äðîïà', 1466 1482 'quest_freeforall' => ' êâåñòå - äëÿ âñåõ', 1467 'add_ends_quests' => ' Add Quest ends by thisNPC',1468 'add_starts_quests' => ' Add Quest starts by thisNPC',1469 'quest_id' => ' QuestID',1470 'quest_id_desc' => 'ID of the quest.',1471 'add_items_to_vendor' => ' Add item to Vendor',1472 'vendor_item_id' => 'I tem Id',1473 'vendor_item_id_desc' => ' Id of item you wish to add.',1474 'vendor_max_count' => ' Max. Count',1475 'vendor_max_count_desc' => ' Maximim number of items can be soled.',1476 'vendor_incrtime' => ' Increase Time',1477 'vendor_incrtime_desc' => ' Time before this item can be soled again.',1478 'train_spell_id' => ' Spell Id',1479 'train_spell_id_desc' => 'I d of the spell you like this trainer to train.',1480 'add_spell_to_trainer' => ' Add Spell to Trainer',1481 'train_cost' => ' Cost',1482 'train_cost_desc' => ' Cost in cooper of this skill.',1483 'req_skill' => ' Req. Skill',1484 'req_skill_desc' => ' Skill id required to learn this spell.',1485 'req_skill_value' => ' Req. Skill Value',1486 'req_skill_value_desc' => ' Skill level required to learn this spell.',1487 'req_level' => ' Req. Level',1488 'req_level_desc' => ' Character level required to learn this spell.',1483 'add_ends_quests' => 'Äîáàâèòü îêîí÷àíèå êâåñòà ýòîìó NPC', 1484 'add_starts_quests' => 'Äîáàâèòü íà÷àëî êâåñòà ýòîìó NPC', 1485 'quest_id' => 'Êâåñò ID', 1486 'quest_id_desc' => 'ID êâåñòà', 1487 'add_items_to_vendor' => 'Äîáàâèòü âåùü ïðîäàâöó', 1488 'vendor_item_id' => 'ID âåùè', 1489 'vendor_item_id_desc' => 'Íîìåð âåùè, êîòîðóþ äîáàâëÿòü', 1490 'vendor_max_count' => 'Ìàêñèìóì', 1491 'vendor_max_count_desc' => 'Ìàêñèìóì âåùåé ìîæíî ïðîäàòü', 1492 'vendor_incrtime' => 'Óâåëè÷èòü âðåìÿ', 1493 'vendor_incrtime_desc' => 'Âðåìÿ ÷åðåç êîòîðîå âåùü ñíîâà ïîÿâèòñÿ â ïðîäàæå', 1494 'train_spell_id' => 'ID çàêëèíàíèÿ', 1495 'train_spell_id_desc' => 'ID çàêëèíàíèÿ, êîòîðîìó áóäóò ó÷èòü', 1496 'add_spell_to_trainer' => 'Äîáàâèòü òðåíåðó', 1497 'train_cost' => 'Öåíà', 1498 'train_cost_desc' => 'Öåíà â ìåäíûõ íà ýòó ñïîñîáíîñòü', 1499 'req_skill' => 'Òðåáóåò ñêèë', 1500 'req_skill_desc' => 'ID ñêèëà, êîòîðûé íåîáõîäèì äëÿ ïîêóïêè', 1501 'req_skill_value' => 'Çíà÷åíèå', 1502 'req_skill_value_desc' => 'Óðîâåíü ñêèëà, êîòîðûé òðåáóåòñÿ', 1503 'req_level' => 'Óðîâåíü', 1504 'req_level_desc' => 'Ìèíèìàëüíûé óðîâåíü äëÿ îáó÷åíèÿ', 1489 1505 'check_to_delete' => '* Ïîñòàâèòü ãàëêó ðÿäîì ñ âåùüþ äëÿ óäàëåíèÿ åå ñ ìîíñòðà' 1490 1506 ); … … 1493 1509 // ----- ID_TAB.PHP ----- 1494 1510 //---maps--- 1495 'azeroths' => ' Azeroths',1496 'kalimdor' => ' Kalimdor',1497 'test_zone' => ' Test Zone',1498 'kalidar' => ' Kalidar',1499 'alterac_valley' => ' Alterac Valley',1500 'shadowfang_keep_instance' => ' Shadowfang Keep',1501 'the_stockade_instance' => ' The Stockade',1502 'stormwind_prison' => ' Stormwind Prison',1503 'deadmines_instance' => ' Deadmines',1504 'plains_of_snow' => ' Plains of Snow',1505 'wailing_caverns_instance' => ' Wailing Caverns',1506 'monastery_interior' => ' Monastery Interior',1507 'razorfen_kraul_instance' => ' Razorfen Kraul',1508 'blackfathom_deeps_instance' => ' Blackfathom Deeps',1509 'uldaman_instance' => ' Uldaman',1510 'gnomeregan_instance' => ' Gnomeregan',1511 'sunken_temple_instance' => ' Sunken Temple',1512 'razorfen_downs_instance' => ' Razorfen Downs',1513 'outland' => ' Outland',1514 'emerald_forest' => ' Emerald Forest',1515 'scarlet_monastery_instance' => ' Scarlet Monastery',1516 'zul_farrak_instance' => ' Zul\'Farrak',1517 'blackrock_spire_instance' => ' Blackrock Spire',1518 'blackrock_depths_instance' => ' Blackrock Depths',1519 'onyxia_s_lair_instance' => ' Onyxia\'s Lair',1520 'caverns_of_time' => ' Caverns of Time',1521 'scholomance_instance' => ' Scholomance',1522 'zul_gurub_instance' => ' Zul\'Gurub',1523 'stratholme_instance' => ' Stratholme',1524 'maraudon_instance' => ' Maraudon',1525 'deeprun_tram' => ' Deeprun Tram',1526 'ragefire_chasm_instance' => ' Ragefire Chasm',1527 'the_molten_core_instance' => ' The Molten Core',1528 'dire_maul_instance' => ' Dire Maul',1529 'alliance_pvp_barracks' => ' Alliance PVP Barracks',1530 'horde_pvp_barracks' => ' Horde PVP Barracks',1531 'development_land' => ' Developpement Land',1532 'blackwing_lair_instance' => ' Blackwing Lair',1533 'warsong_gulch' => ' Warsong Gulch',1534 'ruins_of_ahn_qiraj_instance' => ' Ruins of Ahn\'Qiraj',1535 'arathi_basin' => ' Arathi Basin',1536 'temple_of_ahn_qiraj_instance' => ' Temple of Ahn\'Qiraj',1537 'naxxramas_instance' => ' Naxxramas',1511 'azeroths' => 'Àçåðîò', 1512 'kalimdor' => 'Êàëèìäîð', 1513 'test_zone' => 'òåñòîâàÿ çîíà', 1514 'kalidar' => 'Êàëèäàð', 1515 'alterac_valley' => 'äîëèíà Àëüòåðàê', 1516 'shadowfang_keep_instance' => 'çàìîê Òåíåêëûê', 1517 'the_stockade_instance' => '×àñòîêîë', 1518 'stormwind_prison' => 'Òþðüìà Øòîðìîâåòðà', 1519 'deadmines_instance' => 'Ñìåðòîøàõòû', 1520 'plains_of_snow' => 'Ðàâíèíû Ñíåãà', 1521 'wailing_caverns_instance' => 'Ñòåíàþùèå Ïåùåðû', 1522 'monastery_interior' => 'Ìîíàñòûðñêèå Ïàëàòû', 1523 'razorfen_kraul_instance' => 'Ðàçîðôåí Êðàóë', 1524 'blackfathom_deeps_instance' => '×åðíîïîíÿíû Ãëóáèíû', 1525 'uldaman_instance' => 'Óëüäàìàí', 1526 'gnomeregan_instance' => 'Ãíîìîðåãàí', 1527 'sunken_temple_instance' => 'Çàòîíóâøèé õðàì', 1528 'razorfen_downs_instance' => 'Ðàçîðôåí Íèæíèé', 1529 'outland' => 'Âíåøíåçåìüå', 1530 'emerald_forest' => 'Èçóìðóäíîëåñüå', 1531 'scarlet_monastery_instance' => 'Ìàëèíîâûé Ìîíàñòûðü', 1532 'zul_farrak_instance' => 'Çóë-Ôàððàê', 1533 'blackrock_spire_instance' => '×åðíîñêàëüíûé Øïèëü', 1534 'blackrock_depths_instance' => '×åðíîñêàëüíûå Ãëóáèíû', 1535 'onyxia_s_lair_instance' => 'Ëîãîâî Îíèêñèè', 1536 'caverns_of_time' => 'Ïåùåðû Âðåìåíè', 1537 'scholomance_instance' => 'Øêîëîìàíñüå', 1538 'zul_gurub_instance' => 'Çóë-Ãóðóá', 1539 'stratholme_instance' => 'Ñòðàòðå÷íîñòðîâüå', 1540 'maraudon_instance' => 'Ìàðîäîí', 1541 'deeprun_tram' => 'Ãëóáîáåãíîå Ìåòðî', 1542 'ragefire_chasm_instance' => 'ßðîîãíèé Ðàçëîì', 1543 'the_molten_core_instance' => 'Ëèòîÿäðüå', 1544 'dire_maul_instance' => 'Æóòêîêóâàëäüå', 1545 'alliance_pvp_barracks' => 'Êàçàðìû Àëüÿíñà', 1546 'horde_pvp_barracks' => 'Êàçàðìû Îðäû', 1547 'development_land' => 'Ðàçðàáîò÷èêîçåìüå', 1548 'blackwing_lair_instance' => '×åðíîêðûëüå Ëîãîâî', 1549 'warsong_gulch' => 'Áîåâîïåñåííîå óùåëüå', 1550 'ruins_of_ahn_qiraj_instance' => 'Ðóèíû Àí-Êèðàæ', 1551 'arathi_basin' => 'Àðàòè', 1552 'temple_of_ahn_qiraj_instance' => 'Õðàì Àí-Êèðàæ', 1553 'naxxramas_instance' => 'Íàêñ-Êñðàìàñ', 1538 1554 //tbc - maps 1539 'cot_black_morass' => ' The Black Morass',1540 'karazahn' => ' Karazahn',1541 'cot_hyjal_past' => ' Hyjal Past',1542 'hellfire_military' => ' The Shattered Halls',1543 'hellfire_demon' => ' The Blood Furnace',1544 'hellfire_rampart' => ' Hellfire Ramparts',1545 'hellfire_raid' => ' Magtheridon\'s Lair',1546 'coilfang_pumping' => ' The Steamvault',1547 'coilfang_marsh' => ' The Underbog',1548 'coilfang_draenei' => ' The Slave Pens',1549 'coilfang_raid' => ' Serpentshrine Cavern',1550 'tempest_keep_raid' => ' Eye of the Storm',1551 'tempest_keep_arcane' => ' The Arcatraz',1552 'tempest_keep_atrium' => ' The Botanica',1553 'tempest_keep_factory' => ' The Mechanar',1554 'auchindoun_shadow' => ' Shadow Labyrinth',1555 'auchindoun_arakkoa' => ' Sethekk Halls',1556 'auchindoun_ethereal' => ' Mana-Tombs',1557 'auchindoun_draenei' => ' Auchenai Crypts',1558 'nagrand_arena' => ' Nagrand Arena',1559 'cot_hillsbrad_past' => ' Old Hillsbrad Foothills',1560 'blades_edge_arena' => ' Blade\'s Edge Arena',1561 'black_temple' => ' Black Temple',1562 'gruuls_lair' => ' Gruul\'s Lair',1563 'netherstorm_arena' => ' Netherstorm Arena',1564 'zulaman' => ' Zul\'Aman',1555 'cot_black_morass' => '×åðíîãðÿçáîëîòüå', 1556 'karazahn' => 'Êàðàçàí', 1557 'cot_hyjal_past' => 'Õèäæàë Ïðîøëûé', 1558 'hellfire_military' => 'Ðàçðóøåííûå Çàëû', 1559 'hellfire_demon' => 'Êðîâàâàÿ Ïå÷ü', 1560 'hellfire_rampart' => 'Àäñêîïëàìåííûå Âàëû', 1561 'hellfire_raid' => 'Ëîãîâî Ìàãñåðèäîíà', 1562 'coilfang_pumping' => 'Ïàðîâîõðàíüå', 1563 'coilfang_marsh' => 'Íèæíåòðÿñèíüå', 1564 'coilfang_draenei' => 'Ðàáîðó÷üå', 1565 'coilfang_raid' => 'Çìååñâÿòèëèùíûå Ïåùåðû', 1566 'tempest_keep_raid' => 'Ãëàç Øòîðìà', 1567 'tempest_keep_arcane' => 'Àðêàòðàç', 1568 'tempest_keep_atrium' => 'Áîòàíèêà', 1569 'tempest_keep_factory' => 'Ìåõàíàð', 1570 'auchindoun_shadow' => 'Òåíåâîé Ëàáèðèíò', 1571 'auchindoun_arakkoa' => 'Çàëû Ñåòõåêêà', 1572 'auchindoun_ethereal' => 'Ìàíà-Ìîãèëüå', 1573 'auchindoun_draenei' => 'Î÷åíàéñêèå Ñêëåïû', 1574 'nagrand_arena' => 'Íàãðàíäñêàÿ Àðåíà', 1575 'cot_hillsbrad_past' => 'Ñòàðîå Øòèôòõîëìüå', 1576 'blades_edge_arena' => 'Êëèíêîëåçâèéíàÿ Àðåíà', 1577 'black_temple' => '×åðíûé Õðàì', 1578 'gruuls_lair' => 'Ëîãîâî Ãðóóëà', 1579 'netherstorm_arena' => 'Âíåøíåøòîðìîâàÿ Àðåíà', 1580 'zulaman' => 'Çóë-Àìàí', 1565 1581 //---class/race--- 1566 1582 'unknown' => 'íåïîíÿòíî', … … 1586 1602 'draenei' => 'Äðàåíåé', 1587 1603 //---zone--- 1588 'undercity' => ' Undercity',1589 'ironforge' => ' Ironforge',1590 'stormwind_city' => ' Stormwind City',1591 'badlands' => ' Badlands',1592 'wetlands' => ' Wetlands',1593 'stranglethorn_vale' => ' Stranglethorn Vale',1594 'redridge_mountains' => ' Redridge Mountains',1595 'loch_modan' => ' Loch Modan',1596 'duskwood' => ' Duskwood',1597 'deadwind_pass' => ' Deadwind Pass',1598 'elwynn_forest' => ' Elwynn Forest',1599 'burning_steppes' => ' Steppes ardentes',1600 'searing_gorge' => ' Searing Gorge',1601 'dun_morogh' => ' Dun Morogh',1602 'the_hinterlands' => ' The Hinterlands',1603 'westfall' => ' Westfall',1604 'hillsbrad_foothills' => ' Hillsbrad Foothills',1605 'eastern_plaguelands' => ' Eastern Plaguelands',1606 'western_plaguelands' => ' Western Plaguelands',1607 'silverpine_forest' => ' Silverpine Forest',1608 'tirisfal_glades' => ' Tirisfal Glades',1609 'blasted_lands' => ' Blasted Lands',1610 'swamp_of_sorrows' => ' Swamp of Sorrows',1611 'arathi_highlands' => ' Arathi Highlands',1612 'alterac_mountains' => ' Alterac Mountains',1613 'darnassus' => ' Darnassus',1614 'thunder_bluff' => ' Thunder Bluff',1615 'orgrimmar' => ' Orgrimmar',1604 'undercity' => 'Ïîäãîðîä', 1605 'ironforge' => 'Æåëåçíîãîðí', 1606 'stormwind_city' => 'Øòîðìîâåòåð', 1607 'badlands' => 'Ïëîõîçåìüå', 1608 'wetlands' => 'Ìîêðîçåìüå', 1609 'stranglethorn_vale' => 'Øèïîäóøàùàÿ äîëèíà', 1610 'redridge_mountains' => 'Êðàñíîãîðüå', 1611 'loch_modan' => 'Ëîõ Ìîäàí', 1612 'duskwood' => 'Ñóìåðåëåñ', 1613 'deadwind_pass' => 'Ñìåðâåòåðíûé ïðîõîä', 1614 'elwynn_forest' => 'Ëåñ Ýëâèíí', 1615 'burning_steppes' => 'Ïûëàþùèå ñòåïè', 1616 'searing_gorge' => 'Èññóøåíîå óùåëüå', 1617 'dun_morogh' => 'Äóí Ìîðîã', 1618 'the_hinterlands' => 'Âíóòðåçåìüå', 1619 'westfall' => 'Çàïàäîïàä', 1620 'hillsbrad_foothills' => 'Øòèôòõîëìüå', 1621 'eastern_plaguelands' => 'Âîñò.×óìíîçåìüå', 1622 'western_plaguelands' => 'Çàï.×óìíîçåìüå', 1623 'silverpine_forest' => 'Ñðåáðîåëüíûé áîð', 1624 'tirisfal_glades' => 'ïîëÿ Òèðèñôàëÿ', 1625 'blasted_lands' => 'Âçîðâàíîçåìüå', 1626 'swamp_of_sorrows' => 'Áîëîòà Ïå÷àëè', 1627 'arathi_highlands' => 'íàãîðüå Àðàòè', 1628 'alterac_mountains' => 'ãîðû Àëüòåðàê', 1629 'darnassus' => 'Äàðíàññ', 1630 'thunder_bluff' => 'Ãðîìîãðåì', 1631 'orgrimmar' => 'Îðãðèìàð', 1616 1632 'moonglade' => 'Moonglade', 1617 'silithus' => ' Silithus',1618 'winterspring' => ' Winterspring',1619 'un_goro_crater' => ' Un\'Goro Crater',1620 'felwood' => ' Felwood',1621 'azshara' => ' Azshara',1622 'tanaris' => ' Tanaris',1623 'dustwallow_marsh' => ' Dustwallow Marsh',1624 'mulgore' => ' Mulgore',1625 'feralas' => ' Feralas',1626 'desolace' => ' Desolace',1627 'thousand_needles' => ' Thousand Needles',1628 'durotar' => ' Durotar',1629 'ashenvale' => ' Ashenvale',1630 'darkshore' => ' Darkshore',1631 'teldrassil' => ' Teldrassil',1632 'stonetalon_mountains' => ' Stonetalon Mountains',1633 'the_barrens' => ' The Barrens',1633 'silithus' => 'Ñèëèòóñ', 1634 'winterspring' => 'Çèìíåêëþ÷üå', 1635 'un_goro_crater' => 'êðàòåð Óí-Ãîðî', 1636 'felwood' => 'Ôåëüñêèé ëåñ', 1637 'azshara' => 'Àæàðà', 1638 'tanaris' => 'Òàíàðèñ', 1639 'dustwallow_marsh' => 'Ïûëåïîêðûòûå áîëîòà', 1640 'mulgore' => 'Ìóëãîð', 1641 'feralas' => 'Ôåðàëàñ', 1642 'desolace' => 'Äåñîëàñ', 1643 'thousand_needles' => 'Òûùåèãëüå', 1644 'durotar' => 'Äóðîòàð', 1645 'ashenvale' => 'Àøåíâàëü', 1646 'darkshore' => 'Òåìíîáåðåæüå', 1647 'teldrassil' => 'Òåëäðàñèë', 1648 'stonetalon_mountains' => 'Êàìåííîêîãòüè ãîðû', 1649 'the_barrens' => 'Ïóñòîøè', 1634 1650 //tbc- zones 1635 'shattrath_city' => ' Shattrath City',1636 'silvermoon_city' => ' Silvermoon City',1637 'netherstorm' => ' Netherstorm',1638 'terokkar_forest' => ' Terokkar Forest',1639 'nagrand' => ' Nagrand',1640 'bloodmyst_isle' => ' Bloodmyst Isle',1641 'blades_edge_mountains' => ' Blade\'s Edge Mountains',1642 'shadowmoon_valley' => ' Shadowmoon Valley',1643 'the_exodar' => ' The Exodar',1644 'zangarmarsh' => ' Zangarmarsh',1645 'hellfire_peninsula' => ' Hellfire Peninsula',1646 'azuremyst_isle' => ' Azuremyst Isle',1647 'ghostlands' => ' Ghostlands',1648 'eversong_woods' => ' Eversong Woods',1651 'shattrath_city' => 'Øàòòðàñ', 1652 'silvermoon_city' => 'Ñðåáðîëóíüå', 1653 'netherstorm' => 'Íèæíåâåòðüå', 1654 'terokkar_forest' => 'ëåñ Òåððîêàð', 1655 'nagrand' => 'Íàãðàíä', 1656 'bloodmyst_isle' => 'Êðîâîòóìàííûé îñòðîâ', 1657 'blades_edge_mountains' => 'Êëèíêîëåçâèéíûå ãîðû', 1658 'shadowmoon_valley' => 'Òåíåëóííàÿ äîëèíà', 1659 'the_exodar' => 'Ýêñîäàð', 1660 'zangarmarsh' => 'Çàíãàðáîëîòüå', 1661 'hellfire_peninsula' => 'Àäñêîïëàìåííûé ïîëóîñòðîâ', 1662 'azuremyst_isle' => 'Ñèíåòóìàííûé îñòðîâ', 1663 'ghostlands' => 'Ïðèçðà÷íîçåìüå', 1664 'eversong_woods' => 'Ðåäêîïåñåííûé ëåñ', 1649 1665 //skills 1650 'SKILL_RIDING' => ' Riding',1651 'SKILL_LANG_DRAENEI' => ' Language Draenei',1652 'SKILL_JEWELCRAFTING' => ' Jewelcrafting',1653 'SKILL_RIDING_KODO' => ' Riding Kodo',1654 'SKILL_LANG_GUTTERSPEAK' => ' Language Gutterspeak',1655 'SKILL_LOCKPICKING' => ' LockPicking',1656 'SKILL_DISCIPLINE' => ' Descipline',1657 'SKILL_DESTRUCTION' => ' Destruction',1658 'SKILL_BALANCE' => ' Balance',1659 'SKILL_RIDING_UNDEAD_HORSE' => ' Riding Undead Horse',1660 'SKILL_RIDING_MECHANOSTRIDER' => ' Riding Mechanostrider',1661 'SKILL_RIDING_RAPTOR' => ' Riding Raptor',1662 'SKILL_FIST_WEAPONS' => ' Fist Weapons',1663 'SKILL_SHIELD' => ' Shield',1664 'SKILL_CLOTH' => ' Cloth',1665 'SKILL_LEATHER' => ' Leather',1666 'SKILL_MAIL' => ' Mail',1667 'SKILL_SKINNING' => ' Skinning',1668 'SKILL_ELEMENTAL_COMBAT' => ' Elemental Combat',1669 'SKILL_RESTORATION' => ' Restoration',1670 'SKILL_ENHANCEMENT' => ' Enhancement',1671 'SKILL_FISHING' => ' Fishing',1672 'SKILL_AFFLICTION' => ' Affiliction',1673 'SKILL_DEMONOLOGY' => ' Demonology',1674 'SKILL_ENCHANTING' => ' Enchanting',1675 'SKILL_LANG_TROLL' => ' Language Troll',1676 'SKILL_LANG_GNOMISH' => ' Language Gnomish',1677 'SKILL_PLATE_MAIL' => ' Plate Mail',1678 'SKILL_PET_TALENTS' => ' Pet Talents',1679 'SKILL_BEAST_TRAINING' => ' Beast Training',1680 'SKILL_PROTECTION' => ' Protection',1681 'SKILL_FURY' => ' Fury',1682 'SKILL_ASSASSINATION' => ' Assassination',1683 'SKILL_ARCANE' => ' Arcane',1684 'SKILL_POLEARMS' => ' Polearms',1685 'SKILL_WANDS' => ' Wands',1686 'SKILL_SPEARS' => ' Spears',1687 'SKILL_CROSSBOWS' => ' Crossbows',1688 'SKILL_WEAPON_TALENTS' => ' Weapon Talents',1689 'SKILL_ENGINERING' => ' Enginering',1690 'SKILL_TAILORING' => ' Tailoring',1691 'SKILL_MINING' => ' Mining',1692 'SKILL_COOKING' => ' Cooking',1693 'SKILL_RETRIBUTION' => ' Retribution',1694 'SKILL_HERBALISM' => ' Herbalism',1695 'SKILL_THROWN' => ' Thrown',1696 'SKILL_DAGGERS' => ' Daggers',1697 'SKILL_2H_AXES' => ' Two-Handed Axes',1698 'SKILL_ALCHEMY' => ' Alchemy',1699 'SKILL_LEATHERWORKING' => ' Leatherworking',1700 'SKILL_BLACKSMITHING' => ' Blacksmithing',1701 'SKILL_MARKSMANSHIP' => ' Marksmanship',1702 'SKILL_UNARMED' => ' Unarmed',1703 'SKILL_2H_MACES' => ' Two-Handed Maces',1704 'SKILL_RIDING_TIGER' => ' Riding Tiger',1705 'SKILL_RIDING_RAM' => ' Riding Ram',1706 'SKILL_RIDING_WOLF' => ' Riding Wolf',1707 'SKILL_RIDING_HORSE' => ' Riding Horse',1708 'SKILL_LANG_OLD_TONGUE' => ' Language Old Tongue',1709 'SKILL_LANG_TITAN' => ' Language Titan',1710 'SKILL_LANG_DEMON_TONGUE' => ' Language Demon Tongue',1711 'SKILL_LANG_DRACONIC' => ' Language Draconic',1712 'SKILL_LANG_THALASSIAN' => ' Language Thalassian',1713 'SKILL_STAVES' => ' Staves',1714 'SKILL_FERAL_COMBAT' => ' Feral Comabt',1715 'SKILL_FIRST_AID' => ' First Aid',1716 'SKILL_DUAL_WIELD' => ' Dual Wield',1717 'SKILL_LANG_TAURAHE' => ' Language Taurahe',1718 'SKILL_LANG_DARNASSIAN' => ' Language Darnassian',1719 'SKILL_LANG_DWARVEN' => ' Language Dwarven',1720 'SKILL_LANG_ORCISH' => ' Language Orcish',1721 'SKILL_LANG_COMMON' => ' Language Common',1722 'SKILL_DEFENSE' => ' Defense',1723 'SKILL_SHADOW' => ' Shadow',1724 'SKILL_2H_SWORDS' => ' Two-Handed Swords',1725 'SKILL_HOLY' => ' Holy',1726 'SKILL_MACES' => ' Maces',1727 'SKILL_SURVIVAL' => ' Survival',1728 'SKILL_BEAST_MASTERY' => ' Beast Mastery',1729 'SKILL_GUNS' => ' Guns',1730 'SKILL_BOWS' => ' Bows',1731 'SKILL_AXES' => ' Axes',1732 'SKILL_SWORDS' => ' Swords',1733 'SKILL_POISONS' => ' Poisons',1734 'SKILL_SUBTLETY' => ' Subtlery',1735 'SKILL_COMBAT' => ' Combat',1736 'SKILL_ARMS' => ' Arms',1737 'SKILL_FIRE' => ' Fire',1738 'SKILL_FROST' => ' Frost',1666 'SKILL_RIDING' => 'Âåðõ.Åçäà', 1667 'SKILL_LANG_DRAENEI' => 'ßçûê Äðàåíåé', 1668 'SKILL_JEWELCRAFTING' => 'Þâåëèð', 1669 'SKILL_RIDING_KODO' => 'Åçäà íà êîäî', 1670 'SKILL_LANG_GUTTERSPEAK' => 'ßçûê Ãàòòåð', 1671 'SKILL_LOCKPICKING' => 'Âçëîìùèê', 1672 'SKILL_DISCIPLINE' => 'Äèñöèïëèíà', 1673 'SKILL_DESTRUCTION' => 'Óíè÷òîæåíèå', 1674 'SKILL_BALANCE' => 'Áàëàíñ', 1675 'SKILL_RIDING_UNDEAD_HORSE' => 'Åçäà íà äîõëîøàäè', 1676 'SKILL_RIDING_MECHANOSTRIDER' => 'Åçäà íà ìåõàíîñòðàóñå', 1677 'SKILL_RIDING_RAPTOR' => 'Åçäà íà ðàïòîðå', 1678 'SKILL_FIST_WEAPONS' => 'Êàñòåòû', 1679 'SKILL_SHIELD' => 'Øèò', 1680 'SKILL_CLOTH' => 'Òêàíü', 1681 'SKILL_LEATHER' => 'Êîæà', 1682 'SKILL_MAIL' => 'Êîëü÷óãà', 1683 'SKILL_SKINNING' => 'Ñêîðíÿê', 1684 'SKILL_ELEMENTAL_COMBAT' => 'Ñòèõèéíûé áîé', 1685 'SKILL_RESTORATION' => 'Ëå÷åíèå', 1686 'SKILL_ENHANCEMENT' => 'Óëó÷øåíèå', 1687 'SKILL_FISHING' => 'Ðûáîëîâñòâî', 1688 'SKILL_AFFLICTION' => 'Àôôèëèêöèÿ', 1689 'SKILL_DEMONOLOGY' => 'Äåìîíîëîãèÿ', 1690 'SKILL_ENCHANTING' => 'Î÷àðîâàíèå', 1691 'SKILL_LANG_TROLL' => 'ßçûê Òðîëëåé', 1692 'SKILL_LANG_GNOMISH' => 'ßçûê Ãíîìîâ', 1693 'SKILL_PLATE_MAIL' => 'Ïëàñòèí÷àòûé äîñïåõ', 1694 'SKILL_PET_TALENTS' => 'Ïðèó÷åíèå', 1695 'SKILL_BEAST_TRAINING' => 'Òðåíèðîâêà çâåðåé', 1696 'SKILL_PROTECTION' => 'Îáîðîíà', 1697 'SKILL_FURY' => 'ßðîñòü', 1698 'SKILL_ASSASSINATION' => 'Óáèéñòâî', 1699 'SKILL_ARCANE' => 'Òàéíîå', 1700 'SKILL_POLEARMS' => 'Àëåáàðäû', 1701 'SKILL_WANDS' => 'Ïàëêè', 1702 'SKILL_SPEARS' => 'Êîïüÿ', 1703 'SKILL_CROSSBOWS' => 'Àðáàëåòû', 1704 'SKILL_WEAPON_TALENTS' => 'Îðóæåéíûå òàëàíòû', 1705 'SKILL_ENGINERING' => 'Èíæåíåð', 1706 'SKILL_TAILORING' => 'Ïîðòíîé', 1707 'SKILL_MINING' => 'Øàõòåð', 1708 'SKILL_COOKING' => 'Ïîâàð', 1709 'SKILL_RETRIBUTION' => 'Âîçìåçäèå', 1710 'SKILL_HERBALISM' => 'Ãåðáàëèñò', 1711 'SKILL_THROWN' => 'Ìåòàíèå', 1712 'SKILL_DAGGERS' => 'Êèíæàëû', 1713 'SKILL_2H_AXES' => 'Äâóðó÷.Òîïîðû', 1714 'SKILL_ALCHEMY' => 'Àëõèìèÿ', 1715 'SKILL_LEATHERWORKING' => 'Êîæåâíèê', 1716 'SKILL_BLACKSMITHING' => 'Êóçíåö', 1717 'SKILL_MARKSMANSHIP' => 'Ñíàéïåð', 1718 'SKILL_UNARMED' => 'Áîðüáà', 1719 'SKILL_2H_MACES' => 'Äâóðó÷.Áóëàâû', 1720 'SKILL_RIDING_TIGER' => 'Åçäà íà òèãðå', 1721 'SKILL_RIDING_RAM' => 'Åçäà íà áàðàíå', 1722 'SKILL_RIDING_WOLF' => 'Åçäà íà âîëêå', 1723 'SKILL_RIDING_HORSE' => 'Åçäà íà ëîøàäè', 1724 'SKILL_LANG_OLD_TONGUE' => 'ßçûê Äðåâíèõ', 1725 'SKILL_LANG_TITAN' => 'ßçûê Òèòàíîâ', 1726 'SKILL_LANG_DEMON_TONGUE' => 'ßçûê Äåìîíîâ', 1727 'SKILL_LANG_DRACONIC' => 'ßçûê Äðàêîíîâ', 1728 'SKILL_LANG_THALASSIAN' => 'ßçûê Òàëàññêèé', 1729 'SKILL_STAVES' => 'Ïîñîõè', 1730 'SKILL_FERAL_COMBAT' => 'Çâåðèíûé áîé', 1731 'SKILL_FIRST_AID' => 'Ñàíèòàð', 1732 'SKILL_DUAL_WIELD' => 'Îáîåðó÷üå', 1733 'SKILL_LANG_TAURAHE' => 'ßçûê Òàóðåí', 1734 'SKILL_LANG_DARNASSIAN' => 'ßçûê Äàðíàññêèé', 1735 'SKILL_LANG_DWARVEN' => 'ßçûê Äâàðôñêèé', 1736 'SKILL_LANG_ORCISH' => 'ßçûê Îðêñêèé', 1737 'SKILL_LANG_COMMON' => 'ßçûê Îáùèé', 1738 'SKILL_DEFENSE' => 'Çàùèòà', 1739 'SKILL_SHADOW' => 'Òåíåìàãèÿ', 1740 'SKILL_2H_SWORDS' => 'Äâóðó÷.Ìå÷è', 1741 'SKILL_HOLY' => 'Ñâÿòîìàãèÿ', 1742 'SKILL_MACES' => 'Áóëàâû', 1743 'SKILL_SURVIVAL' => 'Âûæèâàíèå', 1744 'SKILL_BEAST_MASTERY' => 'Çâåðîòðåíèðîâêà', 1745 'SKILL_GUNS' => 'Ðóæüÿ', 1746 'SKILL_BOWS' => 'Ëóêè', 1747 'SKILL_AXES' => 'Òîïîðû', 1748 'SKILL_SWORDS' => 'Ìå÷è', 1749 'SKILL_POISONS' => 'ßäû', 1750 'SKILL_SUBTLETY' => 'Òîíêîñòü', 1751 'SKILL_COMBAT' => 'Áîé', 1752 'SKILL_ARMS' => 'Ðóêè', 1753 'SKILL_FIRE' => 'Îãîíü', 1754 'SKILL_FROST' => 'Ìîðîç', 1739 1755 //------ItemSets----- 1740 1756 'Set696' => 'High Warlord\'s Wartide', -
minimanager/lang/trTR.php
r5 r19 28 28 'none' => 'hiçbiri', 29 29 'delete' => 'Sil', 30 'delete_short' => 'Del.', 30 31 'edit' => 'Düzenle', 31 32 'yes' => 'EVET', … … 257 258 'no_act_quests' => 'Aktif görev bulunamadý.', 258 259 'quest_id' => 'ID', 260 'quest_level' => 'lvl', 259 261 'quest_title' => 'Görev Adý', 260 262 'professions' => 'Professions', //TODO 261 263 'skills' => 'Skills', //TODO 264 'skill_id' => 'ID', //TODO 265 'skill_name' => 'Skill Name', //TODO 266 'skill_value' => 'Value', //TODO 267 // --- $skill_rank_array --- 268 'apprentice' => 'Apprentice', //TODO: Translate 269 'journeyman' => 'Journeyman', //TODO: Translate 270 'expert' => 'Expert', //TODO: Translate 271 'artisan' => 'artisan', //TODO: Translate 272 'master' => 'Master', //TODO: Translate 273 'inherent' => 'Inherent', //TODO: Translate 274 'wise' => 'Wise', //TODO: Translate 262 275 // ---- edit_char.php ---- 263 276 'update' => 'Karakter Verisi Güncelle', … … 594 607 $lang_mail = array( 595 608 // ----- MAIL.PHP ----- 596 'mail_options_type' => 'Posta Seçenekleri / Tip', 609 'mail_type' => 'Mail Type', 610 'mail_options' => 'Mail Options', 597 611 'email' => 'E-Posta', 598 612 'ingame_mail' => 'OyunÝçi Posta', … … 632 646 $lang_run_patch = array( 633 647 // -----RUN_PATCH.PHP ----- 634 'err_in_line' => ' MySQL sözdizimi hatasý, sorgu no ',648 'err_in_line' => 'SQL sözdizimi hatasý, sorgu no ', 635 649 'run_sql_file_only' => 'Sadece .sql veya .qbquery dosyalarý çalýþtýrabilirsiniz.', 636 650 'file_not_found' => 'Dosya Bulunamadý!', … … 1366 1380 'req_level_desc' => 'Character level required to learn this spell.', 1367 1381 'check_to_delete' => '* Check checkbox next to item to delete.', 1368 'search_results' => 'Search Results' 1382 'search_results' => 'Search Results', 1383 'RacialLeader' => 'Racial Leader', 1384 'RacialLeader_desc' => 'Set to 1 if the creature is Racial Leader' 1369 1385 ); 1370 1386 … … 1491 1507 'total_auctions' => 'Total Auctions', 1492 1508 'search_results' => 'Search Results', 1493 'auction_over' => 'Auction Over' 1509 'auction_over' => 'Auction Over', 1510 'all' => 'All', 1511 'item_id' => 'Item Id', 1512 'item_name' => 'Item Name', 1513 'seller_name' => 'Seller Name', 1514 'buyer_name' => 'Buyer Name', 1515 'tot_found' => 'Total Items Found' 1494 1516 ); 1495 1517 -
minimanager/lang/zhCN.php
r5 r19 32 32 'none' => 'ÎÞ', 33 33 'delete' => 'ɾ³ý', 34 'delete_short' => 'Del.', 34 35 'edit' => '±à¼', 35 36 'yes' => 'È·¶¨', … … 259 260 'no_act_quests' => 'δÕÒµ½½øÐÐÖеÄÈÎÎñ.', 260 261 'quest_id' => 'ÈÎÎñID', 262 'quest_level' => 'lvl', 261 263 'quest_title' => 'ÈÎÎñ±êÌâ', 262 264 'professions' => 'Professions', //TODO 263 265 'skills' => 'Skills', //TODO 266 'skill_id' => 'ID', //TODO 267 'skill_name' => 'Skill Name', //TODO 268 'skill_value' => 'Value', //TODO 269 // --- $skill_rank_array --- 270 'apprentice' => 'Apprentice', //TODO: Translate 271 'journeyman' => 'Journeyman', //TODO: Translate 272 'expert' => 'Expert', //TODO: Translate 273 'artisan' => 'artisan', //TODO: Translate 274 'master' => 'Master', //TODO: Translate 275 'inherent' => 'Inherent', //TODO: Translate 276 'wise' => 'Wise', //TODO: Translate 264 277 // ---- edit_char.php ---- 265 278 'update' => '¸üÐÂÈËÎïÊý¾Ý', … … 596 609 $lang_mail = array( 597 610 // ----- MAIL.PHP ----- 598 'mail_options_type' => 'ÓʼþÑ¡Ïî /ÀàÐÍ', 611 'mail_type' => 'Mail Type', 612 'mail_options' => 'Mail Options', 599 613 'email' => 'Óʼþ', 600 614 'ingame_mail' => 'ÓÎÏ·ÖÐÓʼþ', … … 634 648 $lang_run_patch = array( 635 649 // -----RUN_PATCH.PHP ----- 636 'err_in_line' => ' MYSQLÓï·¨´íÎóÊý×Ö ',650 'err_in_line' => 'SQLÓï·¨´íÎóÊý×Ö ', 637 651 'run_sql_file_only' => 'ÄãÖ»ÄÜÔËÐÐ . sql »ò.qbquery Îļþ.', 638 652 'file_not_found' => 'ûÕÒµ½Îļþ!', … … 1369 1383 'req_level_desc' => 'Character level required to learn this spell.', 1370 1384 'check_to_delete' => '* Check checkbox next to item to remove from template.', 1371 'search_results' => 'Search Results' 1385 'search_results' => 'Search Results', 1386 'RacialLeader' => 'Racial Leader', 1387 'RacialLeader_desc' => 'Set to 1 if the creature is Racial Leader' 1372 1388 ); 1373 1389 … … 1494 1510 'total_auctions' => 'Total Auctions', 1495 1511 'search_results' => 'Search Results', 1496 'auction_over' => 'Auction Over' 1512 'auction_over' => 'Auction Over', 1513 'all' => 'All', 1514 'item_id' => 'Item Id', 1515 'item_name' => 'Item Name', 1516 'seller_name' => 'Seller Name', 1517 'buyer_name' => 'Buyer Name', 1518 'tot_found' => 'Total Items Found' 1497 1519 ); 1498 1520 -
minimanager/login.php
r5 r19 19 19 if ( empty($_POST['user']) || empty($_POST['pass']) ) redirect("login.php?error=2"); 20 20 21 $ mysql = new MySQL;22 $link = $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);23 24 $user_name = $ mysql->quote_smart($_POST['user']);25 $user_pass = $ mysql->quote_smart($_POST['pass']);26 27 $result = $ mysql->query("SELECT id,gmlevel,username FROM account WHERE username='$user_name' AND I='$user_pass' ");28 29 if ($ mysql->num_rows($result) == 1) {30 $id = $ mysql->result($result, 0, 'id');31 $result1 = $ mysql->query("SELECT count(*) FROM account_banned WHERE id ='$id'");32 if ($ mysql->result($result1, 0)) {33 $ mysql->close();21 $sql = new SQL; 22 $link = $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 23 24 $user_name = $sql->quote_smart($_POST['user']); 25 $user_pass = $sql->quote_smart($_POST['pass']); 26 27 $result = $sql->query("SELECT id,gmlevel,username FROM account WHERE username='$user_name' AND I='$user_pass' "); 28 29 if ($sql->num_rows($result) == 1) { 30 $id = $sql->result($result, 0, 'id'); 31 $result1 = $sql->query("SELECT count(*) FROM account_banned WHERE id ='$id'"); 32 if ($sql->result($result1, 0)) { 33 $sql->close(); 34 34 redirect("login.php?error=3"); 35 35 } else { 36 36 $_SESSION['user_id'] = $id; 37 $_SESSION['uname'] = $ mysql->result($result, 0, 'username');38 $_SESSION['user_lvl'] = $ mysql->result($result, 0, 'gmlevel');39 $_SESSION['realm_id'] = $ mysql->quote_smart($_POST['realm']);37 $_SESSION['uname'] = $sql->result($result, 0, 'username'); 38 $_SESSION['user_lvl'] = $sql->result($result, 0, 'gmlevel'); 39 $_SESSION['realm_id'] = $sql->quote_smart($_POST['realm']); 40 40 $_SESSION['client_ip'] = ( !empty($_SERVER['REMOTE_ADDR']) ) ? $_SERVER['REMOTE_ADDR'] : getenv('REMOTE_ADDR'); 41 41 … … 45 45 setcookie("p_hash", $user_pass, time()+60*60*24*7); 46 46 } 47 $ mysql->close();47 $sql->close(); 48 48 redirect("index.php"); 49 49 } 50 50 } else { 51 $ mysql->close();51 $sql->close(); 52 52 redirect("login.php?error=1"); 53 53 } … … 90 90 </tr>"; 91 91 92 $ mysql = new MySQL;93 $link = $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);94 $result = $ mysql->query("SELECT id,name FROM `realmlist` LIMIT 10");95 96 if ($ mysql->num_rows($result)>1){92 $sql = new SQL; 93 $link = $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 94 $result = $sql->query("SELECT id,name FROM `realmlist` LIMIT 10"); 95 96 if ($sql->num_rows($result)>1){ 97 97 $output .= "<tr align=\"left\"> 98 98 <td colspan=\"2\">{$lang_login['select_realm']} : 99 99 <select name=\"realm\">"; 100 100 101 while ($realm = $ mysql->fetch_row($result)){101 while ($realm = $sql->fetch_row($result)) 102 102 $output .= "<option value=\"$realm[0]\">$realm[1]</option>"; 103 } 103 104 104 $output .= "</select></td></tr>"; 105 105 } else { 106 $output .= "<input type=\"hidden\" name=\"realm\" value=\"".$ mysql->result($result, 0, 'id')."\" />";106 $output .= "<input type=\"hidden\" name=\"realm\" value=\"".$sql->result($result, 0, 'id')."\" />"; 107 107 } 108 $ mysql->close();108 $sql->close(); 109 109 110 110 $output .= "<tr align=\"left\"> … … 131 131 //################################################################################################# 132 132 function do_cookie_login(){ 133 global $lang_global, $realm_db;133 global $lang_global, $realm_db; 134 134 135 135 if ( empty($_COOKIE['uname']) || empty($_COOKIE['p_hash']) || empty($_COOKIE['realm_id'])) redirect("login.php?error=2"); 136 136 137 $ mysql = new MySQL;138 $link = $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);139 $user_name = $ mysql->quote_smart($_COOKIE['uname']);140 $user_pass = $ mysql->quote_smart($_COOKIE['p_hash']);141 142 $result = $ mysql->query("SELECT username,gmlevel,id FROM account WHERE username='$user_name' AND I='$user_pass'");143 144 if ($ mysql->num_rows($result) == 1) {145 $id = $ mysql->result($result, 0, 'id');146 $result1 = $ mysql->query("SELECT count(*) FROM account_banned WHERE id ='$id'");147 if ($ mysql->result($result1, 0)) {148 $ mysql->close();137 $sql = new SQL; 138 $link = $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 139 $user_name = $sql->quote_smart($_COOKIE['uname']); 140 $user_pass = $sql->quote_smart($_COOKIE['p_hash']); 141 142 $result = $sql->query("SELECT username,gmlevel,id FROM account WHERE username='$user_name' AND I='$user_pass'"); 143 144 if ($sql->num_rows($result)) { 145 $id = $sql->result($result, 0, 'id'); 146 $result1 = $sql->query("SELECT count(*) FROM account_banned WHERE id ='$id'"); 147 if ($sql->result($result1, 0)) { 148 $sql->close(); 149 149 redirect("login.php?error=3"); 150 150 } else { 151 151 $_SESSION['user_id'] = $id; 152 $_SESSION['uname'] = $ mysql->result($result, 0, 'username');153 $_SESSION['user_lvl'] = $ mysql->result($result, 0, 'gmlevel');154 $_SESSION['realm_id'] = $ mysql->quote_smart($_COOKIE['realm_id']);152 $_SESSION['uname'] = $sql->result($result, 0, 'username'); 153 $_SESSION['user_lvl'] = $sql->result($result, 0, 'gmlevel'); 154 $_SESSION['realm_id'] = $sql->quote_smart($_COOKIE['realm_id']); 155 155 $_SESSION['client_ip'] = ( !empty($_SERVER['REMOTE_ADDR']) ) ? $_SERVER['REMOTE_ADDR'] : getenv('REMOTE_ADDR'); 156 156 157 $ mysql->close();157 $sql->close(); 158 158 redirect("index.php"); 159 159 } 160 160 } else { 161 $ mysql->close();161 $sql->close(); 162 162 setcookie ("uname", "", time() - 3600); 163 163 setcookie ("realm_id", "", time() - 3600); … … 173 173 if (isset($_COOKIE["uname"]) && isset($_COOKIE["p_hash"]) && isset($_COOKIE["realm_id"]) && !isset($_GET['error'])) { 174 174 do_cookie_login(); 175 exit();176 175 } 177 176 -
minimanager/mail.php
r5 r19 23 23 <form action=\"mail.php?action=send_mail\" method=\"post\" name=\"form\"> 24 24 <fieldset style=\"width: 770px;\"> 25 <legend>{$lang_mail['mail_ options_type']}</legend>25 <legend>{$lang_mail['mail_type']}</legend> 26 26 <br /> 27 27 <table class=\"top_hidden\" style=\"width: 720px;\"> … … 94 94 } 95 95 96 $ mysql = new MySQL;97 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass']);98 99 $body = $ mysql->quote_smart($_POST['body']);100 $subject = $ mysql->quote_smart($_POST['subject']);96 $sql = new SQL; 97 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 98 99 $body = $sql->quote_smart($_POST['body']); 100 $subject = $sql->quote_smart($_POST['subject']); 101 101 102 if(isset($_POST['to'])&&($_POST['to'] != '')) $to = $ mysql->quote_smart($_POST['to']);102 if(isset($_POST['to'])&&($_POST['to'] != '')) $to = $sql->quote_smart($_POST['to']); 103 103 else { 104 104 $to = 0; … … 106 106 redirect("mail.php?error=1"); 107 107 } else { 108 $group_value = $ mysql->quote_smart($_POST['group_value']);109 $group_sign = $ mysql->quote_smart($_POST['group_sign']);110 $group_send = $ mysql->quote_smart($_POST['group_send']);108 $group_value = $sql->quote_smart($_POST['group_value']); 109 $group_sign = $sql->quote_smart($_POST['group_sign']); 110 $group_send = $sql->quote_smart($_POST['group_send']); 111 111 } 112 112 } 113 113 114 114 $type = addslashes($_POST['type']); 115 $att_gold = $ mysql->quote_smart($_POST['money']);116 $att_item = $ mysql->quote_smart($_POST['att_item']);117 $att_stack = $ mysql->quote_smart($_POST['att_stack']);115 $att_gold = $sql->quote_smart($_POST['money']); 116 $att_item = $sql->quote_smart($_POST['att_item']); 117 $att_stack = $sql->quote_smart($_POST['att_stack']); 118 118 119 119 switch ($type) { 120 120 case "email": 121 121 122 require_once("scripts/ class.phpmailer.php");122 require_once("scripts/mailer/class.phpmailer.php"); 123 123 $mail = new PHPMailer(); 124 124 $mail->Mailer = $mailer_type; … … 157 157 158 158 } elseif (isset($group_value)){ //group send 159 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);159 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 160 160 161 161 $email_array = array(); 162 162 switch ($group_send) { 163 163 case "gm_level": 164 $result = $ mysql->query("SELECT email FROM account WHERE gmlevel $group_sign '$group_value'");165 while($user = $ mysql->fetch_row($result)){164 $result = $sql->query("SELECT email FROM account WHERE gmlevel $group_sign '$group_value'"); 165 while($user = $sql->fetch_row($result)){ 166 166 if($user[0] != "") array_push($email_array, $user[0]); 167 167 } … … 169 169 170 170 case "locked": 171 $result = $ mysql->query("SELECT email FROM account WHERE locked $group_sign '$group_value'");172 while($user = $ mysql->fetch_row($result)){171 $result = $sql->query("SELECT email FROM account WHERE locked $group_sign '$group_value'"); 172 while($user = $sql->fetch_row($result)){ 173 173 if($user[0] != "") array_push($email_array, $user[0]); 174 174 } … … 176 176 177 177 case "banned": 178 $que = $ mysql->query("SELECT id FROM account_banned");179 while ($banned = mysql_fetch_row($que)){180 $result = $ mysql->query("SELECT email FROM account WHERE id = '$banned[0]'");181 if($ mysql->result($result, 0, 'email')) array_push($email_array, $mysql->result($result, 0, 'email'));178 $que = $sql->query("SELECT id FROM account_banned"); 179 while ($banned = $sql->fetch_row($que)){ 180 $result = $sql->query("SELECT email FROM account WHERE id = '$banned[0]'"); 181 if($sql->result($result, 0, 'email')) array_push($email_array, $sql->result($result, 0, 'email')); 182 182 } 183 183 break; 184 184 185 185 default: 186 $ mysql->close();186 $sql->close(); 187 187 redirect("mail.php?error=5"); 188 188 } 189 $ mysql->close();189 $sql->close(); 190 190 191 191 foreach ($email_array as $mail_addr){ … … 206 206 207 207 case "ingame_mail": 208 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);208 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 209 209 210 210 require_once("scripts/gen_lib.php"); 211 211 212 212 if($to){ //single Recipient 213 $result = $ mysql->query("SELECT guid FROM `character` WHERE name ='$to'");214 215 if ($ mysql->num_rows($result) == 1) {216 $receiver = $ mysql->result($result, 0, 'guid');213 $result = $sql->query("SELECT guid FROM `character` WHERE name ='$to'"); 214 215 if ($sql->num_rows($result) == 1) { 216 $receiver = $sql->result($result, 0, 'guid'); 217 217 218 218 send_ingame_mail($receiver, 0, $subject, $body, $att_gold, $att_item, $att_stack); 219 219 220 220 } else { 221 $ mysql->close();221 $sql->close(); 222 222 redirect("mail.php?error=4"); 223 223 } 224 $ mysql->close();224 $sql->close(); 225 225 redirect("mail.php?error=2"); 226 226 break; … … 229 229 switch ($group_send) { 230 230 case "gm_level": 231 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);232 $result = $ mysql->query("SELECT id FROM account WHERE gmlevel $group_sign '$group_value'");233 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);234 while($acc = $ mysql->fetch_row($result)){235 $result_2 = $ mysql->query("SELECT guid FROM `character` WHERE account = '$acc[0]'");236 while($char = $ mysql->fetch_row($result_2)) array_push($char_array, $char[0]);231 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 232 $result = $sql->query("SELECT id FROM account WHERE gmlevel $group_sign '$group_value'"); 233 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 234 while($acc = $sql->fetch_row($result)){ 235 $result_2 = $sql->query("SELECT guid FROM `character` WHERE account = '$acc[0]'"); 236 while($char = $sql->fetch_row($result_2)) array_push($char_array, $char[0]); 237 237 } 238 238 break; 239 239 240 240 case "online": 241 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);242 $result = $ mysql->query("SELECT guid FROM `character` WHERE online $group_sign '$group_value'");243 while($user = $ mysql->fetch_row($result)) array_push($char_array, $user[0]);241 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 242 $result = $sql->query("SELECT guid FROM `character` WHERE online $group_sign '$group_value'"); 243 while($user = $sql->fetch_row($result)) array_push($char_array, $user[0]); 244 244 break; 245 245 246 246 case "char_level": 247 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);248 $result = $ mysql->query("SELECT guid FROM `character` WHERE SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 35), ' ', -1) $group_sign '$group_value'");249 while($user = $ mysql->fetch_row($result)) array_push($char_array, $user[0]);247 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 248 $result = $sql->query("SELECT guid FROM `character` WHERE SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 35), ' ', -1) $group_sign '$group_value'"); 249 while($user = $sql->fetch_row($result)) array_push($char_array, $user[0]); 250 250 break; 251 251 252 252 default: 253 $ mysql->close();253 $sql->close(); 254 254 redirect("mail.php?error=5"); 255 255 } … … 259 259 send_ingame_mail($receiver, 0, $subject, $body, $att_gold, $att_item, $att_stack); 260 260 } 261 $ mysql->close();261 $sql->close(); 262 262 redirect("mail.php?error=2"); 263 263 } -
minimanager/mail_templates/terms.tpl
r5 r19 1 Terms of Service 1 Terms of Service\n\n 2 2 3 3 TO BE FILLED !!! -
minimanager/motd.php
r5 r19 10 10 11 11 require_once("header.php"); 12 require_once("scripts\bbcode_lib.php"); 12 13 valid_login(1); 13 14 14 15 //##################################################################################################### 15 // print add motd16 // ADD MOTD 16 17 //##################################################################################################### 17 18 function add_motd(){ 18 global $lang_motd, $output;19 20 $output .= "<center>19 global $lang_motd, $lang_global, $output; 20 21 $output .= "<center> 21 22 <form action=\"motd.php?action=do_add_motd\" method=\"post\" name=\"form\"> 22 23 <table class=\"top_hidden\"> 24 <tr><td colspan=\"4\">"; 25 add_bbcode_editor(); 26 $output .= " </td></tr> 27 <tr><td colspan=\"4\"> 28 <textarea id=\"msg\" name=\"msg\" rows=\"10\" cols=\"93\"></textarea> 29 </td></tr> 23 30 <tr> 24 <td align=\"left\">"; 25 makebutton($lang_motd['post_motd'], "javascript:do_submit()",220); 26 $output .= "</td> 27 <td align=\"right\">{$lang_motd['post_rules']}</td> 28 </tr></table> 29 <textarea name=\"msg\" rows=\"8\" cols=\"93\"></textarea><br /> 30 </form><br /><br /> 31 <td>{$lang_motd['post_rules']}</td> 32 <td>"; 33 makebutton($lang_motd['post_motd'], "javascript:do_submit()",220); 34 $output .= " <td/><td>"; 35 makebutton($lang_global['back'], "javascript:window.history.back()",220); 36 $output .= " </td> 37 </tr> 38 </table> 39 </form> 40 <br /><br /> 31 41 </center>"; 32 42 } … … 41 51 if (empty($_POST['msg'])) redirect("motd.php?error=1"); 42 52 43 $ mysql = new MySQL;44 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);45 46 $msg = $ mysql->quote_smart($_POST['msg']);47 48 if (strlen($msg) > 254){49 $ mysql->close();53 $sql = new SQL; 54 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 55 56 $msg = $sql->quote_smart($_POST['msg']); 57 58 if (strlen($msg) > 4096){ 59 $sql->close(); 50 60 redirect("motd.php?error=2"); 51 61 } 52 53 $msg = str_replace('\n', '<br />', $msg); 54 $msg = str_replace('\r', '<br />', $msg); 55 $msg = preg_replace( "/([^\/=\"\]])((http|ftp)+(s)?:\/\/[^<>\s]+)/i", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $msg); 56 $msg = preg_replace('/([^\/=\"\]])(www\.)(\S+)/', '\\1<a href="http://\\2\\3" target="_blank">\\2\\3</a>', $msg); 57 58 $by = date("m/d/y H:i:s")." Posted by: $user_name"; 59 60 $query = $mysql->query("INSERT INTO bugreport (type, content) VALUES ('$by','$msg')"); 61 62 $mysql->close(); 62 63 $by = date("m/d/y H:i:s")." Posted by: $user_name"; 64 65 $sql->query("INSERT INTO bugreport (type, content) VALUES ('$by','$msg')"); 66 $sql->close(); 67 68 redirect("index.php"); 69 } 70 71 //##################################################################################################### 72 // EDIT MOTD 73 //##################################################################################################### 74 function edit_motd(){ 75 global $lang_motd,$lang_global, $output, $mangos_db, $realm_id; 76 77 $sql = new SQL; 78 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 79 80 if(isset($_GET['id'])) $id = $sql->quote_smart($_GET['id']); 81 else redirect("motd.php?error=1"); 82 83 $result = $sql->query("SELECT content FROM bugreport WHERE id = '$id'"); 84 $msg = $sql->result($result, 0); 85 $sql->close(); 86 87 $output .= "<center> 88 <form action=\"motd.php?action=do_edit_motd\" method=\"post\" name=\"form\"> 89 <input type=\"hidden\" name=\"id\" value=\"$id\" /> 90 <table class=\"top_hidden\"> 91 <tr><td colspan=\"4\">"; 92 add_bbcode_editor(); 93 $output .= "</td></tr> 94 <tr> 95 <td colspan=\"4\"> 96 <textarea id=\"msg\" name=\"msg\" rows=\"10\" cols=\"93\">$msg</textarea> 97 </td> 98 </tr> 99 <tr> 100 <td>{$lang_motd['post_rules']}</td> 101 <td>"; 102 makebutton($lang_motd['post_motd'], "javascript:do_submit()",220); 103 $output .= " <td/><td>"; 104 makebutton($lang_global['back'], "javascript:window.history.back()",220); 105 $output .= "</td> 106 </tr> 107 </table> 108 </form> 109 <br /><br /> 110 </center>"; 111 } 112 113 114 //##################################################################################################### 115 // DO EDIT MOTD 116 //##################################################################################################### 117 function do_edit_motd(){ 118 global $lang_global, $mangos_db, $realm_id, $user_name; 119 120 if (empty($_POST['msg']) || empty($_POST['id'])) redirect("motd.php?error=1"); 121 122 $sql = new SQL; 123 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 124 125 $msg = $sql->quote_smart($_POST['msg']); 126 $id = $sql->quote_smart($_POST['id']); 127 128 $by = $sql->result($sql->query("SELECT type FROM bugreport WHERE id = '$id'"), 0, 'type'); 129 130 if (strlen($msg) > 4096){ 131 $sql->close(); 132 redirect("motd.php?error=2"); 133 } 134 135 $by = split("<br />", $by, 2); 136 $by = "{$by[0]}<br />".date("m/d/y H:i:s")." Edited by: $user_name"; 137 138 $sql->query("UPDATE bugreport SET type = '$by', content = '$msg' WHERE id = '$id'"); 139 $sql->close(); 63 140 64 141 redirect("index.php"); … … 74 151 if (empty($_GET['id'])) redirect("index.php"); 75 152 76 $ mysql = new MySQL;77 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);78 79 $id = $ mysql->quote_smart($_GET['id']);80 81 $query = $ mysql->query("DELETE FROM bugreport WHERE id ='$id'");82 83 $ mysql->close();153 $sql = new SQL; 154 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 155 156 $id = $sql->quote_smart($_GET['id']); 157 158 $query = $sql->query("DELETE FROM bugreport WHERE id ='$id'"); 159 160 $sql->close(); 84 161 redirect("index.php"); 85 162 } … … 116 193 do_add_motd(); 117 194 break; 195 case "edit_motd": 196 edit_motd(); 197 break; 198 case "do_edit_motd": 199 do_edit_motd(); 200 break; 118 201 default: 119 202 add_motd(); -
minimanager/pomm/pomm.css
r5 r19 7 7 background-color: #000000; 8 8 } 9 img { 10 border: 0px; 11 padding: 0px; 12 } 9 13 #world_map { 10 14 position: absolute; … … 13 17 left: 50%; 14 18 margin-left: -392px; 15 background-image: url( img/map.jpg);19 background-image: url(../img/map.jpg); 16 20 z-index: 10; 17 21 } … … 60 64 text-align: center; 61 65 padding: 3px; 62 filter:alpha(opacity=7 0);63 -moz-opacity:.7 0;64 opacity:0.7 0;66 filter:alpha(opacity=75); 67 -moz-opacity:.75; 68 opacity:0.75; 65 69 } 66 70 .tip_text td { -
minimanager/pomm/pomm.php
r5 r19 54 54 while (i<data.length) { 55 55 if (data[i].race==2 || data[i].race==5 || data[i].race==6 || data[i].race==8 || data[i].race==10) 56 {point=" img/h_point.gif";}57 else {point=" img/a_point.gif";}58 text=text+'<img src="'+point+'" style="position: absolute; border: 0px; left: '+data[i].x+'px; top: '+data[i].y+'px;" onmousemove="toolTip(\'<spawn>'+data[i].name+'</spawn><br />'+data[i].zone+'<br /><img src=\\\'img/'+data[i].race+'-'+data[i].gender+'.gif\\\' style=\\\'float:center\\\' border=0 width=18 height=18 /><img src=\\\'img/'+data[i].cl+'.gif\\\' style=\\\'float:center\\\' border=0 width=18 height=18 /><br />'+race_name[data[i].race]+'<br />'+class_name[data[i].cl]+'<br />'+data[i].level+'\',\'tip_text\');"onmouseout="toolTip();"\>';56 {point="../img/h_point.gif";} 57 else {point="../img/a_point.gif";} 58 text=text+'<img src="'+point+'" style="position: absolute; left: '+data[i].x+'px; top: '+data[i].y+'px;" onmousemove="toolTip(\'<spawn>'+data[i].name+'</spawn><br />'+data[i].zone+'<br /><img src=\\\'../img/c_icons/'+data[i].race+'-'+data[i].gender+'.gif\\\' style=\\\'float:center\\\' /><img src=\\\'../img/c_icons/'+data[i].cl+'.gif\\\' style=\\\'float:center\\\' /><br />'+race_name[data[i].race]+'<br />'+class_name[data[i].cl]+'<br />'+data[i].level+'\',\'tip_text\');"onmouseout="toolTip();"/>'; 59 59 i++; 60 60 } -
minimanager/pomm/pomm_lib.php
r5 r19 11 11 require_once("../scripts/config.php"); 12 12 require_once("../scripts/global_lib.php"); 13 require_once("../scripts/ mysql.php");13 require_once("../scripts/db_layer.php"); 14 14 require_once("../scripts/get_lib.php"); 15 15 … … 27 27 $user_id = $_SESSION['user_id']; 28 28 29 function get_player_position($x,$y,$map) { 30 global $zone_530; 31 29 function get_player_position($x,$y,$map,$zone) { 32 30 $xpos = round(($x / 1000)*17.7,0); 33 31 $ypos = round(($y / 1000)*17.7,0); … … 43 41 44 42 case 530: 45 $zone_id = 0; 46 for ($i=0; $i < count($zone_530); $i++) 47 if (($zone_530[$i][2] < $x) && ($zone_530[$i][3] > $x) && ($zone_530[$i][1] < $y) && ($zone_530[$i][0] > $y)){ 48 $zone_id = $zone_530[$i][5]; 49 break; 50 } 51 if (($zone_id == 3525) || ($zone_id == 3557) || ($zone_id == 3524)){ 43 if (($zone == 3525) || ($zone == 3557) || ($zone == 3524)){ 52 44 $pos['x'] = -162 - $ypos; 53 45 $pos['y'] = 75 - $xpos; 54 } else if (($zone _id == 3487) || ($zone_id == 3433) || ($zone_id== 3430)){46 } else if (($zone == 3487) || ($zone == 3433) || ($zone == 3430)){ 55 47 $pos['x'] = 528 - $ypos; 56 48 $pos['y'] = 218 - $xpos; -
minimanager/pomm/pomm_run.php
r5 r19 14 14 $JsHttpRequest =& new JsHttpRequest($site_encoding); 15 15 16 $ mysql = new MySQL;17 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);16 $sql = new SQL; 17 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 18 18 19 19 if( !$user_lvl && !$server[$realm_id]['both_factions']){ 20 $result = $ mysql->query("SELECT race FROM `character` WHERE account = '$user_id' AND totaltime = (SELECT MAX(totaltime) FROM `character` WHERE account = '$user_id') LIMIT 1");21 if ($ mysql->num_rows($result)){22 $order_side = (in_array($ mysql->result($result, 0, 'race'),array(2,5,6,8,10))) ?20 $result = $sql->query("SELECT race FROM `character` WHERE account = '$user_id' AND totaltime = (SELECT MAX(totaltime) FROM `character` WHERE account = '$user_id') LIMIT 1"); 21 if ($sql->num_rows($result)){ 22 $order_side = (in_array($sql->result($result, 0, 'race'),array(2,5,6,8,10))) ? 23 23 " AND race IN (2,5,6,8,10) " : " AND race IN (1,3,4,7,11) "; 24 24 } else $order_side = ""; 25 25 } else $order_side = ""; 26 26 27 $result = $ mysql->query("SELECT name,race,class,position_x,position_y,map,SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 35), ' ', -1),28 SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 37), ' ', -1) 27 $result = $sql->query("SELECT name,race,class,position_x,position_y,map,SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 35), ' ', -1), 28 SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 37), ' ', -1),zone 29 29 FROM `character` WHERE `online`= 1 $order_side"); 30 30 31 31 $i = 0; 32 while($char = $ mysql->fetch_row($result)){32 while($char = $sql->fetch_row($result)){ 33 33 $char_gender = str_pad(dechex($char[7]),8, 0, STR_PAD_LEFT); 34 34 35 $pos = get_player_position($char[3],$char[4],$char[5] );35 $pos = get_player_position($char[3],$char[4],$char[5],$char[8]); 36 36 $arr[$i]['x'] = $pos['x']; 37 37 $arr[$i]['y'] = $pos['y']; 38 38 $arr[$i]['name'] = $char[0]; 39 if (($char[5] == 1)||($char[5] == 0)||($char[5] == 530)) $arr[$i]['zone'] = ereg_replace("'", "`", get_zone_name($char[ 5], $char[3], $char[4]));39 if (($char[5] == 1)||($char[5] == 0)||($char[5] == 530)) $arr[$i]['zone'] = ereg_replace("'", "`", get_zone_name($char[8])); 40 40 else $arr[$i]['zone'] = ereg_replace("'", "`", get_map_name($char[5])); 41 41 $arr[$i]['cl'] = $char[2]; … … 46 46 } 47 47 48 $ mysql->close();48 $sql->close(); 49 49 50 50 $_RESULT =$arr; -
minimanager/pomm_public/pomm.css
r5 r19 7 7 background-color: #000000; 8 8 } 9 img { 10 border: 0px; 11 padding: 0px; 12 } 9 13 #world_map { 10 14 position: absolute; … … 13 17 left: 50%; 14 18 margin-left: -392px; 15 background-image: url( img/map.jpg);19 background-image: url(../img/map.jpg); 16 20 z-index: 10; 17 21 } … … 60 64 text-align: center; 61 65 padding: 3px; 62 filter:alpha(opacity=7 0);63 -moz-opacity:.7 0;64 opacity:0.7 0;66 filter:alpha(opacity=75); 67 -moz-opacity:.75; 68 opacity:0.75; 65 69 } 66 70 .tip_text td { -
minimanager/pomm_public/pomm.php
r5 r19 54 54 while (i<data.length) { 55 55 if (data[i].race==2 || data[i].race==5 || data[i].race==6 || data[i].race==8 || data[i].race==10) 56 {point=" img/h_point.gif";}57 else {point=" img/a_point.gif";}58 text=text+'<img src="'+point+'" style="position: absolute; border: 0px; left: '+data[i].x+'px; top: '+data[i].y+'px;" onmousemove="toolTip(\'<spawn>'+data[i].name+'</spawn><br />'+data[i].zone+'<br /><img src=\\\'img/'+data[i].race+'-'+data[i].gender+'.gif\\\' style=\\\'float:center\\\' border=0 width=18 height=18 /><img src=\\\'img/'+data[i].cl+'.gif\\\' style=\\\'float:center\\\' border=0 width=18 height=18 /><br />'+race_name[data[i].race]+'<br />'+class_name[data[i].cl]+'<br />'+data[i].level+'\',\'tip_text\');"onmouseout="toolTip();"\>';56 {point="../img/h_point.gif";} 57 else {point="../img/a_point.gif";} 58 text=text+'<img src="'+point+'" style="position: absolute; left: '+data[i].x+'px; top: '+data[i].y+'px;" onmousemove="toolTip(\'<spawn>'+data[i].name+'</spawn><br />'+data[i].zone+'<br /><img src=\\\'../img/c_icons/'+data[i].race+'-'+data[i].gender+'.gif\\\' style=\\\'float:center\\\' /><img src=\\\'../img/c_icons/'+data[i].cl+'.gif\\\' style=\\\'float:center\\\' /><br />'+race_name[data[i].race]+'<br />'+class_name[data[i].cl]+'<br />'+data[i].level+'\',\'tip_text\');"onmouseout="toolTip();"/>'; 59 59 i++; 60 60 } -
minimanager/pomm_public/pomm_lib.php
r5 r19 11 11 require_once("../scripts/config.php"); 12 12 require_once("../scripts/global_lib.php"); 13 require_once("../scripts/ mysql.php");13 require_once("../scripts/db_layer.php"); 14 14 require_once("../scripts/get_lib.php"); 15 15 … … 23 23 24 24 if ( !ini_get('session.auto_start') ) session_start(); 25 $realm_id = 1; //$_SESSION['realm_id']; 26 $user_lvl = 0; //$_SESSION['user_lvl']; 27 $user_id = 1; //$_SESSION['user_id']; 28 29 function get_player_position($x,$y,$map) { 30 global $zone_530; 31 25 $realm_id = 1; // $_SESSION['realm_id']; 26 $user_lvl = 0; // $_SESSION['user_lvl']; 27 $user_id = 1; // $_SESSION['user_id']; 28 29 function get_player_position($x,$y,$map,$zone) { 32 30 $xpos = round(($x / 1000)*17.7,0); 33 31 $ypos = round(($y / 1000)*17.7,0); … … 43 41 44 42 case 530: 45 $zone_id = 0; 46 for ($i=0; $i < count($zone_530); $i++) 47 if (($zone_530[$i][2] < $x) && ($zone_530[$i][3] > $x) && ($zone_530[$i][1] < $y) && ($zone_530[$i][0] > $y)){ 48 $zone_id = $zone_530[$i][5]; 49 break; 50 } 51 if (($zone_id == 3525) || ($zone_id == 3557) || ($zone_id == 3524)){ 43 if (($zone == 3525) || ($zone == 3557) || ($zone == 3524)){ 52 44 $pos['x'] = -162 - $ypos; 53 45 $pos['y'] = 75 - $xpos; 54 } else if (($zone _id == 3487) || ($zone_id == 3433) || ($zone_id== 3430)){46 } else if (($zone == 3487) || ($zone == 3433) || ($zone == 3430)){ 55 47 $pos['x'] = 528 - $ypos; 56 48 $pos['y'] = 218 - $xpos; -
minimanager/pomm_public/pomm_run.php
r5 r19 14 14 $JsHttpRequest =& new JsHttpRequest($site_encoding); 15 15 16 $ mysql = new MySQL;17 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);16 $sql = new SQL; 17 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 18 18 19 19 if( !$user_lvl && !$server[$realm_id]['both_factions']){ 20 $result = $ mysql->query("SELECT race FROM `character` WHERE account = '$user_id' AND totaltime = (SELECT MAX(totaltime) FROM `character` WHERE account = '$user_id') LIMIT 1");21 if ($ mysql->num_rows($result)){22 $order_side = (in_array($ mysql->result($result, 0, 'race'),array(2,5,6,8,10))) ?20 $result = $sql->query("SELECT race FROM `character` WHERE account = '$user_id' AND totaltime = (SELECT MAX(totaltime) FROM `character` WHERE account = '$user_id') LIMIT 1"); 21 if ($sql->num_rows($result)){ 22 $order_side = (in_array($sql->result($result, 0, 'race'),array(2,5,6,8,10))) ? 23 23 " AND race IN (2,5,6,8,10) " : " AND race IN (1,3,4,7,11) "; 24 24 } else $order_side = ""; 25 25 } else $order_side = ""; 26 26 27 $result = $ mysql->query("SELECT name,race,class,position_x,position_y,map,SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 35), ' ', -1),28 SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 37), ' ', -1) 27 $result = $sql->query("SELECT name,race,class,position_x,position_y,map,SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 35), ' ', -1), 28 SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 37), ' ', -1),zone 29 29 FROM `character` WHERE `online`= 1 $order_side"); 30 30 31 31 $i = 0; 32 while($char = $ mysql->fetch_row($result)){32 while($char = $sql->fetch_row($result)){ 33 33 $char_gender = str_pad(dechex($char[7]),8, 0, STR_PAD_LEFT); 34 34 35 $pos = get_player_position($char[3],$char[4],$char[5] );35 $pos = get_player_position($char[3],$char[4],$char[5],$char[8]); 36 36 $arr[$i]['x'] = $pos['x']; 37 37 $arr[$i]['y'] = $pos['y']; 38 38 $arr[$i]['name'] = $char[0]; 39 if (($char[5] == 1)||($char[5] == 0)||($char[5] == 530)) $arr[$i]['zone'] = ereg_replace("'", "`", get_zone_name($char[ 5], $char[3], $char[4]));39 if (($char[5] == 1)||($char[5] == 0)||($char[5] == 530)) $arr[$i]['zone'] = ereg_replace("'", "`", get_zone_name($char[8])); 40 40 else $arr[$i]['zone'] = ereg_replace("'", "`", get_map_name($char[5])); 41 41 $arr[$i]['cl'] = $char[2]; … … 46 46 } 47 47 48 $ mysql->close();48 $sql->close(); 49 49 50 50 $_RESULT =$arr; -
minimanager/realm.php
r5 r19 34 34 global $lang_global, $lang_realm, $output, $realm_db, $user_name, $server, $realm_id, $icon_type, $timezone_type; 35 35 36 $ mysql = new MySQL;37 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);38 39 $order_by = (isset($_GET['order_by'])) ? $ mysql->quote_smart($_GET['order_by']) : "name";40 $dir = (isset($_GET['dir'])) ? $ mysql->quote_smart($_GET['dir']) : 1;36 $sql = new SQL; 37 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 38 39 $order_by = (isset($_GET['order_by'])) ? $sql->quote_smart($_GET['order_by']) : "name"; 40 $dir = (isset($_GET['dir'])) ? $sql->quote_smart($_GET['dir']) : 1; 41 41 $order_dir = ($dir) ? "ASC" : "DESC"; 42 42 $dir = ($dir) ? 0 : 1; 43 43 44 $result = $mysql->query("SELECT id,name,address,port,icon,color,timezone FROM `realmlist` ORDER BY $order_by $order_dir"); 45 $total_realms = $mysql->num_rows($result); 44 $result = $sql->query("SELECT `realmlist`.id AS rid,name,address,port,icon,color,timezone, 45 (SELECT SUM(numchars) FROM realmcharacters WHERE realmid = rid) 46 FROM `realmlist` ORDER BY $order_by $order_dir"); 47 $total_realms = $sql->num_rows($result); 46 48 47 49 $output .= "<center><table class=\"top_hidden\"> … … 54 56 <table class=\"lined\"> 55 57 <tr> 56 <t d width=\"5%\" class=\"head\">{$lang_global['delete']}</td>57 <t d width=\"40%\" class=\"head\"><a href=\"realm.php?order_by=name&dir=$dir\" class=\"head_link\">{$lang_realm['name']}</a></td>58 <t d width=\"5%\" class=\"head\">{$lang_realm['online']}</td>59 <t d width=\"10%\" class=\"head\">{$lang_realm['tot_char']}</td>60 <t d width=\"10%\" class=\"head\"><a href=\"realm.php?order_by=address&dir=$dir\" class=\"head_link\">{$lang_realm['address']}</a></td>61 <t d width=\"5%\" class=\"head\"><a href=\"realm.php?order_by=port&dir=$dir\" class=\"head_link\">{$lang_realm['port']}</a></td>62 <t d width=\"8%\" class=\"head\"><a href=\"realm.php?order_by=icon&dir=$dir\" class=\"head_link\">{$lang_realm['icon']}</a></td>63 <t d width=\"5%\" class=\"head\"><a href=\"realm.php?order_by=color&dir=$dir\" class=\"head_link\">{$lang_realm['color']}</a></td>64 <t d width=\"7%\" class=\"head\"><a href=\"realm.php?order_by=timezone&dir=$dir\" class=\"head_link\">{$lang_realm['timezone']}</a></td>58 <th width=\"5%\">{$lang_global['delete_short']}</th> 59 <th width=\"40%\"><a href=\"realm.php?order_by=name&dir=$dir\">".($order_by=='name' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_realm['name']}</a></th> 60 <th width=\"5%\">{$lang_realm['online']}</th> 61 <th width=\"10%\">{$lang_realm['tot_char']}</th> 62 <th width=\"10%\"><a href=\"realm.php?order_by=address&dir=$dir\">".($order_by=='address' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_realm['address']}</a></th> 63 <th width=\"5%\"><a href=\"realm.php?order_by=port&dir=$dir\">".($order_by=='port' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_realm['port']}</a></th> 64 <th width=\"8%\"><a href=\"realm.php?order_by=icon&dir=$dir\">".($order_by=='icon' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_realm['icon']}</a></th> 65 <th width=\"5%\"><a href=\"realm.php?order_by=color&dir=$dir\">".($order_by=='color' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_realm['color']}</a></th> 66 <th width=\"7%\"><a href=\"realm.php?order_by=timezone&dir=$dir\">".($order_by=='timezone' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_realm['timezone']}</a></th> 65 67 </tr>"; 66 68 67 while ($realm = $ mysql->fetch_row($result)){68 $output .= "<tr><td><a href=\"realm.php?action=del_realm&id=$realm[0]\"><img src=\"img/ x.ico\" class=\"no_border\" alt=\"\" /></a></td>";69 while ($realm = $sql->fetch_row($result)){ 70 $output .= "<tr><td><a href=\"realm.php?action=del_realm&id=$realm[0]\"><img src=\"img/aff_cross.png\" alt=\"\" /></a></td>"; 69 71 if (isset($server[$realm[0]]['game_port'])) { 70 72 $output .= "<td><a href=\"realm.php?action=edit_realm&id=$realm[0]\">$realm[1]</a></td>"; 71 if (test_port($server[$realm[0]]['addr'],$server[$realm[0]]['game_port'])) $output .= "<td><img src=\"img/up.gif\" class=\"no_border\"alt=\"\" /></td>";72 else $output .= "<td><img src=\"img/down.gif\" class=\"no_border\"alt=\"\" /></td>";73 if (test_port($server[$realm[0]]['addr'],$server[$realm[0]]['game_port'])) $output .= "<td><img src=\"img/up.gif\" alt=\"\" /></td>"; 74 else $output .= "<td><img src=\"img/down.gif\" alt=\"\" /></td>"; 73 75 } else $output .= "<td><a href=\"realm.php?action=edit_realm&id=$realm[0]\">$realm[1] (Not Configured yet)</a></td> 74 76 <td>***</td>"; 75 77 76 $query_1 = $mysql->query("SELECT SUM(numchars) FROM realmcharacters WHERE realmid = '$realm[0]'"); 77 78 $output .= "<td>".$mysql->result($query_1, 0)."</td> 78 $output .= "<td>$realm[7]</td> 79 79 <td>$realm[2]</td> 80 80 <td>$realm[3]</td> … … 86 86 $output .= "</table><br /></center>"; 87 87 88 $ mysql->close();88 $sql->close(); 89 89 } 90 90 … … 99 99 if(!isset($_GET['id'])) redirect("realm.php?error=1"); 100 100 101 $mysql = new MySQL; 102 $mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 103 104 $id = $mysql->quote_smart($_GET['id']); 105 106 $result = $mysql->query("SELECT id,name,address,port,icon,color,timezone FROM realmlist WHERE id ='$id'"); 107 108 if ($realm = $mysql->fetch_row($result)) { 101 $sql = new SQL; 102 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 103 104 $id = $sql->quote_smart($_GET['id']); 105 106 $result = $sql->query("SELECT realmlist.id AS rid,name,address,port,icon,color,timezone, 107 (SELECT SUM(numchars) FROM realmcharacters WHERE realmid = rid) 108 FROM realmlist WHERE id ='$id'"); 109 110 if ($realm = $sql->fetch_row($result)) { 109 111 $output .= "<center> 110 112 <fieldset style=\"width: 550px;\"> … … 159 161 $output .= "</tr></td> 160 162 <tr><td>"; 161 $result = $mysql->query("SELECT SUM(numchars) FROM realmcharacters WHERE realmid = '$realm[0]'"); 162 $output .= "<tr><td>{$lang_realm['tot_char']}</td><td>".$mysql->result($result, 0)."</td></tr>"; 163 $output .= "<tr><td>{$lang_realm['tot_char']}</td><td>$realm[7]</td></tr>"; 163 164 } else $output .= "<tr><td colspan=\"2\">{$lang_realm['conf_from_file']}</td><td>"; 164 165 … … 177 178 } else error($lang_global['err_no_result']); 178 179 179 $ mysql->close();180 $sql->close(); 180 181 } 181 182 … … 192 193 } 193 194 194 $mysql = new MySQL; 195 $mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 196 197 $id = $mysql->quote_smart($_GET['id']); 198 $new_name = $mysql->quote_smart($_GET['new_name']); 199 $new_address = $mysql->quote_smart($_GET['new_address']); 200 $new_port = $mysql->quote_smart($_GET['new_port']); 201 $new_icon = $mysql->quote_smart($_GET['new_icon']); 202 $new_color = $mysql->quote_smart($_GET['new_color']); 203 $new_timezone = $mysql->quote_smart($_GET['new_timezone']); 204 205 $sql = "UPDATE realmlist SET name='$new_name', address ='$new_address' , port ='$new_port', icon ='$new_icon', color ='$new_color', timezone ='$new_timezone' WHERE id = '$id'"; 206 $query = $mysql->query($sql); 207 208 if ($mysql->affected_rows()) { 209 $mysql->close(); 195 $sql = new SQL; 196 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 197 198 $id = $sql->quote_smart($_GET['id']); 199 $new_name = $sql->quote_smart($_GET['new_name']); 200 $new_address = $sql->quote_smart($_GET['new_address']); 201 $new_port = $sql->quote_smart($_GET['new_port']); 202 $new_icon = $sql->quote_smart($_GET['new_icon']); 203 $new_color = $sql->quote_smart($_GET['new_color']); 204 $new_timezone = $sql->quote_smart($_GET['new_timezone']); 205 206 $query = $sql->query("UPDATE realmlist SET name='$new_name', address ='$new_address' , port ='$new_port', icon ='$new_icon', color ='$new_color', timezone ='$new_timezone' WHERE id = '$id'"); 207 208 if ($sql->affected_rows()) { 209 $sql->close(); 210 210 redirect("realm.php?error=3"); 211 211 } else { 212 $ mysql->close();212 $sql->close(); 213 213 redirect("realm.php?action=edit_realm&id=$id&error=4"); 214 214 } … … 226 226 227 227 $output .= "<center><h1><font class=\"error\">{$lang_global['are_you_sure']}</font></h1><br />"; 228 $output .= "<font class=\"bold\">{$lang_realm['realm_id']}: $id 228 $output .= "<font class=\"bold\">{$lang_realm['realm_id']}: $id<br />{$lang_global['will_be_erased']}</font><br /><br />"; 229 229 $output .= "<table class=\"hidden\"> 230 230 <tr> … … 245 245 global $realm_db; 246 246 247 $ mysql = new MySQL;248 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);249 250 if(isset($_GET['id'])) $id = $ mysql->quote_smart($_GET['id']);247 $sql = new SQL; 248 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 249 250 if(isset($_GET['id'])) $id = $sql->quote_smart($_GET['id']); 251 251 else redirect("realm.php?error=1"); 252 252 253 $ mysql->query("DELETE FROM realmlist WHERE id = '$id'");254 255 if ($ mysql->affected_rows()) {256 $ mysql->close();253 $sql->query("DELETE FROM realmlist WHERE id = '$id'"); 254 255 if ($sql->affected_rows()) { 256 $sql->close(); 257 257 redirect("realm.php"); 258 258 } else { 259 $ mysql->close();259 $sql->close(); 260 260 redirect("realm.php?error=2"); 261 261 } … … 270 270 global $realm_db; 271 271 272 $ mysql = new MySQL;273 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);274 275 $result = $ mysql->query("INSERT INTO realmlist (id, name, address, port, icon, color, timezone)272 $sql = new SQL; 273 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 274 275 $result = $sql->query("INSERT INTO realmlist (id, name, address, port, icon, color, timezone) 276 276 VALUES (NULL,'MANGOS','127.0.0.1', 8085 ,0 ,0 ,1)"); 277 277 278 $ mysql->close();278 $sql->close(); 279 279 280 280 if ($result) redirect("realm.php"); … … 290 290 global $realm_db; 291 291 292 $ mysql = new MySQL;293 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);294 295 $id = (isset($_GET['id'])) ? $ mysql->quote_smart($_GET['id']) : 1;296 297 $result = $ mysql->query("SELECT id FROM realmlist WHERE id ='$id'");298 if ($ mysql->num_rows($result)) $_SESSION['realm_id'] = $id;299 $ mysql->close();292 $sql = new SQL; 293 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 294 295 $id = (isset($_GET['id'])) ? $sql->quote_smart($_GET['id']) : 1; 296 297 $result = $sql->query("SELECT id FROM realmlist WHERE id ='$id'"); 298 if ($sql->num_rows($result)) $_SESSION['realm_id'] = $id; 299 $sql->close(); 300 300 301 301 $url = (isset($_GET['url'])) ? $_GET['url'] : "index.php"; -
minimanager/register.php
r5 r19 10 10 require_once("header.php"); 11 11 12 13 12 //##################################################################################################### 14 13 // DO REGISTER … … 18 17 $send_mail_on_creation, $create_acc_locked, $from_mail, $mailer_type, $smtp_cfg, $title; 19 18 20 if (empty($_COOKIE['terms']) || ($_COOKIE['terms']) != 'i_do') redirect("register.php?err=13");21 22 //make sure all got by post23 19 if ( empty($_POST['pass']) || empty($_POST['email']) || empty($_POST['username']) ) { 24 20 redirect("register.php?err=1"); … … 54 50 } 55 51 56 $ mysql = new MySQL;57 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);58 59 $user_name = $ mysql->quote_smart(trim($_POST['username']));60 $pass = $ mysql->quote_smart($_POST['pass']);61 $pass1 = $ mysql->quote_smart($_POST['pass1']);52 $sql = new SQL; 53 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 54 55 $user_name = $sql->quote_smart(trim($_POST['username'])); 56 $pass = $sql->quote_smart($_POST['pass']); 57 $pass1 = $sql->quote_smart($_POST['pass1']); 62 58 63 59 //make sure username/pass at least 4 chars long and less than max 64 60 if ((strlen($user_name) < 4) || (strlen($user_name) > 15)){ 65 $ mysql->close();61 $sql->close(); 66 62 redirect("register.php?err=5"); 67 63 } … … 71 67 //make sure it doesnt contain non english chars. 72 68 if (!alphabetic($user_name)) { 73 $ mysql->close();69 $sql->close(); 74 70 redirect("register.php?err=6"); 75 71 } 76 72 77 73 //make sure the mail is valid mail format 78 $mail = $ mysql->quote_smart(trim($_POST['email']));74 $mail = $sql->quote_smart(trim($_POST['email'])); 79 75 if ((!is_email($mail))||(strlen($mail) > 224)) { 80 $ mysql->close();76 $sql->close(); 81 77 redirect("register.php?err=7"); 82 78 } … … 84 80 $per_ip = ($limit_acc_per_ip) ? "OR last_ip='$last_ip'" : ""; 85 81 86 $result = $ mysql->query("SELECT ip FROM ip_banned WHERE ip = '$last_ip'");82 $result = $sql->query("SELECT ip FROM ip_banned WHERE ip = '$last_ip'"); 87 83 //IP is in ban list 88 if ($ mysql->num_rows($result)){89 $ mysql->close();84 if ($sql->num_rows($result)){ 85 $sql->close(); 90 86 redirect("register.php?err=8&usr=$last_ip"); 91 87 } 92 88 93 $result = $ mysql->query("SELECT username,email FROM account WHERE username='$user_name' OR email='$mail' $per_ip");89 $result = $sql->query("SELECT username,email FROM account WHERE username='$user_name' OR email='$mail' $per_ip"); 94 90 95 91 //there is already someone with same user/mail 96 if ($ mysql->num_rows($result)){97 $ mysql->close();92 if ($sql->num_rows($result)){ 93 $sql->close(); 98 94 redirect("register.php?err=3&usr=$user_name"); 99 95 } else { 100 $tbc = (isset($_POST['tbc'])) ? $ mysql->quote_smart($_POST['tbc']) : 0;101 102 $result = $ mysql->query("INSERT INTO account (username,I,gmlevel,email, joindate,last_ip,failed_logins,locked,last_login,online,tbc)96 $tbc = (isset($_POST['tbc'])) ? $sql->quote_smart($_POST['tbc']) : 0; 97 98 $result = $sql->query("INSERT INTO account (username,I,gmlevel,email, joindate,last_ip,failed_logins,locked,last_login,online,tbc) 103 99 VALUES ('$user_name','$pass',0,'$mail',current_date(),'$last_ip',0,$create_acc_locked,NULL,0,$tbc)"); 104 $ mysql->close();100 $sql->close(); 105 101 106 102 setcookie ("terms", "", time() - 3600); 107 103 108 104 if ($send_mail_on_creation){ 109 require_once("scripts/ class.phpmailer.php");105 require_once("scripts/mailer/class.phpmailer.php"); 110 106 $mailer = new PHPMailer(); 111 107 $mailer->Mailer = $mailer_type; … … 166 162 } 167 163 } 164 answerbox.btn_ok='{$lang_register['i_agree']}'; 165 answerbox.btn_cancel='{$lang_register['i_dont_agree']}'; 166 answerbox.btn_icon=''; 168 167 </script> 169 170 168 <fieldset style=\"width: 550px;\"> 171 169 <legend>{$lang_register['create_acc']}</legend> … … 205 203 <tr><td colspan=\"2\"><hr /></td></tr> 206 204 <tr> 207 <td colspan=\"2\">{$lang_register['read_terms']} : <a href=\"javascript:popUp('terms.php?action=terms')\">{$lang_register['terms']}</a></td>205 <td colspan=\"2\">{$lang_register['read_terms']}.</td> 208 206 </tr> 209 207 <tr><td colspan=\"2\"><hr / ></td></tr> 210 208 <tr><td>"; 211 makebutton($lang_register['create_acc_button'], "javascript:do_submit_data()",150); 209 210 $terms = "<textarea rows=\'18\' cols=\'80\' readonly=\'readonly\'>"; 211 $fp = fopen("mail_templates/terms.tpl", 'r') or die (error("Couldn't Open terms.tpl File!")); 212 while (!feof($fp)) $terms .= fgets($fp, 1024); 213 fclose($fp); 214 $terms .= "</textarea>"; 215 216 makebutton($lang_register['create_acc_button'], "javascript:answerBox('{$lang_register['terms']}<br />$terms', 'javascript:do_submit_data()')",150); 212 217 $output .= "</td><td>"; 213 makebutton($lang_global['back'], " javascript:window.history.back()", 328);218 makebutton($lang_global['back'], "login.php", 328); 214 219 $output .= "</td></tr> 215 220 </table> … … 258 263 if ( empty($_POST['username']) || empty($_POST['email']) ) redirect("register.php?action=pass_recovery&err=1"); 259 264 260 $ mysql = new MySQL;261 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);262 263 $user_name = $ mysql->quote_smart(trim($_POST['username']));264 $email_addr = $ mysql->quote_smart($_POST['email']);265 266 $result = $ mysql->query("SELECT I FROM account WHERE username = '$user_name' AND email = '$email_addr'");267 268 if ($ mysql->num_rows($result) == 1){269 270 require_once("scripts/ class.phpmailer.php");265 $sql = new SQL; 266 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 267 268 $user_name = $sql->quote_smart(trim($_POST['username'])); 269 $email_addr = $sql->quote_smart($_POST['email']); 270 271 $result = $sql->query("SELECT I FROM account WHERE username = '$user_name' AND email = '$email_addr'"); 272 273 if ($sql->num_rows($result) == 1){ 274 275 require_once("scripts/mailer/class.phpmailer.php"); 271 276 $mail = new PHPMailer(); 272 277 $mail->Mailer = $mailer_type; … … 292 297 $body = str_replace("<password>", substr(sha1(strtoupper($user_name)),0,7), $body); 293 298 $body = str_replace("<activate_link>", 294 $_SERVER['HTTP_HOST']."/register.php?action=do_pass_activate&h=".$ mysql->result($result, 0, 'I')."&p=".substr(sha1(strtoupper($user_name)),0,7), $body);299 $_SERVER['HTTP_HOST']."/register.php?action=do_pass_activate&h=".$sql->result($result, 0, 'I')."&p=".substr(sha1(strtoupper($user_name)),0,7), $body); 295 300 $body = str_replace("<base_url>", $_SERVER['HTTP_HOST'], $body); 296 301 … … 323 328 if ( empty($_GET['h']) || empty($_GET['p']) ) redirect("register.php?action=pass_recovery&err=1"); 324 329 325 $ mysql = new MySQL;326 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);327 328 $pass = $ mysql->quote_smart(trim($_GET['p']));329 $hash = $ mysql->quote_smart($_GET['h']);330 331 $result = $ mysql->query("SELECT id,username FROM account WHERE I = '$hash'");332 333 if ($ mysql->num_rows($result) == 1){334 $username = $ mysql->result($result, 0, 'username');335 $id = $ mysql->result($result, 0, 'id');336 if (substr(sha1(strtoupper($ mysql->result($result, 0, 'username'))),0,7) == $pass){337 $ mysql->query("UPDATE account SET I=SHA1(CONCAT(UPPER('$username'),':',UPPER('$pass'))) WHERE id = '$id'");330 $sql = new SQL; 331 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 332 333 $pass = $sql->quote_smart(trim($_GET['p'])); 334 $hash = $sql->quote_smart($_GET['h']); 335 336 $result = $sql->query("SELECT id,username FROM account WHERE I = '$hash'"); 337 338 if ($sql->num_rows($result) == 1){ 339 $username = $sql->result($result, 0, 'username'); 340 $id = $sql->result($result, 0, 'id'); 341 if (substr(sha1(strtoupper($sql->result($result, 0, 'username'))),0,7) == $pass){ 342 $sql->query("UPDATE account SET I=SHA1(CONCAT(UPPER('$username'),':',UPPER('$pass'))) WHERE id = '$id'"); 338 343 redirect("login.php"); 339 344 } … … 348 353 // MAIN 349 354 //##################################################################################################### 350 $output .= "<script type=\"text/javascript\">351 function popUp(URL) {352 m_window = window.open(URL, 'm_window', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=700,height=400');353 m_window.moveTo(100,100);354 }355 </script>";356 357 355 $err = (isset($_GET['err'])) ? $_GET['err'] : NULL; 358 356 … … 398 396 $output .= "<h1><font class=\"error\">{$lang_register['recovery_mail_sent']}</font></h1>"; 399 397 break; 400 case 13:401 $output .= "<h1><font class=\"error\">{$lang_register['error_terms']}</font></h1>";402 break;403 398 default: 404 399 $output .= "<h1><font class=\"error\">{$lang_register['fill_all_fields']}</font></h1>"; -
minimanager/repair.php
r5 r19 35 35 $output .="<script type=\"text/javascript\" src=\"js/check.js\"></script>"; 36 36 37 $ mysql = new MySQL;38 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);37 $sql = new SQL; 38 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 39 39 40 $result = $ mysql->query("SHOW TABLES FROM {$realm_db['name']}");40 $result = $sql->query("SHOW TABLES FROM {$realm_db['name']}"); 41 41 42 42 $output .= "<table class=\"lined\" style=\"width: 550px;\"> 43 43 <tr> 44 <t d width=\"5%\" class=\"head\"><input name=\"allbox\" type=\"checkbox\" value=\"Check All\" onclick=\"CheckAll(document.form);\" /></td>45 <t d width=\"25%\" class=\"head\">{$lang_repair['table_name']}</td>46 <t d width=\"35%\" class=\"head\">{$lang_repair['status']}</td>47 <t d width=\"15%\" class=\"head\">{$lang_repair['num_records']}</td>44 <th width=\"5%\"><input name=\"allbox\" type=\"checkbox\" value=\"Check All\" onclick=\"CheckAll(document.form);\" /></th> 45 <th width=\"25%\">{$lang_repair['table_name']}</th> 46 <th width=\"35%\">{$lang_repair['status']}</th> 47 <th width=\"15%\">{$lang_repair['num_records']}</th> 48 48 </tr> 49 49 <tr class=\"large_bold\"><td colspan=\"3\" class=\"hidden\" align=\"left\">{$realm_db['name']} {$lang_repair['tables']} :</td></tr>"; 50 50 51 while ($table = $ mysql->fetch_row($result)){52 $result1 = $ mysql->query("SELECT count(*) FROM `$table[0]`");53 $result2 = $ mysql->query("CHECK TABLE `$table[0]` CHANGED");51 while ($table = $sql->fetch_row($result)){ 52 $result1 = $sql->query("SELECT count(*) FROM `$table[0]`"); 53 $result2 = $sql->query("CHECK TABLE `$table[0]` CHANGED"); 54 54 55 55 $output .= "<tr> 56 56 <td><input type=\"checkbox\" name=\"check[]\" value=\"realm~0~{$realm_db['name']}~$table[0]\" onclick=\"CheckCheckAll(document.form);\" /></td> 57 57 <td>$table[0]</td> 58 <td>".$ mysql->result($result2, 0, 'Msg_type')." : ".$mysql->result($result2, 0, 'Msg_text')."</td>59 <td>".$ mysql->result($result1, 0)."</td>58 <td>".$sql->result($result2, 0, 'Msg_type')." : ".$sql->result($result2, 0, 'Msg_text')."</td> 59 <td>".$sql->result($result1, 0)."</td> 60 60 </tr>"; 61 61 } … … 64 64 $output .= "<tr class=\"large_bold\"><td colspan=\"3\" class=\"hidden\" align=\"left\">{$db['name']} Tables :</td></tr>"; 65 65 66 $ mysql->connect($db['addr'], $db['user'], $db['pass'], $db['name']);67 $result = $ mysql->query("SHOW TABLES FROM {$db['name']}");66 $sql->connect($db['addr'], $db['user'], $db['pass'], $db['name']); 67 $result = $sql->query("SHOW TABLES FROM {$db['name']}"); 68 68 69 while ($table = $ mysql->fetch_row($result)){70 $result1 = $ mysql->query("SELECT count(*) FROM `$table[0]`");71 $result2 = $ mysql->query("CHECK TABLE `$table[0]` CHANGED");69 while ($table = $sql->fetch_row($result)){ 70 $result1 = $sql->query("SELECT count(*) FROM `$table[0]`"); 71 $result2 = $sql->query("CHECK TABLE `$table[0]` CHANGED"); 72 72 73 73 $output .= "<tr> 74 74 <td><input type=\"checkbox\" name=\"check[]\" value=\"world~{$db['id']}~{$db['name']}~$table[0]\" onclick=\"CheckCheckAll(document.form);\" /></td> 75 75 <td>$table[0]</td> 76 <td>".$ mysql->result($result2, 0, 'Msg_type')." : ".$mysql->result($result2, 0, 'Msg_text')."</td>77 <td>".$ mysql->result($result1, 0)."</td>76 <td>".$sql->result($result2, 0, 'Msg_type')." : ".$sql->result($result2, 0, 'Msg_text')."</td> 77 <td>".$sql->result($result1, 0)."</td> 78 78 </tr>"; 79 79 } … … 97 97 } 98 98 99 $ mysql = new MySQL;99 $sql = new SQL; 100 100 $counter = 0; 101 101 … … 104 104 $table_data = explode("~", $table); 105 105 if ($table_data[0] == "realm"){ 106 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass']);106 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 107 107 } else { 108 $ mysql->connect($mangos_db[$table_data[1]]['addr'], $mangos_db[$table_data[1]]['user'], $mangos_db[$table_data[1]]['pass']);108 $sql->connect($mangos_db[$table_data[1]]['addr'], $mangos_db[$table_data[1]]['user'], $mangos_db[$table_data[1]]['pass']); 109 109 } 110 110 111 $result = $ mysql->query("$table_action TABLE {$table_data[2]}.`{$table_data[3]}`");112 $action_result = $ mysql->fetch_row($result);111 $result = $sql->query("$table_action TABLE {$table_data[2]}.`{$table_data[3]}`"); 112 $action_result = $sql->fetch_row($result); 113 113 114 114 if ($action_result[3] === "OK") $counter++; -
minimanager/run_patch.php
r5 r19 67 67 if ( empty($_POST['query']) || empty($_POST['use_db']) ) redirect("run_patch.php?error=1"); 68 68 69 $ mysql = new MySQL;70 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass']);69 $sql = new SQL; 70 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 71 71 72 $use_db = $ mysql->quote_smart($_POST['use_db']);72 $use_db = $sql->quote_smart($_POST['use_db']); 73 73 $query = $_POST['query']; 74 74 75 if ($use_db == $realm_db['name']) $ mysql->db($realm_db['name']);75 if ($use_db == $realm_db['name']) $sql->db($realm_db['name']); 76 76 else { 77 77 foreach ($mangos_db as $db) 78 if ($use_db == $db['name']) $ mysql->connect($db['addr'], $db['user'], $db['pass'], $db['name']);78 if ($use_db == $db['name']) $sql->connect($db['addr'], $db['user'], $db['pass'], $db['name']); 79 79 } 80 80 … … 95 95 foreach($qr as $qry) { 96 96 $line++; 97 if(trim($qry)) ($ mysql->query(trim($qry))?$good++:$bad++);97 if(trim($qry)) ($sql->query(trim($qry))?$good++:$bad++); 98 98 if ($bad) { 99 $err = ereg_replace ("\n","", mysql_error());99 $err = ereg_replace ("\n","",$sql->error()); 100 100 $err = ereg_replace ("\r\n$","",$err); 101 101 $err = ereg_replace ("\r$","",$err); … … 105 105 } 106 106 107 $ mysql->close();107 $sql->close(); 108 108 109 109 if ($queries) redirect("run_patch.php?error=2&tot=$good"); -
minimanager/scripts/config.sample.php
r14 r19 9 9 */ 10 10 11 $version = "0.1.3d"; 12 13 //---- MySQL Configuration ---- 11 $version = "0.1.4a"; 12 13 //---- SQL Configuration ---- 14 15 /* SQL server type : 16 * "MySQL" - Mysql 17 * "PgSQL" - PostgreSQL 18 * "MySQLi" - MySQLi 19 * "SQLLite" - SQLLite 20 */ 21 $db_type = "MySQL"; 22 14 23 $realm_db = Array( 15 24 'addr' => "127.0.0.1:3306", //SQL server IP:port this realmd located on 16 'user' => " mangos", //SQL server login this realmd located on17 'pass' => " mangos", //SQL server pass this realmd located on25 'user' => "root", //SQL server login this realmd located on 26 'pass' => "pass", //SQL server pass this realmd located on 18 27 'name' => "realmd", //realmd DB name 19 28 'encoding' => "utf8" //SQL connection encoding … … 24 33 'id' => 1, //Realm ID 25 34 'addr' => "127.0.0.1:3306", //SQL server IP:port this DB located on 26 'user' => " mangos", //SQL server login this DB located on27 'pass' => " mangos", //SQL server pass this DB located on35 'user' => "root", //SQL server login this DB located on 36 'pass' => "pass", //SQL server pass this DB located on 28 37 'name' => "mangos", //World Database name 29 38 'encoding' => "utf8", //SQL connection encoding 30 'db_rev' => "SDB rev.2 02" //db rev. used39 'db_rev' => "SDB rev.24" //db rev. used 31 40 ), 32 41 ); … … 39 48 'term_type' => "SSH", //Terminal type - ("SSH"/"Telnet") 40 49 'term_port' => 22, //Terminal port 41 'rev' => "rev.42 03", //Mangos rev. used50 'rev' => "rev.4285", //Mangos rev. used 42 51 'both_factions' => false //Allow to see opponent faction characters. Affects only players. 43 52 ), … … 47 56 48 57 //---- Mail configuration ---- 49 $admin_mail = " noname@company.com"; //mail used for bug reports and other user contact58 $admin_mail = "root@admin.com"; //mail used for bug reports and other user contact 50 59 51 60 $mailer_type = "smtp"; // type of mailer to be used("mail", "sendmail", "smtp") 52 $from_mail = " noname@company.com"; //all emails will be sent from this email61 $from_mail = "mail@mail.com"; //all emails will be sent from this email 53 62 //smtp server config 54 63 $smtp_cfg = array( 55 'host' => "smtp. company.com", //smtp server64 'host' => "smtp.mail.com", //smtp server 56 65 'port' => 25, //port 57 66 'user' => "", //username - use only if auth. required … … 73 82 74 83 //---- Layout configuration ---- 75 $title = " WoW server";84 $title = "MiniManager for MaNgOs srv."; 76 85 $itemperpage = 25; 77 86 78 87 $css_template = "Sulfur"; //file/folder name of css tamplate to use from templates directory by default 79 88 $language = "enUS"; //default site language 80 $site_encoding = "iso-8859- 2"; //default encoding89 $site_encoding = "iso-8859-1"; //default encoding 81 90 82 91 //---- IRC Options ------ -
minimanager/scripts/del_lib.php
r5 r19 16 16 global $mangos_db, $realm_db, $user_lvl, $user_id, $tab_del_user_mangos; 17 17 18 $ mysql_01 = new MySQL;19 $ mysql_01->connect($mangos_db[$realm]['addr'], $mangos_db[$realm]['user'], $mangos_db[$realm]['pass'], $mangos_db[$realm]['name']);20 $query = $ mysql_01->query("SELECT account,online FROM `character` WHERE guid ='$guid' LIMIT 1");21 $owner_acc_id = $ mysql_01->result($query, 0, 'account');22 $ mysql_01->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);23 $query1 = $ mysql_01->query("SELECT gmlevel FROM account WHERE id ='$owner_acc_id'");24 $owner_gmlvl = $ mysql_01->result($query1, 0, 'gmlevel');18 $sql_01 = new SQL; 19 $sql_01->connect($mangos_db[$realm]['addr'], $mangos_db[$realm]['user'], $mangos_db[$realm]['pass'], $mangos_db[$realm]['name']); 20 $query = $sql_01->query("SELECT account,online FROM `character` WHERE guid ='$guid' LIMIT 1"); 21 $owner_acc_id = $sql_01->result($query, 0, 'account'); 22 $sql_01->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 23 $query1 = $sql_01->query("SELECT gmlevel FROM account WHERE id ='$owner_acc_id'"); 24 $owner_gmlvl = $sql_01->result($query1, 0, 'gmlevel'); 25 25 unset($query1); 26 26 27 27 if (($user_lvl > $owner_gmlvl)||($owner_acc_id == $user_id)) { 28 $ mysql_01->connect($mangos_db[$realm]['addr'], $mangos_db[$realm]['user'], $mangos_db[$realm]['pass'], $mangos_db[$realm]['name']);28 $sql_01->connect($mangos_db[$realm]['addr'], $mangos_db[$realm]['user'], $mangos_db[$realm]['pass'], $mangos_db[$realm]['name']); 29 29 30 if (!$ mysql_01->result($query, 0, 'online')){30 if (!$sql_01->result($query, 0, 'online')){ 31 31 foreach ($tab_del_user_mangos as $value){ 32 $query = $ mysql_01->query("DELETE FROM {$value[0]} WHERE {$value[1]} = '$guid'");32 $query = $sql_01->query("DELETE FROM {$value[0]} WHERE {$value[1]} = '$guid'"); 33 33 } 34 34 35 $ mysql_01->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);36 $query_2 = $ mysql_01->query("SELECT numchars FROM realmcharacters WHERE acctid ='$owner_acc_id' AND realmid = '$realm'");37 $chars_in_acc = $ mysql_01->result($query_2, 0, 'numchars');35 $sql_01->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 36 $query_2 = $sql_01->query("SELECT numchars FROM realmcharacters WHERE acctid ='$owner_acc_id' AND realmid = '$realm'"); 37 $chars_in_acc = $sql_01->result($query_2, 0, 'numchars'); 38 38 if ($chars_in_acc) $chars_in_acc--; 39 39 else $chars_in_acc = 0; 40 $query_2 = $ mysql_01->query("UPDATE realmcharacters SET numchars='$chars_in_acc' WHERE acctid ='$owner_acc_id' AND realmid = '$realm'");40 $query_2 = $sql_01->query("UPDATE realmcharacters SET numchars='$chars_in_acc' WHERE acctid ='$owner_acc_id' AND realmid = '$realm'"); 41 41 42 $ mysql_01->close();42 $sql_01->close(); 43 43 return true; 44 44 } 45 45 } 46 $ mysql_01->close();46 $sql_01->close(); 47 47 return false; 48 48 } … … 55 55 $del_char = 0; 56 56 57 $ mysql_01 = new MySQL;58 $ mysql_01->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);59 $query = $ mysql_01->query("SELECT gmlevel,online FROM account WHERE id ='$acc_id'");60 $gmlevel = $ mysql_01->result($query, 0, 'gmlevel');57 $sql_01 = new SQL; 58 $sql_01->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 59 $query = $sql_01->query("SELECT gmlevel,online FROM account WHERE id ='$acc_id'"); 60 $gmlevel = $sql_01->result($query, 0, 'gmlevel'); 61 61 62 62 if (($user_lvl > $gmlevel)||($acc_id == $user_id)) { 63 if (!$ mysql_01->result($query, 0, 'online')){63 if (!$sql_01->result($query, 0, 'online')){ 64 64 foreach ($mangos_db as $db){ 65 $ mysql_01->connect($db['addr'], $db['user'], $db['pass'], $db['name']);66 $result = $ mysql_01->query("SELECT guid FROM `character` WHERE account='$acc_id'");67 while ($row = $ mysql_01->fetch_array($result)) {65 $sql_01->connect($db['addr'], $db['user'], $db['pass'], $db['name']); 66 $result = $sql_01->query("SELECT guid FROM `character` WHERE account='$acc_id'"); 67 while ($row = $sql_01->fetch_array($result)) { 68 68 foreach ($tab_del_user_mangos as $value) 69 $query = $ mysql_01->query("DELETE FROM $value[0] WHERE $value[1] = '$row[0]'");69 $query = $sql_01->query("DELETE FROM $value[0] WHERE $value[1] = '$row[0]'"); 70 70 $del_char++; 71 71 } 72 72 } 73 73 74 $ mysql_01->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);74 $sql_01->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 75 75 76 76 foreach ($tab_del_user_realmd as $value){ 77 $query = $ mysql_01->query("DELETE FROM $value[0] WHERE $value[1] = '$acc_id'");77 $query = $sql_01->query("DELETE FROM $value[0] WHERE $value[1] = '$acc_id'"); 78 78 } 79 if ($ mysql_01->affected_rows()) {80 $ mysql_01->close();79 if ($sql_01->affected_rows()) { 80 $sql_01->close(); 81 81 return array(true,$del_char); 82 82 } 83 83 } 84 84 } 85 $ mysql_01->close();85 $sql_01->close(); 86 86 return array(false,$del_char); 87 87 } … … 95 95 require_once("scripts/defines.php"); 96 96 97 $ mysql_01 = new MySQL;98 $ mysql_01->connect($mangos_db[$realm]['addr'], $mangos_db[$realm]['user'], $mangos_db[$realm]['pass'], $mangos_db[$realm]['name']);99 $query = $ mysql_01->query("DELETE FROM guild WHERE guildid = '$guid'");100 $query = $ mysql_01->query("DELETE FROM guild_rank WHERE guildid = '$guid'");97 $sql_01 = new SQL; 98 $sql_01->connect($mangos_db[$realm]['addr'], $mangos_db[$realm]['user'], $mangos_db[$realm]['pass'], $mangos_db[$realm]['name']); 99 $query = $sql_01->query("DELETE FROM guild WHERE guildid = '$guid'"); 100 $query = $sql_01->query("DELETE FROM guild_rank WHERE guildid = '$guid'"); 101 101 102 102 //clean data inside character.data field 103 $temp = $ mysql_01->query("SELECT guid FROM guild_member WHERE guildid = '$guid'");104 while ($guild_member = $ mysql_01->fetch_row($temp)){105 $char_data = $ mysql_01->query("SELECT data FROM `character` WHERE guid = '$guild_member[0]'");106 $data = $ mysql_01->result($char_data, 0, 'data');103 $temp = $sql_01->query("SELECT guid FROM guild_member WHERE guildid = '$guid'"); 104 while ($guild_member = $sql_01->fetch_row($temp)){ 105 $char_data = $sql_01->query("SELECT data FROM `character` WHERE guid = '$guild_member[0]'"); 106 $data = $sql_01->result($char_data, 0, 'data'); 107 107 $data = explode(' ',$data); 108 108 $data[CHAR_DATA_OFFSET_GUILD_ID] = 0; 109 109 $data[CHAR_DATA_OFFSET_GUILD_RANK] = 0; 110 110 $data = implode(" ",$data); 111 $query = $ mysql_01->query("UPDATE `character` SET data = '$data' WHERE guid = '$guild_member[0]'");111 $query = $sql_01->query("UPDATE `character` SET data = '$data' WHERE guid = '$guild_member[0]'"); 112 112 } 113 113 114 $query = $ mysql_01->query("DELETE FROM guild_member WHERE guildid = '$guid'");114 $query = $sql_01->query("DELETE FROM guild_member WHERE guildid = '$guid'"); 115 115 116 if ($ mysql_01->affected_rows()){117 $ mysql_01->close();116 if ($sql_01->affected_rows()){ 117 $sql_01->close(); 118 118 return true; 119 119 } else { 120 $ mysql_01->close();120 $sql_01->close(); 121 121 return false; 122 122 } -
minimanager/scripts/gen_lib.php
r5 r19 14 14 global $lang_global, $mangos_db, $realm_id; 15 15 16 $ mysql_0 = new MySQL;17 $ mysql_0->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name'],true);16 $sql_0 = new SQL; 17 $sql_0->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 18 18 19 $result = $ mysql_0->query("SELECT MAX(`id`) FROM item_text");20 $item_page_id = ($ mysql_0->result($result, 0)) + 1;21 $result = $ mysql_0->query("INSERT INTO item_text (id, text) VALUES ($item_page_id,'$body')");19 $result = $sql_0->query("SELECT MAX(`id`) FROM item_text"); 20 $item_page_id = ($sql_0->result($result, 0)) + 1; 21 $result = $sql_0->query("INSERT INTO item_text (id, text) VALUES ($item_page_id,'$body')"); 22 22 23 $result = $ mysql_0->query("SELECT MAX(`id`) FROM mail");24 $mail_id = ($ mysql_0->result($result, 0)) + 1;23 $result = $sql_0->query("SELECT MAX(`id`) FROM mail"); 24 $mail_id = ($sql_0->result($result, 0)) + 1; 25 25 26 26 $item_guid = ($item) ? gen_item_instance($to, $item, $stack) : 0; 27 27 28 $sql = "INSERT INTO mail (id,messageType,sender,receiver,subject,itemTextId,item_guid,item_template,expire_time,deliver_time,money,cod,checked) 29 VALUES ($mail_id, 0, '$from', '$to', '$subject', '$item_page_id', '$item_guid', '$item', '".(time() + (30*24*3600))."','".(time()+5)."', '$gold', 0, 0)"; 30 $result = $mysql_0->query($sql); 28 $result = $sql_0->query("INSERT INTO mail (id,messageType,sender,receiver,subject,itemTextId,item_guid,item_template,expire_time,deliver_time,money,cod,checked) 29 VALUES ($mail_id, 0, '$from', '$to', '$subject', '$item_page_id', '$item_guid', '$item', '".(time() + (30*24*3600))."','".(time()+5)."', '$gold', 0, 0)"); 31 30 32 31 if ($result) { 33 $ mysql_0->close();32 $sql_0->close(); 34 33 return $mail_id; 35 34 } else { 36 $ mysql_0->close();35 $sql_0->close(); 37 36 return 0; 38 37 } … … 45 44 global $lang_global, $mangos_db, $realm_id; 46 45 47 $ mysql_1 = new MySQL;48 $ mysql_1->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name'],true);46 $sql_1 = new SQL; 47 $sql_1->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 49 48 50 $result = $ mysql_1->query("SELECT MAX(guid) FROM item_instance");51 $guid = $ mysql_1->result($result, 0) + 1;49 $result = $sql_1->query("SELECT MAX(guid) FROM item_instance"); 50 $guid = $sql_1->result($result, 0) + 1; 52 51 53 $result = $ mysql_1->query("SELECT flags,stackable,MaxDurability,spellcharges_1,spellcharges_2,52 $result = $sql_1->query("SELECT flags,stackable,MaxDurability,spellcharges_1,spellcharges_2, 54 53 spellcharges_3,spellcharges_4,spellcharges_5 FROM item_template 55 54 WHERE entry = '$item_id'"); 56 $item_template = $ mysql_1->fetch_row($result);55 $item_template = $sql_1->fetch_row($result); 57 56 58 57 if ($item_template[1] <= 1) $stack = 1; … … 86 85 $data = implode(" ",$item_data); 87 86 88 $result = $ mysql_1->query("INSERT INTO item_instance (guid, owner_guid, data) VALUES ($guid, '$owner','$data')");87 $result = $sql_1->query("INSERT INTO item_instance (guid, owner_guid, data) VALUES ($guid, '$owner','$data')"); 89 88 90 89 if ($result) { 91 $ mysql_1->close();90 $sql_1->close(); 92 91 return $guid; 93 92 } else { 94 $ mysql_1->close();93 $sql_1->close(); 95 94 return 0; 96 95 } -
minimanager/scripts/get_lib.php
r5 r19 14 14 global $lang_global, $realm_db; 15 15 16 $ mysql_0 = new MySQL;17 $ mysql_0->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);18 19 $result = $ mysql_0->query("SELECT name FROM `realmlist` WHERE id = '$realm_id'");20 $realm_name = $ mysql_0->result($result, 0);21 22 $ mysql_0->close();16 $sql_0 = new SQL; 17 $sql_0->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 18 19 $result = $sql_0->query("SELECT name FROM `realmlist` WHERE id = '$realm_id'"); 20 $realm_name = $sql_0->result($result, 0); 21 22 $sql_0->close(); 23 23 return $realm_name; 24 24 } … … 30 30 global $lang_global, $mangos_db, $realm_id; 31 31 if($item_id){ 32 $ mysql_1 = new MySQL;33 $ mysql_1->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);34 35 $result = $ mysql_1->query("SELECT name FROM item_template WHERE entry = '$item_id'");36 $item_name = ($ mysql_1->num_rows($result) == 1) ? $mysql_1->result($result, 0,"name") : "ItemID: $item_id Not Found" ;37 38 $ mysql_1->close();32 $sql_1 = new SQL; 33 $sql_1->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 34 35 $result = $sql_1->query("SELECT name FROM item_template WHERE entry = '$item_id'"); 36 $item_name = ($sql_1->num_rows($result) == 1) ? $sql_1->result($result, 0,"name") : "ItemID: $item_id Not Found" ; 37 38 $sql_1->close(); 39 39 return $item_name; 40 40 } else return NULL; … … 47 47 global $lang_global, $lang_item, $lang_id_tab, $mangos_db, $realm_id, $itemset_id; 48 48 if($item_id){ 49 $ mysql_1 = new MySQL;50 $ mysql_1->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);49 $sql_1 = new SQL; 50 $sql_1->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 51 51 52 $result_1 = $ mysql_1->query("SELECT stat_type1,stat_value1,stat_type2,stat_value2,stat_type3,stat_value3,stat_type4,52 $result_1 = $sql_1->query("SELECT stat_type1,stat_value1,stat_type2,stat_value2,stat_type3,stat_value3,stat_type4, 53 53 stat_value4,stat_type5,stat_value5,stat_type6,stat_value6,stat_type7,stat_value7,stat_type8, 54 54 stat_value8,stat_type9,stat_value9,stat_type10,stat_value10,armor,holy_res,fire_res,nature_res, … … 60 60 spellcharges_4,spellcharges_5,AllowableClass,socketColor_1,socketColor_2,socketColor_3,RandomProperty,RandomSuffix 61 61 FROM item_template WHERE entry = '$item_id' LIMIT 1"); 62 if ($item = $ mysql_1->fetch_row($result_1)) {62 if ($item = $sql_1->fetch_row($result_1)) { 63 63 $tooltip = ""; 64 64 … … 439 439 switch ($item[$p]) { 440 440 case 1: 441 $tooltip .= "<img src='img/socket_meta.gif' class='no_border'alt='' /><font color='gray'> {$lang_item['socket_meta']}</font><br />";441 $tooltip .= "<img src='img/socket_meta.gif' alt='' /><font color='gray'> {$lang_item['socket_meta']}</font><br />"; 442 442 break; 443 443 case 2: 444 $tooltip .= "<img src='img/socket_red.gif' class='no_border'alt='' /><font color='red'> {$lang_item['socket_red']}</font><br />";444 $tooltip .= "<img src='img/socket_red.gif' alt='' /><font color='red'> {$lang_item['socket_red']}</font><br />"; 445 445 break; 446 446 case 4: 447 $tooltip .= "<img src='img/socket_yellow.gif' class='no_border'alt='' /><font color='yellow'> {$lang_item['socket_yellow']}</font><br />";447 $tooltip .= "<img src='img/socket_yellow.gif' alt='' /><font color='yellow'> {$lang_item['socket_yellow']}</font><br />"; 448 448 break; 449 449 case 8: 450 $tooltip .= "<img src='img/socket_blue.gif' class='no_border'alt='' /><font color='blue'> {$lang_item['socket_blue']}</font><br />";450 $tooltip .= "<img src='img/socket_blue.gif' alt='' /><font color='blue'> {$lang_item['socket_blue']}</font><br />"; 451 451 break; 452 452 default: … … 595 595 $tooltip .= "<br /><font color='orange'>{$lang_item['item_set']} : ".get_itemset_name($item[55])." ($item[55])</font>"; 596 596 } 597 if ($item[54]) $tooltip .= "<br /><font color='orange'>'' $item[54]''</font>";597 if ($item[54]) $tooltip .= "<br /><font color='orange'>''".str_replace("\"", " '", $item[54])."''</font>"; 598 598 599 599 } else $tooltip = "Item ID: $item_id Not Found" ; 600 600 601 $ mysql_1->close();601 $sql_1->close(); 602 602 return $tooltip; 603 603 } else return(NULL); -
minimanager/scripts/global_lib.php
r5 r19 137 137 } 138 138 139 //########################################################################################## 140 function aasort(&$array, $field, $order = false){ 141 if(is_string($field)) $field = "'$field'"; 142 $order = ($order ? '<' : '>'); 143 usort($array, 144 create_function('$a, $b', 145 'return ($a['.$field.'] == $b['.$field.'] ? 0 :($a['.$field.'] '.$order.' $b['.$field.']) ? 1 : -1);') 146 ); 147 } 139 148 ?> -
minimanager/scripts/id_tab.php
r5 r19 185 185 //////////////////////////////////////////////////////////////////////////////////////////////// 186 186 //get zone name by mapid and players x,y 187 // Y1 ,Y2,X1,X2 - Upper left Y Coord of Box, Lower Right Y Coord of Box, Lower Right X Coord of Box, Upper Left X Coord of Box 188 $zone_0 = Array( //Azeroth 189 0 => Array(700,10,1244,1873,$lang_id_tab['undercity'],1497), 190 1 => Array(-840,-1330,-5050,-4560,$lang_id_tab['ironforge'],1537), 191 2 => Array(1190,200,-9074,-8280,$lang_id_tab['stormwind_city'],1519), 192 3 => Array(-2170,-4400,-7348,-6006,$lang_id_tab['badlands'],3), 193 4 => Array(-500,-4400,-4485,-2367,$lang_id_tab['wetlands'],11), 194 5 => Array(2220,-2250,-15422,-11299,$lang_id_tab['stranglethorn_vale'],33), 195 6 => Array(-1724,-3540,-9918,-8667,$lang_id_tab['redridge_mountains'],44), 196 7 => Array(-2480,-4400,-6006,-4485,$lang_id_tab['loch_modan'],38), 197 8 => Array(662,-1638,-11299,-9990,$lang_id_tab['duskwood'],10), 198 9 => Array(-1638,-2344,-11299,-9918,$lang_id_tab['deadwind_pass'],41), 199 10 => Array(834,-1724,-9990,-8526,$lang_id_tab['elwynn_forest'],12), 200 11 => Array(-500,-3100,-8667,-7348,$lang_id_tab['burning_steppes'],46), 201 12 => Array(-608,-2170,-7348,-6285,$lang_id_tab['searing_gorge'],51), 202 13 => Array(2000,-2480,-6612,-4485,$lang_id_tab['dun_morogh'],1), 203 14 => Array(-1575,-5425,-432,805,$lang_id_tab['the_hinterlands'],47), 204 15 => Array(3016,662,-11299,-9400,$lang_id_tab['westfall'],40), 205 16 => Array(600,-1575,-1874,220,$lang_id_tab['hillsbrad_foothills'],267), 206 17 => Array(-2725,-6056,805,3800,$lang_id_tab['eastern_plaguelands'],139), 207 18 => Array(-850,-2725,805,3400,$lang_id_tab['western_plaguelands'],28), 208 19 => Array(2200,600,-900,1525,$lang_id_tab['silverpine_forest'],130), 209 20 => Array(2200,-850,1525,3400,$lang_id_tab['tirisfal_glades'],85), 210 21 => Array(-2250,-3520,-12800,-10666,$lang_id_tab['blasted_lands'],4), 211 22 => Array(-2344,-4516,-11070,-9600,$lang_id_tab['swamp_of_sorrows'],8), 212 23 => Array(-1575,-3900,-2367,-432,$lang_id_tab['arathi_highlands'],45), 213 24 => Array(600,-1575,220,1525,$lang_id_tab['alterac_mountains'],36) 187 $zone_id = Array( 188 //Azeroth 189 1497 => Array($lang_id_tab['undercity'],1497), 190 1537 => Array($lang_id_tab['ironforge'],1537), 191 1519 => Array($lang_id_tab['stormwind_city'],1519), 192 3 => Array($lang_id_tab['badlands'],3), 193 11 => Array($lang_id_tab['wetlands'],11), 194 33 => Array($lang_id_tab['stranglethorn_vale'],33), 195 44 => Array($lang_id_tab['redridge_mountains'],44), 196 38 => Array($lang_id_tab['loch_modan'],38), 197 10 => Array($lang_id_tab['duskwood'],10), 198 41 => Array($lang_id_tab['deadwind_pass'],41), 199 12 => Array($lang_id_tab['elwynn_forest'],12), 200 46 => Array($lang_id_tab['burning_steppes'],46), 201 51 => Array($lang_id_tab['searing_gorge'],51), 202 1 => Array($lang_id_tab['dun_morogh'],1), 203 47 => Array($lang_id_tab['the_hinterlands'],47), 204 40 => Array($lang_id_tab['westfall'],40), 205 267 => Array($lang_id_tab['hillsbrad_foothills'],267), 206 139 => Array($lang_id_tab['eastern_plaguelands'],139), 207 28 => Array($lang_id_tab['western_plaguelands'],28), 208 130 => Array($lang_id_tab['silverpine_forest'],130), 209 85 => Array($lang_id_tab['tirisfal_glades'],85), 210 4 => Array($lang_id_tab['blasted_lands'],4), 211 8 => Array($lang_id_tab['swamp_of_sorrows'],8), 212 45 => Array($lang_id_tab['arathi_highlands'],45), 213 36 => Array($lang_id_tab['alterac_mountains'],36), 214 //Kalimdor 215 1657 => Array($lang_id_tab['darnassus'],1657), 216 1638 => Array($lang_id_tab['thunder_bluff'],1638), 217 1637 => Array($lang_id_tab['orgrimmar'],1637), 218 493 => Array($lang_id_tab['moonglade'],493), 219 1377 => Array($lang_id_tab['silithus'],1377), 220 618 => Array($lang_id_tab['winterspring'],618), 221 490 => Array($lang_id_tab['un_goro_crater'],490), 222 361 => Array($lang_id_tab['felwood'],361), 223 16 => Array($lang_id_tab['azshara'],16), 224 440 => Array($lang_id_tab['tanaris'],440), 225 15 => Array($lang_id_tab['dustwallow_marsh'],15), 226 215 => Array($lang_id_tab['mulgore'],215), 227 357 => Array($lang_id_tab['feralas'],357), 228 405 => Array($lang_id_tab['desolace'],405), 229 400 => Array($lang_id_tab['thousand_needles'],400), 230 14 => Array($lang_id_tab['durotar'],14), 231 331 => Array($lang_id_tab['ashenvale'],331), 232 148 => Array($lang_id_tab['darkshore'],148), 233 141 => Array($lang_id_tab['teldrassil'],141), 234 406 => Array($lang_id_tab['stonetalon_mountains'],406), 235 17 => Array($lang_id_tab['the_barrens'],17), 236 //Outland 237 3703 => Array($lang_id_tab['shattrath_city'],3703), 238 3487 => Array($lang_id_tab['silvermoon_city'],3487), 239 3523 => Array($lang_id_tab['netherstorm'],3523), 240 3519 => Array($lang_id_tab['terokkar_forest'],3519), 241 3518 => Array($lang_id_tab['nagrand'],3518), 242 3525 => Array($lang_id_tab['bloodmyst_isle'],3525), 243 3522 => Array($lang_id_tab['blades_edge_mountains'],3522), 244 3520 => Array($lang_id_tab['shadowmoon_valley'],3520), 245 3557 => Array($lang_id_tab['the_exodar'],3557), 246 3521 => Array($lang_id_tab['zangarmarsh'],3521), 247 3483 => Array($lang_id_tab['hellfire_peninsula'],3483), 248 3524 => Array($lang_id_tab['azuremyst_isle'],3524), 249 3433 => Array($lang_id_tab['ghostlands'],3433), 250 3430 => Array($lang_id_tab['eversong_woods'],3430) 214 251 ); 215 252 216 $zone_1 = Array( //Kalimdor 217 0 => Array(2698,2030,9575,10267,$lang_id_tab['darnassus'],1657), 218 1 => Array(326,-360,-1490,-910,$lang_id_tab['thunder_bluff'],1638), 219 2 => Array(-3849,-4809,1387,2222,$lang_id_tab['orgrimmar'],1637), 220 3 => Array(-1300,-3250,7142,8500,$lang_id_tab['moonglade'],493), 221 4 => Array(2021,-400,-9000,-6016,$lang_id_tab['silithus'],1377), 222 5 => Array(-2259,-7000,4150,8500,$lang_id_tab['winterspring'],618), 223 6 => Array(-400,-2094,-8221,-6016,$lang_id_tab['un_goro_crater'],490), 224 7 => Array(-590,-2259,3580,7142,$lang_id_tab['felwood'],361), 225 8 => Array(-3787,-8000,1370,6000,$lang_id_tab['azshara'],16), 226 9 => Array(-1900,-5500,-10475,-6825,$lang_id_tab['tanaris'],440), 227 10 => Array(-2478,-5500,-5135,-2330,$lang_id_tab['dustwallow_marsh'],15), 228 11 => Array(360,-1536,-3474,-412,$lang_id_tab['mulgore'],215), 229 12 => Array(4000,-804,-6828,-2477,$lang_id_tab['feralas'],357), 230 13 => Array(3500,360,-2477,372,$lang_id_tab['desolace'],405), 231 14 => Array(-804,-5500,-6828,-4566,$lang_id_tab['thousand_needles'],400), 232 15 => Array(-3758,-5500,-1300,1370,$lang_id_tab['durotar'],14), 233 16 => Array(1000,-3787,1370,4150,$lang_id_tab['ashenvale'],331), 234 17 => Array(2500,-1300,4150,8500,$lang_id_tab['darkshore'],148), 235 18 => Array(3814,-1100,8600,11831,$lang_id_tab['teldrassil'],141), 236 19 => Array(3500,-804,-412,3580,$lang_id_tab['stonetalon_mountains'],406), 237 20 => Array(-804,-4200,-4566,1370,$lang_id_tab['the_barrens'],17) 238 ); 239 240 $zone_530 = Array( //Outland 241 0 => Array(6135.25,4829,-2344.78,-1473.95,$lang_id_tab['shattrath_city'],3703), 242 1 => Array(-6400.75,-7612.20,9346.93,10153.70,$lang_id_tab['silvermoon_city'],3487), 243 2 => Array(5483.33,-91.66,1739.58,5456.25,$lang_id_tab['netherstorm'],3523), 244 3 => Array(7083.33,1683.33,-4600,-999.99,$lang_id_tab['terokkar_forest'],3519), 245 4 => Array(10295.83,4770.83,-3641.66,41.66,$lang_id_tab['nagrand'],3518), 246 5 => Array(-10075,-13337.49,-2933.33,-758.33,$lang_id_tab['bloodmyst_isle'],3525), 247 6 => Array(8845.83,3420.83,791.66,4408.33,$lang_id_tab['blades_edge_mountains'],3522), 248 7 => Array(4225,-1275,-5614.58,-1947.91,$lang_id_tab['shadowmoon_valley'],3520), 249 8 => Array(-11066.36,-12123.13,-4314.37,-3609.68,$lang_id_tab['the_exodar'],3557), 250 9 => Array(9475,4447.91,-1416.66,1935.41,$lang_id_tab['zangarmarsh'],3521), 251 10 => Array(5539.58,375,-1962.49,1481.25,$lang_id_tab['hellfire_peninsula'],3483), 252 11 => Array(-10500,-14570.83,-5508.33,-2793.75,$lang_id_tab['azuremyst_isle'],3524), 253 12 => Array(-5283.33,-8583.33,6066.66,8266.66,$lang_id_tab['ghostlands'],3433), 254 13 => Array(-4487.5,-9412.5,7758.33,11041.66,$lang_id_tab['eversong_woods'],3430) 255 ); 256 257 // Y1 ,Y2,X1,X2 - Upper left Y Coord of Box, Lower Right Y Coord of Box, Upper Left X Coord of Box, Lower Right X Coord of Box 258 function get_zone_name($map_id,$player_x,$player_y){ 259 global $zone_0,$zone_1,$zone_530; 260 switch ($map_id) { 261 case 0: 262 for ($i=0; $i < count($zone_0); $i++) 263 if (($zone_0[$i][2] < $player_x) && ($zone_0[$i][3] > $player_x) && ($zone_0[$i][1] < $player_y) && ($zone_0[$i][0] > $player_y)) return ($zone_0[$i][4]); 264 break; 265 case 1: 266 for ($i=0; $i < count($zone_1); $i++) 267 if (($zone_1[$i][2] < $player_x) && ($zone_1[$i][3] > $player_x) && ($zone_1[$i][1] < $player_y) && ($zone_1[$i][0] > $player_y)) return ($zone_1[$i][4]); 268 break; 269 case 530: 270 for ($i=0; $i < count($zone_530); $i++) 271 if (($zone_530[$i][2] < $player_x) && ($zone_530[$i][3] > $player_x) && ($zone_530[$i][1] < $player_y) && ($zone_530[$i][0] > $player_y)) return ($zone_530[$i][4]); 272 break; 273 274 default: 275 return(" "); 276 } 253 function get_zone_name($id){ 254 global $zone_id; 255 if( isset($zone_id[$id])) return $zone_id[$id][0]; 256 else return(" "); 277 257 } 278 258 -
minimanager/stat.php
r5 r19 55 55 ); 56 56 57 $ mysql = new MySQL;58 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);59 $query = $ mysql->query("SELECT count(*) FROM account UNION SELECT count(*) FROM account WHERE gmlevel > 0");60 $total_acc = $ mysql->result($query,0);61 $total_gms = $ mysql->result($query,1);57 $sql = new SQL; 58 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 59 $query = $sql->query("SELECT count(*) FROM account UNION SELECT count(*) FROM account WHERE gmlevel > 0"); 60 $total_acc = $sql->result($query,0); 61 $total_gms = $sql->result($query,1); 62 62 63 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);64 $query = $ mysql->query("SELECT count(*) FROM `character`");65 $total_chars = $ mysql->result($query,0);63 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 64 $query = $sql->query("SELECT count(*) FROM `character`"); 65 $total_chars = $sql->result($query,0); 66 66 67 $query = $ mysql->query("SELECT AVG(uptime)/60,MAX(uptime)/60,(100*SUM(uptime)/(UNIX_TIMESTAMP()-MIN(starttime))) FROM uptime");68 $uptime = $ mysql->fetch_row($query);67 $query = $sql->query("SELECT AVG(uptime)/60,MAX(uptime)/60,(100*SUM(uptime)/(UNIX_TIMESTAMP()-MIN(starttime))) FROM uptime"); 68 $uptime = $sql->fetch_row($query); 69 69 70 70 if ($total_chars){ 71 71 72 $order_race = (isset($_GET['race'])) ? "AND race =".$ mysql->quote_smart($_GET['race']) : "";73 $order_class = (isset($_GET['class'])) ? "AND class =".$ mysql->quote_smart($_GET['class']) : "";72 $order_race = (isset($_GET['race'])) ? "AND race =".$sql->quote_smart($_GET['race']) : ""; 73 $order_class = (isset($_GET['class'])) ? "AND class =".$sql->quote_smart($_GET['class']) : ""; 74 74 75 75 if(isset($_GET['level'])){ 76 $lvl_min = $ mysql->quote_smart($_GET['level']);76 $lvl_min = $sql->quote_smart($_GET['level']); 77 77 $lvl_max = $lvl_min + 4; 78 78 $order_level = "AND SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 35), ' ', -1) >= $lvl_min AND SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 35), ' ', -1) <= $lvl_max"; … … 80 80 81 81 if(isset($_GET['side'])) { 82 if ($ mysql->quote_smart($_GET['side']) == "h") $order_side = "AND race IN(2,5,6,8,10)";83 elseif ($ mysql->quote_smart($_GET['side']) == "a") $order_side = "AND race IN (1,3,4,7,11)";82 if ($sql->quote_smart($_GET['side']) == "h") $order_side = "AND race IN(2,5,6,8,10)"; 83 elseif ($sql->quote_smart($_GET['side']) == "a") $order_side = "AND race IN (1,3,4,7,11)"; 84 84 } else $order_side = ""; 85 85 … … 88 88 89 89 //there is always less hordies 90 $query = $ mysql->query("SELECT count(guid) FROM `character` WHERE race IN(2,5,6,8,10)");91 $horde_chars = $ mysql->result($query,0);90 $query = $sql->query("SELECT count(guid) FROM `character` WHERE race IN(2,5,6,8,10)"); 91 $horde_chars = $sql->result($query,0); 92 92 $horde_pros = round(($horde_chars*100)/$total_chars ,1); 93 93 $allies_chars = $total_chars - $horde_chars; … … 117 117 // RACE 118 118 foreach ($race as $id){ 119 $query = $ mysql->query("SELECT count(guid) FROM `character` WHERE race = $id[0] $order_class $order_level $order_side");120 $race[$id[0]][2] = $ mysql->result($query,0);119 $query = $sql->query("SELECT count(guid) FROM `character` WHERE race = $id[0] $order_class $order_level $order_side"); 120 $race[$id[0]][2] = $sql->result($query,0); 121 121 $race[$id[0]][3] = round((($race[$id[0]][2])*100)/$total_chars,1); 122 122 } … … 140 140 // CLASS 141 141 foreach ($class as $id){ 142 $query = $ mysql->query("SELECT count(guid) FROM `character` WHERE class = $id[0] $order_race $order_level $order_side");143 $class[$id[0]][2] = $ mysql->result($query,0);142 $query = $sql->query("SELECT count(guid) FROM `character` WHERE class = $id[0] $order_race $order_level $order_side"); 143 $class[$id[0]][2] = $sql->result($query,0); 144 144 $class[$id[0]][3] = round((($class[$id[0]][2])*100)/$total_chars,1); 145 145 } … … 163 163 // LEVEL 164 164 foreach ($level as $id){ 165 $query = $ mysql->query("SELECT count(guid) FROM `character` WHERE SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 35), ' ', -1) >= $id[1]165 $query = $sql->query("SELECT count(guid) FROM `character` WHERE SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 35), ' ', -1) >= $id[1] 166 166 AND SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 35), ' ', -1) <= $id[2] $order_race $order_class $order_side"); 167 $level[$id[0]][3] = $ mysql->result($query,0);167 $level[$id[0]][3] = $sql->result($query,0); 168 168 $level[$id[0]][4] = round((($level[$id[0]][3])*100)/$total_chars,1); 169 169 } … … 189 189 </center>"; 190 190 191 $ mysql->close();191 $sql->close(); 192 192 193 193 } else { 194 $ mysql->close();194 $sql->close(); 195 195 error($lang_global['err_no_result']); 196 196 } -
minimanager/tele.php
r5 r19 19 19 global $lang_tele, $lang_global, $output, $mangos_db, $realm_id, $itemperpage; 20 20 21 $ mysql = new MySQL;22 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);23 24 $start = (isset($_GET['start'])) ? $ mysql->quote_smart($_GET['start']) : 0;25 $order_by = (isset($_GET['order_by'])) ? $ mysql->quote_smart($_GET['order_by']) : "id";26 27 $dir = (isset($_GET['dir'])) ? $ mysql->quote_smart($_GET['dir']) : 1;21 $sql = new SQL; 22 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 23 24 $start = (isset($_GET['start'])) ? $sql->quote_smart($_GET['start']) : 0; 25 $order_by = (isset($_GET['order_by'])) ? $sql->quote_smart($_GET['order_by']) : "id"; 26 27 $dir = (isset($_GET['dir'])) ? $sql->quote_smart($_GET['dir']) : 1; 28 28 $order_dir = ($dir) ? "ASC" : "DESC"; 29 29 $dir = ($dir) ? 0 : 1; 30 30 31 31 //get total number of items 32 $query_1 = $ mysql->query("SELECT count(*) FROM game_tele");33 $all_record = $ mysql->result($query_1,0);34 $query = $ mysql->query("SELECT id, name, map, position_x, position_y, position_z, orientation32 $query_1 = $sql->query("SELECT count(*) FROM game_tele"); 33 $all_record = $sql->result($query_1,0); 34 $query = $sql->query("SELECT id, name, map, position_x, position_y, position_z, orientation 35 35 FROM game_tele ORDER BY $order_by $order_dir LIMIT $start, $itemperpage"); 36 $this_page = $ mysql->num_rows($query);36 $this_page = $sql->num_rows($query); 37 37 38 38 //==========================top tage navigaion starts here======================== … … 58 58 //==========================top tage navigaion ENDS here ======================== 59 59 60 $output .= "<table class=\"lined\"> 60 $output .= "<script type=\"text/javascript\"> 61 answerbox.btn_ok='{$lang_global['yes_low']}'; 62 answerbox.btn_cancel='{$lang_global['no']}'; 63 var question = '{$lang_global['are_you_sure']}'; 64 var del_tele = 'tele.php?action=del_tele&order_by=$order_by&start=$start&dir=$dir&id='; 65 </script> 66 <table class=\"lined\"> 61 67 <tr> 62 <t d width=\"5%\" class=\"head\">{$lang_global['delete']}</td>63 <t d width=\"5%\" class=\"head\"><a href=\"tele.php?order_by=id&start=$start&dir=$dir\" class=\"head_link\">{$lang_tele['id']}</a></td>64 <t d width=\"28%\" class=\"head\"><a href=\"tele.php?order_by=name&start=$start&dir=$dir\" class=\"head_link\">{$lang_tele['name']}</a></td>65 <t d width=\"22%\" class=\"head\"><a href=\"tele.php?order_by=map&start=$start&dir=$dir\" class=\"head_link\">{$lang_tele['map']}</a></td>66 <t d width=\"9%\" class=\"head\"><a href=\"tele.php?order_by=position_x&start=$start&dir=$dir\" class=\"head_link\">{$lang_tele['x']}</a></td>67 <t d width=\"9%\" class=\"head\"><a href=\"tele.php?order_by=position_y&start=$start&dir=$dir\" class=\"head_link\">{$lang_tele['y']}</a></td>68 <t d width=\"9%\" class=\"head\"><a href=\"tele.php?order_by=position_z&start=$start&dir=$dir\" class=\"head_link\">{$lang_tele['z']}</a></td>69 <t d width=\"10%\" class=\"head\"><a href=\"tele.php?order_by=orientation&start=$start&dir=$dir\" class=\"head_link\">{$lang_tele['orientation']}</a></td>68 <th width=\"5%\">{$lang_global['delete_short']}</th> 69 <th width=\"5%\"><a href=\"tele.php?order_by=id&start=$start&dir=$dir\">".($order_by=='id' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_tele['id']}</a></th> 70 <th width=\"28%\"><a href=\"tele.php?order_by=name&start=$start&dir=$dir\">".($order_by=='name' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_tele['name']}</a></th> 71 <th width=\"22%\><a href=\"tele.php?order_by=map&start=$start&dir=$dir\">".($order_by=='map' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_tele['map']}</a></th> 72 <th width=\"9%\"><a href=\"tele.php?order_by=position_x&start=$start&dir=$dir\">".($order_by=='position_x' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_tele['x']}</a></th> 73 <th width=\"9%\"><a href=\"tele.php?order_by=position_y&start=$start&dir=$dir\">".($order_by=='position_y' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_tele['y']}</a></th> 74 <th width=\"9%\"><a href=\"tele.php?order_by=position_z&start=$start&dir=$dir\">".($order_by=='position_z' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_tele['z']}</a></th> 75 <th width=\"10%\"><a href=\"tele.php?order_by=orientation&start=$start&dir=$dir\">".($order_by=='orientation' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_tele['orientation']}</a></th> 70 76 </tr>"; 71 77 72 while ($data = $ mysql->fetch_row($query)){78 while ($data = $sql->fetch_row($query)){ 73 79 $output .= "<tr> 74 <td>< a href=\"tele.php?action=del_tele&id=$data[0]\"><img src=\"img/x.ico\" class=\"no_border\" alt=\"\" /></a></td>80 <td><img src=\"img/aff_cross.png\" alt=\"\" onclick=\"answerBox('{$lang_global['delete']}: <font color=white>{$data[1]}</font> <br /> ' + question, del_tele + $data[0]);\" style=\"cursor:pointer;\" /></td> 75 81 <td>$data[0]</td> 76 82 <td><a href=\"tele.php?action=edit_tele&id=$data[0]\">$data[1]</a></td> … … 86 92 </table></center>"; 87 93 88 $ mysql->close();94 $sql->close(); 89 95 } 90 96 … … 98 104 if(empty($_GET['search_value']) || empty($_GET['search_by'])) redirect("guild.php?error=2"); 99 105 100 $ mysql = new MySQL;101 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);102 103 $search_value = $ mysql->quote_smart($_GET['search_value']);104 $search_by = $ mysql->quote_smart($_GET['search_by']);105 106 $order_by = (isset($_GET['order_by'])) ? $ mysql->quote_smart($_GET['order_by']) : "id";107 $dir = (isset($_GET['dir'])) ? $ mysql->quote_smart($_GET['dir']) : 1;106 $sql = new SQL; 107 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 108 109 $search_value = $sql->quote_smart($_GET['search_value']); 110 $search_by = $sql->quote_smart($_GET['search_by']); 111 112 $order_by = (isset($_GET['order_by'])) ? $sql->quote_smart($_GET['order_by']) : "id"; 113 $dir = (isset($_GET['dir'])) ? $sql->quote_smart($_GET['dir']) : 1; 108 114 $order_dir = ($dir) ? "ASC" : "DESC"; 109 115 $dir = ($dir) ? 0 : 1; 110 116 111 $query = $ mysql->query("SELECT id, name, map, position_x, position_y, position_z, orientation117 $query = $sql->query("SELECT id, name, map, position_x, position_y, position_z, orientation 112 118 FROM game_tele WHERE $search_by LIKE '%$search_value%' ORDER BY $order_by $order_dir LIMIT $sql_search_limit"); 113 $total_found = $ mysql->num_rows($query);119 $total_found = $sql->num_rows($query); 114 120 115 121 //==========================top tage navigaion starts here======================== 116 $output .="<center><table class=\"top_hidden\"> 122 $output .="<script type=\"text/javascript\"> 123 answerbox.btn_ok='{$lang_global['yes_low']}'; 124 answerbox.btn_cancel='{$lang_global['no']}'; 125 var question = '{$lang_global['are_you_sure']}'; 126 var del_tele = 'tele.php?action=del_tele&order_by=$order_by&dir=$dir&id='; 127 </script> 128 <center><table class=\"top_hidden\"> 117 129 <tr><td>"; 118 130 makebutton($lang_tele['add_new'], "tele.php?action=add_tele",90); … … 133 145 $output .= "<table class=\"lined\"> 134 146 <tr> 135 <t d width=\"5%\" class=\"head\">{$lang_global['delete']}</td>136 <t d width=\"5%\" class=\"head\"><a href=\"tele.php?action=search&error=4&order_by=id&search_by=$search_by&search_value=$search_value&dir=$dir\" class=\"head_link\">{$lang_tele['id']}</a></td>137 <t d width=\"28%\" class=\"head\"><a href=\"tele.php?action=search&error=4&order_by=name&search_by=$search_by&search_value=$search_value&dir=$dir\" class=\"head_link\">{$lang_tele['name']}</a></td>138 <t d width=\"22%\" class=\"head\"><a href=\"tele.php?action=search&error=4&order_by=map&search_by=$search_by&search_value=$search_value&dir=$dir\" class=\"head_link\">{$lang_tele['map']}</a></td>139 <t d width=\"9%\" class=\"head\"><a href=\"tele.php?action=search&error=4&order_by=position_x&search_by=$search_by&search_value=$search_value&dir=$dir\" class=\"head_link\">{$lang_tele['x']}</a></td>140 <t d width=\"9%\" class=\"head\"><a href=\"tele.php?action=search&error=4&order_by=position_y&search_by=$search_by&search_value=$search_value&dir=$dir\" class=\"head_link\">{$lang_tele['y']}</a></td>141 <t d width=\"9%\" class=\"head\"><a href=\"tele.php?action=search&error=4&order_by=position_z&search_by=$search_by&search_value=$search_value&dir=$dir\" class=\"head_link\">{$lang_tele['z']}</a></td>142 <t d width=\"10%\" class=\"head\"><a href=\"tele.php?action=search&error=4&order_by=orientation&search_by=$search_by&search_value=$search_value&dir=$dir\" class=\"head_link\">{$lang_tele['orientation']}</a></td>147 <th width=\"5%\">{$lang_global['delete_short']}</th> 148 <th width=\"5%\"><a href=\"tele.php?action=search&error=4&order_by=id&search_by=$search_by&search_value=$search_value&dir=$dir\">".($order_by=='id' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_tele['id']}</a></th> 149 <th width=\"28%\"><a href=\"tele.php?action=search&error=4&order_by=name&search_by=$search_by&search_value=$search_value&dir=$dir\">".($order_by=='name' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_tele['name']}</a></th> 150 <th width=\"22%\"><a href=\"tele.php?action=search&error=4&order_by=map&search_by=$search_by&search_value=$search_value&dir=$dir\">".($order_by=='map' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_tele['map']}</a></th> 151 <th width=\"9%\"><a href=\"tele.php?action=search&error=4&order_by=position_x&search_by=$search_by&search_value=$search_value&dir=$dir\">".($order_by=='position_x' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_tele['x']}</a></th> 152 <th width=\"9%\"><a href=\"tele.php?action=search&error=4&order_by=position_y&search_by=$search_by&search_value=$search_value&dir=$dir\">".($order_by=='position_y' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_tele['y']}</a></th> 153 <th width=\"9%\"><a href=\"tele.php?action=search&error=4&order_by=position_z&search_by=$search_by&search_value=$search_value&dir=$dir\">".($order_by=='position_z' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_tele['z']}</a></th> 154 <th width=\"10%\"><a href=\"tele.php?action=search&error=4&order_by=orientation&search_by=$search_by&search_value=$search_value&dir=$dir\">".($order_by=='orientation' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_tele['orientation']}</a></th> 143 155 </tr>"; 144 156 145 while ($data = $ mysql->fetch_row($query)){157 while ($data = $sql->fetch_row($query)){ 146 158 $output .= "<tr> 147 <td>< a href=\"tele.php?action=del_tele&id=$data[0]\"><img src=\"img/x.ico\" class=\"no_border\" alt=\"\" /></a></td>159 <td><img src=\"img/aff_cross.png\" alt=\"\" onclick=\"answerBox('{$lang_global['delete']}: <font color=white>{$data[1]}</font> <br /> ' + question, del_tele + $data[0]);\" style=\"cursor:pointer;\" /></td> 148 160 <td>$data[0]</td> 149 161 <td><a href=\"tele.php?action=edit_tele&id=$data[0]\">$data[1]</a></td> … … 161 173 </table></center>"; 162 174 163 $ mysql->close();175 $sql->close(); 164 176 } 165 177 … … 171 183 global $mangos_db, $realm_id; 172 184 173 $ mysql = new MySQL;174 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);175 176 if(isset($_GET['id'])) $id = $ mysql->quote_smart($_GET['id']);185 $sql = new SQL; 186 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 187 188 if(isset($_GET['id'])) $id = $sql->quote_smart($_GET['id']); 177 189 else redirect("Location: tele.php?error=1"); 178 190 179 $mysql->query("DELETE FROM game_tele WHERE id = '$id'"); 180 181 if ($mysql->affected_rows() != 0) { 182 $mysql->close(); 183 redirect("tele.php?error=3"); 191 $start = (isset($_GET['start'])) ? $sql->quote_smart($_GET['start']) : 0; 192 $order_by = (isset($_GET['order_by'])) ? $sql->quote_smart($_GET['order_by']) : "id"; 193 $dir = (isset($_GET['dir'])) ? $sql->quote_smart($_GET['dir']) : 1; 194 $dir = ($dir) ? 0 : 1; 195 196 $sql->query("DELETE FROM game_tele WHERE id = '$id'"); 197 198 if ($sql->affected_rows() != 0) { 199 $sql->close(); 200 redirect("tele.php?error=3&order_by=$order_by&start=$start&dir=$dir"); 184 201 } else { 185 $ mysql->close();202 $sql->close(); 186 203 redirect("tele.php?error=5"); 187 204 } … … 195 212 global $lang_tele, $lang_global, $output, $mangos_db, $realm_id, $map_id; 196 213 197 $ mysql = new MySQL;198 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);199 200 if(isset($_GET['id'])) $id = $ mysql->quote_smart($_GET['id']);214 $sql = new SQL; 215 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 216 217 if(isset($_GET['id'])) $id = $sql->quote_smart($_GET['id']); 201 218 else redirect("tele.php?error=1"); 202 219 203 $query = $ mysql->query("SELECT id, name, map, position_x, position_y, position_z, orientation FROM game_tele WHERE id = '$id'");204 205 if ($ mysql->num_rows($query) == 1) {206 $tele = $ mysql->fetch_row($query);220 $query = $sql->query("SELECT id, name, map, position_x, position_y, position_z, orientation FROM game_tele WHERE id = '$id'"); 221 222 if ($sql->num_rows($query) == 1) { 223 $tele = $sql->fetch_row($query); 207 224 208 225 $output .= "<center> … … 261 278 } else error($lang_global['err_no_records_found']); 262 279 263 $ mysql->close();280 $sql->close(); 264 281 } 265 282 … … 275 292 redirect("tele.php?error=1"); 276 293 277 $ mysql = new MySQL;278 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);279 280 $id = $ mysql->quote_smart($_GET['id']);281 $new_name = $ mysql->quote_smart($_GET['new_name']);282 $new_map = $ mysql->quote_smart($_GET['new_map']);283 $new_x = $ mysql->quote_smart($_GET['new_x']);284 $new_y = $ mysql->quote_smart($_GET['new_y']);285 $new_z = $ mysql->quote_smart($_GET['new_z']);286 $new_orientation = $ mysql->quote_smart($_GET['new_orientation']);287 288 $ mysql->query("UPDATE game_tele SET position_x='$new_x', position_y ='$new_y', position_z ='$new_z', orientation ='$new_orientation', map ='$new_map', name ='$new_name' WHERE id = '$id'");289 290 if ( mysql_affected_rows()) {291 $ mysql->close();294 $sql = new SQL; 295 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 296 297 $id = $sql->quote_smart($_GET['id']); 298 $new_name = $sql->quote_smart($_GET['new_name']); 299 $new_map = $sql->quote_smart($_GET['new_map']); 300 $new_x = $sql->quote_smart($_GET['new_x']); 301 $new_y = $sql->quote_smart($_GET['new_y']); 302 $new_z = $sql->quote_smart($_GET['new_z']); 303 $new_orientation = $sql->quote_smart($_GET['new_orientation']); 304 305 $sql->query("UPDATE game_tele SET position_x='$new_x', position_y ='$new_y', position_z ='$new_z', orientation ='$new_orientation', map ='$new_map', name ='$new_name' WHERE id = '$id'"); 306 307 if ($sql->affected_rows()) { 308 $sql->close(); 292 309 redirect("tele.php?error=3"); 293 310 } else { 294 $ mysql->close();311 $sql->close(); 295 312 redirect("tele.php?error=5"); 296 313 } … … 360 377 redirect("tele.php?error=1"); 361 378 362 $ mysql = new MySQL;363 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);364 365 $name = $ mysql->quote_smart($_GET['name']);366 $map = $ mysql->quote_smart($_GET['map']);367 $x = $ mysql->quote_smart($_GET['x']);368 $y = $ mysql->quote_smart($_GET['y']);369 $z = $ mysql->quote_smart($_GET['z']);370 $orientation = $ mysql->quote_smart($_GET['orientation']);371 372 $ mysql->query("INSERT INTO game_tele VALUES (NULL,'$x','$y', '$z' ,'$orientation' ,'$map' ,'$name')");373 374 if ( mysql_affected_rows()) {375 $ mysql->close();379 $sql = new SQL; 380 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 381 382 $name = $sql->quote_smart($_GET['name']); 383 $map = $sql->quote_smart($_GET['map']); 384 $x = $sql->quote_smart($_GET['x']); 385 $y = $sql->quote_smart($_GET['y']); 386 $z = $sql->quote_smart($_GET['z']); 387 $orientation = $sql->quote_smart($_GET['orientation']); 388 389 $sql->query("INSERT INTO game_tele VALUES (NULL,'$x','$y', '$z' ,'$orientation' ,'$map' ,'$name')"); 390 391 if ($sql->affected_rows()) { 392 $sql->close(); 376 393 redirect("tele.php?error=3"); 377 394 } else { 378 $ mysql->close();395 $sql->close(); 379 396 redirect("tele.php?error=5"); 380 397 } -
minimanager/templates/Malachite/Malachite_1024.css
r5 r19 7 7 * License: GNU General Public License (GPL) 8 8 */ 9 10 html,body { 11 background:#76827B; 9 html{ 10 overflow-x:auto; /* fixes MSIE scrollbar bug DO NOT REMOVE,has no effect in Mozilla,or Opera */ 11 /* http://www.blooberry.com/indexdot/css/properties/position/overflowx.htm */ 12 } 13 html,body{ 14 background-color:#76827B; 12 15 color:#000000; 13 16 height:100%; … … 15 18 margin:0; 16 19 font:9pt Verdana,sans-serif; 17 cursor: 20 cursor:default; 18 21 } 19 22 … … 50 53 left:25px; 51 54 top:37px; 52 z-index: 40;55 z-index:100; 53 56 width: 36em; /*total len*/ 54 57 text-align: left; … … 131 134 } 132 135 h1{ 133 margin:0 ;136 margin:0px; 134 137 font:16pt Trebuchet MS,sans-serif; 135 138 font-weight:bold; … … 160 163 background-color: #b2c2b9; 161 164 } 162 165 img { 166 border: 0px; 167 padding: 0px; 168 } 169 input[type="radio"],input[type="checkbox"]{ 170 background:none; 171 border:0px; 172 } 163 173 a.button { 164 174 background:#869c8f; … … 186 196 position: relative; 187 197 margin-top:20px; 188 padding-top: 10px;198 padding-top:20px; 189 199 padding-bottom:10px; 190 200 top: 5px; … … 199 209 padding: 2px 6px; 200 210 position:absolute; 201 top: - 5px;211 top: -15px; 202 212 left: 5px; 203 213 } 204 214 205 215 /*****TABLES******/ 206 a.head_link:link, a.head_link:visited{ color: #d4ddd8; text-decoration: none }207 a.head_link:hover, a.head_link:focus{ color: #A47236; text-decoration: none }208 209 216 table.flat { 210 217 border-width: 5px; … … 240 247 text-align: center; 241 248 } 242 table.lined, table.lined td, table.lined td.h ead, table.lined td.hidden{249 table.lined, table.lined td, table.lined td.hidden, table.lined th{ 243 250 border: 1px solid #d4ddd8; 244 251 padding: 5px; 245 252 } 246 table.lined t d.head{253 table.lined th{ 247 254 background-color: #374341; 248 255 font-weight: bold; 249 256 font-size: 11px; 250 257 color:#d4ddd8; 258 padding: 5px; 259 } 260 table.lined th a:link, table.lined th a:visited{ 261 color:#d4ddd8; 262 } 263 table.lined th a:hover,table.lined th a:focus{ 264 color: #A47236; 265 text-decoration: none; 251 266 } 252 267 table.lined td{ … … 276 291 height: 24px; 277 292 border: 1px solid #585858; 278 } 279 280 tr td.bag div { 293 margin-left: 5px; 294 } 295 296 tr td.bag div, 297 tr td.bank div { 281 298 position: relative; 282 299 border: 0px; 283 300 margin: 2px; 284 background: url(../../img/INV/Slot_Bag.gif) repeat; 285 } 286 tr td.bag div div{ position: absolute; } 287 tr td.bag div div img{ 301 background-image: url(../../img/INV/Slot_Bag.gif); 302 background-repeat: repeat; 303 background-color: #242424; 304 } 305 tr td.bank div { 306 background-image: url(../../img/INV/Slot_Bank.gif); 307 background-color: #858585; 308 } 309 tr td.bag div div, 310 tr td.bank div div{ 311 position: absolute; 312 background: none; 313 } 314 tr td.bag div div img, 315 tr td.bank div div img{ 288 316 border: 0px; 289 317 padding: 1px; … … 291 319 height: 35px; 292 320 } 293 tr td.bag div.no_slot{ 321 tr td.bag div.no_slot, 322 tr td.bank div.no_slot{ 294 323 position: absolute; 295 margin: -1px;324 margin: 0px; 296 325 width: 86px; 297 326 height: 41px; 298 background: #b2c2b9; 327 background-image: url(../../img/INV/Slot_Bag_Out.gif); 328 } 329 tr td.bank div.no_slot{ 330 background-image: url(../../img/INV/Slot_Bank_Out.gif); 299 331 } 300 332 /*****TABLES END******/ … … 337 369 position:relative; 338 370 padding:7px 0px; 339 background :#d4ddd8;371 background-color:#d4ddd8; 340 372 margin-bottom:15px; 341 373 text-align: left; … … 343 375 div.bubble div.top { 344 376 text-align: center; 345 background :#b2c2b9;377 background-color:#b2c2b9; 346 378 padding:7px 15px; 347 379 margin:-7px -0px 12px -0px; … … 415 447 padding: 6px; 416 448 } 417 .no_border { 418 border: 0px; 419 padding: 0px; 420 } 449 421 450 .icon_border { 422 451 border: 0px; 423 452 padding: 0px; 424 width: 32px; height: 32px; 453 width: 32px; 454 height: 32px; 425 455 } 426 456 … … 439 469 background: url(gridline.gif) 15px bottom; 440 470 } 471 .bargraph th { 472 background: #d4ddd8; 473 } 441 474 442 475 a.graph_link:link, a.graph_link:visited{ color: #000000; text-decoration: none } … … 477 510 width:60%; 478 511 text-align:right; 512 margin-top: 3px; 513 color: #fff !important; 479 514 } 480 515 tr td.skill_bar{ 481 background-image: url(../../img/ skill_bar.png);516 background-image: url(../../img/bar_skill.png); 482 517 } 483 518 … … 497 532 background: #d4ddd8; 498 533 padding: 1em 2em; 499 500 534 } 501 535 #tab a:hover { … … 559 593 /*** item tooltips***/ 560 594 .item_tooltip td{ 561 float: none;562 font-size: 11px;563 color: #d4d4d4;595 float: none; 596 font-size: 11px; 597 color: #d4d4d4; 564 598 border:1px solid #F0D070; 565 599 padding:10px; 566 width: 220px;600 width:auto; 567 601 background-color:#000; 568 text-align: left;602 text-align: left; 569 603 filter:alpha(opacity=80); 570 604 -moz-opacity:.80; … … 572 606 } 573 607 .info_tooltip td{ 574 float: none;575 font-size: 11px;576 color: #d4d4d4;608 float: none; 609 font-size: 11px; 610 color: #d4d4d4; 577 611 border:0px solid #F0D070; 578 612 padding:10px; 579 width:2 20px;613 width:240px; 580 614 background-color:#000; 581 615 text-align:left; … … 584 618 opacity:0.85; 585 619 } 620 .answerbox { 621 font-size: 11px; 622 color: #d4d4d4; 623 border:1px solid #F0D070; 624 padding:10px; 625 width:auto; 626 background-color:#000; 627 text-align:center; 628 filter:alpha(opacity=85); 629 -moz-opacity:.85; 630 opacity:0.85; 631 } 632 .answerbox th { 633 font:16pt Trebuchet MS,sans-serif; 634 font-weight:bold; 635 color:#f6b620; 636 line-height:1.2em; 637 } 638 .answerbox td a { 639 float:none; 640 display: block; 641 } -
minimanager/templates/Malachite/Malachite_1280.css
r5 r19 7 7 * License: GNU General Public License (GPL) 8 8 */ 9 10 html,body { 11 background:#76827B; 9 html{ 10 overflow-x:auto; /* fixes MSIE scrollbar bug DO NOT REMOVE,has no effect in Mozilla,or Opera */ 11 /* http://www.blooberry.com/indexdot/css/properties/position/overflowx.htm */ 12 } 13 html,body{ 14 background-color:#76827B; 12 15 color:#000000; 13 16 height:100%; … … 15 18 margin:0; 16 19 font:10pt Verdana,sans-serif; 17 cursor: 20 cursor:default; 18 21 } 19 22 … … 50 53 left:22px; 51 54 top:37px; 52 z-index: 40;55 z-index:100; 53 56 width: 36em; /*total len*/ 54 57 text-align: left; … … 131 134 } 132 135 h1{ 133 margin:0 ;136 margin:0px; 134 137 font:16pt Trebuchet MS,sans-serif; 135 138 font-weight:bold; … … 141 144 } 142 145 input, input.mouseover, a.button { 143 border: 1px solid #76827B; 146 border-width: 1px; 147 border-style: solid; 148 border-color: #76827B; 144 149 background:#76827B; 145 150 font:10pt Verdana,sans-serif; … … 148 153 } 149 154 input { 150 background :#869c8f;155 background-color:#869c8f; 151 156 color:#414D4C; 152 157 padding:2px 1px; … … 154 159 margin-left: 2px; 155 160 } 156 select,textarea 161 select,textarea{ 157 162 border:1px solid #76827B; 158 163 background-color: #b2c2b9; 159 164 } 160 165 img { 166 border: 0px; 167 padding: 0px; 168 } 169 input[type="radio"],input[type="checkbox"]{ 170 background:none; 171 border:0px; 172 } 161 173 a.button { 162 /*background:transparent;*/163 174 background:#869c8f; 164 175 color: #414D4C; … … 170 181 margin-left: 3px; 171 182 } 172 173 183 a.button:visited{ 174 184 background-color: #869c8f; … … 186 196 position: relative; 187 197 margin-top:20px; 188 padding-top: 10px;198 padding-top:20px; 189 199 padding-bottom:10px; 190 200 top: 5px; … … 199 209 padding: 2px 6px; 200 210 position:absolute; 201 top: - 5px;211 top: -15px; 202 212 left: 5px; 203 213 } 204 214 205 215 /*****TABLES******/ 206 a.head_link:link, a.head_link:visited{ color: #d4ddd8; text-decoration: none }207 a.head_link:hover, a.head_link:focus{ color: #A47236; text-decoration: none }208 209 216 table.flat { 210 217 border-width: 5px; … … 240 247 text-align: center; 241 248 } 242 table.lined, table.lined td, table.lined td.h ead, table.lined td.hidden{249 table.lined, table.lined td, table.lined td.hidden, table.lined th{ 243 250 border: 1px solid #d4ddd8; 244 251 padding: 5px; 245 252 } 246 table.lined t d.head{253 table.lined th{ 247 254 background-color: #374341; 248 255 font-weight: bold; 249 font-size: 1 2px;256 font-size: 11px; 250 257 color:#d4ddd8; 258 padding: 5px; 259 } 260 table.lined th a:link, table.lined th a:visited{ 261 color:#d4ddd8; 262 } 263 table.lined th a:hover,table.lined th a:focus{ 264 color: #A47236; 265 text-decoration: none; 251 266 } 252 267 table.lined td{ … … 276 291 height: 24px; 277 292 border: 1px solid #585858; 278 } 279 280 tr td.bag div { 293 margin-left: 5px; 294 } 295 296 tr td.bag div, 297 tr td.bank div { 281 298 position: relative; 282 299 border: 0px; 283 300 margin: 2px; 284 background: url(../../img/INV/Slot_Bag.gif) repeat; 285 } 286 tr td.bag div div{ position: absolute; } 287 tr td.bag div div img{ 301 background-image: url(../../img/INV/Slot_Bag.gif); 302 background-repeat: repeat; 303 background-color: #242424; 304 } 305 tr td.bank div { 306 background-image: url(../../img/INV/Slot_Bank.gif); 307 background-color: #858585; 308 } 309 tr td.bag div div, 310 tr td.bank div div{ 311 position: absolute; 312 background: none; 313 } 314 tr td.bag div div img, 315 tr td.bank div div img{ 288 316 border: 0px; 289 317 padding: 1px; … … 291 319 height: 35px; 292 320 } 293 tr td.bag div.no_slot{ 321 tr td.bag div.no_slot, 322 tr td.bank div.no_slot{ 294 323 position: absolute; 295 margin: -1px;324 margin: 0px; 296 325 width: 86px; 297 326 height: 41px; 298 background: #b2c2b9; 327 background-image: url(../../img/INV/Slot_Bag_Out.gif); 328 } 329 tr td.bank div.no_slot{ 330 background-image: url(../../img/INV/Slot_Bank_Out.gif); 299 331 } 300 332 /*****TABLES END******/ … … 337 369 position:relative; 338 370 padding:7px 0px; 339 background :#d4ddd8;371 background-color:#d4ddd8; 340 372 margin-bottom:15px; 341 373 text-align: left; … … 343 375 div.bubble div.top { 344 376 text-align: center; 345 background :#b2c2b9;377 background-color:#b2c2b9; 346 378 padding:7px 15px; 347 379 margin:-7px -0px 12px -0px; … … 415 447 padding: 6px; 416 448 } 417 .no_border { 418 border: 0px; 419 padding: 0px; 420 } 449 421 450 .icon_border { 422 451 border: 0px; 423 452 padding: 0px; 424 width: 32px; height: 32px; 453 width: 32px; 454 height: 32px; 425 455 } 426 456 … … 480 510 width:60%; 481 511 text-align:right; 512 margin-top: 3px; 513 color: #fff !important; 482 514 } 483 515 tr td.skill_bar{ 484 background-image: url(../../img/ skill_bar.png);516 background-image: url(../../img/bar_skill.png); 485 517 } 486 518 … … 566 598 border:1px solid #F0D070; 567 599 padding:10px; 568 width: 220px;600 width:auto; 569 601 background-color:#000; 570 602 text-align: left; … … 573 605 opacity:0.80; 574 606 } 575 576 607 .info_tooltip td{ 577 608 float: none; … … 580 611 border:0px solid #F0D070; 581 612 padding:10px; 582 width:2 20px;613 width:240px; 583 614 background-color:#000; 584 text-align: 615 text-align:left; 585 616 filter:alpha(opacity=85); 586 617 -moz-opacity:.85; 587 618 opacity:0.85; 588 619 } 620 .answerbox { 621 font-size: 11px; 622 color: #d4d4d4; 623 border:1px solid #F0D070; 624 padding:10px; 625 width:auto; 626 background-color:#000; 627 text-align:center; 628 filter:alpha(opacity=85); 629 -moz-opacity:.85; 630 opacity:0.85; 631 } 632 .answerbox th { 633 font:16pt Trebuchet MS,sans-serif; 634 font-weight:bold; 635 color:#f6b620; 636 line-height:1.2em; 637 } 638 .answerbox td a { 639 float:none; 640 display: block; 641 } -
minimanager/templates/Sulfur/Sulfur_1024.css
r5 r19 7 7 * License: GNU General Public License (GPL) 8 8 */ 9 10 html,body { 11 background:#2a2a2a; 9 html{ 10 overflow-x:auto; /* fixes MSIE scrollbar bug DO NOT REMOVE,has no effect in Mozilla,or Opera */ 11 /* http://www.blooberry.com/indexdot/css/properties/position/overflowx.htm */ 12 } 13 html,body{ 14 background-color:#2a2a2a; 12 15 height:100%; 13 padding:0 ;16 padding:0px; /* required for Opera to have 0 margin */ 14 17 margin:0; 15 18 font:11pt Verdana,sans-serif; 16 cursor: 19 cursor:default; 17 20 } 18 21 … … 49 52 left:25px; 50 53 top:37px; 51 z-index: 40;54 z-index:100; 52 55 width: 36em; /*total len*/ 53 56 text-align: left; … … 133 136 } 134 137 h1{ 135 margin:0 ;138 margin:0px; 136 139 font:16pt Trebuchet MS,sans-serif; 137 140 font-weight:bold; … … 143 146 border: 1px solid #565656; 144 147 background:#2a2a2a; 145 font: 10pt Verdana,sans-serif;148 font: 10pt Verdana,sans-serif; 146 149 font-weight: bold; 147 150 line-height:100%; 148 151 } 149 152 input { 150 background:# a2a2a;153 background:#2a2a2a; 151 154 color:#d4d4d4; 152 155 padding:2px 1px; … … 154 157 margin-left: 2px; 155 158 } 156 select,textarea { 159 input[type="text"],input[type="password"]{ 160 background:#a2a2a; 161 } 162 input[type="text"]:hover, input[type="password"]:hover { 163 background:#2c2c2c; 164 border-color:#bbb; 165 cursor: default; 166 } 167 input[type="text"]:focus,input[type="password"]:focus { 168 background:#2a2a2a; 169 border-color:#f6b620; 170 } 171 input[type="radio"],input[type="checkbox"]{ 172 background:none; 173 border:0px; 174 } 175 select,textarea{ 157 176 color:#d4d4d4; 158 177 border:1px solid #565656; 159 178 background-color: #2a2a2a; 160 179 } 161 180 img { 181 border: 0px; 182 padding: 0px; 183 } 162 184 a.button { 163 185 background:#2a2a2a; … … 203 225 204 226 /*****TABLES******/ 205 a.head_link:link, a.head_link:visited{ color: #f6b620; text-decoration: none }206 a.head_link:hover, a.head_link:focus{ color: #ffee40; text-decoration: none }207 208 227 table.flat { 209 228 border-width: 5px; … … 244 263 padding: 5px; 245 264 } 246 table.lined, table.lined tr, t r.head, table.lined tr.hidden{265 table.lined, table.lined tr, table.lined tr.hidden{ 247 266 border-left: 1px solid #383838; 248 267 border-right: 1px solid #383838; 249 268 } 250 table.lined t d.head, table.lined tr th{269 table.lined tr th{ 251 270 background-color: #484848; 252 271 font-weight: bold; 253 272 font-size: 11px; 254 273 color:#f6b620; 274 padding: 5px; 255 275 } 256 276 table.lined td.hidden { … … 280 300 height: 24px; 281 301 border: 1px solid #585858; 282 } 283 284 tr td.bag div { 302 margin-left: 5px; 303 } 304 305 tr td.bag div, 306 tr td.bank div { 285 307 position: relative; 286 308 border: 0px; 287 309 margin: 2px; 288 background: url(../../img/INV/Slot_Bag.gif) repeat; 289 } 290 tr td.bag div div{ position: absolute; } 291 tr td.bag div div img{ 310 background-image: url(../../img/INV/Slot_Bag.gif); 311 background-repeat: repeat; 312 background-color: #242424; 313 } 314 tr td.bank div { 315 background-image: url(../../img/INV/Slot_Bank.gif); 316 background-color: #858585; 317 } 318 tr td.bag div div, 319 tr td.bank div div{ 320 position: absolute; 321 background: none; 322 } 323 tr td.bag div div img, 324 tr td.bank div div img{ 292 325 border: 0px; 293 326 padding: 1px; … … 295 328 height: 35px; 296 329 } 297 tr td.bag div.no_slot{ 330 tr td.bag div.no_slot, 331 tr td.bank div.no_slot{ 298 332 position: absolute; 299 margin: -1px;333 margin: 0px; 300 334 width: 86px; 301 335 height: 41px; 302 background: #565656; 336 background-image: url(../../img/INV/Slot_Bag_Out.gif); 337 } 338 tr td.bank div.no_slot{ 339 background-image: url(../../img/INV/Slot_Bank_Out.gif); 303 340 } 304 341 /*****TABLES END******/ … … 341 378 position:relative; 342 379 padding:7px 0px; 343 background :#383838;380 background-color:#383838; 344 381 margin-bottom:15px; 345 382 text-align: left; … … 348 385 div.bubble div.top { 349 386 text-align: center; 350 background :#565656;387 background-color:#565656; 351 388 padding:7px 15px; 352 389 margin:-7px -0px 12px -0px; … … 413 450 padding: 6px; 414 451 } 415 .no_border { 416 border: 0px; 417 padding: 0px; 418 } 452 419 453 .icon_border { 420 454 border: 0px; … … 472 506 tr td.bar span{ 473 507 float: left; 474 width: 60%;508 width:55%; 475 509 text-align:right; 510 margin-top: 3px; 511 color: #fff !important; 476 512 } 477 513 tr td.skill_bar{ 478 background-image: url(../../img/ skill_bar.png);514 background-image: url(../../img/bar_skill.png); 479 515 } 480 516 … … 558 594 border:1px solid #F0D070; 559 595 padding:10px; 560 width: 220px;596 width:auto; 561 597 background-color:#000; 562 598 text-align:left; … … 571 607 border:0px solid #F0D070; 572 608 padding:10px; 573 width:2 20px;609 width:240px; 574 610 background-color:#000; 575 611 text-align:left; … … 578 614 opacity:0.85; 579 615 } 616 617 .answerbox { 618 font-size: 11px; 619 color: #d4d4d4; 620 border:1px solid #F0D070; 621 padding:10px; 622 width:auto; 623 background-color:#000; 624 text-align:center; 625 filter:alpha(opacity=85); 626 -moz-opacity:.85; 627 opacity:0.85; 628 } 629 .answerbox th { 630 font:16pt Trebuchet MS,sans-serif; 631 font-weight:bold; 632 color:#f6b620; 633 line-height:1.2em; 634 } 635 .answerbox td a { 636 float:none; 637 display: block; 638 } -
minimanager/templates/Sulfur/Sulfur_1280.css
r5 r19 7 7 * License: GNU General Public License (GPL) 8 8 */ 9 10 html,body { 11 background:#2a2a2a; 9 html{ 10 overflow-x:auto; /* fixes MSIE scrollbar bug DO NOT REMOVE,has no effect in Mozilla,or Opera */ 11 /* http://www.blooberry.com/indexdot/css/properties/position/overflowx.htm */ 12 } 13 html,body{ 14 background-color:#2a2a2a; 12 15 height:100%; 13 padding:0 ;16 padding:0px; /* required for Opera to have 0 margin */ 14 17 margin:0; 15 18 font:11pt Verdana,sans-serif; 16 cursor: 19 cursor:default; 17 20 } 18 21 … … 49 52 left:25px; 50 53 top:37px; 51 z-index: 40;54 z-index:100; 52 55 width: 36em; /*total len*/ 53 56 text-align: left; … … 67 70 padding: 5px 15px 5px 15px; 68 71 border-right: 1px solid #565656; 69 font-size: . 85em;72 font-size: .90em; 70 73 color: #f6b620; /*main menu text color*/ 71 74 } … … 133 136 } 134 137 h1{ 135 margin:0 ;138 margin:0px; 136 139 font:16pt Trebuchet MS,sans-serif; 137 140 font-weight:bold; … … 143 146 border: 1px solid #565656; 144 147 background:#2a2a2a; 145 font: 10pt Verdana,sans-serif;148 font: 11pt Verdana,sans-serif; 146 149 font-weight: bold; 147 150 line-height:100%; 148 151 } 149 152 input { 150 background:# a2a2a;153 background:#2a2a2a; 151 154 color:#d4d4d4; 152 155 padding:2px 1px; … … 154 157 margin-left: 2px; 155 158 } 156 select,textarea { 159 input[type="text"],input[type="password"]{ 160 background-color:#a2a2a; 161 } 162 input[type="text"]:hover, input[type="password"]:hover { 163 background-color:#2c2c2c; 164 border-color:#bbb; 165 cursor: default; 166 } 167 input[type="text"]:focus,input[type="password"]:focus { 168 background:#2a2a2a; 169 border-color:#f6b620; 170 } 171 input[type="radio"],input[type="checkbox"]{ 172 background:none; 173 border:0px; 174 } 175 select,textarea{ 157 176 color:#d4d4d4; 158 177 border:1px solid #565656; 159 178 background-color: #2a2a2a; 160 179 } 161 180 img { 181 border: 0px; 182 padding: 0px; 183 } 162 184 a.button { 163 185 background:#2a2a2a; … … 203 225 204 226 /*****TABLES******/ 205 a.head_link:link, a.head_link:visited{ color: #f6b620; text-decoration: none }206 a.head_link:hover, a.head_link:focus{ color: #ffee40; text-decoration: none }207 208 227 table.flat { 209 228 border-width: 5px; … … 239 258 text-align: center; 240 259 } 241 table.lined, table.lined td, table.lined td.h ead, table.lined td.hidden{260 table.lined, table.lined td, table.lined td.hidden{ 242 261 border-bottom: 1px solid #383838; 243 262 border-top: 1px solid #383838; 244 263 padding: 5px; 245 264 } 246 table.lined, table.lined tr, t r.head, table.lined tr.hidden{265 table.lined, table.lined tr, table.lined tr.hidden{ 247 266 border-left: 1px solid #383838; 248 267 border-right: 1px solid #383838; 249 268 } 250 table.lined t d.head, table.lined tr th{269 table.lined tr th{ 251 270 background-color: #484848; 252 271 font-weight: bold; 253 font-size: 1 1px;272 font-size: 12px; 254 273 color:#f6b620; 274 padding: 5px; 255 275 } 256 276 table.lined td.hidden { … … 280 300 height: 24px; 281 301 border: 1px solid #585858; 282 } 283 284 tr td.bag div { 302 margin-left: 5px; 303 } 304 305 tr td.bag div, 306 tr td.bank div { 285 307 position: relative; 286 308 border: 0px; 287 309 margin: 2px; 288 background: url(../../img/INV/Slot_Bag.gif) repeat; 289 } 290 tr td.bag div div{ position: absolute; } 291 tr td.bag div div img{ 310 background-image: url(../../img/INV/Slot_Bag.gif); 311 background-repeat: repeat; 312 background-color: #242424; 313 } 314 tr td.bank div { 315 background-image: url(../../img/INV/Slot_Bank.gif); 316 background-color: #858585; 317 } 318 tr td.bag div div, 319 tr td.bank div div{ 320 position: absolute; 321 background: none; 322 } 323 tr td.bag div div img, 324 tr td.bank div div img{ 292 325 border: 0px; 293 326 padding: 1px; … … 295 328 height: 35px; 296 329 } 297 tr td.bag div.no_slot{ 330 tr td.bag div.no_slot, 331 tr td.bank div.no_slot{ 298 332 position: absolute; 299 margin: -1px;333 margin: 0px; 300 334 width: 86px; 301 335 height: 41px; 302 background: #565656; 336 background-image: url(../../img/INV/Slot_Bag_Out.gif); 337 } 338 tr td.bank div.no_slot{ 339 background-image: url(../../img/INV/Slot_Bank_Out.gif); 303 340 } 304 341 /*****TABLES END******/ … … 341 378 position:relative; 342 379 padding:7px 0px; 343 background :#383838;380 background-color:#383838; 344 381 margin-bottom:15px; 345 382 text-align: left; … … 348 385 div.bubble div.top { 349 386 text-align: center; 350 background :#565656;387 background-color:#565656; 351 388 padding:7px 15px; 352 389 margin:-7px -0px 12px -0px; … … 413 450 padding: 6px; 414 451 } 415 .no_border {416 border: 0px;417 padding: 0px;418 }419 452 .icon_border { 420 453 border: 0px; … … 472 505 tr td.bar span{ 473 506 float: left; 474 width: 60%;507 width:55%; 475 508 text-align:right; 509 margin-top: 3px; 510 color: #fff !important; 511 } 512 tr td.bar span.rank{ 513 position: absolute; 514 text-align: left; 515 width: auto; 476 516 } 477 517 tr td.skill_bar{ 478 background-image: url(../../img/ skill_bar.png);518 background-image: url(../../img/bar_skill.png); 479 519 } 480 520 … … 558 598 border:1px solid #F0D070; 559 599 padding:10px; 560 width: 220px;600 width:auto; 561 601 background-color:#000; 562 602 text-align:left; … … 571 611 border:0px solid #F0D070; 572 612 padding:10px; 573 width:2 20px;613 width:240px; 574 614 background-color:#000; 575 615 text-align:left; … … 578 618 opacity:0.85; 579 619 } 620 .answerbox { 621 float: none; 622 font-size: 11px; 623 color: #d4d4d4; 624 border:1px solid #F0D070; 625 padding:10px; 626 width:auto; 627 background-color:#000; 628 text-align:center; 629 filter:alpha(opacity=85); 630 -moz-opacity:.85; 631 opacity:0.85; 632 } 633 .answerbox th { 634 font:16pt Trebuchet MS,sans-serif; 635 font-weight:bold; 636 color:#f6b620; 637 line-height:1.2em; 638 } 639 .answerbox td a { 640 float:none; 641 display: block; 642 } -
minimanager/ticket.php
r5 r19 31 31 function browse_tickets() { 32 32 global $lang_global, $lang_ticket, $output, $mangos_db, $realm_id, $itemperpage, $ticket_type; 33 $itemperpage = 2; 34 $ mysql = new MySQL;35 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);36 37 $start = (isset($_GET['start'])) ? $ mysql->quote_smart($_GET['start']) : 0;38 39 $order_by = (isset($_GET['order_by'])) ? $ mysql->quote_smart($_GET['order_by']) : "ticket_id";40 $dir = (isset($_GET['dir'])) ? $ mysql->quote_smart($_GET['dir']) : 1;33 34 $sql = new SQL; 35 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 36 37 $start = (isset($_GET['start'])) ? $sql->quote_smart($_GET['start']) : 0; 38 39 $order_by = (isset($_GET['order_by'])) ? $sql->quote_smart($_GET['order_by']) : "ticket_id"; 40 $dir = (isset($_GET['dir'])) ? $sql->quote_smart($_GET['dir']) : 1; 41 41 $order_dir = ($dir) ? "ASC" : "DESC"; 42 42 $dir = ($dir) ? 0 : 1; 43 43 44 44 //get total number of items 45 $query_1 = $ mysql->query("SELECT count(*) FROM character_ticket");46 $all_record = $ mysql->result($query_1,0);47 48 $query = $ mysql->query("SELECT character_ticket.ticket_id, character_ticket.guid,SUBSTRING_INDEX(character_ticket.ticket_text,' ',6),45 $query_1 = $sql->query("SELECT count(*) FROM character_ticket"); 46 $all_record = $sql->result($query_1,0); 47 48 $query = $sql->query("SELECT character_ticket.ticket_id, character_ticket.guid,SUBSTRING_INDEX(character_ticket.ticket_text,' ',6), 49 49 character_ticket.ticket_category,`character`.name 50 50 FROM character_ticket,`character` … … 52 52 WHERE character_ticket.guid = `character`.`guid` 53 53 ORDER BY $order_by $order_dir LIMIT $start, $itemperpage"); 54 $this_page = $ mysql->num_rows($query);54 $this_page = $sql->num_rows($query); 55 55 56 56 $output .="<script type=\"text/javascript\" src=\"js/check.js\"></script> … … 65 65 <table class=\"lined\"> 66 66 <tr> 67 <t d width=\"5%\" class=\"head\"><input name=\"allbox\" type=\"checkbox\" value=\"Check All\" onclick=\"CheckAll(document.form);\" /></td>68 <t d width=\"5%\" class=\"head\">{$lang_global['edit']}</td>69 <t d width=\"8%\" class=\"head\"><a href=\"ticket.php?order_by=ticket_id&start=$start&dir=$dir\" class=\"head_link\">{$lang_ticket['id']}</a></td>70 <t d width=\"15%\" class=\"head\"><a href=\"ticket.php?order_by=guid&start=$start&dir=$dir\" class=\"head_link\">{$lang_ticket['sender']}</a></td>71 <t d width=\"55%\" class=\"head\"><a href=\"ticket.php?order_by=ticket_text&start=$start&dir=$dir\" class=\"head_link\">{$lang_ticket['ticket_text']}</a></td>72 <t d width=\"13%\" class=\"head\"><a href=\"ticket.php?order_by=ticket_category&start=$start&dir=$dir\" class=\"head_link\">{$lang_ticket['category']}</a></td>67 <th width=\"5%\"><input name=\"allbox\" type=\"checkbox\" value=\"Check All\" onclick=\"CheckAll(document.form);\" /></th> 68 <th width=\"5%\">{$lang_global['edit']}</th> 69 <th width=\"8%\"><a href=\"ticket.php?order_by=ticket_id&start=$start&dir=$dir\">".($order_by=='ticket_id' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_ticket['id']}</a></th> 70 <th width=\"15%\"><a href=\"ticket.php?order_by=guid&start=$start&dir=$dir\">".($order_by=='guid' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_ticket['sender']}</a></th> 71 <th width=\"55%\">{$lang_ticket['ticket_text']}</th> 72 <th width=\"13%\"><a href=\"ticket.php?order_by=ticket_category&start=$start&dir=$dir\">".($order_by=='ticket_category' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_ticket['category']}</a></tthd> 73 73 </tr>"; 74 74 75 while ($ticket = $ mysql->fetch_row($query)){75 while ($ticket = $sql->fetch_row($query)){ 76 76 $output .= "<tr> 77 77 <td><input type=\"checkbox\" name=\"check[]\" value=\"$ticket[0]\" onclick=\"CheckCheckAll(document.form);\" /></td> … … 94 94 </form><br /></center>"; 95 95 96 $ mysql->close();96 $sql->close(); 97 97 } 98 98 … … 104 104 global $lang_global, $mangos_db, $realm_id; 105 105 106 $ mysql = new MySQL;107 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);108 109 if(isset($_GET['check'])) $check = $ mysql->quote_smart($_GET['check']);106 $sql = new SQL; 107 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 108 109 if(isset($_GET['check'])) $check = $sql->quote_smart($_GET['check']); 110 110 else redirect("ticket.php?error=1"); 111 111 … … 114 114 for ($i=0; $i<count($check); $i++) { 115 115 if ($check[$i] != "" ) { 116 $query = $ mysql->query("DELETE FROM character_ticket WHERE ticket_id = '$check[$i]'");116 $query = $sql->query("DELETE FROM character_ticket WHERE ticket_id = '$check[$i]'"); 117 117 $deleted_tickets++; 118 118 } 119 119 } 120 120 121 $ mysql->close();121 $sql->close(); 122 122 123 123 if ($deleted_tickets == 0) redirect("ticket.php?error=3"); … … 132 132 global $lang_global, $lang_ticket, $output, $mangos_db, $realm_id, $ticket_type; 133 133 134 $ mysql = new MySQL;135 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);136 137 if(isset($_GET['id'])) $id = $ mysql->quote_smart($_GET['id']);134 $sql = new SQL; 135 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 136 137 if(isset($_GET['id'])) $id = $sql->quote_smart($_GET['id']); 138 138 else redirect("ticket.php?error=1"); 139 139 140 $query = $ mysql->query("SELECT character_ticket.guid, character_ticket.ticket_text,140 $query = $sql->query("SELECT character_ticket.guid, character_ticket.ticket_text, 141 141 character_ticket.ticket_category,`character`.name 142 142 FROM character_ticket,`character` … … 144 144 WHERE character_ticket.guid = `character`.`guid` AND character_ticket.ticket_id = '$id'"); 145 145 146 if ($ticket = $ mysql->fetch_row($query)) {146 if ($ticket = $sql->fetch_row($query)) { 147 147 $output .= "<center> 148 148 <fieldset style=\"width: 550px;\"> … … 189 189 } else error($lang_global['err_no_records_found']); 190 190 191 $ mysql->close();191 $sql->close(); 192 192 } 193 193 … … 203 203 } 204 204 205 $ mysql = new MySQL;206 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);207 208 $new_category = $ mysql->quote_smart($_POST['new_category']);209 $new_text = $ mysql->quote_smart($_POST['new_text']);210 $id = $ mysql->quote_smart($_POST['id']);211 212 $query = $ mysql->query("UPDATE character_ticket SET ticket_text='$new_text', ticket_category ='$new_category' WHERE ticket_id = '$id'");213 214 if ( mysql_affected_rows()) {215 $ mysql->close();205 $sql = new SQL; 206 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 207 208 $new_category = $sql->quote_smart($_POST['new_category']); 209 $new_text = $sql->quote_smart($_POST['new_text']); 210 $id = $sql->quote_smart($_POST['id']); 211 212 $query = $sql->query("UPDATE character_ticket SET ticket_text='$new_text', ticket_category ='$new_category' WHERE ticket_id = '$id'"); 213 214 if ($sql->affected_rows()) { 215 $sql->close(); 216 216 redirect("ticket.php?error=5"); 217 217 } else { 218 $ mysql->close();218 $sql->close(); 219 219 redirect("ticket.php?error=6"); 220 220 } -
minimanager/user.php
r5 r19 19 19 global $lang_global, $lang_user, $output, $realm_db, $itemperpage, $user_lvl, $user_name, $gm_level_arr; 20 20 21 $ mysql = new MySQL;22 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);23 24 $start = (isset($_GET['start'])) ? $ mysql->quote_smart($_GET['start']) : 0;25 $order_by = (isset($_GET['order_by'])) ? $ mysql->quote_smart($_GET['order_by']) : "id";21 $sql = new SQL; 22 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 23 24 $start = (isset($_GET['start'])) ? $sql->quote_smart($_GET['start']) : 0; 25 $order_by = (isset($_GET['order_by'])) ? $sql->quote_smart($_GET['order_by']) : "id"; 26 26 27 $dir = (isset($_GET['dir'])) ? $ mysql->quote_smart($_GET['dir']) : 1;27 $dir = (isset($_GET['dir'])) ? $sql->quote_smart($_GET['dir']) : 1; 28 28 $order_dir = ($dir) ? "ASC" : "DESC"; 29 29 $dir = ($dir) ? 0 : 1; 30 30 31 31 //get total number of items 32 $query_1 = $ mysql->query("SELECT count(*) FROM account");33 $all_record = $ mysql->result($query_1,0);34 35 $query = $ mysql->query("SELECT id,username,gmlevel,email,joindate,last_ip,failed_logins,locked,last_login,online32 $query_1 = $sql->query("SELECT count(*) FROM account"); 33 $all_record = $sql->result($query_1,0); 34 35 $query = $sql->query("SELECT id,username,gmlevel,email,joindate,last_ip,failed_logins,locked,last_login,online 36 36 FROM account ORDER BY $order_by $order_dir LIMIT $start, $itemperpage"); 37 $this_page = $ mysql->num_rows($query);37 $this_page = $sql->num_rows($query); 38 38 39 39 //==========================top tage navigaion starts here======================== … … 56 56 <input type=\"text\" size=\"42\" maxlength=\"50\" name=\"search_value\" /> 57 57 <select name=\"search_by\"> 58 <option value=\"username\">{$lang_user['by_name']}</option> 58 59 <option value=\"id\">{$lang_user['by_id']}</option> 59 <option value=\"username\">{$lang_user['by_name']}</option>60 60 <option value=\"gmlevel\">{$lang_user['by_gm_level']}</option> 61 61 <option value=\"greater_gmlevel\">{$lang_user['greater_gm_level']}</option> … … 82 82 <table class=\"lined\"> 83 83 <tr> 84 <t d width=\"1%\" class=\"head\"><input name=\"allbox\" type=\"checkbox\" value=\"Check All\" onclick=\"CheckAll(document.form1);\" /></td>85 <t d width=\"5%\" class=\"head\"><a href=\"user.php?order_by=id&start=$start&dir=$dir\" class=\"head_link\">{$lang_user['id']}</a></td>86 <t d width=\"23%\" class=\"head\"><a href=\"user.php?order_by=username&start=$start&dir=$dir\" class=\"head_link\">{$lang_user['username']}</a></td>87 <t d width=\"5%\" class=\"head\"><a href=\"user.php?order_by=gmlevel&start=$start&dir=$dir\" class=\"head_link\">{$lang_user['gm_level']}</a></td>88 <t d width=\"17%\" class=\"head\"><a href=\"user.php?order_by=email&start=$start&dir=$dir\" class=\"head_link\">{$lang_user['email']}</a></td>89 <t d width=\"14%\" class=\"head\"><a href=\"user.php?order_by=joindate&start=$start&dir=$dir\" class=\"head_link\">{$lang_user['join_date']}</a></td>90 <t d width=\"10%\" class=\"head\"><a href=\"user.php?order_by=last_ip&start=$start&dir=$dir\" class=\"head_link\">{$lang_user['ip']}</a></td>91 <t d width=\"5%\" class=\"head\"><a href=\"user.php?order_by=failed_logins&start=$start&dir=$dir\" class=\"head_link\">{$lang_user['failed_logins']}</a></td>92 <t d width=\"3%\" class=\"head\"><a href=\"user.php?order_by=locked&start=$start&dir=$dir\" class=\"head_link\">{$lang_user['locked']}</a></td>93 <t d width=\"14%\" class=\"head\"><a href=\"user.php?order_by=last_login&start=$start&dir=$dir\" class=\"head_link\">{$lang_user['last_login']}</a></td>94 <t d width=\"3%\" class=\"head\"><a href=\"user.php?order_by=online&start=$start&dir=$dir\" class=\"head_link\">{$lang_user['online']}</a></td>84 <th width=\"1%\"><input name=\"allbox\" type=\"checkbox\" value=\"Check All\" onclick=\"CheckAll(document.form1);\" /></th> 85 <th width=\"5%\"><a href=\"user.php?order_by=id&start=$start&dir=$dir\">".($order_by=='id' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_user['id']}</a></th> 86 <th width=\"23%\"><a href=\"user.php?order_by=username&start=$start&dir=$dir\">".($order_by=='username' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_user['username']}</a></th> 87 <th width=\"5%\"><a href=\"user.php?order_by=gmlevel&start=$start&dir=$dir\">".($order_by=='gmlevel' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_user['gm_level']}</a></th> 88 <th width=\"17%\"><a href=\"user.php?order_by=email&start=$start&dir=$dir\">".($order_by=='email' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_user['email']}</a></th> 89 <th width=\"14%\"><a href=\"user.php?order_by=joindate&start=$start&dir=$dir\">".($order_by=='joindate' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_user['join_date']}</a></th> 90 <th width=\"10%\"><a href=\"user.php?order_by=last_ip&start=$start&dir=$dir\">".($order_by=='last_ip' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_user['ip']}</a></th> 91 <th width=\"5%\"><a href=\"user.php?order_by=failed_logins&start=$start&dir=$dir\">".($order_by=='failed_logins' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_user['failed_logins']}</a></th> 92 <th width=\"3%\"><a href=\"user.php?order_by=locked&start=$start&dir=$dir\">".($order_by=='locked' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_user['locked']}</a></th> 93 <th width=\"14%\"><a href=\"user.php?order_by=last_login&start=$start&dir=$dir\">".($order_by=='last_login' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_user['last_login']}</a></th> 94 <th width=\"3%\"><a href=\"user.php?order_by=online&start=$start&dir=$dir\">".($order_by=='online' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_user['online']}</a></th> 95 95 </tr>"; 96 96 97 $looping = ($this_page < $itemperpage) ? $this_page : $itemperpage; 98 99 for ($i=1; $i<=$looping; $i++) { 100 $data = $mysql->fetch_row($query); 97 while ($data = $sql->fetch_row($query)){ 98 101 99 if (($user_lvl >= $data[2])||($user_name == $data[1])){ 102 100 $output .= "<tr>"; … … 113 111 <td>".(($data[7]) ? $lang_global['yes_low'] : "-")."</td> 114 112 <td class=\"small\">$data[8]</td> 115 <td>".(($data[9]) ? " ON" : "-")."</td>113 <td>".(($data[9]) ? "<img src=\"img/up.gif\" alt=\"\" />" : "-")."</td> 116 114 </tr>"; 117 115 } else { … … 130 128 </table></form><br /></center>"; 131 129 132 $ mysql->close();130 $sql->close(); 133 131 } 134 132 … … 142 140 if(!isset($_GET['search_value']) || !isset($_GET['search_by'])) redirect("user.php?error=2"); 143 141 144 $ mysql = new MySQL;145 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);146 147 $search_value = $ mysql->quote_smart($_GET['search_value']);148 $search_by = $ mysql->quote_smart($_GET['search_by']);149 150 $order_by = (isset($_GET['order_by'])) ? $ mysql->quote_smart($_GET['order_by']) : "id";151 $dir = (isset($_GET['dir'])) ? $ mysql->quote_smart($_GET['dir']) : 1;142 $sql = new SQL; 143 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 144 145 $search_value = $sql->quote_smart($_GET['search_value']); 146 $search_by = $sql->quote_smart($_GET['search_by']); 147 148 $order_by = (isset($_GET['order_by'])) ? $sql->quote_smart($_GET['order_by']) : "id"; 149 $dir = (isset($_GET['dir'])) ? $sql->quote_smart($_GET['dir']) : 1; 152 150 $order_dir = ($dir) ? "ASC" : "DESC"; 153 151 $dir = ($dir) ? 0 : 1; … … 156 154 157 155 case "greater_gmlevel": 158 $sql = "SELECT id,username,gmlevel,email,joindate,last_ip,failed_logins,locked,last_login,online156 $sql_query = "SELECT id,username,gmlevel,email,joindate,last_ip,failed_logins,locked,last_login,online 159 157 FROM account WHERE gmlevel > $search_value ORDER BY $order_by $order_dir LIMIT $sql_search_limit"; 160 158 break; 161 159 162 160 case "banned": 163 $sql = "SELECT id,username,gmlevel,email,joindate,last_ip,failed_logins,locked,last_login,online161 $sql_query = "SELECT id,username,gmlevel,email,joindate,last_ip,failed_logins,locked,last_login,online 164 162 FROM account WHERE id = 0 "; 165 $que = $ mysql->query("SELECT id FROM account_banned");166 while ($banned = mysql_fetch_row($que)) $sql.= "OR id =$banned[0] ";167 $sql .= " ORDER BY $order_by $order_dir LIMIT $sql_search_limit";163 $que = $sql->query("SELECT id FROM account_banned"); 164 while ($banned = $sql->fetch_row($que)) $sql_query .= "OR id =$banned[0] "; 165 $sql_query .= " ORDER BY $order_by $order_dir LIMIT $sql_search_limit"; 168 166 break; 169 167 170 168 case "failed_logins": 171 $sql = "SELECT id,username,gmlevel,email,joindate,last_ip,failed_logins,locked,last_login,online169 $sql_query = "SELECT id,username,gmlevel,email,joindate,last_ip,failed_logins,locked,last_login,online 172 170 FROM account WHERE failed_logins > $search_value ORDER BY $order_by $order_dir LIMIT $sql_search_limit"; 173 171 break; 174 172 175 173 default: 176 $sql = "SELECT id,username,gmlevel,email,joindate,last_ip,failed_logins,locked,last_login,online174 $sql_query = "SELECT id,username,gmlevel,email,joindate,last_ip,failed_logins,locked,last_login,online 177 175 FROM account WHERE $search_by LIKE '%$search_value%' ORDER BY $order_by $order_dir LIMIT $sql_search_limit"; 178 176 } 179 177 180 $query = $ mysql->query($sql);181 $total_found = $ mysql->num_rows($query);178 $query = $sql->query($sql_query); 179 $total_found = $sql->num_rows($query); 182 180 183 181 //==========================top tage navigaion starts here======================== … … 192 190 <input type=\"text\" size=\"32\" maxlength=\"50\" name=\"search_value\" /> 193 191 <select name=\"search_by\"> 192 <option value=\"username\">{$lang_user['by_name']}</option> 194 193 <option value=\"id\">{$lang_user['by_id']}</option> 195 <option value=\"username\">{$lang_user['by_name']}</option>196 194 <option value=\"gmlevel\">{$lang_user['by_gm_level']}</option> 197 195 <option value=\"greater_gmlevel\">{$lang_user['greater_gm_level']}</option> … … 216 214 <table class=\"lined\"> 217 215 <tr> 218 <t d width=\"1%\" class=\"head\"><input name=\"allbox\" type=\"checkbox\" value=\"Check All\" onclick=\"CheckAll(document.form1);\" /></td>219 <t d width=\"5%\" class=\"head\"><a href=\"user.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=id&dir=$dir\" class=\"head_link\">{$lang_user['id']}</a></td>220 <t d width=\"23%\" class=\"head\"><a href=\"user.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=username&dir=$dir\" class=\"head_link\">{$lang_user['username']}</a></td>221 <t d width=\"5%\" class=\"head\"><a href=\"user.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=gmlevel&dir=$dir\" class=\"head_link\">{$lang_user['gm_level']}</a></td>222 <t d width=\"17%\" class=\"head\"><a href=\"user.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=email&dir=$dir\" class=\"head_link\">{$lang_user['email']}</a></td>223 <t d width=\"14%\" class=\"head\"><a href=\"user.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=joindate&dir=$dir\" class=\"head_link\">{$lang_user['join_date']}</a></td>224 <t d width=\"10%\" class=\"head\"><a href=\"user.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=last_ip&dir=$dir\" class=\"head_link\">{$lang_user['ip']}</a></td>225 <t d width=\"5%\" class=\"head\"><a href=\"user.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=failed_logins&dir=$dir\" class=\"head_link\">{$lang_user['failed_logins']}</a></td>226 <t d width=\"3%\" class=\"head\"><a href=\"user.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=locked&dir=$dir\" class=\"head_link\">{$lang_user['locked']}</a></td>227 <t d width=\"14%\" class=\"head\"><a href=\"user.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=last_login&dir=$dir\" class=\"head_link\">{$lang_user['last_login']}</a></td>228 <t d width=\"3%\" class=\"head\"><a href=\"user.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=online&dir=$dir\" class=\"head_link\">{$lang_user['online']}</a></td>216 <th width=\"1%\"><input name=\"allbox\" type=\"checkbox\" value=\"Check All\" onclick=\"CheckAll(document.form1);\" /></th> 217 <th width=\"5%\"><a href=\"user.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=id&dir=$dir\">".($order_by=='id' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_user['id']}</a></th> 218 <th width=\"23%\"><a href=\"user.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=username&dir=$dir\">".($order_by=='username' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_user['username']}</a></th> 219 <th width=\"5%\"><a href=\"user.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=gmlevel&dir=$dir\">".($order_by=='gmlevel' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_user['gm_level']}</a></th> 220 <th width=\"17%\><a href=\"user.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=email&dir=$dir\">".($order_by=='email' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_user['email']}</a></th> 221 <th width=\"14%\"><a href=\"user.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=joindate&dir=$dir\">".($order_by=='joindate' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_user['join_date']}</a></th> 222 <th width=\"10%\"><a href=\"user.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=last_ip&dir=$dir\">".($order_by=='last_ip' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_user['ip']}</a></th> 223 <th width=\"5%\"><a href=\"user.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=failed_logins&dir=$dir\">".($order_by=='failed_logins' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_user['failed_logins']}</a></th> 224 <th width=\"3%\"><a href=\"user.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=locked&dir=$dir\">".($order_by=='locked' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_user['locked']}</a></th> 225 <th width=\"14%\"><a href=\"user.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=last_login&dir=$dir\">".($order_by=='last_login' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_user['last_login']}</a></th> 226 <th width=\"3%\"><a href=\"user.php?action=search&error=3&search_value=$search_value&search_by=$search_by&order_by=online&dir=$dir\">".($order_by=='online' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_user['online']}</a></th> 229 227 </tr>"; 230 228 231 for ($i=1; $i<=$total_found; $i++){ 232 $data = $mysql->fetch_row($query); 233 234 //to disalow lower lvl gm to view accounts of other gms same or bigger lvl 229 while ($data = $sql->fetch_row($query)){ 230 235 231 if (($user_lvl >= $data[2])||($user_name == $data[1])){ 236 232 $output .= "<tr>"; … … 247 243 <td>".(($data[7]) ? $lang_global['yes_low'] : "-")."</td> 248 244 <td class=\"small\">$data[8]</td> 249 <td>".(($data[9]) ? " ON" : "-")."</td>245 <td>".(($data[9]) ? "<img src=\"img/up.gif\" alt=\"\" />" : "-")."</td> 250 246 </tr>"; 251 247 }else{ … … 265 261 </form><br /></center>"; 266 262 267 $ mysql->close();263 $sql->close(); 268 264 } 269 265 … … 273 269 //####################################################################################################### 274 270 function del_user() { 275 global $lang_global, $lang_user, $output ;271 global $lang_global, $lang_user, $output, $realm_db; 276 272 if(isset($_GET['check'])) $check = $_GET['check']; 277 273 else redirect("user.php?error=1"); … … 287 283 } 288 284 289 $output .= "<center><h1><font class=\"error\">{$lang_global['are_you_sure']}</font></h1><br />"; 290 $output .= "<font class=\"bold\">{$lang_user['acc_ids']}: "; 291 285 $output .= "<center><img src=\"img/warn_red.gif\" width=\"48\" height=\"48\" alt=\"\" /> 286 <h1><font class=\"error\">{$lang_global['are_you_sure']}</font></h1><br /> 287 <font class=\"bold\">{$lang_user['acc_ids']}: "; 288 289 $sql = new SQL; 290 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 291 292 292 for ($i=0; $i<count($check); $i++){ 293 $output .= "<a href=\"user.php?action=edit_user&id=$check[$i]\" target=\"_blank\">$check[$i], </a>"; 293 $username = $sql->result($sql->query("SELECT username FROM `account` WHERE id = {$check[$i]}"),0); 294 $output .= "<a href=\"user.php?action=edit_user&id=$check[$i]\" target=\"_blank\">$username, </a>"; 294 295 $pass_array .= "&check%5B%5D=$check[$i]"; 295 296 } 296 297 $output .= "{$lang_global['will_be_erased']}</font><br /><br />"; 298 $output .= "<table class=\"hidden\"> 297 $sql->close(); 298 299 $output .= "<br />{$lang_global['will_be_erased']}</font><br /><br /> 300 <table class=\"hidden\"> 299 301 <tr><td>"; 300 302 makebutton($lang_global['yes'], "user.php?action=dodel_user$pass_array",120); … … 302 304 $output .= "</td></tr> 303 305 </table></center><br />"; 306 304 307 } 305 308 … … 312 315 $tab_del_user_mangos, $tab_del_user_realmd; 313 316 314 $ mysql = new MySQL;315 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);316 317 if(isset($_GET['check'])) $check = $ mysql->quote_smart($_GET['check']);317 $sql = new SQL; 318 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 319 320 if(isset($_GET['check'])) $check = $sql->quote_smart($_GET['check']); 318 321 else redirect("user.php?error=1"); 319 322 … … 331 334 } 332 335 } 333 $ mysql->close();336 $sql->close(); 334 337 $output .= "<center>"; 335 338 if ($deleted_acc == 0) $output .= "<h1><font class=\"error\">{$lang_user['no_acc_deleted']}</font></h1>"; … … 353 356 global $lang_global, $lang_user, $output, $realm_db, $mangos_db, $realm_id, $user_lvl,$backup_dir; 354 357 355 $ mysql = new MySQL;356 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);357 358 if(isset($_GET['check'])) $check = $ mysql->quote_smart($_GET['check']);358 $sql = new SQL; 359 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 360 361 if(isset($_GET['check'])) $check = $sql->quote_smart($_GET['check']); 359 362 else redirect("user.php?error=1"); 360 363 … … 365 368 for ($t=0; $t<count($check); $t++) { 366 369 if ($check[$t] != "" ) { 367 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);368 369 $query = $ mysql->query("SELECT id FROM account WHERE id = $check[$t]");370 $acc = $ mysql->fetch_array($query);370 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 371 372 $query = $sql->query("SELECT id FROM account WHERE id = $check[$t]"); 373 $acc = $sql->fetch_array($query); 371 374 372 375 $file_name_new = $acc[0]."_{$realm_db['name']}.sql"; … … 377 380 378 381 foreach ($tab_backup_user_realmd as $value) { 379 $acc_query = $ mysql->query("SELECT * FROM $value[0] WHERE $value[1] = $acc[0]");380 $num_fields = $mysql->num_fields($acc_query);381 $numrow = $ mysql->num_rows($acc_query);382 $acc_query = $sql->query("SELECT * FROM $value[0] WHERE $value[1] = $acc[0]"); 383 $num_fields = $sql->num_fields($acc_query); 384 $numrow = $sql->num_rows($acc_query); 382 385 383 386 $result = "-- Dumping data for $value[0] ".date("m.d.y_H.i.s")."\n"; … … 389 392 390 393 for($count = 0; $count < $num_fields; $count++) { 391 $result .= "`". mysql_field_name($acc_query,$count)."`";394 $result .= "`".$sql->field_name($acc_query,$count)."`"; 392 395 if ($count < ($num_fields-1)) $result .= ","; 393 396 } … … 396 399 for ($i =0; $i<$numrow; $i++) { 397 400 $result .= "\t("; 398 $row = $ mysql->fetch_row($acc_query);401 $row = $sql->fetch_row($acc_query); 399 402 for($j=0; $j<$num_fields; $j++) { 400 403 $row[$j] = addslashes($row[$j]); 401 404 $row[$j] = ereg_replace("\n","\\n",$row[$j]); 402 405 if (isset($row[$j])) { 403 if ( mysql_field_type($acc_query,$j) == "int") $result .= "$row[$j]";406 if ($sql->field_type($acc_query,$j) == "int") $result .= "$row[$j]"; 404 407 else $result .= "'$row[$j]'" ; 405 408 }else $result .= "''"; … … 422 425 fwrite($fp, "USE {$db['name']};\n\n")or die (error($lang_backup['file_write_err'])); 423 426 424 $ mysql->connect($db['addr'], $db['user'], $db['pass'], $db['name']);425 $all_char_query = $ mysql->query("SELECT guid,name FROM `character` WHERE account = $acc[0]");427 $sql->connect($db['addr'], $db['user'], $db['pass'], $db['name']); 428 $all_char_query = $sql->query("SELECT guid,name FROM `character` WHERE account = $acc[0]"); 426 429 427 while ($char = $ mysql->fetch_array($all_char_query)){430 while ($char = $sql->fetch_array($all_char_query)){ 428 431 fwrite($fp, "-- Dumping data for character $char[1]\n")or die (error($lang_backup['file_write_err'])); 429 432 foreach ($tab_backup_user_mangos as $value) { 430 $char_query = $ mysql->query("SELECT * FROM $value[0] WHERE $value[1] = $char[0]");431 $num_fields = $ mysql->num_fields($char_query);432 $numrow = $ mysql->num_rows($char_query);433 $char_query = $sql->query("SELECT * FROM $value[0] WHERE $value[1] = $char[0]"); 434 $num_fields = $sql->num_fields($char_query); 435 $numrow = $sql->num_rows($char_query); 433 436 434 437 $result = "LOCK TABLES $value[0] WRITE;\n"; … … 439 442 440 443 for($count = 0; $count < $num_fields; $count++) { 441 $result .= "`". mysql_field_name($char_query,$count)."`";444 $result .= "`".$sql->field_name($char_query,$count)."`"; 442 445 if ($count < ($num_fields-1)) $result .= ","; 443 446 } … … 446 449 for ($i =0; $i<$numrow; $i++) { 447 450 $result .= "\t("; 448 $row = $ mysql->fetch_row($char_query);451 $row = $sql->fetch_row($char_query); 449 452 for($j=0; $j<$num_fields; $j++) { 450 453 $row[$j] = addslashes($row[$j]); 451 454 $row[$j] = ereg_replace("\n","\\n",$row[$j]); 452 455 if (isset($row[$j])) { 453 if ( mysql_field_type($char_query,$j) == "int") $result .= "$row[$j]";456 if ($sql->field_type($char_query,$j) == "int") $result .= "$row[$j]"; 454 457 else $result .= "'$row[$j]'" ; 455 458 }else $result .= "''"; … … 470 473 } 471 474 } 472 $ mysql->close();475 $sql->close(); 473 476 474 477 redirect("user.php?error=15"); … … 547 550 redirect("user.php?action=add_new&error=4"); 548 551 549 $ mysql = new MySQL;550 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);551 552 $new_user = $ mysql->quote_smart(trim($_GET['new_user']));553 $pass = $ mysql->quote_smart($_GET['pass']);552 $sql = new SQL; 553 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 554 555 $new_user = $sql->quote_smart(trim($_GET['new_user'])); 556 $pass = $sql->quote_smart($_GET['pass']); 554 557 555 558 //make sure username/pass at least 4 chars long and less than max 556 559 if ((strlen($new_user) < 4) || (strlen($new_user) > 15)){ 557 $ mysql->close();560 $sql->close(); 558 561 redirect("user.php?action=add_new&error=8"); 559 562 } … … 562 565 //make sure it doesnt contain non english chars. 563 566 if (!alphabetic($new_user)) { 564 $ mysql->close();567 $sql->close(); 565 568 redirect("user.php?action=add_new&error=9"); 566 569 } 567 570 568 $result = $ mysql->query("SELECT username FROM account WHERE username = '$new_user'");571 $result = $sql->query("SELECT username FROM account WHERE username = '$new_user'"); 569 572 570 573 //there is already someone with same username 571 if ($ mysql->num_rows($result)){572 $ mysql->close();574 if ($sql->num_rows($result)){ 575 $sql->close(); 573 576 redirect("user.php?action=add_new&error=7"); 574 577 } else { 575 578 $last_ip = "0.0.0.0"; 576 $new_mail = (isset($_GET['new_mail'])) ? $ mysql->quote_smart(trim($_GET['new_mail'])) : NULL;577 578 $locked = (isset($_GET['new_locked'])) ? $ mysql->quote_smart($_GET['new_locked']) : 0;579 $tbc = (isset($_GET['new_tbc'])) ? $ mysql->quote_smart($_GET['new_tbc']) : 0;580 581 $result = $ mysql->query("INSERT INTO account (username,I,gmlevel,email, joindate,last_ip,failed_logins,locked,last_login,online,tbc)579 $new_mail = (isset($_GET['new_mail'])) ? $sql->quote_smart(trim($_GET['new_mail'])) : NULL; 580 581 $locked = (isset($_GET['new_locked'])) ? $sql->quote_smart($_GET['new_locked']) : 0; 582 $tbc = (isset($_GET['new_tbc'])) ? $sql->quote_smart($_GET['new_tbc']) : 0; 583 584 $result = $sql->query("INSERT INTO account (username,I,gmlevel,email, joindate,last_ip,failed_logins,locked,last_login,online,tbc) 582 585 VALUES ('$new_user','$pass',0 ,'$new_mail',current_date() ,'$last_ip',0, $locked ,NULL, 0, $tbc)"); 583 $ mysql->close();586 $sql->close(); 584 587 585 588 if ($result) redirect("user.php?error=5"); … … 596 599 if (empty($_GET['id'])) redirect("user.php?error=10"); 597 600 598 $ mysql = new MySQL;599 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);601 $sql = new SQL; 602 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 600 603 601 $id = $ mysql->quote_smart($_GET['id']);602 603 $result = $ mysql->query("SELECT id,username,gmlevel,email,joindate,last_ip,failed_logins,locked,last_login,online,tbc FROM account WHERE id = '$id'");604 $data = $ mysql->fetch_row($result);605 606 if ($ mysql->num_rows($result)){604 $id = $sql->quote_smart($_GET['id']); 605 606 $result = $sql->query("SELECT id,username,gmlevel,email,joindate,last_ip,failed_logins,locked,last_login,online,tbc FROM account WHERE id = '$id'"); 607 $data = $sql->fetch_row($result); 608 609 if ($sql->num_rows($result)){ 607 610 //restricting accsess to lower gmlvl 608 611 if (($user_lvl <= $data[2])&&($user_name != $data[1])){ 609 $ mysql->close();612 $sql->close(); 610 613 redirect("user.php?error=14"); 611 614 } … … 668 671 <td>{$lang_user['banned']}</td>"; 669 672 670 $que = $ mysql->query("SELECT bandate, unbandate, bannedby FROM account_banned WHERE id = $id");671 if ($ mysql->num_rows($que)){672 $banned = mysql_fetch_row($que);673 $que = $sql->query("SELECT bandate, unbandate, bannedby FROM account_banned WHERE id = $id"); 674 if ($sql->num_rows($que)){ 675 $banned = $sql->fetch_row($que); 673 676 $ban_info = " - from:".date('d-m-Y G:i', $banned[0])." till:".date('d-m-Y G:i', $banned[1])."<br />by $banned[2]"; 674 677 $ban_checked = " checked=\"checked\""; … … 710 713 </tr>"; 711 714 712 $query = $ mysql->query("SELECT SUM(numchars) FROM realmcharacters WHERE acctid = '$id'");713 $tot_chars = $ mysql->result($query, 0);714 715 $ mysql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);716 $query = $ mysql->query("SELECT count(*) FROM `character` WHERE account = $id");717 $chars_on_realm = $ mysql->result($query, 0);715 $query = $sql->query("SELECT SUM(numchars) FROM realmcharacters WHERE acctid = '$id'"); 716 $tot_chars = $sql->result($query, 0); 717 718 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 719 $query = $sql->query("SELECT count(*) FROM `character` WHERE account = $id"); 720 $chars_on_realm = $sql->result($query, 0); 718 721 719 722 $output .= "<tr> … … 728 731 //if there is any chars to display 729 732 if ($chars_on_realm){ 730 $char_array = $ mysql->query("SELECT guid,name,race,class,SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 35), ' ', -1) FROM `character` WHERE account = $id");731 while ($char = $ mysql->fetch_array($char_array)){733 $char_array = $sql->query("SELECT guid,name,race,class,SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 35), ' ', -1) FROM `character` WHERE account = $id"); 734 while ($char = $sql->fetch_array($char_array)){ 732 735 $output .= "<tr> 733 736 <td> '---></td> … … 747 750 748 751 } else error($lang_global['err_no_user']); 749 $ mysql->close();752 $sql->close(); 750 753 } 751 754 … … 760 763 redirect("user.php?action=edit_user&&id={$_POST['id']}&error=1"); 761 764 762 $ mysql = new MySQL;763 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);764 765 $id = $ mysql->quote_smart($_POST['id']);766 $username = $ mysql->quote_smart($_POST['username']);767 $pass = $ mysql->quote_smart($_POST['pass']);765 $sql = new SQL; 766 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 767 768 $id = $sql->quote_smart($_POST['id']); 769 $username = $sql->quote_smart($_POST['username']); 770 $pass = $sql->quote_smart($_POST['pass']); 768 771 $user_pass_change = ($pass != sha1(strtoupper($username).":******")) ? "username='$username',I='$pass'," : ""; 769 772 770 $mail = (isset($_POST['mail']) && $_POST['mail'] != '') ? $ mysql->quote_smart($_POST['mail']) : "";771 $failed = (isset($_POST['failed'])) ? $ mysql->quote_smart($_POST['failed']) : 0;772 $gmlevel = (isset($_POST['gmlevel'])) ? $ mysql->quote_smart($_POST['gmlevel']) : 0;773 $tbc = (isset($_POST['tbc'])) ? $ mysql->quote_smart($_POST['tbc']) : 1;774 $banned = (isset($_POST['banned'])) ? $ mysql->quote_smart($_POST['banned']) : 0;775 $locked = (isset($_POST['locked'])) ? $ mysql->quote_smart($_POST['locked']) : 0;773 $mail = (isset($_POST['mail']) && $_POST['mail'] != '') ? $sql->quote_smart($_POST['mail']) : ""; 774 $failed = (isset($_POST['failed'])) ? $sql->quote_smart($_POST['failed']) : 0; 775 $gmlevel = (isset($_POST['gmlevel'])) ? $sql->quote_smart($_POST['gmlevel']) : 0; 776 $tbc = (isset($_POST['tbc'])) ? $sql->quote_smart($_POST['tbc']) : 1; 777 $banned = (isset($_POST['banned'])) ? $sql->quote_smart($_POST['banned']) : 0; 778 $locked = (isset($_POST['locked'])) ? $sql->quote_smart($_POST['locked']) : 0; 776 779 777 780 //make sure username/pass at least 4 chars long and less than max 778 781 if ((strlen($username) < 4) || (strlen($username) > 15)){ 779 $ mysql->close();782 $sql->close(); 780 783 redirect("user.php?action=edit_user&id=$id&error=8"); 781 784 } 782 785 783 786 if ($gmlevel >= $user_lvl) { 784 $ mysql->close();787 $sql->close(); 785 788 redirect("user.php?action=edit_user&&id={$_POST['id']}&error=16"); 786 789 } … … 789 792 //make sure it doesnt contain non english chars. 790 793 if (!alphabetic($username)) { 791 $ mysql->close();794 $sql->close(); 792 795 redirect("user.php?action=edit_user&error=9&id=$id"); 793 796 } 794 797 795 798 //restricting accsess to lower gmlvl 796 $result = $ mysql->query("SELECT gmlevel,username FROM account WHERE id = '$id'");797 if (($user_lvl <= $ mysql->result($result, 0, 'gmlevel'))&&($user_name != $mysql->result($result, 0, 'username'))){798 $ mysql->close();799 $result = $sql->query("SELECT gmlevel,username FROM account WHERE id = '$id'"); 800 if (($user_lvl <= $sql->result($result, 0, 'gmlevel'))&&($user_name != $sql->result($result, 0, 'username'))){ 801 $sql->close(); 799 802 redirect("user.php?error=14"); 800 803 } 801 804 802 if (!$banned) $ mysql->query("DELETE FROM account_banned WHERE id='$id'");805 if (!$banned) $sql->query("DELETE FROM account_banned WHERE id='$id'"); 803 806 else { 804 $result = $ mysql->query("SELECT count(*) FROM account_banned WHERE id = '$id'");805 if(!$ mysql->result($result, 0))806 $ mysql->query("INSERT INTO account_banned (id, bandate, unbandate, bannedby, banreason, active)807 $result = $sql->query("SELECT count(*) FROM account_banned WHERE id = '$id'"); 808 if(!$sql->result($result, 0)) 809 $sql->query("INSERT INTO account_banned (id, bandate, unbandate, bannedby, banreason, active) 807 810 VALUES ($id, ".time().",".(time()+(365*24*3600)).",'$user_name','none', 1)"); 808 811 } 809 812 810 $ mysql->query("UPDATE account SET email='$mail', $user_pass_change failed_logins='$failed',locked='$locked',gmlevel='$gmlevel',tbc='$tbc' WHERE id=$id");811 812 $ mysql->close();813 $sql->query("UPDATE account SET email='$mail', $user_pass_change failed_logins='$failed',locked='$locked',gmlevel='$gmlevel',tbc='$tbc' WHERE id=$id"); 814 815 $sql->close(); 813 816 redirect("user.php?action=edit_user&error=13&id=$id"); 814 817 }
Note:
See TracChangeset
for help on using the changeset viewer.