View file up/new.php

File size: 3.4Kb
<?php	
require_once"../template/start.php";
require_once"../template/regglobals.php";
require_once"../template/config.php";
require_once"../template/functions.php";
require_once"../template/antidos.php";
require_once"../template/cookies.php";
require_once"../template/gzip.php";
require_once"../template/header.php";
require_once"../template/referer.php";
include_once"../themes/$config_themes/index.php";
include_once"../template/isset.php";

require_once "moduls/config.php";
require_once "moduls/functions.php";
require_once "moduls/connect.php";

$p = abs((int)$_GET['start']);

$next = $p+$col;
$prev = $p-$col;
$min = $p;
$max = $p+$col;
$total_file = 0;

echo '<img src="../images/img/partners.gif" alt=""> <b>Новые файлы</b><br><br><hr>';

$query = mysql_query("SELECT * FROM `".$preff."_files` WHERE `format` <> '' ORDER BY `timeupload` DESC LIMIT ".$col_top);

while($list = mysql_fetch_array($query)){
if ($total_file >= $min && $total_file < $max){
$dir_info = mysql_fetch_array(mysql_query("SELECT * FROM `".$preff."_files` WHERE `path` = '".$list[infolder]."' AND `format` = ''"));
$ids = $dir_info['id'];
$dirs = $dir_info['name'];
if($dirs==""){$dirs = $dir_info['fname'];}
$id = $list['id'];
$va = "$list[fname].$list[format]";
$format = format($va);
$nam = $list['name'];
$name = $list['fname'];
$downs = $list['loads'];
$namelog = $list['uploader'];
$datedob = $list['timeupload'];
$siz = formatsize($list['size']);
$about = $list['about'];
$ck = $list['komments'];
$did = $list['infolder'];


if($nam=="") $nam = $name;
echo '<img src="../images/icons/'.file_img($format).'" alt=""> <a href="view.php?id='.$id.'&amp;'.SID.'">'.$nam.'</a> ['.$siz.']';

if($format!="jpg" && $format!="gif" && $format!="png" && $format!="jpeg"){
if(is_file("$did/$va.jpg")){echo '<br>[<a href="img.php?id='.$id.'&amp;type=jpg">Скриншот</a>]';}
if(is_file("$did/$va.gif")){echo '<br>[<a href="img.php?id='.$id.'&amp;type=gif">Скриншот</a>]';}
if(is_file("$did/$va.png")){echo '<br>[<a href="img.php?id='.$id.'&amp;type=png">Скриншот</a>]';}
if(is_file("$did/$va.jpeg")){echo '<br>[<a href="img.php?id='.$id.'&amp;type=jpeg">Скриншот</a>]';}
}

if ($namelog!=""){echo '<br>Добавил: '.loganketa($namelog).' '.lslog($namelog).' '.user_online($namelog);
} else echo '<br>Добавил: '.loganketa($config_nikname).' '.lslog($config_nikname).' '.user_online($config_nikname);
echo '<br>Дата: '.date_fixed($datedob).'<br>';
echo 'Перейти к папке: <a href="index.php?id='.$ids.'">'.$dirs.'</a><br><br>';

if($about!=""){
if(utf_strlen($about)>$ab_len){$about = show_abs($about);}
echo '<b>Описание</b>: '.bb_code($about).'<br><br>';}

echo '[<a href="download.php?id='.$id.'">Скачать</a>]';
echo ' ['.$downs.'] [<a href="komm.php?id='.$id.'&amp;'.SID.'">Комм.</a>: '.$ck.']';
echo '<hr>';}
$total_file++;
}

if ($total_file < 1) echo 'Новых файлов за '.$new_f.' дней не было!<br><br>';
else echo '<div class="b">Новых файлов: '.($total_file).'</div>';

strpage($p, $col, $total_file, "new.php");
echo '<br>';

echo '<br><img src="../images/img/reload.gif" alt=""> <a href="index.php?'.SID.'">К разделам</a><br>';
echo '<img src="../images/img/homepage.gif" alt=""> <a href="../index.php?'.SID.'">На главную</a><br>';
include_once"../themes/$config_themes/foot.php";
?>