Ignore:
Timestamp:
Nov 23, 2007, 11:29:33 PM (17 years ago)
Author:
george
Message:

Minimanager 0.1.5b

File:
1 edited

Legend:

Unmodified
Added
Removed
  • minimanager/char_edit.php

    r19 r142  
    1919//########################################################################################################################
    2020function 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,
    2222                $item_datasite;
    2323               
     
    2525
    2626$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']);
    2828 
    2929$id = $sql->quote_smart($_GET['id']);
     
    4040
    4141 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']);
    4343
    4444        $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'");
     
    169169
    170170//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']);
    172172        $query2 = $sql->query("SELECT bag,slot,item,item_template FROM character_inventory WHERE guid = '$id' ORDER BY bag,slot");
    173173
     
    232232function do_edit_char() {
    233233 global $lang_global, $lang_char, $output, $realm_db,
    234                 $mangos_db, $realm_id, $user_lvl;
     234                $characters_db, $realm_id, $user_lvl , $mangos_db;
    235235               
    236236if ( empty($_GET['id']) || empty($_GET['name']) ) error($lang_global['empty_fields']);
    237237
    238238$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']);
    240240
    241241$id = $sql->quote_smart($_GET['id']);
     
    331331        $tp_to = (isset($_GET['tp_to'])) ? $sql->quote_smart($_GET['tp_to']) : 0;
    332332
    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']);
    334334
    335335        $result = $sql->query("SELECT data FROM `character` WHERE guid = '$id'");
     
    417417
    418418        if ($tp_to){
    419                 $query = $sql->query("SELECT map, position_x, position_y, position_z, orientation FROM game_tele WHERE 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)."'");
    420420                $tele = $sql->fetch_row($query);
    421421                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.