Просмотр файла f_rating.dat

Размер файла: 2.05Kb
if ($rating) {
if ($rating=="players") {
   $ind=0;
                $count=0;
                if ($start<0 || !$start) $start=0;
                $online=array_keys($game["players"]);
                foreach($online as $i) {
                        if ($ind>=$start) {
                        if (isset($game["loc"][$game["players"][$i]][$i]["gild"])) {
                                  $z=$game["loc"][$game["players"][$i]][$i]["gild"];
                                  $z=explode("|", $z);
                                  $gi="(".$z[1].")";
                                };
                      $rat[]=$game["loc"][$game["players"][$i]][$i]["status2"]."|".$game["loc"][$game["players"][$i]][$i]['status1']."|".$game["loc"][$game["players"][$i]][$i]['title']."|".$gi;
                        unset ($gi, $z);
                        $count++;
                      //  if ($count>=$count_show) break;        // след. страница, если слишком много человек или предметов
                        }
                        $ind++;
                        }


    sort($rat, SORT_NUMERIC);
  $rat=array_reverse($rat);
         $ii=1;
  foreach($rat as $i) {
  $d=explode("|", $i);
  //$d[0]=preg_replace("/(\D)/", "", $d[0]);
  //if ($d[2] && $d[1] && $d[0])
  if ($ii!=15) $spase=" "; else $spase="";
            @$ratt[]="<u>$spase".$ii.". </u>".$d[2]."(".$d[0]."|".$d[1].")"."".$d[3]."<br/>";
          $ii++;
          };


       $online=$ratt;
       $count_show=10;
       $d='';
                       $ind=0;
                $count=0;
                if ($start<0 || !$start) $start=0;
                foreach($online as $i) {
                        if ($ind>=$start) {
                        $d.=$i;
                        $count++;
                        if ($count>=$count_show) break;        // след. страница, если слишком много человек или предметов
                        }
                        $ind++;
                        }




  msg("Рейтинг Игроков(Монстры|Игроки)<br/>".$d, "Рейтинг Игроков");

                };
}