Changeset 374
- Timestamp:
- Sep 11, 2008, 9:10:27 AM (16 years ago)
- Files:
-
- 78 added
- 20 deleted
- 61 edited
Legend:
- Unmodified
- Added
- Removed
-
download_soubory/files.php
r359 r374 10 10 'web' => 'http://teaser.wow-europe.com/', 11 11 'info' => '', 12 ), 12 ), 13 13 'expansion' => array( 14 14 'title' => 'World of Warcraft - The Burning Crusade', … … 16 16 'web' => 'http://teaser.wow-europe.com/', 17 17 'info' => '', 18 ), 18 ), 19 19 ), 20 20 ), 21 21 22 22 'patches' => array( 23 23 'title' => 'Oficiální aktualizace', … … 27 27 'title' => '2.4.0 plný', 28 28 'torrent' => 'http://game.zdechov.net:6969/file?info_hash=%A0%BB%80%0Am%9AUdv%91%EA%E6%26%E3%BA%C54%0EI%AA', 29 'web' => ' ',29 'web' => 'http://wow.zdechov.net:81/WoW-2.4.0-enUS-patch.exe', 30 30 'info' => '', 31 ), 31 ), 32 32 '2.4.0 na 2.4.1' => array( 33 33 'title' => '2.4.0 na 2.4.1', 34 34 'torrent' => 'http://game.zdechov.net:6969/file?info_hash=%7BS%90W%5E%8E%ACG%D8%DD%F3%C8T%90%97%C3DcZ%D9', 35 'web' => ' ',35 'web' => 'http://wow.zdechov.net:81/WoW-2.4.0.8089-to-2.4.1.8125-enUS-patch.exe', 36 36 'info' => '', 37 ), 38 ), 37 ), 38 '2.4.1 na 2.4.2' => array( 39 'title' => '2.4.1 na 2.4.2', 40 'torrent' => '', 41 'web' => 'http://wow.zdechov.net:81/WoW-2.4.1.8125-to-2.4.2.8278-enUS-patch.exe', 42 'info' => '', 43 ), 44 '2.4.2 na 2.4.3' => array( 45 'title' => '2.4.2 na 2.4.3', 46 'torrent' => '', 47 'web' => 'http://wow.zdechov.net:81/WoW-2.4.2.8278-to-2.4.3.8606-enUS-patch.exe', 48 'info' => '', 49 ), 50 ), 39 51 ), 40 52 'mangos_server_package' => array( … … 42 54 'link' => 'http://wow.zdechov.net/forum/viewforum.php?f=12', 43 55 'files' => array( 56 'patch_2.4.3' => array( 57 'title' => 'MaNGOS_REPACK_6483_by_Buffer', 58 'torrent' => '', 59 'web' => 'http://wow.zdechov.net:81/MaNGOS_REPACK_6483_by_Buffer.exe', 60 'info' => '', 61 ), 44 62 'patch_2.4.1' => array( 45 63 'title' => 'MaNGOS Server Package rev.5770 + UDB 0.10.1 ( 2.4.1 )', … … 47 65 'web' => '', 48 66 'info' => '', 49 ), 67 ), 50 68 'patch_2.3.3' => array( 51 69 'title' => 'MaNGOS Server Package rev.5474 + UDB 0.9.2 rev.344 (patch 2.3.3)', … … 71 89 'web' => '', 72 90 'info' => '', 73 ), 74 ), 91 ), 92 ), 75 93 ), 76 94 'others' => array( … … 85 103 ), 86 104 'ceske_fonty_do_wow' => array( 87 'title' => 'Èeské fonty do hry', 105 'title' => 'Èeské fonty do hry', 88 106 'torrent' => '', 89 107 'web' => 'ceske_fonty_do_wow.zip', 108 'info' => '', 109 ), 110 'minimanager_czech' => array( 111 'title' => 'Èe¹tina do minimanageru', 112 'torrent' => '', 113 'web' => 'minimanager_0.12_czech.zip', 90 114 'info' => '', 91 115 ), … … 96 120 'info' => '', 97 121 ), 98 ), 122 ), 99 123 ), 100 124 'video' => array( … … 132 156 'info' => '', 133 157 ), 134 ), 158 ), 135 159 ), 136 160 ); -
events.php
r332 r374 34 34 31 => array('http://www.wowwiki.com/Edge_of_Madness', ''), 35 35 32 => array('http://www.wowwiki.com/Edge_of_Madness', ''), 36 33 => array('http://www.wowwiki.com/Arena_Tournament', ''), 37 34 => array('http://www.wowwiki.com/L70ETC', ''), 36 38 ); 37 39 -
honor.php
r309 r374 1 2 <? 1 <?php 3 2 include('global.php'); 4 3 ShowHeader(); 5 4 6 5 echo('<h3>Nejlep¹í hráèi:</h3><div align="center">'); 7 6 $Database->select_db('characters'); … … 50 49 FROM `characters` WHERE 1 '.$order_side.' ORDER BY '.$order_by.' '.$order_dir.' LIMIT '.$Page*$PerPage.','.$PerPage); 51 50 52 require_once("minimanager/lang/en US.php");51 require_once("minimanager/lang/english.php"); 53 52 $lang_index = array( 54 53 // ----- INDEX.PHP ----- -
jak_zacit.php
r364 r374 9 9 <P> 10 10 1) Nainstalujte hru <span style="font-weight: bold; font-size: small;"><?php echo(FileLink('game', 'download')); ?></span> .<br> 11 2) Nainstalujte roz¹íøení hry <span style="font-weight: bold; font-size: small;"><?php echo(FileLink('game', 'expansion')); ?></span> 11 2) Nainstalujte roz¹íøení hry <span style="font-weight: bold; font-size: small;"><?php echo(FileLink('game', 'expansion')); ?></span>.<br> 12 12 3) Nainstalujte patch <span style="font-weight: bold; font-size: small;"><?php echo(FileLink('patches', '2.4.0 full')); ?></span>.<br> 13 13 4) Nainstalujte patch <span style="font-weight: bold; font-size: small;"><?php echo(FileLink('patches', '2.4.0 na 2.4.1')); ?></span>.<br> 14 5) Nahraïte soubor <strong>realmlist.wtf</strong>, umístìný v herním adresáøi, <a href="realmlist.wtf">tímto souborem realmlist.wtf</a>. Adresa serveru pro pøipojení je wow.zdechov.net .</a>.<br> 15 6) Vytvoøte si nový úèet <a href="<?php echo($Config['Web']['BaseURL']); ?>registrace/">zde</a>.<br> 16 7) Sma¾te soubor Launcher.exe v slo¾ce hry a spou¹tìjte hru pøes WoW.exe. Zamezíte tím nechtìné samovolné aktualizaci hry.<br> 17 8) Spus»te hru, pøihla¹te se, vytvoøte si postavu a vstupte do ú¾asného fantasy svìta World of Warcraft.<br> 14 5) Nainstalujte patch <span style="font-weight: bold; font-size: small;"><?php echo(FileLink('patches', '2.4.1 na 2.4.2')); ?></span>.<br> 15 6) Nainstalujte patch <span style="font-weight: bold; font-size: small;"><?php echo(FileLink('patches', '2.4.2 na 2.4.3')); ?></span>.<br> 16 7) Nahraïte soubor <strong>realmlist.wtf</strong>, umístìný v herním adresáøi, <a href="realmlist.wtf">tímto souborem realmlist.wtf</a>. Adresa serveru pro pøipojení je wow.zdechov.net .</a>.<br> 17 8) Vytvoøte si nový úèet <a href="<?php echo($Config['Web']['BaseURL']); ?>registrace/">zde</a>.<br> 18 9) Sma¾te soubor Launcher.exe v slo¾ce hry a spou¹tìjte hru pøes WoW.exe. Zamezíte tím nechtìné samovolné aktualizaci hry.<br> 19 10) Spus»te hru, pøihla¹te se, vytvoøte si postavu a vstupte do ú¾asného fantasy svìta World of Warcraft.<br> 18 20 <br> 19 21 <strong>Dal¹í mo¾nosti:</strong><br> -
minimanager/SQL/install_forum.sql
r304 r374 1 /*Table structure for table ` posts` */2 CREATE TABLE ` posts` (1 /*Table structure for table `forum_posts` */ 2 CREATE TABLE `forum_posts` ( 3 3 `id` bigint(20) unsigned NOT NULL auto_increment, 4 4 `authorid` bigint(20) unsigned NOT NULL default '0', … … 16 16 ) ENGINE=MyISAM AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; 17 17 18 /*Data for the table ` posts` */19 INSERT INTO ` posts`(`id`,`authorid`,`authorname`,`forum`,`topic`,`lastpost`,`name`,`text`,`time`,`annouced`,`sticked`) values18 /*Data for the table `forum_posts` */ 19 INSERT INTO `forum_posts`(`id`,`authorid`,`authorname`,`forum`,`topic`,`lastpost`,`name`,`text`,`time`,`annouced`,`sticked`) values 20 20 (1,0,'Jiboo',1,1,1,'Hello admin!','[b]Hi[/b] !!:D<br /><br />If you read this, that mean that you [i]correctly[/i] installed this forum, [u]gj[/u]XD<br /><br /><br /><br />So what\' s next?<br /><br />Edit [color=red]forum.conf.php[/color]!<br /><br /><br /><br />And enjoy!<br /><br /><br /><br />Report bug at .Jiboo on [url=Mangos forums]http://www.mangosproject.org/forum[/url]!<br /><br />Do not reply anything related to this forum in the minimanager topics, thx.<br /><br /><br /><br />Bye!<br /><br />Jiboo','06/12/07 14:56:08',1,0); -
minimanager/ahstats.php
r307 r374 10 10 11 11 require_once("header.php"); 12 valid_login( 0);12 valid_login($action_permission['read']); 13 13 require_once("scripts/get_lib.php"); 14 14 … … 38 38 39 39 if( !$user_lvl && !$server[$realm_id]['both_factions']){ 40 $result = $sql->query("SELECT race FROM `characters` WHERE account = '$user_id' AND totaltime = (SELECT MAX(totaltime) FROM `characters` WHERE account = '$user_id') LIMIT 1");40 $result = $sql->query("SELECT race FROM `characters` WHERE account = $user_id AND totaltime = (SELECT MAX(totaltime) FROM `characters` WHERE account = $user_id) LIMIT 1"); 41 41 if ($sql->num_rows($result)){ 42 42 $order_side = (in_array($sql->result($result, 0, 'race'),array(2,5,6,8,10))) ? … … 44 44 } else $order_side = ""; 45 45 } else $order_side = ""; 46 46 47 47 $result = $sql->query("SELECT `characters`.`name` AS `seller`, `auctionhouse`.`item_template` AS `itemid`, `item_template`.`name` AS `itemname`, `auctionhouse`.`buyoutprice` AS `buyout`, 48 48 `auctionhouse`.`time`-unix_timestamp(), `c2`.`name` AS `encherisseur`, `auctionhouse`.`lastbid`, `auctionhouse`.`startbid`, SUBSTRING_INDEX(SUBSTRING_INDEX(`item_instance`.`data`, ' ',15), ' ',-1) AS qty, `characters`.`race` AS seller_race, `c2`.`race` AS buyer_race -
minimanager/arenateam.php
r307 r374 10 10 11 11 require_once("header.php"); 12 valid_login( 0);12 valid_login($action_permission['read']); 13 13 require_once("scripts/id_tab.php"); 14 14 //######################################################################################################################## … … 55 55 $output .= "</td></tr></table> 56 56 <td align=\"right\">"; 57 $output .= generate_pagination("arena _team.php?action=browse_teams&order_by=$order_by&dir=".!$dir, $all_record, $itemperpage, $start);57 $output .= generate_pagination("arenateam.php?action=browse_teams&order_by=$order_by&dir=".!$dir, $all_record, $itemperpage, $start); 58 58 $output .= "</td></tr></table>"; 59 59 //==========================top page navigation ENDS here ======================== … … 65 65 <th width=\"10%\"><a href=\"arenateam.php?order_by=tot_chars&start=$start&dir=$dir\">".($order_by=='tot_chars' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_arenateam['captain']}</a></th> 66 66 <th width=\"7%\"><a href=\"arenateam.php?order_by=attype&start=$start&dir=$dir\">".($order_by=='attype' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_arenateam['type']}</a></th> 67 <th width=\"7%\"><a href=\"arenateam.php?order_by= createdate&start=$start&dir=$dir\">".($order_by=='members' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_arenateam['members']}</a></th>67 <th width=\"7%\"><a href=\"arenateam.php?order_by=membres&start=$start&dir=$dir\">".($order_by=='members' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_arenateam['members']}</a></th> 68 68 <th width=\"7%\"><a href=\"arenateam.php?order_by=arenateam_online&start=$start&dir=$dir\">".($order_by=='arenateam_online' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_arenateam['arenateam_online']}</a></th> 69 <th width=\"7%\"><a href=\"arenateam.php?order_by= createdate&start=$start&dir=$dir\">".($order_by=='rating' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_arenateam['rating']}</a></th>70 <th width=\"7%\"><a href=\"arenateam.php?order_by= createdate&start=$start&dir=$dir\">".($order_by=='games' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_arenateam['games']}</a></th>71 <th width=\"7%\"><a href=\"arenateam.php?order_by= createdate&start=$start&dir=$dir\">".($order_by=='wins' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_arenateam['wins']}</a></th>69 <th width=\"7%\"><a href=\"arenateam.php?order_by=rating&start=$start&dir=$dir\">".($order_by=='rating' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_arenateam['rating']}</a></th> 70 <th width=\"7%\"><a href=\"arenateam.php?order_by=games&start=$start&dir=$dir\">".($order_by=='games' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_arenateam['games']}</a></th> 71 <th width=\"7%\"><a href=\"arenateam.php?order_by=wins&start=$start&dir=$dir\">".($order_by=='wins' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_arenateam['wins']}</a></th> 72 72 </tr>"; 73 73 … … 109 109 $search_value = $sql->quote_smart($_GET['search_value']); 110 110 $search_by = $sql->quote_smart($_GET['search_by']); 111 $search_menu = array('name', 'captainguid', 'arena_team.arenateamid'); 112 if (!array_key_exists($search_by, $search_menu)) $search_by = 'name'; 111 113 112 114 if(isset($_GET['order_by'])) $order_by = $sql->quote_smart($_GET['order_by']); … … 285 287 $llogin = count_days($online[4], time()); 286 288 287 $level = $online[5]; 288 289 if($level > 0) 290 { 291 $lev = '<font color="#FFFFFF">'.$level.'</font>'; 292 } 293 if($level > 9) 294 { 295 $lev = '<font color="#858585">'.$level.'</font>'; 296 } 297 if($level > 19) 298 { 299 $lev = '<font color="#339900">'.$level.'</font>'; 300 } 301 if($level > 29) 302 { 303 $lev = '<font color="#3300CC">'.$level.'</font>'; 304 } 305 if($level > 39) 306 { 307 $lev = '<font color="#5552FF">'.$level.'</font>'; 308 } 309 if($level > 49) 310 { 311 $lev = '<font color="#FF8000">'.$level.'</font>'; 312 } 313 if($level > 59) 314 { 315 $lev = '<font color="#FF0000">'.$level.'</font>'; 316 } 317 if($level > 69) 318 { 319 $lev = '<font color="#FF00CC">'.$level.'</font>'; 320 } 321 if($level > 70) 322 { 323 $lev = '<font color="#FFF000">'.$level.'</font>'; 324 } 289 $level = $online[5]; 290 291 if($level < 10) 292 $lev = '<font color="#FFFFFF">'.$level.'</font>'; 293 else if($level < 20) 294 $lev = '<font color="#858585">'.$level.'</font>'; 295 else if($level < 30) 296 $lev = '<font color="#339900">'.$level.'</font>'; 297 else if($level < 40) 298 $lev = '<font color="#3300CC">'.$level.'</font>'; 299 else if($level < 50) 300 $lev = '<font color="#C552FF">'.$level.'</font>'; 301 else if($level < 60) 302 $lev = '<font color="#FF8000">'.$level.'</font>'; 303 else if($level < 70) 304 $lev = '<font color="#FFF280">'.$level.'</font>'; 305 else if($level < 80) 306 $lev = '<font color="#FF0000">'.$level.'</font>'; 307 else 308 $lev = '<font color="#000000">'.$level.'</font>'; 325 309 326 310 if($llogin < 1) 327 { 328 $lastlogin = '<font color="#009900">'.$llogin.'</font>'; 329 } 330 if($llogin >= 1) 331 { 332 $lastlogin = '<font color="#0000CC">'.$llogin.'</font>'; 333 } 334 if($llogin > 5) 335 { 336 $lastlogin = '<font color="#FFFF00">'.$llogin.'</font>'; 337 } 338 if($llogin > 15) 339 { 340 $lastlogin = '<font color="#FF8000">'.$llogin.'</font>'; 341 } 342 if($llogin > 30) 343 { 344 $lastlogin = '<font color="#FF0000">'.$llogin.'</font>'; 345 } 346 if($llogin > 60) 347 { 348 $lastlogin = '<font color="#FF00FF">'.$llogin.'</font>'; 349 } 350 if($llogin > 90) 351 { 352 $lastlogin = '<font color="#8000FF">'.$llogin.'</font>'; 353 } 311 $lastlogin = '<font color="#009900">'.$llogin.'</font>'; 312 else if($llogin < 6) 313 $lastlogin = '<font color="#0000CC">'.$llogin.'</font>'; 314 else if($llogin < 16) 315 $lastlogin = '<font color="#FFFF00">'.$llogin.'</font>'; 316 else if($llogin < 16) 317 $lastlogin = '<font color="#FF8000">'.$llogin.'</font>'; 318 else if($llogin < 31) 319 $lastlogin = '<font color="#FF0000">'.$llogin.'</font>'; 320 else if($llogin < 61) 321 $lastlogin = '<font color="#FF00FF">'.$llogin.'</font>'; 322 else 323 $lastlogin = '<font color="#FF0000">'.$llogin.'</font>'; 354 324 355 325 $output .= " <tr>"; … … 431 401 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 432 402 433 //$char_data = $sql->query("SELECT data FROM `characters` WHERE guid = '$guid' LIMIT 1"); 434 //$data = $sql->result($char_data, 0, 'data'); 435 //$data = explode(' ',$data); 436 //$data[CHAR_DATA_OFFSET_GUILD_ID] = 0; 437 //$data[CHAR_DATA_OFFSET_GUILD_RANK] = 0; 438 //$data = implode(' ',$data); 439 //$sql->query("UPDATE `characters` SET data = '$data' WHERE guid = '$guid'"); 440 $sql->query("DELETE FROM arena_team_member WHERE guid = '$guid'"); 403 // must be checked that this user can delete it 404 //$sql->query("DELETE FROM arena_team_member WHERE guid = '$guid'"); 441 405 442 406 $sql->close(); -
minimanager/backup.php
r307 r374 11 11 require_once("header.php"); 12 12 require_once("scripts/backup_tab.php"); 13 valid_login( 3);13 valid_login($action_permission['read']); 14 14 15 15 //############################################################################################## -
minimanager/banned.php
r178 r374 10 10 11 11 require_once("header.php"); 12 valid_login( 1);12 valid_login($action_permission['read']); 13 13 14 14 //######################################################################################################################## -
minimanager/char.php
r307 r374 9 9 */ 10 10 require_once("header.php"); 11 valid_login( 0);11 valid_login($action_permission['read']); 12 12 require_once("scripts/id_tab.php"); 13 13 require_once("scripts/get_lib.php"); … … 20 20 // SHOW GENERAL CHARACTERS INFO 21 21 //######################################################################################################################## 22 function char_main() { 23 global $lang_global, $lang_char, $lang_item, $output, $realm_db, $characters_db, $realm_id, $user_lvl,$mangos_db, 24 $user_name, $item_datasite, $server, $user_id, $char_aura, $talent_datasite; 25 26 if (empty($_GET['id'])) error($lang_global['empty_fields']); 27 28 $sql = new SQL; 29 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 30 31 $id = $sql->quote_smart($_GET['id']); 32 33 $result = $sql->query("SELECT account,race FROM `characters` WHERE guid = $id LIMIT 1"); 34 35 if ($sql->num_rows($result)){ 36 //resrict by owner's gmlvl 37 $owner_acc_id = $sql->result($result, 0, 'account'); 38 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 39 $query = $sql->query("SELECT gmlevel,username FROM account WHERE id = $owner_acc_id"); 40 $owner_gmlvl = $sql->result($query, 0, 'gmlevel'); 41 $owner_name = $sql->result($query, 0, 'username'); 42 43 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 44 45 if( !$user_lvl && !$server[$realm_id]['both_factions']){ 46 $side_p = (in_array($sql->result($result, 0, 'race'),array(2,5,6,8,10))) ? 1 : 2; 47 $result_1 = $sql->query("SELECT race FROM `characters` WHERE account = '$user_id' LIMIT 1"); 48 if ($sql->num_rows($result)){ 49 $side_v = (in_array($sql->result($result_1, 0, 'race'),array(2,5,6,8,10))) ? 1 : 2; 50 } else $side_v = 0; 51 unset($result_1); 52 } else { 53 $side_v = 0; 54 $side_p = 0; 22 function char_main() 23 { 24 global $lang_global, $lang_char, $lang_item, $output, $realm_db, $characters_db, $realm_id, $user_lvl,$mangos_db, 25 $user_name, $item_datasite, $server, $user_id, $char_aura, $talent_datasite; 26 27 if (empty($_GET['id'])) error($lang_global['empty_fields']); 28 29 $sql = new SQL; 30 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 31 32 $id = $sql->quote_smart($_GET['id']); 33 if (!is_numeric($id)) $id = 0; 34 35 $result = $sql->query("SELECT account, race FROM `characters` WHERE guid = $id LIMIT 1"); 36 37 if ($sql->num_rows($result)) 38 { 39 //resrict by owner's gmlvl 40 $owner_acc_id = $sql->result($result, 0, 'account'); 41 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 42 $query = $sql->query("SELECT gmlevel,username FROM account WHERE id = $owner_acc_id"); 43 $owner_gmlvl = $sql->result($query, 0, 'gmlevel'); 44 $owner_name = $sql->result($query, 0, 'username'); 45 46 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 47 48 if(!$user_lvl && !$server[$realm_id]['both_factions']) 49 { 50 $side_p = (in_array($sql->result($result, 0, 'race'),array(2,5,6,8,10))) ? 1 : 2; 51 $result_1 = $sql->query("SELECT race FROM `characters` WHERE account = $user_id LIMIT 1"); 52 if ($sql->num_rows($result)) 53 $side_v = (in_array($sql->result($result_1, 0, 'race'), array(2,5,6,8,10))) ? 1 : 2; 54 else 55 $side_v = 0; 56 unset($result_1); 57 } 58 else 59 { 60 $side_v = 0; 61 $side_p = 0; 62 } 63 64 if ($user_lvl >= $owner_gmlvl && (($side_v == $side_p) || !$side_v)) 65 { 66 67 $result = $sql->query("SELECT data,name,race,class,zone,map,online,totaltime, mid(lpad( hex( CAST(substring_index(substring_index(data,' ',".(36+1)."),' ',-1) as unsigned) ),8,'0'),4,1) as gender FROM `characters` WHERE guid = $id"); 68 $char = $sql->fetch_row($result); 69 $char_data = explode(' ',$char[0]); 70 71 $online = ($char[6]) ? $lang_char['online'] : $lang_char['offline']; 72 73 if($char_data[CHAR_DATA_OFFSET_GUILD_ID]) 74 { 75 $query = $sql->query("SELECT name FROM guild WHERE guildid ='{$char_data[CHAR_DATA_OFFSET_GUILD_ID]}'"); 76 $guild_name = $sql->result($query, 0, 'name'); 77 $guild_name = "<a href=\"guild.php?action=view_guild&error=3&id={$char_data[CHAR_DATA_OFFSET_GUILD_ID]}\" >$guild_name</a>"; 78 $mrank = $char_data[CHAR_DATA_OFFSET_GUILD_RANK] + 1; 79 $guild_rank_query = $sql->query("SELECT rname FROM guild_rank WHERE guildid ='{$char_data[CHAR_DATA_OFFSET_GUILD_ID]}' AND rid='{$mrank}'"); 80 $guild_rank = $sql->result($guild_rank_query, 0, 'rname'); 81 } 82 else 83 { 84 $guild_name = $lang_global['none']; 85 $guild_rank = $lang_global['none']; 86 } 87 88 $block = unpack("f", pack("L", $char_data[CHAR_DATA_OFFSET_BLOCK])); 89 $block = round($block[1],2); 90 $dodge = unpack("f", pack("L", $char_data[CHAR_DATA_OFFSET_DODGE])); 91 $dodge = round($dodge[1],2); 92 $parry = unpack("f", pack("L", $char_data[CHAR_DATA_OFFSET_PARRY])); 93 $parry = round($parry[1],2); 94 $crit = unpack("f", pack("L", $char_data[CHAR_DATA_OFFSET_CRIT])); 95 $crit = round($crit[1],2); 96 $range_crit = unpack("f", pack("L", $char_data[CHAR_DATA_OFFSET_RANGE_CRIT])); 97 $range_crit = round($range_crit[1],2); 98 99 $EQU_HEAD = $char_data[CHAR_DATA_OFFSET_EQU_HEAD]; 100 $EQU_NECK = $char_data[CHAR_DATA_OFFSET_EQU_NECK]; 101 $EQU_SHOULDER = $char_data[CHAR_DATA_OFFSET_EQU_SHOULDER]; 102 $EQU_SHIRT = $char_data[CHAR_DATA_OFFSET_EQU_SHIRT]; 103 $EQU_CHEST = $char_data[CHAR_DATA_OFFSET_EQU_CHEST]; 104 $EQU_BELT = $char_data[CHAR_DATA_OFFSET_EQU_BELT]; 105 $EQU_LEGS = $char_data[CHAR_DATA_OFFSET_EQU_LEGS]; 106 $EQU_FEET = $char_data[CHAR_DATA_OFFSET_EQU_FEET]; 107 $EQU_WRIST = $char_data[CHAR_DATA_OFFSET_EQU_WRIST]; 108 $EQU_GLOVES = $char_data[CHAR_DATA_OFFSET_EQU_GLOVES]; 109 $EQU_FINGER1 = $char_data[CHAR_DATA_OFFSET_EQU_FINGER1]; 110 $EQU_FINGER2 = $char_data[CHAR_DATA_OFFSET_EQU_FINGER2]; 111 $EQU_TRINKET1 = $char_data[CHAR_DATA_OFFSET_EQU_TRINKET1]; 112 $EQU_TRINKET2 = $char_data[CHAR_DATA_OFFSET_EQU_TRINKET2]; 113 $EQU_BACK = $char_data[CHAR_DATA_OFFSET_EQU_BACK]; 114 $EQU_MAIN_HAND = $char_data[CHAR_DATA_OFFSET_EQU_MAIN_HAND]; 115 $EQU_OFF_HAND = $char_data[CHAR_DATA_OFFSET_EQU_OFF_HAND]; 116 $EQU_RANGED = $char_data[CHAR_DATA_OFFSET_EQU_RANGED]; 117 $EQU_TABARD = $char_data[CHAR_DATA_OFFSET_EQU_TABARD]; 118 119 $equiped_items = array( 120 1 => array(($EQU_HEAD ? get_item_tooltip($EQU_HEAD) : 0), ($EQU_HEAD ? get_icon($EQU_HEAD) : 0),($EQU_HEAD ? get_item_border($EQU_HEAD) : 0)), 121 2 => array(($EQU_NECK ? get_item_tooltip($EQU_NECK) : 0), ($EQU_NECK ? get_icon($EQU_NECK) : 0),($EQU_NECK ? get_item_border($EQU_NECK) : 0)), 122 3 => array(($EQU_SHOULDER ? get_item_tooltip($EQU_SHOULDER) : 0), ($EQU_SHOULDER ? get_icon($EQU_SHOULDER) : 0),($EQU_SHOULDER ? get_item_border($EQU_SHOULDER) : 0)), 123 4 => array(($EQU_SHIRT ? get_item_tooltip($EQU_SHIRT) : 0), ($EQU_SHIRT ? get_icon($EQU_SHIRT) : 0),($EQU_SHIRT ? get_item_border($EQU_SHIRT) : 0)), 124 5 => array(($EQU_CHEST ? get_item_tooltip($EQU_CHEST) : 0), ($EQU_CHEST ? get_icon($EQU_CHEST) : 0),($EQU_CHEST ? get_item_border($EQU_CHEST) : 0)), 125 6 => array(($EQU_BELT ? get_item_tooltip($EQU_BELT) : 0), ($EQU_BELT ? get_icon($EQU_BELT) : 0),($EQU_BELT ? get_item_border($EQU_BELT) : 0)), 126 7 => array(($EQU_LEGS ? get_item_tooltip($EQU_LEGS) : 0), ($EQU_LEGS ? get_icon($EQU_LEGS) : 0),($EQU_LEGS ? get_item_border($EQU_LEGS) : 0)), 127 8 => array(($EQU_FEET ? get_item_tooltip($EQU_FEET) : 0), ($EQU_FEET ? get_icon($EQU_FEET) : 0),($EQU_FEET ? get_item_border($EQU_FEET) : 0)), 128 9 => array(($EQU_WRIST ? get_item_tooltip($EQU_WRIST) : 0), ($EQU_WRIST ? get_icon($EQU_WRIST) : 0),($EQU_WRIST ? get_item_border($EQU_WRIST) : 0)), 129 10 => array(($EQU_GLOVES ? get_item_tooltip($EQU_GLOVES) : 0), ($EQU_GLOVES ? get_icon($EQU_GLOVES) : 0),($EQU_GLOVES ? get_item_border($EQU_GLOVES) : 0)), 130 11 => array(($EQU_FINGER1 ? get_item_tooltip($EQU_FINGER1) : 0), ($EQU_FINGER1 ? get_icon($EQU_FINGER1) : 0),($EQU_FINGER1 ? get_item_border($EQU_FINGER1) : 0)), 131 12 => array(($EQU_FINGER2 ? get_item_tooltip($EQU_FINGER2) : 0), ($EQU_FINGER2 ? get_icon($EQU_FINGER2) : 0),($EQU_FINGER2 ? get_item_border($EQU_FINGER2) : 0)), 132 13 => array(($EQU_TRINKET1 ? get_item_tooltip($EQU_TRINKET1) : 0), ($EQU_TRINKET1 ? get_icon($EQU_TRINKET1) : 0),($EQU_TRINKET1 ? get_item_border($EQU_TRINKET1) : 0)), 133 14 => array(($EQU_TRINKET2 ? get_item_tooltip($EQU_TRINKET2) : 0), ($EQU_TRINKET2 ? get_icon($EQU_TRINKET2) : 0),($EQU_TRINKET2 ? get_item_border($EQU_TRINKET2) : 0)), 134 15 => array(($EQU_BACK ? get_item_tooltip($EQU_BACK) : 0), ($EQU_BACK ? get_icon($EQU_BACK) : 0),($EQU_BACK ? get_item_border($EQU_BACK) : 0)), 135 16 => array(($EQU_MAIN_HAND ? get_item_tooltip($EQU_MAIN_HAND) : 0), ($EQU_MAIN_HAND ? get_icon($EQU_MAIN_HAND) : 0),($EQU_MAIN_HAND ? get_item_border($EQU_MAIN_HAND) : 0)), 136 17 => array(($EQU_OFF_HAND ? get_item_tooltip($EQU_OFF_HAND) : 0), ($EQU_OFF_HAND ? get_icon($EQU_OFF_HAND) : 0),($EQU_OFF_HAND ? get_item_border($EQU_OFF_HAND) : 0)), 137 18 => array(($EQU_RANGED ? get_item_tooltip($EQU_RANGED) : 0), ($EQU_RANGED ? get_icon($EQU_RANGED) : 0),($EQU_RANGED ? get_item_border($EQU_RANGED) : 0)), 138 19 => array(($EQU_TABARD ? get_item_tooltip($EQU_TABARD) : 0), ($EQU_TABARD ? get_icon($EQU_TABARD) : 0),($EQU_TABARD ? get_item_border($EQU_TABARD) : 0)) 139 ); 140 141 $output .= "<center><div id=\"tab\"><ul><li id=\"selected\"><a href=\"char.php?id=$id\">{$lang_char['char_sheet']}</a></li>"; 142 143 if (($user_lvl > $owner_gmlvl)||($owner_name == $user_name)) 144 { 145 $output .= "<li><a href=\"char.php?id=$id&action=char_inv\">{$lang_char['inventory']}</a></li> 146 <li><a href=\"char.php?id=$id&action=char_quest\">{$lang_char['quests']}</a></li> 147 <li><a href=\"char.php?id=$id&action=char_skill\">{$lang_char['skills']}</a></li> 148 <li><a href=\"char.php?id=$id&action=char_talent\">{$lang_char['talents']}</a></li> 149 <li><a href=\"char.php?id=$id&action=char_rep\">{$lang_char['reputation']}</a></li>"; 150 if (get_player_class($char[3]) == 'Hunter' ) { $output .= " <li><a href=\"char.php?id=$id&action=char_pets\">{$lang_char['pets']}</a></li>"; } 151 } 152 $output .= "</ul></div><div id=\"tab_content\"><table class=\"lined\" style=\"width: 580px;\"> 153 <tr><td colspan=\"6\"><div><img src=".get_image_dir($char_data[CHAR_DATA_OFFSET_LEVEL],$char[8],$char[2],$char[3],0)."></div><div>"; 154 155 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 156 $a_results = $sql->query("SELECT DISTINCT spell,remaintime FROM `character_aura` WHERE guid = $id"); 157 if ($sql->num_rows($a_results)) 158 { 159 while ($aura = $sql->fetch_row($a_results)) 160 { 161 // $output .= "<a style=\"padding:2px;\" onmouseover=\"toolTip('<font color=\'white\'>".get_char_aura_name($aura[0])."<br />Id: $aura[0]</font>','item_tooltip')\" onmouseout=\"toolTip()\" href=\"$talent_datasite$aura[0]\"><img src=\"".get_aura_icon($aura[0])."\" width=24 height=24></a>"; 162 $output .= "<a style=\"padding:2px;\" href=\"$talent_datasite$aura[0]\"><img src=\"".get_aura_icon($aura[0])."\" width=24 height=24></a>"; 55 163 } 56 57 if ($user_lvl >= $owner_gmlvl && (($side_v == $side_p) || !$side_v)){58 59 $result = $sql->query("SELECT data,name,race,class,zone,map,online,totaltime, mid(lpad( hex( CAST(substring_index(substring_index(data,' ',".(36+1)."),' ',-1) as unsigned) ),8,'0'),4,1) as gender FROM `characters` WHERE guid = '$id'");60 $char = $sql->fetch_row($result);61 $char_data = explode(' ',$char[0]);62 63 $online = ($char[6]) ? $lang_char['online'] : $lang_char['offline'];64 65 if($char_data[CHAR_DATA_OFFSET_GUILD_ID]){66 $query = $sql->query("SELECT name FROM guild WHERE guildid ='{$char_data[CHAR_DATA_OFFSET_GUILD_ID]}'");67 $guild_name = $sql->result($query, 0, 'name');68 $guild_name = "<a href=\"guild.php?action=view_guild&error=3&id={$char_data[CHAR_DATA_OFFSET_GUILD_ID]}\" >$guild_name</a>";69 $mrank = $char_data[CHAR_DATA_OFFSET_GUILD_RANK] + 1;70 $guild_rank_query = $sql->query("SELECT rname FROM guild_rank WHERE guildid ='{$char_data[CHAR_DATA_OFFSET_GUILD_ID]}' AND rid='{$mrank}'");71 $guild_rank = $sql->result($guild_rank_query, 0, 'rname');72 } else {73 $guild_name = $lang_global['none'];74 $guild_rank = $lang_global['none'];75 }76 77 $block = unpack("f", pack("L", $char_data[CHAR_DATA_OFFSET_BLOCK]));78 $block = round($block[1],2);79 $dodge = unpack("f", pack("L", $char_data[CHAR_DATA_OFFSET_DODGE]));80 $dodge = round($dodge[1],2);81 $parry = unpack("f", pack("L", $char_data[CHAR_DATA_OFFSET_PARRY]));82 $parry = round($parry[1],2);83 $crit = unpack("f", pack("L", $char_data[CHAR_DATA_OFFSET_CRIT]));84 $crit = round($crit[1],2);85 $range_crit = unpack("f", pack("L", $char_data[CHAR_DATA_OFFSET_RANGE_CRIT]));86 $range_crit = round($range_crit[1],2);87 88 $equiped_items = array(89 1 => array(($char_data[CHAR_DATA_OFFSET_EQU_HEAD]?get_item_tooltip($char_data[CHAR_DATA_OFFSET_EQU_HEAD]):0),($char_data[CHAR_DATA_OFFSET_EQU_HEAD]?get_icon($char_data[CHAR_DATA_OFFSET_EQU_HEAD]):0),($char_data[CHAR_DATA_OFFSET_EQU_HEAD]?get_item_border($char_data[CHAR_DATA_OFFSET_EQU_HEAD]):0)),90 2 => array(($char_data[CHAR_DATA_OFFSET_EQU_NECK]?get_item_tooltip($char_data[CHAR_DATA_OFFSET_EQU_NECK]):0),($char_data[CHAR_DATA_OFFSET_EQU_NECK]?get_icon($char_data[CHAR_DATA_OFFSET_EQU_NECK]):0),($char_data[CHAR_DATA_OFFSET_EQU_NECK]?get_item_border($char_data[CHAR_DATA_OFFSET_EQU_NECK]):0)),91 3 => array(($char_data[CHAR_DATA_OFFSET_EQU_SHOULDER]?get_item_tooltip($char_data[CHAR_DATA_OFFSET_EQU_SHOULDER]):0),($char_data[CHAR_DATA_OFFSET_EQU_SHOULDER]?get_icon($char_data[CHAR_DATA_OFFSET_EQU_SHOULDER]):0),($char_data[CHAR_DATA_OFFSET_EQU_SHOULDER]?get_item_border($char_data[CHAR_DATA_OFFSET_EQU_SHOULDER]):0)),92 4 => array(($char_data[CHAR_DATA_OFFSET_EQU_SHIRT]?get_item_tooltip($char_data[CHAR_DATA_OFFSET_EQU_SHIRT]):0),($char_data[CHAR_DATA_OFFSET_EQU_SHIRT]?get_icon($char_data[CHAR_DATA_OFFSET_EQU_SHIRT]):0),($char_data[CHAR_DATA_OFFSET_EQU_SHIRT]?get_item_border($char_data[CHAR_DATA_OFFSET_EQU_SHIRT]):0)),93 5 => array(($char_data[CHAR_DATA_OFFSET_EQU_CHEST]?get_item_tooltip($char_data[CHAR_DATA_OFFSET_EQU_CHEST]):0),($char_data[CHAR_DATA_OFFSET_EQU_CHEST]?get_icon($char_data[CHAR_DATA_OFFSET_EQU_CHEST]):0),($char_data[CHAR_DATA_OFFSET_EQU_CHEST]?get_item_border($char_data[CHAR_DATA_OFFSET_EQU_CHEST]):0)),94 6 => array(($char_data[CHAR_DATA_OFFSET_EQU_BELT]?get_item_tooltip($char_data[CHAR_DATA_OFFSET_EQU_BELT]):0),($char_data[CHAR_DATA_OFFSET_EQU_BELT]?get_icon($char_data[CHAR_DATA_OFFSET_EQU_BELT]):0),($char_data[CHAR_DATA_OFFSET_EQU_BELT]?get_item_border($char_data[CHAR_DATA_OFFSET_EQU_BELT]):0)),95 7 => array(($char_data[CHAR_DATA_OFFSET_EQU_LEGS]?get_item_tooltip($char_data[CHAR_DATA_OFFSET_EQU_LEGS]):0),($char_data[CHAR_DATA_OFFSET_EQU_LEGS]?get_icon($char_data[CHAR_DATA_OFFSET_EQU_LEGS]):0),($char_data[CHAR_DATA_OFFSET_EQU_LEGS]?get_item_border($char_data[CHAR_DATA_OFFSET_EQU_LEGS]):0)),96 8 => array(($char_data[CHAR_DATA_OFFSET_EQU_FEET]?get_item_tooltip($char_data[CHAR_DATA_OFFSET_EQU_FEET]):0),($char_data[CHAR_DATA_OFFSET_EQU_FEET]?get_icon($char_data[CHAR_DATA_OFFSET_EQU_FEET]):0),($char_data[CHAR_DATA_OFFSET_EQU_FEET]?get_item_border($char_data[CHAR_DATA_OFFSET_EQU_FEET]):0)),97 9 => array(($char_data[CHAR_DATA_OFFSET_EQU_WRIST]?get_item_tooltip($char_data[CHAR_DATA_OFFSET_EQU_WRIST]):0),($char_data[CHAR_DATA_OFFSET_EQU_WRIST]?get_icon($char_data[CHAR_DATA_OFFSET_EQU_WRIST]):0),($char_data[CHAR_DATA_OFFSET_EQU_WRIST]?get_item_border($char_data[CHAR_DATA_OFFSET_EQU_WRIST]):0)),98 10 => array(($char_data[CHAR_DATA_OFFSET_EQU_GLOVES]?get_item_tooltip($char_data[CHAR_DATA_OFFSET_EQU_GLOVES]):0),($char_data[CHAR_DATA_OFFSET_EQU_GLOVES]?get_icon($char_data[CHAR_DATA_OFFSET_EQU_GLOVES]):0),($char_data[CHAR_DATA_OFFSET_EQU_GLOVES]?get_item_border($char_data[CHAR_DATA_OFFSET_EQU_GLOVES]):0)),99 11 => array(($char_data[CHAR_DATA_OFFSET_EQU_FINGER1]?get_item_tooltip($char_data[CHAR_DATA_OFFSET_EQU_FINGER1]):0),($char_data[CHAR_DATA_OFFSET_EQU_FINGER1]?get_icon($char_data[CHAR_DATA_OFFSET_EQU_FINGER1]):0),($char_data[CHAR_DATA_OFFSET_EQU_FINGER1]?get_item_border($char_data[CHAR_DATA_OFFSET_EQU_FINGER1]):0)),100 12 => array(($char_data[CHAR_DATA_OFFSET_EQU_FINGER2]?get_item_tooltip($char_data[CHAR_DATA_OFFSET_EQU_FINGER2]):0),($char_data[CHAR_DATA_OFFSET_EQU_FINGER2]?get_icon($char_data[CHAR_DATA_OFFSET_EQU_FINGER2]):0),($char_data[CHAR_DATA_OFFSET_EQU_FINGER2]?get_item_border($char_data[CHAR_DATA_OFFSET_EQU_FINGER2]):0)),101 13 => array(($char_data[CHAR_DATA_OFFSET_EQU_TRINKET1]?get_item_tooltip($char_data[CHAR_DATA_OFFSET_EQU_TRINKET1]):0),($char_data[CHAR_DATA_OFFSET_EQU_TRINKET1]?get_icon($char_data[CHAR_DATA_OFFSET_EQU_TRINKET1]):0),($char_data[CHAR_DATA_OFFSET_EQU_TRINKET1]?get_item_border($char_data[CHAR_DATA_OFFSET_EQU_TRINKET1]):0)),102 14 => array(($char_data[CHAR_DATA_OFFSET_EQU_TRINKET2]?get_item_tooltip($char_data[CHAR_DATA_OFFSET_EQU_TRINKET2]):0),($char_data[CHAR_DATA_OFFSET_EQU_TRINKET2]?get_icon($char_data[CHAR_DATA_OFFSET_EQU_TRINKET2]):0),($char_data[CHAR_DATA_OFFSET_EQU_TRINKET2]?get_item_border($char_data[CHAR_DATA_OFFSET_EQU_TRINKET2]):0)),103 15 => array(($char_data[CHAR_DATA_OFFSET_EQU_BACK]?get_item_tooltip($char_data[CHAR_DATA_OFFSET_EQU_BACK]):0),($char_data[CHAR_DATA_OFFSET_EQU_BACK]?get_icon($char_data[CHAR_DATA_OFFSET_EQU_BACK]):0),($char_data[CHAR_DATA_OFFSET_EQU_BACK]?get_item_border($char_data[CHAR_DATA_OFFSET_EQU_BACK]):0)),104 16 => array(($char_data[CHAR_DATA_OFFSET_EQU_MAIN_HAND]?get_item_tooltip($char_data[CHAR_DATA_OFFSET_EQU_MAIN_HAND]):0),($char_data[CHAR_DATA_OFFSET_EQU_MAIN_HAND]?get_icon($char_data[CHAR_DATA_OFFSET_EQU_MAIN_HAND]):0),($char_data[CHAR_DATA_OFFSET_EQU_MAIN_HAND]?get_item_border($char_data[CHAR_DATA_OFFSET_EQU_MAIN_HAND]):0)),105 17 => array(($char_data[CHAR_DATA_OFFSET_EQU_OFF_HAND]?get_item_tooltip($char_data[CHAR_DATA_OFFSET_EQU_OFF_HAND]):0),($char_data[CHAR_DATA_OFFSET_EQU_OFF_HAND]?get_icon($char_data[CHAR_DATA_OFFSET_EQU_OFF_HAND]):0),($char_data[CHAR_DATA_OFFSET_EQU_OFF_HAND]?get_item_border($char_data[CHAR_DATA_OFFSET_EQU_OFF_HAND]):0)),106 18 => array(($char_data[CHAR_DATA_OFFSET_EQU_RANGED]?get_item_tooltip($char_data[CHAR_DATA_OFFSET_EQU_RANGED]):0),($char_data[CHAR_DATA_OFFSET_EQU_RANGED]?get_icon($char_data[CHAR_DATA_OFFSET_EQU_RANGED]):0),($char_data[CHAR_DATA_OFFSET_EQU_RANGED]?get_item_border($char_data[CHAR_DATA_OFFSET_EQU_RANGED]):0)),107 19 => array(($char_data[CHAR_DATA_OFFSET_EQU_TABARD]?get_item_tooltip($char_data[CHAR_DATA_OFFSET_EQU_TABARD]):0),($char_data[CHAR_DATA_OFFSET_EQU_TABARD]?get_icon($char_data[CHAR_DATA_OFFSET_EQU_TABARD]):0),($char_data[CHAR_DATA_OFFSET_EQU_TABARD]?get_item_border($char_data[CHAR_DATA_OFFSET_EQU_TABARD]):0))108 );109 110 111 $output .= "<center>112 <div id=\"tab\">113 <ul>114 <li id=\"selected\"><a href=\"char.php?id=$id\">{$lang_char['char_sheet']}</a></li>";115 116 if (($user_lvl > $owner_gmlvl)||($owner_name == $user_name))117 { $output .= "<li><a href=\"char.php?id=$id&action=char_inv\">{$lang_char['inventory']}</a></li>118 <li><a href=\"char.php?id=$id&action=char_quest\">{$lang_char['quests']}</a></li>119 <li><a href=\"char.php?id=$id&action=char_skill\">{$lang_char['skills']}</a></li>120 <li><a href=\"char.php?id=$id&action=char_talent\">{$lang_char['talents']}</a></li>121 <li><a href=\"char.php?id=$id&action=char_rep\">{$lang_char['reputation']}</a></li>";122 if( get_player_class($char[3]) == 'Hunter' ) { $output .= " <li><a href=\"char.php?id=$id&action=char_pets\">{$lang_char['pets']}</a></li>"; }123 }124 $output .= "</ul>125 </div>126 <div id=\"tab_content\">127 128 <table class=\"lined\" style=\"width: 580px;\">129 <tr><td colspan=\"6\"><div><img src=".get_image_dir($char_data[CHAR_DATA_OFFSET_LEVEL],$char[8],$char[2],$char[3],$owner_gmlvl)."></div><div>";130 131 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']);132 $a_results = $sql->query("SELECT DISTINCT spell,remaintime FROM `character_aura` WHERE guid = '$id'");133 if ($sql->num_rows($a_results)){134 while ($aura = $sql->fetch_row($a_results)){135 if( isset($char_aura[$aura[0]]) )136 {137 $output .= "<a style=\"padding:2px;\" onmouseover=\"toolTip('<font color=\'white\'>".get_char_aura_name($aura[0])."<br />Id: $aura[0]</font>','item_tooltip')\" onmouseout=\"toolTip()\" href=\"$talent_datasite$aura[0]\"><img src=\"img/Char_AURA/".get_char_aura_image($aura[0])."\" width=24 height=24></a>";138 }139 else { $output .= ": <a href=\"$talent_datasite$aura[0]\">aura $aura[0]</a> :"; }140 }141 164 } 142 143 144 165 145 166 $output .="</div><font class=\"bold\">$char[1] - ".get_player_race($char[2])." ".get_player_class($char[3])." (lvl {$char_data[CHAR_DATA_OFFSET_LEVEL]})</font><br /> … … 320 341 321 342 if (($user_lvl > $owner_gmlvl)||($owner_name == $user_name)){ 322 323 324 325 326 327 328 343 //total time played 344 $tot_time = $char[7]; 345 $tot_days = (int)($tot_time/86400); 346 $tot_time = $tot_time - ($tot_days*86400); 347 $total_hours = (int)($tot_time/3600); 348 $tot_time = $tot_time - ($total_hours*3600); 349 $total_min = (int)($tot_time/60); 329 350 330 351 $output .= "<table class=\"lined\" style=\"width: 580px;\"> … … 334 355 $output .= "<table class=\"hidden\"> 335 356 <tr><td>"; 336 if ($user_lvl > $owner_gmlvl){ 337 makebutton($lang_char['chars_acc'], "user.php?action=edit_user&id=$owner_acc_id",140); 338 makebutton($lang_char['edit_button'], "char_edit.php?id=$id",140); 339 } 340 if (($user_lvl > 0)&&(($user_lvl > $owner_gmlvl)||($owner_name == $user_name))){ 341 makebutton($lang_char['del_char'], "char_list.php?action=del_char_form&check%5B%5D=$id",140); 342 makebutton($lang_char['send_mail'], "mail.php?type=ingame_mail&to=$char[1]",140); 343 } 344 makebutton($lang_global['back'], "javascript:window.history.back()",140); 357 if ($user_lvl > $owner_gmlvl){ 358 makebutton($lang_char['chars_acc'], "user.php?action=edit_user&id=$owner_acc_id",140); 359 $output .= "</td><td>"; 360 makebutton($lang_char['edit_button'], "char_edit.php?id=$id",140); 361 $output .= "</td><td>"; 362 } 363 if (($user_lvl > 0)&&(($user_lvl > $owner_gmlvl)||($owner_name == $user_name))){ 364 makebutton($lang_char['del_char'], "char_list.php?action=del_char_form&check%5B%5D=$id",140); 365 $output .= "</td><td>"; 366 makebutton($lang_char['send_mail'], "mail.php?type=ingame_mail&to=$char[1]",140); 367 $output .= "</td><td>"; 368 } 369 makebutton($lang_global['back'], "javascript:window.history.back()",140); 345 370 $output .= "</td></tr> 346 371 </table><br /></center>"; 347 372 348 349 350 351 352 353 354 355 373 //end of admin options 374 } else { 375 $output .= "<table class=\"hidden\"> 376 <tr><td>"; 377 makebutton($lang_global['back'], "javascript:window.history.back()",200); 378 $output .= "</td></tr> 379 </table><br /></center>"; 380 } 356 381 } else { 357 358 359 382 $sql->close(); 383 error($lang_char['no_permission']); 384 } 360 385 361 386 } else error($lang_char['no_char_found']); 362 387 $sql->close(); 363 388 } 364 365 389 366 390 //######################################################################################################################## … … 369 393 function char_inv() { 370 394 global $lang_global, $lang_char, $lang_item, $output, $realm_db, $characters_db, $realm_id, $user_lvl,$mangos_db, 371 395 $user_name,$item_datasite; 372 396 373 397 if (empty($_GET['id'])) error($lang_global['empty_fields']); … … 378 402 $id = $sql->quote_smart($_GET['id']); 379 403 380 $result = $sql->query("SELECT account FROM `characters` WHERE guid = '$id'LIMIT 1");404 $result = $sql->query("SELECT account FROM `characters` WHERE guid = $id LIMIT 1"); 381 405 382 406 if ($sql->num_rows($result)){ 383 384 385 386 387 407 $owner_acc_id = $sql->result($result, 0, 'account'); 408 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 409 $query = $sql->query("SELECT gmlevel,username FROM account WHERE id ='$owner_acc_id'"); 410 $owner_gmlvl = $sql->result($query, 0, 'gmlevel'); 411 $owner_name = $sql->result($query, 0, 'username'); 388 412 389 413 if (($user_lvl > $owner_gmlvl)||($owner_name == $user_name)){ 390 414 391 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 392 393 $result = $sql->query("SELECT name,race,class,SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_GOLD+1)."), ' ', -1), SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1), mid(lpad( hex( CAST(substring_index(substring_index(data,' ',".(36+1)."),' ',-1) as unsigned) ),8,'0'),4,1) as gender FROM `characters` WHERE guid = '$id'"); 394 395 $char = $sql->fetch_row($result); 396 397 $result = $sql->query("SELECT bag,slot,item,item_template FROM character_inventory WHERE guid = '$id' ORDER BY bag,slot"); 398 $bag = array( 399 0=>array(), 400 1=>array(), 401 2=>array(), 402 3=>array(), 403 4=>array() 404 ); 405 406 $bank = array( 407 0=>array(), 408 1=>array(), 409 2=>array(), 410 3=>array(), 411 4=>array(), 412 5=>array(), 413 6=>array(), 414 7=>array() 415 ); 416 417 $bank_bag_id = array(); 418 $bag_id = array(); 419 $equiped_bag_id = array(0,0,0,0,0); 420 $equip_bnk_bag_id = array(0,0,0,0,0,0,0,0); 421 422 423 while ($slot = $sql->fetch_row($result)) 424 { 425 if ($slot[0] == 0 && $slot[1] > 18) 426 { 427 if($slot[1] < 23) // SLOT 19 TO 22 (Bags) 428 { 429 $bag_id[$slot[2]] = ($slot[1]-18); 430 $equiped_bag_id[$slot[1]-18] = array($slot[3], $sql->result($sql->query("SELECT ContainerSlots FROM `".$mangos_db[$realm_id]['name']."`.`item_template` WHERE entry ='{$slot[3]}'"), 0, 'ContainerSlots')); 431 } 432 elseif($slot[1] < 39) // SLOT 23 TO 38 (BackPack) 433 { 434 if(isset($bag[0][$slot[1]-23])) 435 $bag[0][$slot[1]-23][0]++; 436 else $bag[0][$slot[1]-23] = array($slot[3],0); 437 } 438 elseif($slot[1] < 67) // SLOT 39 TO 66 (Bank) 439 { 440 $bank[0][$slot[1]-39] = $slot[3]; 441 } 442 elseif($slot[1] < 74) // SLOT 67 TO 73 (Bank Bags) 443 { 444 $bank_bag_id[$slot[2]] = ($slot[1]-66); 445 $equip_bnk_bag_id[$slot[1]-66] = array($slot[3], $sql->result($sql->query("SELECT ContainerSlots FROM `".$mangos_db[$realm_id]['name']."`.`item_template` WHERE entry ='{$slot[3]}'"), 0, 'ContainerSlots')); 446 } 447 } 448 else 449 { 450 // Bags 451 if (isset($bag_id[$slot[0]])) 452 { 453 if(isset($bag[$bag_id[$slot[0]]][$slot[1]])) 454 $bag[$bag_id[$slot[0]]][$slot[1]][1]++; 455 else $bag[$bag_id[$slot[0]]][$slot[1]] = array($slot[3],0); 456 } 457 // Bank Bags 458 elseif (isset($bank_bag_id[$slot[0]])) 459 { 460 $bank[$bank_bag_id[$slot[0]]][$slot[1]] = $slot[3]; 461 } 462 } 463 } 464 465 $output .= "<center> 466 <div id=\"tab\"> 415 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 416 417 $result = $sql->query("SELECT name,race,class,SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_GOLD+1)."), ' ', -1), SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1), mid(lpad( hex( CAST(substring_index(substring_index(data,' ',".(36+1)."),' ',-1) as unsigned) ),8,'0'),4,1) as gender FROM `characters` WHERE guid = $id"); 418 419 $char = $sql->fetch_row($result); 420 421 $result = $sql->query("SELECT ci.bag,ci.slot,ci.item,ci.item_template, SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 15), ' ', -1) as stack_count FROM character_inventory ci INNER JOIN item_instance ii on ii.guid = ci.item WHERE ci.guid = $id ORDER BY ci.bag,ci.slot"); 422 $bag = array( 423 0=>array(), 424 1=>array(), 425 2=>array(), 426 3=>array(), 427 4=>array() 428 ); 429 430 $bank = array( 431 0=>array(), 432 1=>array(), 433 2=>array(), 434 3=>array(), 435 4=>array(), 436 5=>array(), 437 6=>array(), 438 7=>array() 439 ); 440 441 $bank_bag_id = array(); 442 $bag_id = array(); 443 $equiped_bag_id = array(0,0,0,0,0); 444 $equip_bnk_bag_id = array(0,0,0,0,0,0,0,0); 445 446 while ($slot = $sql->fetch_row($result)) 447 { 448 if ($slot[0] == 0 && $slot[1] > 18) 449 { 450 if($slot[1] < 23) // SLOT 19 TO 22 (Bags) 451 { 452 $bag_id[$slot[2]] = ($slot[1]-18); 453 $equiped_bag_id[$slot[1]-18] = array($slot[3], $sql->result($sql->query("SELECT ContainerSlots FROM `".$mangos_db[$realm_id]['name']."`.`item_template` WHERE entry ='{$slot[3]}'"), 0, 'ContainerSlots'), $slot[4]); 454 } 455 elseif($slot[1] < 39) // SLOT 23 TO 38 (BackPack) 456 { 457 if(isset($bag[0][$slot[1]-23])) 458 $bag[0][$slot[1]-23][0]++; 459 else $bag[0][$slot[1]-23] = array($slot[3],0,$slot[4]); 460 } 461 elseif($slot[1] < 67) // SLOT 39 TO 66 (Bank) 462 { 463 $bank[0][$slot[1]-39] = array($slot[3],0,$slot[4]); 464 } 465 elseif($slot[1] < 74) // SLOT 67 TO 73 (Bank Bags) 466 { 467 $bank_bag_id[$slot[2]] = ($slot[1]-66); 468 $equip_bnk_bag_id[$slot[1]-66] = array($slot[3], $sql->result($sql->query("SELECT ContainerSlots FROM `".$mangos_db[$realm_id]['name']."`.`item_template` WHERE entry ='{$slot[3]}'"), 0, 'ContainerSlots'), $slot[4]); 469 } 470 } 471 else 472 { 473 // Bags 474 if (isset($bag_id[$slot[0]])) 475 { 476 if(isset($bag[$bag_id[$slot[0]]][$slot[1]])) 477 $bag[$bag_id[$slot[0]]][$slot[1]][1]++; 478 else $bag[$bag_id[$slot[0]]][$slot[1]] = array($slot[3],0,$slot[4]); 479 } 480 // Bank Bags 481 elseif (isset($bank_bag_id[$slot[0]])) 482 { 483 $bank[$bank_bag_id[$slot[0]]][$slot[1]] = array($slot[3],0,$slot[4]); 484 } 485 } 486 } 487 488 $output .= "<center><div id=\"tab\"> 467 489 <ul> 468 469 470 471 472 473 474 if( get_player_class($char[2]) == 'Hunter' ) { $output .= "<li><a href=\"char.php?id=$id&action=char_pets\">{$lang_char['pets']}</a></li>"; }490 <li><a href=\"char.php?id=$id\">{$lang_char['char_sheet']}</a></li> 491 <li id=\"selected\"><a href=\"char.php?id=$id&action=char_inv\">{$lang_char['inventory']}</a></li> 492 <li><a href=\"char.php?id=$id&action=char_quest\">{$lang_char['quests']}</a></li> 493 <li><a href=\"char.php?id=$id&action=char_skill\">{$lang_char['skills']}</a></li> 494 <li><a href=\"char.php?id=$id&action=char_talent\">{$lang_char['talents']}</a></li> 495 <li><a href=\"char.php?id=$id&action=char_rep\">{$lang_char['reputation']}</a></li>"; 496 if( get_player_class($char[2]) == 'Hunter' ) { $output .= " <li><a href=\"char.php?id=$id&action=char_pets\">{$lang_char['pets']}</a></li>"; } 475 497 $output .= "</ul> 476 498 </div> 477 499 478 500 <div id=\"tab_content\"> 479 <img src=".get_image_dir($char[4],$char[5],$char[1],$char[2], $owner_gmlvl).">480 <br >501 <img src=".get_image_dir($char[4],$char[5],$char[1],$char[2],0)." /> 502 <br \> 481 503 <font class=\"bold\">$char[0] - ".get_player_race($char[1])." ".get_player_class($char[2])." (lvl {$char[4]}) 482 <br >483 <br >504 <br \> 505 <br \> 484 506 485 507 <table class=\"lined\" style=\"width: 700px;\"> 486 508 <tr> 487 509 <th>"; 488 if($equiped_bag_id[1]){ 489 $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\""); 490 $output .= "{$lang_item['bag']} I<br /><font class=\"small\">({$equiped_bag_id[1][1]} {$lang_item['slots']})</font"; 491 } 510 511 if($equiped_bag_id[1]){ 512 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equiped_bag_id[1][0])."\" alt=\"\" />", "$item_datasite{$equiped_bag_id[1][0]}", get_item_tooltip($equiped_bag_id[1][0]), "item_tooltip", "target=\"_blank\""); 513 $output .= "{$lang_item['bag']} I<br /><font class=\"small\">({$equiped_bag_id[1][1]} {$lang_item['slots']})</font>"; 514 } 492 515 $output .= "</th><th>"; 493 494 $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\"");495 496 516 if($equiped_bag_id[2]){ 517 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equiped_bag_id[2][0])."\" alt=\"\" />", "$item_datasite{$equiped_bag_id[2][0]}", get_item_tooltip($equiped_bag_id[2][0]), "item_tooltip", "target=\"_blank\""); 518 $output .= "{$lang_item['bag']} II<br /><font class=\"small\">({$equiped_bag_id[2][1]} {$lang_item['slots']})</font>"; 519 } 497 520 $output .= "</th><th>"; 498 499 $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\"");500 501 521 if($equiped_bag_id[3]){ 522 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equiped_bag_id[3][0])."\" alt=\"\" />", "$item_datasite{$equiped_bag_id[3][0]}", get_item_tooltip($equiped_bag_id[3][0]), "item_tooltip", "target=\"_blank\""); 523 $output .= "{$lang_item['bag']} III<br /><font class=\"small\">({$equiped_bag_id[3][1]} {$lang_item['slots']})</font>"; 524 } 502 525 $output .= "</th><th>"; 503 504 $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\"");505 506 526 if($equiped_bag_id[4]){ 527 $output .= maketooltip("<img class=\"bag_icon\" src=\"".get_icon($equiped_bag_id[4][0])."\" alt=\"\" />", "$item_datasite{$equiped_bag_id[4][0]}", get_item_tooltip($equiped_bag_id[4][0]), "item_tooltip", "target=\"_blank\""); 528 $output .= "{$lang_item['bag']} IV<br /><font class=\"small\">({$equiped_bag_id[4][1]} {$lang_item['slots']})</font>"; 529 } 507 530 $output .= "</th> 508 531 </tr> 509 532 <tr>"; 510 533 // adds equipped bag slots 511 534 for($t = 1; $t < count($bag); $t++){ 512 535 $output .= "<td class=\"bag\" valign=\"bottom\" align=\"center\"> 513 <div style=\"width:".(4*43)."px;height:".(ceil($equiped_bag_id[$t][1]/4)*41)."px;\">"; 514 515 $dsp = $equiped_bag_id[$t][1]%4; 516 if ($dsp) $output .= "<div class=\"no_slot\" /></div>"; 517 foreach ($bag[$t] as $pos => $item){ 518 $output .= "<div style=\"left:".(($pos+$dsp)%4*42)."px;top:".(floor(($pos+$dsp)/4)*41)."px;\">"; 519 $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\""); 520 $output .= "</div>"; 536 <div style=\"width:".(4*43)."px;height:".(ceil($equiped_bag_id[$t][1]/4)*41)."px;\">"; 537 538 $dsp = $equiped_bag_id[$t][1]%4; 539 if ($dsp) $output .= "<div class=\"no_slot\" /></div>"; 540 foreach ($bag[$t] as $pos => $item){ 541 $output .= "<div style=\"left:".(($pos+$dsp)%4*42)."px;top:".(floor(($pos+$dsp)/4)*41)."px;\">"; 542 $output .= maketooltip("<img src=\"".get_icon($item[0])."\" alt=\"\" />".($item[1] ? ($item[1]+1) : ""), "$item_datasite{$item[0]}", get_item_tooltip($item[0]), "item_tooltip", "target=\"_blank\""); 543 $item[2] = $item[2] == 1 ? '' : $item[2]; 544 $output .= "<div style=\"width:25px;margin:-20px 0px 0px 18px;color: black; font-size:14px\">$item[2]</div><div style=\"width:25px;margin:-21px 0px 0px 17px;font-size:14px\">$item[2]</div></div>"; 545 } 546 $output .= "</td>"; 547 } 548 549 $output .= "</tr> 550 <tr> 551 <th colspan=\"2\" align=\"left\"> 552 <img class=\"bag_icon\" src=\"".get_icon(3960)."\" alt=\"\" align=\"absmiddle\" style=\"margin-left:100px;\" /> 553 <font style=\"margin-left:30px;\">{$lang_char['backpack']}</font> 554 </th> 555 <th colspan=\"2\"> 556 {$lang_char['bank_items']} 557 </th> 558 </tr> 559 <tr> 560 <td colspan=\"2\" class=\"bag\" align=\"center\" height=\"220px\"> 561 <div style=\"width:".(4*43)."px;height:".(ceil(16/4)*41)."px;\">"; 562 // inventory items 563 foreach ($bag[0] as $pos => $item){ 564 $output .= "<div style=\"left:".($pos%4*42)."px;top:".(floor($pos/4)*41)."px;\">"; 565 $output .= maketooltip("<img src=\"".get_icon($item[0])."\" alt=\"\" />".($item[1] ? ($item[1]+1) : ""), "$item_datasite{$item[0]}", get_item_tooltip($item[0]), "item_tooltip", "target=\"_blank\""); 566 $item[2] = $item[2] == 1 ? '' : $item[2]; 567 $output .= "<div style=\"width:25px;margin:-20px 0px 0px 18px;color: black; font-size:14px\">$item[2]</div><div style=\"width:25px;margin:-21px 0px 0px 17px;font-size:14px\">$item[2]</div></div>"; 568 } 569 570 $money_gold = (int)($char[3]/10000); 571 $money_silver = (int)(($char[3]-$money_gold*10000)/100); 572 $money_cooper = (int)($char[3]-$money_gold*10000-$money_silver*100); 573 574 $output .= "</div> 575 <div style=\"text-align:right;width:168px;background-image:none;background-color:#393936;padding:2px;\"> 576 <b> 577 $money_gold <img src=\"img/gold.gif\" alt=\"\" align=\"absmiddle\" /> 578 $money_silver <img src=\"img/silver.gif\" alt=\"\" align=\"absmiddle\" /> 579 $money_cooper <img src=\"img/copper.gif\" alt=\"\" align=\"absmiddle\" /> 580 </b> 581 "; 582 583 $output .= "</div> 584 </td> 585 <td colspan=\"2\" class=\"bank\" align=\"center\"> 586 <div style=\"width:".(7*43)."px;height:".(ceil(24/7)*41)."px;\">"; 587 // bank items 588 foreach ($bank[0] as $pos => $item){ 589 $output .= "<div style=\"left:".($pos%7*43)."px;top:".(floor($pos/7)*41)."px;\">"; 590 $output .= maketooltip("<img src=\"".get_icon($item[0])."\" class=\"inv_icon\" alt=\"\" />", "$item_datasite{$item[0]}", get_item_tooltip($item[0]), "item_tooltip", "target=\"_blank\""); 591 $item[2] = $item[2] == 1 ? '' : $item[2]; 592 $output .= "<div style=\"width:25px;margin:-20px 0px 0px 18px;color: black; font-size:14px\">$item[2]</div><div style=\"width:25px;margin:-21px 0px 0px 17px;font-size:14px\">$item[2]</div></div>"; 593 } 594 595 $output .= "</div> 596 </td> 597 </tr> 598 <tr> 599 <th>"; 600 if($equip_bnk_bag_id[1]){ 601 $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_tooltip($equip_bnk_bag_id[1][0]), "item_tooltip", "target=\"_blank\""); 602 $output .= "{$lang_item['bag']} I<br /><font class=\"small\">({$equip_bnk_bag_id[1][1]} {$lang_item['slots']})</font>"; 603 } 604 $output .= "</th><th>"; 605 if($equip_bnk_bag_id[2]){ 606 $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_tooltip($equip_bnk_bag_id[2][0]), "item_tooltip", "target=\"_blank\""); 607 $output .= "{$lang_item['bag']} II<br /><font class=\"small\">({$equip_bnk_bag_id[2][1]} {$lang_item['slots']})</font>"; 608 } 609 $output .= "</th><th>"; 610 if($equip_bnk_bag_id[3]){ 611 $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_tooltip($equip_bnk_bag_id[3][0]), "item_tooltip", "target=\"_blank\""); 612 $output .= "{$lang_item['bag']} III<br /><font class=\"small\">({$equip_bnk_bag_id[3][1]} {$lang_item['slots']})</font>"; 613 } 614 $output .= "</th><th>"; 615 if($equip_bnk_bag_id[4]){ 616 $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_tooltip($equip_bnk_bag_id[4][0]), "item_tooltip", "target=\"_blank\""); 617 $output .= "{$lang_item['bag']} IV<br /><font class=\"small\">({$equip_bnk_bag_id[4][1]} {$lang_item['slots']})</font>"; 618 } 619 $output .= "</th> 620 </tr> 621 <tr>"; 622 623 for($t=1; $t < count($bank); $t++){ 624 if($t==5){ 625 $output .= "</tr> 626 <tr> 627 <th>"; 628 if($equip_bnk_bag_id[5]){ 629 $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_tooltip($equip_bnk_bag_id[5][0]), "item_tooltip", "target=\"_blank\""); 630 $output .= "{$lang_item['bag']} V<br /><font class=\"small\">({$equip_bnk_bag_id[5][1]} {$lang_item['slots']})</font>"; 631 } 632 $output .= "</th><th>"; 633 if($equip_bnk_bag_id[6]){ 634 $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_tooltip($equip_bnk_bag_id[6][0]), "item_tooltip", "target=\"_blank\""); 635 $output .= "{$lang_item['bag']} VI<br /><font class=\"small\">({$equip_bnk_bag_id[6][1]} {$lang_item['slots']})</font>"; 636 } 637 $output .= "</th><th>"; 638 if($equip_bnk_bag_id[7]){ 639 $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_tooltip($equip_bnk_bag_id[7][0]), "item_tooltip", "target=\"_blank\""); 640 $output .= "{$lang_item['bag']} VII<br /><font class=\"small\">({$equip_bnk_bag_id[7][1]} {$lang_item['slots']})</font>"; 641 } 642 $output .= "</th> 643 <th></th> 644 </tr> 645 <tr>"; 646 } 647 648 $output .= "<td class=\"bank\" align=\"center\"> 649 <div style=\"width:".(4*43)."px;height:".(ceil($equip_bnk_bag_id[$t][1]/4)*41)."px;\">"; 650 651 $dsp=$equip_bnk_bag_id[$t][1]%4; 652 if ($dsp) $output .= "<div class=\"no_slot\" /></div>"; 653 foreach ($bank[$t] as $pos => $item){ 654 $output .= "<div style=\"left:".(($pos+$dsp)%4*43)."px;top:".(floor(($pos+$dsp)/4)*41)."px;\">"; 655 $output .= maketooltip("<img src=\"".get_icon($item[0])."\" alt=\"\" />", "$item_datasite{$item[0]}", get_item_tooltip($item[0]), "item_tooltip", "target=\"_blank\""); 656 $item[2] = $item[2] == 1 ? '' : $item[2]; 657 $output .= "<div style=\"width:25px;margin:-20px 0px 0px 18px;color: black; font-size:14px\">$item[2]</div><div style=\"width:25px;margin:-21px 0px 0px 17px;font-size:14px\">$item[2]</div></div>"; 521 658 } 522 $output .= "</td>"; 523 } 524 525 $output .= "</tr> 526 <tr> 527 <th colspan=\"2\" align=\"left\"> 528 <img class=\"bag_icon\" src=\"".get_icon(3960)."\" alt=\"\" align=\"absmiddle\" style=\"margin-left:100px;\" /> 529 <font style=\"margin-left:30px;\">{$lang_char['backpack']}</font> 530 </th> 531 <th colspan=\"2\"> 532 {$lang_char['bank_items']} 533 </th> 534 </tr> 535 <tr> 536 <td colspan=\"2\" class=\"bag\" align=\"center\" height=\"220px\"> 537 <div style=\"width:".(4*43)."px;height:".(ceil(16/4)*41)."px;\">"; 538 539 foreach ($bag[0] as $pos => $item){ 540 $output .= "<div style=\"left:".($pos%4*42)."px;top:".(floor($pos/4)*41)."px;\">"; 541 $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\""); 542 $output .= "</div>"; 543 } 544 545 $money_gold = (int)($char[3]/10000); 546 $money_silver = (int)(($char[3]-$money_gold*10000)/100); 547 $money_cooper = (int)($char[3]-$money_gold*10000-$money_silver*100); 548 549 $output .= "</div> 550 <div style=\"text-align:right;width:168px;background-image:none;background-color:#393936;padding:2px;\"> 551 <b> 552 $money_gold <img src=\"img/gold.gif\" alt=\"\" align=\"absmiddle\" /> 553 $money_silver <img src=\"img/silver.gif\" alt=\"\" align=\"absmiddle\" /> 554 $money_cooper <img src=\"img/copper.gif\" alt=\"\" align=\"absmiddle\" /> 555 </b> 556 "; 557 558 $output .= "</div> 559 </td> 560 <td colspan=\"2\" class=\"bank\" align=\"center\"> 561 <div style=\"width:".(7*43)."px;height:".(ceil(24/7)*41)."px;\">"; 562 563 foreach ($bank[0] as $pos => $item){ 564 $output .= "<div style=\"left:".($pos%7*43)."px;top:".(floor($pos/7)*41)."px;\">"; 565 $output .= maketooltip("<img src=\"".get_icon($item)."\" class=\"inv_icon\" alt=\"\" />", "$item_datasite$item", get_item_name($item), "item_tooltip", "target=\"_blank\""); 566 $output .= "</div>"; 567 } 568 569 $output .= "</div> 570 </td> 571 </tr> 572 <tr> 573 <th>"; 574 if($equip_bnk_bag_id[1]){ 575 $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\""); 576 $output .= "{$lang_item['bag']} I<br /><font class=\"small\">({$equip_bnk_bag_id[1][1]} {$lang_item['slots']})</font>"; 577 } 578 $output .= "</th><th>"; 579 if($equip_bnk_bag_id[2]){ 580 $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\""); 581 $output .= "{$lang_item['bag']} II<br /><font class=\"small\">({$equip_bnk_bag_id[2][1]} {$lang_item['slots']})</font>"; 582 } 583 $output .= "</th><th>"; 584 if($equip_bnk_bag_id[3]){ 585 $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\""); 586 $output .= "{$lang_item['bag']} III<br /><font class=\"small\">({$equip_bnk_bag_id[3][1]} {$lang_item['slots']})</font>"; 587 } 588 $output .= "</th><th>"; 589 if($equip_bnk_bag_id[4]){ 590 $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\""); 591 $output .= "{$lang_item['bag']} IV<br /><font class=\"small\">({$equip_bnk_bag_id[4][1]} {$lang_item['slots']})</font>"; 592 } 593 $output .= "</th> 594 </tr> 595 <tr>"; 596 597 for($t=1; $t < count($bank); $t++){ 598 if($t==5){ 599 $output .= "</tr> 600 <tr> 601 <th>"; 602 if($equip_bnk_bag_id[5]){ 603 $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\""); 604 $output .= "{$lang_item['bag']} V<br /><font class=\"small\">({$equip_bnk_bag_id[5][1]} {$lang_item['slots']})</font>"; 605 } 606 $output .= "</th><th>"; 607 if($equip_bnk_bag_id[6]){ 608 $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\""); 609 $output .= "{$lang_item['bag']} VI<br /><font class=\"small\">({$equip_bnk_bag_id[6][1]} {$lang_item['slots']})</font>"; 610 } 611 $output .= "</th><th>"; 612 if($equip_bnk_bag_id[7]){ 613 $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\""); 614 $output .= "{$lang_item['bag']} VII<br /><font class=\"small\">({$equip_bnk_bag_id[7][1]} {$lang_item['slots']})</font>"; 615 } 616 $output .= "</th> 617 <th></th> 618 </tr> 619 <tr>"; 620 } 621 622 $output .= "<td class=\"bank\" align=\"center\"> 623 <div style=\"width:".(4*43)."px;height:".(ceil($equip_bnk_bag_id[$t][1]/4)*41)."px;\">"; 624 625 $dsp=$equip_bnk_bag_id[$t][1]%4; 626 if ($dsp) $output .= "<div class=\"no_slot\" /></div>"; 627 foreach ($bank[$t] as $pos => $item){ 628 $output .= "<div style=\"left:".(($pos+$dsp)%4*43)."px;top:".(floor(($pos+$dsp)/4)*41)."px;\">"; 629 $output .= maketooltip("<img src=\"".get_icon($item)."\" alt=\"\" />", "$item_datasite$item", get_item_name($item), "item_tooltip", "target=\"_blank\""); 630 $output .= "</div>"; 631 } 632 $output .= "</td>"; 659 $output .= "</td>"; 633 660 } 634 661 635 662 $output .= "<td class=\"bank\"></td></tr> 636 637 638 663 </table> 664 </div><br /> 665 <table class=\"hidden\"> 639 666 <tr><td>"; 640 if ($user_lvl > $owner_gmlvl){ 641 makebutton($lang_char['chars_acc'], "user.php?action=edit_user&id=$owner_acc_id",140); 642 makebutton($lang_char['edit_button'], "char_edit.php?id=$id",140); 643 } 644 if (($user_lvl > 0)&&(($user_lvl > $owner_gmlvl)||($owner_name == $user_name))){ 645 makebutton($lang_char['del_char'], "char_list.php?action=del_char_form&check%5B%5D=$id",140); 646 makebutton($lang_char['send_mail'], "mail.php?type=ingame_mail&to=$char[0]",140); 647 } 648 makebutton($lang_global['back'], "javascript:window.history.back()",140); 667 if ($user_lvl > $owner_gmlvl){ 668 makebutton($lang_char['chars_acc'], "user.php?action=edit_user&id=$owner_acc_id",140); 669 $output .= "</td><td>"; 670 makebutton($lang_char['edit_button'], "char_edit.php?id=$id",140); 671 $output .= "</td><td>"; 672 } 673 if (($user_lvl > 0)&&(($user_lvl > $owner_gmlvl)||($owner_name == $user_name))){ 674 makebutton($lang_char['del_char'], "char_list.php?action=del_char_form&check%5B%5D=$id",140); 675 $output .= "</td><td>"; 676 makebutton($lang_char['send_mail'], "mail.php?type=ingame_mail&to=$char[0]",140); 677 $output .= "</td><td>"; 678 } 679 makebutton($lang_global['back'], "javascript:window.history.back()",140); 649 680 $output .= "</td></tr> 650 681 </table><br /></center>"; 651 682 652 683 } else { 653 654 655 684 $sql->close(); 685 error($lang_char['no_permission']); 686 } 656 687 657 688 } else error($lang_char['no_char_found']); … … 665 696 function char_quest(){ 666 697 global $lang_global, $lang_char, $lang_item, $output, $realm_db, $characters_db, $realm_id, $user_lvl,$mangos_db, 667 698 $user_name, $quest_datasite, $language; 668 699 669 700 if (empty($_GET['id'])) error($lang_global['empty_fields']); … … 676 707 $dir = (isset($_GET['dir'])) ? $sql->quote_smart($_GET['dir']) : 0; 677 708 $dir = ($dir) ? 0 : 1; 678 $result = $sql->query("SELECT account,name,race,class FROM `characters` WHERE guid = '$id'LIMIT 1");709 $result = $sql->query("SELECT account,name,race,class FROM `characters` WHERE guid = $id LIMIT 1"); 679 710 680 711 if ($sql->num_rows($result)){ 681 $char = $sql->fetch_row($result); 682 683 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 684 $result = $sql->query("SELECT gmlevel,username FROM account WHERE id ='$char[0]'"); 685 $owner_gmlvl = $sql->result($result, 0, 'gmlevel'); 686 $owner_name = $sql->result($result, 0, 'username'); 687 688 if (($user_lvl > $owner_gmlvl)||($owner_name == $user_name)){ 689 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 690 691 $result = $sql->query("SELECT quest,status FROM character_queststatus WHERE guid ='$id' AND ( status = 3 OR status = 1 ) ORDER BY status DESC"); 692 $output .= "<center> 693 <div id=\"tab\"> 694 <ul> 695 <li><a href=\"char.php?id=$id\">{$lang_char['char_sheet']}</a></li> 696 <li><a href=\"char.php?id=$id&action=char_inv\">{$lang_char['inventory']}</a></li> 697 <li id=\"selected\"><a href=\"char.php?id=$id&action=char_quest\">{$lang_char['quests']}</a></li> 698 <li><a href=\"char.php?id=$id&action=char_skill\">{$lang_char['skills']}</a></li> 699 <li><a href=\"char.php?id=$id&action=char_talent\">{$lang_char['talents']}</a></li> 700 <li><a href=\"char.php?id=$id&action=char_rep\">{$lang_char['reputation']}</a></li>"; 701 if( get_player_class($char[3]) == 'Hunter' ) { $output .= " <li><a href=\"char.php?id=$id&action=char_pets\">{$lang_char['pets']}</a></li>"; } 702 $output .= "</ul> 703 </div> 704 <div id=\"tab_content\"> 705 <font class=\"bold\">$char[1] - ".get_player_race($char[2])." ".get_player_class($char[3])."</font><br /><br /> 706 707 <table class=\"lined\" style=\"width: 550px;\"> 708 <tr>"; 709 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>"; 710 $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> 711 <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> 712 <th width=\"5%\"><img src=\"img/aff_qst.png\" width=\"14\" height=\"14\" border=\"0\" /></a></th>"; 713 714 $quests_1 = array(); 715 $quests_3 = array(); 716 717 if ($sql->num_rows($result)){ 718 while ($quest = $sql->fetch_row($result)){ 719 $deplang = get_lang_id(); 720 $query1 = $sql->query("SELECT QuestLevel,IFNULL(".($deplang<>0?"title_loc$deplang":"NULL").",`title`) as Title FROM `".$mangos_db[$realm_id]['name']."`.`quest_template` LEFT JOIN `".$mangos_db[$realm_id]['name']."`.`locales_quest` ON `quest_template`.`entry` = `locales_quest`.`entry` WHERE `quest_template`.`entry` ='$quest[0]'"); 721 $quest_info = $sql->fetch_row($query1); 722 if($quest[1]==1) 723 array_push($quests_1, array($quest[0], $quest_info[0], $quest_info[1])); 724 else 725 array_push($quests_3, array($quest[0], $quest_info[0], $quest_info[1])); 726 } 727 aasort($quests_1, $order_by, $dir); 728 aasort($quests_3, $order_by, $dir); 729 730 foreach ($quests_3 as $data){ 731 $output .= "<tr>"; 732 if($user_lvl) $output .= "<td>$data[0]</td>"; 733 $output .= "<td>($data[1])</td> 734 <td align=\"left\"><a href=\"$quest_datasite$data[0]\" target=\"_blank\">$data[2]</a></td> 735 <td><img src=\"img/aff_qst.png\" width=\"14\" height=\"14\" /></td></tr>"; 736 } 737 738 if(count($quests_1)) $output .= "<tr><th class=\"title\" colspan=\"".($user_lvl ? "4" : "3")."\" align=\"left\"></th></tr>"; 739 foreach ($quests_1 as $data){ 740 $output .= "<tr>"; 741 if($user_lvl) $output .= "<td>$data[0]</td>"; 742 $output .= "<td>($data[1])</td> 743 <td align=\"left\"><a href=\"$quest_datasite$data[0]\" target=\"_blank\">$data[2]</a></td> 744 <td><img src=\"img/aff_tick.png\" width=\"14\" height=\"14\" /></td></tr>"; 745 } 746 747 } else $output .= "<tr><td colspan=\"".($user_lvl ? "4" : "3")."\"><p>{$lang_char['no_act_quests']}</p></td></tr>"; 748 749 $output .= "</table></div><br /> 750 <table class=\"hidden\"> 712 $char = $sql->fetch_row($result); 713 714 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 715 $result = $sql->query("SELECT gmlevel,username FROM account WHERE id ='$char[0]'"); 716 $owner_gmlvl = $sql->result($result, 0, 'gmlevel'); 717 $owner_name = $sql->result($result, 0, 'username'); 718 719 if (($user_lvl > $owner_gmlvl)||($owner_name == $user_name)){ 720 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 721 722 $result = $sql->query("SELECT quest,status FROM character_queststatus WHERE guid =$id AND ( status = 3 OR status = 1 ) ORDER BY status DESC"); 723 724 $output .= "<center> 725 <div id=\"tab\"> 726 <ul> 727 <li><a href=\"char.php?id=$id\">{$lang_char['char_sheet']}</a></li> 728 <li><a href=\"char.php?id=$id&action=char_inv\">{$lang_char['inventory']}</a></li> 729 <li id=\"selected\"><a href=\"char.php?id=$id&action=char_quest\">{$lang_char['quests']}</a></li> 730 <li><a href=\"char.php?id=$id&action=char_skill\">{$lang_char['skills']}</a></li> 731 <li><a href=\"char.php?id=$id&action=char_talent\">{$lang_char['talents']}</a></li> 732 <li><a href=\"char.php?id=$id&action=char_rep\">{$lang_char['reputation']}</a></li>"; 733 if( get_player_class($char[3]) == 'Hunter' ) { $output .= " <li><a href=\"char.php?id=$id&action=char_pets\">{$lang_char['pets']}</a></li>"; } 734 $output .= "</ul> 735 </div> 736 <div id=\"tab_content\"> 737 <font class=\"bold\">$char[1] - ".get_player_race($char[2])." ".get_player_class($char[3])."</font><br /><br /> 738 739 <table class=\"lined\" style=\"width: 550px;\"> 740 <tr>"; 741 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>"; 742 $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> 743 <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> 744 <th width=\"5%\"><img src=\"img/aff_qst.png\" width=\"14\" height=\"14\" border=\"0\" /></a></th>"; 745 746 $quests_1 = array(); 747 $quests_3 = array(); 748 749 if ($sql->num_rows($result)){ 750 while ($quest = $sql->fetch_row($result)){ 751 $deplang = get_lang_id(); 752 $query1 = $sql->query("SELECT QuestLevel,IFNULL(".($deplang<>0?"title_loc$deplang":"NULL").",`title`) as Title FROM `".$mangos_db[$realm_id]['name']."`.`quest_template` LEFT JOIN `".$mangos_db[$realm_id]['name']."`.`locales_quest` ON `quest_template`.`entry` = `locales_quest`.`entry` WHERE `quest_template`.`entry` ='$quest[0]'"); 753 $quest_info = $sql->fetch_row($query1); 754 if($quest[1]==1) 755 array_push($quests_1, array($quest[0], $quest_info[0], $quest_info[1])); 756 else 757 array_push($quests_3, array($quest[0], $quest_info[0], $quest_info[1])); 758 } 759 aasort($quests_1, $order_by, $dir); 760 aasort($quests_3, $order_by, $dir); 761 762 foreach ($quests_3 as $data){ 763 $output .= "<tr>"; 764 if($user_lvl) $output .= "<td>$data[0]</td>"; 765 $output .= "<td>($data[1])</td> 766 <td align=\"left\"><a href=\"$quest_datasite$data[0]\" target=\"_blank\">$data[2]</a></td> 767 <td><img src=\"img/aff_qst.png\" width=\"14\" height=\"14\" /></td></tr>"; 768 } 769 770 if(count($quests_1)) $output .= "<tr><th class=\"title\" colspan=\"".($user_lvl ? "4" : "3")."\" align=\"left\"></th></tr>"; 771 foreach ($quests_1 as $data){ 772 $output .= "<tr>"; 773 if($user_lvl) $output .= "<td>$data[0]</td>"; 774 $output .= "<td>($data[1])</td> 775 <td align=\"left\"><a href=\"$quest_datasite$data[0]\" target=\"_blank\">$data[2]</a></td> 776 <td><img src=\"img/aff_tick.png\" width=\"14\" height=\"14\" /></td></tr>"; 777 } 778 779 } else $output .= "<tr><td colspan=\"".($user_lvl ? "4" : "3")."\"><p>{$lang_char['no_act_quests']}</p></td></tr>"; 780 781 $output .= "</table></div><br /> 782 <table class=\"hidden\"> 751 783 <tr><td>"; 752 if ($user_lvl > $owner_gmlvl) 753 { 754 makebutton($lang_char['chars_acc'], "user.php?action=edit_user&id=$char[0]",140); 755 makebutton($lang_char['edit_button'], "char_edit.php?id=$id",140); 756 } 757 if ( ($user_lvl) && (($user_lvl > $owner_gmlvl) || ($owner_name == $user_name)) ) 758 { 759 makebutton($lang_char['del_char'], "char_list.php?action=del_char_form&check%5B%5D=$id",140); 760 makebutton($lang_char['send_mail'], "mail.php?type=ingame_mail&to=$char[1]",140); 761 } 762 makebutton($lang_global['back'], "javascript:window.history.back()",140); 763 $output .= "</td></tr> 784 if ($user_lvl > $owner_gmlvl){ 785 makebutton($lang_char['chars_acc'], "user.php?action=edit_user&id=$owner_acc_id",140); 786 $output .= "</td><td>"; 787 makebutton($lang_char['edit_button'], "char_edit.php?id=$id",140); 788 $output .= "</td><td>"; 789 } 790 if (($user_lvl > 0)&&(($user_lvl > $owner_gmlvl)||($owner_name == $user_name))){ 791 makebutton($lang_char['del_char'], "char_list.php?action=del_char_form&check%5B%5D=$id",140); 792 $output .= "</td><td>"; 793 makebutton($lang_char['send_mail'], "mail.php?type=ingame_mail&to=$char[0]",140); 794 $output .= "</td><td>"; 795 } 796 makebutton($lang_global['back'], "javascript:window.history.back()",140); 797 $output .= "</td></tr> 764 798 </table><br /></center>"; 765 766 767 768 769 770 799 } 800 else 801 { 802 $sql->close(); 803 error($lang_char['no_permission']); 804 } 771 805 } 772 806 else error($lang_char['no_char_found']); … … 780 814 function char_rep() { 781 815 global $lang_global, $lang_char, $lang_item, $output, $realm_db, $characters_db, $realm_id, $user_lvl,$mangos_db, 782 $user_name, $fact_id;816 $user_name, $fact_id, $reputation_rank_length, $reputation_cap, $reputation_bottom, $reputation_rank, $MIN_REPUTATION_RANK, $MAX_REPUTATION_RANK; 783 817 784 818 if (empty($_GET['id'])) error($lang_global['empty_fields']); … … 788 822 789 823 $id = $sql->quote_smart($_GET['id']); 790 $result = $sql->query("SELECT account,name,race,class FROM `characters` WHERE guid = '$id'LIMIT 1");824 $result = $sql->query("SELECT account,name,race,class FROM `characters` WHERE guid = $id LIMIT 1"); 791 825 792 826 if ($sql->num_rows($result)){ 793 $char = $sql->fetch_row($result); 794 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 795 $result = $sql->query("SELECT gmlevel,username FROM account WHERE id ='$char[0]'"); 796 $owner_gmlvl = $sql->result($result, 0, 'gmlevel'); 797 $owner_name = $sql->result($result, 0, 'username'); 827 $char = $sql->fetch_row($result); 828 $race = $char[2]; 829 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 830 $result = $sql->query("SELECT gmlevel,username FROM account WHERE id ='$char[0]'"); 831 $owner_gmlvl = $sql->result($result, 0, 'gmlevel'); 832 $owner_name = $sql->result($result, 0, 'username'); 798 833 799 834 if (($user_lvl > $owner_gmlvl)||($owner_name == $user_name)){ 800 835 801 802 $result = $sql->query("SELECT faction, standing, flags FROM character_reputation WHERE guid ='$id' AND (flags = 1 OR flags = 17)");836 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 837 $result = $sql->query("SELECT faction, standing, flags FROM character_reputation WHERE guid =$id AND (flags & 1 = 1)"); 803 838 804 839 $output .= "<center> 805 840 <div id=\"tab\"> 806 841 <ul> 807 808 809 810 811 812 813 842 <li><a href=\"char.php?id=$id\">{$lang_char['char_sheet']}</a></li> 843 <li><a href=\"char.php?id=$id&action=char_inv\">{$lang_char['inventory']}</a></li> 844 <li><a href=\"char.php?id=$id&action=char_quest\">{$lang_char['quests']}</a></li> 845 <li><a href=\"char.php?id=$id&action=char_skill\">{$lang_char['skills']}</a></li> 846 <li><a href=\"char.php?id=$id&action=char_talent\">{$lang_char['talents']}</a></li> 847 <li id=\"selected\"><a href=\"char.php?id=$id&action=char_rep\">{$lang_char['reputation']}</a></li>"; 848 if( get_player_class($char[3]) == 'Hunter' ) { $output .= "<li><a href=\"char.php?id=$id&action=char_pets\">{$lang_char['pets']}</a></li>"; } 814 849 $output .= " </ul> 815 850 </div> 816 851 <div id=\"tab_content\"> 817 852 <font class=\"bold\">$char[1] - ".get_player_race($char[2])." ".get_player_class($char[3])."</font><br /><br />"; 818 853 819 854 require_once("scripts/fact_tab.php"); 820 855 821 856 $temp_out = array( 822 823 <tr><th colspan=\"2\" align=\"left\">Alliance</th></tr>",0),824 825 <tr><th colspan=\"2\" align=\"left\">Horde</th></tr>",0),826 827 <tr><th colspan=\"2\" align=\"left\">Battleground Forces - Alliance</th></tr>",0),828 829 <tr><th colspan=\"2\" align=\"left\">Battleground Forces - Horde</th></tr>",0),830 831 <tr><th colspan=\"2\" align=\"left\">Steamwheedle Cartel</th></tr>",0),832 833 <tr><th colspan=\"2\" align=\"left\">Outland</th></tr>",0),834 835 <tr><th colspan=\"2\" align=\"left\">Shattrath City</th></tr>",0),836 837 <tr><th colspan=\"2\" align=\"left\">Other</th></tr>",0),838 839 <tr><th colspan=\"2\" align=\"left\">Unknown</th></tr>",0)857 1 => array("<table class=\"lined\" style=\"width: 550px;\"> 858 <tr><th colspan=\"3\" align=\"left\">Alliance</th></tr>",0), 859 2 => array("<table class=\"lined\" style=\"width: 550px;\"> 860 <tr><th colspan=\"3\" align=\"left\">Horde</th></tr>",0), 861 3 => array("<table class=\"lined\" style=\"width: 550px;\"> 862 <tr><th colspan=\"3\" align=\"left\">Alliance Forces</th></tr>",0), 863 4 => array("<table class=\"lined\" style=\"width: 550px;\"> 864 <tr><th colspan=\"3\" align=\"left\">Horde Forces</th></tr>",0), 865 5 => array("<table class=\"lined\" style=\"width: 550px;\"> 866 <tr><th colspan=\"3\" align=\"left\">Steamwheedle Cartel</th></tr>",0), 867 6 => array("<table class=\"lined\" style=\"width: 550px;\"> 868 <tr><th colspan=\"3\" align=\"left\">Outland</th></tr>",0), 869 7 => array("<table class=\"lined\" style=\"width: 550px;\"> 870 <tr><th colspan=\"3\" align=\"left\">Shattrath City</th></tr>",0), 871 8 => array("<table class=\"lined\" style=\"width: 550px;\"> 872 <tr><th colspan=\"3\" align=\"left\">Other</th></tr>",0), 873 0 => array("<table class=\"lined\" style=\"width: 550px;\"> 874 <tr><th colspan=\"3\" align=\"left\">Unknown</th></tr>",0) 840 875 ); 841 842 if ($sql->num_rows($result)){ 843 while ($fact = $sql->fetch_row($result)){ 844 $temp_out[get_faction_tree($fact[0])][0] .= "<tr><td width=\"60%\">".get_faction_name($fact[0])."</td> 845 <td width=\"40%\">$fact[1]</td></tr>"; 846 $temp_out[get_faction_tree($fact[0])][1] = 1; 847 } 848 } else $output .= "<tr><td colspan=\"2\"><br /><br />{$lang_global['err_no_records_found']}<br /><br /></td></tr>"; 849 850 foreach ($temp_out as $out) if ($out[1]) $output .= $out[0]."</table>"; 851 852 $output .= "</div><br /> 853 <table class=\"hidden\"> 876 877 if ($sql->num_rows($result)) 878 { 879 while ($fact = $sql->fetch_row($result)) 880 { 881 $faction = $fact[0]; 882 $standing = $fact[1]; 883 884 $rep_rank = get_reputation_rank($faction, $standing, $race); 885 $rep_rank_name = $reputation_rank[$rep_rank]; 886 $rep_cap = $reputation_rank_length[$rep_rank]; 887 $rep = get_reputation_at_rank($faction, $standing, $race); 888 $faction_name = get_faction_name($faction); 889 890 $ft = get_faction_tree($faction); 891 892 // not show alliance rep for horde and vice versa: 893 if (!((((1 << ($race - 1)) & 690) && ($ft == 1 || $ft == 3)) || (((1 << ($race - 1)) & 1101) && ($ft == 2 || $ft == 4)))) 894 { 895 $temp_out[$ft][0] .= "<tr><td width=\"30%\" align=\"left\">$faction_name</td> 896 <td width=\"55%\" valign=\"top\"><div class=\"faction-bar\"><div class=\"rep$rep_rank\"><span class=\"rep-data\">$rep/$rep_cap</span><div class=\"bar-color\" style=\"width:".(100*$rep/$rep_cap)."%\"></div></div></div></td> 897 <td width=\"15%\" align=\"left\" class=\"rep$rep_rank\">$rep_rank_name</td></tr>"; 898 $temp_out[$ft][1] = 1; 899 } 900 } 901 } else $output .= "<tr><td colspan=\"2\"><br /><br />{$lang_global['err_no_records_found']}<br /><br /></td></tr>"; 902 903 foreach ($temp_out as $out) if ($out[1]) $output .= $out[0]."</table>"; 904 905 $output .= "</div><br /> 906 <table class=\"hidden\"> 854 907 <tr><td>"; 855 if ($user_lvl > $owner_gmlvl){ 856 makebutton($lang_char['chars_acc'], "user.php?action=edit_user&id=$char[0]",140); 857 makebutton($lang_char['edit_button'], "char_edit.php?id=$id",140); 858 } 859 if (($user_lvl > 0)&&(($user_lvl > $owner_gmlvl)||($owner_name == $user_name))){ 860 makebutton($lang_char['del_char'], "char_list.php?action=del_char_form&check%5B%5D=$id",140); 861 makebutton($lang_char['send_mail'], "mail.php?type=ingame_mail&to=$char[1]",140); 862 } 863 makebutton($lang_global['back'], "javascript:window.history.back()",140); 864 $output .= "</td></tr> 908 if ($user_lvl > $owner_gmlvl){ 909 makebutton($lang_char['chars_acc'], "user.php?action=edit_user&id=$owner_acc_id",140); 910 $output .= "</td><td>"; 911 makebutton($lang_char['edit_button'], "char_edit.php?id=$id",140); 912 $output .= "</td><td>"; 913 } 914 if (($user_lvl > 0)&&(($user_lvl > $owner_gmlvl)||($owner_name == $user_name))){ 915 makebutton($lang_char['del_char'], "char_list.php?action=del_char_form&check%5B%5D=$id",140); 916 $output .= "</td><td>"; 917 makebutton($lang_char['send_mail'], "mail.php?type=ingame_mail&to=$char[0]",140); 918 $output .= "</td><td>"; 919 } 920 makebutton($lang_global['back'], "javascript:window.history.back()",140); 921 $output .= "</td></tr> 865 922 </table><br /></center>"; 866 923 867 924 } else { 868 869 870 925 $sql->close(); 926 error($lang_char['no_permission']); 927 } 871 928 872 929 } else error($lang_char['no_char_found']); … … 881 938 function char_skill() { 882 939 global $lang_global, $lang_char, $lang_item, $output, $realm_db, $characters_db, $realm_id, $user_lvl,$mangos_db, 883 940 $user_name, $skill_datasite; 884 941 885 942 if (empty($_GET['id'])) error($lang_global['empty_fields']); … … 893 950 $dir = ($dir) ? 0 : 1; 894 951 895 $result = $sql->query("SELECT account FROM `characters` WHERE guid = '$id'");952 $result = $sql->query("SELECT account FROM `characters` WHERE guid = $id"); 896 953 897 954 if ($sql->num_rows($result) == 1){ 898 899 900 901 902 955 $owner_acc_id = $sql->result($result, 0, 'account'); 956 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 957 $result = $sql->query("SELECT gmlevel,username FROM account WHERE id ='$owner_acc_id'"); 958 $owner_gmlvl = $sql->result($result, 0, 'gmlevel'); 959 $owner_name = $sql->result($result, 0, 'username'); 903 960 904 961 if (($user_lvl > $owner_gmlvl)||($owner_name == $user_name)){ 905 962 906 907 908 $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 `characters` WHERE guid = '$id'");909 910 911 912 913 914 915 916 917 918 919 920 921 if( get_player_class($char[3]) == 'Hunter' ) { $output .= "<li><a href=\"char.php?id=$id&action=char_pets\">{$lang_char['pets']}</a></li>"; }922 923 924 925 926 927 <table class=\"lined\" style=\"width: 550px;\">928 929 930 931 932 933 934 935 963 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 964 965 $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 `characters` WHERE guid = $id"); 966 $char = $sql->fetch_row($result); 967 $char_data = explode(' ',$char[0]); 968 969 $output .= "<center> 970 <div id=\"tab\"> 971 <ul> 972 <li><a href=\"char.php?id=$id\">{$lang_char['char_sheet']}</a></li> 973 <li><a href=\"char.php?id=$id&action=char_inv\">{$lang_char['inventory']}</a></li> 974 <li><a href=\"char.php?id=$id&action=char_quest\">{$lang_char['quests']}</a></li> 975 <li id=\"selected\"><a href=\"char.php?id=$id&action=char_skill\">{$lang_char['skills']}</a></li> 976 <li><a href=\"char.php?id=$id&action=char_talent\">{$lang_char['talents']}</a></li> 977 <li><a href=\"char.php?id=$id&action=char_rep\">{$lang_char['reputation']}</a></li>"; 978 if( get_player_class($char[3]) == 'Hunter' ) { $output .= " <li><a href=\"char.php?id=$id&action=char_pets\">{$lang_char['pets']}</a></li>"; } 979 $output .= " </ul> 980 </div> 981 <div id=\"tab_content\"> 982 <font class=\"bold\">$char[1] - ".get_player_race($char[2])." ".get_player_class($char[3])."</font><br /><br /> 983 984 <table class=\"lined\" style=\"width: 600px;\"> 985 <tr> 986 <th class=\"title\" colspan=\"".($user_lvl ? "3" : "2")."\" align=\"left\">{$lang_char['skills']}</th></tr> 987 <tr>" 988 .($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>" : "") 989 ."<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> 990 <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> 991 </tr>"; 992 require_once("scripts/id_tab.php"); 936 993 937 994 $prof_1_array = array(); … … 940 997 941 998 $skill_rank_array = array( 942 943 944 945 946 947 948 949 999 75 => $lang_char['apprentice'], 1000 150 => $lang_char['journeyman'], 1001 225 => $lang_char['expert'], 1002 300 => $lang_char['artisan'], 1003 350 => $lang_char['master'], 1004 375 => $lang_char['inherent'], 1005 385 => $lang_char['wise'] 1006 ); 950 1007 951 1008 for ($i = CHAR_DATA_OFFSET_SKILL_DATA; $i <= CHAR_DATA_OFFSET_SKILL_DATA+384 ; $i+=3){ 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 1009 if (($char_data[$i])&&(get_skill_name($char_data[$i] & 0x0000FFFF ))){ 1010 $temp = unpack("S", pack("L", $char_data[$i+1])); 1011 $skill = ($char_data[$i] & 0x0000FFFF); 1012 1013 if( $skill == 185 || $skill == 129 || $skill == 356 || $skill == 762) 1014 { 1015 array_push($prof_2_array , array(($user_lvl ? $skill : ''), get_skill_name($skill), $temp[1])); 1016 } 1017 else if( $skill == 171 || $skill == 182 || $skill == 186 || 1018 $skill == 197 || $skill == 202 || $skill == 333 || 1019 $skill == 393 || $skill == 755 || $skill == 164 || 1020 $skill == 165) 1021 { 1022 array_push($prof_1_array , array(($user_lvl ? $skill : ''), get_skill_name($skill), $temp[1])); 1023 } 1024 else 1025 { 1026 array_push($skill_array , array(($user_lvl ? $skill : ''), get_skill_name($skill), $temp[1])); 1027 } 1028 } 972 1029 } 973 1030 unset($char_data); … … 978 1035 979 1036 foreach ($skill_array as $data){ 980 981 982 983 ."<td align=\"right\">$data[1]</td>984 985 986 987 988 1037 $max = ($data[2] < $char[4]*5) ? $char[4]*5 : $data[2]; 1038 $output .= "<tr>" 1039 .($user_lvl ? "<td>$data[0]</td>" : "") 1040 ." <td align=\"right\">$data[1]</td> 1041 <td valign=\"top\" class=\"bar skill_bar\" style=\"background-position: ".(round(385*$data[2]/$max)-385)."px;\"> 1042 <span>$data[2]/$max</span> 1043 </td> 1044 </tr>"; 1045 } 989 1046 990 1047 if(count($prof_1_array)) $output .= "<tr><th class=\"title\" colspan=\"".($user_lvl ? "3" : "2")."\" align=\"left\">{$lang_char['professions']} 1º</th></tr>"; 991 1048 foreach ($prof_1_array as $data){ 992 993 994 995 ."<td align=\"right\"><a href=\"{$skill_datasite}11.$data[0]\" target=\"_blank\">$data[1]</a></td>996 997 998 999 1049 $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)))))); 1050 $output .= "<tr>" 1051 .($user_lvl ? "<td>$data[0]</td>" : "") 1052 ." <td align=\"right\"><a href=\"{$skill_datasite}11.$data[0]\" target=\"_blank\">$data[1]</a></td> 1053 <td valign=\"top\" class=\"bar skill_bar\" style=\"background-position: ".(round(385*$data[2]/$max)-385)."px;\"> 1054 <span>$data[2]/$max ({$skill_rank_array[$max]})</span> 1055 </td> 1056 </tr>"; 1000 1057 } 1001 1058 if(count($prof_2_array)) $output .= "<tr><th class=\"title\" colspan=\"".($user_lvl ? "3" : "2")."\" align=\"left\">{$lang_char['professions']} 2º</th></tr>"; 1002 1059 foreach ($prof_2_array as $data){ 1003 1004 1005 1006 ."<td align=\"right\"><a href=\"{$skill_datasite}9.$data[0]\" target=\"_blank\">$data[1]</a></td>1007 1008 1009 1010 1060 $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)))))); 1061 $output .= "<tr>" 1062 .($user_lvl ? "<td>$data[0]</td>" : "") 1063 ." <td align=\"right\"><a href=\"{$skill_datasite}9.$data[0]\" target=\"_blank\">$data[1]</a></td> 1064 <td valign=\"top\" class=\"bar skill_bar\" style=\"background-position: ".(round(385*$data[2]/$max)-385)."px;\"> 1065 <span>$data[2]/$max ({$skill_rank_array[$max]})</span> 1066 </td> 1067 </tr>"; 1011 1068 } 1012 1013 1069 $output .= "</table></div><br /> 1070 <table class=\"hidden\"> 1014 1071 <tr><td>"; 1015 if ($user_lvl > $owner_gmlvl){ 1016 makebutton($lang_char['chars_acc'], "user.php?action=edit_user&id=$owner_acc_id",140); 1017 makebutton($lang_char['edit_button'], "char_edit.php?id=$id",140); 1018 } 1019 if (($user_lvl > 0)&&(($user_lvl > $owner_gmlvl)||($owner_name == $user_name))){ 1020 makebutton($lang_char['del_char'], "char_list.php?action=del_char_form&check%5B%5D=$id",140); 1021 makebutton($lang_char['send_mail'], "mail.php?type=ingame_mail&to=$char[1]",140); 1022 } 1023 makebutton($lang_global['back'], "javascript:window.history.back()",140); 1024 $output .= "</td></tr> 1072 if ($user_lvl > $owner_gmlvl){ 1073 makebutton($lang_char['chars_acc'], "user.php?action=edit_user&id=$owner_acc_id",140); 1074 $output .= "</td><td>"; 1075 makebutton($lang_char['edit_button'], "char_edit.php?id=$id",140); 1076 $output .= "</td><td>"; 1077 } 1078 if (($user_lvl > 0)&&(($user_lvl > $owner_gmlvl)||($owner_name == $user_name))){ 1079 makebutton($lang_char['del_char'], "char_list.php?action=del_char_form&check%5B%5D=$id",140); 1080 $output .= "</td><td>"; 1081 makebutton($lang_char['send_mail'], "mail.php?type=ingame_mail&to=$char[0]",140); 1082 $output .= "</td><td>"; 1083 } 1084 makebutton($lang_global['back'], "javascript:window.history.back()",140); 1085 $output .= "</td></tr> 1025 1086 </table><br /></center>"; 1026 1087 1027 1088 } else { 1028 1029 1030 1089 $sql->close(); 1090 error($lang_char['no_permission']); 1091 } 1031 1092 1032 1093 } else error($lang_char['no_char_found']); … … 1056 1117 $dir = ($dir) ? 0 : 1; 1057 1118 1058 $result = $sql->query("SELECT account FROM `characters` WHERE guid = '$id'");1119 $result = $sql->query("SELECT account FROM `characters` WHERE guid = $id"); 1059 1120 1060 1121 if ($sql->num_rows($result) == 1){ … … 1069 1130 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 1070 1131 1071 $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 `characters` WHERE guid = '$id'");1132 $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 `characters` WHERE guid = $id"); 1072 1133 $char = $sql->fetch_row($result); 1073 1134 $char_data = explode(' ',$char[0]); 1074 1135 1075 1136 $output .= "<center> 1076 1137 <div id=\"tab\"> 1077 1138 <ul> 1078 1139 <li><a href=\"char.php?id=$id\">{$lang_char['char_sheet']}</a></li> … … 1082 1143 <li id=\"selected\"><a href=\"char.php?id=$id&action=char_talent\">{$lang_char['talents']}</a></li> 1083 1144 <li><a href=\"char.php?id=$id&action=char_rep\">{$lang_char['reputation']}</a></li>"; 1084 if( get_player_class($char[3]) == 'Hunter' ) { $output .= "<li><a href=\"char.php?id=$id&action=char_pets\">{$lang_char['pets']}</a></li>"; }1085 $output .= " 1145 if( get_player_class($char[3]) == 'Hunter' ) { $output .= " <li><a href=\"char.php?id=$id&action=char_pets\">{$lang_char['pets']}</a></li>"; } 1146 $output .= " </ul> 1086 1147 </div> 1087 1148 <div id=\"tab_content\"> … … 1094 1155 </tr>"; 1095 1156 1096 $result = $sql->query("SELECT spell FROM `character_spell` WHERE guid = '$id' AND active = '1'");1157 $result = $sql->query("SELECT spell FROM `character_spell` WHERE guid = $id AND active = 1"); 1097 1158 1098 1159 if ($sql->num_rows($result)){ … … 1103 1164 $output .= "<tr>"; 1104 1165 $output .= "<td>$talent[0]</td>"; 1105 1166 $output .= "<td align=left><a href=\"$talent_datasite$talent[0]\">".get_talent_name($talent[0])."</a></td>"; 1106 1167 if ($GMP) { $talent_sum = gmp_add($talent_sum,sprintf('%s',get_talent_value($talent[0]))); } 1107 1168 $output .= "</tr>"; … … 1137 1198 <table class=\"hidden\"> 1138 1199 <tr><td>"; 1139 if ($user_lvl > $owner_gmlvl){ 1140 makebutton($lang_char['chars_acc'], "user.php?action=edit_user&id=$owner_acc_id",140); 1141 makebutton($lang_char['edit_button'], "char_edit.php?id=$id",140); 1142 } 1143 if (($user_lvl > 0)&&(($user_lvl > $owner_gmlvl)||($owner_name == $user_name))){ 1144 makebutton($lang_char['del_char'], "char_list.php?action=del_char_form&check%5B%5D=$id",140); 1145 makebutton($lang_char['send_mail'], "mail.php?type=ingame_mail&to=$char[1]",140); 1146 } 1147 makebutton($lang_global['back'], "javascript:window.history.back()",140); 1148 $output .= "</td></tr> 1200 if ($user_lvl > $owner_gmlvl){ 1201 makebutton($lang_char['chars_acc'], "user.php?action=edit_user&id=$owner_acc_id",140); 1202 $output .= "</td><td>"; 1203 makebutton($lang_char['edit_button'], "char_edit.php?id=$id",140); 1204 $output .= "</td><td>"; 1205 } 1206 if (($user_lvl > 0)&&(($user_lvl > $owner_gmlvl)||($owner_name == $user_name))){ 1207 makebutton($lang_char['del_char'], "char_list.php?action=del_char_form&check%5B%5D=$id",140); 1208 $output .= "</td><td>"; 1209 makebutton($lang_char['send_mail'], "mail.php?type=ingame_mail&to=$char[0]",140); 1210 $output .= "</td><td>"; 1211 } 1212 makebutton($lang_global['back'], "javascript:window.history.back()",140); 1213 $output .= "</td></tr> 1149 1214 </table><br /></center>"; 1150 1215 … … 1173 1238 $id = $sql->quote_smart($_GET['id']); 1174 1239 1175 $result = $sql->query("SELECT account FROM `characters` WHERE guid = '$id'");1240 $result = $sql->query("SELECT account FROM `characters` WHERE guid = $id"); 1176 1241 1177 1242 if ($sql->num_rows($result) == 1){ … … 1186 1251 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 1187 1252 1188 $result = $sql->query("SELECT id,level,exp, nextlvlexp,loyaltypoints,loyalty,trainpoint,name,curhappiness,TeachSpelldata FROM `character_pet` WHERE owner = '$id'");1189 1190 1191 1192 1253 $result = $sql->query("SELECT id,level,exp,loyaltypoints,loyalty,trainpoint,name,curhappiness,TeachSpelldata FROM `character_pet` WHERE owner = $id"); 1254 1255 $output .= "<center> 1256 <div id=\"tab\"> 1257 <ul> 1193 1258 <li><a href=\"char.php?id=$id\">{$lang_char['char_sheet']}</a></li> 1194 1259 <li><a href=\"char.php?id=$id&action=char_inv\">{$lang_char['inventory']}</a></li> 1195 1260 <li><a href=\"char.php?id=$id&action=char_quest\">{$lang_char['quests']}</a></li> 1196 1261 <li><a href=\"char.php?id=$id&action=char_skill\">{$lang_char['skills']}</a></li> 1197 1198 1262 <li><a href=\"char.php?id=$id&action=char_talent\">{$lang_char['talents']}</a></li> 1263 <li><a href=\"char.php?id=$id&action=char_rep\">{$lang_char['reputation']}</a></li> 1199 1264 <li id=\"selected\"><a href=\"char.php?id=$id&action=char_pet\">{$lang_char['pets']}</a></li> 1200 1201 1202 1203 1204 1205 1206 $happiness = floor($pet[ 8]/333000);1265 </ul> 1266 </div> 1267 <div id=\"tab_content\">"; 1268 1269 if ($sql->num_rows($result)){ 1270 while($pet = $sql->fetch_row($result)){ 1271 $happiness = floor($pet[7]/333000); 1207 1272 1208 1273 switch ($happiness) { 1209 1274 case 3: 1210 1275 case 2: 1211 1276 $hap_text = "Happy"; 1212 1277 $hap_val = 2; 1213 1278 break; 1214 1279 case 1: 1215 1280 $hap_text = "Content"; 1216 1281 $hap_val = 1; 1217 1282 break; 1218 1283 default: 1219 1284 $hap_text = "Unhappy"; 1220 1285 $hap_val = 0; 1221 1286 } 1222 1223 1224 1225 $output .= " <font class=\"bold\">$pet[7] (lvl$pet[1])1226 1227 1228 1229 <tr><td align=right>Exp:</td><td valign=\"top\" class=\"bar skill_bar\" style=\"background-position: ".(round(385*$pet[2]/$pet[3])-385)."px;\">1230 <span>$pet[2]/$pet[3]</span>1231 1232 <tr><td align=right>Loyalty:</td><td align=left>Level $pet[5] ($pet[4] pts)</td></tr>1233 <tr><td align=right>Training Points:</td><td align=left>$pet[6]</td></tr>";1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1287 1288 $pet_next_lvl_xp = floor(xp_to_level($pet[1])/4); 1289 1290 $output .= " <font class=\"bold\">$pet[6] (lvl$pet[1]) 1291 <a style=\"padding:2px;\" onmouseover=\"toolTip('<font color=\'white\'>$hap_text</font>','item_tooltip')\" onmouseout=\"toolTip()\"><img src=\"img/pet/happiness_$hap_val.jpg\"></a> 1292 <br /><br /></font> 1293 <table class=\"lined\" style=\"width: 550px;\"> 1294 <tr><td align=right>Exp:</td><td valign=\"top\" class=\"bar skill_bar\" style=\"background-position: ".(round(385*$pet[2]/$pet_next_lvl_xp)-385)."px;\"> 1295 <span>$pet[2]/$pet_next_lvl_xp</span> 1296 </td></tr> 1297 <tr><td align=right>Loyalty:</td><td align=left>Level $pet[4] ($pet[3] pts)</td></tr> 1298 <tr><td align=right>Training Points:</td><td align=left>$pet[5]</td></tr>"; 1299 $output .= "<tr><td align=right>Pet Abilities:</td><td align=left>"; 1300 $ability_results = $sql->query("SELECT spell FROM `pet_spell` WHERE guid = '$pet[0]'"); 1301 if ($sql->num_rows($ability_results)){ 1302 while ($ability = $sql->fetch_row($ability_results)){ 1303 if( isset($pet_ability[$ability[0]]) ) 1304 { 1305 $output .= "<a style=\"padding:2px;\" onmouseover=\"toolTip('<font color=\'white\'>".get_pet_ability_name($ability[0])."<br />Training Points: ".get_pet_ability_trainvalue($ability[0])."<br />Id: $ability[0]</font>','item_tooltip')\" onmouseout=\"toolTip()\" href=\"$talent_datasite$ability[0]\"><img src=\"img/pet/".get_pet_ability_image($ability[0])."\"></a>"; 1306 } 1307 } 1308 } 1309 $output .= "</td></tr>"; 1310 $output .= "</table><br /><br />"; 1311 } 1312 } 1313 1314 $output .= "</div> 1315 <table class=\"hidden\"> 1251 1316 <tr><td>"; 1252 if ($user_lvl > $owner_gmlvl){ 1253 makebutton($lang_char['chars_acc'], "user.php?action=edit_user&id=$owner_acc_id",140); 1254 makebutton($lang_char['edit_button'], "char_edit.php?id=$id",140); 1255 } 1256 if (($user_lvl > 0)&&(($user_lvl > $owner_gmlvl)||($owner_name == $user_name))){ 1257 makebutton($lang_char['del_char'], "char_list.php?action=del_char_form&check%5B%5D=$id",140); 1258 makebutton($lang_char['send_mail'], "mail.php?type=ingame_mail&to=$char[1]",140); 1259 } 1260 makebutton($lang_global['back'], "javascript:window.history.back()",140); 1261 $output .= "</td></tr> 1317 if ($user_lvl > $owner_gmlvl){ 1318 makebutton($lang_char['chars_acc'], "user.php?action=edit_user&id=$owner_acc_id",140); 1319 $output .= "</td><td>"; 1320 makebutton($lang_char['edit_button'], "char_edit.php?id=$id",140); 1321 $output .= "</td><td>"; 1322 } 1323 if (($user_lvl > 0)&&(($user_lvl > $owner_gmlvl)||($owner_name == $user_name))){ 1324 makebutton($lang_char['del_char'], "char_list.php?action=del_char_form&check%5B%5D=$id",140); 1325 $output .= "</td><td>"; 1326 makebutton($lang_char['send_mail'], "mail.php?type=ingame_mail&to=$char[0]",140); 1327 $output .= "</td><td>"; 1328 } 1329 makebutton($lang_global['back'], "javascript:window.history.back()",140); 1330 $output .= "</td></tr> 1262 1331 </table><br /></center>"; 1263 1332 } else { … … 1268 1337 $sql->close(); 1269 1338 } 1270 1271 1272 1273 1274 1275 1339 1276 1340 //######################################################################################################################## -
minimanager/char_edit.php
r307 r374 9 9 */ 10 10 require_once("header.php"); 11 valid_login( 1);11 valid_login($action_permission['read']); 12 12 13 13 require_once("scripts/id_tab.php"); -
minimanager/char_list.php
r307 r374 10 10 11 11 require_once("header.php"); 12 valid_login( 1);12 valid_login($action_permission['read']); 13 13 require_once("scripts/id_tab.php"); 14 14 require_once("scripts/defines.php"); … … 108 108 $owner_acc_name = $sql->result($result, 0, 'username'); 109 109 110 $level = $char[9]; 111 112 if($level < 10) 113 $lev = '<font color="#FFFFFF">'.$level.'</font>'; 114 else if($level < 20) 115 $lev = '<font color="#858585">'.$level.'</font>'; 116 else if($level < 30) 117 $lev = '<font color="#339900">'.$level.'</font>'; 118 else if($level < 40) 119 $lev = '<font color="#3300CC">'.$level.'</font>'; 120 else if($level < 50) 121 $lev = '<font color="#C552FF">'.$level.'</font>'; 122 else if($level < 60) 123 $lev = '<font color="#FF8000">'.$level.'</font>'; 124 else if($level < 70) 125 $lev = '<font color="#FFF280">'.$level.'</font>'; 126 else if($level < 80) 127 $lev = '<font color="#FF0000">'.$level.'</font>'; 128 else 129 $lev = '<font color="#000000">'.$level.'</font>'; 130 110 131 if (($user_lvl >= $owner_gmlvl)||($owner_acc_name == $user_name)){ 111 132 $output .= "<tr>"; … … 118 139 <td><img src='img/c_icons/{$char[3]}-{$char[10]}.gif' onmousemove='toolTip(\"".get_player_race($char[3])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td> 119 140 <td><img src='img/c_icons/{$char[4]}.gif' onmousemove='toolTip(\"".get_player_class($char[4])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td> 120 <td>$ char[9]</td>141 <td>$lev</td> 121 142 <td>".get_map_name($char[6])."</td> 122 143 <td>".get_zone_name($char[5])."</td> … … 158 179 $search_value = $sql->quote_smart($_GET['search_value']); 159 180 $search_by = (isset($_GET['search_by'])) ? $sql->quote_smart($_GET['search_by']) : "name"; 181 $search_menu = array('name', 'guid', 'account', 'level', 'greater_level', 'guild', 'race', 'class', 'map', 'highest_rank', 'greater_rank', 'online', 'gold', 'item'); 182 if (!array_key_exists($search_by, $search_menu)) $search_by = 'name'; 160 183 $order_by = (isset($_GET['order_by'])) ? $sql->quote_smart($_GET['order_by']) : "guid"; 161 184 … … 342 365 $owner_acc_name = $sql->result($result, 0, 'username'); 343 366 367 $level = $char[9]; 368 369 if($level < 10) 370 $lev = '<font color="#FFFFFF">'.$level.'</font>'; 371 else if($level < 20) 372 $lev = '<font color="#858585">'.$level.'</font>'; 373 else if($level < 30) 374 $lev = '<font color="#339900">'.$level.'</font>'; 375 else if($level < 40) 376 $lev = '<font color="#3300CC">'.$level.'</font>'; 377 else if($level < 50) 378 $lev = '<font color="#C552FF">'.$level.'</font>'; 379 else if($level < 60) 380 $lev = '<font color="#FF8000">'.$level.'</font>'; 381 else if($level < 70) 382 $lev = '<font color="#FFF280">'.$level.'</font>'; 383 else if($level < 80) 384 $lev = '<font color="#FF0000">'.$level.'</font>'; 385 else 386 $lev = '<font color="#000000">'.$level.'</font>'; 387 344 388 if (($user_lvl >= $owner_gmlvl)||($owner_acc_name == $user_name)){ 345 389 $output .= "<tr>"; … … 353 397 <td><img src='img/c_icons/{$char[3]}-{$char[10]}.gif' onmousemove='toolTip(\"".get_player_race($char[3])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td> 354 398 <td><img src='img/c_icons/{$char[4]}.gif' onmousemove='toolTip(\"".get_player_class($char[4])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td> 355 <td>$ char[9]</td>399 <td>$lev</td> 356 400 <td>".get_map_name($char[6])."</td> 357 401 <td>".get_zone_name($char[5])."</td> -
minimanager/cleanup.php
r307 r374 10 10 11 11 require_once("header.php"); 12 valid_login(3); 12 13 // override default security : guild.php (guild leader deletes guild) 14 if(!isset($_POST['override']) || $_POST['override'] != '1') 15 valid_login($action_permission['read']); 16 13 17 14 18 //################################################################################################################# -
minimanager/command.php
r178 r374 10 10 11 11 include("header.php"); 12 valid_login( 0);12 valid_login($action_permission['read']); 13 13 14 14 //####################################################################################### … … 22 22 1 => array ('level1',''), 23 23 2 => array ('level2',''), 24 3 => array ('level3','') 24 3 => array ('level3',''), 25 4 => array ('level4',''), 26 5 => array ('level5','') 25 27 ); 26 28 … … 32 34 while ($data = $sql->fetch_row($query)){ 33 35 $tmp_output = "<tr>"; 34 $tmp_output .= ($user_lvl > 2) ? "<td><input type=\"checkbox\" name=\"check[$data[0]]\" value=\"$data[2]\" /></td>" : "<td></td>";35 $tmp_output .= "<td align=\" right\">.$data[0]</td>";36 $tmp_output .= ($user_lvl >= 4) ? "<td><input type=\"checkbox\" name=\"check[$data[0]]\" value=\"$data[2]\" /></td>" : "<td></td>"; 37 $tmp_output .= "<td align=\"left\">.$data[0]</td>"; 36 38 $comm = explode("\r\n",$data[1],2); 37 39 $syntax = ereg_replace("[a-zA-Z ]+:* *\.".$data[0]." *", "", str_replace("/", "<br />",$comm[0])); … … 51 53 52 54 for ($i=0; $i<=$user_lvl; $i++){ 53 if ($i <= 3) {55 if ($i <= 5) { 54 56 $output .= "<fieldset class=\"full_frame\"> 55 57 <legend>". … … 66 68 </tr>" . $levels[$i][1]; 67 69 68 if ($user_lvl > 2) {70 if ($user_lvl >= 5) { 69 71 $output .= "</table><br /><table class=\"hidden\" style=\"width: 720px;\"><td>"; 70 72 makebutton($lang_command['change_level'], "javascript:do_submit()",280); … … 84 86 function update_commands(){ 85 87 global $lang_global, $lang_command, $output, $user_lvl; 86 valid_login(3);88 if ($user_lvl < 4) redirect("command.php?error=2"); 87 89 88 90 if(isset($_GET['check'])) $check = $_GET['check']; … … 94 96 <table class=\"lined\" style=\"width: 720px;\"> 95 97 <tr> 96 <th width=\"20%\"></th> 97 <th width=\"20%\">{$lang_command['level0']}</th> 98 <th width=\"20%\">{$lang_command['level1']}</th> 99 <th width=\"20%\">{$lang_command['level2']}</th> 100 <th width=\"20%\">{$lang_command['level3']}</th> 98 <th width=\"22%\"></th> 99 <th width=\"13%\">{$lang_command['level0']}</th> 100 <th width=\"13%\">{$lang_command['level1']}</th> 101 <th width=\"13%\">{$lang_command['level2']}</th> 102 <th width=\"13%\">{$lang_command['level3']}</th> 103 <th width=\"13%\">{$lang_command['level4']}</th> 104 <th width=\"13%\">{$lang_command['level5']}</th> 101 105 </tr>"; 102 106 … … 117 121 if ($check[$commands[$i]]==3) $output .= "checked=\"checked\""; 118 122 $output .= " ></td> 123 <td> <input type=\"radio\" name=\"change[".$commands[$i]."]\" value=\"4\""; 124 if ($check[$commands[$i]]==3) $output .= "checked=\"checked\""; 125 $output .= " ></td> 126 <td> <input type=\"radio\" name=\"change[".$commands[$i]."]\" value=\"5\""; 127 if ($check[$commands[$i]]==3) $output .= "checked=\"checked\""; 128 $output .= " ></td> 119 129 </tr>"; 120 130 } … … 130 140 //####################################################################################################### 131 141 function doupdate_commands() { 132 global $lang_global, $output, $mangos_db, $realm_id; 133 134 valid_login(3); 142 global $lang_global, $output, $mangos_db, $realm_id, $user_lvl; 143 if ($user_lvl < 4) redirect("command.php?error=2"); 135 144 136 145 $sql = new SQL; … … 143 152 // Quick sanity check 144 153 for ($i=0; $i<count($change); $i++) { 145 if (!in_array($change[$commands[$i]],array(0,1,2,3 )))154 if (!in_array($change[$commands[$i]],array(0,1,2,3,4,5))) 146 155 redirect("command.php?error=1"); 147 156 } … … 165 174 $output .= "<h1><font class=\"error\">{$lang_global['empty_fields']}</font></h1>"; 166 175 break; 176 case 2: 177 $output .= "<h1><font class=\"error\">{$lang_global['err_no_permission']}</font></h1>"; 178 break; 167 179 default: //no error 168 180 $output .= "<h1>{$lang_command['command_list']}</h1>"; -
minimanager/creature.php
r307 r374 10 10 */ 11 11 require_once("header.php"); 12 valid_login( 1);12 valid_login($action_permission['read']); 13 13 include_once("./scripts/get_lib.php"); 14 14 … … 19 19 if ($flag & 1) $temp .= " {$lang_creature['gossip']} "; 20 20 if ($flag & 2) $temp .= " {$lang_creature['quest_giver']} "; 21 if ($flag & 4) $temp .= " {$lang_creature['vendor']} ";22 if ($flag & 8) $temp .= " {$lang_creature['taxi']} ";23 21 if ($flag & 16) $temp .= " {$lang_creature['trainer']} "; 24 if ($flag & 32) $temp .= " {$lang_creature['spirit_healer']} "; 25 if ($flag & 64) $temp .= " {$lang_creature['guard']} "; 26 if ($flag & 128) $temp .= " {$lang_creature['inn_keeper']} "; 27 if ($flag & 256) $temp .= " {$lang_creature['banker']} "; 28 if ($flag & 1024) $temp .= " {$lang_creature['tabard_vendor']} "; 29 if ($flag & 2048) $temp .= " {$lang_creature['battlemaster']} "; 30 if ($flag & 4096) $temp .= " {$lang_creature['auctioneer']} "; 31 if ($flag & 8192) $temp .= " {$lang_creature['stable_master']} "; 32 if ($flag & 16384) $temp .= " {$lang_creature['armorer']} "; 22 if ($flag & 128) $temp .= " {$lang_creature['vendor']} "; 23 if ($flag & 4096) $temp .= " {$lang_creature['armorer']} "; 24 if ($flag & 8192) $temp .= " {$lang_creature['taxi']} "; 25 if ($flag & 16384) $temp .= " {$lang_creature['spirit_healer']} "; 26 if ($flag & 65536) $temp .= " {$lang_creature['inn_keeper']} "; 27 if ($flag & 131072) $temp .= " {$lang_creature['banker']} "; 28 if ($flag & 262144) $temp .= " {$lang_creature['retitioner']} "; 29 if ($flag & 524288) $temp .= " {$lang_creature['tabard_vendor']} "; 30 if ($flag & 1048576) $temp .= " {$lang_creature['battlemaster']} "; 31 if ($flag & 2097152) $temp .= " {$lang_creature['auctioneer']} "; 32 if ($flag & 4194304) $temp .= " {$lang_creature['stable_master']} "; 33 if ($flag & 268435456) $temp .= " {$lang_creature['guard']} "; 34 33 35 if ($temp != "") return $temp; 34 36 else return $lang_creature['none']; … … 90 92 <option value=\"1\">{$lang_creature['gossip']}</option> 91 93 <option value=\"2\">{$lang_creature['quest_giver']}</option> 92 <option value=\"4\">{$lang_creature['vendor']}</option>93 <option value=\"8\">{$lang_creature['taxi']}</option>94 94 <option value=\"16\">{$lang_creature['trainer']}</option> 95 <option value=\"32\">{$lang_creature['spirit_healer']}</option> 96 <option value=\"64\">{$lang_creature['guard']}</option> 97 <option value=\"128\">{$lang_creature['inn_keeper']}</option> 98 <option value=\"256\">{$lang_creature['banker']}</option> 99 <option value=\"512\">{$lang_creature['retitioner']}</option> 100 <option value=\"1024\">{$lang_creature['tabard_vendor']}</option> 101 <option value=\"2048\">{$lang_creature['battlemaster']}</option> 102 <option value=\"4096\">{$lang_creature['auctioneer']}</option> 103 <option value=\"8192\">{$lang_creature['stable_master']}</option> 104 <option value=\"16384\">{$lang_creature['armorer']}</option> 95 <option value=\"128\">{$lang_creature['vendor']}</option> 96 <option value=\"4096\">{$lang_creature['armorer']}</option> 97 <option value=\"8192\">{$lang_creature['taxi']}</option> 98 <option value=\"16384\">{$lang_creature['spirit_healer']}</option> 99 <option value=\"65536\">{$lang_creature['inn_keeper']}</option> 100 <option value=\"131072\">{$lang_creature['banker']}</option> 101 <option value=\"262144\">{$lang_creature['retitioner']}</option> 102 <option value=\"524288\">{$lang_creature['tabard_vendor']}</option> 103 <option value=\"1048576\">{$lang_creature['battlemaster']}</option> 104 <option value=\"2097152\">{$lang_creature['auctioneer']}</option> 105 <option value=\"4194304\">{$lang_creature['stable_master']}</option> 106 <option value=\"268435456\">{$lang_creature['guard']}</option> 105 107 </select></td> 106 108 <td>{$lang_creature['type']}:</td> … … 171 173 $output .= "</td></tr> 172 174 <tr> 173 <td colspan=\"6\"> -----------------------------------------------------------------------------------------------------------------------------------------------</td>175 <td colspan=\"6\"><hr></td> 174 176 </tr> 175 177 <tr> … … 227 229 if(isset($health)) $where .= "AND minhealth <= $health AND maxhealth >= $health "; 228 230 if(isset($faction_A)) $where .= "AND faction_A = '$faction_A' "; 229 if(isset($faction_H)) $where .= "AND faction_ B = '$faction_A' ";231 if(isset($faction_H)) $where .= "AND faction_H = '$faction_H' "; 230 232 if(isset($lootid)) $where .= "AND lootid = '$lootid' "; 231 233 if(isset($ScriptName)) $where .= "AND ScriptName LIKE '%$ScriptName%' "; … … 382 384 <option value=\"1\">1: {$lang_creature['gossip']}</option> 383 385 <option value=\"2\">2: {$lang_creature['quest_giver']}</option> 384 <option value=\"4\">4: {$lang_creature['vendor']}</option>385 <option value=\"8\">8: {$lang_creature['taxi']}</option>386 386 <option value=\"16\">16: {$lang_creature['trainer']}</option> 387 <option value=\"32\">32: {$lang_creature['spirit_healer']}</option> 388 <option value=\"64\">64: {$lang_creature['guard']}</option> 389 <option value=\"128\">128: {$lang_creature['inn_keeper']}</option> 390 <option value=\"256\">256: {$lang_creature['banker']}</option> 391 <option value=\"512\">512: {$lang_creature['retitioner']}</option> 392 <option value=\"1024\">1024: {$lang_creature['tabard_vendor']}</option> 393 <option value=\"2048\">2048: {$lang_creature['battlemaster']}</option> 394 <option value=\"4096\">4096: {$lang_creature['auctioneer']}</option> 395 <option value=\"8192\">8192: {$lang_creature['stable_master']}</option> 396 <option value=\"16384\">16384: {$lang_creature['armorer']}</option> 387 <option value=\"128\">128: {$lang_creature['vendor']}</option> 388 <option value=\"4096\">4096: {$lang_creature['armorer']}</option> 389 <option value=\"8192\">8192: {$lang_creature['taxi']}</option> 390 <option value=\"16384\">16384: {$lang_creature['spirit_healer']}</option> 391 <option value=\"65536\">65536: {$lang_creature['inn_keeper']}</option> 392 <option value=\"131072\">131072: {$lang_creature['banker']}</option> 393 <option value=\"262144\">262144: {$lang_creature['retitioner']}</option> 394 <option value=\"524288\">524288: {$lang_creature['tabard_vendor']}</option> 395 <option value=\"1048576\">1048576: {$lang_creature['battlemaster']}</option> 396 <option value=\"2097152\">2097152: {$lang_creature['auctioneer']}</option> 397 <option value=\"4194304\">4194304: {$lang_creature['stable_master']}</option> 398 <option value=\"268435456\">268435456: {$lang_creature['guard']}</option> 397 399 </select></td> 398 400 … … 641 643 </select></td> 642 644 643 <td>".makeinfocell($lang_creature[' civilian'],$lang_creature['civilian_desc'])."</td>644 <td><input type=\" checkbox\" name=\"civilian\" value=\"1\" /></td>645 <td>".makeinfocell($lang_creature['flags_extra'],$lang_creature['flags_extra_desc'])."</td> 646 <td><input type=\"text\" name=\"flags_extra\" size=\"8\" maxlength=\"11\" value=\"0\" /></td> 645 647 </tr> 646 648 <tr> … … 690 692 $entry = $sql->quote_smart($_GET['entry']); 691 693 $deplang = get_lang_id(); 692 $result = $sql->query("SELECT `creature_template`.`entry`,`modelid_A`,`modelid_A2`,`modelid_H`,`modelid_H2`, IFNULL(".($deplang<>0?"name_loc$deplang":"NULL").",`name`) as name,`subname`,`minlevel`,`maxlevel`,`minhealth`,`maxhealth`,`minmana`,`maxmana`,`armor`,`faction_A`,`faction_H`,`npcflag`,`speed`,`rank`,`mindmg`,`maxdmg`,`dmgschool`,`attackpower`,`baseattacktime`,`rangeattacktime`,`flags`,`dynamicflags`,`family`,`trainer_type`,`trainer_spell`,`class`,`race`,`minrangedmg`,`maxrangedmg`,`rangedattackpower`,`type`,`civilian`,`flag1`,`lootid`,`pickpocketloot`,`skinloot`,`resistance1`,`resistance2`,`resistance3`,`resistance4`,`resistance5`,`resistance6`,`spell1`,`spell2`,`spell3`,`spell4`,`mingold`,`maxgold`,`AIName`,`MovementType`,`InhabitType`,`RacialLeader`,`RegenHealth`,`equipment_id`,`ScriptName` FROM creature_template LEFT JOIN locales_creature ON creature_template.entry = locales_creature.entry WHERE creature_template.entry = '$entry'"); 693 694 $result = $sql->query("SELECT `creature_template`.`entry`,`modelid_A`,`modelid_A2`,`modelid_H`,`modelid_H2`, IFNULL(".($deplang<>0?"name_loc$deplang":"NULL").",`name`) as name,`subname`,`minlevel`,`maxlevel`,`minhealth`,`maxhealth`,`minmana`,`maxmana`,`armor`,`faction_A`,`faction_H`,`npcflag`,`speed`,`rank`,`mindmg`,`maxdmg`,`dmgschool`,`attackpower`,`baseattacktime`,`rangeattacktime`,`flags`,`dynamicflags`,`family`,`trainer_type`,`trainer_spell`,`class`,`race`,`minrangedmg`,`maxrangedmg`,`rangedattackpower`,`type`,`flags_extra`,`flag1`,`lootid`,`pickpocketloot`,`skinloot`,`resistance1`,`resistance2`,`resistance3`,`resistance4`,`resistance5`,`resistance6`,`spell1`,`spell2`,`spell3`,`spell4`,`mingold`,`maxgold`,`AIName`,`MovementType`,`InhabitType`,`RacialLeader`,`RegenHealth`,`equipment_id`,`ScriptName` FROM creature_template LEFT JOIN locales_creature ON creature_template.entry = locales_creature.entry WHERE creature_template.entry = '$entry'"); 694 695 695 696 if ($mob = $sql->fetch_assoc($result)){ … … 729 730 $output .= "<li><a href=\"#\" onclick=\"return showPane('pane8', this)\">{$lang_creature['trainer']}</a></li>"; 730 731 } 732 } 733 if ($mob['npcflag'] & 128) { 734 $vendor_flag = 1; 735 $output .= "<li><a href=\"#\" onclick=\"return showPane('pane7', this)\">{$lang_creature['vendor']}</a></li>"; 736 } 737 if ($mob['npcflag'] & 16384) { 738 $vendor_flag = 1; 739 $output .= "<li><a href=\"#\" onclick=\"return showPane('pane7', this)\">{$lang_creature['vendor']}</a></li>"; 731 740 } 732 741 if ($mob['lootid']) { … … 836 845 unset($type); 837 846 838 $npcflag = array(0 => "", 1 => "", 2 => "", 4 => "", 8 => "", 16 => "", 32 => "", 64 => "", 128=> "",839 256 => "", 512 => "", 1024 => "", 2048 => "", 4096 => "", 8192 => "", 16384=> "");847 $npcflag = array(0 => "", 1 => "", 2 => "", 16 => "", 128 => "", 4096 => "", 8192 => "", 16384 => "", 65536 => "", 848 131072 => "", 262144 => "", 524288 => "", 1048576 => "", 2097152 => "", 4194304 => "", 268435456 => ""); 840 849 841 850 if($mob['npcflag'] == 0) $npcflag[0] = " selected=\"selected\" "; … … 843 852 if ($mob['npcflag'] & 1) $npcflag[1] = " selected=\"selected\" "; 844 853 if ($mob['npcflag'] & 2) $npcflag[2] = " selected=\"selected\" "; 845 if ($mob['npcflag'] & 4) $npcflag[4] = " selected=\"selected\" ";846 if ($mob['npcflag'] & 8) $npcflag[8] = " selected=\"selected\" ";847 854 if ($mob['npcflag'] & 16) $npcflag[16] = " selected=\"selected\" "; 848 if ($mob['npcflag'] & 32) $npcflag[32] = " selected=\"selected\" ";849 if ($mob['npcflag'] & 64) $npcflag[64] = " selected=\"selected\" ";850 855 if ($mob['npcflag'] & 128) $npcflag[128] = " selected=\"selected\" "; 851 if ($mob['npcflag'] & 256) $npcflag[256] = " selected=\"selected\" ";852 if ($mob['npcflag'] & 512) $npcflag[512] = " selected=\"selected\" ";853 if ($mob['npcflag'] & 1024) $npcflag[1024] = " selected=\"selected\" ";854 if ($mob['npcflag'] & 2048) $npcflag[2048] = " selected=\"selected\" ";855 856 if ($mob['npcflag'] & 4096) $npcflag[4096] = " selected=\"selected\" "; 856 857 if ($mob['npcflag'] & 8192) $npcflag[8192] = " selected=\"selected\" "; 857 858 if ($mob['npcflag'] & 16384) $npcflag[16384] = " selected=\"selected\" "; 859 if ($mob['npcflag'] & 65536) $npcflag[65536] = " selected=\"selected\" "; 860 if ($mob['npcflag'] & 131072) $npcflag[131072] = " selected=\"selected\" "; 861 if ($mob['npcflag'] & 262144) $npcflag[262144] = " selected=\"selected\" "; 862 if ($mob['npcflag'] & 524288) $npcflag[524288] = " selected=\"selected\" "; 863 if ($mob['npcflag'] & 1048576) $npcflag[1048576] = " selected=\"selected\" "; 864 if ($mob['npcflag'] & 2097152) $npcflag[2097152] = " selected=\"selected\" "; 865 if ($mob['npcflag'] & 4194304) $npcflag[4194304] = " selected=\"selected\" "; 866 if ($mob['npcflag'] & 268435456) $npcflag[268435456] = " selected=\"selected\" "; 858 867 } 859 868 … … 1202 1211 unset($InhabitType); 1203 1212 1204 if ($mob['civilian']) $civilian = "checked"; 1205 else $civilian = ""; 1206 1207 $output .= "<td>".makeinfocell($lang_creature['civilian'],$lang_creature['civilian_desc'])."</td> 1208 <td><input type=\"checkbox\" name=\"civilian\" value=\"1\" $civilian /></td> 1213 $output .= "<td>".makeinfocell($lang_creature['flags_extra'],$lang_creature['flags_extra_desc'])."</td> 1214 <td><input type=\"text\" name=\"flags_extra\" size=\"8\" maxlength=\"11\" value=\"{$mob['flags_extra']}\" /></td> 1209 1215 </tr> 1210 1216 <tr> … … 1232 1238 $row_flag = 0; 1233 1239 $output .= "<table class=\"hidden\" align=\"center\"><tr>"; 1234 $result1 = $sql->query("SELECT item,ChanceOr Ref,QuestChanceOrGroup,mincount,maxcount,freeforall, lootcondition, condition_value1,condition_value2 FROM creature_loot_template WHERE entry = {$mob['lootid']} ORDER BY ChanceOrRefDESC");1240 $result1 = $sql->query("SELECT item,ChanceOrQuestChance,`groupid`,mincountOrRef,maxcount, lootcondition, condition_value1,condition_value2 FROM creature_loot_template WHERE entry = {$mob['lootid']} ORDER BY ChanceOrQuestChance DESC"); 1235 1241 while ($item = $sql->fetch_row($result1)){ 1236 1242 $cel_counter++; 1237 $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[' freeforall']}: $item[5]<br />{$lang_creature['lootcondition']}: $item[6]<br />{$lang_creature['condition_value1']}: $item[7]<br />{$lang_creature['condition_value2']}: $item[8]";1243 $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['lootcondition']}: $item[5]<br />{$lang_creature['condition_value1']}: $item[6]<br />{$lang_creature['condition_value2']}: $item[7]"; 1238 1244 $output .= "<td>"; 1239 1245 $output .= maketooltip("<img src=\"".get_icon($item[0])."\" class=\"icon_border\" alt=\"\" />", "$item_datasite$item[0]", $tooltip, "item_tooltip"); 1240 1246 $output .= "<br /><input type=\"checkbox\" name=\"del_loot_items[]\" value=\"$item[0]\" /></td>"; 1241 1247 1242 if ($cel_counter >= 1 6) {1248 if ($cel_counter >= 14) { 1243 1249 $cel_counter = 0; 1244 1250 $output .= "</tr><tr>"; … … 1255 1261 <td><input type=\"text\" name=\"item\" size=\"8\" maxlength=\"10\" value=\"\" /></td> 1256 1262 <td>".makeinfocell($lang_creature['loot_drop_chance'],$lang_creature['loot_drop_chance_desc'])."</td> 1257 <td><input type=\"text\" name=\"ChanceOr Ref\" size=\"8\" maxlength=\"11\" value=\"0\" /></td>1263 <td><input type=\"text\" name=\"ChanceOrQuestChance\" size=\"8\" maxlength=\"11\" value=\"0\" /></td> 1258 1264 <td>".makeinfocell($lang_creature['loot_quest_drop_chance'],$lang_creature['loot_quest_drop_chance_desc'])."</td> 1259 <td><input type=\"text\" name=\" QuestChanceOrGroup\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>1265 <td><input type=\"text\" name=\"groupid\" size=\"8\" maxlength=\"10\" value=\"0\" /></td> 1260 1266 </tr> 1261 1267 <tr> 1262 1268 <td>".makeinfocell($lang_creature['min_count'],$lang_creature['min_count_desc'])."</td> 1263 <td><input type=\"text\" name=\"mincount \" size=\"8\" maxlength=\"3\" value=\"1\" /></td>1269 <td><input type=\"text\" name=\"mincountOrRef\" size=\"8\" maxlength=\"3\" value=\"1\" /></td> 1264 1270 <td>".makeinfocell($lang_creature['max_count'],$lang_creature['max_count_desc'])."</td> 1265 1271 <td><input type=\"text\" name=\"maxcount\" size=\"8\" maxlength=\"3\" value=\"1\" /></td> 1266 <td>".makeinfocell($lang_creature['freeforall'],$lang_creature['freeforall_desc'])."</td>1267 <td><input type=\"text\" name=\"freeforall\" size=\"8\" maxlength=\"3\" value=\"1\" /></td>1268 1272 </tr> 1269 1273 <tr> … … 1319 1323 $output .= "<div id=\"pane7\"> 1320 1324 <br /><br /><table class=\"lined\" style=\"width: 720px;\"> 1321 <tr class=\"large_bold\"><td colspan=\" 6\" class=\"hidden\" align=\"left\">{$lang_creature['sells']}:</td></tr>1322 <tr><td colspan=\" 6\">";1325 <tr class=\"large_bold\"><td colspan=\"8\" class=\"hidden\" align=\"left\">{$lang_creature['sells']}:</td></tr> 1326 <tr><td colspan=\"8\">"; 1323 1327 1324 1328 $cel_counter = 0; 1325 1329 $row_flag = 0; 1326 1330 $output .= "<table class=\"hidden\" align=\"center\"><tr>"; 1327 $result1 = $sql->query("SELECT item, maxcount, incrtime FROM npc_vendor WHERE entry = {$mob['entry']}");1331 $result1 = $sql->query("SELECT item, maxcount, incrtime, ExtendedCost FROM npc_vendor WHERE entry = {$mob['entry']}"); 1328 1332 while ($item = $sql->fetch_row($result1)){ 1329 1333 $cel_counter++; … … 1335 1339 $output .= "<br /><input type=\"checkbox\" name=\"del_vendor_item[]\" value=\"$item[0]\" /></td>"; 1336 1340 1337 if ($cel_counter >= 1 6) {1341 if ($cel_counter >= 14) { 1338 1342 $cel_counter = 0; 1339 1343 $output .= "</tr><tr>"; … … 1345 1349 $output .= "</td></tr></table> 1346 1350 </td></tr> 1347 <tr class=\"large_bold\"><td colspan=\" 6\" class=\"hidden\" align=\"left\">{$lang_creature['add_items_to_vendor']}:</td></tr>1351 <tr class=\"large_bold\"><td colspan=\"8\" class=\"hidden\" align=\"left\">{$lang_creature['add_items_to_vendor']}:</td></tr> 1348 1352 <tr> 1349 1353 <td>".makeinfocell($lang_creature['vendor_item_id'],$lang_creature['vendor_item_id_desc'])."</td> … … 1352 1356 <td><input type=\"text\" name=\"vendor_maxcount\" size=\"8\" maxlength=\"3\" value=\"0\" /></td> 1353 1357 <td>".makeinfocell($lang_creature['vendor_incrtime'],$lang_creature['vendor_incrtime_desc'])."</td> 1354 <td><input type=\"text\" name=\"vendor_incrtime\" size=\"8\" maxlength=\"10\" value=\"0\" /></td> 1358 <td><input type=\"text\" name=\"vendor_incrtime\" size=\"8\" maxlength=\"10\" value=\"0\" /></td> 1359 <td>".makeinfocell($lang_creature['vendor_extended_cost'],$lang_creature['vendor_extended_cost_desc'])."</td> 1360 <td><input type=\"text\" name=\"vendor_extended_cost\" size=\"8\" maxlength=\"10\" value=\"0\" /></td> 1355 1361 </tr> 1356 1362 </table><br />{$lang_creature['check_to_delete']}<br /><br /> … … 1414 1420 $row_flag = 0; 1415 1421 $output .= "<table class=\"hidden\" align=\"center\"><tr>"; 1416 $result1 = $sql->query("SELECT item,ChanceOr Ref,QuestChanceOrGroup,mincount,maxcount,freeforall, lootcondition, condition_value1, condition_value2 FROM skinning_loot_template WHERE entry = {$mob['skinloot']} ORDER BY ChanceOrRefDESC");1422 $result1 = $sql->query("SELECT item,ChanceOrQuestChance,`groupid`,mincountOrRef,maxcount, lootcondition, condition_value1, condition_value2 FROM skinning_loot_template WHERE entry = {$mob['skinloot']} ORDER BY ChanceOrQuestChance DESC"); 1417 1423 while ($item = $sql->fetch_row($result1)){ 1418 1424 $cel_counter++; 1419 $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[' freeforall']}: $item[5]<br />{$lang_creature['lootcondition']}: $item[6]<br />{$lang_creature['condition_value1']}: $item[7]<br />{$lang_creature['condition_value2']}: $item[8]";1425 $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['lootcondition']}: $item[5]<br />{$lang_creature['condition_value1']}: $item[6]<br />{$lang_creature['condition_value2']}: $item[7]"; 1420 1426 $output .= "<td>"; 1421 1427 $output .= maketooltip("<img src=\"".get_icon($item[0])."\" class=\"icon_border\" alt=\"\" />", "$item_datasite$item[0]", $tooltip, "item_tooltip"); … … 1437 1443 <td><input type=\"text\" name=\"skin_item\" size=\"8\" maxlength=\"10\" value=\"\" /></td> 1438 1444 <td>".makeinfocell($lang_creature['loot_drop_chance'],$lang_creature['loot_drop_chance_desc'])."</td> 1439 <td><input type=\"text\" name=\"skin_ChanceOr Ref\" size=\"8\" maxlength=\"11\" value=\"0\" /></td>1445 <td><input type=\"text\" name=\"skin_ChanceOrQuestChance\" size=\"8\" maxlength=\"11\" value=\"0\" /></td> 1440 1446 <td>".makeinfocell($lang_creature['loot_quest_drop_chance'],$lang_creature['loot_quest_drop_chance_desc'])."</td> 1441 <td><input type=\"text\" name=\"skin_ QuestChanceOrGroup\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>1447 <td><input type=\"text\" name=\"skin_groupid\" size=\"8\" maxlength=\"10\" value=\"0\" /></td> 1442 1448 </tr> 1443 1449 <tr> 1444 1450 <td>".makeinfocell($lang_creature['min_count'],$lang_creature['min_count_desc'])."</td> 1445 <td><input type=\"text\" name=\"skin_mincount \" size=\"8\" maxlength=\"3\" value=\"1\" /></td>1451 <td><input type=\"text\" name=\"skin_mincountOrRef\" size=\"8\" maxlength=\"3\" value=\"1\" /></td> 1446 1452 <td>".makeinfocell($lang_creature['max_count'],$lang_creature['max_count_desc'])."</td> 1447 1453 <td><input type=\"text\" name=\"skin_maxcount\" size=\"8\" maxlength=\"3\" value=\"1\" /></td> 1448 <td>".makeinfocell($lang_creature['freeforall'],$lang_creature['freeforall_desc'])."</td>1449 <td><input type=\"text\" name=\"skin_freeforall\" size=\"8\" maxlength=\"3\" value=\"1\" /></td>1450 1454 </tr> 1451 1455 <tr> … … 1471 1475 $row_flag = 0; 1472 1476 $output .= "<table class=\"hidden\" align=\"center\"><tr>"; 1473 $result1 = $sql->query("SELECT item,ChanceOr Ref,QuestChanceOrGroup,mincount,maxcount,freeforall, lootcondition, condition_value1, condition_value2 FROM pickpocketing_loot_template WHERE entry = {$mob['pickpocketloot']} ORDER BY ChanceOrRefDESC");1477 $result1 = $sql->query("SELECT item,ChanceOrQuestChance,`groupid`,mincountOrRef,maxcount, lootcondition, condition_value1, condition_value2 FROM pickpocketing_loot_template WHERE entry = {$mob['pickpocketloot']} ORDER BY ChanceOrQuestChance DESC"); 1474 1478 while ($item = $sql->fetch_row($result1)){ 1475 1479 $cel_counter++; 1476 $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[' freeforall']}: $item[5]<br />{$lang_creature['lootcondition']}: $item[6]<br />{$lang_creature['condition_value1']}: $item[7]<br />{$lang_creature['condition_value2']}: $item[8]";1480 $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['lootcondition']}: $item[5]<br />{$lang_creature['condition_value1']}: $item[6]<br />{$lang_creature['condition_value2']}: $item[7]"; 1477 1481 $output .= "<td>"; 1478 1482 $output .= maketooltip("<img src=\"".get_icon($item[0])."\" class=\"icon_border\" alt=\"\" />", "$item_datasite$item[0]", $tooltip, "item_tooltip"); … … 1494 1498 <td><input type=\"text\" name=\"pp_item\" size=\"8\" maxlength=\"10\" value=\"\" /></td> 1495 1499 <td>".makeinfocell($lang_creature['loot_drop_chance'],$lang_creature['loot_drop_chance_desc'])."</td> 1496 <td><input type=\"text\" name=\"pp_ChanceOr Ref\" size=\"8\" maxlength=\"11\" value=\"0\" /></td>1500 <td><input type=\"text\" name=\"pp_ChanceOrQuestChance\" size=\"8\" maxlength=\"11\" value=\"0\" /></td> 1497 1501 <td>".makeinfocell($lang_creature['loot_quest_drop_chance'],$lang_creature['loot_quest_drop_chance_desc'])."</td> 1498 <td><input type=\"text\" name=\"pp_ QuestChanceOrGroup\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>1502 <td><input type=\"text\" name=\"pp_groupid\" size=\"8\" maxlength=\"10\" value=\"0\" /></td> 1499 1503 </tr> 1500 1504 <tr> 1501 1505 <td>".makeinfocell($lang_creature['min_count'],$lang_creature['min_count_desc'])."</td> 1502 <td><input type=\"text\" name=\"pp_mincount \" size=\"8\" maxlength=\"3\" value=\"1\" /></td>1506 <td><input type=\"text\" name=\"pp_mincountOrRef\" size=\"8\" maxlength=\"3\" value=\"1\" /></td> 1503 1507 <td>".makeinfocell($lang_creature['max_count'],$lang_creature['max_count_desc'])."</td> 1504 1508 <td><input type=\"text\" name=\"pp_maxcount\" size=\"8\" maxlength=\"3\" value=\"1\" /></td> 1505 <td>".makeinfocell($lang_creature['freeforall'],$lang_creature['freeforall_desc'])."</td>1506 <td><input type=\"text\" name=\"pp_freeforall\" size=\"8\" maxlength=\"3\" value=\"1\" /></td>1507 1509 </tr> 1508 1510 <tr> … … 1609 1611 if (isset($_POST['family']) && $_POST['family'] != '') $family = $sql->quote_smart($_POST['family']); 1610 1612 else $family = 0; 1611 //if (isset($_POST['bounding_radius']) && $_POST['bounding_radius'] != '') $bounding_radius = $sql->quote_smart($_POST['bounding_radius']);1612 // else $bounding_radius = 0;1613 1613 if (isset($_POST['trainer_type']) && $_POST['trainer_type'] != '') $trainer_type = $sql->quote_smart($_POST['trainer_type']); 1614 1614 else $trainer_type = 0; … … 1629 1629 if (isset($_POST['type']) && $_POST['type'] != '') $type = $sql->quote_smart($_POST['type']); 1630 1630 else $type = 0; 1631 if (isset($_POST[' civilian']) && $_POST['civilian'] != '') $civilian = $sql->quote_smart($_POST['civilian']);1632 else $civilian= 0;1631 if (isset($_POST['flags_extra']) && $_POST['flags_extra'] != '') $flags_extra = $sql->quote_smart($_POST['flags_extra']); 1632 else $flags_extra = 0; 1633 1633 if (isset($_POST['flag1']) && $_POST['flag1'] != '') $flag1 = $sql->quote_smart($_POST['flag1']); 1634 1634 else $flag1 = 0; 1635 // if (isset($_POST['equipmodel1']) && $_POST['equipmodel1'] != '') $equipmodel1 = $sql->quote_smart($_POST['equipmodel1']);1636 // else $equipmodel1 = 0;1637 // if (isset($_POST['equipmodel2']) && $_POST['equipmodel2'] != '') $equipmodel2 = $sql->quote_smart($_POST['equipmodel2']);1638 // else $equipmodel2 = 0;1639 // if (isset($_POST['equipmodel3']) && $_POST['equipmodel3'] != '') $equipmodel3 = $sql->quote_smart($_POST['equipmodel3']);1640 // else $equipmodel3 = 0;1641 // if (isset($_POST['equipinfo1']) && $_POST['equipinfo1'] != '') $equipinfo1 = $sql->quote_smart($_POST['equipinfo1']);1642 // else $equipinfo1 = 0;1643 // if (isset($_POST['equipinfo2']) && $_POST['equipinfo2'] != '') $equipinfo2 = $sql->quote_smart($_POST['equipinfo2']);1644 // else $equipinfo2 = 0;1645 // if (isset($_POST['equipinfo3']) && $_POST['equipinfo3'] != '') $equipinfo3 = $sql->quote_smart($_POST['equipinfo3']);1646 // else $equipinfo3 = 0;1647 // if (isset($_POST['equipslot1']) && $_POST['equipslot1'] != '') $equipslot1 = $sql->quote_smart($_POST['equipslot1']);1648 // else $equipslot1 = 0;1649 // if (isset($_POST['equipslot2']) && $_POST['equipslot2'] != '') $equipslot2 = $sql->quote_smart($_POST['equipslot2']);1650 // else $equipslot2 = 0;1651 // if (isset($_POST['equipslot3']) && $_POST['equipslot3'] != '') $equipslot3 = $sql->quote_smart($_POST['equipslot3']);1652 // else $equipslot3 = 0;1653 1635 if (isset($_POST['lootid']) && $_POST['lootid'] != '') $lootid = $sql->quote_smart($_POST['lootid']); 1654 1636 else $lootid = 0; … … 1692 1674 else $RacialLeader = 0; 1693 1675 1694 if (isset($_POST['ChanceOr Ref']) && $_POST['ChanceOrRef'] != '') $ChanceOrRef = $sql->quote_smart($_POST['ChanceOrRef']);1695 else $ChanceOr Ref= 0;1696 if (isset($_POST[' QuestChanceOrGroup']) && $_POST['QuestChanceOrGroup'] != '') $QuestChanceOrGroup = $sql->quote_smart($_POST['QuestChanceOrGroup']);1697 else $ QuestChanceOrGroup= 0;1698 if (isset($_POST['mincount ']) && $_POST['mincount'] != '') $mincount = $sql->quote_smart($_POST['mincount']);1699 else $mincount = 0;1676 if (isset($_POST['ChanceOrQuestChance']) && $_POST['ChanceOrQuestChance'] != '') $ChanceOrQuestChance = $sql->quote_smart($_POST['ChanceOrQuestChance']); 1677 else $ChanceOrQuestChance = 0; 1678 if (isset($_POST['groupid']) && $_POST['groupid'] != '') $groupid = $sql->quote_smart($_POST['groupid']); 1679 else $groupid = 0; 1680 if (isset($_POST['mincountOrRef']) && $_POST['mincountOrRef'] != '') $mincountOrRef = $sql->quote_smart($_POST['mincountOrRef']); 1681 else $mincountOrRef = 0; 1700 1682 if (isset($_POST['maxcount']) && $_POST['maxcount'] != '') $maxcount = $sql->quote_smart($_POST['maxcount']); 1701 1683 else $maxcount = 0; 1702 1684 1703 if (isset($_POST['freeforall']) && $_POST['freeforall'] != '') $freeforall = $sql->quote_smart($_POST['freeforall']);1704 else $freeforall = 0;1705 1685 if (isset($_POST['lootcondition']) && $_POST['lootcondition'] != '') $lootcondition = $sql->quote_smart($_POST['lootcondition']); 1706 1686 else $lootcondition = 0; … … 1729 1709 if (isset($_POST['vendor_maxcount']) && $_POST['vendor_maxcount'] != '') $vendor_maxcount = $sql->quote_smart($_POST['vendor_maxcount']); 1730 1710 else $vendor_maxcount = 0; 1731 if (isset($_POST['vendor_incrtime']) && $_POST['vendor_incrtime'] != '') $vendor_incrtime = $sql->quote_smart($_POST['vendor_incrtime']); 1732 else $vendor_incrtime = 0; 1733 1734 if (isset($_POST['skin_ChanceOrRef']) && $_POST['skin_ChanceOrRef'] != '') $skin_ChanceOrRef = $sql->quote_smart($_POST['skin_ChanceOrRef']); 1735 else $skin_ChanceOrRef = 0; 1736 if (isset($_POST['skin_QuestChanceOrGroup']) && $_POST['skin_QuestChanceOrGroup'] != '') $skin_QuestChanceOrGroup = $sql->quote_smart($_POST['skin_QuestChanceOrGroup']); 1737 else $skin_QuestChanceOrGroup = 0; 1738 if (isset($_POST['skin_mincount']) && $_POST['skin_mincount'] != '') $skin_mincount = $sql->quote_smart($_POST['skin_mincount']); 1739 else $skin_mincount = 0; 1711 if (isset($_POST['vendor_incrtime']) && $_POST['vendor_incrtime'] != '') $vendor_incrtime = $sql->quote_smart($_POST['vendor_incrtime']); 1712 else $vendor_incrtime = 0; 1713 if (isset($_POST['vendor_extended_cost']) && $_POST['vendor_extended_cost'] != '') $vendor_extended_cost = $sql->quote_smart($_POST['vendor_extended_cost']); 1714 else $vendor_extended_cost = 0; 1715 1716 if (isset($_POST['skin_ChanceOrQuestChance']) && $_POST['skin_ChanceOrQuestChance'] != '') $skin_ChanceOrQuestChance = $sql->quote_smart($_POST['skin_ChanceOrQuestChance']); 1717 else $skin_ChanceOrQuestChance = 0; 1718 if (isset($_POST['skin_groupid']) && $_POST['skin_groupid'] != '') $skin_groupid = $sql->quote_smart($_POST['skin_groupid']); 1719 else $skin_groupid = 0; 1720 if (isset($_POST['skin_mincountOrRef']) && $_POST['skin_mincountOrRef'] != '') $skin_mincountOrRef = $sql->quote_smart($_POST['skin_mincountOrRef']); 1721 else $skin_mincountOrRef = 0; 1740 1722 if (isset($_POST['skin_maxcount']) && $_POST['skin_maxcount'] != '') $skin_maxcount = $sql->quote_smart($_POST['skin_maxcount']); 1741 1723 else $skin_maxcount = 0; 1742 1724 1743 if (isset($_POST['skin_freeforall']) && $_POST['skin_freeforall'] != '') $skin_freeforall = $sql->quote_smart($_POST['skin_freeforall']);1744 else $skin_freeforall = 0;1745 1725 if (isset($_POST['skin_lootcondition']) && $_POST['skin_lootcondition'] != '') $skin_lootcondition = $sql->quote_smart($_POST['skin_lootcondition']); 1746 1726 else $skin_lootcondition = 0; … … 1755 1735 else $del_skin_items = NULL; 1756 1736 1757 if (isset($_POST['pp_ChanceOr Ref']) && $_POST['pp_ChanceOrRef'] != '') $pp_ChanceOrRef = $sql->quote_smart($_POST['pp_ChanceOrRef']);1758 else $pp_ChanceOr Ref= 0;1759 if (isset($_POST['pp_ QuestChanceOrGroup']) && $_POST['pp_QuestChanceOrGroup'] != '') $pp_QuestChanceOrGroup = $sql->quote_smart($_POST['pp_QuestChanceOrGroup']);1760 else $pp_ QuestChanceOrGroup= 0;1761 if (isset($_POST['pp_mincount ']) && $_POST['pp_mincount'] != '') $pp_mincount = $sql->quote_smart($_POST['pp_mincount']);1762 else $pp_mincount = 0;1737 if (isset($_POST['pp_ChanceOrQuestChance']) && $_POST['pp_ChanceOrQuestChance'] != '') $pp_ChanceOrQuestChance = $sql->quote_smart($_POST['pp_ChanceOrQuestChance']); 1738 else $pp_ChanceOrQuestChance = 0; 1739 if (isset($_POST['pp_groupid']) && $_POST['pp_groupid'] != '') $pp_groupid = $sql->quote_smart($_POST['pp_groupid']); 1740 else $pp_groupid = 0; 1741 if (isset($_POST['pp_mincountOrRef']) && $_POST['pp_mincountOrRef'] != '') $pp_mincountOrRef = $sql->quote_smart($_POST['pp_mincountOrRef']); 1742 else $pp_mincountOrRef = 0; 1763 1743 if (isset($_POST['pp_maxcount']) && $_POST['pp_maxcount'] != '') $pp_maxcount = $sql->quote_smart($_POST['pp_maxcount']); 1764 1744 else $pp_maxcount = 0; 1765 1745 1766 if (isset($_POST['pp_freeforall']) && $_POST['pp_freeforall'] != '') $pp_freeforall = $sql->quote_smart($_POST['pp_freeforall']);1767 else $pp_freeforall = 0;1768 1746 if (isset($_POST['pp_lootcondition']) && $_POST['pp_lootcondition'] != '') $pp_lootcondition = $sql->quote_smart($_POST['pp_lootcondition']); 1769 1747 else $pp_lootcondition = 0; … … 1794 1772 if ($npcflag[$t] & 1) $tmp = $tmp + 1; 1795 1773 if ($npcflag[$t] & 2) $tmp = $tmp + 2; 1796 if ($npcflag[$t] & 4) $tmp = $tmp + 4;1797 if ($npcflag[$t] & 8) $tmp = $tmp + 8;1798 1774 if ($npcflag[$t] & 16) $tmp = $tmp + 16; 1799 if ($npcflag[$t] & 32) $tmp = $tmp + 32;1800 if ($npcflag[$t] & 64) $tmp = $tmp + 64;1801 1775 if ($npcflag[$t] & 128) $tmp = $tmp + 128; 1802 if ($npcflag[$t] & 256) $tmp = $tmp + 256;1803 if ($npcflag[$t] & 512) $tmp = $tmp + 512;1804 if ($npcflag[$t] & 1024) $tmp = $tmp + 1024;1805 if ($npcflag[$t] & 2048) $tmp = $tmp + 2048;1806 1776 if ($npcflag[$t] & 4096) $tmp = $tmp + 4096; 1807 1777 if ($npcflag[$t] & 8192) $tmp = $tmp + 8192; 1808 1778 if ($npcflag[$t] & 16384) $tmp = $tmp + 16384; 1779 if ($npcflag[$t] & 65536) $tmp = $tmp + 65536; 1780 if ($npcflag[$t] & 131072) $tmp = $tmp + 131072; 1781 if ($npcflag[$t] & 262144) $tmp = $tmp + 262144; 1782 if ($npcflag[$t] & 524288) $tmp = $tmp + 524288; 1783 if ($npcflag[$t] & 1048576) $tmp = $tmp + 1048576; 1784 if ($npcflag[$t] & 2097152) $tmp = $tmp + 2097152; 1785 if ($npcflag[$t] & 4194304) $tmp = $tmp + 4194304; 1786 if ($npcflag[$t] & 268435456) $tmp = $tmp + 268435456; 1809 1787 } 1810 1788 $npcflag = ($tmp) ? $tmp : 0; … … 1815 1793 maxdmg, dmgschool, attackpower, baseattacktime, rangeattacktime, flags, dynamicflags, family, 1816 1794 trainer_type, trainer_spell, class, race, minrangedmg, maxrangedmg, rangedattackpower, 1817 type, civilian, flag1, lootid, pickpocketloot, skinloot, resistance1,1795 type, flags_extra, flag1, lootid, pickpocketloot, skinloot, resistance1, 1818 1796 resistance2, resistance3, resistance4, resistance5, resistance6, spell1, spell2, spell3, spell4, 1819 1797 mingold, maxgold, AIName, MovementType, InhabitType, RacialLeader, ScriptName) VALUES ( '$entry', '$modelid_A', '$modelid_H', '$name', … … 1821 1799 '$speed', '$rank', '$mindmg', '$maxdmg', '$dmgschool', '$attackpower', '$baseattacktime', '$rangeattacktime', '$flags', 1822 1800 '$dynamicflags', '$family', '$trainer_type', '$trainer_spell', '$class', '$race', 1823 '$minrangedmg', '$maxrangedmg', '$rangedattackpower', '$type', '$civilian', '$flag1',1801 '$minrangedmg', '$maxrangedmg', '$rangedattackpower', '$type', '$flags_extra', '$flag1', 1824 1802 '$lootid', '$pickpocketloot', '$skinloot', '$resistance1', '$resistance2', 1825 1803 '$resistance3', '$resistance4', '$resistance5', '$resistance6', '$spell1', '$spell2', '$spell3', '$spell4', 1826 1804 '$mingold', '$maxgold', '$AIName', '$MovementType', '$InhabitType', '$RacialLeader', '$ScriptName' )"; 1805 1806 redirect("creature.php?error=7"); 1827 1807 1828 1808 } elseif ($_POST['opp_type'] == "edit"){ … … 1830 1810 $sql_query = "UPDATE creature_template SET "; 1831 1811 1832 $result = $sql->query("SELECT `creature_template`.`entry`,`modelid_A`,`modelid_A2`,`modelid_H`,`modelid_H2`, IFNULL(".($deplang<>0?"name_loc$deplang":"NULL").",`name`) as name,`subname`,`minlevel`,`maxlevel`,`minhealth`,`maxhealth`,`minmana`,`maxmana`,`armor`,`faction_A`,`faction_H`,`npcflag`,`speed`,`rank`,`mindmg`,`maxdmg`,`dmgschool`,`attackpower`,`baseattacktime`,`rangeattacktime`,`flags`,`dynamicflags`,`family`,`trainer_type`,`trainer_spell`,`class`,`race`,`minrangedmg`,`maxrangedmg`,`rangedattackpower`,`type`,`civilian`,`flag1`,`lootid`,`pickpocketloot`,`skinloot`,`resistance1`,`resistance2`,`resistance3`,`resistance4`,`resistance5`,`resistance6`,`spell1`,`spell2`,`spell3`,`spell4`,`mingold`,`maxgold`,`AIName`,`MovementType`,`InhabitType`,`RacialLeader`,`RegenHealth`,`equipment_id`,`ScriptName` FROM creature_template LEFT JOIN locales_creature ON creature_template.entry = locales_creature.entry WHERE creature_template.entry = '$entry'");1812 $result = $sql->query("SELECT `creature_template`.`entry`,`modelid_A`,`modelid_A2`,`modelid_H`,`modelid_H2`, IFNULL(".($deplang<>0?"name_loc$deplang":"NULL").",`name`) as name,`subname`,`minlevel`,`maxlevel`,`minhealth`,`maxhealth`,`minmana`,`maxmana`,`armor`,`faction_A`,`faction_H`,`npcflag`,`speed`,`rank`,`mindmg`,`maxdmg`,`dmgschool`,`attackpower`,`baseattacktime`,`rangeattacktime`,`flags`,`dynamicflags`,`family`,`trainer_type`,`trainer_spell`,`class`,`race`,`minrangedmg`,`maxrangedmg`,`rangedattackpower`,`type`,`flags_extra`,`flag1`,`lootid`,`pickpocketloot`,`skinloot`,`resistance1`,`resistance2`,`resistance3`,`resistance4`,`resistance5`,`resistance6`,`spell1`,`spell2`,`spell3`,`spell4`,`mingold`,`maxgold`,`AIName`,`MovementType`,`InhabitType`,`RacialLeader`,`RegenHealth`,`equipment_id`,`ScriptName` FROM creature_template LEFT JOIN locales_creature ON creature_template.entry = locales_creature.entry WHERE creature_template.entry = '$entry'"); 1833 1813 if ($mob_templ = $sql->fetch_assoc($result)){ 1834 1814 if ($mob_templ['modelid_A'] != $modelid_A) $sql_query .= "modelid_A='$modelid_A',"; … … 1857 1837 if ($mob_templ['dynamicflags'] != $dynamicflags) $sql_query .= "dynamicflags='$dynamicflags',"; 1858 1838 if ($mob_templ['family'] != $family) $sql_query .= "family='$family',"; 1859 //if ($mob_templ['bounding_radius'] != $bounding_radius) $sql_query .= "bounding_radius='$bounding_radius',";1860 1839 if ($mob_templ['trainer_type'] != $trainer_type) $sql_query .= "trainer_type='$trainer_type',"; 1861 1840 if ($mob_templ['trainer_spell'] != $trainer_spell) $sql_query .= "trainer_spell='$trainer_spell',"; … … 1866 1845 if ($mob_templ['rangedattackpower'] != $rangedattackpower) $sql_query .= "rangedattackpower='$rangedattackpower',"; 1867 1846 if ($mob_templ['type'] != $type) $sql_query .= "type='$type',"; 1868 if ($mob_templ['civilian'] != $civilian) $sql_query .= "civilian='$civilian',";1847 if ($mob_templ['flags_extra'] != $flags_extra) $sql_query .= "flags_extra='$flags_extra',"; 1869 1848 if ($mob_templ['flag1'] != $flag1) $sql_query .= "flag1='$flag1',"; 1870 //if ($mob_templ['equipmodel1'] != $equipmodel1) $sql_query .= "equipmodel1='$equipmodel1',";1871 //if ($mob_templ['equipmodel2'] != $equipmodel2) $sql_query .= "equipmodel2='$equipmodel2',";1872 //if ($mob_templ['equipmodel3'] != $equipmodel3) $sql_query .= "equipmodel3='$equipmodel3',";1873 //if ($mob_templ['equipinfo1'] != $equipinfo1) $sql_query .= "equipinfo1='$equipinfo1',";1874 //if ($mob_templ['equipinfo2'] != $equipinfo2) $sql_query .= "equipinfo2='$equipinfo2',";1875 //if ($mob_templ['equipinfo3'] != $equipinfo3) $sql_query .= "equipinfo3='$equipinfo3',";1876 //if ($mob_templ['equipslot1'] != $equipslot1) $sql_query .= "equipslot1='$equipslot1',";1877 //if ($mob_templ['equipslot2'] != $equipslot2) $sql_query .= "equipslot2='$equipslot2',";1878 //if ($mob_templ['equipslot3'] != $equipslot3) $sql_query .= "equipslot3='$equipslot3',";1879 1849 if ($mob_templ['lootid'] != $lootid) $sql_query .= "lootid='$lootid',"; 1880 1850 if ($mob_templ['pickpocketloot'] != $pickpocketloot) $sql_query .= "pickpocketloot='$pickpocketloot',"; … … 1925 1895 1926 1896 if ($item){ 1927 $sql_query .= "INSERT INTO creature_loot_template (entry, item, ChanceOr Ref, QuestChanceOrGroup, mincount, maxcount, freeforall, lootcondition, condition_value1, condition_value2)1928 VALUES ($lootid,$item,'$ChanceOr Ref', '$QuestChanceOrGroup' ,$mincount ,$maxcount ,$freeforall,$lootcondition ,$condition_value1 ,$condition_value2);\n";1897 $sql_query .= "INSERT INTO creature_loot_template (entry, item, ChanceOrQuestChance, `groupid`, mincountOrRef, maxcount, lootcondition, condition_value1, condition_value2) 1898 VALUES ($lootid,$item,'$ChanceOrQuestChance', '$groupid' ,$mincountOrRef ,$maxcount ,$lootcondition ,$condition_value1 ,$condition_value2);\n"; 1929 1899 } 1930 1900 … … 1935 1905 1936 1906 if ($skin_item){ 1937 $sql_query .= "INSERT INTO skinning_loot_template (entry, item, ChanceOr Ref, QuestChanceOrGroup, mincount, maxcount, freeforall, lootcondition, condition_value1, condition_value2)1938 VALUES ($skinloot,$skin_item,'$skin_ChanceOr Ref', '$skin_QuestChanceOrGroup' ,$skin_mincount ,$skin_maxcount ,$skin_freeforall,$skin_lootcondition ,$skin_condition_value1 ,$skin_condition_value2);\n";1907 $sql_query .= "INSERT INTO skinning_loot_template (entry, item, ChanceOrQuestChance, `groupid`, mincountOrRef, maxcount, lootcondition, condition_value1, condition_value2) 1908 VALUES ($skinloot,$skin_item,'$skin_ChanceOrQuestChance', '$skin_groupid' ,$skin_mincountOrRef ,$skin_maxcount ,$skin_lootcondition ,$skin_condition_value1 ,$skin_condition_value2);\n"; 1939 1909 } 1940 1910 … … 1945 1915 1946 1916 if ($pp_item){ 1947 $sql_query .= "INSERT INTO pickpocketing_loot_template (entry, item, ChanceOr Ref, QuestChanceOrGroup, mincount, maxcount, freeforall, lootcondition, condition_value1, condition_value2)1948 VALUES ($pickpocketloot,$pp_item,'$pp_ChanceOr Ref', '$pp_QuestChanceOrGroup' ,$pp_mincount ,$pp_maxcount ,$pp_freeforall,$pp_lootcondition ,$pp_condition_value1 ,$pp_condition_value2);\n";1917 $sql_query .= "INSERT INTO pickpocketing_loot_template (entry, item, ChanceOrQuestChance, `groupid`, mincountOrRef, maxcount, lootcondition, condition_value1, condition_value2) 1918 VALUES ($pickpocketloot,$pp_item,'$pp_ChanceOrQuestChance', '$pp_groupid' ,$pp_mincountOrRef ,$pp_maxcount ,$pp_lootcondition ,$pp_condition_value1 ,$pp_condition_value2);\n"; 1949 1919 } 1950 1920 … … 1978 1948 1979 1949 if ($vendor_item){ 1980 $sql_query .= "INSERT INTO npc_vendor (entry, item, maxcount, incrtime )1981 VALUES ($entry,$vendor_item,$vendor_maxcount,$vendor_incrtime );\n";1950 $sql_query .= "INSERT INTO npc_vendor (entry, item, maxcount, incrtime, ExtendedCost) 1951 VALUES ($entry,$vendor_item,$vendor_maxcount,$vendor_incrtime,$vendor_extended_cost);\n"; 1982 1952 } 1983 1953 … … 2109 2079 case 6: 2110 2080 $output .= "<h1><font class=\"error\">{$lang_creature['err_no_fields_updated']}</font></h1>"; 2081 break; 2082 case 7: 2083 $output .= "<h1><font class=\"error\">{$lang_creature['add_new_success']}</font></h1>"; 2111 2084 break; 2112 2085 default: //no error -
minimanager/edit.php
r307 r374 10 10 11 11 require_once("header.php"); 12 valid_login( 0);12 valid_login($action_permission['read']); 13 13 14 14 //############################################################################################################## -
minimanager/error.php
r19 r374 11 11 require_once("header.php"); 12 12 13 $err = (isset($_GET['err'])) ? $_GET['err']: "Oopsy...";13 $err = (isset($_GET['err'])) ? htmlentities($_GET['err'], ENT_QUOTES) : "Oopsy..."; 14 14 15 15 $output .= "<center><br /><table width=\"300\" class=\"flat\"> -
minimanager/events.php
r307 r374 10 10 */ 11 11 require_once("header.php"); 12 valid_login( 0);12 valid_login($action_permission['read']); 13 13 14 14 /*--------------------------------------------------*/ -
minimanager/footer.php
r5 r374 8 8 <div id="body_buttom"> 9 9 <table class="table_buttom"> 10 < tr>10 <center><tr> 11 11 <td class="table_buttom_left"></td> 12 12 <td class="table_buttom_middle"> … … 29 29 </td> 30 30 <td class="table_buttom_right"></td> 31 </tr> 31 </tr></center> 32 32 </table> 33 33 <br /> -
minimanager/forum.php
r307 r374 93 93 require_once("scripts/forum.conf.php"); 94 94 require_once("scripts/extra_lib.php"); 95 valid_login( 0);95 valid_login($action_permission['read']); 96 96 97 97 if (isset($_COOKIE["lang"])){ 98 98 $forumlang = $_COOKIE["lang"]; 99 if (!file_exists("lang/ Forum_$forumlang.php")) $forumlang = $language;99 if (!file_exists("lang/forum_$forumlang.php")) $forumlang = $language; 100 100 } else $forumlang = $language; 101 require_once("lang/ Forum_$forumlang.php");101 require_once("lang/forum_$forumlang.php"); 102 102 103 103 foreach($forum_skeleton as $cid => $category){ … … 118 118 // ####################################################################################################### 119 119 function forum_index(){ 120 global $enablesidecheck, $forum_skeleton, $forum_lang, $user_lvl, $output, $realm_db ;120 global $enablesidecheck, $forum_skeleton, $forum_lang, $user_lvl, $output, $realm_db, $mmfpm_db; 121 121 if($enablesidecheck) 122 122 $side = get_side(); 123 123 $mysql = new SQL; 124 $mysql->connect($ realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);125 $result = $mysql->query("SELECT `authorname`,`id`,`name`,`time`,`forum` FROM ` posts` WHERE `id` IN (SELECT MAX(`id`) FROM `posts` GROUP BY `forum`) ORDER BY `forum`;");124 $mysql->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']); 125 $result = $mysql->query("SELECT `authorname`,`id`,`name`,`time`,`forum` FROM `forum_posts` WHERE `id` IN (SELECT MAX(`id`) FROM `forum_posts` GROUP BY `forum`) ORDER BY `forum`;"); 126 126 $lasts = array(); 127 127 if($mysql->num_rows($result) > 0){ … … 154 154 } 155 155 } 156 $totaltopics = $mysql->query("SELECT id FROM posts WHERE forum = '$id' AND id = `topic`;");156 $totaltopics = $mysql->query("SELECT id FROM forum_posts WHERE forum = '$id' AND id = `topic`;"); 157 157 $numtopics = $mysql->num_rows($totaltopics); 158 $totalreplies = $mysql->query("SELECT id FROM posts WHERE forum = '$id';");158 $totalreplies = $mysql->query("SELECT id FROM forum_posts WHERE forum = '$id';"); 159 159 $numreplies = $mysql->num_rows($totalreplies); 160 160 $output .= "<tr><td align=\"left\"><a href=\"forum.php?action=view_forum&id=$id\">{$forum["name"]}</a><br />{$forum["desc"]}</td> … … 179 179 // ####################################################################################################### 180 180 function forum_view_forum(){ 181 global $enablesidecheck, $forum_skeleton, $forum_lang, $maxqueries, $user_lvl, $output, $ realm_db;181 global $enablesidecheck, $forum_skeleton, $forum_lang, $maxqueries, $user_lvl, $output, $mmfpm_db; 182 182 if($enablesidecheck) $side = get_side(); 183 183 $mysql = new SQL; 184 $link = $mysql->connect($ realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);184 $link = $mysql->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']); 185 185 if(!isset($_GET["id"])) error($forum_lang["no_such_forum"]); 186 186 else $id = $mysql->quote_smart($_GET["id"]); … … 216 216 $output .= "<div class=\"top\"><h1>{$forum_lang["forums"]}</h1>{$forum_lang["you_are_here"]} : <a href=\"forum.php\">{$forum_lang["forum_index"]}</a> -> <a href=\"forum.php?action=view_forum&id={$id}\">{$forum["name"]}</a></div> 217 217 <center><table class=\"lined\">"; 218 $topics = $mysql->query("SELECT id, authorid, authorname, name, annouced, sticked, closed FROM posts WHERE (forum = '$id' AND id = `topic`) OR annouced = 1 AND id = `topic` ORDER BY annouced DESC, sticked DESC, lastpost DESC LIMIT $start, $maxqueries;");219 $result = $mysql->query("SELECT `topic` as curtopic,(SELECT count(`id`)-1 FROM posts WHERE `topic` = `curtopic`) AS replies,lastpost as curlastpost,(SELECT authorname FROM posts WHERE id = curlastpost) as authorname,(SELECT time FROM posts WHERE id = curlastpost) as time FROM `posts` WHERE (`forum` = $id AND `topic` = `id` ) OR annouced = 1;");218 $topics = $mysql->query("SELECT id, authorid, authorname, name, annouced, sticked, closed FROM forum_posts WHERE (forum = '$id' AND id = `topic`) OR annouced = 1 AND id = `topic` ORDER BY annouced DESC, sticked DESC, lastpost DESC LIMIT $start, $maxqueries;"); 219 $result = $mysql->query("SELECT `topic` as curtopic,(SELECT count(`id`)-1 FROM forum_posts WHERE `topic` = `curtopic`) AS replies,lastpost as curlastpost,(SELECT authorname FROM forum_posts WHERE id = curlastpost) as authorname,(SELECT time FROM forum_posts WHERE id = curlastpost) as time FROM `forum_posts` WHERE (`forum` = $id AND `topic` = `id` ) OR annouced = 1;"); 220 220 $lasts = array(); 221 221 if($mysql->num_rows($result) > 0){ … … 251 251 </tr>"; 252 252 } 253 $totaltopics = $mysql->query("SELECT id FROM posts WHERE forum = '$id' AND id = `topic`;"); //My page system is so roxing, i can' t break this query xD253 $totaltopics = $mysql->query("SELECT id FROM forum_posts WHERE forum = '$id' AND id = `topic`;"); //My page system is so roxing, i can' t break this query xD 254 254 $pages = ceil($mysql->num_rows($totaltopics)/$maxqueries); 255 255 $output .= "<tr><td align=\"right\" colspan=\"4\">{$forum_lang["pages"]} : "; … … 271 271 function forum_view_topic(){ 272 272 273 global $enablesidecheck, $forum_skeleton, $forum_lang, $maxqueries, $user_lvl, $user_id, $output, $realm_db, $characters_db, $realm_id ;273 global $enablesidecheck, $forum_skeleton, $forum_lang, $maxqueries, $user_lvl, $user_id, $output, $realm_db, $characters_db, $realm_id, $mmfpm_db; 274 274 275 275 if($enablesidecheck) $side = get_side(); // Better to use it here instead of call it many time in the loop :) 276 276 277 277 $mysql = new SQL; 278 $link = $mysql->connect($ realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);278 $link = $mysql->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']); 279 279 280 280 if(isset($_GET["id"])){ … … 297 297 298 298 if(!$post){ 299 $posts = $mysql->query("SELECT id,authorid,authorname,forum,name,text,time,annouced,sticked,closed FROM posts WHERE topic = '$id' ORDER BY id ASC LIMIT $start, $maxqueries;");299 $posts = $mysql->query("SELECT id,authorid,authorname,forum,name,text,time,annouced,sticked,closed FROM forum_posts WHERE topic = '$id' ORDER BY id ASC LIMIT $start, $maxqueries;"); 300 300 301 301 // Thx qsa for the query structure 302 303 $link = $mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 304 302 305 $query = "SELECT account,name,SUBSTRING_INDEX(SUBSTRING_INDEX(data,' ', 37),' ',-1) AS gen,race,class, 303 306 SUBSTRING_INDEX(SUBSTRING_INDEX(data,' ',35),' ',-1) AS level,(SELECT gmlevel FROM `{$realm_db['name']}`.account WHERE `{$realm_db['name']}`.account.id = `{$characters_db[$realm_id]['name']}`.characters.account) as gmlevel … … 454 457 } 455 458 456 $link = $mysql->connect($ realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);457 458 $totalposts = $mysql->query("SELECT id FROM posts WHERE topic = '$id';");459 $link = $mysql->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']); 460 461 $totalposts = $mysql->query("SELECT id FROM forum_posts WHERE topic = '$id';"); 459 462 $totalposts = $mysql->num_rows($totalposts); 460 463 … … 520 523 $output .= "<div class=\"top\"><h1>Stand by...</h1></div>"; 521 524 522 $post = $mysql->query("SELECT topic, id FROM posts WHERE id = '$id'"); // Get our post id525 $post = $mysql->query("SELECT topic, id FROM forum_posts WHERE id = '$id'"); // Get our post id 523 526 if($mysql->num_rows($post)==0) 524 527 error($forum_lang["no_such_topic"]); … … 527 530 redirect("forum.php?action=view_topic&id=$id"); 528 531 $topic = $post[0]; 529 $posts = $mysql->query("SELECT id FROM posts WHERE topic = '$topic';"); // Get posts in our topic532 $posts = $mysql->query("SELECT id FROM forum_posts WHERE topic = '$topic';"); // Get posts in our topic 530 533 $replies = $mysql->num_rows($posts); 531 534 if($replies==0) … … 547 550 } 548 551 function forum_do_edit_close(){ 549 global $forum_lang, $user_lvl, $ realm_db;550 $mysql = new SQL; 551 $link = $mysql->connect($ realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);552 global $forum_lang, $user_lvl, $mmfpm_db; 553 $mysql = new SQL; 554 $link = $mysql->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']); 552 555 553 556 if($user_lvl == 0) … … 560 563 else $state = $mysql->quote_smart($_GET["state"]); 561 564 562 $mysql->query("UPDATE posts SET closed = '$state' WHERE id = '$id'");565 $mysql->query("UPDATE forum_posts SET closed = '$state' WHERE id = '$id'"); 563 566 $mysql->close(); 564 567 redirect("forum.php?action=view_topic&id=$id"); … … 566 569 } 567 570 function forum_do_edit_announce(){ 568 global $forum_lang, $user_lvl, $ realm_db;569 $mysql = new SQL; 570 $link = $mysql->connect($ realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);571 global $forum_lang, $user_lvl, $mmfpm_db; 572 $mysql = new SQL; 573 $link = $mysql->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']); 571 574 572 575 if($user_lvl == 0) … … 579 582 else $state = $mysql->quote_smart($_GET["state"]); 580 583 581 $mysql->query("UPDATE posts SET annouced = '$state' WHERE id = '$id'");584 $mysql->query("UPDATE forum_posts SET annouced = '$state' WHERE id = '$id'"); 582 585 $mysql->close(); 583 586 redirect("forum.php?action=view_topic&id=$id"); … … 585 588 } 586 589 function forum_do_edit_stick(){ 587 global $forum_lang, $user_lvl, $ realm_db;588 $mysql = new SQL; 589 $link = $mysql->connect($ realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);590 global $forum_lang, $user_lvl, $mmfpm_db; 591 $mysql = new SQL; 592 $link = $mysql->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']); 590 593 591 594 if($user_lvl == 0) … … 598 601 else $state = $mysql->quote_smart($_GET["state"]); 599 602 600 $mysql->query("UPDATE posts SET sticked = '$state' WHERE id = '$id'");603 $mysql->query("UPDATE forum_posts SET sticked = '$state' WHERE id = '$id'"); 601 604 $mysql->close(); 602 605 redirect("forum.php?action=view_topic&id=$id"); … … 604 607 } 605 608 function forum_delete_post(){ 606 global $enablesidecheck, $forum_skeleton, $forum_lang, $maxqueries, $user_lvl, $user_id, $output, $ realm_db;607 $mysql = new SQL; 608 609 $link = $mysql->connect($ realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);609 global $enablesidecheck, $forum_skeleton, $forum_lang, $maxqueries, $user_lvl, $user_id, $output, $mmfpm_db; 610 $mysql = new SQL; 611 612 $link = $mysql->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']); 610 613 if(!isset($_GET["id"])) error($forum_lang["no_such_post"]); 611 614 else $id = $mysql->quote_smart($_GET["id"]); 612 615 613 $topic = $mysql->query("SELECT id,topic,authorid,forum FROM posts WHERE id = '$id';");616 $topic = $mysql->query("SELECT id,topic,authorid,forum FROM forum_posts WHERE id = '$id';"); 614 617 if($mysql->num_rows($topic)==0) error($forum_lang["no_such_post"]); 615 618 $topic = $mysql->fetch_row($topic); … … 617 620 $fid = $topic[3]; 618 621 619 $topic2 = $mysql->query("SELECT name FROM posts WHERE id = '{$topic[1]}';");622 $topic2 = $mysql->query("SELECT name FROM forum_posts WHERE id = '{$topic[1]}';"); 620 623 $name = $mysql->fetch_row($topic2); 621 624 … … 642 645 } 643 646 function forum_do_delete_post(){ 644 global $forum_lang, $forum_skeleton, $maxqueries, $user_lvl, $user_id, $output, $ realm_db;645 646 $mysql = new SQL; 647 $link = $mysql->connect($ realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);647 global $forum_lang, $forum_skeleton, $maxqueries, $user_lvl, $user_id, $output, $mmfpm_db; 648 649 $mysql = new SQL; 650 $link = $mysql->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']); 648 651 649 652 if(!isset($_GET["id"])) error($forum_lang["no_such_post"]); 650 653 else $id = $mysql->quote_smart($_GET["id"]); 651 654 652 $topic = $mysql->query("SELECT id,topic,name,authorid,forum FROM posts WHERE id = '$id';");655 $topic = $mysql->query("SELECT id,topic,name,authorid,forum FROM forum_posts WHERE id = '$id';"); 653 656 if($mysql->num_rows($topic)==0) error($forum_lang["no_such_post"]); 654 657 $topic = $mysql->fetch_row($topic); … … 657 660 658 661 if($id==$topic[1]){ 659 $mysql->query("DELETE FROM posts WHERE topic = '$id'");662 $mysql->query("DELETE FROM forum_posts WHERE topic = '$id'"); 660 663 redirect("forum.php?action=view_forum&id=$fid"); 661 664 } 662 665 else 663 666 { 664 $mysql->query("DELETE FROM posts WHERE id = '$id'");665 $result = $mysql->query("SELECT id FROM posts WHERE topic = '{$topic[1]}' ORDER BY id DESC LIMIT 1;"); // get last post id667 $mysql->query("DELETE FROM forum_posts WHERE id = '$id'"); 668 $result = $mysql->query("SELECT id FROM forum_posts WHERE topic = '{$topic[1]}' ORDER BY id DESC LIMIT 1;"); // get last post id 666 669 $lastpostid = $mysql->fetch_row($result); 667 670 $lastpostid = $lastpostid[0]; 668 $mysql->query("UPDATE posts SET lastpost = '$lastpostid' WHERE id = '{$topic[1]}'"); // update topic' s last post id671 $mysql->query("UPDATE forum_posts SET lastpost = '$lastpostid' WHERE id = '{$topic[1]}'"); // update topic' s last post id 669 672 redirect("forum.php?action=view_topic&id={$topic[1]}"); 670 673 } … … 673 676 674 677 function forum_add_topic(){ 675 global $enablesidecheck, $forum_lang, $forum_skeleton, $maxqueries, $minfloodtime, $user_lvl, $user_id, $output, $ realm_db;678 global $enablesidecheck, $forum_lang, $forum_skeleton, $maxqueries, $minfloodtime, $user_lvl, $user_id, $output, $mmfpm_db; 676 679 677 680 if($enablesidecheck) $side = get_side(); // Better to use it here instead of call it many time in the loop :) 678 681 $mysql = new SQL; 679 $link = $mysql->connect($ realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);682 $link = $mysql->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']); 680 683 681 684 if($minfloodtime > 0) 682 685 { 683 $userposts = $mysql->query("SELECT time FROM posts WHERE authorid = '$user_id' ORDER BY id DESC LIMIT 1;");686 $userposts = $mysql->query("SELECT time FROM forum_posts WHERE authorid = '$user_id' ORDER BY id DESC LIMIT 1;"); 684 687 if($mysql->num_rows($userposts) != 0) 685 688 { … … 766 769 } 767 770 function forum_do_add_topic(){ 768 global $enablesidecheck, $forum_skeleton, $forum_lang, $user_lvl, $user_name, $user_id, $ realm_db, $minfloodtime;771 global $enablesidecheck, $forum_skeleton, $forum_lang, $user_lvl, $user_name, $user_id, $mmfpm_db, $minfloodtime; 769 772 770 773 if($enablesidecheck) $side = get_side(); // Better to use it here instead of call it many time in the loop :) 771 774 772 775 $mysql = new SQL; 773 $mysql->connect($ realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);776 $mysql->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']); 774 777 775 778 776 779 { 777 $userposts = $mysql->query("SELECT time FROM posts WHERE authorid = '$user_id' ORDER BY id DESC LIMIT 1;");780 $userposts = $mysql->query("SELECT time FROM forum_posts WHERE authorid = '$user_id' ORDER BY id DESC LIMIT 1;"); 778 781 if($mysql->num_rows($userposts) != 0) 779 782 { … … 839 842 $time = date("m/d/y H:i:s"); 840 843 841 $mysql->query("INSERT INTO posts (authorid, authorname, forum, name, text, time) VALUES ('$user_id', '$user_name', '$forum', '$name', '$msg', '$time');");844 $mysql->query("INSERT INTO forum_posts (authorid, authorname, forum, name, text, time) VALUES ('$user_id', '$user_name', '$forum', '$name', '$msg', '$time');"); 842 845 $id = $mysql->insert_id(); 843 $mysql->query("UPDATE posts SET topic = '$id', lastpost = '$id' WHERE id = '$id';");846 $mysql->query("UPDATE forum_posts SET topic = '$id', lastpost = '$id' WHERE id = '$id';"); 844 847 845 848 $mysql->close(); … … 849 852 } 850 853 function forum_do_add_post(){ 851 global $enablesidecheck, $forum_skeleton, $forum_lang, $minfloodtime, $user_lvl, $user_name, $user_id, $ realm_db;854 global $enablesidecheck, $forum_skeleton, $forum_lang, $minfloodtime, $user_lvl, $user_name, $user_id, $mmfpm_db; 852 855 853 856 if($enablesidecheck) $side = get_side(); // Better to use it here instead of call it many time in the loop :) 854 857 855 858 $mysql = new SQL; 856 $link = $link = $mysql->connect($ realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);859 $link = $link = $mysql->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']); 857 860 858 861 if($minfloodtime > 0) 859 862 { 860 $userposts = $mysql->query("SELECT time FROM posts WHERE authorid = '$user_id' ORDER BY id DESC LIMIT 1;");863 $userposts = $mysql->query("SELECT time FROM forum_posts WHERE authorid = '$user_id' ORDER BY id DESC LIMIT 1;"); 861 864 if($mysql->num_rows($userposts) != 0) 862 865 { … … 912 915 } 913 916 914 $name = $mysql->query("SELECT name FROM posts WHERE id = '$topic';");917 $name = $mysql->query("SELECT name FROM forum_posts WHERE id = '$topic';"); 915 918 $name = $mysql->fetch_row($name); 916 919 $name = $mysql->quote_smart($name[0]); … … 918 921 $time = date("m/d/y H:i:s"); 919 922 920 $mysql->query("INSERT INTO posts (authorid, authorname, forum, topic, name, text, time) VALUES ('$user_id', '$user_name', '$forum', $topic, '$name', '$msg', '$time');");923 $mysql->query("INSERT INTO forum_posts (authorid, authorname, forum, topic, name, text, time) VALUES ('$user_id', '$user_name', '$forum', $topic, '$name', '$msg', '$time');"); 921 924 $id = @mysql_insert_id($link); 922 $mysql->query("UPDATE posts SET lastpost = $id WHERE id = $topic;");925 $mysql->query("UPDATE forum_posts SET lastpost = $id WHERE id = $topic;"); 923 926 924 927 $mysql->close(); … … 929 932 930 933 function forum_edit_post(){ 931 global $forum_skeleton, $forum_lang, $maxqueries, $minfloodtime, $user_lvl, $user_id, $output, $ realm_db;932 933 $mysql = new SQL; 934 $link = $mysql->connect($ realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);934 global $forum_skeleton, $forum_lang, $maxqueries, $minfloodtime, $user_lvl, $user_id, $output, $mmfpm_db; 935 936 $mysql = new SQL; 937 $link = $mysql->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']); 935 938 936 939 if(!isset($_GET["id"])) error($forum_lang["no_such_post"]); 937 940 else $id = $mysql->quote_smart($_GET["id"]); 938 941 939 $post = $mysql->query("SELECT id,topic,authorid,forum,name,text FROM posts WHERE id = '$id';");942 $post = $mysql->query("SELECT id,topic,authorid,forum,name,text FROM forum_posts WHERE id = '$id';"); 940 943 if($mysql->num_rows($post)==0) error($forum_lang["no_such_post"]); 941 944 $post = $mysql->fetch_row($post); … … 1008 1011 } 1009 1012 function forum_do_edit_post(){ 1010 global $forum_lang, $user_lvl, $user_name, $user_id, $ realm_db;1011 1012 $mysql = new SQL; 1013 $link = $link = $mysql->connect($ realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);1013 global $forum_lang, $user_lvl, $user_name, $user_id, $mmfpm_db; 1014 1015 $mysql = new SQL; 1016 $link = $link = $mysql->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']); 1014 1017 1015 1018 if(!isset($_POST['forum'])) error($forum_lang["no_such_forum"]); … … 1045 1048 // $msg = str_replace('\r', '<br />', $msg); 1046 1049 1047 $result = $mysql->query("SELECT topic FROM posts WHERE id = $post;");1050 $result = $mysql->query("SELECT topic FROM forum_posts WHERE id = $post;"); 1048 1051 $topicid = $mysql->fetch_row($result); 1049 1052 1050 $mysql->query("UPDATE posts SET text = '$msg' WHERE id = $post;");1053 $mysql->query("UPDATE forum_posts SET text = '$msg' WHERE id = $post;"); 1051 1054 1052 1055 if($topic == 1){ 1053 $mysql->query("UPDATE posts SET name = '$name' WHERE topic = {$topicid[0]};");1054 } 1055 1056 $result = $mysql->query("SELECT topic FROM posts WHERE id = $post;");1056 $mysql->query("UPDATE forum_posts SET name = '$name' WHERE topic = {$topicid[0]};"); 1057 } 1058 1059 $result = $mysql->query("SELECT topic FROM forum_posts WHERE id = $post;"); 1057 1060 $topicid = $mysql->fetch_row($result); 1058 1061 … … 1063 1066 1064 1067 function forum_move_topic(){ 1065 global $forum_skeleton, $forum_lang, $maxqueries, $user_lvl, $user_id, $output, $ realm_db;1066 $mysql = new SQL; 1067 1068 $link = $mysql->connect($ realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);1068 global $forum_skeleton, $forum_lang, $maxqueries, $user_lvl, $user_id, $output, $mmfpm_db; 1069 $mysql = new SQL; 1070 1071 $link = $mysql->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']); 1069 1072 if(!isset($_GET["id"])) error($forum_lang["no_such_topic"]); 1070 1073 else $id = $mysql->quote_smart($_GET["id"]); 1071 1074 1072 $topic = $mysql->query("SELECT id,topic,authorid,forum, name FROM posts WHERE id = '$id';");1075 $topic = $mysql->query("SELECT id,topic,authorid,forum, name FROM forum_posts WHERE id = '$id';"); 1073 1076 // 0 1 2 3 4 1074 1077 if($mysql->num_rows($topic)==0) error($forum_lang["no_such_topic"]); … … 1108 1111 } 1109 1112 function forum_do_move_topic(){ 1110 global $forum_lang, $forum_skeleton, $maxqueries, $user_lvl, $user_id, $output, $ realm_db;1111 1112 $mysql = new SQL; 1113 $link = $mysql->connect($ realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);1113 global $forum_lang, $forum_skeleton, $maxqueries, $user_lvl, $user_id, $output, $mmfpm_db; 1114 1115 $mysql = new SQL; 1116 $link = $mysql->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']); 1114 1117 1115 1118 if(!isset($_POST['forum'])) error($forum_lang["no_such_forum"]); … … 1118 1121 else $id = $mysql->quote_smart($_POST['id']); 1119 1122 1120 $mysql->query("UPDATE posts SET forum = '$forum' WHERE topic = '$id'"); // update topic' s last post id1123 $mysql->query("UPDATE forum_posts SET forum = '$forum' WHERE topic = '$id'"); // update topic' s last post id 1121 1124 redirect("forum.php?action=view_topic&id=$id"); 1122 1125 // Queries : 1 -
minimanager/game_object.php
r307 r374 9 9 */ 10 10 require_once("header.php"); 11 valid_login( 1);11 valid_login($action_permission['read']); 12 12 13 13 $go_type = Array( … … 150 150 $where = "WHERE gameobject_template.entry > 0 "; 151 151 if($custom_search != "") $where .= " $custom_search "; 152 if(isset($entry)) $where .= "AND entry = '$entry' ";152 if(isset($entry)) $where .= "AND gameobject_template.entry = '$entry' "; 153 153 if(isset($name)) $where .= "AND IFNULL(".($deplang<>0?"name_loc$deplang":"NULL").",`name`) LIKE '%$name%' "; 154 154 if(isset($type)) $where .= "AND type = '$type' "; … … 235 235 $output .= "</select></td> 236 236 <td>".makeinfocell($lang_game_object['displayId'],$lang_game_object['displayId_desc'])."</td> 237 <td><input type=\"text\" name=\"displayId\" size=\"10\" maxlength=\" 3\" value=\"0\" /></td>237 <td><input type=\"text\" name=\"displayId\" size=\"10\" maxlength=\"11\" value=\"0\" /></td> 238 238 239 239 </tr> … … 415 415 $output .= "</select></td> 416 416 <td>".makeinfocell($lang_game_object['displayId'],$lang_game_object['displayId_desc'])."</td> 417 <td><input type=\"text\" name=\"displayId\" size=\"10\" maxlength=\" 3\" value=\"{$go['displayId']}\" /></td>417 <td><input type=\"text\" name=\"displayId\" size=\"10\" maxlength=\"11\" value=\"{$go['displayId']}\" /></td> 418 418 419 419 </tr> … … 537 537 $row_flag = 0; 538 538 $output .= "<table class=\"hidden\" align=\"center\"><tr>"; 539 $result1 = $sql->query("SELECT item,ChanceOr Ref,QuestChanceOrGroup,mincount,maxcount,freeforall, lootcondition, condition_value1, condition_value2 FROM gameobject_loot_template WHERE entry = {$go['entry']} ORDER BY ChanceOrRefDESC");539 $result1 = $sql->query("SELECT item,ChanceOrQuestChance,`groupid`,mincountOrRef,maxcount, lootcondition, condition_value1, condition_value2 FROM gameobject_loot_template WHERE entry = {$go['data1']} ORDER BY ChanceOrQuestChance DESC"); 540 540 while ($item = $sql->fetch_row($result1)){ 541 541 $cel_counter++; 542 $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[' freeforall']}: $item[5]<br />{$lang_game_object['lootcondition']}: $item[6]<br />{$lang_game_object['condition_value1']}: $item[7]<br />{$lang_game_object['condition_value2']}: $item[8]";542 $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['lootcondition']}: $item[5]<br />{$lang_game_object['condition_value1']}: $item[6]<br />{$lang_game_object['condition_value2']}: $item[7]"; 543 543 $output .= "<td>"; 544 544 $output .= maketooltip("<img src=\"".get_icon($item[0])."\" class=\"icon_border\" alt=\"\" />", "$item_datasite$item[0]", "$tooltip", "item_tooltip", "target=\"_blank\""); … … 560 560 <td><input type=\"text\" name=\"item\" size=\"8\" maxlength=\"10\" value=\"\" /></td> 561 561 <td>".makeinfocell($lang_game_object['loot_drop_chance'],$lang_game_object['loot_drop_chance_desc'])."</td> 562 <td><input type=\"text\" name=\"ChanceOr Ref\" size=\"8\" maxlength=\"11\" value=\"0\" /></td>562 <td><input type=\"text\" name=\"ChanceOrQuestChance\" size=\"8\" maxlength=\"11\" value=\"0\" /></td> 563 563 <td>".makeinfocell($lang_game_object['loot_quest_drop_chance'],$lang_game_object['loot_quest_drop_chance_desc'])."</td> 564 <td><input type=\"text\" name=\" QuestChanceOrGroup\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>564 <td><input type=\"text\" name=\"groupid\" size=\"8\" maxlength=\"10\" value=\"0\" /></td> 565 565 </tr> 566 566 <tr> 567 567 <td>".makeinfocell($lang_game_object['min_count'],$lang_game_object['min_count_desc'])."</td> 568 <td><input type=\"text\" name=\"mincount \" size=\"8\" maxlength=\"3\" value=\"1\" /></td>568 <td><input type=\"text\" name=\"mincountOrRef\" size=\"8\" maxlength=\"3\" value=\"1\" /></td> 569 569 <td>".makeinfocell($lang_game_object['max_count'],$lang_game_object['max_count_desc'])."</td> 570 570 <td><input type=\"text\" name=\"maxcount\" size=\"8\" maxlength=\"3\" value=\"1\" /></td> 571 <td>".makeinfocell($lang_game_object['freeforall'],$lang_game_object['freeforall_desc'])."</td>572 <td><input type=\"text\" name=\"freeforall\" size=\"8\" maxlength=\"3\" value=\"1\" /></td>573 571 </tr> 574 572 <tr> … … 722 720 else $data23 = 0; 723 721 724 if (isset($_POST['ChanceOr Ref']) && $_POST['ChanceOrRef'] != '') $ChanceOrRef = $sql->quote_smart($_POST['ChanceOrRef']);725 else $ChanceOr Ref= 0;726 if (isset($_POST[' QuestChanceOrGroup']) && $_POST['QuestChanceOrGroup'] != '') $QuestChanceOrGroup = $sql->quote_smart($_POST['QuestChanceOrGroup']);727 else $ QuestChanceOrGroup= 0;728 if (isset($_POST['mincount ']) && $_POST['mincount'] != '') $mincount = $sql->quote_smart($_POST['mincount']);729 else $mincount = 0;722 if (isset($_POST['ChanceOrQuestChance']) && $_POST['ChanceOrQuestChance'] != '') $ChanceOrQuestChance = $sql->quote_smart($_POST['ChanceOrQuestChance']); 723 else $ChanceOrQuestChance = 0; 724 if (isset($_POST['groupid']) && $_POST['groupid'] != '') $groupid = $sql->quote_smart($_POST['groupid']); 725 else $groupid = 0; 726 if (isset($_POST['mincountOrRef']) && $_POST['mincountOrRef'] != '') $mincountOrRef = $sql->quote_smart($_POST['mincountOrRef']); 727 else $mincountOrRef = 0; 730 728 if (isset($_POST['maxcount']) && $_POST['maxcount'] != '') $maxcount = $sql->quote_smart($_POST['maxcount']); 731 729 else $maxcount = 0; 732 if (isset($_POST['freeforall']) && $_POST['freeforall'] != '') $freeforall = $sql->quote_smart($_POST['freeforall']);733 else $freeforall = 0;734 730 if (isset($_POST['lootcondition']) && $_POST['lootcondition'] != '') $lootcondition = $sql->quote_smart($_POST['lootcondition']); 735 731 else $lootcondition = 0; … … 814 810 815 811 if ($item){ 816 $sql_query .= "INSERT INTO gameobject_loot_template (entry, item, ChanceOr Ref, QuestChanceOrGroup, mincount, maxcount, freeforall, lootcondition, condition_value1, condition_value2)817 VALUES ($ entry,$item,'$ChanceOrRef', '$QuestChanceOrGroup' ,$mincount ,$maxcount ,$freeforall,$lootcondition ,$condition_value1 ,$condition_value2);\n";812 $sql_query .= "INSERT INTO gameobject_loot_template (entry, item, ChanceOrQuestChance, `groupid`, mincountOrRef, maxcount, lootcondition, condition_value1, condition_value2) 813 VALUES ($data1,$item,'$ChanceOrQuestChance', '$groupid' ,$mincountOrRef ,$maxcount ,$lootcondition ,$condition_value1 ,$condition_value2);\n"; 818 814 } 819 815 820 816 if ($del_loot_items){ 821 817 foreach($del_loot_items as $item_id) 822 $sql_query .= "DELETE FROM gameobject_loot_template WHERE entry = $ entryAND item = $item_id;\n";818 $sql_query .= "DELETE FROM gameobject_loot_template WHERE entry = $data1 AND item = $item_id;\n"; 823 819 } 824 820 … … 910 906 $sql->query("DELETE FROM gameobject_involvedrelation WHERE id = '$entry'"); 911 907 $sql->query("DELETE FROM gameobject_questrelation WHERE id = '$entry'"); 912 $sql->query("DELETE FROM gameobject_loot_template WHERE entry = '$ entry'");908 $sql->query("DELETE FROM gameobject_loot_template WHERE entry = '$data1'"); 913 909 $sql->query("DELETE FROM gameobject_template WHERE entry = '$entry'"); 914 910 -
minimanager/guild.php
r307 r374 10 10 11 11 require_once("header.php"); 12 valid_login( 0);12 valid_login($action_permission['read']); 13 13 require_once("scripts/id_tab.php"); 14 14 //######################################################################################################################## … … 16 16 //######################################################################################################################## 17 17 function browse_guilds() { 18 global $lang_guild, $lang_global, $output, $characters_db, $realm_id, $ itemperpage, $realm_db;18 global $lang_guild, $lang_global, $output, $characters_db, $realm_id, $realm_db, $user_id, $user_lvl, $itemperpage, $sql_search_limit, $search_by, $search_value; 19 19 20 20 $sql = new SQL; 21 21 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 22 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 $order_dir = ($dir) ? "ASC" : "DESC"; 28 $dir = ($dir) ? 0 : 1; 29 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 name,guild.leaderguid AS lguid,SUBSTRING_INDEX(guild.MOTD,' ',6), guild.createdate, 34 (SELECT name FROM `characters` 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 38 //==========================top tage navigaion starts here======================== 39 $output .="<center><table class=\"top_hidden\"> 40 <tr><td> 41 <table class=\"hidden\"> 42 <tr><td> 43 <form action=\"guild.php\" method=\"get\" name=\"form\"> 44 <input type=\"hidden\" name=\"action\" value=\"search\" /> 45 <input type=\"hidden\" name=\"error\" value=\"4\" /> 46 <input type=\"text\" size=\"45\" name=\"search_value\" /> 47 <select name=\"search_by\"> 48 <option value=\"name\">{$lang_guild['by_name']}</option> 49 <option value=\"leaderguid\">{$lang_guild['by_guild_leader']}</option> 50 <option value=\"createdate\">{$lang_guild['by_create_date']}</option> 51 <option value=\"guildid\">{$lang_guild['by_id']}</option> 52 </select></form></td><td>"; 53 makebutton($lang_global['search'], "javascript:do_submit()",80); 54 $output .= "</td></tr></table> 55 <td align=\"right\">"; 56 $output .= generate_pagination("guild.php?action=brows_guilds&order_by=$order_by&dir=".!$dir, $all_record, $itemperpage, $start); 57 $output .= "</td></tr></table>"; 23 //==========================$_GET and SECURE======================== 24 $start = (isset($_GET['start'])) ? $sql->quote_smart($_GET['start']) : 0; 25 if (!preg_match("/^[[:digit:]]{1,5}$/", $start)) $start=0; 26 27 $order_by = (isset($_GET['order_by'])) ? $sql->quote_smart($_GET['order_by']) : "gid"; 28 if (!preg_match("/^[_[:lower:]]{1,10}$/", $order_by)) $order_by="gid"; 29 30 $dir = (isset($_GET['dir'])) ? $sql->quote_smart($_GET['dir']) : 1; 31 if (!preg_match("/^[01]{1}$/", $dir)) $dir=1; 32 33 $order_dir = ($dir) ? "ASC" : "DESC"; 34 $dir = ($dir) ? 0 : 1; 35 //==========================$_GET and SECURE end======================== 36 //==========================MyGuild======================== 37 38 $query_myGuild = $sql->query("SELECT g.guildid as gid, g.name,g.leaderguid AS lguid, (SELECT name from characters where guid = lguid), (SELECT race in (2,5,6,8,10) from characters where guid = lguid) as faction, (select count(*) from characters where guid in (select guid from guild_member where guildid = lguid) and online = 1) as gonline, (select count(*) from guild_member where guildid = gid), SUBSTRING_INDEX(g.MOTD,' ',6), g.createdate, (select account from characters where guid = lguid) FROM guild as g 39 left outer join guild_member as gm on gm.guildid = g.guildid left outer join characters as c on c.guid = gm.guid where c.account = $user_id group by g.guildid order by gid"); 40 41 if ($query_myGuild) 42 { 43 $output .= "<center><fieldset><legend>{$lang_guild['my_guilds']}</legend><table class=\"lined\" align=\"center\"> 44 <tr> 45 <th width=\"5%\">{$lang_guild['id']}</th> 46 <th width=\"25%\">{$lang_guild['guild_name']}</th> 47 <th width=\"15%\">{$lang_guild['guild_leader']}</th> 48 <th width=\"10%\">{$lang_guild['guild_faction']}</th> 49 <th width=\"10%\">{$lang_guild['tot_m_online']}</th> 50 <th width=\"20%\">{$lang_guild['guild_motd']}</th> 51 <th width=\"15%\">{$lang_guild['create_date']}</th> 52 </tr>"; 53 54 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 55 while ($data = $sql->fetch_row($query_myGuild)) { 56 57 $result = $sql->query("SELECT gmlevel FROM account WHERE id ='$data[9]'"); 58 $owner_gmlvl = $sql->result($result, 0, 'gmlevel'); 59 60 $output .= "<tr> 61 <td>$data[0]</td> 62 <td><a href=\"guild.php?action=view_guild&error=3&id=$data[0]\">$data[1]</a></td>"; 63 $output .= ($user_lvl < $owner_gmlvl ) ? "<td>$data[3]</td>" : "<td><a href=\"char.php?id=$data[2]\">$data[3]</a></td>"; 64 $output .= "<td><img src=\"img/".($data[4]==0 ? "alliance" : "horde")."_small.gif\" /></td> 65 <td>$data[5]/$data[6]</td> 66 <td>$data[7] ...</td> 67 <td class=\"small\">$data[8]</td> 68 </tr>"; 69 } 70 $output .= "</table></fieldset></center><br />"; 71 72 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 73 } 74 75 //==========================MyGuild end======================== 76 //==========================Browse/Search Guilds CHECK======================== 77 78 if(isset($_GET['search_value']) && isset($_GET['search_by'])) 79 { 80 $search_by = $sql->quote_smart($_GET['search_by']); 81 $search_value = $sql->quote_smart($_GET['search_value']); 82 83 switch($search_by) 84 { 85 case "name": 86 if (preg_match('/^[\t\v\b\f\a\n\r\\\"\'\? <>[](){}_=+-|!@#$%^&*~`.,0123456789\0]{1,30}$/', $search_value)) redirect("guild.php?error=5"); 87 $query = $sql->query("SELECT g.guildid as gid, g.name,g.leaderguid as lguid, (SELECT name from characters where guid = lguid) as lname, c.race in (2,5,6,8,10) as lfaction, (select count(*) from guild_member where guildid = gid) as tot_chars, createdate, c.account as laccount FROM guild as g left outer join characters as c on c.guid = g.leaderguid where g.name like '%$search_value%' ORDER BY $order_by $order_dir LIMIT $start, $itemperpage"); 88 $query_count = $sql->query("SELECT 1 from guild where name like '%$search_value%'"); 89 break; 90 case "leadername" : 91 if (preg_match('/^[\t\v\b\f\a\n\r\\\"\'\? <>[](){}_=+-|!@#$%^&*~`.,0123456789\0]{1,30}$/', $search_value)) redirect("guild.php?error=5"); 92 $query = $sql->query("SELECT g.guildid as gid, g.name,g.leaderguid as lguid, (SELECT name from characters where guid = lguid) as lname, c.race in (2,5,6,8,10) as lfaction, (select count(*) from guild_member where guildid = gid) as tot_chars, createdate, c.account as laccount FROM guild as g left outer join characters as c on c.guid = g.leaderguid where g.leaderguid in (SELECT guid from characters where name like '%$search_value%') ORDER BY $order_by $order_dir LIMIT $start, $itemperpage"); 93 $query_count = $sql->query("SELECT 1 from guild where leaderguid in (select guid from characters where name like '%$search_value%')"); 94 break; 95 case "guildid" : 96 if (!preg_match('/^[[:digit:]]{1,12}$/', $search_value)) redirect("guild.php?error=5"); 97 $query = $sql->query("SELECT g.guildid as gid, g.name,g.leaderguid as lguid, (SELECT name from characters where guid = lguid) as lname, c.race in (2,5,6,8,10) as lfaction, (select count(*) from guild_member where guildid = gid) as tot_chars, createdate, c.account as laccount FROM guild as g left outer join characters as c on c.guid = g.leaderguid where g.guildid = '$search_value' ORDER BY $order_by $order_dir LIMIT $start, $itemperpage"); 98 $query_count = $sql->query("SELECT 1 from guild where guildid = '$search_value'"); 99 break; 100 default : redirect("guild.php?error=2"); 101 } 102 } 103 else 104 { 105 $query = $sql->query("SELECT g.guildid as gid, g.name,g.leaderguid as lguid, (SELECT name from characters where guid = lguid) as lname, c.race in (2,5,6,8,10) as lfaction, (select count(*) from guild_member where guildid = gid) as tot_chars, createdate, c.account as laccount FROM guild as g left outer join characters as c on c.guid = g.leaderguid ORDER BY $order_by $order_dir LIMIT $start, $itemperpage"); 106 $query_count = $sql->query("SELECT 1 from guild"); 107 } 108 109 $all_record = $sql->num_rows($query_count); 110 111 //==========================Browse/Search Guilds CHECK end======================== 112 //==========================Browse/Search Guilds======================== 113 114 $output .="<table class=\"top_hidden\" align=\"center\"><tr><td width =\"140\">"; 115 116 ($search_by && $search_value) ? makebutton($lang_guild['show_guilds'], "guild.php", 150) : $output .= " "; 117 118 $output .= "</td><td align=\"right\"> 119 <form action=\"guild.php\" method=\"get\" name=\"form\"> 120 <input type=\"hidden\" name=\"action\" value=\"browse_guilds\" /> 121 <input type=\"hidden\" name=\"error\" value=\"4\" /> 122 <input type=\"text\" size=\"45\" name=\"search_value\" value=\"{$search_value}\" /> 123 <select name=\"search_by\"> 124 <option value=\"name\"".($search_by == 'name' ? " selected=\"selected\"" : "").">{$lang_guild['by_name']}</option> 125 <option value=\"leadername\"".($search_by == 'leadername' ? " selected=\"selected\"" : "").">{$lang_guild['by_guild_leader']}</option> 126 <option value=\"guildid\"".($search_by == 'guildid' ? " selected=\"selected\"" : "").">{$lang_guild['by_id']}</option> 127 </select> 128 </form></td><td>"; 129 makebutton($lang_global['search'], "javascript:do_submit()",80); 130 131 $output .= "</td></tr><tr> 132 <td colspan=\"3\" align=\"right\">"; 133 134 $output .= generate_pagination("guild.php?action=brows_guilds&order_by=$order_by&".($search_value && $search_by ? "search_by=$search_by&search_value=$search_value&" : "")."dir=".!$dir, $all_record, $itemperpage, $start); 135 136 $output .= "</td></tr></table>"; 137 58 138 //==========================top tage navigaion ENDS here ======================== 59 139 60 $output .= "< table class=\"lined\">140 $output .= "<center><fieldset><legend>{$lang_guild['browse_guilds']}</legend><table class=\"lined\" align=\"center\"> 61 141 <tr> 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=\"23%\"><a href=\"guild.php?order_by=name&start=$start&dir=$dir\">".($order_by=='name' ? "<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=\"5%\">Online Members</th> 66 <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> 67 <th width=\"32%\">{$lang_guild['guild_motd']}</th> 68 <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> 142 <th width=\"5%\"><a href=\"guild.php?order_by=gid&start=$start&dir=$dir".( $search_value && $search_by ? "&search_by=$search_by&search_value=$search_value" : "" )."\">".($order_by=='gid' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_guild['id']}</a></th> 143 <th width=\"30%\"><a href=\"guild.php?order_by=name&start=$start&dir=$dir".( $search_value && $search_by ? "&search_by=$search_by&search_value=$search_value" : "" )."\">".($order_by=='name' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_guild['guild_name']}</a></th> 144 <th width=\"20%\"><a href=\"guild.php?order_by=lname&start=$start&dir=$dir".( $search_value && $search_by ? "&search_by=$search_by&search_value=$search_value" : "" )."\">".($order_by=='lname' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_guild['guild_leader']}</a></th> 145 <th width=\"10%\"><a href=\"guild.php?order_by=lfaction&start=$start&dir=$dir".( $search_value && $search_by ? "&search_by=$search_by&search_value=$search_value" : "" )."\">".($order_by=='lfaction' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_guild['guild_faction']}</a></th> 146 <th width=\"15%\"><a href=\"guild.php?order_by=tot_chars&start=$start&dir=$dir".( $search_value && $search_by ? "&search_by=$search_by&search_value=$search_value" : "" )."\">".($order_by=='tot_chars' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_guild['tot_members']}</a></th> 147 <th width=\"20%\"><a href=\"guild.php?order_by=createdate&start=$start&dir=$dir".( $search_value && $search_by ? "&search_by=$search_by&search_value=$search_value" : "" )."\">".($order_by=='createdate' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_guild['create_date']}</a></th> 69 148 </tr>"; 70 149 71 while ($data = $sql->fetch_row($query)) { 72 73 $gonline = $sql->query("SELECT count(*) AS GCNT FROM `guild_member`, `characters`, `guild` WHERE guild.guildid = ".$data[0]." AND guild_member.guildid = guild.guildid AND guild_member.guid = characters.guid AND characters.online = 1;"); 74 $guild_online = $sql->result($gonline,"GCNT"); 75 76 $output .= "<tr> 77 <td>$data[0]</td> 78 <td><a href=\"guild.php?action=view_guild&error=3&id=$data[0]\">$data[1]</a></td> 79 <td>$data[6]</td> 80 <td>$guild_online</td> 81 <td><a href=\"char.php?id=$data[2]\">$data[5]</a></td> 82 <td>$data[3] ...</td> 83 <td class=\"small\">$data[4]</td> 84 </tr>"; 85 } 86 87 $output .= "<tr><td colspan=\"6\" class=\"hidden\" align=\"right\">{$lang_guild['tot_guilds']} : $all_record</td></tr> 88 </table></center>"; 150 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 151 152 while ($data = $sql->fetch_row($query)) { 153 154 $result = $sql->query("SELECT gmlevel FROM account WHERE id ='$data[7]'"); 155 $owner_gmlvl = $sql->result($result, 0, 'gmlevel'); 156 157 $output .= "<tr><td>$data[0]</td>"; 158 $output .= ($user_lvl >= 1) ? "<td><a href=\"guild.php?action=view_guild&error=3&id=$data[0]\">$data[1]</td>" : "<td>$data[1]</td>"; 159 $output .= ($user_lvl < $owner_gmlvl ) ? "<td>$data[3]</td>" : "<td><a href=\"char.php?id=$data[2]\">$data[3]</a></td>"; 160 $output .= "<td><img src=\"img/".($data[4]==0 ? "alliance" : "horde")."_small.gif\" /></td> 161 <td>$data[5]</td> 162 <td class=\"small\">$data[6]</td> 163 </tr>"; 164 } 165 166 $output .= "<tr><td colspan=\"6\" class=\"hidden\" align=\"right\">".generate_pagination("guild.php?action=brows_guilds&order_by=$order_by&".($search_value && $search_by ? "search_by=$search_by&search_value=$search_value&" : "")."dir=".!$dir, $all_record, $itemperpage, $start)."</td></tr> 167 <tr><td colspan=\"6\" class=\"hidden\" align=\"right\">{$lang_guild['tot_guilds']} : $all_record</td></tr> 168 </table></fieldset></center><br />"; 169 170 //==========================Browse/Search Guilds end======================== 89 171 90 172 $sql->close(); … … 92 174 93 175 94 //######################################################################################################################## 95 // SEARCH 96 //######################################################################################################################## 97 function search() { 98 global $lang_guild, $lang_global, $output, $characters_db, $realm_id, $sql_search_limit; 99 100 if(!isset($_GET['search_value']) || !isset($_GET['search_by'])) redirect("guild.php?error=2"); 101 176 function count_days( $a, $b ) { 177 $gd_a = getdate( $a ); 178 $gd_b = getdate( $b ); 179 $a_new = mktime( 12, 0, 0, $gd_a['mon'], $gd_a['mday'], $gd_a['year'] ); 180 $b_new = mktime( 12, 0, 0, $gd_b['mon'], $gd_b['mday'], $gd_b['year'] ); 181 return round( abs( $a_new - $b_new ) / 86400 ); 182 } 183 184 //######################################################################################################################## 185 // VIEW GUILD 186 //######################################################################################################################## 187 function view_guild() { 188 global $lang_guild, $lang_global, $output, $characters_db, $realm_id, $user_lvl, $user_id, $itemperpage, $sql_search_limit, $realm_db; 189 190 if(!isset($_GET['id'])) redirect("guild.php?error=1"); 191 102 192 $sql = new SQL; 103 193 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 104 105 $search_value = $sql->quote_smart($_GET['search_value']); 106 $search_by = $sql->quote_smart($_GET['search_by']); 107 108 if(isset($_GET['order_by'])) $order_by = $sql->quote_smart($_GET['order_by']); 109 else $order_by = "guildid"; 110 111 $dir = (isset($_GET['dir'])) ? $sql->quote_smart($_GET['dir']) : 1; 112 $order_dir = ($dir) ? "ASC" : "DESC"; 113 $dir = ($dir) ? 0 : 1; 114 115 if ($search_by == "leaderguid"){ 116 $temp = $sql->query("SELECT guid FROM `characters` WHERE name ='$search_value'"); 117 $search_value = $sql->result($temp, 0, 'guid'); 118 } 119 120 $query = $sql->query("SELECT guild.guildid AS gid, guild.name AS name,guild.leaderguid AS lguid,SUBSTRING_INDEX(guild.MOTD,' ',6), guild.createdate, 121 (SELECT name FROM `characters` WHERE guid = lguid) AS l_name, (SELECT COUNT(*) FROM guild_member WHERE guildid = gid) AS tot_chars 122 FROM guild WHERE $search_by LIKE '%$search_value%' ORDER BY $order_by $order_dir LIMIT $sql_search_limit"); 123 $total_found = $sql->num_rows($query); 124 125 //==========================top tage navigaion starts here======================== 126 $output .="<center><table class=\"top_hidden\"> 127 <tr><td>"; 128 makebutton($lang_guild['guilds'], "guild.php", 120); 129 makebutton($lang_global['back'], "javascript:window.history.back()", 120); 130 $output .= "<form action=\"guild.php\" method=\"get\" name=\"form\"> 131 <input type=\"hidden\" name=\"action\" value=\"search\" /> 132 <input type=\"hidden\" name=\"error\" value=\"4\" /> 133 <input type=\"text\" size=\"30\" name=\"search_value\" /> 134 <select name=\"search_by\"> 135 <option value=\"name\">{$lang_guild['by_name']}</option> 136 <option value=\"leaderguid\">{$lang_guild['by_guild_leader']}</option> 137 <option value=\"createdate\">{$lang_guild['by_create_date']}</option> 138 <option value=\"guildid\">{$lang_guild['by_id']}</option> 139 </select> 140 </form></td><td>"; 141 makebutton($lang_global['search'], "javascript:do_submit()",90); 142 $output .= "</td></tr></table>"; 143 //==========================top tage navigaion ENDS here ======================== 144 145 $output .= "<table class=\"lined\"> 146 <tr> 147 <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> 148 <th width=\"25%\"><a href=\"guild.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_guild['guild_name']}</a></th> 149 <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> 150 <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> 151 <th width=\"35%\">{$lang_guild['guild_motd']}</th> 152 <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> 153 </tr>"; 154 155 while ($data =$sql->fetch_row($query)){ 156 $output .= "<tr> 157 <td>$data[0]</td> 158 <td><a href=\"guild.php?action=view_guild&error=3&id=$data[0]\">$data[1]</a></td> 159 <td>$data[6]</td> 160 <td><a href=\"char.php?id=$data[2]\">$data[5]</a></td> 161 <td>$data[3] ...</td> 162 <td class=\"small\">$data[4]</td> 163 </tr>"; 164 } 165 166 $output .= "<tr> 167 <td colspan=\"6\" class=\"hidden\" align=\"right\">{$lang_guild['tot_found']} : $total_found {$lang_global['limit']} : $sql_search_limit</td> 168 </tr> 169 </table></center>"; 170 171 $sql->close(); 172 } 173 174 function count_days( $a, $b ) { 175 $gd_a = getdate( $a ); 176 $gd_b = getdate( $b ); 177 $a_new = mktime( 12, 0, 0, $gd_a['mon'], $gd_a['mday'], $gd_a['year'] ); 178 $b_new = mktime( 12, 0, 0, $gd_b['mon'], $gd_b['mday'], $gd_b['year'] ); 179 return round( abs( $a_new - $b_new ) / 86400 ); 180 } 181 182 //######################################################################################################################## 183 // VIEW GUILD 184 //######################################################################################################################## 185 function view_guild() { 186 global $lang_guild, $lang_global, $output, $characters_db, $realm_id, $user_lvl; 187 188 if(!isset($_GET['id'])) redirect("guild.php?error=1"); 189 194 195 $guild_id = $sql->quote_smart($_GET['id']); 196 if(!preg_match("/^[[:digit:]]{1,10}$/", $guild_id)) redirect("guild.php?error=6"); 197 198 199 //==========================SQL INGUILD and GUILDLEADER======================== 200 $q_inguild = $sql->query("select 1 from guild_member where guildid = '$guild_id' and guid in (select guid from characters where account = '$user_id')"); 201 $inguild = $sql->result($q_inguild, 0, '1'); 202 if ( $user_lvl < 1 && !$inguild ) redirect("guild.php?error=1"); 203 204 $q_amIguildleader = $sql->query("select 1 from guild where guildid = '$guild_id' and leaderguid in (select guid from characters where account = '$user_id')"); 205 $amIguildleader = $sql->result($q_amIguildleader, 0, '1'); 206 207 $q_guildmemberCount = $sql->query("SELECT 1 from guild_member where guildid = '$guild_id'"); 208 $guildmemberCount = $sql->num_rows($q_guildmemberCount); 209 210 //==========================SQL INGUILD and GUILDLEADER end======================== 211 212 //==========================$_GET and SECURE======================== 213 $start = (isset($_GET['start'])) ? $sql->quote_smart($_GET['start']) : 0; 214 if (!preg_match("/^[[:digit:]]{1,5}$/", $start)) $start=0; 215 216 $order_by = (isset($_GET['order_by'])) ? $sql->quote_smart($_GET['order_by']) : "mrank"; 217 if (!preg_match("/^[_[:lower:]]{1,10}$/", $order_by)) $order_by="mrank"; 218 219 $dir = (isset($_GET['dir'])) ? $sql->quote_smart($_GET['dir']) : 1; 220 if (!preg_match("/^[01]{1}$/", $dir)) $dir=1; 221 222 $order_dir = ($dir) ? "ASC" : "DESC"; 223 $dir = ($dir) ? 0 : 1; 224 //==========================$_GET and SECURE end======================== 225 226 $query = $sql->query("SELECT guildid, name, info, MOTD, createdate, (select count(*) from guild_member where guildid = '$guild_id') as mtotal, (select count(*) from guild_member where guildid = '$guild_id' and guid in (select guid from characters where online = 1)) as monline FROM guild WHERE guildid = '$guild_id'"); 227 $guild_data = $sql->fetch_row($query); 228 229 230 $output .= "<script type=\"text/javascript\"> 231 answerbox.btn_ok='{$lang_global['yes_low']}'; 232 answerbox.btn_cancel='{$lang_global['no']}'; 233 </script><center> 234 <fieldset> 235 <legend>{$lang_guild['guild']}</legend> 236 <table class=\"hidden\" style=\"width: 100%;\"><tr><td> 237 <table class=\"lined\"> 238 <tr class=\"bold\"><td>$guild_data[1]</td></tr> 239 <tr><td><b>{$lang_guild['create_date']}:</b><br>$guild_data[4]</td></tr>"; 240 241 if ($guild_data[2] != '') $output .= "<tr><td><b>{$lang_guild['info']}:</b><br>$guild_data[2]</td></tr>"; 242 if ($guild_data[3] != '') $output .= "<tr><td><b>{$lang_guild['motd']}:</b><br>$guild_data[3]</td></tr>"; 243 244 $output .="<tr><td><b>{$lang_guild['tot_m_online']}:</b><br>$guild_data[6] / $guild_data[5]</td></tr> 245 </table></td></tr><td> 246 247 <div align=\"right\">".generate_pagination("guild.php?action=view_guild&id=$guild_id&order_by=$order_by&dir=".!$dir, $guildmemberCount, $itemperpage, $start)."</div> 248 249 <tr><td><table class=\"lined\"><tr>"; 250 251 if ($user_lvl >= 4 || $inguild || $amIguildleader) $output .= " <th width=\"3%\">{$lang_guild['remove']}</th>"; 252 253 $output .= " 254 <th width=\"21%\"><a href=\"guild.php?action=view_guild&id=$guild_id&order_by=cname&start=$start&dir=$dir\">".($order_by=='cname' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_guild['name']}</a></th> 255 <th width=\"3%\"><a href=\"guild.php?action=view_guild&id=$guild_id&order_by=crace&start=$start&dir=$dir\">".($order_by=='crace' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_guild['race']}</a></th> 256 <th width=\"3%\"><a href=\"guild.php?action=view_guild&id=$guild_id&order_by=class&start=$start&dir=$dir\">".($order_by=='cclass' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_guild['class']}</a></th> 257 <th width=\"3%\"><a href=\"guild.php?action=view_guild&id=$guild_id&order_by=clevel&start=$start&dir=$dir\">".($order_by=='clevel' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_guild['level']}</a></th> 258 <th width=\"21%\"><a href=\"guild.php?action=view_guild&id=$guild_id&order_by=mrank&start=$start&dir=$dir\">".($order_by=='mrank' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_guild['rank']}</a></th> 259 <th width=\"14%\">{$lang_guild['pnote']}</th> 260 <th width=\"14%\">{$lang_guild['offnote']}</th> 261 <th width=\"15%\"><a href=\"guild.php?action=view_guild&id=$guild_id&order_by=clogout&start=$start&dir=$dir\">".($order_by=='clogout' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_guild['llogin']}</a></th> 262 <th width=\"3%\"><a href=\"guild.php?action=view_guild&id=$guild_id&order_by=conline&start=$start&dir=$dir\">".($order_by=='conline' ? "<img src=\"img/arr_".($dir ? "up" : "dw").".gif\" /> " : "")."{$lang_guild['online']}</a></th> 263 </tr>"; 264 265 $members = $sql->query("SELECT gm.guid as cguid, c.name as cname, c.`race` as crace ,c.`class` as cclass, SUBSTRING_INDEX(SUBSTRING_INDEX(c.`data`, ' ', 35), ' ', -1) AS clevel, gm.rank AS mrank, (SELECT rname FROM guild_rank WHERE guildid ='$guild_id' AND rid = mrank+1) AS rname, gm.Pnote, gm.OFFnote, mid(lpad( hex( CAST(substring_index(substring_index(data,' ',37),' ',-1) as unsigned) ),8,'0'),4,1) as gender, c.`online` as conline, c.`account`, c.`logout_time` as clogout 266 FROM guild_member as gm 267 left outer join characters as c on c.guid = gm.guid 268 WHERE gm.guildid = '$guild_id' 269 ORDER BY $order_by $order_dir LIMIT $start, $itemperpage"); 270 271 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 272 while ($member = $sql->fetch_row($members)){ 273 274 $result = $sql->query("SELECT gmlevel FROM account WHERE id ='$member[11]'"); 275 $owner_gmlvl = $sql->result($result, 0, 'gmlevel'); 276 277 $llogin = count_days($member[12], time()); 278 279 if($member[4] < 10) 280 $lev = '<font color="#FFFFFF">'.$member[4].'</font>'; 281 else if($member[4] < 20) 282 $lev = '<font color="#858585">'.$member[4].'</font>'; 283 else if($member[4] < 30) 284 $lev = '<font color="#339900">'.$member[4].'</font>'; 285 else if($member[4] < 40) 286 $lev = '<font color="#3300CC">'.$member[4].'</font>'; 287 else if($member[4] < 50) 288 $lev = '<font color="#C552FF">'.$member[4].'</font>'; 289 else if($member[4] < 60) 290 $lev = '<font color="#FF8000">'.$member[4].'</font>'; 291 else if($member[4] < 70) 292 $lev = '<font color="#FFF280">'.$member[4].'</font>'; 293 else if($member[4] < 80) 294 $lev = '<font color="#FF0000">'.$member[4].'</font>'; 295 else 296 $lev = '<font color="#000000">'.$member[4].'</font>'; 297 298 if($llogin < 1) 299 $lastlogin = '<font color="#009900">'.$llogin.'</font>'; 300 else if($llogin < 6) 301 $lastlogin = '<font color="#0000CC">'.$llogin.'</font>'; 302 else if($llogin < 16) 303 $lastlogin = '<font color="#FFFF00">'.$llogin.'</font>'; 304 else if($llogin < 16) 305 $lastlogin = '<font color="#FF8000">'.$llogin.'</font>'; 306 else if($llogin < 31) 307 $lastlogin = '<font color="#FF0000">'.$llogin.'</font>'; 308 else if($llogin < 61) 309 $lastlogin = '<font color="#FF00FF">'.$llogin.'</font>'; 310 else 311 $lastlogin = '<font color="#FF0000">'.$llogin.'</font>'; 312 313 $output .= " <tr>"; 314 // gm, gildleader or own account! are allowed to remove from guild 315 $output .= ($user_lvl >= 4 || $amIguildleader || $member[11] == $user_id) ? 316 " <td><img src=\"img/aff_cross.png\" alt=\"\" onclick=\"answerBox('{$lang_global['delete']}: <font color=white>{$member[1]}</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>" : 317 " <td></td>"; 318 319 320 $output .= ($user_lvl < $owner_gmlvl ) ? "<td>$member[1]</td>" : "<td><a href=\"char.php?id=$member[0]\">$member[1]</a></td>"; 321 $output .= "<td><img src='img/c_icons/{$member[2]}-{$member[9]}.gif' onmousemove='toolTip(\"".get_player_race($member[2])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td> 322 <td><img src='img/c_icons/{$member[3]}.gif' onmousemove='toolTip(\"".get_player_class($member[3])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td> 323 <td>$lev</td> 324 <td>$member[6] ($member[5])</td> 325 <td>$member[7]</td> 326 <td>$member[8]</td> 327 <td>$lastlogin</td> 328 <td>".(($member[10]) ? "<img src=\"img/up.gif\" alt=\"\" />" : "-")."</td> 329 </tr>"; 330 } 331 332 333 $output .= "</table></td></tr></table><br />"; 334 $sql->close(); 335 336 337 $output .= "<table class=\"hidden\"> 338 <tr><td>"; 339 makebutton($lang_guild['show_guilds'], "guild.php", 272); 340 $output .= "</td>"; 341 342 if ($user_lvl >= 4 || $amIguildleader){ 343 344 $output .= "<td>"; 345 makebutton($lang_guild['del_guild'], "guild.php?action=del_guild&id=$guild_id", 272); 346 } 347 348 $output .= "</td></tr></table> 349 </fieldset></center><br />"; 350 } 351 352 //######################################################################################################################## 353 // ARE YOU SURE YOU WOULD LIKE TO OPEN YOUR AIRBAG? 354 //######################################################################################################################## 355 function del_guild() { 356 global $lang_guild, $lang_global, $output, $user_lvl, $user_id, $characters_db, $realm_id; 357 if(isset($_GET['id'])) $id = $_GET['id']; 358 else redirect("guild.php?error=1"); 359 if (!preg_match('/^[[:digit:]]{1,12}$/', $id)) redirect("guild.php?error=5"); 360 190 361 $sql = new SQL; 191 362 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 192 363 193 $guild_id = $sql->quote_smart($_GET['id']); 194 195 $query = $sql->query("SELECT guildid, name, info, MOTD, createdate FROM guild WHERE guildid = '$guild_id'"); 196 $guild_data = $sql->fetch_row($query); 197 198 $members = $sql->query("SELECT guild_member.guid, guild_member.rank AS mrank, 199 `characters`.name, SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, ' ', 35), ' ', -1) AS level, 200 (SELECT rname FROM guild_rank WHERE guildid ='$guild_id' AND rid = mrank+1) AS rname, 201 guild_member.Pnote, guild_member.OFFnote 202 FROM guild_member,`characters` 203 LEFT JOIN guild_member k1 ON k1.`guid`=`characters`.`guid` 204 WHERE guild_member.guildid = '$guild_id' AND guild_member.guid=`characters`.guid 205 ORDER BY mrank"); 206 207 208 209 $total_members = $sql->num_rows($members); 210 211 if (!$guild_data[2]) $guild_data[2] = $lang_global['none']; 212 213 $output .= "<script type=\"text/javascript\"> 214 answerbox.btn_ok='{$lang_global['yes_low']}'; 215 answerbox.btn_cancel='{$lang_global['no']}'; 216 </script> 217 <center> 218 <fieldset style=\"width: 950px;\"> 219 <legend>{$lang_guild['guild']}</legend> 220 <table class=\"lined\" style=\"width: 910px;\"> 221 <tr class=\"bold\"> 222 <td colspan=\"11\">$guild_data[1]</td> 223 </tr> 224 <tr> 225 <td colspan=\"11\">{$lang_guild['create_date']}: $guild_data[4]</td> 226 </tr> 227 <tr> 228 <td colspan=\"11\">{$lang_guild['info']}: $guild_data[2]</td> 229 </tr> 230 <tr> 231 <td colspan=\"11\">{$lang_guild['motd']}: $guild_data[3]</td> 232 </tr> 233 <tr> 234 <td colspan=\"11\">{$lang_guild['tot_members']}: $total_members</td> 235 </tr> 236 <tr>"; 237 if ($user_lvl > 2){ 238 $output .= " <th width=\"3%\">{$lang_guild['remove']}</th>"; 239 } 240 $output .= " 241 <th width=\"21%\">{$lang_guild['name']}</th> 242 <th width=\"3%\">Race</th> 243 <th width=\"3%\">Class</th> 244 <th width=\"3%\">{$lang_guild['level']}</th> 245 <th width=\"21%\">{$lang_guild['rank']}</th> 246 <th width=\"14%\">Player Note</th> 247 <th width=\"14%\">Office Note</th> 248 <th width=\"15%\">Last Login (Days)</th> 249 <th width=\"3%\">Online</th> 250 </tr>"; 251 252 while ($member = $sql->fetch_row($members)){ 253 254 $query = $sql->query("SELECT `race`,`class`,`online`, `account`, `logout_time`, SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, ' ', 35), ' ', -1) AS level, mid(lpad( hex( CAST(substring_index(substring_index(data,' ',".(36+1)."),' ',-1) as unsigned) ),8,'0'),4,1) as gender FROM `characters` WHERE `name` = '$member[2]';"); 255 256 $online = $sql->fetch_row($query); 257 $accid = $online[3]; 258 $llogin = count_days($online[4], time()); 259 260 $level = $online[5]; 261 262 if($level > 0) 263 { 264 $lev = '<font color="#FFFFFF">'.$level.'</font>'; 265 } 266 if($level > 9) 267 { 268 $lev = '<font color="#858585">'.$level.'</font>'; 269 } 270 if($level > 19) 271 { 272 $lev = '<font color="#339900">'.$level.'</font>'; 273 } 274 if($level > 29) 275 { 276 $lev = '<font color="#3300CC">'.$level.'</font>'; 277 } 278 if($level > 39) 279 { 280 $lev = '<font color="#5552FF">'.$level.'</font>'; 281 } 282 if($level > 49) 283 { 284 $lev = '<font color="#FF8000">'.$level.'</font>'; 285 } 286 if($level > 59) 287 { 288 $lev = '<font color="#FF0000">'.$level.'</font>'; 289 } 290 if($level > 69) 291 { 292 $lev = '<font color="#FF00CC">'.$level.'</font>'; 293 } 294 if($level > 70) 295 { 296 $lev = '<font color="#FFF000">'.$level.'</font>'; 297 } 298 299 300 if($llogin < 1) 301 { 302 $lastlogin = '<font color="#009900">'.$llogin.'</font>'; 303 } 304 if($llogin >= 1) 305 { 306 $lastlogin = '<font color="#0000CC">'.$llogin.'</font>'; 307 } 308 if($llogin > 5) 309 { 310 $lastlogin = '<font color="#FFFF00">'.$llogin.'</font>'; 311 } 312 if($llogin > 15) 313 { 314 $lastlogin = '<font color="#FF8000">'.$llogin.'</font>'; 315 } 316 if($llogin > 30) 317 { 318 $lastlogin = '<font color="#FF0000">'.$llogin.'</font>'; 319 } 320 if($llogin > 60) 321 { 322 $lastlogin = '<font color="#FF00FF">'.$llogin.'</font>'; 323 } 324 if($llogin > 90) 325 { 326 $lastlogin = '<font color="#8000FF">'.$llogin.'</font>'; 327 } 328 329 $output .= " <tr>"; 330 if ($user_lvl > 2){ 331 $output .= " <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>"; 332 } 333 $output .= " <td><a href=\"char.php?id=$member[0]\">$member[2]</a></td> 334 <td><img src='img/c_icons/{$online[0]}-{$online[6]}.gif' onmousemove='toolTip(\"".get_player_race($online[0])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td> 335 <td><img src='img/c_icons/{$online[1]}.gif' onmousemove='toolTip(\"".get_player_class($online[1])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td> 336 <td>$lev</td> 337 <td>$member[4] ($member[1])</td> 338 <td>$member[5]</td> 339 <td>$member[6]</td> 340 <td>$lastlogin</td> 341 <td>".(($online[2]) ? "<img src=\"img/up.gif\" alt=\"\" />" : "-")."</td> 342 </tr>"; 343 } 344 345 346 $output .= "</table><br />"; 347 $sql->close(); 348 349 $output .= "<table class=\"hidden\"> 364 $q_amIguildleader = $sql->query("select 1 from guild where guildid = '$id' and leaderguid in (select guid from characters where account = '$user_id')"); 365 $amIguildleader = $sql->result($q_amIguildleader, 0, '1'); 366 367 if ($user_lvl <= 4 && !$amIguildleader) redirect("guild.php?error=6"); 368 369 $output .= "<center><h1><font class=\"error\">{$lang_global['are_you_sure']}</font></h1><br /> 370 <font class=\"bold\">{$lang_guild['guild_id']}: $id {$lang_global['will_be_erased']}</font><br /><br /> 371 <form action=\"cleanup.php?action=docleanup\" method=\"post\" name=\"form\"> 372 <input type=\"hidden\" name=\"type\" value=\"guild\" /> 373 <input type=\"hidden\" name=\"check\" value=\"-$id\" /> 374 <input type=\"hidden\" name=\"override\" value=\"1\" /> 375 <table class=\"hidden\"> 350 376 <tr><td>"; 351 makebutton($lang_guild['guilds'], "guild.php", 272); 352 $output .= "</td> 353 <td>"; 354 if ($user_lvl > 2){ 355 makebutton($lang_guild['del_guild'], "guild.php?action=del_guild&id=$guild_id", 272); 356 $output .= "</td></tr> 357 <tr><td colspan=\"2\">"; 358 makebutton($lang_global['back'], "javascript:window.history.back()",556); 359 $output .= "</td></tr>"; 360 } else { 361 makebutton($lang_global['back'], "javascript:window.history.back()",272); 362 $output .= "</td></tr>"; 363 } 364 365 $output .= "</table> 366 </fieldset></center><br />"; 367 } 368 369 //######################################################################################################################## 370 // ARE YOU SURE YOU WOULD LIKE TO OPEN YOUR AIRBAG? 371 //######################################################################################################################## 372 function del_guild() { 373 global $lang_guild, $lang_global, $output; 374 if(isset($_GET['id'])) $id = $_GET['id']; 375 else redirect("guild.php?error=1"); 376 377 $output .= "<center><h1><font class=\"error\">{$lang_global['are_you_sure']}</font></h1><br /> 378 <font class=\"bold\">{$lang_guild['guild_id']}: $id {$lang_global['will_be_erased']}</font><br /><br /> 379 <form action=\"cleanup.php?action=docleanup\" method=\"post\" name=\"form\"> 380 <input type=\"hidden\" name=\"type\" value=\"guild\" /> 381 <input type=\"hidden\" name=\"check\" value=\"-$id\" /> 382 <table class=\"hidden\"> 383 <tr><td>"; 384 makebutton($lang_global['yes'], "javascript:do_submit()",120); 385 makebutton($lang_global['no'], "guild.php?action=view_guild&id=$id",120); 377 makebutton($lang_global['yes'], "javascript:do_submit()",120); 378 makebutton($lang_global['no'], "guild.php?action=view_guild&id=$id",120); 386 379 $output .= "</td></tr> 387 380 </table> 388 </form></center><br />"; 381 </form></center><br />"; 382 383 $sql->close(); 389 384 } 390 385 … … 393 388 //REMOVE CHAR FROM GUILD 394 389 function rem_char_from_guild(){ 395 global $characters_db, $realm_id, $user_lvl; 396 397 require_once("scripts/defines.php"); 398 399 if(isset($_GET['id'])) $guid = $_GET['id']; 400 else redirect("guild.php?error=1"); 401 if(isset($_GET['guld_id'])) $guld_id = $_GET['guld_id']; 402 else redirect("guild.php?error=1"); 403 404 $sql = new SQL; 405 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 406 407 $char_data = $sql->query("SELECT data FROM `characters` WHERE guid = '$guid' LIMIT 1"); 408 $data = $sql->result($char_data, 0, 'data'); 409 $data = explode(' ',$data); 410 $data[CHAR_DATA_OFFSET_GUILD_ID] = 0; 411 $data[CHAR_DATA_OFFSET_GUILD_RANK] = 0; 412 $data = implode(' ',$data); 413 $sql->query("UPDATE `characters` SET data = '$data' WHERE guid = '$guid'"); 414 $sql->query("DELETE FROM guild_member WHERE guid = '$guid'"); 415 416 $sql->close(); 417 redirect("guild.php?action=view_guild&id=$guld_id"); 390 global $characters_db, $realm_id, $user_lvl, $user_id; 391 392 require_once("scripts/defines.php"); 393 394 if(isset($_GET['id'])) $guid = $_GET['id']; 395 else redirect("guild.php?error=1"); 396 if (!preg_match('/^[[:digit:]]{1,12}$/', $guid)) redirect("guild.php?error=5"); 397 if(isset($_GET['guld_id'])) $guld_id = $_GET['guld_id']; 398 else redirect("guild.php?error=1"); 399 if (!preg_match('/^[[:digit:]]{1,12}$/', $guld_id)) redirect("guild.php?error=5"); 400 401 $sql = new SQL; 402 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 403 404 $q_amIguildleaderOrSelfRemoval = $sql->query("select 1 from guild as g 405 left outer join guild_member as gm on gm.guildid = g.guildid 406 where g.guildid = '$guld_id' and 407 (g.leaderguid in (select guid from characters where account = '$user_id') or gm.guid in (select guid from characters where account = '$user_id' and guid = '$guid'))"); 408 409 $amIguildleaderOrSelfRemoval = $sql->result($q_amIguildleaderOrSelfRemoval, 0, '1'); 410 411 if ($user_lvl <= 4 && !$amIguildleaderOrSelfRemoval ) redirect("guild.php?error=6"); 412 413 $char_data = $sql->query("SELECT data FROM `characters` WHERE guid = '$guid'"); 414 $data = $sql->result($char_data, 0, 'data'); 415 $data = explode(' ',$data); 416 $data[CHAR_DATA_OFFSET_GUILD_ID] = 0; 417 $data[CHAR_DATA_OFFSET_GUILD_RANK] = 0; 418 $data = implode(' ',$data); 419 $sql->query("UPDATE `characters` SET data = '$data' WHERE guid = '$guid'"); 420 $sql->query("DELETE FROM guild_member WHERE guid = '$guid'"); 421 422 $sql->close(); 423 redirect("guild.php?action=view_guild&id=$guld_id"); 418 424 } 419 425 … … 426 432 switch ($err) { 427 433 case 1: 428 $output .= "<h1><font class=\"error\">{$lang_global['e mpty_fields']}</font></h1>";434 $output .= "<h1><font class=\"error\">{$lang_global['err_empty_fields']}</font></h1>"; 429 435 break; 430 436 case 2: … … 436 442 $output .= "<h1>{$lang_guild['guild_search_result']}:</h1>"; 437 443 break; 444 case 5: 445 $output .= "<h1>{$lang_global['err_invalid_input']}:</h1>"; 446 break; 447 case 6: 448 $output .= "<h1>{$lang_global['err_no_permission']}:</h1>"; 449 break; 438 450 default: //no error 439 451 $output .= "<h1>{$lang_guild['browse_guilds']}</h1>"; … … 447 459 browse_guilds(); 448 460 break; 449 case "search":450 search();451 break;452 461 case "view_guild": 453 462 view_guild(); -
minimanager/header.php
r142 r374 29 29 require_once("lang/$lang.php"); 30 30 require_once("scripts/global_lib.php"); 31 require_once("scripts/id_tab.php"); 31 32 32 33 //application/xhtml+xml 33 34 $output .= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> 34 <html >35 <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\"> 35 36 <head> 36 37 <title>$title</title> 37 <meta http-equiv=\"Content-Type\" content=\"text/html; charset= $site_encoding\" />38 < link rel=\"stylesheet\" type=\"text/css\" href=\"templates/".$css_template."/".$css_template."_1024.css\" title=\"default\" />38 <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /> 39 <meta http-equiv=\"Content-Type\" content=\"text/javascript; charset=utf-8\" /> 39 40 <link rel=\"stylesheet\" type=\"text/css\" href=\"templates/".$css_template."/".$css_template."_1024.css\" title=\"1024\" /> 40 41 <link rel=\"stylesheet\" type=\"text/css\" href=\"templates/".$css_template."/".$css_template."_1280.css\" title=\"1280\" /> 42 <link rel=\"SHORTCUT ICON\" href=\"img/favicon.ico\" /> 43 <script type=\"text/javascript\" charset=\"utf-8\"></script> 44 <script src=\"js/general.js\"></script> 45 <script src=\"js/layout.js\"></script> 46 <script src=\"$tt_scrip\"></script> 41 47 42 <link rel=\"SHORTCUT ICON\" href=\"img/favicon.ico\" />43 <script type=\"text/javascript\" src=\"js/general.js\"></script>44 <script type=\"text/javascript\" src=\"js/layout.js\"></script>45 48 <!--[if lte IE 7]> 46 49 <style> … … 77 80 $realm_id = (isset($_GET['r_id'])) ? addslashes($_GET['r_id']) : $_SESSION['realm_id']; 78 81 82 $user_lvl_name = get_gm_level($user_lvl); 83 79 84 //override PHP error reporting 80 85 if ($debug) error_reporting (E_ALL); … … 90 95 if(!isset($menu_array[$user_lvl])) error("Wrong menu_array configuration.<br />Level $user_lvl menu missing..."); 91 96 92 foreach ($menu_array[$user_lvl][1] as $trunk){ 93 $output .= "<li><a href=\"{$trunk[0]}\">{$lang_header[$trunk[1]]}</a>"; 94 if(isset($trunk[2][0])) $output .= "<ul>"; 95 foreach ($trunk[2] as $branch){ 96 $output .= "<li><a href=\"{$branch[0]}\">{$lang_header[$branch[1]]}</a></li>"; 97 } 98 if(isset($trunk[2][0])) $output .= "</ul>"; 99 $output .= "</li>"; 100 } 97 // get file we are executing 98 $array = explode ( '/', $_SERVER['PHP_SELF']); 99 $lookup_file = $array[sizeof($array)-1]; 100 101 foreach ($menu_array as $trunk){ 102 if ($trunk[1] != "invisible") // ignore "invisible array" this is for setting security read/write values for not accessible elements not in the navbar! 103 { 104 $output .= "<li><a href=\"{$trunk[0]}\">{$lang_header[$trunk[1]]}</a>"; 105 if(isset($trunk[2][0])) $output .= "<ul>"; 106 foreach ($trunk[2] as $branch){ 107 108 if($branch[0] == $lookup_file) 109 { 110 $action_permission['read'] = $branch[2]; 111 $action_permission['update'] = $branch[3]; 112 $action_permission['insert'] = $branch[4]; 113 $action_permission['delete'] = $branch[5]; 114 } 115 116 if ( $user_lvl >= $branch[2] ) 117 $output .= "<li><a href=\"{$branch[0]}\">{$lang_header[$branch[1]]}</a></li>"; 118 } 119 if(isset($trunk[2][0])) $output .= "</ul>"; 120 $output .= "</li>"; 121 } 122 else 123 { 124 foreach ($trunk[2] as $branch){ 125 126 if($branch[0] == $lookup_file) 127 $action_permission['read']=$branch[2]; 128 } 129 } 130 131 } 132 133 // secure non secure settings 134 // some pages don't have security yet, because they dont use header.php... like pomm.php and login.php 135 if(!isset($action_permission['read'])) $action_permission['read'] = 3; 136 if(!isset($action_permission['update']) || $action_permission['update'] < $action_permission['read'] ) $action_permission['update'] = $action_permission['read']; 137 if(!isset($action_permission['insert']) || $action_permission['insert'] < $action_permission['update'] ) $action_permission['insert'] = $action_permission['update']; 138 if(!isset($action_permission['delete']) || $action_permission['delete'] < $action_permission['insert'] ) $action_permission['delete'] = $action_permission['insert']; 101 139 102 140 $output .= "<li><a class=\"trigger\" href=\"edit.php\">{$lang_header['my_acc']}</a> … … 117 155 </div></td> 118 156 <td class=\"table_top_middle\"> 119 <div id=\"username\">$user_name .:{$ menu_array[$user_lvl][0]}'s {$lang_header['menu']}:.</div></td>157 <div id=\"username\">$user_name .:{$user_lvl_name}'s {$lang_header['menu']}:.</div></td> 120 158 <td class=\"table_top_right\"></td> 121 159 </tr> -
minimanager/honor.php
r307 r374 10 10 11 11 require_once("header.php"); 12 valid_login( 0);12 valid_login($action_permission['read']); 13 13 require_once("scripts/get_lib.php"); 14 14 require_once("scripts/defines.php"); … … 69 69 $guild_name = $sql->fetch_row($sql->query("SELECT `name` FROM `guild` WHERE `guildid`=".$char[6].";")); 70 70 71 $level = $char[5];71 $level = $char[5]; 72 72 73 $lev = '' ; 74 if($level > 0) 75 { 76 $lev = '<font color="#FFFFFF">'.$level.'</font>'; 77 } 78 if($level > 9) 79 { 80 $lev = '<font color="#858585">'.$level.'</font>'; 81 } 82 if($level > 19) 83 { 84 $lev = '<font color="#339900">'.$level.'</font>'; 85 } 86 if($level > 29) 87 { 88 $lev = '<font color="#3300CC">'.$level.'</font>'; 89 } 90 if($level > 39) 91 { 92 $lev = '<font color="#5552FF">'.$level.'</font>'; 93 } 94 if($level > 49) 95 { 96 $lev = '<font color="#FF8000">'.$level.'</font>'; 97 } 98 if($level > 59) 99 { 100 $lev = '<font color="#FF0000">'.$level.'</font>'; 101 } 102 if($level > 69) 103 { 104 $lev = '<font color="#FF00CC">'.$level.'</font>'; 105 } 106 if($level > 70) 107 { 108 $lev = '<font color="#FFF000">'.$level.'</font>'; 109 } 110 111 73 if($level < 10) 74 $lev = '<font color="#FFFFFF">'.$level.'</font>'; 75 else if($level < 20) 76 $lev = '<font color="#858585">'.$level.'</font>'; 77 else if($level < 30) 78 $lev = '<font color="#339900">'.$level.'</font>'; 79 else if($level < 40) 80 $lev = '<font color="#3300CC">'.$level.'</font>'; 81 else if($level < 50) 82 $lev = '<font color="#C552FF">'.$level.'</font>'; 83 else if($level < 60) 84 $lev = '<font color="#FF8000">'.$level.'</font>'; 85 else if($level < 70) 86 $lev = '<font color="#FFF280">'.$level.'</font>'; 87 else if($level < 80) 88 $lev = '<font color="#FF0000">'.$level.'</font>'; 89 else 90 $lev = '<font color="#000000">'.$level.'</font>'; 112 91 113 92 $output .= " <tr> … … 165 144 $guild_name = $sql->fetch_row($sql->query("SELECT `name` FROM `guild` WHERE `guildid`=".$char[6].";")); 166 145 167 $level = $char[5];146 $level = $char[5]; 168 147 169 if($level > 0) 170 { 171 $lev = '<font color="#FFFFFF">'.$level.'</font>'; 172 } 173 if($level > 9) 174 { 175 $lev = '<font color="#858585">'.$level.'</font>'; 176 } 177 if($level > 19) 178 { 179 $lev = '<font color="#339900">'.$level.'</font>'; 180 } 181 if($level > 29) 182 { 183 $lev = '<font color="#3300CC">'.$level.'</font>'; 184 } 185 if($level > 39) 186 { 187 $lev = '<font color="#5552FF">'.$level.'</font>'; 188 } 189 if($level > 49) 190 { 191 $lev = '<font color="#FF8000">'.$level.'</font>'; 192 } 193 if($level > 59) 194 { 195 $lev = '<font color="#FF0000">'.$level.'</font>'; 196 } 197 if($level > 69) 198 { 199 $lev = '<font color="#FF00CC">'.$level.'</font>'; 200 } 201 if($level > 70) 202 { 203 $lev = '<font color="#FFF000">'.$level.'</font>'; 204 } 148 if($level < 10) 149 $lev = '<font color="#FFFFFF">'.$level.'</font>'; 150 else if($level < 20) 151 $lev = '<font color="#858585">'.$level.'</font>'; 152 else if($level < 30) 153 $lev = '<font color="#339900">'.$level.'</font>'; 154 else if($level < 40) 155 $lev = '<font color="#3300CC">'.$level.'</font>'; 156 else if($level < 50) 157 $lev = '<font color="#C552FF">'.$level.'</font>'; 158 else if($level < 60) 159 $lev = '<font color="#FF8000">'.$level.'</font>'; 160 else if($level < 70) 161 $lev = '<font color="#FFF280">'.$level.'</font>'; 162 else if($level < 80) 163 $lev = '<font color="#FF0000">'.$level.'</font>'; 164 else 165 $lev = '<font color="#000000">'.$level.'</font>'; 205 166 206 167 $output .= " <tr> -
minimanager/index.php
r307 r374 16 16 17 17 $sql = new SQL; 18 19 18 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 20 19 21 20 $output .= "<div class=\"top\">"; 22 if (test_port($server[$realm_id]['addr'],$server[$realm_id]['game_port'])) { 23 24 25 /* $query = $sql->query("SELECT uptime FROM uptime ORDER BY starttime DESC LIMIT 1"); 26 * $uptime = $sql->result($query, 0); 27 * $output .= "<h1><font color=\"#55aa55\">{$lang_index['realm']} ".get_realm_name($realm_id)." {$lang_index['online']} : (".(int)($uptime/60/60/24)."D : ".(($uptime/60/60 >= 24 )?(int)($uptime/60/60-24*(int)($uptime/60/60/24)):(int)($uptime/60/60))."H : ".(($uptime/60 >= 60 )?(int)($uptime/60-60*(int)($uptime/60/60)):(int)($uptime/60))."M : ".(($uptime >= 60 )?(int)($uptime-60*(int)($uptime/60)):(int)$uptime)."S)</font></h1>"; 28 */ 21 22 if (test_port($server[$realm_id]['addr'],$server[$realm_id]['game_port'])) 23 { 29 24 $query = $sql->query("SELECT `starttime` FROM `uptime` ORDER BY `starttime` DESC LIMIT 1"); 30 25 $getuptime = mysql_fetch_row($query); 31 $uptimetime = time() - $getuptime[0]; 32 $uptime = array( 33 'd' => $uptimetime / 86400 % 7, 34 'h' => $uptimetime / 3600 % 24, 35 'm' => $uptimetime / 60 % 60, 36 's' => $uptimetime / 1 % 60, 37 ); 38 if ($uptime[d] < 2) { 39 $sd = ""; } 40 else { 41 $sd = "s"; } 42 43 if ($uptime[h] < 2) { 44 $sh = ""; } 45 else { 46 $sh = "s"; } 47 48 if ($uptime[m] < 2) { 49 $sm = ""; } 50 else { 51 $sm = "s"; } 52 53 if ($uptime[s] < 2) { 54 $ss = ""; } 55 else { 56 $ss = "s"; } 57 58 if ($uptime[d] > 0) { 59 $output .= "<h1><font color=\"#55aa55\">{$lang_index['realm']} ".get_realm_name($realm_id)." {$lang_index['online']} for " . $uptime[d] . " day$sd " . $uptime[h] . " hour$sh " . $uptime[m] . " minute$sm and " . $uptime[s] . " second$ss.</font></h1>"; 60 } else { 61 if ($uptime[h] > 0) { 62 $output .= "<h1><font color=\"#55aa55\">{$lang_index['realm']} ".get_realm_name($realm_id)." {$lang_index['online']} for " . $uptime[h] . " hour$sh " . $uptime[m] . " minute$sm and " . $uptime[s] . " second$ss.</font></h1>"; 63 } else { 64 $output .= "<h1><font color=\"#55aa55\">{$lang_index['realm']} ".get_realm_name($realm_id)." {$lang_index['online']} for " . $uptime[m] . " minute$sm and " . $uptime[s] . " second$ss.</font></h1>"; 65 } 66 } 67 68 $online = true; 69 } else { 70 $output .= "<h1><font class=\"error\">{$lang_index['realm']} ".get_realm_name($realm_id)." {$lang_index['offline_or_let_high']}</font></h1>"; 71 $online = false; 72 } 73 /*$output .= "Mangos: {$server[$realm_id]['rev']} Using DB: {$mangos_db[$realm_id]['db_rev']}</div>";*/ 74 // This retrieves the actual database version from the database itself, instead of hardcoding it into a string 75 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 76 $query_db_version = $sql->query("SELECT version FROM db_version"); 77 $db_rev = $sql->result($query_db_version, 0); 26 $uptimetime = time() - $getuptime[0]; 27 $uptime = array 28 ( 29 'd' => $uptimetime / 86400 % 7, 30 'h' => $uptimetime / 3600 % 24, 31 'm' => $uptimetime / 60 % 60, 32 's' => $uptimetime / 1 % 60, 33 ); 34 35 if ($uptime['d'] < 2) $sd = ""; else $sd = "s"; 36 if ($uptime['h'] < 2) $sh = ""; else $sh = "s"; 37 if ($uptime['m'] < 2) $sm = ""; else $sm = "s"; 38 if ($uptime['s'] < 2) $ss = ""; else $ss = "s"; 39 40 if ($uptime['d'] > 0) 41 $output .= "<h1><font color=\"#55aa55\">{$lang_index['realm']} ".get_realm_name($realm_id)." {$lang_index['online']} for " . $uptime['d'] . " day$sd " . $uptime['h'] . " hour$sh " . $uptime['m'] . " minute$sm and " . $uptime['s'] . " second$ss.</font></h1>"; 42 else 43 { 44 if ($uptime['h'] > 0) 45 $output .= "<h1><font color=\"#55aa55\">{$lang_index['realm']} ".get_realm_name($realm_id)." {$lang_index['online']} for " . $uptime['h'] . " hour$sh " . $uptime['m'] . " minute$sm and " . $uptime['s'] . " second$ss.</font></h1>"; 46 else 47 $output .= "<h1><font color=\"#55aa55\">{$lang_index['realm']} ".get_realm_name($realm_id)." {$lang_index['online']} for " . $uptime['m'] . " minute$sm and " . $uptime['s'] . " second$ss.</font></h1>"; 48 } 49 50 $online = true; 51 } 52 else 53 { 54 $output .= "<h1><font class=\"error\">{$lang_index['realm']} ".get_realm_name($realm_id)." {$lang_index['offline_or_let_high']}</font></h1>"; 55 $online = false; 56 } 57 58 // This retrieves the actual database version from the database itself, instead of hardcoding it into a string 59 $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 60 $query_db_version = $sql->query("SELECT version FROM db_version"); 61 $db_rev = $sql->result($query_db_version, 0); 78 62 $output .= "Mangos: {$server[$realm_id]['rev']} Using DB: $db_rev</div>"; 79 80 63 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 81 64 $sql->db($characters_db[$realm_id]['name']); … … 97 80 <th align=\"right\">"; 98 81 if ($user_lvl) $output .= "<a href=\"motd.php?action=add_motd\">{$lang_index['add_motd']}</a>"; 99 $output .= "</td></tr>"; 100 if($all_record){ 82 $output .= "</tr>"; 83 84 if($all_record) 85 { 101 86 $result = $sql->query("SELECT id, type, content FROM bugreport ORDER BY id DESC LIMIT $start, 3"); 102 87 while($post = $sql->fetch_row($result)){ … … 114 99 115 100 //print online chars 116 if ($online){ 101 if ($online) 102 { 117 103 $order_by = (isset($_GET['order_by'])) ? $sql->quote_smart($_GET['order_by']) : "name"; 118 104 … … 123 109 $result = $sql->query("SELECT count(*) FROM `characters` WHERE `online`= 1"); 124 110 $total_online = $sql->result($result, 0); 125 126 if( !$user_lvl && !$server[$realm_id]['both_factions']){ 111 112 $order_side = ""; 113 if( !$user_lvl && !$server[$realm_id]['both_factions']) 114 { 127 115 $result = $sql->query("SELECT race FROM `characters` WHERE account = '$user_id' AND totaltime = (SELECT MAX(totaltime) FROM `characters` WHERE account = '$user_id') LIMIT 1"); 128 if ($sql->num_rows($result)){ 116 if ($sql->num_rows($result)) 117 { 129 118 $order_side = (in_array($sql->result($result, 0, 'race'),array(2,5,6,8,10))) ? 130 119 " AND race IN (2,5,6,8,10) " : " AND race IN (1,3,4,7,11) "; 131 } else $order_side = "";132 } else $order_side = "";120 } 121 } 133 122 134 123 require_once("scripts/defines.php"); 135 124 136 125 $result = $sql->query("SELECT guid,name,race,class,zone,map, 137 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_POINTS+1)."), ' ', -1) AS UNSIGNED) AS highest_rank, 138 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1) AS UNSIGNED) AS level,account, 139 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_GUILD_ID+1)."), ' ', -1) AS UNSIGNED) as GNAME, 140 mid(lpad( hex( CAST(substring_index(substring_index(data,' ',".(36+1)."),' ',-1) as unsigned) ),8,'0'),4,1) as gender 141 FROM `characters` WHERE `online`= 1 $order_side ORDER BY $order_by $order_dir"); 126 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_HONOR_POINTS+1)."), ' ', -1) AS UNSIGNED) AS highest_rank, 127 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_LEVEL+1)."), ' ', -1) AS UNSIGNED) AS level, 128 account, 129 CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', ".(CHAR_DATA_OFFSET_GUILD_ID+1)."), ' ', -1) AS UNSIGNED) as GNAME, 130 mid(lpad( hex( CAST(substring_index(substring_index(data,' ',".(36+1)."),' ',-1) as unsigned) ),8,'0'),4,1) as gender 131 FROM `characters` WHERE `online`= 1 $order_side ORDER BY $order_by $order_dir"); 142 132 143 133 $output .= " … … 149 139 <th width=\"5%\"><a href=\"index.php?order_by=class&dir=$dir\"".($order_by=='class' ? " class=\"$order_dir\"" : "").">{$lang_index['class']}</a></th> 150 140 <th width=\"5%\"><a href=\"index.php?order_by=level&dir=$dir\"".($order_by=='level' ? " class=\"$order_dir\"" : "").">{$lang_index['level']}</a></th> 151 <th width=\"5%\"><a href=\"index.php?order_by=highest_rank&dir=$dir\"".($order_by=='highest_rank' ? " class=\"$order_dir\"" : "").">Rank</a></th>152 <th width=\"15%\"><a href=\"index.php?order_by=GNAME&dir=$dir\"".($order_by=='GNAME' ? " class=\"$order_dir\"" : "").">Guild</a></th>141 <th width=\"5%\"><a href=\"index.php?order_by=highest_rank&dir=$dir\"".($order_by=='highest_rank' ? " class=\"$order_dir\"" : "").">{$lang_index['rank']}</a></th> 142 <th width=\"15%\"><a href=\"index.php?order_by=GNAME&dir=$dir\"".($order_by=='GNAME' ? " class=\"$order_dir\"" :"").">{$lang_index['guild']}</a></th> 153 143 <th width=\"20%\"><a href=\"index.php?order_by=map&dir=$dir\"".($order_by=='map' ? " class=\"$order_dir\"" : "").">{$lang_index['map']}</a></th> 154 <th width=\"25%\"> {$lang_index['zone']}</th>144 <th width=\"25%\"><a href=\"index.php?order_by=zone&dir=$dir\"".($order_by=='zone' ? " class=\"$order_dir\"" : "").">{$lang_index['zone']}</th> 155 145 </tr>"; 156 146 157 147 require_once("scripts/id_tab.php"); 158 148 159 while($char = $sql->fetch_row($result)){ 160 161 //$guild_name = 'dummy'; 162 $accid = $char[8]; 149 while ($char = $sql->fetch_row($result)) 150 { 151 $accid = $char[8]; 163 152 164 153 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 165 //$sql->db($realm_db['name']); 166 $gmlvl = $sql->query("SELECT `gmlevel` FROM `account`WHERE `id`='$accid';"); 154 $gmlvl = $sql->query("SELECT `gmlevel` FROM `account` WHERE `id`=$accid"); 167 155 $gml = $sql->fetch_row($gmlvl); 168 156 $gm = $gml[0]; 169 157 170 158 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 171 //$sql->db($characters_db[$realm_id]['name']); 172 $guild_name = $sql->fetch_row($sql->query("SELECT `name` FROM `guild` WHERE `guildid`=".$char[9].";")); 173 174 175 $level = $char[7]; 176 177 if($level > 0) 178 { 179 $lev = '<font color="#FFFFFF">'.$level.'</font>'; 180 } 181 if($level > 9) 182 { 183 $lev = '<font color="#858585">'.$level.'</font>'; 184 } 185 if($level > 19) 186 { 187 $lev = '<font color="#339900">'.$level.'</font>'; 188 } 189 if($level > 29) 190 { 191 $lev = '<font color="#3300CC">'.$level.'</font>'; 192 } 193 if($level > 39) 194 { 195 $lev = '<font color="#5552FF">'.$level.'</font>'; 196 } 197 if($level > 49) 198 { 199 $lev = '<font color="#FF8000">'.$level.'</font>'; 200 } 201 if($level > 59) 202 { 203 $lev = '<font color="#FF0000">'.$level.'</font>'; 204 } 205 if($level > 69) 206 { 207 $lev = '<font color="#FF00CC">'.$level.'</font>'; 208 } 209 if($level > 70) 210 { 211 $lev = '<font color="#FFF000">'.$level.'</font>'; 212 } 159 $guild_name = $sql->fetch_row($sql->query("SELECT `name` FROM `guild` WHERE `guildid`={$char[9]}")); 160 161 162 $level = $char[7]; 163 164 if($level < 10) 165 $lev = '<font color="#FFFFFF">'.$level.'</font>'; 166 else if($level < 20) 167 $lev = '<font color="#858585">'.$level.'</font>'; 168 else if($level < 30) 169 $lev = '<font color="#339900">'.$level.'</font>'; 170 else if($level < 40) 171 $lev = '<font color="#3300CC">'.$level.'</font>'; 172 else if($level < 50) 173 $lev = '<font color="#C552FF">'.$level.'</font>'; 174 else if($level < 60) 175 $lev = '<font color="#FF8000">'.$level.'</font>'; 176 else if($level < 70) 177 $lev = '<font color="#FFF280">'.$level.'</font>'; 178 else if($level < 80) 179 $lev = '<font color="#FF0000">'.$level.'</font>'; 180 else 181 $lev = '<font color="#000000">'.$level.'</font>'; 213 182 214 183 $output .= "<tr> 215 184 <td><a href=\"char.php?id=$char[0]\"><span onmousemove='toolTip(\"".get_player_user_level($gm)."\",\"item_tooltip\")' onmouseout='toolTip()'>$char[1]</span></a></td> 216 185 <td><img src='img/c_icons/{$char[2]}-{$char[10]}.gif' onmousemove='toolTip(\"".get_player_race($char[2])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td> 217 186 <td><img src='img/c_icons/{$char[3]}.gif' onmousemove='toolTip(\"".get_player_class($char[3])."\",\"item_tooltip\")' onmouseout='toolTip()' /></td> 218 187 <td>$lev</td> -
minimanager/instances.php
r308 r374 3 3 require_once("header.php"); 4 4 require_once("scripts/id_tab.php"); 5 valid_login( 0);5 valid_login($action_permission['read']); 6 6 7 7 /*--------------------------------------------------*/ -
minimanager/irc.php
r5 r374 10 10 11 11 require_once("header.php"); 12 valid_login( 0);12 valid_login($action_permission['read']); 13 13 14 14 $output .= "<center><br /> -
minimanager/item.php
r307 r374 9 9 */ 10 10 require_once("header.php"); 11 valid_login($action_permission['read']); 11 12 require_once("scripts/itemset_tab.php"); 12 13 require_once("scripts/get_lib.php"); 13 valid_login(1);14 14 15 15 function makeinfocell($text,$tooltip){ … … 564 564 <td>".makeinfocell($lang_item_edit['sell_price'],$lang_item_edit['sell_price_desc'])."</td> 565 565 <td><input type=\"text\" name=\"SellPrice\" size=\"8\" maxlength=\"30\" value=\"0\" /></td> 566 567 <td>".makeinfocell($lang_item_edit['extended_cost'],$lang_item_edit['extended_cost_desc'])."</td> 568 <td><input type=\"text\" name=\"ExtendedCost\" size=\"8\" maxlength=\"10\" value=\"0\" /></td> 566 <td></td><td></td> 569 567 </tr> 570 568 … … 1195 1193 $entry = $sql->quote_smart($_GET['entry']); 1196 1194 $deplang = get_lang_id(); 1197 $result = $sql->query("SELECT `item_template`.`entry`,`class`,`subclass`,`unk0`,IFNULL(".($deplang<>0?"name_loc$deplang":"NULL").",`name`) as name,`displayid`,`Quality`,`Flags`,`BuyCount`,`BuyPrice`,`SellPrice`,`InventoryType`,`AllowableClass`,`AllowableRace`,`ItemLevel`,`RequiredLevel`,`RequiredSkill`,`RequiredSkillRank`,`requiredspell`,`requiredhonorrank`,`RequiredCityRank`,`RequiredReputationFaction`,`RequiredReputationRank`,`maxcount`,`stackable`,`ContainerSlots`,`stat_type1`,`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`,`stat_value9`,`stat_type10`,`stat_value10`,`dmg_min1`,`dmg_max1`,`dmg_type1`,`dmg_min2`,`dmg_max2`,`dmg_type2`,`dmg_min3`,`dmg_max3`,`dmg_type3`,`dmg_min4`,`dmg_max4`,`dmg_type4`,`dmg_min5`,`dmg_max5`,`dmg_type5`,`armor`,`holy_res`,`fire_res`,`nature_res`,`frost_res`,`shadow_res`,`arcane_res`,`delay`,`ammo_type`,`RangedModRange`,`spellid_1`,`spelltrigger_1`,`spellcharges_1`,`spellppmRate_1`,`spellcooldown_1`,`spellcategory_1`,`spellcategorycooldown_1`,`spellid_2`,`spelltrigger_2`,`spellcharges_2`,`spellppmRate_2`,`spellcooldown_2`,`spellcategory_2`,`spellcategorycooldown_2`,`spellid_3`,`spelltrigger_3`,`spellcharges_3`,`spellppmRate_3`,`spellcooldown_3`,`spellcategory_3`,`spellcategorycooldown_3`,`spellid_4`,`spelltrigger_4`,`spellcharges_4`,`spellppmRate_4`,`spellcooldown_4`,`spellcategory_4`,`spellcategorycooldown_4`,`spellid_5`,`spelltrigger_5`,`spellcharges_5`,`spellppmRate_5`,`spellcooldown_5`,`spellcategory_5`,`spellcategorycooldown_5`,`bonding`,`description`,`PageText`,`LanguageID`,`PageMaterial`,`startquest`,`lockid`,`Material`,`sheath`,`RandomProperty`,`RandomSuffix`,`block`,`itemset`,`MaxDurability`,`area`,`Map`,`BagFamily`,`TotemCategory`,`socketColor_1`,`socketContent_1`,`socketColor_2`,`socketContent_2`,`socketColor_3`,`socketContent_3`,`socketBonus`,`GemProperties`,` ExtendedCost`,`RequiredArenaRank`,`RequiredDisenchantSkill`,`ArmorDamageModifier`,`ScriptName`,`DisenchantID`,`FoodType`,`minMoneyLoot`,`maxMoneyLoot` FROM item_template LEFT JOIN locales_item ON item_template.entry = locales_item.entry WHERE item_template.entry = '$entry'");1195 $result = $sql->query("SELECT `item_template`.`entry`,`class`,`subclass`,`unk0`,IFNULL(".($deplang<>0?"name_loc$deplang":"NULL").",`name`) as name,`displayid`,`Quality`,`Flags`,`BuyCount`,`BuyPrice`,`SellPrice`,`InventoryType`,`AllowableClass`,`AllowableRace`,`ItemLevel`,`RequiredLevel`,`RequiredSkill`,`RequiredSkillRank`,`requiredspell`,`requiredhonorrank`,`RequiredCityRank`,`RequiredReputationFaction`,`RequiredReputationRank`,`maxcount`,`stackable`,`ContainerSlots`,`stat_type1`,`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`,`stat_value9`,`stat_type10`,`stat_value10`,`dmg_min1`,`dmg_max1`,`dmg_type1`,`dmg_min2`,`dmg_max2`,`dmg_type2`,`dmg_min3`,`dmg_max3`,`dmg_type3`,`dmg_min4`,`dmg_max4`,`dmg_type4`,`dmg_min5`,`dmg_max5`,`dmg_type5`,`armor`,`holy_res`,`fire_res`,`nature_res`,`frost_res`,`shadow_res`,`arcane_res`,`delay`,`ammo_type`,`RangedModRange`,`spellid_1`,`spelltrigger_1`,`spellcharges_1`,`spellppmRate_1`,`spellcooldown_1`,`spellcategory_1`,`spellcategorycooldown_1`,`spellid_2`,`spelltrigger_2`,`spellcharges_2`,`spellppmRate_2`,`spellcooldown_2`,`spellcategory_2`,`spellcategorycooldown_2`,`spellid_3`,`spelltrigger_3`,`spellcharges_3`,`spellppmRate_3`,`spellcooldown_3`,`spellcategory_3`,`spellcategorycooldown_3`,`spellid_4`,`spelltrigger_4`,`spellcharges_4`,`spellppmRate_4`,`spellcooldown_4`,`spellcategory_4`,`spellcategorycooldown_4`,`spellid_5`,`spelltrigger_5`,`spellcharges_5`,`spellppmRate_5`,`spellcooldown_5`,`spellcategory_5`,`spellcategorycooldown_5`,`bonding`,`description`,`PageText`,`LanguageID`,`PageMaterial`,`startquest`,`lockid`,`Material`,`sheath`,`RandomProperty`,`RandomSuffix`,`block`,`itemset`,`MaxDurability`,`area`,`Map`,`BagFamily`,`TotemCategory`,`socketColor_1`,`socketContent_1`,`socketColor_2`,`socketContent_2`,`socketColor_3`,`socketContent_3`,`socketBonus`,`GemProperties`,`RequiredDisenchantSkill`,`ArmorDamageModifier`,`ScriptName`,`DisenchantID`,`FoodType`,`minMoneyLoot`,`maxMoneyLoot` FROM item_template LEFT JOIN locales_item ON item_template.entry = locales_item.entry WHERE item_template.entry = '$entry'"); 1198 1196 1199 1197 if ($result){ … … 1480 1478 <td>".makeinfocell($lang_item_edit['sell_price'],$lang_item_edit['sell_price_desc'])."</td> 1481 1479 <td><input type=\"text\" name=\"SellPrice\" size=\"8\" maxlength=\"30\" value=\"{$item['SellPrice']}\" /></td> 1482 1483 <td>".makeinfocell($lang_item_edit['extended_cost'],$lang_item_edit['extended_cost_desc'])."</td> 1484 <td><input type=\"text\" name=\"ExtendedCost\" size=\"8\" maxlength=\"10\" value=\"{$item['ExtendedCost']}\" /></td> 1480 <td></td><td></td> 1485 1481 </tr> 1486 1482 … … 2183 2179 <th width=\"25%\">{$lang_item_edit['mob_quest_drop_chance']}</th> 2184 2180 </tr>"; 2185 $result2 = $sql->query("SELECT entry,ChanceOr Ref,QuestChanceOrGroup FROM creature_loot_template WHERE item = {$item['entry']} ORDER BY QuestChanceOrGroup,ChanceOrRefDESC LIMIT 5");2181 $result2 = $sql->query("SELECT entry,ChanceOrQuestChance,`groupid` FROM creature_loot_template WHERE item = {$item['entry']} ORDER BY `groupid`,ChanceOrQuestChance DESC LIMIT 5"); 2186 2182 while ($info = $sql->fetch_row($result2)){ 2187 2183 $result3 = $sql->query("SELECT creature_template.entry,IFNULL(".($deplang<>0?"name_loc$deplang":"NULL").",`name`) as name,maxlevel FROM creature_template LEFT JOIN locales_creature ON creature_template.entry = locales_creature.entry WHERE lootid = {$info[0]} LIMIT 1"); … … 2237 2233 $row_flag = 0; 2238 2234 $output .= "<table class=\"hidden\" align=\"center\"><tr>"; 2239 $result1 = $sql->query("SELECT item,ChanceOr Ref,QuestChanceOrGroup,mincount,maxcount,freeforall,lootcondition,condition_value1, condition_value2 FROM disenchant_loot_template WHERE entry = {$item['DisenchantID']} ORDER BY ChanceOrRefDESC");2235 $result1 = $sql->query("SELECT item,ChanceOrQuestChance,`groupid`,mincountOrRef,maxcount,lootcondition,condition_value1, condition_value2 FROM disenchant_loot_template WHERE entry = {$item['DisenchantID']} ORDER BY ChanceOrQuestChance DESC"); 2240 2236 while ($item = $sql->fetch_row($result1)){ 2241 2237 $cel_counter++; 2242 $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[' freeforall']}: $item[5]<br />{$lang_item_edit['lootcondition']}: $item[6]<br />{$lang_item_edit['condition_value1']}: $item[7]<br />{$lang_item_edit['condition_value2']}: $item[8]";2238 $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['lootcondition']}: $item[5]<br />{$lang_item_edit['condition_value1']}: $item[6]<br />{$lang_item_edit['condition_value2']}: $item[7]"; 2243 2239 $output .= "<td>"; 2244 2240 $output .= maketooltip("<img src=\"".get_icon($item[0])."\" class=\"icon_border\" alt=\"\" />", "$item_datasite$item[0]", $tooltip, "item_tooltip"); … … 2260 2256 <td><input type=\"text\" name=\"de_item\" size=\"8\" maxlength=\"10\" value=\"\" /></td> 2261 2257 <td>".makeinfocell($lang_item_edit['loot_drop_chance'],$lang_item_edit['loot_drop_chance_desc'])."</td> 2262 <td><input type=\"text\" name=\"de_ChanceOr Ref\" size=\"8\" maxlength=\"11\" value=\"0\" /></td>2258 <td><input type=\"text\" name=\"de_ChanceOrQuestChance\" size=\"8\" maxlength=\"11\" value=\"0\" /></td> 2263 2259 <td>".makeinfocell($lang_item_edit['loot_quest_drop_chance'],$lang_item_edit['loot_quest_drop_chance_desc'])."</td> 2264 <td><input type=\"text\" name=\"de_ QuestChanceOrGroup\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>2260 <td><input type=\"text\" name=\"de_groupid\" size=\"8\" maxlength=\"10\" value=\"0\" /></td> 2265 2261 </tr> 2266 2262 <tr> 2267 2263 <td>".makeinfocell($lang_item_edit['min_count'],$lang_item_edit['min_count_desc'])."</td> 2268 <td><input type=\"text\" name=\"de_mincount \" size=\"8\" maxlength=\"3\" value=\"1\" /></td>2264 <td><input type=\"text\" name=\"de_mincountOrRef\" size=\"8\" maxlength=\"3\" value=\"1\" /></td> 2269 2265 <td>".makeinfocell($lang_item_edit['max_count'],$lang_item_edit['max_count_desc'])."</td> 2270 2266 <td><input type=\"text\" name=\"de_maxcount\" size=\"8\" maxlength=\"3\" value=\"1\" /></td> 2271 <td>".makeinfocell($lang_item_edit['freeforall'],$lang_item_edit['freeforall_desc'])."</td>2272 <td><input type=\"text\" name=\"de_freeforall\" size=\"8\" maxlength=\"3\" value=\"1\" /></td>2273 2267 </tr> 2274 2268 <tr> … … 2592 2586 if (isset($_POST['GemProperties']) && $_POST['GemProperties'] != '') $GemProperties = $sql->quote_smart($_POST['GemProperties']); 2593 2587 else $GemProperties = 0; 2594 if (isset($_POST['ExtendedCost']) && $_POST['ExtendedCost'] != '') $ExtendedCost = $sql->quote_smart($_POST['ExtendedCost']);2595 else $ExtendedCost = 0;2596 2588 if (isset($_POST['ArmorDamageModifier']) && $_POST['ArmorDamageModifier'] != '') $ArmorDamageModifier = $sql->quote_smart($_POST['ArmorDamageModifier']); 2597 2589 else $ArmorDamageModifier = 0; 2598 2590 2599 if (isset($_POST['de_ChanceOr Ref']) && $_POST['de_ChanceOrRef'] != '') $de_ChanceOrRef = $sql->quote_smart($_POST['de_ChanceOrRef']);2600 else $de_ChanceOr Ref= 0;2601 if (isset($_POST['de_ QuestChanceOrGroup']) && $_POST['de_QuestChanceOrGroup'] != '') $de_QuestChanceOrGroup = $sql->quote_smart($_POST['de_QuestChanceOrGroup']);2602 else $de_ QuestChanceOrGroup= 0;2603 if (isset($_POST['de_mincount ']) && $_POST['de_mincount'] != '') $de_mincount = $sql->quote_smart($_POST['de_mincount']);2604 else $de_mincount = 0;2591 if (isset($_POST['de_ChanceOrQuestChance']) && $_POST['de_ChanceOrQuestChance'] != '') $de_ChanceOrQuestChance = $sql->quote_smart($_POST['de_ChanceOrQuestChance']); 2592 else $de_ChanceOrQuestChance = 0; 2593 if (isset($_POST['de_groupid']) && $_POST['de_groupid'] != '') $de_groupid = $sql->quote_smart($_POST['de_groupid']); 2594 else $de_groupid = 0; 2595 if (isset($_POST['de_mincountOrRef']) && $_POST['de_mincountOrRef'] != '') $de_mincountOrRef = $sql->quote_smart($_POST['de_mincountOrRef']); 2596 else $de_mincountOrRef = 0; 2605 2597 if (isset($_POST['de_maxcount']) && $_POST['de_maxcount'] != '') $de_maxcount = $sql->quote_smart($_POST['de_maxcount']); 2606 2598 else $de_maxcount = 0; 2607 if (isset($_POST['de_freeforall']) && $_POST['de_freeforall'] != '') $de_freeforall = $sql->quote_smart($_POST['de_freeforall']);2608 else $de_freeforall = 0;2609 2599 if (isset($_POST['de_lootcondition']) && $_POST['de_lootcondition'] != '') $de_lootcondition = $sql->quote_smart($_POST['de_lootcondition']); 2610 2600 else $de_lootcondition = 0; … … 2665 2655 spellid_4, spelltrigger_4, spellcharges_4, spellppmRate_4, spellcooldown_4, spellcategory_4, spellcategorycooldown_4, spellid_5, spelltrigger_5, spellcharges_5, spellppmRate_5, spellcooldown_5, spellcategory_5, spellcategorycooldown_5, 2666 2656 bonding, description, PageText, LanguageID, PageMaterial, startquest, lockid, Material, sheath, RandomProperty, block, itemset, MaxDurability, area, BagFamily, Map, ScriptName, DisenchantID,RequiredDisenchantSkill, 2667 ArmorDamageModifier,unk0,RandomSuffix,TotemCategory, socketColor_1, socketContent_1, socketColor_2, socketContent_2, socketColor_3, socketContent_3, socketBonus, GemProperties , ExtendedCost)2657 ArmorDamageModifier,unk0,RandomSuffix,TotemCategory, socketColor_1, socketContent_1, socketColor_2, socketContent_2, socketColor_3, socketContent_3, socketBonus, GemProperties) 2668 2658 VALUES ('$entry', '$class', '$subclass', '$name','$displayid', '$Quality', '$Flags', '$BuyCount', '$BuyPrice', '$SellPrice', '$InventoryType', '$AllowableClass', '$AllowableRace', '$ItemLevel', '$RequiredLevel', 2669 2659 '$RequiredSkill', '$RequiredSkillRank', '$requiredspell', '$requiredhonorrank', '$RequiredCityRank', '$RequiredReputationFaction', '$RequiredReputationRank', '$maxcount', '$stackable', '$ContainerSlots', '$stat_type1', … … 2675 2665 '$spellcharges_5', '$spellppmRate_5', '$spellcooldown_5', '$spellcategory_5', '$spellcategorycooldown_5', '$bonding', '$description', '$PageText', '$LanguageID', '$PageMaterial', '$startquest', '$lockid', '$Material', '$sheath', '$RandomProperty', '$block', 2676 2666 '$itemset', '$MaxDurability', '$area', '$BagFamily', '$Map', '$ScriptName', '$DisenchantID', '$RequiredDisenchantSkill','$ArmorDamageModifier','$unk0','$RandomSuffix', '$TotemCategory', '$socketColor_1', '$socketContent_1', '$socketColor_2', 2677 '$socketContent_2', '$socketColor_3', '$socketContent_3', '$socketBonus', '$GemProperties' , '$ExtendedCost')";2667 '$socketContent_2', '$socketColor_3', '$socketContent_3', '$socketBonus', '$GemProperties')"; 2678 2668 2679 2669 } elseif ($_POST['type'] == "edit"){ … … 2681 2671 $sql_query = "UPDATE item_template SET "; 2682 2672 2683 $result = $sql->query("SELECT `item_template`.`entry`,`class`,`subclass`,`unk0`,IFNULL(".($deplang<>0?"name_loc$deplang":"NULL").",`name`) as name,`displayid`,`Quality`,`Flags`,`BuyCount`,`BuyPrice`,`SellPrice`,`InventoryType`,`AllowableClass`,`AllowableRace`,`ItemLevel`,`RequiredLevel`,`RequiredSkill`,`RequiredSkillRank`,`requiredspell`,`requiredhonorrank`,`RequiredCityRank`,`RequiredReputationFaction`,`RequiredReputationRank`,`maxcount`,`stackable`,`ContainerSlots`,`stat_type1`,`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`,`stat_value9`,`stat_type10`,`stat_value10`,`dmg_min1`,`dmg_max1`,`dmg_type1`,`dmg_min2`,`dmg_max2`,`dmg_type2`,`dmg_min3`,`dmg_max3`,`dmg_type3`,`dmg_min4`,`dmg_max4`,`dmg_type4`,`dmg_min5`,`dmg_max5`,`dmg_type5`,`armor`,`holy_res`,`fire_res`,`nature_res`,`frost_res`,`shadow_res`,`arcane_res`,`delay`,`ammo_type`,`RangedModRange`,`spellid_1`,`spelltrigger_1`,`spellcharges_1`,`spellppmRate_1`,`spellcooldown_1`,`spellcategory_1`,`spellcategorycooldown_1`,`spellid_2`,`spelltrigger_2`,`spellcharges_2`,`spellppmRate_2`,`spellcooldown_2`,`spellcategory_2`,`spellcategorycooldown_2`,`spellid_3`,`spelltrigger_3`,`spellcharges_3`,`spellppmRate_3`,`spellcooldown_3`,`spellcategory_3`,`spellcategorycooldown_3`,`spellid_4`,`spelltrigger_4`,`spellcharges_4`,`spellppmRate_4`,`spellcooldown_4`,`spellcategory_4`,`spellcategorycooldown_4`,`spellid_5`,`spelltrigger_5`,`spellcharges_5`,`spellppmRate_5`,`spellcooldown_5`,`spellcategory_5`,`spellcategorycooldown_5`,`bonding`,`description`,`PageText`,`LanguageID`,`PageMaterial`,`startquest`,`lockid`,`Material`,`sheath`,`RandomProperty`,`RandomSuffix`,`block`,`itemset`,`MaxDurability`,`area`,`Map`,`BagFamily`,`TotemCategory`,`socketColor_1`,`socketContent_1`,`socketColor_2`,`socketContent_2`,`socketColor_3`,`socketContent_3`,`socketBonus`,`GemProperties`,` ExtendedCost`,`RequiredArenaRank`,`RequiredDisenchantSkill`,`ArmorDamageModifier`,`ScriptName`,`DisenchantID`,`FoodType`,`minMoneyLoot`,`maxMoneyLoot` FROM item_template LEFT JOIN locales_item ON item_template.entry = locales_item.entry WHERE item_template.entry = '$entry'");2673 $result = $sql->query("SELECT `item_template`.`entry`,`class`,`subclass`,`unk0`,IFNULL(".($deplang<>0?"name_loc$deplang":"NULL").",`name`) as name,`displayid`,`Quality`,`Flags`,`BuyCount`,`BuyPrice`,`SellPrice`,`InventoryType`,`AllowableClass`,`AllowableRace`,`ItemLevel`,`RequiredLevel`,`RequiredSkill`,`RequiredSkillRank`,`requiredspell`,`requiredhonorrank`,`RequiredCityRank`,`RequiredReputationFaction`,`RequiredReputationRank`,`maxcount`,`stackable`,`ContainerSlots`,`stat_type1`,`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`,`stat_value9`,`stat_type10`,`stat_value10`,`dmg_min1`,`dmg_max1`,`dmg_type1`,`dmg_min2`,`dmg_max2`,`dmg_type2`,`dmg_min3`,`dmg_max3`,`dmg_type3`,`dmg_min4`,`dmg_max4`,`dmg_type4`,`dmg_min5`,`dmg_max5`,`dmg_type5`,`armor`,`holy_res`,`fire_res`,`nature_res`,`frost_res`,`shadow_res`,`arcane_res`,`delay`,`ammo_type`,`RangedModRange`,`spellid_1`,`spelltrigger_1`,`spellcharges_1`,`spellppmRate_1`,`spellcooldown_1`,`spellcategory_1`,`spellcategorycooldown_1`,`spellid_2`,`spelltrigger_2`,`spellcharges_2`,`spellppmRate_2`,`spellcooldown_2`,`spellcategory_2`,`spellcategorycooldown_2`,`spellid_3`,`spelltrigger_3`,`spellcharges_3`,`spellppmRate_3`,`spellcooldown_3`,`spellcategory_3`,`spellcategorycooldown_3`,`spellid_4`,`spelltrigger_4`,`spellcharges_4`,`spellppmRate_4`,`spellcooldown_4`,`spellcategory_4`,`spellcategorycooldown_4`,`spellid_5`,`spelltrigger_5`,`spellcharges_5`,`spellppmRate_5`,`spellcooldown_5`,`spellcategory_5`,`spellcategorycooldown_5`,`bonding`,`description`,`PageText`,`LanguageID`,`PageMaterial`,`startquest`,`lockid`,`Material`,`sheath`,`RandomProperty`,`RandomSuffix`,`block`,`itemset`,`MaxDurability`,`area`,`Map`,`BagFamily`,`TotemCategory`,`socketColor_1`,`socketContent_1`,`socketColor_2`,`socketContent_2`,`socketColor_3`,`socketContent_3`,`socketBonus`,`GemProperties`,`RequiredDisenchantSkill`,`ArmorDamageModifier`,`ScriptName`,`DisenchantID`,`FoodType`,`minMoneyLoot`,`maxMoneyLoot` FROM item_template LEFT JOIN locales_item ON item_template.entry = locales_item.entry WHERE item_template.entry = '$entry'"); 2684 2674 if ($item_templ = $sql->fetch_assoc($result)){ 2685 2675 … … 2819 2809 if ($item_templ['socketBonus'] != $socketBonus) $sql_query .= "socketBonus='$socketBonus',"; 2820 2810 if ($item_templ['GemProperties'] != $GemProperties) $sql_query .= "GemProperties='$GemProperties',"; 2821 if ($item_templ['ExtendedCost'] != $ExtendedCost) $sql_query .= "ExtendedCost='$ExtendedCost',";2822 2811 2823 2812 $sql->free_result($result); … … 2835 2824 2836 2825 if ($de_item){ 2837 $sql_query .= "INSERT INTO disenchant_loot_template (entry, item, ChanceOr Ref, QuestChanceOrGroup, mincount, maxcount, freeforall, lootcondition, condition_value1, condition_value2)2838 VALUES ($DisenchantID,$de_item,'$de_ChanceOr Ref', '$de_QuestChanceOrGroup' ,$de_mincount ,$de_maxcount ,$de_freeforall,$de_lootcondition ,$de_condition_value1 ,$de_condition_value2);\n";2826 $sql_query .= "INSERT INTO disenchant_loot_template (entry, item, ChanceOrQuestChance, `groupid`, mincountOrRef, maxcount, lootcondition, condition_value1, condition_value2) 2827 VALUES ($DisenchantID,$de_item,'$de_ChanceOrQuestChance', '$de_groupid' ,$de_mincountOrRef ,$de_maxcount ,$de_lootcondition ,$de_condition_value1 ,$de_condition_value2);\n"; 2839 2828 } 2840 2829 -
minimanager/js/ajax/Php.php
r5 r374 20 20 class JsHttpRequest 21 21 { 22 var $SCRIPT_ENCODING = " windows-1251";22 var $SCRIPT_ENCODING = "utf-8"; 23 23 var $SCRIPT_DECODE_MODE = ''; 24 24 var $UNIQ_HASH; … … 277 277 /** 278 278 * Convert from UCS-2BE decimal to $toEnc. 279 */ 279 */ 280 280 function _decUcs2Decode($code, $toEnc) 281 281 { 282 // Little speedup by using array_flip($this->_encTables) and later hash access. 283 static $flippedTable = null; 282 284 if ($code < 128) return chr($code); 285 283 286 if (isset($this->_encTables[$toEnc])) { 284 $p = array_search($code, $this->_encTables[$toEnc]); 285 if ($p !== false) return chr(128 + $p); 286 } 287 if (!$flippedTable) $flippedTable = array_flip($this->_encTables[$toEnc]); 288 if (isset($flippedTable[$code])) return chr(128 + $flippedTable[$code]); 289 } else if ($toEnc == 'utf-8' || $toEnc == 'utf8') { 290 // UTF-8 conversion rules: http://www.cl.cam.ac.uk/~mgk25/unicode.html 291 if ($code < 0x800) { 292 return chr(0xC0 + ($code >> 6)) . 293 chr(0x80 + ($code & 0x3F)); 294 } else { // if ($code <= 0xFFFF) -- it is almost always so for UCS2-BE 295 return chr(0xE0 + ($code >> 12)) . 296 chr(0x80 + (0x3F & ($code >> 6))) . 297 chr(0x80 + ($code & 0x3F)); 298 } 299 } 300 287 301 return ""; 288 302 } -
minimanager/js/layout.js
r5 r374 9 9 } 10 10 11 function dynamicLayout(){12 var browserWidth = getBrowserWidth();13 if (browserWidth <= 1024){14 changeLayout("1024");15 }16 if (browserWidth > 1024){17 changeLayout("1280");18 }19 }20 21 11 // changeLayout is based on setActiveStyleSheet function by Paul Sowdon 22 12 // http://www.alistapart.com/articles/alternate/ 23 function changeLayout(description){ 24 var i, a; 25 for(i=0; (a = document.getElementsByTagName("link")[i]); i++){ 26 if(a.getAttribute("title") == description){a.disabled = false;} 27 else if(a.getAttribute("title") != "default"){a.disabled = true;} 28 } 13 function dynamicLayout(){ 14 15 var i, a; 16 for(i=0; (a = document.getElementsByTagName("link")[i]); i++){ 17 if (a.getAttribute("title") == 1280){ 18 ( getBrowserWidth() > 1024) ? a.disabled = false : a.disabled = true; 19 } 20 } 29 21 } 30 22 -
minimanager/login.php
r369 r374 31 31 if ($sql->num_rows($result) == 1) { 32 32 $id = $sql->result($result, 0, 'id'); 33 $result1 = $sql->query("SELECT count(*) FROM account_banned WHERE id ='$id' ");33 $result1 = $sql->query("SELECT count(*) FROM account_banned WHERE id ='$id' AND active = '1'"); 34 34 if ($sql->result($result1, 0)) { 35 35 $sql->close(); … … 87 87 <tr align=\"left\"> 88 88 <td><input type=\"password\" name=\"login_pass\" size=\"24\" maxlength=\"40\" /></td> 89 <td><input type=\"submit\" value=\"\" style=\"display:none\">"; 90 makebutton($lang_login['login'], "javascript:dologin()",100); 91 $output .= "</td> 92 </tr>"; 93 94 $sql = new SQL; 89 <td><input type=\"submit\" value=\"\" style=\"display:none\" />"; 90 makebutton($lang_login['login'], "javascript:dologin()",100); 91 $sql = new SQL; 95 92 $link = $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 96 93 $result = $sql->query("SELECT id,name FROM `realmlist` LIMIT 10"); … … 110 107 $sql->close(); 111 108 109 $output .= "</td> 110 </tr>"; 111 112 112 $output .= "<tr align=\"left\"> 113 113 <td colspan=\"2\"><input type=\"checkbox\" name=\"remember\" value=\"1\" checked=\"checked\" /> - {$lang_login['remember_me']}</td> … … 115 115 <tr><td colspan=\"2\"><hr /></td></tr> 116 116 <tr align=\"left\"> 117 <td><a href=\" register.php\">{$lang_login['not_registrated']}</a></td>117 <td><a href=\"form.php\">{$lang_login['not_registrated']}</a></td> 118 118 <td><a href=\"register.php?action=pass_recovery\">{$lang_login['pass_recovery']}</a></td> 119 119 </tr> 120 120 </table> 121 <script language=\"JavaScript\">121 <script type=\"text/javascript\"> 122 122 <!-- 123 123 document.form.user.focus(); -
minimanager/mail.php
r307 r374 10 10 11 11 require_once("header.php"); 12 valid_login( 1);12 valid_login($action_permission['read']); 13 13 14 14 //########################################################################### -
minimanager/motd.php
r178 r374 11 11 require_once("header.php"); 12 12 require_once("scripts/bbcode_lib.php"); 13 valid_login( 1);13 valid_login($action_permission['read']); 14 14 15 15 //##################################################################################################### -
minimanager/realm.php
r142 r374 10 10 11 11 require_once("header.php"); 12 valid_login( 0);12 valid_login($action_permission['read']); 13 13 14 14 $icon_type = Array( … … 17 17 4 => array(4,$lang_realm['normal']), 18 18 6 => array(6,$lang_realm['rp']), 19 8 => array(8,$lang_realm['rppvp']) 19 8 => array(8,$lang_realm['rppvp']), 20 16 => array(16,$lang_realm['ffapvp']), 20 21 ); 21 22 $timezone_type = Array( 22 1 => array(1,$lang_realm['english']), 23 2 => array(2,$lang_realm['deutsch']), 24 3 => array(3,$lang_realm['french']), 25 4 => array(4,$lang_realm['others']) 23 1 => array(1,$lang_realm['development']), 24 2 => array(2,$lang_realm['united_states']), 25 3 => array(3,$lang_realm['oceanic']), 26 4 => array(4,$lang_realm['latin_america']), 27 5 => array(5,$lang_realm['tournament']), 28 6 => array(6,$lang_realm['korea']), 29 8 => array(8,$lang_realm['english']), 30 9 => array(9,$lang_realm['german']), 31 10 => array(10,$lang_realm['french']), 32 11 => array(11,$lang_realm['spanish']), 33 12 => array(12,$lang_realm['russian']), 34 14 => array(14,$lang_realm['taiwan']), 35 16 => array(16,$lang_realm['china']), 36 26 => array(26,$lang_realm['test_server']), 37 28 => array(28,$lang_realm['qa_server']), 26 38 ); 27 39 … … 31 43 //#################################################################################################### 32 44 function show_realm() { 33 valid_login( 3);45 valid_login(5); 34 46 global $lang_global, $lang_realm, $output, $realm_db, $user_name, $server, $realm_id, $icon_type, $timezone_type; 35 47 -
minimanager/register.php
r312 r374 15 15 function doregister(){ 16 16 global $lang_global, $realm_db, $disable_acc_creation, $limit_acc_per_ip, $valid_ip_mask, 17 $send_mail_on_creation, $create_acc_locked, $from_mail, $mailer_type, $smtp_cfg, $titlee, $MaximumAccountCount;17 $send_mail_on_creation, $create_acc_locked, $from_mail, $mailer_type, $smtp_cfg, $title, $defaultoption, $MaximumAccountCount; 18 18 19 19 if ( empty($_POST['pass']) || empty($_POST['email']) || empty($_POST['username']) ) { … … 101 101 redirect("register.php?err=3&usr=$user_name"); 102 102 } else { 103 $tbc = (isset($_POST['tbc'])) ? $sql->quote_smart($_POST['tbc']) : 0; 103 if ( $expansion_select ) { 104 $tbc = (isset($_POST['tbc'])) ? $sql->quote_smart($_POST['tbc']) : 0; 105 } else { 106 $tbc = $defaultoption; 107 } 104 108 105 109 $result = $sql->query("INSERT INTO account (username,sha_pass_hash,gmlevel,email, joindate,last_ip,failed_logins,locked,last_login,online,tbc) 106 VALUES ( '$user_name','$pass',0,'$mail',now(),'$last_ip',0,$create_acc_locked,NULL,0,$tbc)");110 VALUES (UPPER('$user_name'),'$pass',0,'$mail',now(),'$last_ip',0,$create_acc_locked,NULL,0,$tbc)"); 107 111 $sql->close(); 108 112 … … 155 159 //##################################################################################################### 156 160 function register(){ 157 global $lang_register, $lang_global, $output ;161 global $lang_register, $lang_global, $output, $expansion_select; 158 162 $output .= "<center> 159 163 <script type=\"text/javascript\" src=\"js/sha1.js\"></script> … … 201 205 <td><input type=\"text\" name=\"email\" size=\"45\" maxlength=\"225\" /><br /> 202 206 {$lang_register['use_valid_mail']}</td> 203 </tr> 204 <tr> 207 </tr>"; 208 if ( $expansion_select ) { 209 $output .= "<tr> 205 210 <td valign=\"top\">{$lang_register['acc_type']}:</td> 206 211 <td> … … 210 215 </select> 211 216 - {$lang_register['acc_type_desc']}</td> 217 </tr>"; 218 } 219 $output .= "<tr><td colspan=\"2\"><hr /></td></tr> 220 <tr> 221 <td colspan=\"2\">{$lang_register['read_terms']}.</td> 212 222 </tr> 213 223 <tr><td colspan=\"2\"><hr /></td></tr> 214 <tr>215 <td colspan=\"2\">{$lang_register['read_terms']}.</td>216 </tr>217 <tr><td colspan=\"2\"><hr / ></td></tr>218 224 <tr><td>"; 219 225 -
minimanager/repair.php
r142 r374 10 10 11 11 require_once("header.php"); 12 valid_login( 3);12 valid_login($action_permission['read']); 13 13 14 14 //############################################################################################## … … 109 109 //############################################################################################## 110 110 function do_repair(){ 111 global $lang_global, $output, $realm_db, $mangos_db ;111 global $lang_global, $output, $realm_db, $mangos_db, $characters_db; 112 112 113 113 if ((!isset($_POST['repair_action']) && $_POST['repair_action'] === '') || (!isset($_POST['check'])) ) { … … 126 126 if ($table_data[0] == "realm"){ 127 127 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 128 } else { 129 if ($table_data[0] == "mangos"){ 130 $sql->connect($mangos_db[$table_data[1]]['addr'], $mangos_db[$table_data[1]]['user'], $mangos_db[$table_data[1]]['pass']); 131 } else { 132 $sql->connect($characters_db[$table_data[1]]['addr'], $characters_db[$table_data[1]]['user'], $characters_db[$table_data[1]]['pass']); 133 } 134 } 128 } elseif ($table_data[0] == "mangos"){ 129 $sql->connect($mangos_db['addr'], $mangos_db['user'], $mangos_db['pass']); 130 } elseif ($table_data[0] == "characters"){ 131 $sql->connect($characters_db['addr'], $characters_db['user'], $characters_db['pass']); 132 } 135 133 136 134 $result = $sql->query("$table_action TABLE {$table_data[2]}.`{$table_data[3]}`"); … … 141 139 } 142 140 143 if ($counter) redirect("repair.php?error=2&num=$counter");144 else redirect("repair.php?error=4&rep_err=$err");141 if ($counter) { redirect("repair.php?error=2&num=$counter"); } 142 else { redirect("repair.php?error=4&rep_err=$err"); } 145 143 } 146 144 -
minimanager/run_patch.php
r142 r374 10 10 11 11 require_once("header.php"); 12 valid_login( 3);12 valid_login($action_permission['read']); 13 13 14 14 //##################################################################################################### -
minimanager/scripts/backup_tab.php
r364 r374 11 11 //list of tables in realmd db will be saved on Global backup 12 12 $tables_backup_realmd = Array( 13 14 15 16 17 13 "account", 14 "ip_banned", 15 "realmcharacters", 16 "account_banned", 17 "realmlist" 18 18 ); 19 19 20 20 //list of tables in characters db will be saved on Global backup 21 21 $tables_backup_characters = Array( 22 "auctionhouse", 23 "arena_team", 24 "arena_team_member", 25 "characters", 26 "character_action", 27 "character_aura", 28 "character_gifts", 29 "character_homebind", 30 "character_instance", 31 "character_inventory", 32 "character_kill", 33 "character_pet", 34 "character_queststatus", 35 "character_reputation", 36 "character_ticket", 37 "character_social", 38 "character_spell", 39 "character_spell_cooldown", 40 "character_tutorial", 41 "corpse", 42 "groups", 43 "group_member", 44 "guild", 45 "guild_member", 46 "guild_rank", 47 "petition", 48 "petition_sign", 49 "item_instance", 50 "mail", 51 "item_text" 22 "arena_team", 23 "arena_team_member", 24 "arena_team_stats", 25 "auctionhouse", 26 "characters", 27 "character_action", 28 "character_aura", 29 "character_gifts", 30 "character_homebind", 31 "character_instance", 32 "character_inventory", 33 "character_pet", 34 "character_queststatus", 35 "character_reputation", 36 "character_ticket", 37 "character_social", 38 "character_spell", 39 "character_spell_cooldown", 40 "character_tutorial", 41 "corpse", 42 "groups", 43 "group_member", 44 "guild", 45 "guild_bank_eventlog", 46 "guild_bank_item", 47 "guild_bank_right", 48 "guild_bank_tab", 49 "guild_member", 50 "guild_rank", 51 "instance", 52 "item_instance", 53 "item_text", 54 "mail", 55 "mail_items", 56 "petition", 57 "petition_sign", 58 "pet_aura", 59 "pet_spell", 60 "pet_spell_cooldown", 52 61 ); 53 62 54 63 //list of tables in realmd db you need to delete data on user deletion 55 64 $tab_del_user_realmd = Array( 56 57 65 Array("realmcharacters","acctid"), 66 Array("account_banned","id"), 58 67 Array("account","id") 59 68 ); … … 61 70 //list of tables in characters db you need to delete data from on user deletion 62 71 $tab_del_user_characters = Array( 63 Array("auctionhouse","itemowner"), 64 Array("character_action","guid"), 65 Array("character_aura","guid"), 66 Array("character_homebind","guid"), 67 Array("character_inventory","guid"), 68 // Array("character_kill","guid"), 69 Array("character_pet","owner"), 70 Array("character_queststatus","guid"), 71 Array("character_reputation","guid"), 72 Array("character_social","guid"), 73 Array("character_spell","guid"), 74 Array("character_spell_cooldown","guid"), 75 Array("character_ticket","guid"), 76 Array("character_tutorial","guid"), 77 Array("guild_member","guid"), 78 Array("corpse","guid"), 79 Array("groups","leaderGuid"), 80 Array("group_member","memberGuid"), 81 Array("group_member","leaderGuid"), 82 Array("mail","receiver"), 83 Array("item_instance","owner_guid"), 84 Array("character_gifts","guid"), 85 Array("character_instance","guid"), 86 Array("arena_team_member","guid"), 87 Array("petition","ownerguid"), 88 Array("petition_sign","ownerguid"), 89 Array("petition_sign","playerguid"), 90 Array("`characters`","guid") 72 Array("arena_team_member","guid"), 73 Array("auctionhouse","itemowner"), 74 Array("character_action","guid"), 75 Array("character_aura","guid"), 76 Array("character_gifts","guid"), 77 Array("character_homebind","guid"), 78 Array("character_instance","guid"), 79 Array("character_inventory","guid"), 80 Array("character_pet","owner"), 81 Array("character_queststatus","guid"), 82 Array("character_reputation","guid"), 83 Array("character_social","guid"), 84 Array("character_social","friend"), 85 Array("character_spell","guid"), 86 Array("character_spell_cooldown","guid"), 87 Array("character_ticket","guid"), 88 Array("character_tutorial","guid"), 89 Array("corpse","player"), 90 Array("groups","leaderGuid"), 91 Array("group_member","memberGuid"), 92 Array("group_member","leaderGuid"), 93 Array("guild_member","guid"), 94 Array("item_instance","owner_guid"), 95 Array("mail","receiver"), 96 Array("mail_items","receiver"), 97 Array("petition","ownerguid"), 98 Array("petition_sign","ownerguid"), 99 Array("petition_sign","playerguid"), 100 Array("characters","guid") 91 101 ); 92 102 93 103 //list of tables in realmd db you need to backup data on single user backup 94 104 $tab_backup_user_realmd = Array( 95 96 105 Array("realmcharacters","acctid"), 106 Array("account_banned","id"), 97 107 Array("account","id") 98 108 ); … … 100 110 //list of tables in characters db you need to backup data from on single user backup 101 111 $tab_backup_user_characters = Array( 102 Array("character_action","guid"), 103 Array("character_aura","guid"), 104 Array("character_homebind","guid"), 105 Array("character_inventory","guid"), 106 // Array("character_kill","guid"), 107 Array("character_pet","owner"), 108 Array("character_queststatus","guid"), 109 Array("character_reputation","guid"), 110 Array("character_social","guid"), 111 Array("character_spell","guid"), 112 Array("character_spell_cooldown","guid"), 113 Array("character_ticket","guid"), 114 Array("character_tutorial","guid"), 115 Array("corpse","guid"), 116 Array("item_instance","owner_guid"), 117 Array("character_gifts","guid"), 118 Array("character_instance","guid"), 119 Array("characters","guid") 112 Array("arena_team_member","guid"), 113 Array("auctionhouse","itemowner"), 114 Array("character_action","guid"), 115 Array("character_aura","guid"), 116 Array("character_gifts","guid"), 117 Array("character_homebind","guid"), 118 Array("character_inventory","guid"), 119 Array("character_pet","owner"), 120 Array("character_queststatus","guid"), 121 Array("character_reputation","guid"), 122 Array("character_social","guid"), 123 Array("character_social","friend"), 124 Array("character_spell","guid"), 125 Array("character_spell_cooldown","guid"), 126 Array("character_ticket","guid"), 127 Array("character_tutorial","guid"), 128 Array("corpse","player"), 129 Array("groups","leaderGuid"), 130 Array("group_member","memberGuid"), 131 Array("group_member","leaderGuid"), 132 Array("guild_member","guid"), 133 Array("item_instance","owner_guid"), 134 Array("mail","receiver"), 135 Array("mail_items","receiver"), 136 Array("petition","ownerguid"), 137 Array("petition_sign","ownerguid"), 138 Array("petition_sign","playerguid"), 139 Array("characters","guid") 120 140 ); 121 141 ?> -
minimanager/scripts/char_aura.php
r321 r374 3 3 require_once("config.php"); 4 4 $char_aura = Array( 5 2383 => array(2383,$lang_id_tab['CHAR_AURA_FIND_HERBS'],'FindHerbs.jpg'), 6 2580 => array(2580,$lang_id_tab['CHAR_AURA_FIND_MINERALS'],'FindMinerals.jpg'), 7 5784 => array(5784,$lang_id_tab['CHAR_AURA_SUMMON_FELSTEED'],'SummonFelsteed.jpg'), 8 13159 => array(13159,$lang_id_tab['CHAR_AURA_ASPECT_OF_THE_PACK'],'AspectOfThePack.jpg'), 9 13163 => array(13163,$lang_id_tab['CHAR_AURA_ASPECT_OF_THE_MONKEY'],'AspectOfTheMonkey.jpg'), 10 19878 => array(19878,$lang_id_tab['CHAR_AURA_TRACK_DEMONS'],'TrackDemons.jpg'), 11 1494 => array(1494,$lang_id_tab['CHAR_AURA_TRACK_BEASTS'],'TrackBeasts.jpg'), 12 19879 => array(19879,$lang_id_tab['CHAR_AURA_TRACK_DRAGONKIN'],'TrackDragonkin.jpg'), 13 19880 => array(19880,$lang_id_tab['CHAR_AURA_TRACK_ELEMENTALS'],'TrackElementals.jpg'), 14 19883 => array(19883,$lang_id_tab['CHAR_AURA_TRACK_HUMANOIDS'],'TrackHumanoids.jpg'), 15 19882 => array(19882,$lang_id_tab['CHAR_AURA_TRACK_GIANTS'],'TrackGiants.jpg'), 16 19884 => array(19884,$lang_id_tab['CHAR_AURA_TRACK_UNDEAD'],'TrackUndead.jpg'), 17 19885 => array(19885,$lang_id_tab['CHAR_AURA_TRACK_HIDDEN'],'TrackHidden.jpg'), 18 1126 => array(1126,$lang_id_tab['CHAR_AURA_MARK_OF_THE_WILD_RANK_1'],'MarkOfTheWild.jpg'), 19 5232 => array(5232,$lang_id_tab['CHAR_AURA_MARK_OF_THE_WILD_RANK_2'],'MarkOfTheWild.jpg'), 20 6756 => array(6756,$lang_id_tab['CHAR_AURA_MARK_OF_THE_WILD_RANK_3'],'MarkOfTheWild.jpg'), 21 5234 => array(5234,$lang_id_tab['CHAR_AURA_MARK_OF_THE_WILD_RANK_4'],'MarkOfTheWild.jpg'), 22 8907 => array(8907,$lang_id_tab['CHAR_AURA_MARK_OF_THE_WILD_RANK_5'],'MarkOfTheWild.jpg'), 23 9884 => array(9884,$lang_id_tab['CHAR_AURA_MARK_OF_THE_WILD_RANK_6'],'MarkOfTheWild.jpg'), 24 9885 => array(9885,$lang_id_tab['CHAR_AURA_MARK_OF_THE_WILD_RANK_7'],'MarkOfTheWild.jpg'), 25 26990 => array(26990,$lang_id_tab['CHAR_AURA_MARK_OF_THE_WILD_RANK_8'],'MarkOfTheWild.jpg'), 26 13165 => array(13165,$lang_id_tab['CHAR_AURA_ASPECT_OF_THE_HAWK_RANK_1'],'AspectOfTheHawk.jpg'), 27 14318 => array(14318,$lang_id_tab['CHAR_AURA_ASPECT_OF_THE_HAWK_RANK_2'],'AspectOfTheHawk.jpg'), 28 14319 => array(14319,$lang_id_tab['CHAR_AURA_ASPECT_OF_THE_HAWK_RANK_3'],'AspectOfTheHawk.jpg'), 29 14320 => array(14320,$lang_id_tab['CHAR_AURA_ASPECT_OF_THE_HAWK_RANK_4'],'AspectOfTheHawk.jpg'), 30 14321 => array(14321,$lang_id_tab['CHAR_AURA_ASPECT_OF_THE_HAWK_RANK_5'],'AspectOfTheHawk.jpg'), 31 14322 => array(14322,$lang_id_tab['CHAR_AURA_ASPECT_OF_THE_HAWK_RANK_6'],'AspectOfTheHawk.jpg'), 32 25296 => array(25296,$lang_id_tab['CHAR_AURA_ASPECT_OF_THE_HAWK_RANK_7'],'AspectOfTheHawk.jpg'), 33 27044 => array(27044,$lang_id_tab['CHAR_AURA_ASPECT_OF_THE_HAWK_RANK_8'],'AspectOfTheHawk.jpg'), 34 34074 => array(34074,$lang_id_tab['CHAR_AURA_ASPECT_OF_THE_VIPER'],'AspectOfTheViper.jpg'), 35 20043 => array(20043,$lang_id_tab['CHAR_AURA_ASPECT_OF_THE_WILD_RANK_1'],'AspectOfTheWild.jpg'), 36 20190 => array(20190,$lang_id_tab['CHAR_AURA_ASPECT_OF_THE_WILD_RANK_2'],'AspectOfTheWild.jpg'), 37 27045 => array(27045,$lang_id_tab['CHAR_AURA_ASPECT_OF_THE_WILD_RANK_3'],'AspectOfTheWild.jpg'), 38 19506 => array(19506,$lang_id_tab['CHAR_AURA_TRUESHOT_AURA_RANK_1'],'Trueshot.jpg'), 39 20905 => array(20905,$lang_id_tab['CHAR_AURA_TRUESHOT_AURA_RANK_2'],'Trueshot.jpg'), 40 20906 => array(20906,$lang_id_tab['CHAR_AURA_TRUESHOT_AURA_RANK_3'],'Trueshot.jpg'), 41 27066 => array(27066,$lang_id_tab['CHAR_AURA_TRUESHOT_AURA_RANK_4'],'Trueshot.jpg'), 42 1459 => array(1459,$lang_id_tab['CHAR_AURA_ARCANE_INTELLECT_RANK_1'],'ArcaneIntellect.jpg'), 43 1460 => array(1460,$lang_id_tab['CHAR_AURA_ARCANE_INTELLECT_RANK_2'],'ArcaneIntellect.jpg'), 44 1461 => array(1461,$lang_id_tab['CHAR_AURA_ARCANE_INTELLECT_RANK_3'],'ArcaneIntellect.jpg'), 45 10156 => array(10156,$lang_id_tab['CHAR_AURA_ARCANE_INTELLECT_RANK_4'],'ArcaneIntellect.jpg'), 46 10157 => array(10157,$lang_id_tab['CHAR_AURA_ARCANE_INTELLECT_RANK_5'],'ArcaneIntellect.jpg'), 47 27126 => array(27126,$lang_id_tab['CHAR_AURA_ARCANE_INTELLECT_RANK_6'],'ArcaneIntellect.jpg'), 48 168 => array(168,$lang_id_tab['CHAR_AURA_FROST_ARMOR_RANK_1'],'FrostArmor.jpg'), 49 7300 => array(7300,$lang_id_tab['CHAR_AURA_FROST_ARMOR_RANK_2'],'FrostArmor.jpg'), 50 7301 => array(7301,$lang_id_tab['CHAR_AURA_FROST_ARMOR_RANK_3'],'FrostArmor.jpg'), 51 6117 => array(6117,$lang_id_tab['CHAR_AURA_MAGE_ARMOR_RANK_1'],'MageArmor.jpg'), 52 22782 => array(22782,$lang_id_tab['CHAR_AURA_MAGE_ARMOR_RANK_2'],'MageArmor.jpg'), 53 22783 => array(22783,$lang_id_tab['CHAR_AURA_MAGE_ARMOR_RANK_3'],'MageArmor.jpg'), 54 27125 => array(27125,$lang_id_tab['CHAR_AURA_MAGE_ARMOR_RANK_4'],'MageArmor.jpg'), 55 30482 => array(30482,$lang_id_tab['CHAR_AURA_MOLTEN_ARMOR'],'MoltenArmor.jpg') 56 ); 57 58 function get_char_aura_name($id){ 59 global $lang_char_aura, $char_aura; 60 if( isset($char_aura[$id]) ) return $char_aura[$id][1]; 61 else return "Unknown"; 62 } 63 64 function get_char_aura_image($id){ 65 global $char_aura; 66 if( isset($char_aura[$id][2]) ) return $char_aura[$id][2]; 67 else return 'missing.jpg'; 68 } 69 70 71 5 2383 => array($lang_id_tab['CHAR_AURA_FIND_HERBS'],'INV_Misc_Flower_02'), 6 2580 => array($lang_id_tab['CHAR_AURA_FIND_MINERALS'],'Spell_Nature_Earthquake'), 7 5784 => array($lang_id_tab['CHAR_AURA_SUMMON_FELSTEED'],'Spell_Nature_Swiftness'), 8 13159 => array($lang_id_tab['CHAR_AURA_ASPECT_OF_THE_PACK'],'Ability_Mount_WhiteTiger'), 9 13163 => array($lang_id_tab['CHAR_AURA_ASPECT_OF_THE_MONKEY'],'Ability_Hunter_AspectOfTheMonkey'), 10 19878 => array($lang_id_tab['CHAR_AURA_TRACK_DEMONS'],'Spell_Shadow_SummonFelHunter'), 11 1494 => array($lang_id_tab['CHAR_AURA_TRACK_BEASTS'],'Ability_Tracking'), 12 19879 => array($lang_id_tab['CHAR_AURA_TRACK_DRAGONKIN'],'INV_Misc_Head_Dragon_01'), 13 19880 => array($lang_id_tab['CHAR_AURA_TRACK_ELEMENTALS'],'Spell_Frost_SummonWaterElemental'), 14 19883 => array($lang_id_tab['CHAR_AURA_TRACK_HUMANOIDS'],'Spell_Holy_PrayerOfHealing'), 15 19882 => array($lang_id_tab['CHAR_AURA_TRACK_GIANTS'],'Ability_Racial_Avatar'), 16 19884 => array($lang_id_tab['CHAR_AURA_TRACK_UNDEAD'],'Spell_Shadow_DarkSummoning'), 17 19885 => array($lang_id_tab['CHAR_AURA_TRACK_HIDDEN'],'Ability_Stealth'), 18 1126 => array($lang_id_tab['CHAR_AURA_MARK_OF_THE_WILD_RANK_1'],'Spell_Nature_Regeneration'), 19 5232 => array($lang_id_tab['CHAR_AURA_MARK_OF_THE_WILD_RANK_2'],'Spell_Nature_Regeneration'), 20 6756 => array($lang_id_tab['CHAR_AURA_MARK_OF_THE_WILD_RANK_3'],'Spell_Nature_Regeneration'), 21 5234 => array($lang_id_tab['CHAR_AURA_MARK_OF_THE_WILD_RANK_4'],'Spell_Nature_Regeneration'), 22 8907 => array($lang_id_tab['CHAR_AURA_MARK_OF_THE_WILD_RANK_5'],'Spell_Nature_Regeneration'), 23 9884 => array($lang_id_tab['CHAR_AURA_MARK_OF_THE_WILD_RANK_6'],'Spell_Nature_Regeneration'), 24 9885 => array($lang_id_tab['CHAR_AURA_MARK_OF_THE_WILD_RANK_7'],'Spell_Nature_Regeneration'), 25 26990 => array($lang_id_tab['CHAR_AURA_MARK_OF_THE_WILD_RANK_8'],'Spell_Nature_Regeneration'), 26 13165 => array($lang_id_tab['CHAR_AURA_ASPECT_OF_THE_HAWK_RANK_1'],'Spell_Nature_RavenForm'), 27 14318 => array($lang_id_tab['CHAR_AURA_ASPECT_OF_THE_HAWK_RANK_2'],'Spell_Nature_RavenForm'), 28 14319 => array($lang_id_tab['CHAR_AURA_ASPECT_OF_THE_HAWK_RANK_3'],'Spell_Nature_RavenForm'), 29 14320 => array($lang_id_tab['CHAR_AURA_ASPECT_OF_THE_HAWK_RANK_4'],'Spell_Nature_RavenForm'), 30 14321 => array($lang_id_tab['CHAR_AURA_ASPECT_OF_THE_HAWK_RANK_5'],'Spell_Nature_RavenForm'), 31 14322 => array($lang_id_tab['CHAR_AURA_ASPECT_OF_THE_HAWK_RANK_6'],'Spell_Nature_RavenForm'), 32 25296 => array($lang_id_tab['CHAR_AURA_ASPECT_OF_THE_HAWK_RANK_7'],'Spell_Nature_RavenForm'), 33 27044 => array($lang_id_tab['CHAR_AURA_ASPECT_OF_THE_HAWK_RANK_8'],'Spell_Nature_RavenForm'), 34 34074 => array($lang_id_tab['CHAR_AURA_ASPECT_OF_THE_VIPER'],'Ability_Hunter_AspectoftheViper'), 35 20043 => array($lang_id_tab['CHAR_AURA_ASPECT_OF_THE_WILD_RANK_1'],'Spell_Nature_ProtectionformNature'), 36 20190 => array($lang_id_tab['CHAR_AURA_ASPECT_OF_THE_WILD_RANK_2'],'Spell_Nature_ProtectionformNature'), 37 27045 => array($lang_id_tab['CHAR_AURA_ASPECT_OF_THE_WILD_RANK_3'],'Spell_Nature_ProtectionformNature'), 38 19506 => array($lang_id_tab['CHAR_AURA_TRUESHOT_AURA_RANK_1'],'Ability_TrueShot'), 39 20905 => array($lang_id_tab['CHAR_AURA_TRUESHOT_AURA_RANK_2'],'Ability_TrueShot'), 40 20906 => array($lang_id_tab['CHAR_AURA_TRUESHOT_AURA_RANK_3'],'Ability_TrueShot'), 41 27066 => array($lang_id_tab['CHAR_AURA_TRUESHOT_AURA_RANK_4'],'Ability_TrueShot'), 42 1459 => array($lang_id_tab['CHAR_AURA_ARCANE_INTELLECT_RANK_1'],'Spell_Holy_MagicalSentry'), 43 1460 => array($lang_id_tab['CHAR_AURA_ARCANE_INTELLECT_RANK_2'],'Spell_Holy_MagicalSentry'), 44 1461 => array($lang_id_tab['CHAR_AURA_ARCANE_INTELLECT_RANK_3'],'Spell_Holy_MagicalSentry'), 45 10156 => array($lang_id_tab['CHAR_AURA_ARCANE_INTELLECT_RANK_4'],'Spell_Holy_MagicalSentry'), 46 10157 => array($lang_id_tab['CHAR_AURA_ARCANE_INTELLECT_RANK_5'],'Spell_Holy_MagicalSentry'), 47 27126 => array($lang_id_tab['CHAR_AURA_ARCANE_INTELLECT_RANK_6'],'Spell_Holy_MagicalSentry'), 48 168 => array($lang_id_tab['CHAR_AURA_FROST_ARMOR_RANK_1'],'Spell_Frost_FrostArmor02'), 49 7300 => array($lang_id_tab['CHAR_AURA_FROST_ARMOR_RANK_2'],'Spell_Frost_FrostArmor02'), 50 7301 => array($lang_id_tab['CHAR_AURA_FROST_ARMOR_RANK_3'],'Spell_Frost_FrostArmor02'), 51 6117 => array($lang_id_tab['CHAR_AURA_MAGE_ARMOR_RANK_1'],'Spell_MageArmor'), 52 22782 => array($lang_id_tab['CHAR_AURA_MAGE_ARMOR_RANK_2'],'Spell_MageArmor'), 53 22783 => array($lang_id_tab['CHAR_AURA_MAGE_ARMOR_RANK_3'],'Spell_MageArmor'), 54 27125 => array($lang_id_tab['CHAR_AURA_MAGE_ARMOR_RANK_4'],'Spell_MageArmor'), 55 30482 => array($lang_id_tab['CHAR_AURA_MOLTEN_ARMOR'],'Ability_Mage_MoltenArmor') 56 ); 57 58 function get_char_aura_name($id){ 59 global $lang_char_aura, $char_aura; 60 if( isset($char_aura[$id]) ) return $char_aura[$id][0]; 61 else return "Unknown"; 62 } 63 ?> -
minimanager/scripts/config.sample.php
r368 r374 12 12 */ 13 13 14 $version = "0.1 .6g";14 $version = "0.12"; 15 15 16 16 //---- SQL Configuration ---- … … 24 24 $db_type = "MySQL"; 25 25 26 $mmfpm_db = Array( 27 'addr' => "127.0.0.1:3306", //SQL server IP:port this DB located on 28 'user' => "root", //SQL server login this DB located on 29 'pass' => "", //SQL server pass this DB located on 30 'name' => "mmfpm", //realmd DB name 31 'encoding' => "utf8" //SQL connection encoding 32 ); 33 26 34 $realm_db = Array( 27 35 'addr' => "127.0.0.1:3306", //SQL server IP:port this realmd located on 28 36 'user' => "root", //SQL server login this realmd located on 29 'pass' => " pass", //SQL server pass this realmd located on37 'pass' => "", //SQL server pass this realmd located on 30 38 'name' => "realmd", //realmd DB name 31 39 'encoding' => "utf8" //SQL connection encoding 32 40 ); 41 33 42 $mangos_db = Array( 34 43 1 => array( //position in array must represent realmd ID … … 36 45 'addr' => "127.0.0.1:3306", //SQL server IP:port this DB located on 37 46 'user' => "root", //SQL server login this DB located on 38 'pass' => " pass", //SQL server pass this DB located on47 'pass' => "", //SQL server pass this DB located on 39 48 'name' => "mangos", //World Database name 40 49 'encoding' => "utf8" //SQL connection encoding … … 47 56 'addr' => "127.0.0.1:3306", //SQL server IP:port this DB located on 48 57 'user' => "root", //SQL server login this DB located on 49 'pass' => " pass", //SQL server pass this DB located on58 'pass' => "", //SQL server pass this DB located on 50 59 'name' => "characters", //Character Database name 51 60 'encoding' => "utf8", //SQL connection encoding … … 60 69 'term_type' => "SSH", //Terminal type - ("SSH"/"Telnet") 61 70 'term_port' => 22, //Terminal port 62 'rev' => "rev. 5297 SD269", //Mangos rev. used71 'rev' => "rev. 6360", //Mangos rev. used 63 72 'both_factions' => true //Allow to see opponent faction characters. Affects only players. 64 73 ), … … 81 90 //---- New account creation Options ---- 82 91 $disable_acc_creation = false; //true = Do not allow new accounts to be created 92 $expansion_select = false; //true = Shows option to select expansion or classic False = no option(TBC) enabled by default 93 $defaultoption = 1; //if the above is false then set what the default option will be (1 = TBC, 0 = Classic) 94 $enable_captcha = true; //false = no security image check (enable for protection against 'bot' registrations) 83 95 $send_mail_on_creation = false; //true = send mail at account creation. 84 96 $create_acc_locked = 0; //if set to '1' newly created accounts will be made locked to 0.0.0.0 IP disallowing user to login. … … 97 109 98 110 $css_template = "Sulfur"; //file/folder name of css tamplate to use from templates directory by default 99 $language = "enUS"; //default site language 100 $site_encoding = "iso-8859-1"; //default encoding 111 $language = "english"; //default site language 112 $tt_lang = "www"; //wowhead tooltip language.....choices are 'fr', 'de', 'es' (for 'en' use www) 113 $timezone = "UTC"; //default timezone (use your local timezone code) 101 114 102 115 //---- IRC Options ------ 103 116 $irc_cfg = array( 104 'server' => " irc.quakenet.org", //irc server117 'server' => "mangos.cjb.net", //irc server 105 118 'port' => 6667, //port 106 'channel' => " test" //channel119 'channel' => "minimanager" //channel 107 120 ); 108 121 109 122 //---- External Links ---- 110 $item_datasite = "http:// www.wowhead.com/?item=";111 $quest_datasite = "http:// www.wowhead.com/?quest=";112 $creature_datasite = "http:// www.wowhead.com/?npc=";113 $spell_datasite = "http:// www.wowhead.com/?spell=";114 $skill_datasite = "http:// www.wowhead.com/?spells=";115 $talent_datasite = "http:// wowhead.com/?spell=";123 $item_datasite = "http://$tt_lang.wowhead.com/?item="; 124 $quest_datasite = "http://$tt_lang.wowhead.com/?quest="; 125 $creature_datasite = "http://$tt_lang.wowhead.com/?npc="; 126 $spell_datasite = "http://$tt_lang.wowhead.com/?spell="; 127 $skill_datasite = "http://$tt_lang.wowhead.com/?spells="; 128 $talent_datasite = "http://$tt_lang.wowhead.com/?spell="; 116 129 $talent_calculator_datasite = "http://www.worldofwarcraft.com/info/classes"; 117 $go_datasite = "http:// www.wowhead.com/?object=";130 $go_datasite = "http://$tt_lang.wowhead.com/?object="; 118 131 $get_icons_from_web = true; //wherever to get icons from the web in case they are missing in /img/INV dir. 119 132 … … 124 137 $proxy_cfg = Array( 125 138 'addr' => "", //configure only if requierd 126 'port' => 80 80,139 'port' => 80, 127 140 'user' => "", 128 141 'pass' => "" 129 142 ); 130 143 131 //menu content by user level 144 // ---- Module and Security settings ---- 145 // -- Meaning of the columns : TARGET, LANG_TEXT, ( READ/VIEW , UPDATE , INSERT , DELETE ) min Permission GM LEVEL 146 // -- Files excluded for this : Login.php, Pomm.php 147 // -- - Both files don't use header.php, so we can't include this method.. but its not a big deal 148 // 149 // -- Permmissions are set, but only READ Permission used right now... 150 // -- - Updates will follow 151 // -- 152 // -- If not set or lower, higher permission from lower rights overwrite higher permission ( Example : VIEW = 5, UDDATE = 0 >> UPDATE = 5) 153 132 154 $menu_array = Array( 133 5 => array("SysOP" ,array( 134 array("index.php", 'main', array()), 135 array("#", 'users', array( 136 array("user.php", 'accounts'), 137 array("char_list.php", 'characters'), 138 array("guild.php", 'guilds'), 139 array("arenateam.php", 'arena_teams'), 140 array("honor.php", 'honor'), 141 array("banned.php", 'banned_list'), 142 array("cleanup.php", 'cleanup'), 143 array("stat.php", 'statistics'), 144 array("stat_on.php", 'statistics_on'), 145 array("javascript:void(0);\" onclick=\"window.open('./pomm/pomm.php', 'pomm', 'Toolbar=0, Location=0, Directories=0, Status=0, Menubar=0, Scrollbar=0, Resizable=0, Copyhistory=1, Width=784, Height=525')", 'player_map'), 146 ), 147 ), 148 array("#", 'tools', array( 149 array("ssh.php", 'ssh_line'), 150 array("run_patch.php", 'run_sql_patch'), 151 array("ticket.php", 'tickets'), 152 array("ahstats.php", 'auctionhouse'), 153 array("events.php", 'events'), 154 array("realm.php", 'realm'), 155 array("motd.php", 'add_motd'), 156 array("mail.php", 'mail'), 157 array("irc.php", 'irc'), 158 array("instances.php", 'instances'), 159 ), 160 ), 161 array("#", 'db', array( 162 array("item.php", 'items'), 163 array("creature.php", 'creatures'), 164 array("game_object.php", 'game_object'), 165 array("tele.php", 'teleports'), 166 array("command.php", 'command'), 167 array("backup.php", 'backup'), 168 array("repair.php", 'repair'), 169 ), 170 ), 171 array("#", 'forums', array( 172 array("forum.php", 'forums'), 173 array("javascript:void(0);\" onclick=\"window.open('./forum.html', 'forum')", 'forums'), 174 ), 175 ), 176 ) 177 ), 178 4 => array("Admin" ,array( 179 array("index.php", 'main', array()), 180 array("#", 'users', array( 181 array("user.php", 'accounts'), 182 array("char_list.php", 'characters'), 183 array("guild.php", 'guilds'), 184 array("arenateam.php", 'arena_teams'), 185 array("honor.php", 'honor'), 186 array("banned.php", 'banned_list'), 187 array("cleanup.php", 'cleanup'), 188 array("stat.php", 'statistics'), 189 array("stat_on.php", 'statistics_on'), 190 array("javascript:void(0);\" onclick=\"window.open('./pomm/pomm.php', 'pomm', 'Toolbar=0, Location=0, Directories=0, Status=0, Menubar=0, Scrollbar=0, Resizable=0, Copyhistory=1, Width=784, Height=525')", 'player_map'), 191 ), 192 ), 193 array("#", 'tools', array( 194 array("ssh.php", 'ssh_line'), 195 array("run_patch.php", 'run_sql_patch'), 196 array("ticket.php", 'tickets'), 197 array("ahstats.php", 'auctionhouse'), 198 array("events.php", 'events'), 199 array("realm.php", 'realm'), 200 array("motd.php", 'add_motd'), 201 array("mail.php", 'mail'), 202 array("irc.php", 'irc'), 203 array("instances.php", 'instances'), 204 ), 205 ), 206 array("#", 'db', array( 207 array("item.php", 'items'), 208 array("creature.php", 'creatures'), 209 array("game_object.php", 'game_object'), 210 array("tele.php", 'teleports'), 211 array("command.php", 'command'), 212 array("backup.php", 'backup'), 213 array("repair.php", 'repair'), 214 ), 215 ), 216 array("#", 'forums', array( 217 array("forum.php", 'forums'), 218 array("javascript:void(0);\" onclick=\"window.open('./forum.html', 'forum')", 'forums'), 219 ), 220 ), 221 ) 222 ), 223 3 => array("BugTracker" ,array( 224 array("index.php", 'main', array()), 225 array("#", 'users', array( 226 array("user.php", 'accounts'), 227 array("char_list.php", 'characters'), 228 array("guild.php", 'guilds'), 229 array("arenateam.php", 'arena_teams'), 230 array("honor.php", 'honor'), 231 array("banned.php", 'banned_list'), 232 array("cleanup.php", 'cleanup'), 233 array("stat.php", 'statistics'), 234 array("stat_on.php", 'statistics_on'), 235 array("javascript:void(0);\" onclick=\"window.open('./pomm/pomm.php', 'pomm', 'Toolbar=0, Location=0, Directories=0, Status=0, Menubar=0, Scrollbar=0, Resizable=0, Copyhistory=1, Width=784, Height=525')", 'player_map'), 236 ), 237 ), 238 array("#", 'tools', array( 239 array("ssh.php", 'ssh_line'), 240 array("run_patch.php", 'run_sql_patch'), 241 array("ticket.php", 'tickets'), 242 array("ahstats.php", 'auctionhouse'), 243 array("events.php", 'events'), 244 array("realm.php", 'realm'), 245 array("motd.php", 'add_motd'), 246 array("mail.php", 'mail'), 247 array("irc.php", 'irc'), 248 array("instances.php", 'instances'), 249 ), 250 ), 251 array("#", 'db', array( 252 array("item.php", 'items'), 253 array("creature.php", 'creatures'), 254 array("game_object.php", 'game_object'), 255 array("tele.php", 'teleports'), 256 array("command.php", 'command'), 257 array("backup.php", 'backup'), 258 array("repair.php", 'repair'), 259 ), 260 ), 261 array("#", 'forums', array( 262 array("forum.php", 'forums'), 263 array("javascript:void(0);\" onclick=\"window.open('./forum.html', 'forum')", 'forums'), 264 ), 265 ), 266 ) 267 ), 268 2 => array("GameMaster" ,array( 269 array("index.php", 'main', array()), 270 array("#", 'users', array( 271 array("user.php", 'accounts'), 272 array("char_list.php", 'characters'), 273 array("guild.php", 'guilds'), 274 array("arenateam.php", 'arena_teams'), 275 array("honor.php", 'honor'), 276 array("banned.php", 'banned_list'), 277 array("stat.php", 'statistics'), 278 array("stat_on.php", 'statistics_on'), 279 array("javascript:void(0);\" onclick=\"window.open('./pomm/pomm.php', 'pomm', 'Toolbar=0, Location=0, Directories=0, Status=0, Menubar=0, Scrollbar=0, Resizable=0, Copyhistory=1, Width=784, Height=525')", 'player_map'), 280 ), 281 ), 282 array("#", 'tools', array( 283 array("ticket.php", 'tickets'), 284 array("ahstats.php", 'auctionhouse'), 285 array("events.php", 'events'), 286 array("motd.php", 'add_motd'), 287 array("mail.php", 'mail'), 288 array("irc.php", 'irc'), 289 array("instances.php", 'instances'), 290 ), 291 ), 292 array("#", 'db', array( 293 array("item.php", 'items'), 294 array("creature.php", 'creatures'), 295 array("game_object.php", 'game_object'), 296 array("tele.php", 'teleports'), 297 array("command.php", 'command'), 298 ), 299 ), 300 array("#", 'forums', array( 301 array("forum.php", 'forums'), 302 array("javascript:void(0);\" onclick=\"window.open('./forum.html', 'forum')", 'forums'), 303 ), 304 ), 305 ) 306 ), 307 1 => array("Moderator" ,array( 308 array("index.php", 'main', array()), 309 310 array("#", 'forums', array( 311 array("forum.php", 'forums'), 312 array("javascript:void(0);\" onclick=\"window.open('./forum.html', 'forum')", 'forums'), 313 ), 314 ), 315 ) 316 ), 317 0 => array("Player" ,array( 318 array("index.php", 'main', array()), 319 array("#", 'users', array( 320 array("guild.php", 'guilds'), 321 array("arenateam.php", 'arena_teams'), 322 array("honor.php", 'honor'), 323 array("stat.php", 'statistics'), 324 array("stat_on.php", 'statistics_on'), 325 array("javascript:void(0);\" onclick=\"window.open('./pomm/pomm.php', 'pomm', 'Toolbar=0, Location=0, Directories=0, Status=0, Menubar=0, Scrollbar=0, Resizable=0, Copyhistory=1, Width=784, Height=525')", 'player_map'), 326 ), 327 ), 328 array("#", 'tools', array( 329 array("ahstats.php", 'auctionhouse'), 330 array("command.php", 'command'), 331 array("events.php", 'events'), 332 array("irc.php", 'irc'), 333 array("instances.php", 'instances'), 334 ), 335 ), 336 array("#", 'forums', array( 337 array("forum.php", 'forums'), 338 array("javascript:void(0);\" onclick=\"window.open('./forum.html', 'forum')", 'forums'), 339 ), 340 ), 341 ) 342 ), 343 344 ); 345 155 array("index.php", 'main', array()), 156 array("#", 'users', array( 157 array("user.php", 'accounts',1,0,0,0), 158 array("char_list.php", 'characters',1,0,0,0), 159 array("guild.php", 'guilds',0,0,0,0), 160 array("arenateam.php", 'arena_teams',0,0,0,0), 161 array("honor.php", 'honor',0,0,0,0), 162 array("banned.php", 'banned_list',1,0,0,0), 163 array("cleanup.php", 'cleanup',3,0,0,0), 164 array("stat.php", 'statistics',0,0,0,0), 165 array("javascript:void(0);\" onclick=\"window.open('./pomm/pomm.php', 'pomm', 'Toolbar=0, Location=0, Directories=0, Status=0, Menubar=0, Scrollbar=0, Resizable=0, Copyhistory=1, Width=784, Height=525')", 'player_map',0,0,0,0), 166 ), 167 ), 168 array("#", 'tools', array( 169 array("ssh.php", 'ssh_line',3,0,0,0), 170 array("run_patch.php", 'run_sql_patch',3,0,0,0), 171 array("ticket.php", 'tickets',1,0,0,0), 172 array("ahstats.php", 'auctionhouse',0,0,0,0), 173 array("events.php", 'events',0,0,0,0), 174 array("realm.php", 'realm',3,0,0,0), 175 array("motd.php", 'add_motd',1,0,0,0), 176 array("mail.php", 'mail',3,0,0,0), 177 array("irc.php", 'irc',0,0,0,0), 178 array("instances.php", 'instances',0,0,0,0), 179 ), 180 ), 181 array("#", 'db', array( 182 array("item.php", 'items',1,0,0,0), 183 array("creature.php", 'creatures',1,0,0,0), 184 array("game_object.php", 'game_object',1,0,0,0), 185 array("tele.php", 'teleports',1,0,0,0), 186 array("command.php", 'command',0,0,0,0), 187 array("backup.php", 'backup',3,0,0,0), 188 array("repair.php", 'repair',3,0,0,0), 189 ), 190 ), 191 array("#", 'forums', array( 192 array("forum.php", 'forums',0,0,0,0), 193 array("javascript:void(0);\" onclick=\"window.open('./forum.html', 'forum')", 'forums',0,0,0,0), 194 ), 195 ), 196 array("#", 'invisible', array( 197 array("char.php", 'character',0,0,0,0), 198 array("char_edit.php", 'char_edit',1,0,0,0), 199 array("edit.php", 'MyAccount',0,0,0,0), 200 array("index.php, 'Startpage'",0,0,0,0), 201 ), 202 ), 203 ); 204 346 205 $debug = false; //set to true if full php debugging requierd. 347 206 ?> -
minimanager/scripts/defines.php
r350 r374 59 59 define('CHAR_DATA_OFFSET_RANGE_CRIT',1321); 60 60 define('CHAR_DATA_OFFSET_SPELL_CRIT_PER',1323); 61 define('CHAR_DATA_OFFSET_GOLD',1 397);62 define('CHAR_DATA_OFFSET_HONOR_KILL',1 453);63 define('CHAR_DATA_OFFSET_HONOR_POINTS',1 498);64 define('CHAR_DATA_OFFSET_ARENA_POINTS',1 499);61 define('CHAR_DATA_OFFSET_GOLD',1461); 62 define('CHAR_DATA_OFFSET_HONOR_KILL',1517); 63 define('CHAR_DATA_OFFSET_HONOR_POINTS',1562); 64 define('CHAR_DATA_OFFSET_ARENA_POINTS',1563); 65 65 ?> -
minimanager/scripts/del_lib.php
r307 r374 113 113 114 114 $query = $sql_01->query("DELETE FROM guild_member WHERE guildid = '$guid'"); 115 $query = $sql_01->query("DELETE FROM guild_bank_eventlog WHERE guildid = '$guid'"); 116 $query = $sql_01->query("DELETE FROM guild_bank_right WHERE guildid = '$guid'"); 117 $query = $sql_01->query("DELETE FROM guild_bank_tab WHERE guildid = '$guid'"); 118 $query = $sql_01->query("DELETE FROM guild_eventlog WHERE guildid = '$guid'"); 119 $query = $sql_01->query("DELETE FROM item_instance WHERE guid IN (SELECT item_guid FROM guild_bank_item WHERE guildid ='$guid')"); 120 $query = $sql_01->query("DELETE FROM guild_bank_item WHERE guildid = '$guid'"); 115 121 116 122 if ($sql_01->affected_rows()){ -
minimanager/scripts/fact_tab.php
r5 r374 8 8 * License: GNU General Public License v2(GPL) 9 9 */ 10 11 $fact_id = Array( 12 // 0 1 2 3 4 5 6 7 8 9 10 11 13 //id => array(name,team,n,reputationListID,BaseRepMask1,BaseRepMask2,BaseRepMask3,BaseRepMask4,BaseRepValue1,BaseRepValue2,BaseRepValue3,BaseRepValue4) 14 54 => array("Gnomeregan Exiles","Alliance",1,18,1037,690,64,0,3100,-42000,4000,0), 15 72 => array("Stormwind","Alliance",1,19,1100,690,1,0,3100,-42000,4000,0), 16 47 => array("Ironforge","Alliance",1,20,1097,690,4,0,3100,-42000,4000,0), 17 69 => array("Darnassus","Alliance",1,21,1093,690,8,0,3100,-42000,4000,0), 18 930 => array("Exodar","Alliance",1,49,77,946,1024,0,3000,-42000,4000,0), 19 20 76 => array("Orgrimmar","Horde",2,14,160,1101,2,528,3100,-42000,4000,500), 21 530 => array("Darkspear Trolls","Horde",2,15,34,1101,528,128,3100,-42000,500,4000), 22 81 => array("Thunder Bluff","Horde",2,16,130,1101,528,32,3100,-42000,500,4000), 23 68 => array("Undercity","Horde",2,17,162,1101,16,512,500,-42000,4000,3100), 24 911 => array("Silvermoon City","Horde",2,55,162,1101,512,16,400,-42000,4000,3100), 25 26 730 => array("Stormpike Guard","Alliance Forces",3,40,1101,690,0,0,0,-42000,0,0), 27 890 => array("Silverwing Sentinels","Alliance Forces",3,45,1101,690,0,0,0,-42000,0,0), 28 509 => array("The League of Arathor","Alliance Forces",3,53,1101,690,0,0,0,-42000,0,0), 29 30 729 => array("Frostwolf Clan","Horde Forces",4,41,690,1101,0,0,0,-42000,0,0), 31 889 => array("Warsong Outriders","Horde Forces",4,46,690,1101,0,0,0,-42000,0,0), 32 510 => array("The Defilers","Horde Forces",4,52,690,1101,0,0,0,-42000,0,0), 33 34 21 => array("Booty Bay","Steamwheedle Cartel",5,1,1791,0,0,0,500,0,0,0), 35 369 => array("Gadgetzan","Steamwheedle Cartel",5,7,1791,0,0,0,500,0,0,0), 36 470 => array("Ratchet","Steamwheedle Cartel",5,9,1791,0,0,0,500,0,0,0), 37 577 => array("Everlook","Steamwheedle Cartel",5,28,1791,0,0,0,500,0,0,0), 38 39 947 => array("Thrallmar","Outland",6,37,690,1101,0,0,0,-42000,0,0), 40 946 => array("Honor Hold","Outland",6,38,1101,690,0,0,0,-42000,0,0), 41 933 => array("The Consortium","Outland",6,60,2047,0,0,0,0,0,0,0), 42 941 => array("The Mag'har","Outland",6,61,690,1101,0,0,-500,-42000,0,0), 43 942 => array("Cenarion Expedition","Outland",6,64,2047,0,0,0,0,0,0,0), 44 970 => array("Sporeggar","Outland",6,65,2047,0,0,0,-2500,0,0,0), 45 978 => array("Kurenai","Outland",6,66,1101,690,0,0,-1200,-42000,0,0), 46 1012 => array("Ashtongue Deathsworn","Outland",6,70,1791,0,0,0,0,0,0,0), 47 1015 => array("Netherwing","Outland",6,71,1791,0,0,0,-42000,0,0,0), 48 1038 => array("Ogri'la","Outland",6,73,1791,0,0,0,0,0,0,0), 49 50 935 => array("The Sha'tar","Shattrath City",7,39,1791,0,0,0,0,0,0,0), 51 932 => array("The Aldor","Shattrath City",7,58,255,1024,512,0,0,3500,-3500,0), 52 934 => array("The Scryers","Shattrath City",7,62,255,1024,512,0,0,-3500,3500,0), 53 1011 => array("Lower City","Shattrath City",7,69,32767,0,0,0,0,0,0,0), 54 1031 => array("Sha'tari Skyguard","Shattrath City",7,72,1791,0,0,0,0,0,0,0), 55 56 87 => array("Bloodsail Buccaneers","Other",8,0,1791,0,0,0,-6500,0,0,0), 57 92 => array("Gelkis Clan Centaur","Other",8,2,1791,0,0,0,2000,0,0,0), 58 93 => array("Magram Clan Centaur","Other",8,3,1791,0,0,0,2000,0,0,0), 59 59 => array("Thorium Brotherhood","Other",8,4,1791,0,0,0,0,0,0,0), 60 349 => array("Ravenholdt","Other",8,5,1791,0,0,0,0,0,0,0), 61 70 => array("Syndicate","Other",8,6,1791,0,0,0,-10000,0,0,0), 62 471 => array("Wildhammer Clan","Other",8,8,1097,690,4,0,150,-42000,500,0), 63 169 => array("Steamwheedle Cartel","Other",8,10,1791,0,0,0,500,0,0,0), 64 469 => array("Alliance","Other",8,11,1101,690,0,0,3300,-42000,0,0), 65 67 => array("Horde","Other",8,12,690,1101,0,0,3500,-42000,0,0), 66 529 => array("Argent Dawn","Other",8,13,1791,0,0,0,200,0,0,0), 67 86 => array(" Leatherworking - Dragonscale","Other",8,22,1791,0,0,0,2999,0,0,0), 68 83 => array(" Leatherworking - Elemental","Other",8,23,1791,0,0,0,2999,0,0,0), 69 549 => array(" Leatherworking - Tribal","Other",8,24,1791,0,0,0,2999,0,0,0), 70 551 => array(" Engineering - Gnome","Other",8,25,1791,0,0,0,2999,0,0,0), 71 550 => array(" Engineering - Goblin","Other",8,26,1791,0,0,0,2999,0,0,0), 72 589 => array("Wintersaber Trainers","Other",8,27,690,1101,0,0,-42000,0,0,0), 73 46 => array(" Blacksmithing - Armorsmithing","Other",8,29,1791,0,0,0,0,0,0,0), 74 289 => array(" Blacksmithing - Weaponsmithing","Other",8,30,1791,0,0,0,0,0,0,0), 75 570 => array(" Blacksmithing - Axesmithing","Other",8,31,1791,0,0,0,0,0,0,0), 76 571 => array(" Blacksmithing - Swordsmithing","Other",8,32,1791,0,0,0,0,0,0,0), 77 569 => array(" Blacksmithing - Hammersmithing","Other",8,33,1791,0,0,0,0,0,0,0), 78 574 => array("Caer Darrow","Other",8,34,1791,0,0,0,0,0,0,0), 79 576 => array("Timbermaw Hold","Other",8,35,1791,0,0,0,-3500,0,0,0), 80 609 => array("Cenarion Circle","Other",8,36,1791,40,0,0,0,2000,0,0), 81 749 => array("Hydraxian Waterlords","Other",8,42,1791,0,0,0,0,0,0,0), 82 980 => array("Outland","Other",8,43,0,0,0,0,0,0,0,0), 83 809 => array("Shen'dralar","Other",8,44,1791,0,0,0,0,0,0,0), 84 891 => array("Alliance Forces","Other",8,47,1101,178,0,0,0,-42000,0,0), 85 892 => array("Horde Forces","Other",8,48,690,77,0,0,0,-42000,0,0), 86 909 => array("Darkmoon Faire","Other",8,50,1791,0,0,0,0,0,0,0), 87 270 => array("Zandalar Tribe","Other",8,51,1791,0,0,0,0,0,0,0), 88 910 => array("Brood of Nozdormu","Other",8,54,1791,0,0,0,-42000,0,0,0), 89 922 => array("Tranquillien","Other",8,56,690,1101,0,0,0,-42000,0,0), 90 990 => array("The Scale of the Sands","Other",8,57,1791,0,0,0,0,0,0,0), 91 936 => array("Shattrath City","Other",8,59,2047,0,0,0,0,0,0,0), 92 967 => array("The Violet Eye","Other",8,63,4095,0,0,0,0,0,0,0), 93 989 => array("Keepers of Time","Other",8,67,1791,0,0,0,0,0,0,0), 94 1005 => array("Friendly, Hidden","Other",8,68,32767,0,0,0,3000,0,0,0) 95 ); 10 96 11 $fact_id = Array( 12 13 69 => array(69,"Darnassus","Alliance",1), 14 54 => array(54,"Gnomeregan Exiles","Alliance",1), 15 47 => array(47,"Ironforge","Alliance",1), 16 72 => array(72,"Stormwind","Alliance",1), 17 930 => array(930,"Exodar","Alliance",1), 18 19 530 => array(530,"Darkspear","Horde",2), 20 76 => array(76,"Orgrimmar","Horde",2), 21 81 => array(81,"Thunder Bluff","Horde",2), 22 68 => array(68,"Undercity","Horde",2), 23 911 => array(911,"Silvermoon City","Horde",2), 24 25 509 => array(509,"League of Arathor","Battleground Forces - Alliance",3), 26 890 => array(890,"Silverwing Sentinels","Battleground Forces - Alliance",3), 27 730 => array(730,"Stormpike Guard","Battleground Forces - Alliance",3), 28 29 510 => array(510,"Forsaken Defilers","Battleground Forces - Horde",4), 30 729 => array(729,"Frostwolf Clan","Battleground Forces - Horde",4), 31 889 => array(889,"Warsong Outriders","Battleground Forces - Horde",4), 32 33 21 => array(21,"Booty Bay","Steamwheedle Cartel",5), 34 577 => array(577,"Everlook","Steamwheedle Cartel",5), 35 369 => array(369,"Gadgetzan","Steamwheedle Cartel",5), 36 470 => array(470,"Ratchet","Steamwheedle Cartel",5), 37 38 1012 => array(1012,"Ashtongue Deathsworn","Outland",6), 39 942 => array(942,"Cenarion Expedition","Outland",6), 40 933 => array(933,"The Consortium","Outland",6), 41 946 => array(946,"Honor Hold Alliance Crest","Outland",6), 42 941 => array(941,"Mag'har Horde Crest","Outland",6), 43 978 => array(978,"Kurenai Alliance Crest","Outland",6), 44 1015 => array(1015,"Netherwing","Outland",6), 45 970 => array(970,"Sporeggar","Outland",6), 46 947 => array(947,"Thrallmar Horde Crest","Outland",6), 47 48 936 => array(936,"Lower City","Shattrath City",7), 49 932 => array(932,"The Aldor","Shattrath City",7), 50 934 => array(934,"The Scryers","Shattrath City",7), 51 935 => array(935,"The Sha'tar","Shattrath City",7), 52 53 529 => array(529,"Argent Dawn","Other",8), 54 87 => array(87,"Bloodsail Buccaneers","Other",8), 55 910 => array(910,"Brood of Nozdormu","Other",8), 56 609 => array(609,"Cenarion Circle","Other",8), 57 909 => array(909,"Darkmoon Faire","Other",8), 58 92 => array(92,"Gelkis Clan Centaur","Other",8), 59 749 => array(749,"Hydraxian Waterlords","Other",8), 60 989 => array(989,"Keepers of Time","Other",8), 61 93 => array(93,"Magram Clan Centaur","Other",8), 62 349 => array(349,"Ravenholdt","Other",8), 63 990 => array(990,"Scale of the Sands","Other",8), 64 809 => array(809,"Shen'dralar","Other",8), 65 70 => array(70,"Syndicate","Other",8), 66 59 => array(59,"Thorium Brotherhood","Other",8), 67 576 => array(576,"Timbermaw Hold","Other",8), 68 922 => array(922,"Tranquillien Horde Crest","Other",8), 69 471 => array(471,"Wildhammer Clan","Other",8), 70 589 => array(589,"Wintersaber Trainers","Other",8), 71 967 => array(967,"Violet Eye","Other",8), 72 270 => array(270,"Zandalar Tribe","Other",8) 73 ); 74 97 $reputation_rank_length = array(36000, 3000, 3000, 3000, 6000, 12000, 21000, 999); 98 $reputation_cap = 42999; 99 $reputation_bottom = -42000; 100 $reputation_rank = array( 0 => "Hated", 1 => "Hostile", 2 => "Unfriendly", 3 => "Neutral", 4 => "Friendly", 5 => "Honored", 6 => "Revered", 7 => "Exalted"); 101 $MIN_REPUTATION_RANK = 0; 102 $MAX_REPUTATION_RANK = 8; 75 103 76 104 function get_faction_name($fid){ 77 105 global $lang_id_tab, $fact_id; 78 if( isset($fact_id[$fid])) return $fact_id[$fid][ 1];106 if( isset($fact_id[$fid])) return $fact_id[$fid][0]; 79 107 else return($lang_id_tab['unknown']); 80 108 } … … 82 110 function get_faction_tree($fid){ 83 111 global $fact_id; 84 if( isset($fact_id[$fid])) return $fact_id[$fid][ 3];112 if( isset($fact_id[$fid])) return $fact_id[$fid][2]; 85 113 else return 0; 86 114 } 87 115 116 function get_base_reputation($fid, $race) 117 { 118 global $fact_id; 119 120 if(!isset($fact_id[$fid])) return 0; 121 122 for ($i = 0; $i < 4; $i++) 123 { 124 if ($fact_id[$fid][4 + $i] & (1 << ($race-1))) 125 return $fact_id[$fid][8 + $i]; 126 } 127 // in faction.dbc exist factions with (RepListId >=0, listed in character reputation list) with all BaseRepMask[i]==0 128 return 0; 129 } 130 131 function get_reputation($fid, $standing, $race) 132 { 133 return get_base_reputation($fid, $race) + $standing; 134 } 135 136 function get_reputation_rank($fid, $standing, $race) 137 { 138 $reputation = get_reputation($fid, $standing, $race); 139 return reputation_to_rank($reputation); 140 } 141 142 function get_reputation_at_rank($fid, $standing, $race) 143 { 144 $reputation = get_reputation($fid, $standing, $race); 145 return reputation_at_rank($reputation); 146 } 147 148 function get_base_reputation_rank($fid, $race) 149 { 150 $reputation = get_base_reputation($fid, $race); 151 return reputation_to_rank($reputation); 152 } 153 154 function reputation_to_rank($standing) 155 { 156 global $reputation_rank_length, $reputation_cap, $reputation_bottom, $reputation_rank, $MIN_REPUTATION_RANK, $MAX_REPUTATION_RANK; 157 158 $limit = $reputation_cap; 159 for ($i = $MAX_REPUTATION_RANK-1; $i >= $MIN_REPUTATION_RANK; --$i) 160 { 161 $limit -= $reputation_rank_length[$i]; 162 if ($standing >= $limit ) 163 return $i; 164 } 165 return $MIN_REPUTATION_RANK; 166 } 167 168 function reputation_at_rank($standing) 169 { 170 global $reputation_rank_length, $reputation_cap, $reputation_bottom, $reputation_rank, $MIN_REPUTATION_RANK, $MAX_REPUTATION_RANK; 171 172 $limit = $reputation_cap; 173 for ($i = $MAX_REPUTATION_RANK-1; $i >= $MIN_REPUTATION_RANK; --$i) 174 { 175 $limit -= $reputation_rank_length[$i]; 176 if ($standing >= $limit ) 177 return $standing - $limit; 178 } 179 return 0; 180 } 88 181 ?> -
minimanager/scripts/get_lib.php
r307 r374 10 10 11 11 //########################################################################################## 12 13 require_once("item_display_info.php"); 14 require_once("char_aura.php"); 15 12 16 //get name from realmlist.name 13 17 function get_realm_name($realm_id){ … … 22 26 $sql_0->close(); 23 27 return $realm_name; 28 } 29 30 //get displayid of item 31 function get_displayid($itemid) 32 { 33 global $lang_global, $realm_id, $mangos_db; 34 $sql_0 = new SQL; 35 $sql_0->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 36 $result = $sql_0->query("SELECT `displayid` FROM `item_template` WHERE `entry` = $itemid"); 37 if ($result) 38 $displayid = $sql_0->result($result, 0); 39 else 40 $diaplayid = 0; 41 $sql_0->close(); 42 return $displayid; 24 43 } 25 44 … … 107 126 $tooltip = ""; 108 127 109 switch ($item[35]) { 128 $itemname = htmlspecialchars($item[32]); 129 switch ($item[35]) { 110 130 case 0: //Grey Poor 111 $tooltip .= "<font color='#b2c2b9' class='large'>$item [32]</font><br />";131 $tooltip .= "<font color='#b2c2b9' class='large'>$itemname</font><br />"; 112 132 break; 113 133 case 1: //White Common 114 $tooltip .= "<font color='white' class='large'>$item [32]</font><br />";134 $tooltip .= "<font color='white' class='large'>$itemname</font><br />"; 115 135 break; 116 136 case 2: //Green Uncommon 117 $tooltip .= "<font color='#1eff00' class='large'>$item [32]</font><br />";137 $tooltip .= "<font color='#1eff00' class='large'>$itemname</font><br />"; 118 138 break; 119 139 case 3: //Blue Rare 120 $tooltip .= "<font color='#0070dd' class='large'>$item [32]</font><br />";140 $tooltip .= "<font color='#0070dd' class='large'>$itemname</font><br />"; 121 141 break; 122 142 case 4: //Purple Epic 123 $tooltip .= "<font color='#a335ee' class='large'>$item [32]</font><br />";143 $tooltip .= "<font color='#a335ee' class='large'>$itemname</font><br />"; 124 144 break; 125 145 case 5: //Orange Legendary 126 $tooltip .= "<font color='orange' class='large'>$item [32]</font><br />";146 $tooltip .= "<font color='orange' class='large'>$itemname</font><br />"; 127 147 break; 128 148 case 6: //Red Artifact 129 $tooltip .= "<font color='red' class='large'>$item [32]</font><br />";149 $tooltip .= "<font color='red' class='large'>$itemname</font><br />"; 130 150 break; 131 151 default: … … 653 673 654 674 function get_icon($itemid) { 655 global $proxy_cfg, $get_icons_from_web; 656 if (file_exists("img/INV/$itemid.jpg")) return "img/INV/$itemid.jpg"; 657 658 if($get_icons_from_web){ 659 //only customitems have ids in this range. 660 if ($itemid > 35000) return "img/INV/INV_blank_32.gif"; 661 662 $xmlfilepath="http://www.wowhead.com/?item="; 663 $proxy = $proxy_cfg['addr']; 664 $port = $proxy_cfg['port']; 665 666 if (empty($proxy_cfg['addr'])) { 667 $proxy = "www.wowhead.com"; 668 $xmlfilepath = "?item="; 669 $port = 80; 670 } 671 672 //get the icon name 673 $fp = @fsockopen($proxy, $port, $errno, $errstr, 0.4); 674 if (!$fp) return "img/INV/INV_blank_32.gif"; 675 $out = "GET $xmlfilepath$itemid HTTP/1.0\r\nHost: $proxy\r\n"; 676 if (!empty($proxy_cfg['user'])) $out .= "Proxy-Authorization: Basic ". base64_encode ("{$proxy_cfg['user']}:{$proxy_cfg['pass']}")."\r\n"; 677 $out .="Connection: Close\r\n\r\n"; 675 $displayid = get_displayid($itemid); 676 677 return get_icon_by($displayid, $itemid); 678 } 679 680 function get_icon_by($displayid, $itemid) 681 { 682 global $proxy_cfg, $get_icons_from_web, $item_display_info; 683 684 if ($displayid) 685 { 686 $item = $item_display_info[$displayid]; 687 if ($item && file_exists("img/item_icons/$item.jpg")) 688 return "img/item_icons/$item.jpg"; 689 else 690 $item = ''; 691 } 692 else $item = ''; 693 694 if($get_icons_from_web) 695 { 696 $xmlfilepath="http://www.wowhead.com/?item="; 697 $proxy = $proxy_cfg['addr']; 698 $port = $proxy_cfg['port']; 699 700 if (empty($proxy_cfg['addr'])) 701 { 702 $proxy = "www.wowhead.com"; 703 $xmlfilepath = "?item="; 704 $port = 80; 705 } 706 707 if ($item == '') 708 { 709 //get the icon name 710 $fp = @fsockopen($proxy, $port, $errno, $errstr, 0.4); 711 if (!$fp) return "img/INV/INV_blank_32.gif"; 712 $out = "GET /$xmlfilepath$itemid HTTP/1.0\r\nHost: www.wowhead.com\r\n"; 713 if (!empty($proxy_cfg['user'])) $out .= "Proxy-Authorization: Basic ". base64_encode ("{$proxy_cfg['user']}:{$proxy_cfg['pass']}")."\r\n"; 714 $out .="Connection: Close\r\n\r\n"; 678 715 679 716 $temp = ""; 680 fwrite($fp, $out); 681 while ($fp && !feof($fp)) $temp .= fgets($fp, 4096); 682 fclose($fp); 683 684 preg_match("~(Icon.create\('(.*?)')~", $temp, $temp); 685 if (!isset($temp[2])) return "img/INV/INV_blank_32.gif"; 686 $temp[2] = strtolower($temp[2]); 687 688 //get the icon itself 689 $fp = @fsockopen($proxy, $port, $errno, $errstr, 0.4); 690 if (!$fp) return "img/INV/INV_blank_32.gif"; 691 $file = (empty($proxy_cfg['addr'])) ? "/images/icons/medium/$temp[2].jpg" : "http://www.wowhead.com/images/icons/medium/$temp[2].jpg"; 692 $out = "GET $file HTTP/1.0\r\nHost: $proxy\r\n"; 693 if (!empty($proxy_cfg['user'])) $out .= "Proxy-Authorization: Basic ". base64_encode ("{$proxy_cfg['user']}:{$proxy_cfg['pass']}")."\r\n"; 694 $out .="Connection: Close\r\n\r\n"; 695 fwrite($fp, $out); 696 697 //remove header 698 while ($fp && !feof($fp)){ 699 $headerbuffer = fgets($fp, 4096); 700 if (urlencode($headerbuffer) == "%0D%0A") break; 701 } 702 703 $img_file = fopen("img/INV/$itemid.jpg", 'wb'); 704 while (!feof($fp)) fwrite($img_file,fgets($fp, 4096)); 705 fclose($fp); 706 fclose($img_file); 707 708 if (file_exists("img/INV/$itemid.jpg")) return "img/INV/$itemid.jpg"; 709 else return "img/INV/INV_blank_32.gif"; 710 711 } else return "img/INV/INV_blank_32.gif"; 717 fwrite($fp, $out); 718 while ($fp && !feof($fp)) $temp .= fgets($fp, 4096); 719 fclose($fp); 720 721 //ADDED: 722 $wowhead_string = $temp; 723 //ENDOF ADDED 724 725 //preg_match("~(Icon.create\('(.*?)')~", $temp, $temp); 726 //foxpl regexp: 727 //preg_match("Icon.create\('([^\']*?)", $temp, $temp); 728 729 // if (!isset($temp[2])) return "img/INV/INV_blank_32.gif"; 730 //$item = $temp[2]; 731 } 732 //$iconfilename = strtolower($item); 733 734 //ADDED: 735 //GETTING ICON NAME FROM WOWHEAD STRING: 736 $temp_string1 = strstr($wowhead_string, "Icon.create("); 737 $temp_string2 = substr($temp_string1, 12, 50); 738 $temp_string3 = strtok($temp_string2, ','); 739 $temp_string4 = substr($temp_string3, 1, strlen($temp_string3) - 2); 740 741 $icon_name = $temp_string4; 742 $item = $icon_name; 743 $iconfilename = strtolower($icon_name); 744 //ENDOF ADDED 745 746 //get the icon itself 747 if (empty($proxy_cfg['addr'])) 748 { 749 $proxy = "static.wowhead.com"; 750 $port = 80; 751 } 752 $fp = @fsockopen($proxy, $port, $errno, $errstr, 0.4); 753 if (!$fp) return "img/INV/INV_blank_32.gif"; 754 $file = "http://static.wowhead.com/images/icons/medium/$iconfilename.jpg"; 755 $out = "GET $file HTTP/1.0\r\nHost: static.wowhead.com\r\n"; 756 if (!empty($proxy_cfg['user'])) $out .= "Proxy-Authorization: Basic ". base64_encode ("{$proxy_cfg['user']}:{$proxy_cfg['pass']}")."\r\n"; 757 $out .="Connection: Close\r\n\r\n"; 758 fwrite($fp, $out); 759 760 //remove header 761 while ($fp && !feof($fp)) 762 { 763 $headerbuffer = fgets($fp, 4096); 764 if (urlencode($headerbuffer) == "%0D%0A") break; 765 } 766 767 if (file_exists("img/item_icons/$item.jpg")) return "img/item_icons/$item.jpg"; 768 769 $img_file = fopen("img/item_icons/$item.jpg", 'wb'); 770 while (!feof($fp)) fwrite($img_file,fgets($fp, 4096)); 771 fclose($fp); 772 fclose($img_file); 773 774 if (file_exists("img/item_icons/$item.jpg")) return "img/item_icons/$item.jpg"; 775 else return "img/INV/INV_blank_32.gif"; 776 } 777 else return "img/INV/INV_blank_32.gif"; 778 } 779 780 //########################################################################################## 781 //get aura icon - if icon not exists in Char_AURA folder D/L it from web. 782 783 function get_aura_icon($auraid) 784 { 785 global $proxy_cfg, $get_icons_from_web, $char_aura; 786 if ($auraid) 787 { 788 $aura = $char_aura[$auraid[1]]; 789 if ($aura && file_exists("img/Char_AURA/$aura.jpg")) return "img/Char_AURA/$aura.jpg"; 790 else 791 $aura = ''; 792 } 793 else $aura = ''; 794 795 if($get_icons_from_web) 796 { 797 $xmlfilepath="http://www.wowhead.com/?spell="; 798 $proxy = $proxy_cfg['addr']; 799 $port = $proxy_cfg['port']; 800 801 if (empty($proxy_cfg['addr'])) 802 { 803 $proxy = "www.wowhead.com"; 804 $xmlfilepath = "?spell="; 805 $port = 80; 806 } 807 808 if ($aura == '') 809 { 810 //get the icon name 811 $fp = @fsockopen($proxy, $port, $errno, $errstr, 0.4); 812 if (!$fp) return "img/INV/INV_blank_32.gif"; 813 $out = "GET /$xmlfilepath$auraid HTTP/1.0\r\nHost: www.wowhead.com\r\n"; 814 if (!empty($proxy_cfg['user'])) $out .= "Proxy-Authorization: Basic ". base64_encode ("{$proxy_cfg['user']}:{$proxy_cfg['pass']}")."\r\n"; 815 $out .="Connection: Close\r\n\r\n"; 816 817 $temp = ""; 818 fwrite($fp, $out); 819 while ($fp && !feof($fp)) $temp .= fgets($fp, 4096); 820 fclose($fp); 821 822 //ADDED 823 $wowhead_string = $temp; 824 //ENDOF ADDED 825 826 //preg_match("~(Icon.create\('(.*?)')~", $temp, $temp); 827 //foxpl regexp: 828 //preg_match("Icon.create\('([^\']*?)\'", $temp, $temp); 829 // $temp = "test"; 830 //if (!isset($temp[2])) return "img/INV/INV_blank_32.gif"; 831 //$aura = $temp[2]; 832 } 833 //$iconfilename = strtolower($aura); 834 835 //ADDED: 836 //GETTING ICON NAME FROM WOWHEAD STRING: 837 $temp_string1 = strstr($wowhead_string, "Icon.create("); 838 $temp_string2 = substr($temp_string1, 12, 50); 839 $temp_string3 = strtok($temp_string2, ','); 840 $temp_string4 = substr($temp_string3, 1, strlen($temp_string3) - 2); 841 842 $aura_icon_name = $temp_string4; 843 $aura = $aura_icon_name; 844 $iconfilename = strtolower($aura_icon_name); 845 //ENDOF ADDED 846 847 //get the icon itself 848 if (empty($proxy_cfg['addr'])) 849 { 850 $proxy = "static.wowhead.com"; 851 $port = 80; 852 } 853 $fp = @fsockopen($proxy, $port, $errno, $errstr, 0.4); 854 if (!$fp) return "img/INV/INV_blank_32.gif"; 855 $file = "http://static.wowhead.com/images/icons/medium/$iconfilename.jpg"; 856 $out = "GET $file HTTP/1.0\r\nHost: static.wowhead.com\r\n"; 857 if (!empty($proxy_cfg['user'])) $out .= "Proxy-Authorization: Basic ". base64_encode ("{$proxy_cfg['user']}:{$proxy_cfg['pass']}")."\r\n"; 858 $out .="Connection: Close\r\n\r\n"; 859 fwrite($fp, $out); 860 861 //remove header 862 while ($fp && !feof($fp)) 863 { 864 $headerbuffer = fgets($fp, 4096); 865 if (urlencode($headerbuffer) == "%0D%0A") break; 866 } 867 868 if (file_exists("img/Char_AURA/$aura.jpg")) return "img/Char_AURA/$aura.jpg"; 869 870 $img_file = fopen("img/Char_AURA/$aura.jpg", 'wb'); 871 while (!feof($fp)) fwrite($img_file,fgets($fp, 4096)); 872 fclose($fp); 873 fclose($img_file); 874 if (file_exists("img/Char_AURA/$aura.jpg")) return "img/Char_AURA/$aura.jpg"; 875 else 876 return "img/INV/INV_blank_32.gif"; 877 } 878 else return "img/INV/INV_blank_32.gif"; 712 879 } 713 880 … … 729 896 return "icon_border_0"; 730 897 } 898 899 // for calc next level xp 900 function xp_Diff($lvl) 901 { 902 if( $lvl < 29 ) 903 return 0; 904 if( $lvl == 29 ) 905 return 1; 906 if( $lvl == 30 ) 907 return 3; 908 if( $lvl == 31 ) 909 return 6; 910 else 911 return (5*($lvl-30)); 912 } 913 914 function mxp($lvl) 915 { 916 if ($lvl < 60) 917 { 918 return (45 + (5*$lvl)); 919 } 920 else 921 { 922 return (235 + (5*$lvl)); 923 } 924 } 925 926 function xp_to_level($lvl) 927 { 928 $RATE_XP_PAST_70 = 1; 929 $xp = 0; 930 if (lvl < 60) 931 { 932 $xp = (8*$lvl + xp_Diff($lvl)) * mxp($lvl); 933 } 934 else if ($lvl == 60) 935 { 936 $xp = (155 + mxp($lvl) * (1344 - 70 - ((69 - $lvl) * (7 + (69 - $lvl) * 8 - 1)/2))); 937 } 938 else if ($lvl < 70) 939 { 940 $xp = (155 + mxp($lvl) * (1344 - ((69-$lvl) * (7 + (69 - $lvl) * 8 - 1)/2))); 941 }else 942 { 943 // level higher than 70 is not supported 944 $xp = (779700 * (pow($RATE_XP_PAST_70, $lvl - 69))); 945 return (($xp < 0x7fffffff) ? $xp : 0x7fffffff); 946 } 947 948 // The $xp to Level is always rounded to the nearest 100 points (50 rounded to high). 949 $xp = (($xp + 50) / 100) * 100; // use additional () for prevent free association operations in C++ 950 951 if (($lvl > 10) && ($lvl < 60)) // compute discount added in 2.3.x 952 { 953 $discount = ($lvl < 28) ? ($lvl - 10) : 18; 954 $xp = ($xp * (100 - $discount)) / 100; // apply discount 955 $xp = ($xp / 100) * 100; // floor to hundreds 956 } 957 958 return $xp; 959 } 731 960 ?> -
minimanager/scripts/global_lib.php
r19 r374 14 14 //to avoid Strict Standards notices in php 5.1 15 15 if (function_exists ('date_default_timezone_set') ) { 16 date_default_timezone_set( 'UTC');16 date_default_timezone_set($timezone); 17 17 } 18 18 … … 41 41 function maketooltip($text, $link, $tip, $class, $target = "target=\"_self\"") { 42 42 global $output; 43 $output .="<a style=\"padding:2px;\" href=\"$link\" $target onmouseover=\"toolTip('".addslashes($tip)."','$class')\" onmouseout=\"toolTip()\">$text</a>"; 43 //COMMENTED OUT SINCE WE WANT WOWHEAD TOOLTIPS ONLY 44 //$output .="<a style=\"padding:2px;\" href=\"$link\" $target onmouseover=\"toolTip('".addslashes($tip)."','$class')\" onmouseout=\"toolTip()\">$text</a>"; 45 46 //ADDED: 47 $output .="<a style=\"padding:2px;\" href=\"$link\" $target>$text</a>"; 48 //ENDOF ADDED 44 49 } 45 50 … … 52 57 } else die('<meta http-equiv="refresh" content="0;URL='.$url.'" />'); 53 58 } 54 59 60 //work around for MSIE and wowhead tooltip display error 61 if (ereg("MSIE" , $_SERVER["HTTP_USER_AGENT"])) { 62 $tt_scrip = ""; 63 } else { 64 $tt_scrip = "http://www.wowhead.com/widgets/power.js"; 65 } 66 55 67 //########################################################################################## 56 68 // Generate paging navigation. -
minimanager/scripts/id_tab.php
r304 r374 96 96 565 => array(565,$lang_id_tab['gruuls_lair']), 97 97 566 => array(566,$lang_id_tab['netherstorm_arena']), 98 568 => array(568,$lang_id_tab['zulaman']) 98 568 => array(568,$lang_id_tab['zulaman']), 99 571 => array(571,$lang_id_tab['northrend']), 100 574 => array(574,$lang_id_tab['utgarde_keep']), 101 575 => array(575,$lang_id_tab['utgarde_pinnacle']), 102 576 => array(576,$lang_id_tab['nexus']), 103 578 => array(578,$lang_id_tab['oculus']), 104 580 => array(580,$lang_id_tab['sunwell_plateau']), 105 585 => array(585,$lang_id_tab['magisters_terrace']), 106 595 => array(595,$lang_id_tab['cot_stratholme_past']), 107 599 => array(599,$lang_id_tab['halls_of_stone']), 108 600 => array(600,$lang_id_tab['draktheron_keep']), 109 601 => array(601,$lang_id_tab['azjol_nerub']), 110 602 => array(602,$lang_id_tab['halls_of_lightning']), 111 603 => array(603,$lang_id_tab['ulduar']), 112 604 => array(604,$lang_id_tab['gundrak']) 113 114 99 115 ); 100 116 … … 124 140 case 5: 125 141 return($lang_id_tab['priest']); 142 break; 143 case 6: 144 return($lang_id_tab['death_knight']); 126 145 break; 127 146 case 7: … … 262 281 //get skill name by its id 263 282 $skill_id = Array( 283 773 => array(773,$lang_id_tab['SKILL_INSCRIPTION']), 264 284 762 => array(762,$lang_id_tab['SKILL_RIDING']), 265 285 759 => array(759,$lang_id_tab['SKILL_LANG_DRAENEI']), -
minimanager/scripts/pets.php
r321 r374 4 4 $pet_ability = Array( 5 5 // Bite 6 6 17253 => array(17253,$lang_id_tab['PET_ABILITY_BITE_RANK_1'],'1','bite.jpg'), 7 7 17255 => array(17255,$lang_id_tab['PET_ABILITY_BITE_RANK_2'],'4','bite.jpg'), 8 17256 => array(17256,$lang_id_tab['PET_ABILITY_BITE_RANK_3'],'7','bite.jpg'), 9 17257 => array(17257,$lang_id_tab['PET_ABILITY_BITE_RANK_4'],'10','bite.jpg'), 10 17258 => array(17258,$lang_id_tab['PET_ABILITY_BITE_RANK_5'],'13','bite.jpg'), 11 17259 => array(17259,$lang_id_tab['PET_ABILITY_BITE_RANK_6'],'17','bite.jpg'), 12 17260 => array(17260,$lang_id_tab['PET_ABILITY_BITE_RANK_7'],'21','bite.jpg'), 13 17261 => array(17261,$lang_id_tab['PET_ABILITY_BITE_RANK_8'],'25','bite.jpg'), 14 27050 => array(27050,$lang_id_tab['PET_ABILITY_BITE_RANK_9'],'29','bite.jpg'), 15 // Claw 16 16827 => array(16827,$lang_id_tab['PET_ABILITY_CLAW_RANK_1'],'1','claw.jpg'), 17 16828 => array(16828,$lang_id_tab['PET_ABILITY_CLAW_RANK_2'],'4','claw.jpg'), 18 16829 => array(16829,$lang_id_tab['PET_ABILITY_CLAW_RANK_3'],'7','claw.jpg'), 19 16830 => array(16830,$lang_id_tab['PET_ABILITY_CLAW_RANK_4'],'10','claw.jpg'), 20 16831 => array(16831,$lang_id_tab['PET_ABILITY_CLAW_RANK_5'],'13','claw.jpg'), 21 16832 => array(16832,$lang_id_tab['PET_ABILITY_CLAW_RANK_6'],'17','claw.jpg'), 22 3010 => array(3010,$lang_id_tab['PET_ABILITY_CLAW_RANK_7'],'21','claw.jpg'), 23 3009 => array(3009,$lang_id_tab['PET_ABILITY_CLAW_RANK_8'],'25','claw.jpg'), 24 27049 => array(27049,$lang_id_tab['PET_ABILITY_CLAW_RANK_9'],'29','claw.jpg'), 25 // Cobra Reflexes 26 25076 => array(25076,$lang_id_tab['PET_ABILITY_COBRA_REFLEXES'],'15','cobrareflexes.jpg'), 27 // Cower 28 1742 => array(1742,$lang_id_tab['PET_ABILITY_COWER_RANK_1'],'8','cower.jpg'), 29 1753 => array(1753,$lang_id_tab['PET_ABILITY_COWER_RANK_2'],'10','cower.jpg'), 30 1754 => array(1754,$lang_id_tab['PET_ABILITY_COWER_RANK_3'],'12','cower.jpg'), 31 1755 => array(1755,$lang_id_tab['PET_ABILITY_COWER_RANK_4'],'14','cower.jpg'), 32 1756 => array(1756,$lang_id_tab['PET_ABILITY_COWER_RANK_5'],'16','cower.jpg'), 33 16697 => array(16697,$lang_id_tab['PET_ABILITY_COWER_RANK_6'],'18','cower.jpg'), 34 27048 => array(27048,$lang_id_tab['PET_ABILITY_COWER_RANK_7'],'21','cower.jpg'), 35 // Dash 36 23099 => array(23099,$lang_id_tab['PET_ABILITY_DASH_RANK_1'],'15','dash.jpg'), 37 23109 => array(23109,$lang_id_tab['PET_ABILITY_DASH_RANK_2'],'20','dash.jpg'), 38 23110 => array(23110,$lang_id_tab['PET_ABILITY_DASH_RANK_3'],'25','dash.jpg'), 39 // Dive 40 23146 => array(23146,$lang_id_tab['PET_ABILITY_DIVE_RANK_1'],'15','dive.jpg'), 41 23149 => array(23149,$lang_id_tab['PET_ABILITY_DIVE_RANK_2'],'20','dive.jpg'), 42 23150 => array(23150,$lang_id_tab['PET_ABILITY_DIVE_RANK_3'],'25','dive.jpg'), 43 // Firebreath 44 34889 => array(34889,$lang_id_tab['PET_ABILITY_FIRE_BREATH_RANK_1'],'5','firebreath.jpg'), 45 35323 => array(35323,$lang_id_tab['PET_ABILITY_FIRE_BREATH_RANK_2'],'25','firebreath.jpg'), 46 // Furious howl 47 24609 => array(24609,$lang_id_tab['PET_ABILITY_FURIOUS_HOWL_RANK_1'],'10','furioushowl.jpg'), 48 24608 => array(24608,$lang_id_tab['PET_ABILITY_FURIOUS_HOWL_RANK_2'],'15','furioushowl.jpg'), 49 24607 => array(24607,$lang_id_tab['PET_ABILITY_FURIOUS_HOWL_RANK_3'],'20','furioushowl.jpg'), 50 24599 => array(24599,$lang_id_tab['PET_ABILITY_FURIOUS_HOWL_RANK_4'],'25','furioushowl.jpg'), 51 // Gore 52 35290 => array(35290,$lang_id_tab['PET_ABILITY_GORE_RANK_1'],'1','gore.jpg'), 53 35291 => array(35291,$lang_id_tab['PET_ABILITY_GORE_RANK_2'],'4','gore.jpg'), 54 35292 => array(35292,$lang_id_tab['PET_ABILITY_GORE_RANK_3'],'7','gore.jpg'), 55 35293 => array(35293,$lang_id_tab['PET_ABILITY_GORE_RANK_4'],'10','gore.jpg'), 56 35294 => array(35294,$lang_id_tab['PET_ABILITY_GORE_RANK_5'],'13','gore.jpg'), 57 35295 => array(35295,$lang_id_tab['PET_ABILITY_GORE_RANK_6'],'17','gore.jpg'), 58 35296 => array(35296,$lang_id_tab['PET_ABILITY_GORE_RANK_7'],'21','gore.jpg'), 59 35297 => array(35297,$lang_id_tab['PET_ABILITY_GORE_RANK_8'],'25','gore.jpg'), 60 35298 => array(35298,$lang_id_tab['PET_ABILITY_GORE_RANK_9'],'29','gore.jpg'), 61 // Growl 62 2649 => array(2649,$lang_id_tab['PET_ABILITY_GROWL_RANK_1'],'0','growl.jpg'), 63 14916 => array(14916,$lang_id_tab['PET_ABILITY_GROWL_RANK_2'],'0','growl.jpg'), 64 14917 => array(14917,$lang_id_tab['PET_ABILITY_GROWL_RANK_3'],'0','growl.jpg'), 65 14918 => array(14918,$lang_id_tab['PET_ABILITY_GROWL_RANK_4'],'0','growl.jpg'), 66 14919 => array(14919,$lang_id_tab['PET_ABILITY_GROWL_RANK_5'],'0','growl.jpg'), 67 14920 => array(14920,$lang_id_tab['PET_ABILITY_GROWL_RANK_6'],'0','growl.jpg'), 68 14921 => array(14921,$lang_id_tab['PET_ABILITY_GROWL_RANK_7'],'0','growl.jpg'), 69 27047 => array(27047,$lang_id_tab['PET_ABILITY_GROWL_RANK_8'],'0','growl.jpg'), 70 // Lightning breath 71 24845 => array(24845,$lang_id_tab['PET_ABILITY_LIGHTNING_BREATH_RANK_1'],'1','lightningbreath.jpg'), 72 25013 => array(25013,$lang_id_tab['PET_ABILITY_LIGHTNING_BREATH_RANK_2'],'5','lightningbreath.jpg'), 73 25014 => array(25014,$lang_id_tab['PET_ABILITY_LIGHTNING_BREATH_RANK_3'],'10','lightningbreath.jpg'), 74 25015 => array(25015,$lang_id_tab['PET_ABILITY_LIGHTNING_BREATH_RANK_4'],'15','lightningbreath.jpg'), 75 25016 => array(25016,$lang_id_tab['PET_ABILITY_LIGHTNING_BREATH_RANK_5'],'20','lightningbreath.jpg'), 76 25017 => array(25017,$lang_id_tab['PET_ABILITY_LIGHTNING_BREATH_RANK_5'],'25','lightningbreath.jpg'), 77 // Poison Spit 78 35388 => array(35388,$lang_id_tab['PET_ABILITY_POISON_SPIT_RANK_1'],'5','poisonspit.jpg'), 79 35390 => array(35390,$lang_id_tab['PET_ABILITY_POISON_SPIT_RANK_2'],'20','poisonspit.jpg'), 80 35391 => array(35391,$lang_id_tab['PET_ABILITY_POISON_SPIT_RANK_3'],'25','poisonspit.jpg'), 81 // Prowl 82 24451 => array(24451,$lang_id_tab['PET_ABILITY_PROWL_RANK_1'],'15','prowl.jpg'), 83 24454 => array(24454,$lang_id_tab['PET_ABILITY_PROWL_RANK_2'],'20','prowl.jpg'), 84 24455 => array(24455,$lang_id_tab['PET_ABILITY_PROWL_RANK_3'],'25','prowl.jpg'), 85 // Scorpid Poison 86 24641 => array(24455,$lang_id_tab['PET_ABILITY_SCORPID_POISON_RANK_1'],'10','scorpidpoison.jpg'), 87 24584 => array(24584,$lang_id_tab['PET_ABILITY_SCORPID_POISON_RANK_2'],'15','scorpidpoison.jpg'), 88 24588 => array(24588,$lang_id_tab['PET_ABILITY_SCORPID_POISON_RANK_3'],'20','scorpidpoison.jpg'), 89 24589 => array(24589,$lang_id_tab['PET_ABILITY_SCORPID_POISON_RANK_4'],'25','scorpidpoison.jpg'), 90 27361 => array(27361,$lang_id_tab['PET_ABILITY_SCORPID_POISON_RANK_5'],'29','scorpidpoison.jpg'), 91 // Screech 92 24424 => array(24424,$lang_id_tab['PET_ABILITY_SCREECH_RANK_1'],'10','screech.jpg'), 93 24580 => array(24580,$lang_id_tab['PET_ABILITY_SCREECH_RANK_2'],'15','screech.jpg'), 94 24581 => array(24581,$lang_id_tab['PET_ABILITY_SCREECH_RANK_3'],'20','screech.jpg'), 95 24582 => array(24582,$lang_id_tab['PET_ABILITY_SCREECH_RANK_4'],'25','screech.jpg'), 96 27349 => array(27349,$lang_id_tab['PET_ABILITY_SCREECH_RANK_5'],'29','screech.jpg'), 97 // Shell Shield 98 26064 => array(26064,$lang_id_tab['PET_ABILITY_SHELL_SHIELD'],'15','shellshield.jpg'), 99 // Thunderstomp 100 26094 => array(26094,$lang_id_tab['PET_ABILITY_THUNDERSTOMP_RANK_1'],'15','thunderstomp.jpg'), 101 26189 => array(26189,$lang_id_tab['PET_ABILITY_THUNDERSTOMP_RANK_2'],'20','thunderstomp.jpg'), 102 26190 => array(26190,$lang_id_tab['PET_ABILITY_THUNDERSTOMP_RANK_3'],'25','thunderstomp.jpg'), 103 27366 => array(27366,$lang_id_tab['PET_ABILITY_THUNDERSTOMP_RANK_4'],'29','thunderstomp.jpg'), 104 // Warp 105 35348 => array(35348,$lang_id_tab['PET_ABILITY_WARP'],'1','warp.jpg'), 106 // Great Stamina 107 4195 => array(4195,$lang_id_tab['PET_ABILITY_GREAT_STAMINA_RANK_1'],'5','greatstamina.jpg'), 108 4196 => array(4196,$lang_id_tab['PET_ABILITY_GREAT_STAMINA_RANK_2'],'10','greatstamina.jpg'), 109 4197 => array(4197,$lang_id_tab['PET_ABILITY_GREAT_STAMINA_RANK_3'],'15','greatstamina.jpg'), 110 4198 => array(4198,$lang_id_tab['PET_ABILITY_GREAT_STAMINA_RANK_4'],'25','greatstamina.jpg'), 111 4199 => array(4199,$lang_id_tab['PET_ABILITY_GREAT_STAMINA_RANK_5'],'50','greatstamina.jpg'), 112 4200 => array(4200,$lang_id_tab['PET_ABILITY_GREAT_STAMINA_RANK_6'],'75','greatstamina.jpg'), 113 4201 => array(4201,$lang_id_tab['PET_ABILITY_GREAT_STAMINA_RANK_7'],'100','greatstamina.jpg'), 114 4202 => array(4202,$lang_id_tab['PET_ABILITY_GREAT_STAMINA_RANK_8'],'125','greatstamina.jpg'), 115 5048 => array(5048,$lang_id_tab['PET_ABILITY_GREAT_STAMINA_RANK_9'],'150','greatstamina.jpg'), 116 5049 => array(5049,$lang_id_tab['PET_ABILITY_GREAT_STAMINA_RANK_10'],'185','greatstamina.jpg'), 117 27364 => array(27364,$lang_id_tab['PET_ABILITY_GREAT_STAMINA_RANK_11'],'215','greatstamina.jpg'), 118 // Natural Armor 119 24574 => array(24574,$lang_id_tab['PET_ABILITY_NATURAL_ARMOR_RANK_1'],'1','naturalarmor.jpg'), 120 24556 => array(24574,$lang_id_tab['PET_ABILITY_NATURAL_ARMOR_RANK_2'],'5','naturalarmor.jpg'), 121 24557 => array(24574,$lang_id_tab['PET_ABILITY_NATURAL_ARMOR_RANK_3'],'10','naturalarmor.jpg'), 122 24558 => array(24574,$lang_id_tab['PET_ABILITY_NATURAL_ARMOR_RANK_4'],'15','naturalarmor.jpg'), 123 24559 => array(24574,$lang_id_tab['PET_ABILITY_NATURAL_ARMOR_RANK_5'],'25','naturalarmor.jpg'), 124 24560 => array(24574,$lang_id_tab['PET_ABILITY_NATURAL_ARMOR_RANK_6'],'50','naturalarmor.jpg'), 125 24561 => array(24574,$lang_id_tab['PET_ABILITY_NATURAL_ARMOR_RANK_7'],'75','naturalarmor.jpg'), 126 24562 => array(24574,$lang_id_tab['PET_ABILITY_NATURAL_ARMOR_RANK_8'],'100','naturalarmor.jpg'), 127 24631 => array(24574,$lang_id_tab['PET_ABILITY_NATURAL_ARMOR_RANK_9'],'125','naturalarmor.jpg'), 128 24632 => array(24574,$lang_id_tab['PET_ABILITY_NATURAL_ARMOR_RANK_10'],'150','naturalarmor.jpg'), 129 27362 => array(24574,$lang_id_tab['PET_ABILITY_NATURAL_ARMOR_RANK_11'],'175','naturalarmor.jpg'), 130 // Arcane Resist 131 24495 => array(24495,$lang_id_tab['PET_ABILITY_ARCANE_RESIST_RANK_1'],'5','arcaneresist.jpg'), 132 24508 => array(24508,$lang_id_tab['PET_ABILITY_ARCANE_RESIST_RANK_2'],'15','arcaneresist.jpg'), 133 24509 => array(24509,$lang_id_tab['PET_ABILITY_ARCANE_RESIST_RANK_3'],'45','arcaneresist.jpg'), 134 24510 => array(24510,$lang_id_tab['PET_ABILITY_ARCANE_RESIST_RANK_4'],'90','arcaneresist.jpg'), 135 27350 => array(27350,$lang_id_tab['PET_ABILITY_ARCANE_RESIST_RANK_5'],'105','arcaneresist.jpg'), 136 // Fire Resist 137 24440 => array(24440,$lang_id_tab['PET_ABILITY_FIRE_RESIST_RANK_1'],'5','fireresist.jpg'), 138 24441 => array(24441,$lang_id_tab['PET_ABILITY_FIRE_RESIST_RANK_2'],'15','fireresist.jpg'), 139 24463 => array(24463,$lang_id_tab['PET_ABILITY_FIRE_RESIST_RANK_3'],'45','fireresist.jpg'), 140 24464 => array(24464,$lang_id_tab['PET_ABILITY_FIRE_RESIST_RANK_4'],'90','fireresist.jpg'), 141 27351 => array(27351,$lang_id_tab['PET_ABILITY_FIRE_RESIST_RANK_5'],'105','fireresist.jpg'), 142 // Frost Resist 143 24475 => array(24475,$lang_id_tab['PET_ABILITY_FROST_RESIST_RANK_1'],'5','frostresist.jpg'), 144 24476 => array(24476,$lang_id_tab['PET_ABILITY_FROST_RESIST_RANK_2'],'15','frostresist.jpg'), 145 24477 => array(24477,$lang_id_tab['PET_ABILITY_FROST_RESIST_RANK_3'],'45','frostresist.jpg'), 146 24478 => array(24478,$lang_id_tab['PET_ABILITY_FROST_RESIST_RANK_4'],'90','frostresist.jpg'), 147 27352 => array(27352,$lang_id_tab['PET_ABILITY_FROST_RESIST_RANK_5'],'105','frostresist.jpg'), 148 // Nature Resist 149 24494 => array(24494,$lang_id_tab['PET_ABILITY_NATURE_RESIST_RANK_1'],'5','natureresist.jpg'), 150 24511 => array(24511,$lang_id_tab['PET_ABILITY_NATURE_RESIST_RANK_2'],'15','natureresist.jpg'), 151 24512 => array(24512,$lang_id_tab['PET_ABILITY_NATURE_RESIST_RANK_3'],'45','natureresist.jpg'), 152 24513 => array(24513,$lang_id_tab['PET_ABILITY_NATURE_RESIST_RANK_4'],'90','natureresist.jpg'), 153 27354 => array(27354,$lang_id_tab['PET_ABILITY_NATURE_RESIST_RANK_5'],'105','natureresist.jpg'), 154 // Shadow Resist 155 24490 => array(24490,$lang_id_tab['PET_ABILITY_SHADOW_RESIST_RANK_1'],'5','shadowresist.jpg'), 156 24514 => array(24514,$lang_id_tab['PET_ABILITY_SHADOW_RESIST_RANK_2'],'15','shadowresist.jpg'), 157 24515 => array(24515,$lang_id_tab['PET_ABILITY_SHADOW_RESIST_RANK_3'],'45','shadowresist.jpg'), 158 24516 => array(24516,$lang_id_tab['PET_ABILITY_SHADOW_RESIST_RANK_4'],'90','shadowresist.jpg'), 159 27353 => array(27353,$lang_id_tab['PET_ABILITY_SHADOW_RESIST_RANK_5'],'105','shadowresist.jpg'), 160 // Avoidance 161 35699 => array(35699,$lang_id_tab['PET_ABILITY_AVOIDANCE_RANK_1'],'15','avoidance.jpg'), 162 35700 => array(35700,$lang_id_tab['PET_ABILITY_AVOIDANCE_RANK_2'],'25','avoidance.jpg') 163 ); 164 165 function get_pet_ability_name($id){ 166 global $lang_pet_ability, $pet_ability; 167 if( isset($pet_ability[$id]) ) return $pet_ability[$id][1]; 168 else return "Unknown"; 169 } 170 function get_pet_ability_trainvalue($id){ 171 global $lang_pet_ability, $pet_ability; 172 if( isset($pet_ability[$id][2]) ) return $pet_ability[$id][2]; 173 else return 0; 174 } 175 176 function get_pet_ability_image($id){ 177 global $lang_pet_ability, $pet_ability; 178 if( isset($pet_ability[$id][3]) ) return $pet_ability[$id][3]; 179 else return 'missing.jpg'; 180 } 181 182 183 ?> 184 8 17256 => array(17256,$lang_id_tab['PET_ABILITY_BITE_RANK_3'],'7','bite.jpg'), 9 17257 => array(17257,$lang_id_tab['PET_ABILITY_BITE_RANK_4'],'10','bite.jpg'), 10 17258 => array(17258,$lang_id_tab['PET_ABILITY_BITE_RANK_5'],'13','bite.jpg'), 11 17259 => array(17259,$lang_id_tab['PET_ABILITY_BITE_RANK_6'],'17','bite.jpg'), 12 17260 => array(17260,$lang_id_tab['PET_ABILITY_BITE_RANK_7'],'21','bite.jpg'), 13 17261 => array(17261,$lang_id_tab['PET_ABILITY_BITE_RANK_8'],'25','bite.jpg'), 14 27050 => array(27050,$lang_id_tab['PET_ABILITY_BITE_RANK_9'],'29','bite.jpg'), 15 // Claw 16 16827 => array(16827,$lang_id_tab['PET_ABILITY_CLAW_RANK_1'],'1','claw.jpg'), 17 16828 => array(16828,$lang_id_tab['PET_ABILITY_CLAW_RANK_2'],'4','claw.jpg'), 18 16829 => array(16829,$lang_id_tab['PET_ABILITY_CLAW_RANK_3'],'7','claw.jpg'), 19 16830 => array(16830,$lang_id_tab['PET_ABILITY_CLAW_RANK_4'],'10','claw.jpg'), 20 16831 => array(16831,$lang_id_tab['PET_ABILITY_CLAW_RANK_5'],'13','claw.jpg'), 21 16832 => array(16832,$lang_id_tab['PET_ABILITY_CLAW_RANK_6'],'17','claw.jpg'), 22 3010 => array(3010,$lang_id_tab['PET_ABILITY_CLAW_RANK_7'],'21','claw.jpg'), 23 3009 => array(3009,$lang_id_tab['PET_ABILITY_CLAW_RANK_8'],'25','claw.jpg'), 24 27049 => array(27049,$lang_id_tab['PET_ABILITY_CLAW_RANK_9'],'29','claw.jpg'), 25 // Cobra Reflexes 26 25076 => array(25076,$lang_id_tab['PET_ABILITY_COBRA_REFLEXES'],'15','cobrareflexes.jpg'), 27 // Cower 28 1742 => array(1742,$lang_id_tab['PET_ABILITY_COWER_RANK_1'],'8','cower.jpg'), 29 1753 => array(1753,$lang_id_tab['PET_ABILITY_COWER_RANK_2'],'10','cower.jpg'), 30 1754 => array(1754,$lang_id_tab['PET_ABILITY_COWER_RANK_3'],'12','cower.jpg'), 31 1755 => array(1755,$lang_id_tab['PET_ABILITY_COWER_RANK_4'],'14','cower.jpg'), 32 1756 => array(1756,$lang_id_tab['PET_ABILITY_COWER_RANK_5'],'16','cower.jpg'), 33 16697 => array(16697,$lang_id_tab['PET_ABILITY_COWER_RANK_6'],'18','cower.jpg'), 34 27048 => array(27048,$lang_id_tab['PET_ABILITY_COWER_RANK_7'],'21','cower.jpg'), 35 // Dash 36 23099 => array(23099,$lang_id_tab['PET_ABILITY_DASH_RANK_1'],'15','dash.jpg'), 37 23109 => array(23109,$lang_id_tab['PET_ABILITY_DASH_RANK_2'],'20','dash.jpg'), 38 23110 => array(23110,$lang_id_tab['PET_ABILITY_DASH_RANK_3'],'25','dash.jpg'), 39 // Dive 40 23146 => array(23146,$lang_id_tab['PET_ABILITY_DIVE_RANK_1'],'15','dive.jpg'), 41 23149 => array(23149,$lang_id_tab['PET_ABILITY_DIVE_RANK_2'],'20','dive.jpg'), 42 23150 => array(23150,$lang_id_tab['PET_ABILITY_DIVE_RANK_3'],'25','dive.jpg'), 43 // Firebreath 44 34889 => array(34889,$lang_id_tab['PET_ABILITY_FIRE_BREATH_RANK_1'],'5','firebreath.jpg'), 45 35323 => array(35323,$lang_id_tab['PET_ABILITY_FIRE_BREATH_RANK_2'],'25','firebreath.jpg'), 46 // Furious howl 47 24609 => array(24609,$lang_id_tab['PET_ABILITY_FURIOUS_HOWL_RANK_1'],'10','furioushowl.jpg'), 48 24608 => array(24608,$lang_id_tab['PET_ABILITY_FURIOUS_HOWL_RANK_2'],'15','furioushowl.jpg'), 49 24607 => array(24607,$lang_id_tab['PET_ABILITY_FURIOUS_HOWL_RANK_3'],'20','furioushowl.jpg'), 50 24599 => array(24599,$lang_id_tab['PET_ABILITY_FURIOUS_HOWL_RANK_4'],'25','furioushowl.jpg'), 51 // Gore 52 35290 => array(35290,$lang_id_tab['PET_ABILITY_GORE_RANK_1'],'1','gore.jpg'), 53 35291 => array(35291,$lang_id_tab['PET_ABILITY_GORE_RANK_2'],'4','gore.jpg'), 54 35292 => array(35292,$lang_id_tab['PET_ABILITY_GORE_RANK_3'],'7','gore.jpg'), 55 35293 => array(35293,$lang_id_tab['PET_ABILITY_GORE_RANK_4'],'10','gore.jpg'), 56 35294 => array(35294,$lang_id_tab['PET_ABILITY_GORE_RANK_5'],'13','gore.jpg'), 57 35295 => array(35295,$lang_id_tab['PET_ABILITY_GORE_RANK_6'],'17','gore.jpg'), 58 35296 => array(35296,$lang_id_tab['PET_ABILITY_GORE_RANK_7'],'21','gore.jpg'), 59 35297 => array(35297,$lang_id_tab['PET_ABILITY_GORE_RANK_8'],'25','gore.jpg'), 60 35298 => array(35298,$lang_id_tab['PET_ABILITY_GORE_RANK_9'],'29','gore.jpg'), 61 // Growl 62 2649 => array(2649,$lang_id_tab['PET_ABILITY_GROWL_RANK_1'],'0','growl.jpg'), 63 14916 => array(14916,$lang_id_tab['PET_ABILITY_GROWL_RANK_2'],'0','growl.jpg'), 64 14917 => array(14917,$lang_id_tab['PET_ABILITY_GROWL_RANK_3'],'0','growl.jpg'), 65 14918 => array(14918,$lang_id_tab['PET_ABILITY_GROWL_RANK_4'],'0','growl.jpg'), 66 14919 => array(14919,$lang_id_tab['PET_ABILITY_GROWL_RANK_5'],'0','growl.jpg'), 67 14920 => array(14920,$lang_id_tab['PET_ABILITY_GROWL_RANK_6'],'0','growl.jpg'), 68 14921 => array(14921,$lang_id_tab['PET_ABILITY_GROWL_RANK_7'],'0','growl.jpg'), 69 27047 => array(27047,$lang_id_tab['PET_ABILITY_GROWL_RANK_8'],'0','growl.jpg'), 70 // Lightning breath 71 24845 => array(24845,$lang_id_tab['PET_ABILITY_LIGHTNING_BREATH_RANK_1'],'1','lightningbreath.jpg'), 72 25013 => array(25013,$lang_id_tab['PET_ABILITY_LIGHTNING_BREATH_RANK_2'],'5','lightningbreath.jpg'), 73 25014 => array(25014,$lang_id_tab['PET_ABILITY_LIGHTNING_BREATH_RANK_3'],'10','lightningbreath.jpg'), 74 25015 => array(25015,$lang_id_tab['PET_ABILITY_LIGHTNING_BREATH_RANK_4'],'15','lightningbreath.jpg'), 75 25016 => array(25016,$lang_id_tab['PET_ABILITY_LIGHTNING_BREATH_RANK_5'],'20','lightningbreath.jpg'), 76 25017 => array(25017,$lang_id_tab['PET_ABILITY_LIGHTNING_BREATH_RANK_5'],'25','lightningbreath.jpg'), 77 // Poison Spit 78 35388 => array(35388,$lang_id_tab['PET_ABILITY_POISON_SPIT_RANK_1'],'5','poisonspit.jpg'), 79 35390 => array(35390,$lang_id_tab['PET_ABILITY_POISON_SPIT_RANK_2'],'20','poisonspit.jpg'), 80 35391 => array(35391,$lang_id_tab['PET_ABILITY_POISON_SPIT_RANK_3'],'25','poisonspit.jpg'), 81 // Prowl 82 24451 => array(24451,$lang_id_tab['PET_ABILITY_PROWL_RANK_1'],'15','prowl.jpg'), 83 24454 => array(24454,$lang_id_tab['PET_ABILITY_PROWL_RANK_2'],'20','prowl.jpg'), 84 24455 => array(24455,$lang_id_tab['PET_ABILITY_PROWL_RANK_3'],'25','prowl.jpg'), 85 // Scorpid Poison 86 24641 => array(24455,$lang_id_tab['PET_ABILITY_SCORPID_POISON_RANK_1'],'10','scorpidpoison.jpg'), 87 24584 => array(24584,$lang_id_tab['PET_ABILITY_SCORPID_POISON_RANK_2'],'15','scorpidpoison.jpg'), 88 24588 => array(24588,$lang_id_tab['PET_ABILITY_SCORPID_POISON_RANK_3'],'20','scorpidpoison.jpg'), 89 24589 => array(24589,$lang_id_tab['PET_ABILITY_SCORPID_POISON_RANK_4'],'25','scorpidpoison.jpg'), 90 27361 => array(27361,$lang_id_tab['PET_ABILITY_SCORPID_POISON_RANK_5'],'29','scorpidpoison.jpg'), 91 // Screech 92 24424 => array(24424,$lang_id_tab['PET_ABILITY_SCREECH_RANK_1'],'10','screech.jpg'), 93 24580 => array(24580,$lang_id_tab['PET_ABILITY_SCREECH_RANK_2'],'15','screech.jpg'), 94 24581 => array(24581,$lang_id_tab['PET_ABILITY_SCREECH_RANK_3'],'20','screech.jpg'), 95 24582 => array(24582,$lang_id_tab['PET_ABILITY_SCREECH_RANK_4'],'25','screech.jpg'), 96 27349 => array(27349,$lang_id_tab['PET_ABILITY_SCREECH_RANK_5'],'29','screech.jpg'), 97 // Shell Shield 98 26064 => array(26064,$lang_id_tab['PET_ABILITY_SHELL_SHIELD'],'15','shellshield.jpg'), 99 // Thunderstomp 100 26094 => array(26094,$lang_id_tab['PET_ABILITY_THUNDERSTOMP_RANK_1'],'15','thunderstomp.jpg'), 101 26189 => array(26189,$lang_id_tab['PET_ABILITY_THUNDERSTOMP_RANK_2'],'20','thunderstomp.jpg'), 102 26190 => array(26190,$lang_id_tab['PET_ABILITY_THUNDERSTOMP_RANK_3'],'25','thunderstomp.jpg'), 103 27366 => array(27366,$lang_id_tab['PET_ABILITY_THUNDERSTOMP_RANK_4'],'29','thunderstomp.jpg'), 104 // Warp 105 35348 => array(35348,$lang_id_tab['PET_ABILITY_WARP'],'1','warp.jpg'), 106 // Great Stamina 107 4195 => array(4195,$lang_id_tab['PET_ABILITY_GREAT_STAMINA_RANK_1'],'5','greatstamina.jpg'), 108 4196 => array(4196,$lang_id_tab['PET_ABILITY_GREAT_STAMINA_RANK_2'],'10','greatstamina.jpg'), 109 4197 => array(4197,$lang_id_tab['PET_ABILITY_GREAT_STAMINA_RANK_3'],'15','greatstamina.jpg'), 110 4198 => array(4198,$lang_id_tab['PET_ABILITY_GREAT_STAMINA_RANK_4'],'25','greatstamina.jpg'), 111 4199 => array(4199,$lang_id_tab['PET_ABILITY_GREAT_STAMINA_RANK_5'],'50','greatstamina.jpg'), 112 4200 => array(4200,$lang_id_tab['PET_ABILITY_GREAT_STAMINA_RANK_6'],'75','greatstamina.jpg'), 113 4201 => array(4201,$lang_id_tab['PET_ABILITY_GREAT_STAMINA_RANK_7'],'100','greatstamina.jpg'), 114 4202 => array(4202,$lang_id_tab['PET_ABILITY_GREAT_STAMINA_RANK_8'],'125','greatstamina.jpg'), 115 5048 => array(5048,$lang_id_tab['PET_ABILITY_GREAT_STAMINA_RANK_9'],'150','greatstamina.jpg'), 116 5049 => array(5049,$lang_id_tab['PET_ABILITY_GREAT_STAMINA_RANK_10'],'185','greatstamina.jpg'), 117 27364 => array(27364,$lang_id_tab['PET_ABILITY_GREAT_STAMINA_RANK_11'],'215','greatstamina.jpg'), 118 // Natural Armor 119 24574 => array(24574,$lang_id_tab['PET_ABILITY_NATURAL_ARMOR_RANK_1'],'1','naturalarmor.jpg'), 120 24556 => array(24574,$lang_id_tab['PET_ABILITY_NATURAL_ARMOR_RANK_2'],'5','naturalarmor.jpg'), 121 24557 => array(24574,$lang_id_tab['PET_ABILITY_NATURAL_ARMOR_RANK_3'],'10','naturalarmor.jpg'), 122 24558 => array(24574,$lang_id_tab['PET_ABILITY_NATURAL_ARMOR_RANK_4'],'15','naturalarmor.jpg'), 123 24559 => array(24574,$lang_id_tab['PET_ABILITY_NATURAL_ARMOR_RANK_5'],'25','naturalarmor.jpg'), 124 24560 => array(24574,$lang_id_tab['PET_ABILITY_NATURAL_ARMOR_RANK_6'],'50','naturalarmor.jpg'), 125 24561 => array(24574,$lang_id_tab['PET_ABILITY_NATURAL_ARMOR_RANK_7'],'75','naturalarmor.jpg'), 126 24562 => array(24574,$lang_id_tab['PET_ABILITY_NATURAL_ARMOR_RANK_8'],'100','naturalarmor.jpg'), 127 24631 => array(24574,$lang_id_tab['PET_ABILITY_NATURAL_ARMOR_RANK_9'],'125','naturalarmor.jpg'), 128 24632 => array(24574,$lang_id_tab['PET_ABILITY_NATURAL_ARMOR_RANK_10'],'150','naturalarmor.jpg'), 129 27362 => array(24574,$lang_id_tab['PET_ABILITY_NATURAL_ARMOR_RANK_11'],'175','naturalarmor.jpg'), 130 // Arcane Resist 131 24495 => array(24495,$lang_id_tab['PET_ABILITY_ARCANE_RESIST_RANK_1'],'5','arcaneresist.jpg'), 132 24508 => array(24508,$lang_id_tab['PET_ABILITY_ARCANE_RESIST_RANK_2'],'15','arcaneresist.jpg'), 133 24509 => array(24509,$lang_id_tab['PET_ABILITY_ARCANE_RESIST_RANK_3'],'45','arcaneresist.jpg'), 134 24510 => array(24510,$lang_id_tab['PET_ABILITY_ARCANE_RESIST_RANK_4'],'90','arcaneresist.jpg'), 135 27350 => array(27350,$lang_id_tab['PET_ABILITY_ARCANE_RESIST_RANK_5'],'105','arcaneresist.jpg'), 136 // Fire Resist 137 24440 => array(24440,$lang_id_tab['PET_ABILITY_FIRE_RESIST_RANK_1'],'5','fireresist.jpg'), 138 24441 => array(24441,$lang_id_tab['PET_ABILITY_FIRE_RESIST_RANK_2'],'15','fireresist.jpg'), 139 24463 => array(24463,$lang_id_tab['PET_ABILITY_FIRE_RESIST_RANK_3'],'45','fireresist.jpg'), 140 24464 => array(24464,$lang_id_tab['PET_ABILITY_FIRE_RESIST_RANK_4'],'90','fireresist.jpg'), 141 27351 => array(27351,$lang_id_tab['PET_ABILITY_FIRE_RESIST_RANK_5'],'105','fireresist.jpg'), 142 // Frost Resist 143 24475 => array(24475,$lang_id_tab['PET_ABILITY_FROST_RESIST_RANK_1'],'5','frostresist.jpg'), 144 24476 => array(24476,$lang_id_tab['PET_ABILITY_FROST_RESIST_RANK_2'],'15','frostresist.jpg'), 145 24477 => array(24477,$lang_id_tab['PET_ABILITY_FROST_RESIST_RANK_3'],'45','frostresist.jpg'), 146 24478 => array(24478,$lang_id_tab['PET_ABILITY_FROST_RESIST_RANK_4'],'90','frostresist.jpg'), 147 27352 => array(27352,$lang_id_tab['PET_ABILITY_FROST_RESIST_RANK_5'],'105','frostresist.jpg'), 148 // Nature Resist 149 24494 => array(24494,$lang_id_tab['PET_ABILITY_NATURE_RESIST_RANK_1'],'5','natureresist.jpg'), 150 24511 => array(24511,$lang_id_tab['PET_ABILITY_NATURE_RESIST_RANK_2'],'15','natureresist.jpg'), 151 24512 => array(24512,$lang_id_tab['PET_ABILITY_NATURE_RESIST_RANK_3'],'45','natureresist.jpg'), 152 24513 => array(24513,$lang_id_tab['PET_ABILITY_NATURE_RESIST_RANK_4'],'90','natureresist.jpg'), 153 27354 => array(27354,$lang_id_tab['PET_ABILITY_NATURE_RESIST_RANK_5'],'105','natureresist.jpg'), 154 // Shadow Resist 155 24490 => array(24490,$lang_id_tab['PET_ABILITY_SHADOW_RESIST_RANK_1'],'5','shadowresist.jpg'), 156 24514 => array(24514,$lang_id_tab['PET_ABILITY_SHADOW_RESIST_RANK_2'],'15','shadowresist.jpg'), 157 24515 => array(24515,$lang_id_tab['PET_ABILITY_SHADOW_RESIST_RANK_3'],'45','shadowresist.jpg'), 158 24516 => array(24516,$lang_id_tab['PET_ABILITY_SHADOW_RESIST_RANK_4'],'90','shadowresist.jpg'), 159 27353 => array(27353,$lang_id_tab['PET_ABILITY_SHADOW_RESIST_RANK_5'],'105','shadowresist.jpg'), 160 // Avoidance 161 35699 => array(35699,$lang_id_tab['PET_ABILITY_AVOIDANCE_RANK_1'],'15','avoidance.jpg'), 162 35700 => array(35700,$lang_id_tab['PET_ABILITY_AVOIDANCE_RANK_2'],'25','avoidance.jpg') 163 ); 164 165 function get_pet_ability_name($id){ 166 global $lang_pet_ability, $pet_ability; 167 if( isset($pet_ability[$id]) ) return $pet_ability[$id][1]; 168 else return "Unknown"; 169 } 170 function get_pet_ability_trainvalue($id){ 171 global $lang_pet_ability, $pet_ability; 172 if( isset($pet_ability[$id][2]) ) return $pet_ability[$id][2]; 173 else return 0; 174 } 175 176 function get_pet_ability_image($id){ 177 global $lang_pet_ability, $pet_ability; 178 if( isset($pet_ability[$id][3]) ) return $pet_ability[$id][3]; 179 else return 'missing.jpg'; 180 } 181 182 183 ?> -
minimanager/ssh.php
r5 r374 10 10 11 11 require_once("header.php"); 12 valid_login( 3);12 valid_login($action_permission['read']); 13 13 14 14 if (test_port($server[$realm_id]['addr'],$server[$realm_id]['term_port'])){ -
minimanager/stat.php
r307 r374 10 10 11 11 require_once("header.php"); 12 valid_login( 0);12 valid_login($action_permission['read']); 13 13 14 14 $race = Array( … … 62 62 63 63 $data = date("Y-m-d H:i:s"); 64 $data_1 = date_create ($data);65 $data_1 ->modify ("-1 day");66 $data_1 = date_format($data_1,"Y-m-d H:i:s");67 $query = $sql->query("select distinct count(`last_ip`) from `account` where `last_login` > '$data_1' and `last_login` < '$data'");64 $data_1 = mktime(date("H"), date("i"), date("s"), date("m") , date("d")-1, date("Y")); 65 $data_1 = date("Y-m-d H:i:s", $data_1); 66 67 $query = $sql->query("select distinct count(`last_ip`) from `account` where `last_login` > '$data_1' and `last_login` < '$data'"); 68 68 $uniqueIPs = $sql->result($query,0); 69 69 … … 92 92 } else $order_side = ""; 93 93 94 $output .= " 95 <center> 96 <div id=\"tab\"> 97 <ul> 98 <li id=\"selected\"> 99 <a href=\"stat.php\"> 100 {$lang_stat['srv_statistics']} 101 </a> 102 </li> 103 <li> 104 <a href=\"stat_on.php\"> 105 {$lang_stat['on_statistics']} 106 </a> 107 </li> 108 </ul> 109 </div> 110 <div id=\"tab_content\"> 111 "; 94 112 95 113 $output .= "<div class=\"top\"><h1>{$lang_stat['srv_statistics']}</h1></div>"; … … 198 216 makebutton($lang_stat['reset'], "stat.php", 720); 199 217 $output .= "</td></tr></table> 200 </center>"; 218 </center> 219 </div>"; 201 220 202 221 $sql->close(); -
minimanager/stat_on.php
r308 r374 10 10 11 11 require_once("header.php"); 12 valid_login( 0);12 valid_login($action_permission['read']); 13 13 14 14 $race = Array( … … 70 70 } else $order_side = ""; 71 71 72 $output .= " 73 <center> 74 <div id=\"tab\"> 75 <ul> 76 <li> 77 <a href=\"stat.php\"> 78 {$lang_stat['srv_statistics']} 79 </a> 80 </li> 81 <li id=\"selected\"> 82 <a href=\"stat_on.php\"> 83 {$lang_stat['on_statistics']} 84 </a> 85 </li> 86 </ul> 87 </div> 88 <div id=\"tab_content\"> 89 "; 72 90 73 91 $output .= "<div class=\"top\"><h1>{$lang_stat['on_statistics']}</h1></div>"; … … 170 188 makebutton($lang_stat['reset'], "stat_on.php", 720); 171 189 $output .= "</td></tr></table> 172 </center>"; 190 </center> 191 </div>"; 173 192 174 193 $sql->close(); -
minimanager/tele.php
r142 r374 10 10 11 11 require_once("header.php"); 12 valid_login( 1);12 valid_login($action_permission['read']); 13 13 require_once("scripts/id_tab.php"); 14 14 -
minimanager/templates/Malachite/Malachite_1024.css
r178 r374 37 37 width: 500px; 38 38 } 39 39 40 .table_top_middle { 40 41 background-image: url(logo_m.gif); … … 42 43 width: 298px; 43 44 } 45 44 46 .table_top_right { 45 47 background-image: url(logo_r.gif); … … 57 59 text-align: left; 58 60 } 61 59 62 #menuwrapper { 60 63 font:10pt Verdana,sans-serif; 61 64 } 65 62 66 #menubar, #menubar ul { 63 67 padding: 0; … … 66 70 line-height: 160%; 67 71 } 72 68 73 #menubar a { 69 74 display: block; … … 116 121 color: #22427E !important; /*submenu selected text color*/ 117 122 } 123 118 124 /*********** MENU BAR END***********/ 119 125 … … 143 149 margin: 0px; 144 150 } 151 145 152 input, input.mouseover, a.button { 146 153 border-width: 1px; … … 214 221 border: 1px solid #374341; 215 222 } 223 216 224 fieldset.half_frame{ 217 225 width: 550px; 218 226 } 227 219 228 fieldset.tquarter_frame{ 220 229 width: 680px; 221 230 } 231 222 232 fieldset.full_frame{ 223 233 width: 760px; 224 234 } 235 225 236 legend{ 226 237 margin-top:-5px; … … 235 246 236 247 /*****TABLES******/ 248 237 249 table.flat { 238 250 border-width: 5px; … … 243 255 text-align: left; 244 256 } 257 245 258 table.flat td { 246 259 padding: 5px; 247 260 } 261 248 262 table.hidden { 249 263 border-width: 0px; … … 253 267 text-align: center; 254 268 } 269 255 270 table.top_hidden { 256 271 width: 770px; … … 260 275 text-align: left; 261 276 } 277 262 278 table.top_hidden td, table.hidden td { 263 279 padding: 4px 0px; 264 280 } 281 265 282 table.lined { 266 283 width: 770px; … … 301 318 tr td div.gradient_p{ 302 319 background-color:#b2c2b9; 303 width: 1 40px;320 width: 130px; 304 321 } 305 322 tr td div.gradient_pp{ … … 351 368 background-image: url(../../img/INV/Slot_Bank_Out.gif); 352 369 } 370 353 371 /*****TABLES END******/ 354 372 … … 368 386 color:#990000; 369 387 } 388 370 389 .bold { 371 390 font:13pt Trebuchet MS,sans-serif; 372 391 font-weight:bold; 373 392 } 393 374 394 .small { 375 395 font-size: 8px; 376 } 396 } 397 377 398 .large_bold { 378 399 font-size: 13px; 379 400 font-weight:bold; 380 401 } 402 381 403 .large { 382 404 font-size: 13px; 383 405 } 406 384 407 .half_line { 385 408 font-size: 12px; … … 387 410 } 388 411 /*****BUBBLE******/ 412 389 413 div.bubble { 390 414 position:relative; … … 394 418 text-align: left; 395 419 } 420 396 421 div.bubble div.top { 397 422 text-align: center; … … 400 425 margin:-7px -0px 12px -0px; 401 426 } 427 402 428 i.tl, i.tr, i.bl, i.br { 403 429 position:absolute; … … 407 433 z-index:30; 408 434 } 435 409 436 i.tl { 410 437 top:0px; … … 412 439 background:url(tr.gif); 413 440 } 441 414 442 i.tr { 415 443 top:0px; … … 417 445 background:url(tl.gif); 418 446 } 447 419 448 i.bl { 420 449 bottom:0px; … … 422 451 background:url(br.gif); 423 452 } 453 424 454 i.br { 425 455 bottom:0px; … … 585 615 background-image: url(../../img/bar_skill.png); 586 616 } 617 618 .faction-bar{border:1px solid black;width:100%;text-align:left;height:16px;background:url('../../img/bar_empty.gif') repeat-x;position:relative} 619 span.rep-data{position:absolute;width:100%;text-align:center;color:white;text-decoration:none !important;white-space:nowrap} 620 .bar-color{width:100%;height:16px} 621 .rep7 .bar-color{background:url('../../img/bar_exalted.gif') repeat-x} 622 .rep6 .bar-color{background:url('../../img/bar_revered.gif') repeat-x} 623 .rep5 .bar-color{background:url('../../img/bar_honored.gif') repeat-x} 624 .rep4 .bar-color{background:url('../../img/bar_friendly.gif') repeat-x} 625 .rep3 .bar-color{background:url('../../img/bar_neutral.gif') repeat-x} 626 .rep2 .bar-color{background:url('../../img/bar_unfriendly.gif') repeat-x} 627 .rep1 .bar-color{background:url('../../img/bar_hostile.gif') repeat-x} 628 .rep0 .bar-color{background:url('../../img/bar_hated.gif') repeat-x} 629 tr td.rep7 {color:cyan} 630 tr td.rep6 {color:#00ffcc} 631 tr td.rep5 {color:#00ff88} 632 tr td.rep4 {color:lime} 633 tr td.rep3 {color:yellow} 634 tr td.rep2 {color:#ee6622} 635 tr td.rep1 {color:red} 636 tr td.rep0 {color:#cc2222} 587 637 588 638 /*** link tabs ***/ -
minimanager/templates/Malachite/Malachite_1280.css
r178 r374 7 7 * License: GNU General Public License (GPL) 8 8 */ 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 } 9 13 10 html,body{ 14 background-color:#76827B;15 color:#000000;16 height:100%;17 padding:0;18 margin:0;19 11 font:10pt Verdana,sans-serif; 20 cursor:default;21 12 } 22 13 23 a:link, a:visited{ color: #22427E; text-decoration: none } 24 a:hover, a:focus{ color: #A47236; text-decoration: none } 14 .table_top { 15 width: 1045px; 16 } 25 17 26 .table_top {27 border-width: 0px;28 border-spacing: 0px;29 border-style: none;30 border-collapse: collapse;31 width: 1045px;32 height:120px;33 }34 .table_top_left {35 background-image: url(logo_l.gif);36 background-repeat: no-repeat;37 width: 500px;38 }39 18 .table_top_middle { 40 background-image: url(logo_m.gif);41 text-align: right;42 19 width: 460px; 43 20 } 44 .table_top_right { 45 background-image: url(logo_r.gif); 46 background-repeat: no-repeat; 47 width: 47px; 48 } 21 49 22 50 23 /*********** MENU BAR***********/ 51 24 #menubar { 52 position:relative;53 25 left:22px; 54 top:37px;55 z-index:100;56 width: 36em; /*total len*/57 text-align: left;58 26 } 59 #menuwrapper { 60 font:11pt Verdana,sans-serif; 27 28 #menubar a { 29 font-size: .90em; 61 30 } 62 #menubar, #menubar ul { 63 padding: 0; 64 margin: 0; 65 list-style: none; 66 line-height: 160%; 67 } 68 #menubar a { 69 display: block; 70 text-decoration: none; 71 padding: 5px 15px 5px 15px; 72 border-right: 1px solid #5f7797; 73 font-size: .90em; 74 color: #A47236; /*main menu text color*/ 75 } 76 #menubar a.trigger { 77 padding: 5px 15px 5px 15px; 78 } 79 #menubar li { 80 float: left; 81 width: 9em; 82 } 83 #menubar li {position: relative;} 84 /* hide from IE mac \*/ 85 #menubar li {position: static; width: auto;} 86 /* end hiding from IE5 mac */ 87 #menubar li ul, #menubar ul li { 88 width: 11em; /*submenu len*/ 89 } 90 #menubar ul li a { 91 color: #A47236; 92 border-right: 0; 93 padding: 3px 12px 3px 15px; 94 } 95 #menubar li ul { 96 position: absolute; 97 display: none; 98 background-color: #485856; /*submenu bg color*/ 99 border-right: 1px solid #5f7797; 100 border-bottom: 1px solid #5f7797; 101 } 102 #menubar li:hover a, #menubar a:focus, 103 #menubar a:active, #menubar li.hvr a { 104 color: #A47236; /*menu selected text color*/ 105 background-color: #485856; /*menu selected bg color*/ 106 } 107 #menubar li:hover ul, #menubar li.hvr ul { 108 display: block; 109 } 110 #menubar li:hover ul a, #menubar li.hvr ul a { 111 color: #A47236; /*submenu text color*/ 112 background-color: transparent; 113 } 114 #menubar ul a:hover { 115 background-color: #76827B !important; /*submenu selected bg color*/ 116 color: #22427E !important; /*submenu selected text color*/ 117 } 31 118 32 /*********** MENU BAR END***********/ 119 33 120 34 #username { 121 position:relative;122 top:37px;123 z-index:20;124 color:#98A8A3;125 35 font:13pt Verdana,sans-serif; 126 36 } 37 127 38 #version { 128 position:absolute;129 left:48%;130 top:122px;131 z-index:10;132 color:#000000;133 39 font:9pt Verdana,sans-serif; 134 40 } 135 h1{ 136 margin:0px; 137 font:16pt Trebuchet MS,sans-serif; 138 font-weight:bold; 139 color:#414D4C; 140 line-height:1.2em; 141 } 142 form { 143 margin: 0px; 144 } 41 145 42 input, input.mouseover, a.button { 146 border-width: 1px;147 border-style: solid;148 border-color: #76827B;149 background:#76827B;150 font:10pt Verdana,sans-serif;151 font-weight: bold;152 43 line-height:130%; 153 44 } 154 input {155 background-color:#869c8f;156 color:#414D4C;157 padding:2px 1px;158 margin-right: 2px;159 margin-left: 2px;160 }161 select,textarea{162 border:1px solid #76827B;163 background-color: #b2c2b9;164 }165 img {166 border: 0px;167 padding: 0px;168 }169 input[type="radio"],input[type="checkbox"]{170 background:none;171 border:0px;172 }173 a.button {174 background:#869c8f;175 color: #414D4C;176 padding:4px 2px;177 text-decoration: none;178 text-align: center;179 float: left;180 margin-right: 3px;181 margin-left: 3px;182 }183 a.button:visited{184 background-color: #869c8f;185 color: #414D4C;186 }187 a.button:hover{188 background-color: #76827B;189 color: #d4ddd8;190 }191 a.button:active, a.button:focus {192 border-color: #76827B;193 }194 a[type="wrn"].button:hover{195 background-color:#4a1a1a;196 background-image:url(../../img/sml_warn.png);197 background-repeat:no-repeat;198 background-position: 99% 1px199 }200 a[type="def"].button:hover{201 background-color:#1a4a1a;202 background-image:url(../../img/sml_tick.png);203 background-repeat:no-repeat;204 background-position: 99% 1px205 }206 45 207 fieldset{208 position: relative;209 margin-top:20px;210 padding-top:20px;211 padding-bottom:10px;212 top: 5px;213 background-color: #b2c2b9;214 border: 1px solid #374341;215 }216 46 fieldset.half_frame{ 217 47 width: 650px; … … 223 53 width: 860px; 224 54 } 225 legend{ 226 margin-top:-5px; 227 color: #374341; 228 background-color: #b2c2b9; 229 border: 1px solid #374341; 230 padding: 2px 6px; 231 position:absolute; 232 top: -15px; 233 left: 5px; 55 56 /*****TABLES******/ 57 58 table.top_hidden { 59 width: 960px; 234 60 } 235 61 236 /*****TABLES******/237 table.flat {238 border-width: 5px;239 border-spacing: 5px;240 border-style: none;241 border-collapse: collapse;242 background-color: #b2c2b9;243 text-align: left;244 }245 table.flat td {246 padding: 5px;247 }248 table.hidden {249 border-width: 0px;250 border-spacing: 0px;251 border-style: none;252 border-collapse: collapse;253 text-align: center;254 }255 table.top_hidden {256 width: 960px;257 border: 0px none #d4ddd8;258 border-spacing: 0px;259 border-collapse: collapse;260 text-align: left;261 }262 table.top_hidden td, table.hidden td {263 padding: 4px 0px;264 }265 62 table.lined { 266 63 width: 960px; 267 border-collapse: collapse;268 text-align: center;269 }270 table.lined, table.lined td, table.lined td.hidden, table.lined th{271 border: 1px solid #d4ddd8;272 padding: 5px;273 }274 table.lined th{275 background-color: #374341;276 font-weight: bold;277 font-size: 11px;278 color:#d4ddd8;279 padding: 5px;280 }281 table.lined th a:link, table.lined th a:visited{282 color:#d4ddd8;283 }284 table.lined th a:hover,table.lined th a:focus{285 color: #A47236;286 text-decoration: none;287 }288 table.lined td{289 background-color: #b2c2b9;290 }291 table.lined td.hidden {292 background-color: transparent;293 }294 tr td div.gradient_p,div.gradient_pp{295 float: left;296 clear: right;297 display: table-cell;298 text-align: right;299 padding: 1px 5px;300 }301 tr td div.gradient_p{302 background-color:#b2c2b9;303 width: 140px;304 }305 tr td div.gradient_pp{306 background-color:#d4ddd8;307 width: 50px;308 }309 img.bag_icon {310 float: left;311 width: 24px;312 height: 24px;313 border: 1px solid #585858;314 margin-left: 5px;315 64 } 316 65 317 tr td.bag div,318 tr td.bank div {319 position: relative;320 border: 0px;321 margin: 2px;322 background-image: url(../../img/INV/Slot_Bag.gif);323 background-repeat: repeat;324 background-color: #242424;325 }326 tr td.bank div {327 background-image: url(../../img/INV/Slot_Bank.gif);328 background-color: #858585;329 }330 tr td.bag div div,331 tr td.bank div div{332 position: absolute;333 background: none;334 }335 tr td.bag div div img,336 tr td.bank div div img{337 border: 0px;338 padding: 1px;339 width: 35px;340 height: 35px;341 }342 tr td.bag div.no_slot,343 tr td.bank div.no_slot{344 position: absolute;345 margin: 0px;346 width: 86px;347 height: 41px;348 background-image: url(../../img/INV/Slot_Bag_Out.gif);349 }350 tr td.bank div.no_slot{351 background-image: url(../../img/INV/Slot_Bank_Out.gif);352 }353 66 /*****TABLES END******/ 354 67 355 68 #body_main { 356 position:absolute;357 left: 50%;358 top: 150px;359 69 width: 1000px; 360 70 margin-left: -500px; /* half of the width */ 361 line-height: 120%;362 text-align: center;363 71 font-size: 12px; 364 color:#000000;365 72 } 366 73 367 .error {368 color:#990000;369 }370 74 .bold { 371 75 font:14pt Trebuchet MS,sans-serif; 372 font-weight:bold;373 76 } 374 77 .small { … … 377 80 .large_bold { 378 81 font-size: 14px; 379 font-weight:bold;380 82 } 381 83 .large { … … 384 86 .half_line { 385 87 font-size: 13px; 386 line-height:1.6em;387 }388 /*****BUBBLE******/389 div.bubble {390 position:relative;391 padding:7px 0px;392 background-color:#d4ddd8;393 margin-bottom:15px;394 text-align: left;395 }396 div.bubble div.top {397 text-align: center;398 background-color:#b2c2b9;399 padding:7px 15px;400 margin:-7px -0px 12px -0px;401 }402 i.tl, i.tr, i.bl, i.br {403 position:absolute;404 width:4px;405 height:4px;406 overflow:hidden;407 z-index:30;408 }409 i.tl {410 top:0px;411 left:0px;412 background:url(tr.gif);413 }414 i.tr {415 top:0px;416 right:0px;417 background:url(tl.gif);418 }419 i.bl {420 bottom:0px;421 left:0px;422 background:url(br.gif);423 }424 i.br {425 bottom:0px;426 right:0px;427 background:url(bl.gif);428 }429 /*****BUBBLE END******/430 431 #body_buttom {432 font:8pt Verdana,sans-serif;433 text-align: center;434 color:#98A8A3;435 88 } 436 89 437 90 .table_buttom { 438 border-width: 0px;439 border-spacing: 0px;440 border-style: none;441 border-collapse: collapse;442 91 width: 1000px; 443 height:100px;444 }445 .table_buttom_left {446 background-image: url(bottom_l.gif);447 width: 6px;448 }449 .table_buttom_middle {450 background-image: url(bottom_m.gif);451 width: 984px;452 }453 .table_buttom_right {454 background-image: url(bottom_r.gif);455 width: 6px;456 92 } 457 93 458 #body_buttom a:link, #body_buttom a:visited { 459 color:#C0D0CA; 460 text-decoration:none; 461 } 462 #body_buttom a:hover, #body_buttom a:focus { 463 text-decoration:underline; 464 } 465 .logo_border { 466 border: 1px solid #565656; 467 background-color: #2a2a2a; 468 padding: 6px; 469 } 470 471 .icon_border_0 { 472 border: 0px; 473 padding: 6px; 474 width: 32px; 475 height: 32px; 476 background: url(../../img/INV/icon_border_0.png) 477 } 478 479 .icon_border_1 { 480 border: 0px; 481 padding: 6px; 482 width: 32px; 483 height: 32px; 484 background: url(../../img/INV/icon_border_1.png) 485 } 486 487 .icon_border_2 { 488 border: 0px; 489 padding: 6px; 490 width: 32px; 491 height: 32px; 492 background: url(../../img/INV/icon_border_2.png) 493 } 494 495 .icon_border_3 { 496 border: 0px; 497 padding: 6px; 498 width: 32px; 499 height: 32px; 500 background: url(../../img/INV/icon_border_3.png) 501 } 502 503 .icon_border_4 { 504 border: 0px; 505 padding: 6px; 506 width: 32px; 507 height: 32px; 508 background: url(../../img/INV/icon_border_4.png) 509 } 510 511 .icon_border_5 { 512 border: 0px; 513 padding: 6px; 514 width: 32px; 515 height: 32px; 516 background: url(../../img/INV/icon_border_5.png) 517 } 518 519 .icon_border_6 { 520 border: 0px; 521 padding: 6px; 522 width: 32px; 523 height: 32px; 524 background: url(../../img/INV/icon_border_6.png) 525 } 526 527 /*** graphs and bars ***/ 528 .bargraph { 529 font:9pt Verdana,sans-serif; 530 color: #000000; 531 border-collapse: collapse; 532 width: 720px; 533 } 534 .bargraph td { 535 padding:0; 536 margin:0; 537 vertical-align:bottom; 538 text-align:center; 539 background: url(gridline.gif) 15px bottom; 540 } 541 .bargraph th { 542 background: #d4ddd8; 543 } 544 545 a.graph_link:link, a.graph_link:visited{ color: #000000; text-decoration: none } 546 a.graph_link:hover, a.graph_link:focus{ color: #A47236; text-decoration: none } 547 548 .bargraph img{ 549 display:block; 550 border: 1px solid #000; 94 .table_buttom_middle { 95 width: 984px; 551 96 } 552 97 553 98 table.stat_hidden { 554 99 width: 960px; 555 border-spacing: 2px;556 border-collapse: collapse;557 text-align: left;558 100 } 559 101 560 102 .tot_bar { 561 width: 730px;562 border:1px solid #000000;563 padding:10px;564 border-collapse: collapse;565 text-align: center;566 font-weight: bold;567 103 font-size: 13px; 568 }569 .tot_bar a:link, .tot_bar a:visited{ color: #000; text-decoration: none }570 .tot_bar a:hover, .tot_bar a:focus{ color: #A47236; text-decoration: none }571 572 tr td.bar{573 width: 385px;574 background-repeat: no-repeat;575 background-position: -385px;576 padding: 1px;577 }578 tr td.bar span{579 float: left;580 width:60%;581 text-align:right;582 margin-top: 3px;583 }584 tr td.skill_bar{585 background-image: url(../../img/bar_skill.png);586 104 } 587 105 … … 589 107 #tab ul { 590 108 padding: 0px 50px; 591 margin: 0px;592 list-style: none;593 109 } 594 #tab li { 595 float: left; 596 border: 1px solid #bbb; 597 border-bottom-width: 0; 598 } 599 #tab a { 600 display: block; 601 background: #d4ddd8; 602 padding: 1em 2em; 603 } 604 #tab a:hover { 605 background: #b2c2b9; 606 } 607 #tab #selected { 608 border-color: black; 609 } 610 #tab #selected a { 611 position: relative; 612 top: 1px; 613 background: #b2c2b9; 614 font-weight: bold; 615 padding: 1em 1.5em; 616 } 110 617 111 #tab_content { 618 padding: 10px;619 border: 1px solid black;620 background: #b2c2b9;621 112 width: 900px; 622 clear: both;623 113 } 624 114 625 115 /*** Java layer tabs ***/ 626 .jtabs { 627 margin: 0; 628 padding: 0px 0px 0px 30px; 629 list-style: none; 630 } 631 .jtabs li { 632 float: left; 633 } 634 .jtabs a.jtab-disabled:hover, .jtabs a.jtab-active { 635 background: #b2c2b9; 636 border-bottom-color: #b2c2b9; 637 } 638 .jtabs a.jtab-disabled { 639 background: #d4ddd8; 640 border: 1px solid #bbb; 641 border-bottom-width: 0; 642 } 116 643 117 .jtabs a { 644 position: relative;645 118 top: -27px; 646 background: #b2c2b9;647 font-weight: bold;648 padding: 1em 1.3em;649 margin: 0px;650 border: 1px solid #000;651 text-decoration:none;652 119 } 653 120 .jtab-container { 654 padding: 0px;655 border: 1px solid black;656 background: #b2c2b9;657 121 width: 900px; 658 clear: both;659 122 } 660 .jtab-panes { margin: 3px }661 123 662 124 /*** item tooltips***/ 663 125 .item_tooltip td{ 664 float: none;665 126 font-size: 12px; 666 color: #d4d4d4;667 border:1px solid #F0D070;668 padding:10px;669 width:auto;670 background-color:#000;671 text-align: left;672 filter:alpha(opacity=80);673 -moz-opacity:.80;674 opacity:0.80;675 127 } 676 128 .info_tooltip td{ 677 float: none;678 129 font-size: 12px; 679 color: #d4d4d4;680 border:0px solid #F0D070;681 padding:10px;682 width:240px;683 background-color:#000;684 text-align:left;685 filter:alpha(opacity=85);686 -moz-opacity:.85;687 opacity:0.85;688 130 } 689 .answerbox { 690 font-size: 11px; 691 color: #d4d4d4; 692 border:1px solid #F0D070; 693 padding:10px; 694 width:auto; 695 background-color:#000; 696 text-align:center; 697 filter:alpha(opacity=85); 698 -moz-opacity:.85; 699 opacity:0.85; 700 } 701 .answerbox th { 702 font:16pt Trebuchet MS,sans-serif; 703 font-weight:bold; 704 color:#f6b620; 705 line-height:1.2em; 706 } 707 .answerbox td a { 708 float:none; 709 display: block; 710 } 131 -
minimanager/templates/Sulfur/Sulfur_1024.css
r178 r374 142 142 line-height:1.2em; 143 143 } 144 form { margin: 0px; } 144 145 form { 146 margin: 0px; 147 } 145 148 input, input.mouseover, a.button { 146 149 border: 1px solid #565656; … … 150 153 line-height:100%; 151 154 } 155 152 156 input { 153 157 background:#2a2a2a; … … 278 282 text-align: center; 279 283 } 284 280 285 table.lined, table.lined td, table.lined td.head, table.lined td.hidden{ 281 286 border-bottom: 1px solid #383838; … … 309 314 tr td div.gradient_p{ 310 315 background-color:#444; 311 width: 1 40px;316 width: 130px; 312 317 } 313 318 tr td div.gradient_pp{ … … 596 601 background-image: url(../../img/bar_skill.png); 597 602 } 603 604 .faction-bar{border:1px solid black;width:100%;text-align:left;height:16px;background:url('../../img/bar_empty.gif') repeat-x;position:relative} 605 span.rep-data{position:absolute;width:100%;text-align:center;color:white;text-decoration:none !important;white-space:nowrap} 606 .bar-color{width:100%;height:16px} 607 .rep7 .bar-color{background:url('../../img/bar_exalted.gif') repeat-x} 608 .rep6 .bar-color{background:url('../../img/bar_revered.gif') repeat-x} 609 .rep5 .bar-color{background:url('../../img/bar_honored.gif') repeat-x} 610 .rep4 .bar-color{background:url('../../img/bar_friendly.gif') repeat-x} 611 .rep3 .bar-color{background:url('../../img/bar_neutral.gif') repeat-x} 612 .rep2 .bar-color{background:url('../../img/bar_unfriendly.gif') repeat-x} 613 .rep1 .bar-color{background:url('../../img/bar_hostile.gif') repeat-x} 614 .rep0 .bar-color{background:url('../../img/bar_hated.gif') repeat-x} 615 tr td.rep7 {color:cyan} 616 tr td.rep6 {color:#00ffcc} 617 tr td.rep5 {color:#00ff88} 618 tr td.rep4 {color:lime} 619 tr td.rep3 {color:yellow} 620 tr td.rep2 {color:#ee6622} 621 tr td.rep1 {color:red} 622 tr td.rep0 {color:#cc2222} 623 598 624 599 625 /*** link tabs ***/ -
minimanager/templates/Sulfur/Sulfur_1280.css
r178 r374 7 7 * License: GNU General Public License (GPL) 8 8 */ 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; 15 height:100%; 16 padding:0px; /* required for Opera to have 0 margin */ 17 margin:0; 18 font:11pt Verdana,sans-serif; 19 cursor:default; 9 10 .table_top { 11 width: 1045px; 20 12 } 21 13 22 a:link, a:visited{ color: #f6b620; text-decoration: none }23 a:hover, a:focus{ color: #ffee40; text-decoration: none }24 25 .table_top {26 border-width: 0px;27 border-spacing: 0px;28 border-style: none;29 border-collapse: collapse;30 width: 1045px;31 height:120px;32 }33 .table_top_left {34 background-image: url(logo_l.gif);35 background-repeat: no-repeat;36 width: 500px;37 }38 14 .table_top_middle { 39 background-image: url(logo_m.gif);40 text-align: right;41 15 width: 460px; 42 16 } 43 .table_top_right { 44 background-image: url(logo_r.gif); 45 background-repeat: no-repeat; 46 width: 47px; 17 #menubar a { 18 font-size: .90em; 47 19 } 48 20 49 /*********** MENU BAR***********/50 #menubar {51 position:relative;52 left:25px;53 top:37px;54 z-index:100;55 width: 36em; /*total len*/56 text-align: left;57 }58 #menuwrapper {59 font:11pt Verdana,sans-serif;60 }61 #menubar, #menubar ul {62 padding: 0;63 margin: 0;64 list-style: none;65 line-height: 160%;66 }67 #menubar a {68 display: block;69 text-decoration: none;70 padding: 5px 15px 5px 15px;71 border-right: 1px solid #565656;72 font-size: .90em;73 color: #f6b620; /*main menu text color*/74 }75 #menubar a.trigger {76 padding: 5px 15px 5px 15px;77 }78 #menubar li {79 float: left;80 width: 9em;81 }82 #menubar li {position: relative;}83 /* hide from IE mac \*/84 #menubar li {position: static; width: auto;}85 /* end hiding from IE5 mac */86 #menubar li ul, #menubar ul li {87 width: 11em; /*submenu len*/88 }89 #menubar ul li a {90 color: #f6b620;91 border-right: 0;92 padding: 3px 12px 3px 15px;93 }94 #menubar li ul {95 position: absolute;96 display: none;97 background-color: #282927; /*submenu bg color*/98 border-right: 1px solid #565656;99 border-bottom: 1px solid #565656;100 filter:alpha(opacity=85);101 -moz-opacity:.85;102 opacity:0.85;103 }104 #menubar li:hover a, #menubar a:focus,105 #menubar a:active, #menubar li.hvr a {106 color: #f6b620; /*menu selected text color*/107 background-color: #282927; /*menu selected bg color*/108 }109 #menubar li:hover ul, #menubar li.hvr ul {110 display: block;111 }112 #menubar li:hover ul a, #menubar li.hvr ul a {113 color: #f6b620; /*submenu text color*/114 background-color: transparent;115 }116 #menubar ul a:hover {117 background-color: #444543 !important; /*submenu selected bg color*/118 color: #ffee40 !important; /*submenu selected text color*/119 }120 21 /*********** MENU BAR END***********/ 121 22 122 23 #username { 123 position:relative;124 top:37px;125 z-index:20;126 color:#f6b620;127 24 font:13pt Verdana,sans-serif; 128 25 } 129 26 #version { 130 position:absolute;131 left:48%;132 top:122px;133 z-index:10;134 color:#d4d4d4;135 27 font:9pt Verdana,sans-serif; 136 28 } 137 h1{ 138 margin:0px; 139 font:16pt Trebuchet MS,sans-serif; 140 font-weight:bold; 141 color:#e9e6e6; 142 line-height:1.2em; 143 } 144 form { margin: 0px; } 145 input, input.mouseover, a.button { 146 border: 1px solid #565656; 147 background:#2a2a2a; 148 font: 11pt Verdana,sans-serif; 149 font-weight: bold; 150 line-height:100%; 151 } 152 input { 153 background:#2a2a2a; 154 color:#d4d4d4; 155 padding:2px 1px; 156 margin-right: 2px; 157 margin-left: 2px; 158 } 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{ 176 color:#d4d4d4; 177 border:1px solid #565656; 178 background-color: #2a2a2a; 179 } 180 img { 181 border: 0px; 182 padding: 0px; 183 } 184 a.button { 185 background:#2a2a2a; 186 color: #d4d4d4; 187 padding:4px 2px; 188 text-decoration: none; 189 text-align: center; 190 float: left; 191 margin-right: 3px; 192 margin-left: 3px; 29 30 form { 31 margin: 0px; 193 32 } 194 33 195 a.button:visited{ 196 background-color: #2a2a2a; 197 color: #d4d4d4; 198 } 199 a.button:hover{ 200 background-color: #565656; 201 color: #d4d4d4; 202 } 203 a.button:active, a.button:focus { 204 border-color: #76827B; 205 } 206 a[type="wrn"].button:hover{ 207 background-color:#4a1a1a; 208 background-image:url(../../img/sml_warn.png); 209 background-repeat:no-repeat; 210 background-position: 99% 1px 211 } 212 a[type="def"].button:hover{ 213 background-color:#1a4a1a; 214 background-image:url(../../img/sml_tick.png); 215 background-repeat:no-repeat; 216 background-position: 99% 1px 34 input, input.mouseover, a.button { 35 line-height:130%; 217 36 } 218 37 219 fieldset{220 position: relative;221 margin-top:20px;222 padding-top:10px;223 padding-bottom:10px;224 top: 5px;225 background-color: #383838;226 border: 1px solid #d4d4d4;227 }228 38 fieldset.half_frame{ 229 39 width: 650px; … … 235 45 width: 860px; 236 46 } 237 legend{ 238 margin-top:-5px; 239 color: #f6b620; 240 background-color: #383838; 241 padding: 2px 6px; 242 position:absolute; 243 top: -5px; 244 left: 5px; 47 48 49 /*****TABLES******/ 50 51 table.top_hidden { 52 width: 960px; 245 53 } 246 54 247 /*****TABLES******/248 table.flat {249 border-width: 5px;250 border-spacing: 5px;251 border-style: none;252 border-collapse: collapse;253 background-color: #383838;254 text-align: left;255 }256 table.flat td {257 padding: 5px;258 }259 table.hidden {260 border-width: 0px;261 border-spacing: 0px;262 border-style: none;263 border-collapse: collapse;264 text-align: center;265 }266 table.top_hidden {267 width: 960px;268 border: 0px none #d4ddd8;269 border-spacing: 0px;270 border-collapse: collapse;271 text-align: left;272 }273 table.top_hidden td, table.hidden td {274 padding: 4px 0px;275 }276 55 table.lined { 277 56 width: 960px; 278 border-collapse: collapse;279 text-align: center;280 }281 table.lined, table.lined td, table.lined td.hidden{282 border-bottom: 1px solid #383838;283 border-top: 1px solid #383838;284 padding: 5px;285 }286 table.lined, table.lined tr, table.lined tr.hidden{287 border-left: 1px solid #383838;288 border-right: 1px solid #383838;289 }290 table.lined tr th{291 background-color: #484848;292 font-weight: bold;293 font-size: 12px;294 color:#f6b620;295 padding: 5px;296 }297 table.lined td.hidden {298 background-color: transparent;299 }300 table.lined td{301 background-color: #565656;302 }303 tr td div.gradient_p,div.gradient_pp{304 float: left;305 clear: right;306 display: table-cell;307 text-align: right;308 padding: 1px 5px;309 }310 tr td div.gradient_p{311 background-color:#444;312 width: 140px;313 }314 tr td div.gradient_pp{315 background-color:#333;316 width: 50px;317 }318 img.bag_icon {319 float: left;320 width: 24px;321 height: 24px;322 border: 1px solid #585858;323 margin-left: 5px;324 57 } 325 58 326 tr td.bag div, 327 tr td.bank div { 328 position: relative; 329 border: 0px; 330 margin: 2px; 331 background-image: url(../../img/INV/Slot_Bag.gif); 332 background-repeat: repeat; 333 background-color: #242424; 59 table.lined tr th{ 60 font-size: 12px; 334 61 } 335 tr td.bank div { 336 background-image: url(../../img/INV/Slot_Bank.gif); 337 background-color: #858585; 338 } 339 tr td.bag div div, 340 tr td.bank div div{ 341 position: absolute; 342 background: none; 343 } 344 tr td.bag div div img, 345 tr td.bank div div img{ 346 border: 0px; 347 padding: 1px; 348 width: 35px; 349 height: 35px; 350 } 351 tr td.bag div.no_slot, 352 tr td.bank div.no_slot{ 353 position: absolute; 354 margin: 0px; 355 width: 86px; 356 height: 41px; 357 background-image: url(../../img/INV/Slot_Bag_Out.gif); 358 } 359 tr td.bank div.no_slot{ 360 background-image: url(../../img/INV/Slot_Bank_Out.gif); 361 } 62 362 63 /*****TABLES END******/ 363 64 364 65 #body_main { 365 position:absolute;366 left: 50%;367 top: 150px;368 66 width: 1000px; 369 67 margin-left: -500px; /* half of the width */ 370 line-height: 120%;371 text-align: center;372 68 font-size: 12px; 373 color:#d4d4d4;374 69 } 375 70 376 .error {377 color:#f6b620;378 }379 71 .bold { 380 72 font:14pt Trebuchet MS,sans-serif; 381 font-weight:bold;382 73 } 383 74 .small { … … 393 84 .half_line { 394 85 font-size: 13px; 395 line-height:1.6em;396 }397 /*****BUBBLE******/398 div.bubble {399 position:relative;400 padding:7px 0px;401 background-color:#383838;402 margin-bottom:15px;403 text-align: left;404 border: 1px solid #565656;405 }406 div.bubble div.top {407 text-align: center;408 background-color:#565656;409 padding:7px 15px;410 margin:-7px -0px 12px -0px;411 }412 div.bubble div.top h1{413 color: #1a1a1a;414 }415 i.tl, i.tr, i.bl, i.br {416 position:absolute;417 width:4px;418 height:4px;419 overflow:hidden;420 z-index:30;421 }422 i.tl {423 top:0px;424 left:0px;425 }426 i.tr {427 top:0px;428 right:0px;429 }430 i.bl {431 bottom:0px;432 left:0px;433 }434 i.br {435 bottom:0px;436 right:0px;437 }438 /*****BUBBLE END******/439 440 #body_buttom {441 font:8pt Verdana,sans-serif;442 text-align: center;443 color:#d4d4d4;444 }445 .table_buttom {446 background: #383838;447 border: 1px solid #565656;448 width: 1000px;449 height:100px;450 }451 .table_buttom_left {452 width: 6px;453 }454 .table_buttom_middle {455 width: 784px;456 }457 .table_buttom_right {458 width: 6px;459 86 } 460 87 461 #body_buttom a:link, #body_buttom a:visited { 462 color:#C0D0CA; 463 text-decoration:none; 464 } 465 #body_buttom a:hover, #body_buttom a:focus { 466 text-decoration:underline; 467 } 468 .logo_border { 469 border: 1px solid #565656; 470 background-color: #2a2a2a; 471 padding: 6px; 472 } 473 474 .icon_border_0 { 475 border: 0px; 476 padding: 6px; 477 width: 32px; 478 height: 32px; 479 background: url(../../img/INV/icon_border_0.png) 480 } 481 482 .icon_border_1 { 483 border: 0px; 484 padding: 6px; 485 width: 32px; 486 height: 32px; 487 background: url(../../img/INV/icon_border_1.png) 488 } 489 490 .icon_border_2 { 491 border: 0px; 492 padding: 6px; 493 width: 32px; 494 height: 32px; 495 background: url(../../img/INV/icon_border_2.png) 496 } 497 498 .icon_border_3 { 499 border: 0px; 500 padding: 6px; 501 width: 32px; 502 height: 32px; 503 background: url(../../img/INV/icon_border_3.png) 504 } 505 506 .icon_border_4 { 507 border: 0px; 508 padding: 6px; 509 width: 32px; 510 height: 32px; 511 background: url(../../img/INV/icon_border_4.png) 512 } 513 514 .icon_border_5 { 515 border: 0px; 516 padding: 6px; 517 width: 32px; 518 height: 32px; 519 background: url(../../img/INV/icon_border_5.png) 520 } 521 522 .icon_border_6 { 523 border: 0px; 524 padding: 6px; 525 width: 32px; 526 height: 32px; 527 background: url(../../img/INV/icon_border_6.png) 528 } 529 530 /*** graphs and bars ***/ 531 .bargraph { 532 font:9pt Verdana,sans-serif; 533 border-collapse: collapse; 534 width: 720px; 535 } 536 .bargraph td { 537 padding:0; 538 margin:0; 539 vertical-align:bottom; 540 text-align:center; 541 background: url(gridline.gif) 15px bottom; 542 } 543 544 a.graph_link:link, a.graph_link:visited{ color: #f6b620; text-decoration: none } 545 a.graph_link:hover, a.graph_link:focus{ color: #ffee40; text-decoration: none } 546 547 .bargraph img{ 548 display:block; 549 border: 1px solid #000; 88 .table_buttom { 89 width: 1000px; 550 90 } 551 91 552 92 table.stat_hidden { 553 93 width: 960px; 554 border-spacing: 2px;555 border-collapse: collapse;556 text-align: left;557 94 } 558 95 559 .tot_bar {560 width: 730px;561 border:1px solid #000000;562 padding:10px;563 border-collapse: collapse;564 text-align: center;565 font-weight: bold;566 }567 .tot_bar a:link, .tot_bar a:visited{ color: #000; text-decoration: none }568 .tot_bar a:hover, .tot_bar a:focus{ color: #f6b620; text-decoration: none }569 570 tr td.bar{571 width: 385px;572 background-repeat: no-repeat;573 background-position: -385px;574 padding: 1px;575 }576 tr td.bar span{577 float: left;578 width:55%;579 text-align:right;580 margin-top: 3px;581 color: #fff !important;582 }583 96 tr td.bar span.rank{ 584 97 position: absolute; 585 text-align: left;586 98 width: auto; 587 }588 tr td.skill_bar{589 background-image: url(../../img/bar_skill.png);590 99 } 591 100 592 101 /*** link tabs ***/ 102 593 103 #tab ul { 594 104 padding: 0px 50px; 595 margin: 0px;596 list-style: none;597 105 } 598 #tab li { 599 float: left; 600 border: 1px solid #565656; 601 border-bottom-width: 0; 602 } 603 #tab a { 604 display: block; 605 background: #383838; 606 padding: 1em 2em; 607 } 608 #tab a:hover { 609 background: #484848; 610 } 611 #tab #selected { 612 border-color: #d4d4d4; 613 } 614 #tab #selected a { 615 position: relative; 616 top: 1px; 617 background: #484848; 618 font-weight: bold; 619 padding: 1em 1.5em; 620 } 106 621 107 #tab_content { 622 padding: 10px;623 border: 1px solid #d4d4d4;624 background: #484848;625 108 width: 900px; 626 clear: both;627 109 } 628 110 629 111 /*** Java layer tabs ***/ 630 .jtabs { 631 margin: 0; 632 padding: 0px 0px 0px 30px; 633 list-style: none; 634 } 635 .jtabs li { 636 float: left; 637 } 638 .jtabs a.jtab-disabled:hover, .jtabs a.jtab-active { 639 background: #484848; 640 border-bottom-color: #484848; 641 } 642 .jtabs a.jtab-disabled { 643 background: #383838; 644 border: 1px solid #565656; 645 border-bottom-width: 0; 646 } 112 647 113 .jtabs a { 648 position: relative;649 114 top: -27px; 650 background: #484848;651 font-weight: bold;652 padding: 1em 1.3em;653 border: 1px solid #d4d4d4;654 text-decoration:none;655 115 } 656 116 .jtab-container { 657 border: 1px solid #d4d4d4;658 background: #484848;659 117 width: 900px; 660 clear: both;661 118 } 662 .jtab-panes { margin: 3px }663 119 664 120 /*** item tooltips***/ 665 121 .item_tooltip td{ 666 float: none;667 122 font-size: 12px; 668 color: #d4d4d4;669 border:1px solid #F0D070;670 padding:10px;671 width:auto;672 background-color:#000;673 text-align:left;674 filter:alpha(opacity=80);675 -moz-opacity:.80;676 opacity:0.80;677 123 } 678 124 .info_tooltip td{ 679 float: none;680 125 font-size: 12px; 681 color: #d4d4d4; 682 border:0px solid #F0D070; 683 padding:10px; 684 width:240px; 685 background-color:#000; 686 text-align:left; 687 filter:alpha(opacity=85); 688 -moz-opacity:.85; 689 opacity:0.85; 126 690 127 } 691 .answerbox {692 float: none;693 font-size: 11px;694 color: #d4d4d4;695 border:1px solid #F0D070;696 padding:10px;697 width:auto;698 background-color:#000;699 text-align:center;700 filter:alpha(opacity=85);701 -moz-opacity:.85;702 opacity:0.85;703 }704 .answerbox th {705 font:16pt Trebuchet MS,sans-serif;706 font-weight:bold;707 color:#f6b620;708 line-height:1.2em;709 }710 .answerbox td a {711 float:none;712 display: block;713 } -
minimanager/ticket.php
r307 r374 10 10 11 11 require_once("header.php"); 12 valid_login(1); 13 14 $ticket_type = Array( 15 0 => array(0,$lang_ticket['other']), 16 1 => array(1,$lang_ticket['stuck']), 17 2 => array(2,$lang_ticket['behavior']), 18 3 => array(3,$lang_ticket['guild']), 19 4 => array(4,$lang_ticket['item']), 20 5 => array(5,$lang_ticket['environmental']), 21 6 => array(6,$lang_ticket['creep']), 22 7 => array(7,$lang_ticket['quest']), 23 8 => array(8,$lang_ticket['technical']), 24 9 => array(9,$lang_ticket['account']), 25 10 => array(10,$lang_ticket['character']) 26 ); 12 valid_login($action_permission['read']); 27 13 28 14 //######################################################################################################################## … … 47 33 48 34 $query = $sql->query("SELECT character_ticket.ticket_id, character_ticket.guid,SUBSTRING_INDEX(character_ticket.ticket_text,' ',6), 49 character_ticket.ticket_category,`characters`.name35 `characters`.name 50 36 FROM character_ticket,`characters` 51 37 LEFT JOIN character_ticket k1 ON k1.`guid`=`characters`.`guid` … … 65 51 <table class=\"lined\"> 66 52 <tr> 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> 53 <th width=\"7%\"><input name=\"allbox\" type=\"checkbox\" value=\"Check All\" onclick=\"CheckAll(document.form);\" /></th> 54 <th width=\"7%\">{$lang_global['edit']}</th> 55 <th width=\"10%\"><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> 56 <th width=\"16%\"><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> 57 <th width=\"60%\">{$lang_ticket['ticket_text']}</th> 73 58 </tr>"; 74 59 … … 78 63 <td><a href=\"ticket.php?action=edit_ticket&error=4&id=$ticket[0]\">{$lang_global['edit']}</a></td> 79 64 <td>$ticket[0]</td> 80 <td><a href=\"char.php?id=$ticket[1]\">$ticket[ 4]</a></td>65 <td><a href=\"char.php?id=$ticket[1]\">$ticket[3]</a></td> 81 66 <td>$ticket[2] ...</td> 82 <td>{$ticket_type[$ticket[3]][1]}</td>83 67 </tr>"; 84 68 } … … 86 70 $output .= "<tr><td colspan=\"12\" class=\"hidden\"><br /></td></tr> 87 71 <tr> 88 <td colspan=\" 4\" align=\"left\" class=\"hidden\">";72 <td colspan=\"3\" align=\"left\" class=\"hidden\">"; 89 73 makebutton($lang_ticket['del_selected_tickets'], "javascript:do_submit()",200); 90 74 $output .= "</td> … … 139 123 140 124 $query = $sql->query("SELECT character_ticket.guid, character_ticket.ticket_text, 141 character_ticket.ticket_category,`characters`.name125 `characters`.name 142 126 FROM character_ticket,`characters` 143 127 LEFT JOIN character_ticket k1 ON k1.`guid`=`characters`.`guid` … … 157 141 <tr> 158 142 <td>{$lang_ticket['submitted_by']}:</td> 159 <td><a href=\"char.php?id=$ticket[0]\">$ticket[ 3]</a></td>143 <td><a href=\"char.php?id=$ticket[0]\">$ticket[2]</a></td> 160 144 </tr> 161 145 <tr> 162 146 <td valign=\"top\">{$lang_ticket['ticket_text']}</td> 163 147 <td><textarea name=\"new_text\" rows=\"5\" cols=\"40\">$ticket[1]</textarea></td> 164 </tr>165 <tr>166 <td>{$lang_ticket['category']}</td>167 <td><select name=\"new_category\">";168 foreach ($ticket_type as $type){169 $output .= "<option value=\"{$type[0]}\" ";170 if ($ticket[2]==$type[0]) $output .= "selected=\"selected\" ";171 $output .= ">{$type[1]}</option>";172 }173 $output .= "</select></td>174 148 </tr> 175 149 <tr> … … 199 173 global $characters_db, $realm_id; 200 174 201 if( (!isset($_POST['new_category'])) ||($_POST['new_category'] === '')||empty($_POST['new_text']) || empty($_POST['id']) ) {175 if(empty($_POST['new_text']) || empty($_POST['id']) ) { 202 176 redirect("ticket.php?error=1"); 203 177 } … … 206 180 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 207 181 208 $new_category = $sql->quote_smart($_POST['new_category']);209 182 $new_text = $sql->quote_smart($_POST['new_text']); 210 183 $id = $sql->quote_smart($_POST['id']); 211 184 212 $query = $sql->query("UPDATE character_ticket SET ticket_text='$new_text' , ticket_category ='$new_category'WHERE ticket_id = '$id'");185 $query = $sql->query("UPDATE character_ticket SET ticket_text='$new_text' WHERE ticket_id = '$id'"); 213 186 214 187 if ($sql->affected_rows()) { -
minimanager/user.php
r307 r374 10 10 11 11 require_once("header.php"); 12 valid_login( 1);12 valid_login($action_permission['read']); 13 13 require_once("scripts/id_tab.php"); 14 14 … … 17 17 //######################################################################################################################## 18 18 function browse_users() { 19 global $lang_global, $lang_user, $output, $realm_db, $itemperpage, $user_lvl, $user_name, $gm_level_arr ;19 global $lang_global, $lang_user, $output, $realm_db, $itemperpage, $user_lvl, $user_name, $gm_level_arr, $action_permission; 20 20 21 21 $sql = new SQL; … … 41 41 <center><table class=\"top_hidden\"> 42 42 <tr><td>"; 43 if($user_lvl >= $action_permission['update']) 44 { 43 45 makebutton($lang_user['add_acc'], "user.php?action=add_new", 124); 44 46 makebutton($lang_user['cleanup'], "cleanup.php", 122); 45 47 makebutton($lang_user['backup'], "backup.php", 122); 48 } 46 49 makebutton($lang_global['back'], "javascript:window.history.back()", 122); 47 50 $output .= " </td><td align=\"right\" width=\"25%\" rowspan=\"2\">"; … … 81 84 <input type=\"hidden\" name=\"backup_op\" value=\"0\"/> 82 85 <table class=\"lined\"> 83 <tr> 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 <tr>"; 87 if($user_lvl >= $action_permission['update']) $output.= "<th width=\"1%\"><input name=\"allbox\" type=\"checkbox\" value=\"Check All\" onclick=\"CheckAll(document.form1);\" /></th>"; 88 else $output .= "<th width=\"1%\"></th>"; 89 $output .="<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 90 <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 91 <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> … … 99 103 if (($user_lvl >= $data[2])||($user_name == $data[1])){ 100 104 $output .= "<tr>"; 101 if ($user_lvl > $data[2]) $output .= "<td><input type=\"checkbox\" name=\"check[]\" value=\"$data[0]\" onclick=\"CheckCheckAll(document.form1);\" /></td>";102 105 if ($user_lvl >= $action_permission['update']) $output .= "<td><input type=\"checkbox\" name=\"check[]\" value=\"$data[0]\" onclick=\"CheckCheckAll(document.form1);\" /></td>"; 106 else $output .= "<td></td>"; 103 107 $output .= "<td>$data[0]</td> 104 108 <td><a href=\"user.php?action=edit_user&error=11&id=$data[0]\">$data[1]</a></td> 105 <td>".$gm_level_arr[$data[2]][2]."</td> 106 <td><a href=\"mailto:$data[3]\">".substr($data[3],0,15)."</a></td> 107 <td class=\"small\">$data[4]</td>"; 108 if (($user_lvl > $data[2])||($user_name == $data[1])) $output .= "<td>$data[5]</td>"; 109 <td>".$gm_level_arr[$data[2]][2]."</td>"; 110 if ($user_lvl >= $action_permission['update']) $output .= " 111 <td><a href=\"mailto:$data[3]\">".substr($data[3],0,15)."</a></td>"; 112 else $output .= "<td>***@***</td>"; 113 $output .="<td class=\"small\">$data[4]</td>"; 114 if (($user_lvl >= $action_permission['update'])||($user_name == $data[1])) $output .= "<td>$data[5]</td>"; 109 115 else $output .= "<td>******</td>"; 110 116 $output .= "<td>".(($data[6]) ? $data[6] : "-")."</td> … … 121 127 <tr> 122 128 <td colspan=\"8\" align=\"left\" class=\"hidden\">"; 129 if($user_lvl >= $action_permission['update']) { 123 130 makebutton($lang_user['del_selected_users'], "javascript:do_submit('form1',0)",220); 124 makebutton($lang_user['backup_selected_users'], "javascript:do_submit('form1',1)",220); 131 makebutton($lang_user['backup_selected_users'], "javascript:do_submit('form1',1)",220); } 125 132 $output .= "</td> 126 133 <td colspan=\"4\" align=\"right\" class=\"hidden\">{$lang_user['tot_acc']} : $all_record</td> … … 136 143 //####################################################################################################### 137 144 function search() { 138 global $lang_global, $lang_user, $output, $realm_db, $user_lvl, $user_name, $sql_search_limit, $gm_level_arr ;139 145 global $lang_global, $lang_user, $output, $realm_db, $user_lvl, $user_name, $sql_search_limit, $gm_level_arr, $action_permission; 146 valid_login($action_permission['read']); 140 147 if(!isset($_GET['search_value']) || !isset($_GET['search_by'])) redirect("user.php?error=2"); 141 148 … … 145 152 $search_value = $sql->quote_smart($_GET['search_value']); 146 153 $search_by = $sql->quote_smart($_GET['search_by']); 154 $search_menu = array('username', 'id', 'gmlevel', 'greater_gmlevel', 'email', 'joindate', 'last_ip', 'failed_logins', 'last_login', 'online', 'banned', 'locked', 'tbc'); 155 if (!array_key_exists($search_by, $search_menu)) $search_by = 'username'; 147 156 148 157 $order_by = (isset($_GET['order_by'])) ? $sql->quote_smart($_GET['order_by']) : "id"; … … 230 239 231 240 if (($user_lvl >= $data[2])||($user_name == $data[1])){ 232 $output .= "<tr>";233 if ($user_lvl > $data[2]) $output .= "<td><input type=\"checkbox\" name=\"check[]\" value=\"$data[0]\" onclick=\"CheckCheckAll(document.form1);\" /></td>";234 241 $output .= "<tr>"; 242 if ($user_lvl >= $action_permission['update']) $output .= "<td><input type=\"checkbox\" name=\"check[]\" value=\"$data[0]\" onclick=\"CheckCheckAll(document.form1);\" /></td>"; 243 else $output .= "<td></td>"; 235 244 $output .= "<td>$data[0]</td> 236 245 <td><a href=\"user.php?action=edit_user&error=11&id=$data[0]\">$data[1]</a></td> 237 <td>".$gm_level_arr[$data[2]][2]."</td> 238 <td><a href=\"mailto:$data[3]\">".substr($data[3],0,15)."</a></td> 239 <td class=\"small\">$data[4]</td>"; 240 if (($user_lvl > $data[2])||($user_name == $data[1])) $output .= "<td>$data[5]</td>"; 246 <td>".$gm_level_arr[$data[2]][2]."</td>"; 247 if ($user_lvl >= $action_permission['update']) $output .= " 248 <td><a href=\"mailto:$data[3]\">".substr($data[3],0,15)."</a></td>"; 249 else $output .= "<td>***@***</td>"; 250 $output .="<td class=\"small\">$data[4]</td>"; 251 if (($user_lvl >= $action_permission['update'])||($user_name == $data[1])) $output .= "<td>$data[5]</td>"; 241 252 else $output .= "<td>******</td>"; 242 253 $output .= "<td>".(($data[6]) ? $data[6] : "-")."</td> … … 245 256 <td>".(($data[9]) ? "<img src=\"img/up.gif\" alt=\"\" />" : "-")."</td> 246 257 </tr>"; 247 } else{258 } else { 248 259 $output .= "<tr><td>*</td><td>***</td><td>You</td><td>Have</td><td>No</td> 249 260 <td class=\"small\">Permission</td><td>to</td><td>View</td><td>this</td><td>Data</td><td>*</td></tr>"; … … 253 264 <tr> 254 265 <td colspan=\"8\" align=\"left\" class=\"hidden\">"; 266 if($user_lvl >= $action_permission['update']) { 255 267 makebutton($lang_user['del_selected_users'], "javascript:do_submit('form1',0)",220); 256 makebutton($lang_user['backup_selected_users'], "javascript:do_submit('form1',1)",220); 268 makebutton($lang_user['backup_selected_users'], "javascript:do_submit('form1',1)",220); } 257 269 $output .= "</td> 258 270 <td colspan=\"4\" align=\"right\" class=\"hidden\">{$lang_user['tot_found']} : $total_found : {$lang_global['limit']} $sql_search_limit</td> … … 269 281 //####################################################################################################### 270 282 function del_user() { 271 global $lang_global, $lang_user, $output, $realm_db; 283 global $lang_global, $lang_user, $output, $realm_db, $action_permission; 284 valid_login($action_permission['delete']); 272 285 if(isset($_GET['check'])) $check = $_GET['check']; 273 286 else redirect("user.php?error=1"); … … 313 326 function dodel_user() { 314 327 global $lang_global, $lang_user, $output, $realm_db, $characters_db, $realm_id, $user_lvl, 315 $tab_del_user_characters, $tab_del_user_realmd ;316 328 $tab_del_user_characters, $tab_del_user_realmd, $action_permission; 329 valid_login($action_permission['delete']); 317 330 $sql = new SQL; 318 331 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); … … 354 367 //##################################################################################################### 355 368 function backup_user() { 356 global $lang_global, $lang_user, $output, $realm_db, $characters_db, $realm_id, $user_lvl,$backup_dir ;357 369 global $lang_global, $lang_user, $output, $realm_db, $characters_db, $realm_id, $user_lvl,$backup_dir,$action_permission; 370 valid_login($action_permission['insert']); 358 371 $sql = new SQL; 359 372 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); … … 483 496 //####################################################################################################### 484 497 function add_new() { 485 global $lang_global, $lang_user, $output; 498 global $lang_global, $lang_user, $output, $action_permission; 499 valid_login($action_permission['insert']); 486 500 $output .= "<center> 487 501 <script type=\"text/javascript\" src=\"js/sha1.js\"></script> … … 545 559 //######################################################################################################### 546 560 function doadd_new() { 547 global $lang_global, $realm_db; 561 global $lang_global, $realm_db, $action_permission; 562 valid_login($action_permission['insert']); 548 563 549 564 if ( empty($_GET['new_user']) || empty($_GET['pass']) ) … … 595 610 //########################################################################################################### 596 611 function edit_user() { 597 global $lang_global, $lang_user, $output, $realm_db, $characters_db, $realm_id, $user_lvl, $user_name, $gm_level_arr; 612 global $lang_global, $lang_user, $output, $realm_db, $characters_db, $realm_id, $user_lvl, $user_name, $gm_level_arr, $action_permission; 613 valid_login($action_permission['view']); 598 614 599 615 if (empty($_GET['id'])) redirect("user.php?error=10"); … … 640 656 </tr> 641 657 <tr> 642 <td>{$lang_user['username']}</td> 643 <td><input type=\"text\" name=\"username\" size=\"43\" maxlength=\"15\" value=\"$data[1]\" /></td> 644 </tr> 645 <tr> 646 <td>{$lang_user['password']}</td> 647 <td><input type=\"text\" name=\"new_pass\" size=\"43\" maxlength=\"40\" value=\"******\" /></td> 648 </tr> 649 <tr> 650 <td>{$lang_user['email']}</td> 651 <td><input type=\"text\" name=\"mail\" size=\"43\" maxlength=\"225\"value=\"$data[3]\" /></td> 652 </tr> 653 <tr> 654 <td>{$lang_user['gm_level_long']}</td> 658 <td>{$lang_user['username']}</td>"; 659 if($user_lvl >= $action_permission['update']) { $output .=" 660 <td><input type=\"text\" name=\"username\" size=\"43\" maxlength=\"15\" value=\"$data[1]\" /></td>"; } 661 else $output.="<td>$data[1]</td>"; 662 $output .= " 663 </tr> 664 <tr> 665 <td>{$lang_user['password']}</td>"; 666 if($user_lvl >= $action_permission['update']) { $output .=" 667 <td><input type=\"text\" name=\"new_pass\" size=\"43\" maxlength=\"40\" value=\"******\" /></td>"; } 668 else $output.="<td>********</td>"; 669 $output .= " 670 </tr> 671 <tr> 672 <td>{$lang_user['email']}</td>"; 673 if($user_lvl >= $action_permission['update']) { $output .=" 674 <td><input type=\"text\" name=\"mail\" size=\"43\" maxlength=\"225\"value=\"$data[3]\" /></td>"; } 675 else $output.="<td>$data[3]</td>"; 676 $output .= " 677 </tr> 678 <tr> 679 <td>{$lang_user['gm_level_long']}</td>"; 680 if($user_lvl >= $action_permission['update']) { $output .=" 655 681 <td><select name=\"gmlevel\">"; 656 682 foreach ($gm_level_arr as $level){ … … 662 688 } 663 689 $output .= "</select> 664 </td> 690 </td>"; } 691 else 692 693 foreach ($gm_level_arr as $level){ 694 if ($data[2] == $level[0]) 695 $output .= "<td>{$level[0]}</td>"; 696 } 697 698 //$output .= "<td></td>"; 699 $output .=" 665 700 </tr> 666 701 <tr> … … 674 709 if ($sql->num_rows($que)){ 675 710 $banned = $sql->fetch_row($que); 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]";711 $ban_info = " From:".date('d-m-Y G:i', $banned[0])." till:".date('d-m-Y G:i', $banned[1])."<br />by $banned[2]"; 677 712 $ban_checked = " checked=\"checked\""; 678 713 } else { … … 680 715 $ban_info = ""; 681 716 } 682 $output .= "<td><input type=\"checkbox\" name=\"banned\" value=\"1\" $ban_checked/>$ban_info</td> 683 </tr> 684 <tr> 685 <td>{$lang_user['last_ip']}</td> 686 <td>$data[5]<a href=\"banned.php?action=do_add_entry&entry=$data[5]&bantime=3600&ban_type=ip_banned\"> <- {$lang_user['ban_this_ip']}</a></td> 687 </tr> 688 <td>{$lang_user['client_type']}</td> 717 if($user_lvl >= $action_permission['update']) { 718 $output .= "<td><input type=\"checkbox\" name=\"banned\" value=\"1\" $ban_checked/>$ban_info</td>"; } 719 else 720 $output .= "<td>$ban_info</td>"; 721 $output .=" 722 </tr> 723 <tr> 724 <td>{$lang_user['last_ip']}</td>"; 725 if($user_lvl >= $action_permission['update']) { $output .=" 726 <td>$data[5]<a href=\"banned.php?action=do_add_entry&entry=$data[5]&bantime=3600&ban_type=ip_banned\"> <- {$lang_user['ban_this_ip']}</a></td>"; } 727 else $output .= "<td>***.***.***.***</td>"; 728 $output .= " 729 </tr> 730 <td>{$lang_user['client_type']}</td>"; 731 if($user_lvl >= $action_permission['update']) { $output .=" 689 732 <td><select name=\"tbc\">"; 690 $output .= "<option value=\"0\">{$lang_user['classic']}</option>733 $output .= "<option value=\"0\">{$lang_user['classic']}</option> 691 734 <option value=\"1\" "; 692 735 if ($data[10]) $output .= "selected=\"selected\" "; 693 736 $output .= ">{$lang_user['expansion']}</option> 694 737 </select> 695 </td> 696 <tr> 697 <td>{$lang_user['failed_logins_long']}</td> 698 <td><input type=\"text\" name=\"failed\" size=\"43\" maxlength=\"3\" value=\"$data[6]\" /></td> 699 </tr> 738 </td>"; } 739 else $output .= "<td>{$lang_user['expansion']}</td>"; 740 $output .=" 741 <tr> 742 <td>{$lang_user['failed_logins_long']}</td>"; 743 if($user_lvl >= $action_permission['update']) { $output .=" 744 <td><input type=\"text\" name=\"failed\" size=\"43\" maxlength=\"3\" value=\"$data[6]\" /></td>";} 745 else $output .= "<td>$data[6]</td>"; 746 $output .="</tr> 700 747 <tr> 701 748 <td>{$lang_user['locked']}</td>"; 702 749 $lock_checked = ($data[7]) ? " checked=\"checked\"" : ""; 703 $output .= "<td><input type=\"checkbox\" name=\"locked\" value=\"1\" $lock_checked/></td> 750 if($user_lvl >= $action_permission['update']) 751 $output .= "<td><input type=\"checkbox\" name=\"locked\" value=\"1\" $lock_checked/></td>"; 752 else 753 $output .="<td></td>"; 754 $output.=" 704 755 </tr> 705 756 <tr> … … 740 791 } 741 792 793 794 if($user_lvl >= $action_permission['update']) 795 { 742 796 $output .= "<tr><td>"; 743 797 makebutton($lang_user['update_data'], "javascript:do_submit_data()",140); 798 makebutton($lang_user['del_acc'], "user.php?action=del_user&check%5B%5D=$id",150); 799 } 800 else 801 $output .= "<tr><td>"; 744 802 $output .= "</td><td>"; 745 makebutton($lang_user['del_acc'], "user.php?action=del_user&check%5B%5D=$id",150);746 803 makebutton($lang_global['back'], "javascript:window.history.back()",150); 747 804 $output .= "</td></tr> -
online_player.php
r309 r374 25 25 FROM `characters` WHERE `online`= 1 $order_side ORDER BY $order_by $order_dir"); 26 26 27 require_once("minimanager/lang/en US.php");27 require_once("minimanager/lang/english.php"); 28 28 $lang_index = array( 29 29 // ----- INDEX.PHP ----- -
system
-
Property svn:ignore
set to
nohup.out
-
Property svn:ignore
set to
-
wsg
-
Property svn:ignore
set to
test.php
-
Property svn:ignore
set to
Note:
See TracChangeset
for help on using the changeset viewer.