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/scripts/del_lib.php

    r19 r142  
    1414//Delete character
    1515function del_char($guid,$realm){
    16         global $mangos_db, $realm_db, $user_lvl, $user_id, $tab_del_user_mangos;
     16        global $characters_db, $realm_db, $user_lvl, $user_id, $tab_del_user_characters;
    1717
    1818        $sql_01 = new SQL;
    19         $sql_01->connect($mangos_db[$realm]['addr'], $mangos_db[$realm]['user'], $mangos_db[$realm]['pass'], $mangos_db[$realm]['name']);
     19        $sql_01->connect($characters_db[$realm]['addr'], $characters_db[$realm]['user'], $characters_db[$realm]['pass'], $characters_db[$realm]['name']);
    2020        $query = $sql_01->query("SELECT account,online FROM `character` WHERE guid ='$guid' LIMIT 1");
    2121        $owner_acc_id = $sql_01->result($query, 0, 'account');
     
    2626       
    2727        if (($user_lvl > $owner_gmlvl)||($owner_acc_id == $user_id)) {
    28                 $sql_01->connect($mangos_db[$realm]['addr'], $mangos_db[$realm]['user'], $mangos_db[$realm]['pass'], $mangos_db[$realm]['name']);
     28                $sql_01->connect($characters_db[$realm]['addr'], $characters_db[$realm]['user'], $characters_db[$realm]['pass'], $characters_db[$realm]['name']);
    2929
    3030                if (!$sql_01->result($query, 0, 'online')){
    31                         foreach ($tab_del_user_mangos as $value){
     31                        foreach ($tab_del_user_characters as $value){
    3232                                $query = $sql_01->query("DELETE FROM {$value[0]} WHERE {$value[1]} = '$guid'");
    3333                                }
     
    5151//Delete Account - return array(deletion_flag , number_of_chars_deleted)
    5252function del_acc($acc_id){
    53         global $mangos_db, $realm_db, $user_lvl, $user_id, $tab_del_user_mangos, $tab_del_user_realmd;
     53        global $characters_db, $realm_db, $user_lvl, $user_id, $tab_del_user_characters, $tab_del_user_realmd;
    5454
    5555        $del_char = 0;
     
    6262        if (($user_lvl > $gmlevel)||($acc_id == $user_id)) {
    6363                if (!$sql_01->result($query, 0, 'online')){
    64                 foreach ($mangos_db as $db){
     64                foreach ($characters_db as $db){
    6565                        $sql_01->connect($db['addr'], $db['user'], $db['pass'], $db['name']);
    6666                        $result = $sql_01->query("SELECT guid FROM `character` WHERE account='$acc_id'");
    6767                        while ($row = $sql_01->fetch_array($result)) {
    68                                         foreach ($tab_del_user_mangos as $value)
     68                                        foreach ($tab_del_user_characters as $value)
    6969                                        $query = $sql_01->query("DELETE FROM $value[0] WHERE $value[1] = '$row[0]'");
    7070                                $del_char++;
     
    9191//Delete Guild
    9292function del_guild($guid,$realm){
    93         global $mangos_db, $realm_db;
     93        global $characters_db, $realm_db;
    9494       
    9595        require_once("scripts/defines.php");
    9696       
    9797        $sql_01 = new SQL;
    98         $sql_01->connect($mangos_db[$realm]['addr'], $mangos_db[$realm]['user'], $mangos_db[$realm]['pass'], $mangos_db[$realm]['name']);
     98        $sql_01->connect($characters_db[$realm]['addr'], $characters_db[$realm]['user'], $characters_db[$realm]['pass'], $characters_db[$realm]['name']);
    9999        $query = $sql_01->query("DELETE FROM guild WHERE guildid = '$guid'");
    100100        $query = $sql_01->query("DELETE FROM guild_rank WHERE guildid = '$guid'");
Note: See TracChangeset for help on using the changeset viewer.