Размер файла: 1.93Kb
<?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 `obmen_files` WHERE `kogda`>'$clocp' ORDER BY `kogda` 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 `obmen_files` WHERE `kogda`>'$clocp' ORDER BY `kogda` DESC LIMIT $page,10");
while($ofile=mysql_fetch_array($sdata)){
$dokuda='../files/'.$ofile['id_file'].'_'.$krsite.'.'.$ofile['format'];
$vesma=round(filesize($dokuda)/1024);
if($vesma==0){$vesma='Менее 1';}
echo'<div class="p">';
echo'<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_file='.$ofile['id_file'].'&'.$s.'">Скачать</a> ['.strtoupper($ofile['format']).'] ['.$vesma.'Кб]<br>
';
$koments=mysql_num_rows(mysql_query("select * from koments where type='obmen' and id_kogo='".$ofile['id_file']."'"));
$koments=mysql_num_rows(mysql_query("select * from koments where type='obmen' and id_kogo='".$ofile['id_file']."'"));
echo'<a href="../pages/koments.php?id_wm='.$ofile['id_file'].'&type=obmen&'.$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";
?>