View file Download Portal Script/script/ocenf.php

File size: 1.34Kb
<?php
if(!$_GET["gls"]) {
      echo '<hr> 
	        <small>Rate This File</small><br />
	        <small>[<a href="ocen.php?gls=1&fl='.$lf.'&nm='.$cf.'&br='.$br.'">1</a>|<a href="ocen.php?gls=2&fl='.$lf.'&nm='.$cf.'&br='.$br.'">2</a>|<a href="ocen.php?gls=3&fl='.$lf.'&nm='.$cf.'&br='.$br.'">3</a>|<a href="ocen.php?gls=4&fl='.$lf.'&nm='.$cf.'&br='.$br.'">4</a>|<a href="ocen.php?gls=5&fl='.$lf.'&nm='.$cf.'&br='.$br.'">5</a>]</small>';
		 $uzhe = @file_get_contents('./gs/gs.'.md5($cf).'.gs');
		 $new = explode("\n",$uzhe);
		 $p2 = sizeof($new);
         $bb = array_sum($new)/$p2;
		   echo '<br /><small>Votes: '.($p2-1).' Votes
		         <br />
		                      Current score: '.round($bb,1).' Points</small>';
    } elseif($_GET["gls"]) {
	@$gs = $_GET["gls"];
	@$fl = $_GET["fl"];
	@$nm = $_GET["nm"];
	@$br = $_GET["br"];
	   switch($gs) {
	   case 1: $rs = 1;break;
	   case 2: $rs = 2;break;
	   case 3: $rs = 3;break;
	   case 4: $rs = 4;break;
	   case 5: $rs = 5;break;
         default: $rs = 0;	   
	   }
	    if($fp = @fopen('./gs/gs.'.md5($nm).'.gs',"a+")) {
	       @fputs($fp,$rs."\n");
		   @fclose($fp);
		    }
			 echo '<html><head><title>Voted</title></head><body>
<br/><br/><center>
<small>Thanks For Voting</small>
<br/>';
$back= $_SERVER['HTTP_REFERER'];
echo '<a href='.$back.'>Back</a></center><br/>
</body>
</html>';
			 exit();
	}
?>