File size: 3.46Kb
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")."GMT");
header ("Content-type: application/xhtml+xml; charset=UTF-8");
$mt=microtime(1);
include('setup.php');
include('func.php');
if($zip)
{include('zip.php');}
$p=intval(@$_GET['p']);
$sort=intval(@$_GET['sort']);
if($sort>1 or $sort<0)
$sort=0;
$file=htmlspecialchars($_GET['file']);
$file=str_replace("\0", '', $file);
if(!file_exists($file) or !is_file($file) or !in_array(r($file), explode(',',$allfile)) or strstr($file,'..') or strstr($file,'http://') or strstr($file,'ftp://'))
$file='';
if($file)
{$dir=str_replace('load/','',dirname($file));}
else
{
ob_start();
}
header('Content-type:text/html; charset=utf-8');
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>';
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';
echo "<title>".$_SERVER['SERVER_NAME']." ".date("H").":".date("i")."</title>";
echo'<link rel="stylesheet" href="orange.css" type="text/css"/></head><body>';
echo "<div class='contur_t'>
<img src='http://tamilanda.com/waplogo.png' alt=''>
</div></div>";
if(!$dir)
echo "<div class='t'><div class='m'>";
if(!$file)
{print 'File not found<br />';}
else
{
$dirkomm=str_replace('/', 'D', str_replace('.', 'T', $file));
if(!file_exists('komm/'.$dirkomm))
{
$fp=fopen('komm/'.$dirkomm,'w+');
fclose($fp);
}
$page=intval(@$_GET['page']);
$filetext=file('komm/'.$dirkomm);
$count=count($filetext);
$start=$count - $page*$kommstr - 1;
if($start<0)
$start=$count-1;
if($start<0)
$start=0;
$end=$start-$kommstr;
if($end<0)
$end=0;
for($i=$start; $i>=$end; $i--)
{
print $filetext[$i].'<br/>';
}
if($end>0)
print '</div></div></div><div class="t"><div class="m"><a href="komm.php?p='.$p.'&file='.$file.'&sort='.$sort.'&page='.($page+1).'">Next</a><br />';
if($page>0)
print '</div></div></div><div class="t"><div class="m"><a href="komm.php?p='.$p.'&file='.$file.'&sort='.$sort.'&page='.($page-1).'">Prev</a><br />';
print '</div></div></div><div class="contur"><div class="header"> Your name:<br/>
<form action="addkomm.php?p='.$p.'&file='.$file.'&sort='.$sort.'" method="post">
<div>
<input type="text" name="name" maxlength="20" /><br />
Comment:<br />
<input type="text" name="komm" maxlength="200" /><br />
<input type="submit" name="submitButtonName" value="submit" />
</div>
</form>
<div>';
if(($countj=count(explode('/',$dir)))>1)
{
print '</div></div></div><div class="contur"><div class="header"><div style="text-align: left">Back to:<br/>
<b>/</b><a href="index.php">Download</a><b>/</b>';
$j=explode('/',$dir);
for($i=0; $i<=$countj; $i++)
{
$u=@$j[count($j)-1];
if($u)
{
$g[$i]= '<a href="index.php?dir='.join('/', $j).'&p='.$p.'&sort='.$sort.'">'.transdir($u).'</a><b>/</b>';
unset($j[count($j)-1]);
}
}
for($i=count(@$g)-1; $i>=0; $i--)
print $g[$i];
print '<br/>';
}
}
echo "</div></div></div>";
include('counter.php');
echo "<div class='contur'><div class='header'><img src='home.gif' alt=''/> <a href='../index.php'>Home</a><br/></div></div><center>";
include('random.php');
echo "</center><div class='contur'><div class='header'><b>[Оnline: $online]</b></div></div>";
echo "<div class='contur_rek'><div class='header_rek'>© ".$_SERVER['SERVER_NAME']."</a></div></div></body></html>";
?>