Файл: vsime.com/files_zone/inc/act_index.php
Строк: 526
<?
$unique_code = "unique_code";
if (isset($_GET['file']) && mysqli_result("SELECT COUNT(*) FROM `files_zone` WHERE `id` = '".intval($_GET['file'])."' AND (`type` = 'file' OR `type` = 'foto')")!=0) {
if (!isset($moderate_files))access_denied();
$file = mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `files_zone` WHERE `id` = '".intval($_GET['file'])."' AND (`type` = 'file' OR `type` = 'foto')"));
if ($file['type']=='file') {
$file_fst = mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `files` WHERE `id` = '$file[id_file]' AND `id_comm` = '0'"));
$file_fst['path'] = H."system/files/files/users/user$file_fst[id_user]/dir$file_fst[id_dir]/".$file_fst['id'].".dat";
$file_fst['size'] = filesize($file_fst['path']);
if ($file['id_dir'] == 0) {
$dir = array();
$dir['show'] = "<a href='/shared_zone'>Зона файлов</a>";
$dir['id'] = 0;
} else {
$dir = mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `files_zone` WHERE `id` = '$file[id_dir]' AND `type` = 'dir'"));
$dir['show'] = "<a href='?dir=$dir[id]'>".hsc($dir['name'])."</a>";
if (mysqli_result("SELECT COUNT(*) FROM `files_zone` WHERE `id` = '$dir[id_dir]' AND `type` = 'dir'")!=0) {
$dir2 = mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `files_zone` WHERE `id` = '$dir[id_dir]' AND `type` = 'dir'"));
$dir['show'] = "<a href='?dir=$dir2[id]'>".hsc($dir2['name'])."<a> / ".$dir['show'];
}
}
$unique_code = "unique_code";
$ank = profile($file_fst['id_user']);
$count_komm = mysqli_num_rows(mysqli_query($dbi, "SELECT * FROM `files_komm` WHERE$skp `id_comm` = '0' AND `id_file` = '$file_fst[id]'"));
$count_komm_new = mysqli_num_rows(mysqli_query($dbi, "SELECT * FROM `files_komm` WHERE$skp `id_comm` = '0' AND `id_file` = '$file_fst[id]' AND `time` > '".($time-(3600*24))."'"));
$count_komm_show = $count_komm.($count_komm_new>0?"/+$count_komm_new":NULL);
$title .= " - Файл №$file[id] - Информация";
$navigation = "<a href='/shared_zone'>Зона файлов</a>";
if (isset($file['id_dir']) && mysqli_result("SELECT COUNT(*) FROM `files_zone` WHERE `id` = '$file[id_dir]'")) {
$dir_moth = mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `files_zone` WHERE `id` = '$file[id_dir]'"));
}
$navigation = "<a href='/shared_zone'>Зона файлов</a>";
if (isset($dir_moth))$navigation .= " / <a href='?dir=$dir_moth[id]'>".hsc($dir_moth['name'])."</a>";
$navigation .= " / Файл №$file[id]";
ex_head();
if (isset($_GET['delete_file']) && ($user['id'] == $ank['id'] || $user['level'] > $ank['level'])) {
if (isset($_POST['submited'])) {
if (hsc($_POST['mdp'])==$mdp) {
mysqli_query($dbi, "DELETE FROM `files_zone` WHERE `id` = '$file[id]'");
msg_sess("Файл ".hsc($file_fst['name']).".".hsc($file_fst['ras'])." удален");
header("Location: ?dir=$dir[id]");
exit;
} else hacked_by_Killer();
}
echo "<form method='POST'>n";
echo "Подтвердите удаление файлв<br/>n";
echo "<input type='submit' name='submited' value='Удалить'> <a href='?file=$file[id]'>Отмена</a>n";
echo "<input type='hidden' name='mdp' value='$mdp' />n";
echo "</form>n";
ex_foot();
}
echo "<div class='list'>n";
echo "<div class='freespace'>n";
if (is_file(H.'/i/file_type/'.$file_fst['ras'].'.png'))echo "<img src='/i/file_type/$file_fst[ras].png' alt='$file_fst[ras]' /> n";
else echo "<img src='/i/file_type/file.png' alt='file' /> n";
echo hsc($file_fst['name']).".".hsc($file_fst['ras'])."<br />n";
echo "</div>n";
echo ffs_screen($file_fst['id'], 'file', WapWeb_show(128, 256), WapWeb_show(128, 256));
echo "</div>n";
echo "<div class='list'>n";
echo "<img src='/i/site/download.png' /> Размер: ".size_file($file_fst['size'])." (<a href='/files/download/".md5($file_fst['id'])."/$unique_code/$mdp/".hsc($file_fst['name']).".".hsc($file_fst['ras'])."'>скачать</a>)<br />n";
echo "</div>n";
echo "<div class='list'>n";
echo "<img src='/i/site/avatar.png' /> Добавил: ";
echo profile_icon($ank['id']).profile_nick($ank['id'], 1).profile_medal($ank['id'])." (<a href='/bans/?act=add&id=$ank[id]&type=files&object=$file[id]'>бан</a>)<br />n";
echo "</div>n";
echo "<div class='list'>n";
echo "<img src='/i/site/time.png' /> Дата добавления на сайт: ".vremja($file_fst['time'])."<br />n";
echo "</div>n";
echo "<div class='list'>n";
echo "<img src='/i/site/time.png' /> Дата добавления в ЗФ: ".vremja($file['time'])."<br />n";
echo "</div>n";
echo "<div class='list'>n";
echo "<img src='/i/dir_type/dir.png' /> Категория ЗФ: $dir[show]<br />n";
echo "</div>n";
echo "<div class='mod_grad'>n";
echo "$config[code_action] <a href='/files/?file=$file_fst[id]'>Перейти к файлу</a><br />n";
if ($user['id'] == $ank['id'] || $user['level'] > $ank['level'])echo "$config[code_delete] <a href='?file=$file[id]&delete_file'>Удалить файл</a><br />n";
echo "$config[code_move] <a href='?file_replace=$file[id]'>Переместить файл</a><br />n";
echo "</div>n";
} elseif ($file['type']=='foto')
{
$foto_fst = mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `foto` WHERE `id` = '$file[id_file]'"));
$foto_fst['path'] = H."system/files/fotos/d$foto_fst[id_dir]/".$foto_fst['id'].".dat";
$foto_fst['size'] = filesize($foto_fst['path']);
if ($file['id_dir'] == 0)
{
$dir = array();
$dir['show'] = "<a href='/shared_zone'>Зона файлов</a>";
$dir['id'] = 0;
} else {
$dir = mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `files_zone` WHERE `id` = '$file[id_dir]' AND `type` = 'dir'"));
$dir['show'] = "<a href='?dir=$dir[id]'>".hsc($dir['name'])."</a>";
if (mysqli_result("SELECT COUNT(*) FROM `files_zone` WHERE `id` = '$dir[id_dir]' AND `type` = 'dir'")!=0)
{
$dir2 = mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `files_zone` WHERE `id` = '$dir[id_dir]' AND `type` = 'dir'"));
$dir['show'] = "<a href='?dir=$dir2[id]'>".hsc($dir2['name'])."<a> / ".$dir['show'];
}
}
$unique_code = "unique_code";
$ank = profile($foto_fst['id_user']);
$count_komm = mysqli_num_rows(mysqli_query($dbi, "SELECT * FROM `foto_komm` WHERE$skp `id_foto` = '$foto_fst[id]'"));
$count_komm_new = mysqli_num_rows(mysqli_query($dbi, "SELECT * FROM `foto_komm` WHERE$skp `id_foto` = '$foto_fst[id]' AND `time` > '".($time-(3600*24))."'"));
$count_komm_show = $count_komm.($count_komm_new>0?"/+$count_komm_new":NULL);
$title .= " - Файл №$file[id] - Информация";
$navigation = "<a href='/shared_zone'>Зона файлов</a>";
if (isset($file['id_dir']) && mysqli_result("SELECT COUNT(*) FROM `files_zone` WHERE `id` = '$file[id_dir]'")) {
$dir_moth = mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `files_zone` WHERE `id` = '$file[id_dir]'"));
}
$navigation = "<a href='/shared_zone'>Зона файлов</a>";
if (isset($dir_moth))$navigation .= " / <a href='?dir=$dir_moth[id]'>".hsc($dir_moth['name'])."</a>";
$navigation .= " / Файл №$file[id]";
ex_head();
if (isset($_GET['delete_file']) && ($user['id'] == $ank['id'] || $user['level'] > $ank['level']))
{
if (isset($_POST['submited']))
{
if (hsc(@$_POST['mdp'])==$mdp)
{
mysqli_query($dbi, "DELETE FROM `files_zone` WHERE `id` = '$file[id]'");
msg_sess("Файл ".hsc($foto_fst['name']).".".hsc($foto_fst['ras'])." удален");
header("Location: ?dir=$dir[id]");
exit;
} else hacked_by_Killer();
}
echo "<form method='POST'>n";
echo "Подтвердите удаление файлв<br/>n";
echo "<input type='submit' name='submited' value='Удалить'> <a href='?file=$file[id]'>Отмена</a>n";
echo "<input type='hidden' name='mdp' value='$mdp' />n";
echo "</form>n";
ex_foot();
}
echo "<div class='list'>n";
echo "<div class='freespace'>n";
if (is_file(H.'/i/file_type/'.$foto_fst['ras'].'.png'))echo "<img src='/i/file_type/$foto_fst[ras].png' alt='$foto_fst[ras]' /> n";
else echo "<img src='/i/file_type/file.png' alt='file' /> n";
echo hsc($foto_fst['name']).".".hsc($foto_fst['ras'])."<br />n";
echo "</div>n";
echo ffs_screen($foto_fst['id'], 'foto', WapWeb_show(128, 256), WapWeb_show(128, 256));
echo "</div>n";
echo "<div class='list'>n";
echo "<img src='/i/site/download.png' /> Размер: ".size_file($foto_fst['size'])." (<a href='/fotos/download/".md5($foto_fst['id'])."/$unique_code/$mdp/".hsc($foto_fst['name']).".".hsc($foto_fst['ras'])."'>скачать</a>)<br />n";
echo "</div>n";
echo "<div class='list'>n";
echo "<img src='/i/site/avatar.png' /> Добавил: ";
echo profile_icon($ank['id']).profile_nick($ank['id'], 1).profile_medal($ank['id'])." (<a href='/bans/?act=add&id=$ank[id]&type=fotos&object=$file[id]'>бан</a>)<br />n";
echo "</div>n";
echo "<div class='list'>n";
echo "<img src='/i/site/time.png' /> Дата добавления на сайт: ".vremja($foto_fst['time'])."<br />n";
echo "</div>n";
echo "<div class='list'>n";
echo "<img src='/i/site/time.png' /> Дата добавления в ЗФ: ".vremja($file['time'])."<br />n";
echo "</div>n";
echo "<div class='list'>n";
echo "<img src='/i/dir_type/dir.png' /> Категория ЗФ: $dir[show]<br />n";
echo "</div>n";
echo "<div class='mod_grad'>n";
echo "$config[code_action] <a href='/fotos/?foto=$foto_fst[id]'>Перейти к фото</a><br />n";
if ($user['id'] == $ank['id'] || $user['level'] > $ank['level'])echo "$config[code_delete] <a href='?file=$file[id]&delete_file'>Удалить файл</a><br />n";
echo "$config[code_move] <a href='?file_replace=$file[id]'>Переместить файл</a><br />n";
echo "</div>n";
}
echo "<div class='foot'>n";
echo image_back()." <a href='?dir=$dir[id]'>Назад</a>n";
echo "</div>n";
ex_foot();
}
if (isset($_GET['dir']) && mysqli_result("SELECT COUNT(*) FROM `files_zone` WHERE `id` = '".intval($_GET['dir'])."' AND `type` = 'dir'")!=0)
{
$dir = mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `files_zone` WHERE `id` = '".intval($_GET['dir'])."' AND `type` = 'dir'"));
} else {
$dir = array();
$dir['id'] = 0;
$dir['name'] = "";
$dir['counter'] = '/0/';
}
$title .= ($dir['id']!=0?" - ".hsc($dir['name']):NULL);
if (isset($_GET['delete_dir']))
{
if (!isset($moderate_files))access_denied();
if ($dir['id'] != 0)
{
$title .= ' - Удалить папку';
ex_head();
if (isset($_POST['submited']))
{
if (hsc(@$_POST['mdp'])==$mdp)
{
mysqli_query($dbi, "DELETE FROM `files_zone` WHERE `counter` LIKE '%/$dir[id]/%' OR `id` = '$dir[id]'");
msg_sess("Папка ".hsc($dir['name'])." удалена");
header("Location: ?dir=$dir[id_dir]");
exit;
} else hacked_by_Killer();
}
echo "<form method='POST'>n";
echo "Подтвердите удаление папки<br/>n";
echo "<input type='hidden' name='mdp' value='$mdp'>n";
echo "<input type='submit' name='submited' value='Удалить'> <a href='?dir=$dir[id]'>Отмена</a>n";
echo "</form>n";
}
else
{
$error[] = "Нельзя удалять корневую папку!";
show_errors();
}
ex_foot();
}
if (isset($_GET['edit_dir']))
{
if (!isset($moderate_files))access_denied();
if ($dir['id'] != 0)
{
$title .= ' - Редактировать папку';
ex_head();
if(isset($_POST['submited']) && isset($_POST['name']))
{
if (hsc(@$_POST['mdp'])==$mdp)
{
$name = $_POST['name'];
if(mysqli_result("SELECT COUNT(*) FROM `files_zone` WHERE `name` = '".my_esc($name)."' AND `id` != '$dir[id]' AND `type` = 'dir' AND `id_dir` = '$dir[id]'")!=0)$error[]="Такая папка уже есть";
if(strlen($name)>50 || strlen(trim($name))<1)$error[]="Название не должно быть пустым и не больше 50-ти символов";
$name = my_esc($name);
if (!isset($error))
{
mysqli_query($dbi, "UPDATE `files_zone` SET `name` = '$name' WHERE `id` = '$dir[id]' AND `type` = 'dir'");
msg_sess("Настройки папки сохранены");
header("Location: ?dir=$dir[id]");
exit;
}
} else hacked_by_Killer();
}
show_errors();
echo "<form method='POST'>n";
echo "Название:<br/>n";
echo "<input type='text' name='name' value='".input_value($dir['name'])."'><br/>n";
echo "<input type='hidden' name='mdp' value='$mdp'>n";
echo "<input type='submit' name='submited' value='Сохранить'> <a href='?dir=$dir[id]'>Назад</a>n";
echo "</form>n";
}
else
{
$error[] = "Нельзя редактировать корневую папку!";
show_errors();
}
ex_foot();
}
if (isset($_GET['add_dir']))
{
if (!isset($moderate_files))access_denied();
$title .= ' - Создать папку';
ex_head();
if(isset($_POST['submited']) && isset($_POST['name']))
{
if (hsc(@$_POST['mdp'])==$mdp)
{
$name = $_POST['name'];
if (mysqli_result("SELECT COUNT(*) FROM `files_zone` WHERE `type` = 'dir' AND `name` = '".my_esc($name)."' AND `id_dir` = '$dir[id]'")!=0)$error[]="Такая папка уже есть";
if(strlen($name) >50 || strlen(trim($name)) < 1)$error[]="Название не должно быть пустым и не больше 50-ти символов";
$name = my_esc($name);
if (!isset($error))
{
$pos = mysqli_result("SELECT MAX(`pos`) FROM `files_zone` WHERE `id_dir` = '$dir[id]' AND `type` = 'dir'")+1;
mysqli_query($dbi, "INSERT INTO `files_zone` (`type`, `name`, `id_dir`, `counter`, `id_user`, `time`, `pos`) VALUES ('dir', '$name', '$dir[id]', '$dir[counter]$dir[id]/', '$user[id]', '$time', '$pos')");
msg_sess("Папка <b>".hsc($name)."</b> успешно создана");
header("Location: ?dir=$dir[id]");
exit;
}
} else hacked_by_Killer();
}
show_errors();
echo "<form method='POST'>n";
echo "Название:<br/>n";
echo "<input type='text' name='name' value=''><br/>n";
echo "<input type='hidden' name='mdp' value='$mdp'>n";
echo "<input type='submit' name='submited' value='Добавить'> <a href='?dir=$dir[id]'>Назад</a>n";
echo "</form>n";
ex_foot();
}
if (isset($dir['id_dir']) && mysqli_result("SELECT COUNT(*) FROM `files_zone` WHERE `id` = '$dir[id_dir]'")) {
$dir_moth = mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `files_zone` WHERE `id` = '$dir[id_dir]'"));
}
$navigation = "<a href='/shared_zone'>Зона файлов</a>";
if (isset($dir_moth))$navigation .= " / <a href='?dir=$dir_moth[id]'>".hsc($dir_moth['name'])."</a>";
ex_head();
if (isset($_GET['up']) && isset($moderate_files))
{
if (hsc(@$_GET['mdp']==$mdp))
{
$up=mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `files_zone` WHERE `type` = 'dir' AND `id` = '".intval($_GET['up'])."' AND `id_dir` = '$dir[id]' LIMIT 1"));
if(mysqli_result("SELECT * FROM `files_zone` WHERE `type` = 'dir' AND `pos` < '$up[pos]' AND `id_dir` = '$dir[id]' LIMIT 1")!=0)
{
mysqli_query($dbi, "UPDATE `files_zone` SET `pos` = '".($up['pos'])."' WHERE `pos` = '".($up['pos']-1)."' AND `type` = 'dir' AND `id_dir` = '$dir[id]' LIMIT 1");
mysqli_query($dbi, "UPDATE `files_zone` SET `pos` = '".($up['pos']-1)."' WHERE `id` = '".intval($_GET['up'])."' AND `type` = 'dir' AND `id_dir` = '$dir[id]' LIMIT 1");
}
} else hacked_by_Killer();
} elseif (isset($_GET['down'])) {
if (hsc(@$_GET['mdp']==$mdp))
{
$down=mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `files_zone` WHERE `type` = 'dir' AND `id` = '".intval($_GET['down'])."' AND `id_dir` = '$dir[id]' LIMIT 1"));
if(mysqli_num_rows(mysqli_query($dbi, "SELECT * FROM `files_zone` WHERE `type` = 'dir' AND `pos` > '$down[pos]' AND `id_dir` = '$dir[id]' LIMIT 1"))!=0)
{
mysqli_query($dbi, "UPDATE `files_zone` SET `pos` = '".($down['pos'])."' WHERE `pos` = '".($down['pos']+1)."' AND `type` = 'dir' AND `id_dir` = '$dir[id]' LIMIT 1");
mysqli_query($dbi, "UPDATE `files_zone` SET `pos` = '".($down['pos']+1)."' WHERE `id` = '".intval($_GET['down'])."' AND `type` = 'dir' AND `id_dir` = '$dir[id]' LIMIT 1");
}
} else hacked_by_Killer();
}
$count_files = mysqli_result("SELECT COUNT(*) FROM `files_zone` WHERE `id_dir` = '$dir[id]' AND (`type` = 'file' OR `type` = 'foto')");
$count_dirs = mysqli_result("SELECT COUNT(*) FROM `files_zone` WHERE `id_dir` = '$dir[id]' AND `type` = 'dir'");
$count_results = mysqli_result("SELECT COUNT(*) FROM `files_zone` WHERE `id_dir` = '$dir[id]' AND (`type` = 'file' OR `type` = 'foto')");
$count_pages = count_pages($count_results);
$page = page();
$start = start_pages();
include('multi_select_head.php');
if (isset($moderate_files)) {
if ($dir['id'] != 0) {
echo "<div class='grand_h'>n";
echo "<span class='right'>n";
echo "<a href='?dir=$dir[id]&edit_dir'>$config[code_edit]</a> <a href='?dir=$dir[id]&delete_dir'>$config[code_delete]</a>n";
echo "</span>n";
echo "<img src='/i/dir_type/dir.png' /> <b>".hsc($dir['name'])."</b>n";
echo "</div>n";
} else {
echo "<div class='grand_h'>n";
echo imgsd('search.png')." <a href='/search/?act=files&from=files_zone'>Поиск файлов</a><br />n";
echo "</div>n";
}
}
if ($page == 1)
{
$query_dirs = mysqli_query($dbi, "SELECT * FROM `files_zone` WHERE `id_dir` = '$dir[id]' AND `type` = 'dir' ORDER BY `pos`");
while ($post_dir = mysqli_fetch_array($query_dirs))
{
$count_files = mysqli_result("SELECT COUNT(*) FROM `files_zone` WHERE (`type` = 'file' OR `type` = 'foto') AND `counter` like '%/$post_dir[id]/%'");
$count_files_new = mysqli_result("SELECT COUNT(*) FROM `files_zone` WHERE (`type` = 'file' OR `type` = 'foto') AND `counter` like '%/$post_dir[id]/%' AND `time` > '".($time-(3600*24))."'");
$count_files_show = $count_files.($count_files_new>0?"/+$count_files_new":NULL);
echo "<div class='list'>n";
echo "<img src='/i/dir_type/dir_zone.png' alt='dir' /> <a href='?dir=$post_dir[id]'>".hsc($post_dir['name'])."</a> ($count_files_show)n";
if (isset($moderate_forum))
{
echo "<span class='right'>n";
if(isset($_GET['moderate']))echo "<a href='?dir=$dir[id]&moderate&up=$post_dir[id]&mdp=$mdp'>$config[code_up]</a> <a href='?dir=$dir[id]&moderate&down=$post_dir[id]&mdp=$mdp'>$config[code_down]</a>n";
echo "</span>n";
}
echo "</div>n";
}
}
$query_files = mysqli_query($dbi, "SELECT * FROM `files_zone` WHERE `id_dir` = '$dir[id]' AND (`type` = 'file' OR `type` = 'foto') ORDER BY `time` DESC LIMIT $start, $config[rop]");
while ($post_file = mysqli_fetch_array($query_files))
{
if ($post_file['type']=='file')
{
$file = mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `files` WHERE `id` = '$post_file[id_file]' AND `id_comm` = '0'"));
$file['path']=H."system/files/files/users/user$file[id_user]/dir$file[id_dir]/".$file['id'].".dat";
$file['size']=filesize($file['path']);
$count_komm = mysqli_num_rows(mysqli_query($dbi, "SELECT * FROM `files_komm` WHERE$skp `id_comm` = '0' AND `id_file` = '$file[id]'"));
$count_komm_new = mysqli_num_rows(mysqli_query($dbi, "SELECT * FROM `files_komm` WHERE$skp `id_comm` = '0' AND `id_file` = '$file[id]' AND `time` > '".($time-(3600*24))."'"));
$count_komm_show = $count_komm.($count_komm_new>0?"/+$count_komm_new":NULL);
echo "<div class='list'>n";
echo "<div class='left'>n";
if (isset($_SESSION['files_zone_multi_select']) && isset($moderate_files))echo "<input type='checkbox' name='multi_select_file_$post_file[id]' value='1'".(in_array($post_file['id'], $_SESSION['files_zone_multi_select'])?" CHECKED":NULL)." />n";
echo ffs_screen($file['id'], 'file', WapWeb_show(48, 96), WapWeb_show(48, 96));
echo "</div>n";
mysqli_query($dbi, "UPDATE `files_zone` SET `name` = '".($file['name']).".".($file['ras'])."' WHERE `id` = '$post_file[id]'");
echo "<div class='overfl_hid'>n";
echo "<a href='/files/?file=$file[id]'>n";
if (is_file(H.'/i/file_type/'.$file['ras'].'.png'))echo "<img src='/i/file_type/$file[ras].png' alt='$file[ras]' /> n";
else echo "<img src='/i/file_type/file.png' alt='file' /> n";
echo hsc($file['name']).".".hsc($file['ras'])."</a> ($count_komm_show)n";
if (isset($moderate_files))echo "<span class='right'><a href='?file=$post_file[id]'><img src='/i/site/information.png' /></a></span>n";
echo "<br />n";
echo "<img src='/i/site/download.png' /> Размер: ".size_file($file['size'])."<br />n";
$audio_rasar = array('amr', 'mid', 'midi', 'mmf', 'mp3', 'wav', 'wma');
if (in_array($file['ras'], $audio_rasar) && $config['web']==true)
{
?>
<div class="mediaspace">
<script language="JavaScript" src="/i/swf/audio-player.js"></script>
<object type="application/x-shockwave-flash" data="/i/swf/player.swf" id=audioplayer<? echo $file['id'];?> height="24" width="530">
<param name=movie value="/i/swf/player.swf"></param>
<param name=FlashVars value="playerID=audioplayer<? echo $file['id'];?>&soundFile=<? echo "/files/download/".md5($file['id'])."/$unique_code/$mdp/".file_name_html($file['name']).".".hsc($file['ras'])."";?>">
</param>
<param name=quality value=high></param>
<param name=menu value=false></param>
<param name=wmode value=transparent></param>
</object>
</div>
<?
}
echo "</div>n";
echo "<div class='clear'></div>n";
echo "</div>n";
} elseif ($post_file['type']=='foto')
{
$foto = mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `foto` WHERE `id` = '$post_file[id_file]'"));
$foto['path']=H."system/files/fotos/d$foto[id_dir]/".$foto['id'].".dat";
$foto['size']=filesize($foto['path']);
$count_komm = mysqli_num_rows(mysqli_query($dbi, "SELECT * FROM `foto_komm` WHERE$skp `id_foto` = '$foto[id]'"));
$count_komm_new = mysqli_num_rows(mysqli_query($dbi, "SELECT * FROM `foto_komm` WHERE$skp `id_foto` = '$foto[id]' AND `time` > '".($time-(3600*24))."'"));
$count_komm_show = $count_komm.($count_komm_new>0?"/+$count_komm_new":NULL);
echo "<div class='list'>n";
echo "<div class='left'>n";
if (isset($_SESSION['files_zone_multi_select']) && isset($moderate_files))echo "<input type='checkbox' name='multi_select_file_$post_file[id]' value='1'".(in_array($post_file['id'], $_SESSION['files_zone_multi_select'])?" CHECKED":NULL)." />n";
echo ffs_screen($foto['id'], 'foto', WapWeb_show(48, 96), WapWeb_show(48, 96));
echo "</div>n";
mysqli_query($dbi, "UPDATE `files_zone` SET `name` = '$foto[name].$foto[ras]' WHERE `id` = '$post_file[id]'");
echo "<div class='overfl_hid'>n";
echo "<a href='/fotos/?foto=$foto[id]'>n";
if (is_file(H.'/i/file_type/'.$foto['ras'].'.png'))echo "<img src='/i/file_type/$foto[ras].png' alt='$foto[ras]' /> n";
else echo "<img src='/i/file_type/file.png' alt='file' /> n";
echo hsc($foto['name']).".".hsc($foto['ras'])."</a> ($count_komm_show)n";
if (isset($moderate_files))echo "<span class='right'><a href='?file=$post_file[id]'><img src='/i/site/information.png' /></a></span>n";
echo "<br />n";
echo "<img src='/i/site/download.png' /> Размер: ".size_file($foto['size'])."<br />n";
echo "</div>n";
echo "<div class='clear'></div>n";
echo "</div>n";
}
}
if ($count_results == 0 && mysqli_num_rows($query_dirs) == 0)
{
echo "<div class='list'>n";
echo "Пусто!";
echo "</div>n";
}
pages_show("?dir=$dir[id]&");
include('multi_select_foot.php');
if (isset($moderate_files) && !isset($_SESSION['files_zone_multi_select']))
{
echo "<div class='mod_grad'>n";
echo "<img src='/i/dir_type/dir_add.png' /> <a href='?dir=$dir[id]&add_dir'>Добавить папку</a><br />n";
echo "<img src='/i/site/configure.png' /> ".(isset($_GET['moderate'])?"<a href='?dir=$dir[id]'>Отмена</a>":"<a href='?dir=$dir[id]&moderate'>Управление</a>")."<br />n";
echo "$config[code_move] <a href='?dir=$dir[id]&files_zone_multi_select=start&mdp=$mdp'".title_link('Выбрать файлы для перемещения').">Выбрать файлы</a><br />n";
echo "</div>n";
}
if ($dir['id'] != 0)
{
echo "<div class='foot'>n";
echo image_back()." <a href='?dir=$dir[id_dir]'>Назад</a>n";
echo "</div>n";
}
ex_foot();
?>