View file download/new.files.php

File size: 1.64Kb
<?php
/*
=============================================
Движок: SHCMS Engine
=============================================
Название файла: Обменник
=============================================
Official website: http://shcms.ru
=============================================
*/
define('SHCMS', true);
include_once'../system/inc/system_core.php';

$shcmsengine['title'] = Lang::get('Файловый обменник - Новые файлы');
include_once'../template/head.php';

  $allfield = mysql_result(mysql_query("SELECT COUNT(*) FROM `download_file` WHERE `time` > ".(time()-86400).""),0);
  $newlist = new Navigation($allfield, 10,true); 
if($allfield != 0)
{						
echo '<div class="maintitle mainrazd">'.Lang::get('Новые Поступления').'</div><div class="maintext">';   
$file = mysql_query("SELECT * FROM `download_file` WHERE `time` >'".(time()-86400)."'ORDER BY `time` DESC ". $newlist->limit()."");
while( $file_while = mysql_fetch_array($file)) {
files::files_icon($file_while['type']);
}
echo '</div>';
echo '<div class="pages">';
echo $newlist->pagination();
echo '</div>';

 $file_while = mysql_fetch_array($file);
            if($file_while != null)
            {
	echo '<div class="maintext">';
 do
 {
    files::files_icon($file_while['type']);
 }
  while($file_while = mysql_fetch_array($filew));
        echo '</div><div class="pages">';
        echo $newlist1->pagination('dir='.$id);
        echo '</div>';
}

}ELSE
{
echo '<div class="posts">'.Lang::get('Новых поступлений сейчас нет.').'</div>';
}

include_once'../template/foot.php';

?>