Размер файла: 2.29Kb
<?php
$title='Новые загрузки за 3дня';
require"../system/config.php";
require"../system/func.php";
require"../system/head.php";
require"../system/error.php";
echo'<div class="i">'.$title.'<br></div>';
$clocp=time()-86400*3;
$total=mysql_result(mysql_query("SELECT COUNT(*) FROM `down_files` WHERE `typer`='file' AND `dobav`>'$clocp' ORDER BY `dobav` LIMIT 30"),0);
$page = abs((int)$_GET['page']);
if($page < 0 || $page > $total) $page = 0;
if ($total < $page + 10) $end = $total;
else $end = $page + 10;
if($total==0){echo'За последние 3дня,небылo новых загрузок';} $sdata=mysql_query("SELECT * FROM `down_files` WHERE `typer`='file' AND `dobav`>'$clocp' ORDER BY `dobav` DESC LIMIT $page,10");
while($ofile=mysql_fetch_array($sdata)){
$dokuda='../down/'.$ofile['put'].'/'.$ofile['nastna'].'.'.$ofile['format'];
$vesma=round(filesize($dokuda)/1024);
if($vesma==0){$vesma='Менее 1';}
$pere=preg_replace('/\/(.*?)\//si','',$ofile['put']);
$kateg=mysql_fetch_assoc(mysql_query("SELECT `name` FROM `down_files` WHERE `nastna`='$pere' AND `typer`='dir' LIMIT 1"));
echo'<div class="p">';
if(empty($ofile['name'])){
$ofile['name']=$ofile['nastna'].'.'.$ofile['format'];
}
echo'<b>Категория:</b> <a href="index.php?dir='.$ofile['put'].'">'.$kateg['name'].'</a><br><b>Имя:</b> <a href="'.$ofile['id_file'].'.info">'.$ofile['name'].'</a> <br><b>Описание: </b>'; if($ofile['opis']==""){echo'нет';}else{echo mb_substr($ofile['opis'],0,200,'UTF-8');} echo'<br>
<small>Скачали: '.$ofile['loads'].' раз<br></small>
<a href="load.php?id_load='.$ofile['id_file'].'&'.$s.'">Скачать</a> ['.strtoupper($ofile['format']).'] ['.$vesma.'Кб]<br>
';
$koments=mysql_num_rows(mysql_query("select * from koments where type='downs' and id_kogo='".$ofile['id_file']."'"));
$koments=mysql_num_rows(mysql_query("select * from koments where type='downs' and id_kogo='".$ofile['id_file']."'"));
echo'<a href="../pages/koments.php?id_wm='.$ofile['id_file'].'&type=downs&'.$s.'">Комментарии</a> ['.$koments.']<br>
</div>';
}
echo'<div class="p">';
strpage($page, 10, $total, "new.php"); echo'</div><div class="p"><img src="'.$dirsite.'/design/default/act.gif" alt=""> <a href="index.php">В архив</a></div>';
require"../system/foot.php";
?>