View file games/new.php

File size: 1.43Kb
<?
include("modul/config.php"); include("modul/fun.php");
include("head.php");
$time=time()-3600*24*4;
$query='SELECT * FROM `files` WHERE `time`>'.$time.' ORDER BY `timeupload` DESC LIMIT 0,20';  $qu=mysql_query($query);
echo '<div class=list>Новые файлы за последние 4 дня</div>';
while($res=mysql_fetch_array($qu)) 
{
if(is_file(''.$res['infolder'].'/'.$res['name'].'')) {
$ext=pathinfo($res['name'],PATHINFO_EXTENSION); echo "<div class=hre>"; if($ext=='jpg' or $ext=='gif' or $ext=='jpeg' or $ext=='png' or $ext=='bmp' or $ext=='tiff') { echo '<img src='.$res['infolder'].'/'.$res['name'].' height='.$prev[0].' width='.$prev[1].'><br>'; }
if($ext=="nth") { echo '<img src=nth.php?id='.$res['id'].' width='.$prev[1].' height='.$prev[0].'><br>'; }  if($ext=="jar") { echo '<img src=jar.php?id='.$res['id'].' width='.$prev[1].' height='.$prev[0].'><br>'; } if($ext=="thm") { echo '<img src=thm.php?id='.$res['id'].' width='.$prev[1].' height='.$prev[0].'><br>'; }  if($res['time']>time()-3600*24*$nast['newfile']) { $new='<font color=red>NEW</font>'; } else { $new=""; }
echo '<a href=view.php?id='.$res['id'].'>'.$res['name'].'</a>('.size($res['size']).')<br>('.$res['timeupload'].')'; echo '|<a href=load.php?id='.$res['id'].'>Скачать</a> '.$new.'<br>';  if(mb_strlen($res['opis'],"UTF-8")>50) { $e="..."; } $opis=mb_substr($res['opis'],0,50,"UTF-8");  echo ''.htmlspecialchars($opis).''.$e.'</div>'; }
}
include("foot.php");
?>