<?
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/user.php';
if (isset($_GET['showinfo']) || !isset($_GET['f']) || isset($_GET['komm']))
if (isset($_GET['id']))$ank['id']=intval($_GET['id']);
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = $ank[id] LIMIT 1"));
$razd=mysql_fetch_array(mysql_query("SELECT * FROM `obmennik_files` WHERE `id_user` = '$ank[id]'"));
$dirr=mysql_fetch_array(mysql_query("SELECT * FROM `obmennik_dir` WHERE `id` = $razd[id_dir] "));
$set['title']=''.$ank['nick'].'/Файлы'; // заголовок страницы
include_once '../sys/inc/thead.php';
title();
aut();
//////////////////////////////////////
echo "<div class=\"str\">\n";
echo '<a href="index.php?">'.$ank['nick'].'</a> &gt; Файлы<br />';
echo "</div>\n";

$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `obmennik_files` WHERE `id_user` = '$ank[id]' "),0);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
if ($k_post==0){echo "Нет файлов<br/>\n";}
$q=mysql_query("SELECT * FROM `obmennik_files` WHERE `id_user` = '$ank[id]' LIMIT $start, $set[p_str]");
$file_id=mysql_fetch_array(mysql_query("SELECT * FROM `obmennik_files` WHERE `id_dir` = '$id_dir' AND `name`='$name' AND `ras` = '$ras' LIMIT 1"));

while ($post = mysql_fetch_array($q))
{if($num==1){
echo "<div class='news'>";
$num=0;
}else{
echo "<div class='str'>";
$num=1;}
include 'inc/icon14.php';

if ($set['echo_rassh']==1)$ras=".$post[ras]";else $ras=NULL;
echo "<a href='/obmen$dirr[dir]$post[name].$post[ras]?showinfo'>$post[name]$ras</a><br />\n";
echo "$post[opis]";

echo "</div>";}



if ($k_page>1)str('?id='.$ank['id'].'&amp;',$k_page,$page); // Вывод страниц
include_once '../sys/inc/tfoot.php';
?>

