Сделать стартовой - 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[3] = $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[1]!=0){ @$this->comparedHero[0] = $curhero[1]>$curhero_old[1] ? '+'.($curhero[1]-$curhero_old[1]) : ''.($curhero[1]-$curhero_old[1]); }else @$this->comparedHero[0] = 0; if(@$curhero_week[1]!=0){ @$this->comparedHero[2] = $curhero[1]>$curhero_week[1] ? '+'.($curhero[1]-$curhero_week[1]) : ''.($curhero[1]-$curhero_week[1]); }else{ @$this->comparedHero[2] = 0; } if(@$curhero_old[3]!=count($this->heroesList_old)-1){ @$this->comparedHero[1] = $curhero[3]>$curhero_old[3] ? $curhero_old[3]-$curhero[3] : $curhero_old[3]-$curhero[3]; }else @$this->comparedHero[1] = -1001; if(@$curhero_week[3]!=count($this->heroesList_week)-1){ @$this->comparedHero[3] = $curhero[3]>$curhero_week[3] ? $curhero_week[3]-$curhero[3] : $curhero_week[3]-$curhero[3]; }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 insertName($nId){ switch ($nId){ case 2: return 'Усганоли Хоунихи | Игнесс'; break; case 3: return 'Кэна ка Кхотсо | Раанор'; break; case 4: return 'Тер***-о-Бисса | Тарбис'; break; case 5: return 'Тала Иголиига | Витарра'; break; case 6: return 'Аскиру Чуратай | Дримнир'; break; } } function insertTableHead(){ @$pagenum = $_POST['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 (@$_POST['quan']==null) $tmp2 = 1; else $tmp2 = $_POST['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); $nId = $this->currentHero[0]; $this->compareHeroes($nId); $sName = $this->insertName($nId); $historyRating = $this->setArrowPic(); $iter = $num+1; $clan=""; $sRow = ""; echo $sRow; } function insertFooter(){ echo "

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

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


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

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