Changeset 307 for minimanager/cleanup.php
- Timestamp:
- Mar 13, 2008, 8:18:42 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
minimanager/cleanup.php
r142 r307 78 78 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 79 79 80 $result = $sql->query("SELECT guid FROM `character ` WHERE SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 35), ' ', -1) $cleanup_sign $cleanup_value");80 $result = $sql->query("SELECT guid FROM `characters` WHERE SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 35), ' ', -1) $cleanup_sign $cleanup_value"); 81 81 $total_chars = $sql->num_rows($result); 82 82 … … 218 218 $pass_array .= "-$acc[0]"; 219 219 } 220 220 221 221 $output .= "<input type=\"hidden\" name=\"check\" value=\"$pass_array\" />"; 222 222 $output .= "<br />{$lang_cleanup['tot_of']} $total_accounts {$lang_global['will_be_erased']}</font><br /><br />"; … … 243 243 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']); 244 244 245 $result = $sql->query("SELECT guid FROM `character ` WHERE totaltime $cleanup_sign $cleanup_value");245 $result = $sql->query("SELECT guid FROM `characters` WHERE totaltime $cleanup_sign $cleanup_value"); 246 246 $total_chars = $sql->num_rows($result); 247 247 … … 259 259 $pass_array .= "-$char[0]"; 260 260 } 261 261 262 262 $output .= "<input type=\"hidden\" name=\"check\" value=\"$pass_array\" />"; 263 263 $output .= "<br />{$lang_cleanup['tot_of']} $total_chars {$lang_global['will_be_erased']}</font><br /><br />"; … … 336 336 $sql->connect($db['addr'], $db['user'], $db['pass'], $db['name']); 337 337 338 $query = $sql->query("SELECT count(*) FROM `character ` WHERE account = '$acc[0]'");338 $query = $sql->query("SELECT count(*) FROM `characters` WHERE account = '$acc[0]'"); 339 339 $total_chars_in_acc = $total_chars_in_acc + $sql->result($query, 0); 340 340 } … … 434 434 } 435 435 } 436 436 437 437 $output .= "<center>"; 438 438 if ($guild_output_array){ … … 448 448 $pass_array .= "-$guild_output_array[$i]"; 449 449 } 450 450 451 451 $output .= "<input type=\"hidden\" name=\"check\" value=\"$pass_array\" />"; 452 452 $output .= "<br />{$lang_cleanup['tot_of']} ".count($guild_output_array)." {$lang_global['will_be_erased']}</font><br /><br />"; … … 478 478 479 479 //################################################################################################ 480 // DO CL AENUP480 // DO CLEANUP 481 481 //################################################################################################ 482 482 function docleanup(){ 483 483 global $lang_cleanup, $lang_global, $output, $realm_db, $characters_db, $realm_id, $user_lvl, 484 484 $tab_del_user_characters, $tab_del_user_realmd; 485 485 486 486 if (!isset($_POST['type']) || $_POST['type'] === '') redirect("cleanup.php?error=1"); 487 487 … … 502 502 503 503 switch ($type){ 504 //we del iting account array504 //we deleting account array 505 505 case "acc": 506 506 for ($i = 1; $i < count($check); $i++) { … … 515 515 break; 516 516 517 //we deleting char recter array517 //we deleting character array 518 518 case "char": 519 519 for ($i = 1; $i < count($check); $i++) { … … 526 526 //cleaning guilds 527 527 case "guild": 528 528 529 529 for ($i = 1; $i < count($check); $i++) { 530 530 if ($check[$i] != "" ) { … … 533 533 } 534 534 break; 535 535 536 //cleaning arena teams 537 case "arenateam": 538 539 for ($i = 1; $i < count($check); $i++) { 540 if ($check[$i] != "" ) { 541 if (del_arenateam($check[$i], $realm_id)) $deleted_arenateams++; 542 } 543 } 544 break; 545 536 546 default: 537 547 redirect("cleanup.php?error=1"); … … 545 555 else $output .= "<h1><font class=\"error\">{$lang_cleanup['total']} <font color=blue>$deleted_gulds</font> {$lang_cleanup['guilds_deleted']}</font></h1>"; 546 556 } else { 547 if (($deleted_acc+$deleted_chars) == 0) $output .= "<h1><font class=\"error\">{$lang_cleanup['no_acc_chars_deleted']}</font></h1>"; 548 else { 549 $output .= "<h1><font class=\"error\">{$lang_cleanup['total']} <font color=blue>$deleted_acc</font> {$lang_cleanup['accs_deleted']}</font></h1><br />"; 550 $output .= "<h1><font class=\"error\">{$lang_cleanup['total']} <font color=blue>$deleted_chars</font> {$lang_cleanup['chars_deleted']}</font></h1>"; 557 if ($type == "arenateam") { 558 if (!$deleted_arenateams) $output .= "<h1><font class=\"error\">{$lang_cleanup['no_arenateams_del']}</font></h1>"; 559 else $output .= "<h1><font class=\"error\">{$lang_cleanup['total']} <font color=blue>$deleted_arenateams</font> {$lang_cleanup['arenateams_deleted']}</font></h1>"; 560 } else { 561 if (($deleted_acc+$deleted_chars) == 0) $output .= "<h1><font class=\"error\">{$lang_cleanup['no_acc_chars_deleted']}</font></h1>"; 562 else { 563 $output .= "<h1><font class=\"error\">{$lang_cleanup['total']} <font color=blue>$deleted_acc</font> {$lang_cleanup['accs_deleted']}</font></h1><br />"; 564 $output .= "<h1><font class=\"error\">{$lang_cleanup['total']} <font color=blue>$deleted_chars</font> {$lang_cleanup['chars_deleted']}</font></h1>"; 565 } 551 566 } 552 567 }
Note:
See TracChangeset
for help on using the changeset viewer.