View file f.php

File size: 938B
<?php $accept = getenv ('HTTP_ACCEPT'); if (strpos($accept, 'text/html') !== false or $accept == '*/*') {include ("xml.php");} else {include ("wml.php");}
$ex=explode("/",$f);
$path="files/";
$top=unserialize(file_get_contents("top.dat"));
$op=unserialize(file_get_contents("op.dat"));
$l=count($ex)-1; $name=substr($ex[$l],0,-4);
if($op[$name]=="")$op[$name]="Нет описания <a href='admin.php?id=$name'>+</a>";
foreach($top[$name] as $k=>$v){$new[$k]=$v[$k];}
arsort($new);
foreach($new as $k=>$v){$my[]=$k;}
echo"<br/><b>$name</b><br/>&gt;&gt;<a href='$path$f'>Скачать</a>,".round(filesize($path.$f)/1024)."kb<br/>Описание:<br/><b>[</b>".$op[$name]."<b>]</b><br/><u>Рейтинг:</u>".$my[0]."<br/>Оценить:<br/>|";
for($i=1; $i<=5; $i++){echo"<a href='top.php?id=$name&amp;bal=$i'>$i</a>|";}echo"<br/><anchor>&lt;&lt;&lt;Назад<prev/></anchor><br/>";
include("online.php"); echo $px; ?>