Ignore:
Timestamp:
Mar 13, 2008, 8:18:42 PM (17 years ago)
Author:
george
Message:

Aktualizace na minimanager 0.1.6g.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • minimanager/cleanup.php

    r142 r307  
    7878 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']);
    7979
    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");
    8181 $total_chars = $sql->num_rows($result);
    8282
     
    218218                $pass_array .= "-$acc[0]";
    219219                }
    220                
     220
    221221        $output .= "<input type=\"hidden\" name=\"check\" value=\"$pass_array\" />";
    222222        $output .= "<br />{$lang_cleanup['tot_of']} $total_accounts {$lang_global['will_be_erased']}</font><br /><br />";
     
    243243 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']);
    244244
    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");
    246246 $total_chars = $sql->num_rows($result);
    247247
     
    259259                $pass_array .= "-$char[0]";
    260260                }
    261                
     261
    262262        $output .= "<input type=\"hidden\" name=\"check\" value=\"$pass_array\" />";
    263263        $output .= "<br />{$lang_cleanup['tot_of']} $total_chars {$lang_global['will_be_erased']}</font><br /><br />";
     
    336336                $sql->connect($db['addr'], $db['user'], $db['pass'], $db['name']);
    337337
    338                 $query = $sql->query("SELECT count(*) FROM `character` WHERE account = '$acc[0]'");
     338                $query = $sql->query("SELECT count(*) FROM `characters` WHERE account = '$acc[0]'");
    339339                $total_chars_in_acc = $total_chars_in_acc + $sql->result($query, 0);
    340340        }
     
    434434                }
    435435 }
    436  
     436
    437437 $output .= "<center>";
    438438 if ($guild_output_array){
     
    448448                $pass_array .= "-$guild_output_array[$i]";
    449449                }
    450        
     450
    451451        $output .= "<input type=\"hidden\" name=\"check\" value=\"$pass_array\" />";
    452452        $output .= "<br />{$lang_cleanup['tot_of']} ".count($guild_output_array)." {$lang_global['will_be_erased']}</font><br /><br />";
     
    478478
    479479//################################################################################################
    480 // DO CLAENUP
     480// DO CLEANUP
    481481//################################################################################################
    482482function docleanup(){
    483483 global $lang_cleanup, $lang_global, $output, $realm_db, $characters_db, $realm_id, $user_lvl,
    484484                $tab_del_user_characters, $tab_del_user_realmd;
    485        
     485
    486486 if (!isset($_POST['type']) || $_POST['type'] === '') redirect("cleanup.php?error=1");
    487487
     
    502502
    503503switch ($type){
    504  //we deliting account array
     504 //we deleting account array
    505505 case "acc":
    506506        for ($i = 1; $i < count($check); $i++) {
     
    515515break;
    516516
    517 //we deleting charrecter array
     517//we deleting character array
    518518case "char":
    519519         for ($i = 1; $i < count($check); $i++) {
     
    526526 //cleaning guilds
    527527 case "guild":
    528  
     528
    529529 for ($i = 1; $i < count($check); $i++) {
    530530    if ($check[$i] != "" ) {
     
    533533        }
    534534 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
    536546default:
    537547 redirect("cleanup.php?error=1");
     
    545555                else $output .= "<h1><font class=\"error\">{$lang_cleanup['total']} <font color=blue>$deleted_gulds</font> {$lang_cleanup['guilds_deleted']}</font></h1>";
    546556} 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>";
     557if ($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          }
    551566        }
    552567}
Note: See TracChangeset for help on using the changeset viewer.