Changeset 142 for minimanager/scripts/del_lib.php
- Timestamp:
- Nov 23, 2007, 11:29:33 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
minimanager/scripts/del_lib.php
r19 r142 14 14 //Delete character 15 15 function 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; 17 17 18 18 $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']); 20 20 $query = $sql_01->query("SELECT account,online FROM `character` WHERE guid ='$guid' LIMIT 1"); 21 21 $owner_acc_id = $sql_01->result($query, 0, 'account'); … … 26 26 27 27 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']); 29 29 30 30 if (!$sql_01->result($query, 0, 'online')){ 31 foreach ($tab_del_user_ mangos as $value){31 foreach ($tab_del_user_characters as $value){ 32 32 $query = $sql_01->query("DELETE FROM {$value[0]} WHERE {$value[1]} = '$guid'"); 33 33 } … … 51 51 //Delete Account - return array(deletion_flag , number_of_chars_deleted) 52 52 function 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; 54 54 55 55 $del_char = 0; … … 62 62 if (($user_lvl > $gmlevel)||($acc_id == $user_id)) { 63 63 if (!$sql_01->result($query, 0, 'online')){ 64 foreach ($ mangos_db as $db){64 foreach ($characters_db as $db){ 65 65 $sql_01->connect($db['addr'], $db['user'], $db['pass'], $db['name']); 66 66 $result = $sql_01->query("SELECT guid FROM `character` WHERE account='$acc_id'"); 67 67 while ($row = $sql_01->fetch_array($result)) { 68 foreach ($tab_del_user_ mangos as $value)68 foreach ($tab_del_user_characters as $value) 69 69 $query = $sql_01->query("DELETE FROM $value[0] WHERE $value[1] = '$row[0]'"); 70 70 $del_char++; … … 91 91 //Delete Guild 92 92 function del_guild($guid,$realm){ 93 global $ mangos_db, $realm_db;93 global $characters_db, $realm_db; 94 94 95 95 require_once("scripts/defines.php"); 96 96 97 97 $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']); 99 99 $query = $sql_01->query("DELETE FROM guild WHERE guildid = '$guid'"); 100 100 $query = $sql_01->query("DELETE FROM guild_rank WHERE guildid = '$guid'");
Note:
See TracChangeset
for help on using the changeset viewer.