Changeset 142 for minimanager/char_edit.php
- Timestamp:
- Nov 23, 2007, 11:29:33 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
minimanager/char_edit.php
r19 r142 19 19 //######################################################################################################################## 20 20 function edit_char() { 21 global $lang_global, $lang_char, $lang_item, $output, $realm_db, $ mangos_db, $realm_id, $user_lvl,21 global $lang_global, $lang_char, $lang_item, $output, $realm_db, $characters_db, $realm_id, $user_lvl, 22 22 $item_datasite; 23 23 … … 25 25 26 26 $sql = new SQL; 27 $sql->connect($ mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);27 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 28 28 29 29 $id = $sql->quote_smart($_GET['id']); … … 40 40 41 41 if ($user_lvl >= $owner_gmlvl){ 42 $sql->connect($ mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);42 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 43 43 44 44 $result = $sql->query("SELECT guid,account,data,name,race,class,position_x,position_y,map,online,totaltime,position_z,zone FROM `character` WHERE guid = '$id'"); … … 169 169 170 170 //inventory+bank items 171 $sql->connect($ mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);171 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 172 172 $query2 = $sql->query("SELECT bag,slot,item,item_template FROM character_inventory WHERE guid = '$id' ORDER BY bag,slot"); 173 173 … … 232 232 function do_edit_char() { 233 233 global $lang_global, $lang_char, $output, $realm_db, 234 $ mangos_db, $realm_id, $user_lvl;234 $characters_db, $realm_id, $user_lvl , $mangos_db; 235 235 236 236 if ( empty($_GET['id']) || empty($_GET['name']) ) error($lang_global['empty_fields']); 237 237 238 238 $sql = new SQL; 239 $sql->connect($ mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);239 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 240 240 241 241 $id = $sql->quote_smart($_GET['id']); … … 331 331 $tp_to = (isset($_GET['tp_to'])) ? $sql->quote_smart($_GET['tp_to']) : 0; 332 332 333 $sql->connect($ mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);333 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 334 334 335 335 $result = $sql->query("SELECT data FROM `character` WHERE guid = '$id'"); … … 417 417 418 418 if ($tp_to){ 419 $query = $sql->query("SELECT map, position_x, position_y, position_z, orientation FROM game_teleWHERE LOWER(name) = '".strtolower($tp_to)."'");419 $query = $sql->query("SELECT map, position_x, position_y, position_z, orientation FROM `".$mangos_db[$realm_id]['name']."`.`game_tele` WHERE LOWER(name) = '".strtolower($tp_to)."'"); 420 420 $tele = $sql->fetch_row($query); 421 421 if($tele) $teleport = "map='$tele[0]', position_x='$tele[1]', position_y='$tele[2]', position_z='$tele[3]', orientation='$tele[4]',";
Note:
See TracChangeset
for help on using the changeset viewer.