  | 
        Рейтинг: Хаотический | 
          | 
    
    
          | 
        
Рейтинги || Хаотический
Обновление рейтингов ежесуточное.
Недельный рейтинг обнуляется каждое воскресенье.
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
   				 	 | 
";
    		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 .= "
 |  {$this->comparedHero[0]} | ";
        	elseif ($this->comparedHero[1]>0)
        		$sArrows .= "![+{$this->comparedHero[1]}](http://www.news.ereality.ru/tip/rat/img/plus.gif)
 +{$this->comparedHero[1]} |  {$this->comparedHero[0]} | ";
        	elseif ($this->comparedHero[1]==0)
        		$sArrows .= "       | {$this->comparedHero[0]} | ";
        	elseif ($this->comparedHero[1]<0)
        		$sArrows .= "![{$this->comparedHero[1]}](http://www.news.ereality.ru/tip/rat/img/minus.gif)
 {$this->comparedHero[1]} |   {$this->comparedHero[0]} | ";
        	$sArrows .= "";
        	if ($this->comparedHero[3]==-1001)
        		$sArrows .= "  |  |  {$this->comparedHero[2]} | ";
        	elseif ($this->comparedHero[3]>0)
        		$sArrows .= "![+{$this->comparedHero[3]}](http://www.news.ereality.ru/tip/rat/img/plus.gif)
 +{$this->comparedHero[3]} | {$this->comparedHero[2]} | ";
        	elseif ($this->comparedHero[3]==0)
        		$sArrows .= "       | {$this->comparedHero[2]} | ";
        	elseif ($this->comparedHero[3]<0)
        		$sArrows .= "![{$this->comparedHero[3]}](http://www.news.ereality.ru/tip/rat/img/minus.gif)
 {$this->comparedHero[3]} | {$this->comparedHero[2]} | ";
        	return $sArrows;        	 
        }
        function insertTableHead(){
        	@$pagenum = $_GET['quan'];
        	echo "
    
          | 
    
    
          | 
          | 
          |