Changeset 307 for minimanager/scripts
- Timestamp:
- Mar 13, 2008, 8:18:42 PM (17 years ago)
- Location:
- minimanager/scripts
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
minimanager/scripts/backup_tab.php
r142 r307 23 23 "arena_team", 24 24 "arena_team_member", 25 " `character`",25 "characters", 26 26 "character_action", 27 27 "character_aura", … … 40 40 "character_tutorial", 41 41 "corpse", 42 " `group`",42 "groups", 43 43 "group_member", 44 44 "guild", … … 77 77 Array("guild_member","guid"), 78 78 Array("corpse","guid"), 79 Array(" `group`","leaderGuid"),79 Array("groups","leaderGuid"), 80 80 Array("group_member","memberGuid"), 81 81 Array("group_member","leaderGuid"), … … 88 88 Array("petition_sign","ownerguid"), 89 89 Array("petition_sign","playerguid"), 90 Array("`character `","guid")90 Array("`characters`","guid") 91 91 ); 92 92 … … 117 117 Array("character_gifts","guid"), 118 118 Array("character_instance","guid"), 119 Array(" `character`","guid")119 Array("characters","guid") 120 120 ); 121 121 ?> -
minimanager/scripts/config.sample.php
r305 r307 12 12 */ 13 13 14 $version = "0.1.6 d";14 $version = "0.1.6g"; 15 15 16 16 //---- SQL Configuration ---- … … 38 38 'pass' => "pass", //SQL server pass this DB located on 39 39 'name' => "mangos", //World Database name 40 'encoding' => "utf8", //SQL connection encoding 41 'db_rev' => "UDB rev.0.9.0 (334)" //db rev. used 42 40 'encoding' => "utf8" //SQL connection encoding 43 41 ), 44 42 ); … … 62 60 'term_type' => "SSH", //Terminal type - ("SSH"/"Telnet") 63 61 'term_port' => 22, //Terminal port 64 'rev' => "rev.5 019 SD222", //Mangos rev. used62 'rev' => "rev.5297 SD269", //Mangos rev. used 65 63 'both_factions' => true //Allow to see opponent faction characters. Affects only players. 66 64 ), … … 144 142 array("cleanup.php", 'cleanup'), 145 143 array("stat.php", 'statistics'), 144 array("stat_on.php", 'statistics_on'), 146 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'), 147 146 ), … … 157 156 array("mail.php", 'mail'), 158 157 array("irc.php", 'irc'), 158 array("instances.php", 'instances'), 159 159 ), 160 160 ), … … 187 187 array("cleanup.php", 'cleanup'), 188 188 array("stat.php", 'statistics'), 189 array("stat_on.php", 'statistics_on'), 189 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'), 190 191 ), … … 200 201 array("mail.php", 'mail'), 201 202 array("irc.php", 'irc'), 203 array("instances.php", 'instances'), 202 204 ), 203 205 ), … … 230 232 array("cleanup.php", 'cleanup'), 231 233 array("stat.php", 'statistics'), 234 array("stat_on.php", 'statistics_on'), 232 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'), 233 236 ), … … 243 246 array("mail.php", 'mail'), 244 247 array("irc.php", 'irc'), 248 array("instances.php", 'instances'), 245 249 ), 246 250 ), … … 272 276 array("banned.php", 'banned_list'), 273 277 array("stat.php", 'statistics'), 278 array("stat_on.php", 'statistics_on'), 274 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'), 275 280 ), … … 282 287 array("mail.php", 'mail'), 283 288 array("irc.php", 'irc'), 289 array("instances.php", 'instances'), 284 290 ), 285 291 ), … … 309 315 array("banned.php", 'banned_list'), 310 316 array("stat.php", 'statistics'), 311 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'), 312 ), 313 ), 314 array("#", 'tools', array( 315 array("ticket.php", 'tickets'), 316 array("ahstats.php", 'auctionhouse'), 317 array("events.php", 'events'), 318 array("motd.php", 'add_motd'), 319 array("irc.php", 'irc'), 317 array("stat_on.php", 'statistics_on'), 318 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'), 319 ), 320 ), 321 array("#", 'tools', array( 322 array("ticket.php", 'tickets'), 323 array("ahstats.php", 'auctionhouse'), 324 array("events.php", 'events'), 325 array("motd.php", 'add_motd'), 326 array("irc.php", 'irc'), 327 array("instances.php", 'instances'), 320 328 ), 321 329 ), … … 342 350 array("honor.php", 'honor'), 343 351 array("stat.php", 'statistics'), 344 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'), 345 ), 346 ), 347 array("#", 'tools', array( 348 array("ahstats.php", 'auctionhouse'), 349 array("command.php", 'command'), 350 array("events.php", 'events'), 351 array("irc.php", 'irc'), 352 array("stat_on.php", 'statistics_on'), 353 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'), 354 ), 355 ), 356 array("#", 'tools', array( 357 array("ahstats.php", 'auctionhouse'), 358 array("command.php", 'command'), 359 array("events.php", 'events'), 360 array("irc.php", 'irc'), 361 array("instances.php", 'instances'), 352 362 ), 353 363 ), -
minimanager/scripts/db_layer/mysql.php
r19 r307 23 23 if ($pconnect) $this->link_id = @mysql_pconnect($db_host, $db_username, $db_password); 24 24 else $this->link_id = @mysql_connect($db_host, $db_username, $db_password, $newlink); 25 25 26 26 if ($this->link_id){ 27 27 if($db_name){ … … 60 60 return ($query_id) ? @mysql_fetch_row($query_id) : false; 61 61 } 62 62 63 63 function fetch_array($query_id = 0){ 64 64 return ($query_id) ? @mysql_fetch_array($query_id) : false; … … 68 68 return ($query_id) ? @mysql_fetch_assoc($query_id) : false; 69 69 } 70 70 71 71 function num_rows($query_id = 0){ 72 72 return ($query_id) ? @mysql_num_rows($query_id) : false; 73 73 } 74 74 75 75 function num_fields($query_id = 0){ 76 76 return ($query_id) ? @mysql_num_fields($query_id) : false; … … 100 100 return ($query_id) ? @mysql_field_name($query_id,$field_offset) : false; 101 101 } 102 102 103 103 function quote_smart($value){ 104 104 if( is_array($value) ) { 105 return array_map( array( 'SQL','quote_smart') , $value);105 return array_map( array(&$this,'quote_smart') , $value); 106 106 } else { 107 107 if( get_magic_quotes_gpc() ) $value = stripslashes($value); … … 116 116 return mysql_error(); 117 117 } 118 118 119 119 function close(){ 120 120 global $tot_queries; … … 125 125 } else return false; 126 126 } 127 127 128 128 function start_transaction(){ 129 129 return; -
minimanager/scripts/defines.php
r178 r307 60 60 define('CHAR_DATA_OFFSET_SPELL_CRIT_PER',1259); 61 61 define('CHAR_DATA_OFFSET_GOLD',1332); 62 define('CHAR_DATA_OFFSET_HONOR_KILL',13 84);62 define('CHAR_DATA_OFFSET_HONOR_KILL',1391); 63 63 define('CHAR_DATA_OFFSET_HONOR_POINTS',1432); 64 64 define('CHAR_DATA_OFFSET_ARENA_POINTS',1433); -
minimanager/scripts/del_lib.php
r178 r307 18 18 $sql_01 = new SQL; 19 19 $sql_01->connect($characters_db[$realm]['addr'], $characters_db[$realm]['user'], $characters_db[$realm]['pass'], $characters_db[$realm]['name']); 20 $query = $sql_01->query("SELECT account,online FROM `character ` WHERE guid ='$guid' LIMIT 1");20 $query = $sql_01->query("SELECT account,online FROM `characters` WHERE guid ='$guid' LIMIT 1"); 21 21 $owner_acc_id = $sql_01->result($query, 0, 'account'); 22 22 $sql_01->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); … … 64 64 foreach ($characters_db as $db){ 65 65 $sql_01->connect($db['addr'], $db['user'], $db['pass'], $db['name']); 66 $result = $sql_01->query("SELECT guid FROM `character ` WHERE account='$acc_id'");66 $result = $sql_01->query("SELECT guid FROM `characters` WHERE account='$acc_id'"); 67 67 while ($row = $sql_01->fetch_array($result)) { 68 68 foreach ($tab_del_user_characters as $value) … … 100 100 $query = $sql_01->query("DELETE FROM guild_rank WHERE guildid = '$guid'"); 101 101 102 //clean data inside character .data field102 //clean data inside characters.data field 103 103 $temp = $sql_01->query("SELECT guid FROM guild_member WHERE guildid = '$guid'"); 104 104 while ($guild_member = $sql_01->fetch_row($temp)){ 105 $char_data = $sql_01->query("SELECT data FROM `character ` WHERE guid = '$guild_member[0]'");105 $char_data = $sql_01->query("SELECT data FROM `characters` WHERE guid = '$guild_member[0]'"); 106 106 $data = $sql_01->result($char_data, 0, 'data'); 107 107 $data = explode(' ',$data); … … 109 109 $data[CHAR_DATA_OFFSET_GUILD_RANK] = 0; 110 110 $data = implode(" ",$data); 111 $query = $sql_01->query("UPDATE `character ` SET data = '$data' WHERE guid = '$guild_member[0]'");111 $query = $sql_01->query("UPDATE `characters` SET data = '$data' WHERE guid = '$guild_member[0]'"); 112 112 } 113 113 … … 123 123 } 124 124 125 //########################################################################################## 126 //Delete Arena Team 127 function del_arenateam($guid,$realm){ 128 global $characters_db, $realm_db; 129 130 require_once("scripts/defines.php"); 131 132 $sql_01 = new SQL; 133 $sql_01->connect($characters_db[$realm]['addr'], $characters_db[$realm]['user'], $characters_db[$realm]['pass'], $characters_db[$realm]['name']); 134 $query = $sql_01->query("DELETE FROM arena_team WHERE arenateamid = '$guid'"); 135 $query = $sql_01->query("DELETE FROM arena_team_stats WHERE arenateamid = '$guid'"); 136 137 // Cant clean the character data field since the data is incorrect on these fields 138 // http://wiki.udbforums.org/index.php/Character_data 139 //clean data inside characters.data field 140 //$temp = $sql_01->query("SELECT guid FROM arena_team_member WHERE arenateamid = '$guid'"); 141 //while ($arenateam_member = $sql_01->fetch_row($temp)){ 142 // $char_data = $sql_01->query("SELECT data FROM `characters` WHERE guid = '$arenateam_member[0]'"); 143 // $data = $sql_01->result($char_data, 0, 'data'); 144 // $data = explode(' ',$data); 145 // $data[CHAR_DATA_OFFSET_GUILD_ID] = 0; 146 // $data[CHAR_DATA_OFFSET_GUILD_RANK] = 0; 147 // $data = implode(" ",$data); 148 // $query = $sql_01->query("UPDATE `characters` SET data = '$data' WHERE guid = '$arenateam_member[0]'"); 149 // } 150 // 151 $query = $sql_01->query("DELETE FROM arena_team_member WHERE arenateamid = '$guid'"); 152 153 if ($sql_01->affected_rows()){ 154 $sql_01->close(); 155 return true; 156 } else { 157 $sql_01->close(); 158 return false; 159 } 160 } 161 125 162 ?> -
minimanager/scripts/extra_lib.php
r304 r307 142 142 $mysql2 = new SQL; 143 143 $mysql2->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 144 $result = $mysql2->query("SELECT race FROM `character ` WHERE account = '$user_id';");144 $result = $mysql2->query("SELECT race FROM `characters` WHERE account = '$user_id';"); 145 145 if(!$mysql2->num_rows($result)) 146 146 return "NO"; -
minimanager/scripts/get_lib.php
r178 r307 24 24 } 25 25 26 //########################################################################################## 27 //get DBC Language from config 28 function get_lang_id() { 29 # DBC Language Settings 30 # 0 = English 31 # 1 = Korean 32 # 2 = French 33 # 3 = German 34 # 4 = Chinese 35 # 5 = Taiwanese 36 # 6 = Spanish 37 # 7 = Russian 38 # 8 = Unknown 39 # 9 = Unknown 40 # 10 = Unknown 41 # 11 = Unknown 42 # 12 = Unknown 43 # 13 = Unknown 44 # 14 = Unknown 45 # 15 = Unknown 46 global $language; 47 if (isset($_COOKIE["lang"])) $language=$_COOKIE["lang"]; 48 49 switch ($language) { 50 case 'frBE': 51 case 'frFR': 52 return 2; 53 break; 54 case 'deDE': 55 return 3; 56 break; 57 case 'esAR': 58 return 6; 59 break; 60 case 'ruRU': 61 return 7; 62 break; 63 default: 64 return 0; 65 break; 66 } 67 } 26 68 27 69 //########################################################################################## … … 33 75 $sql_1->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 34 76 35 $result = $sql_1->query("SELECT name FROM item_template WHERE entry = '$item_id'"); 77 $deplang = get_lang_id(); 78 $result = $sql_1->query("SELECT IFNULL(".($deplang<>0?"name_loc$deplang":"NULL").",`name`) as name FROM item_template LEFT JOIN locales_item ON item_template.entry = locales_item.entry WHERE item_template.entry = '$item_id'"); 36 79 $item_name = ($sql_1->num_rows($result) == 1) ? $sql_1->result($result, 0,"name") : "ItemID: $item_id Not Found" ; 37 80 … … 45 88 //generate item tooltip from item_template.entry 46 89 function get_item_tooltip($item_id){ 47 global $lang_global, $lang_item, $lang_id_tab, $mangos_db, $realm_id, $itemset_id ;90 global $lang_global, $lang_item, $lang_id_tab, $mangos_db, $realm_id, $itemset_id, $language; 48 91 if($item_id){ 49 92 $sql_1 = new SQL; 50 93 $sql_1->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']); 51 94 95 $deplang = get_lang_id(); 52 96 $result_1 = $sql_1->query("SELECT stat_type1,stat_value1,stat_type2,stat_value2,stat_type3,stat_value3,stat_type4, 53 97 stat_value4,stat_type5,stat_value5,stat_type6,stat_value6,stat_type7,stat_value7,stat_type8, 54 98 stat_value8,stat_type9,stat_value9,stat_type10,stat_value10,armor,holy_res,fire_res,nature_res, 55 99 frost_res,arcane_res,shadow_res,spellid_1,spellid_2,spellid_3,spellid_4,spellid_5, 56 name,class,subclass,Quality,RequiredLevel,dmg_min1,dmg_max1,dmg_type1,dmg_min2,dmg_max2,dmg_type2,100 IFNULL(".($deplang<>0?"name_loc$deplang":"NULL").",name),class,subclass,Quality,RequiredLevel,dmg_min1,dmg_max1,dmg_type1,dmg_min2,dmg_max2,dmg_type2, 57 101 dmg_min3,dmg_max3,dmg_type3,dmg_min4,dmg_max4,dmg_type4,dmg_min5,dmg_max5,dmg_type5,delay,bonding, 58 description,itemset, entry,InventoryType,ItemLevel,displayid,maxcount,spelltrigger_1,spelltrigger_2,102 description,itemset,item_template.entry,InventoryType,ItemLevel,displayid,maxcount,spelltrigger_1,spelltrigger_2, 59 103 spelltrigger_3,spelltrigger_4,spelltrigger_5,ContainerSlots,spellcharges_1,spellcharges_2,spellcharges_3 60 104 spellcharges_4,spellcharges_5,AllowableClass,socketColor_1,socketColor_2,socketColor_3,RandomProperty,RandomSuffix 61 FROM item_template WHEREentry = '$item_id' LIMIT 1");105 FROM item_template LEFT JOIN locales_item ON item_template.entry = locales_item.entry WHERE item_template.entry = '$item_id' LIMIT 1"); 62 106 if ($item = $sql_1->fetch_row($result_1)) { 63 107 $tooltip = ""; … … 607 651 //########################################################################################## 608 652 //get item icon - if icon not exists in INV folder D/L it from web. 653 609 654 function get_icon($itemid) { 610 655 global $proxy_cfg, $get_icons_from_web; … … 667 712 } 668 713 714 669 715 //########################################################################################## 670 716 //generate item border from item_template.entry
Note:
See TracChangeset
for help on using the changeset viewer.