Сделать стартовой - rss - Добавить в избранное

"; else $sQuan = ""; return $sQuan; } function currentHeroRatingByNum($nNum,$heroesList){ return $curhero = explode("|",$heroesList[$nNum]); } function currentHeroRatingById($nId,$heroesList){ $nNum = 0; $count_heroesList= count($heroesList); do{ $curhero = explode("|",$heroesList[$nNum]); $nNum++; }while($curhero[0]!=$nId && $nNum<$count_heroesList); $curhero[10] = $nNum-1; return $curhero; } function compareHeroes($nId){ $curhero = $this->currentHeroRatingById($nId,$this->heroesList); $curhero_old = $this->currentHeroRatingById($nId,$this->heroesList_old); $curhero_week = $this->currentHeroRatingById($nId,$this->heroesList_week); if(@$curhero_old[8]!=0){ @$this->comparedHero[0] = $curhero[8]>$curhero_old[8] ? '+'.($curhero[8]-$curhero_old[8]) : ''.($curhero[8]-$curhero_old[8]); }else @$this->comparedHero[0] = 0; if(@$curhero_week[8]!=0){ @$this->comparedHero[2] = $curhero[8]>$curhero_week[8] ? '+'.($curhero[8]-$curhero_week[8]) : ''.($curhero[8]-$curhero_week[8]); }else{ @$this->comparedHero[2] = 0; } if(@$curhero_old[10]!=count($this->heroesList_old)-1){ @$this->comparedHero[1] = $curhero[10]>$curhero_old[10] ? $curhero_old[10]-$curhero[10] : $curhero_old[10]-$curhero[10]; }else @$this->comparedHero[1] = -1001; if(@$curhero_week[10]!=count($this->heroesList_week)-1){ @$this->comparedHero[3] = $curhero[10]>$curhero_week[10] ? $curhero_week[10]-$curhero[10] : $curhero_week[10]-$curhero[10]; }else{ @$this->comparedHero[3] = -1001; } return $this->comparedHero; } function setArrowPic(){ $sArrows = ""; if ($this->comparedHero[1]==-1001) $sArrows .= "Новичок"; elseif ($this->comparedHero[1]>0) $sArrows .= "+{$this->comparedHero[1]}"; elseif ($this->comparedHero[1]==0) $sArrows .= "  "; elseif ($this->comparedHero[1]<0) $sArrows .= "{$this->comparedHero[1]}"; $sArrows .= ""; elseif ($this->comparedHero[3]>0) $sArrows .= "+{$this->comparedHero[3]}"; elseif ($this->comparedHero[3]==0) $sArrows .= "  "; elseif ($this->comparedHero[3]<0) $sArrows .= "{$this->comparedHero[3]}"; return $sArrows; } function insertTableHead(){ @$pagenum = $_GET['quan']; echo "
Рейтинг: Хаотический
Рейтинги || Хаотический
Обновление рейтингов ежесуточное. Недельный рейтинг обнуляется каждое воскресенье.
heroesList = $this->loadHeroesList($sPath); $this->heroesList_old = $this->loadHeroesList($sPath_old); $this->heroesList_week = $this->loadHeroesList($sPath_week); } function loadHeroesList($sPath){ $rf=""; @$handle = fopen ($sPath, "r"); if( ! @$handle ) { return $this->Error=1; } else { while (!feof ($handle)) { $rf .= fgets($handle, 4096); } fclose ($handle); $HeroesList = explode("\n",$rf); } return $HeroesList; } function pageQuantity(){ $this->pageQuantity = count($this->heroesList)/100; $this->pageQuantity = (integer)$this->pageQuantity; $quan=''; if (@$_GET['quan']==null) $tmp2 = 1; else $tmp2 = $_GET['quan']; for ($i=1;$i<=$this->pageQuantity;$i++){ $num = $i; if ($tmp2==$i) $num = "".$num.""; $quan .= "$num "; } if ($this->pageQuantity>1) $sQuan = "
Страницы: $quan
{$this->comparedHero[0]} +{$this->comparedHero[1]} {$this->comparedHero[0]}  {$this->comparedHero[0]} {$this->comparedHero[1]} {$this->comparedHero[0]}"; if ($this->comparedHero[3]==-1001) $sArrows .= "Новичок {$this->comparedHero[2]} +{$this->comparedHero[3]}{$this->comparedHero[2]}  {$this->comparedHero[2]} {$this->comparedHero[3]}{$this->comparedHero[2]}
". $this->pageQuantity(). "
"; } function insertRow($num){ $this->currentHero = $this->currentHeroRatingByNum($num,$this->heroesList); $this->compareHeroes($this->currentHero[0]); $sInfo="Информация о персонаже"; $historyRating = $this->setArrowPic(); $iter = $num+1; if ($this->currentHero[3]==1) $dealer="Дилер"; else $dealer=""; if ($this->currentHero[7]!=null) $status="{$this->currentHero[7]}"; else $status=""; if ($this->currentHero[4]!=0) $clan="{$this->currentHero[5]} [{$this->currentHero[6]}]"; else $clan=""; $sklonnalt[1]="Нейтрал"; $sklonnalt[2]="Усганоли Хоунихи | Игнесс"; $sklonnalt[3]="Кэна ка Кхотсо | Раанор"; $sklonnalt[4]="Тер***-о-Бисса | Тарбис"; $sklonnalt[5]="Тала Иголиига | Витарра"; $sklonnalt[6]="Аскиру Чуратай | Дримнир"; $tmp=$this->currentHero[9]; if ($this->currentHero[9]!=0) $sklonn="{$sklonnalt[$tmp]}"; else $sklonn="  "; $sRow = ""; echo $sRow; } function insertFooter(){ echo "

п/п
Персонаж Очки Позиция за день Рост за день Позиция за неделю Рост за неделю
$iter $sklonn $clan $dealer $status {$this->currentHero[1]} [{$this->currentHero[2]}] $sInfo {$this->currentHero[8]} {$historyRating}

". $this->pageQuantity(). "
"; } } $heroes = new CHeroesList('http://ratings.ereality.ru/txt/r5.txt','http://www.news.ereality.ru/tip/rat/r5.txt','http://www.news.ereality.ru/tip/rat/r5_week.txt'); if ($heroes->Error==0){ $heroes->insertTableHead(); if (@$_GET['quan']==null) $quantity=100; else { if ($_GET['quan']!=1) $quantity=(integer)$_GET['quan']*100; else $quantity=(integer)$_GET['quan']+100; } if ($quantity==100 || $quantity==101){ $begin = 0; if ($quantity==101) --$quantity; }else{ $begin = $quantity-100; } for ($i=$begin;$i<$quantity;$i++){ $heroes->insertRow($i); } $heroes->insertFooter(); }else{ Echo "
Сервис временно недоступен
"; return; } ?>


золото артефакты образы инструменты +1

Грани Реальности
{changeskin}