Файл: soc-set/moduls/loads/index.php
Строк: 357
<?php
require_once('../../core/start.php');
require_once('func.php');
check_auth();
switch ($select) {
default:
head('Обменник файлов');
panel();
if ($_POST['add'] && privilegy('zc')) {
$name = html($_POST['name']);
$type = abs(num($_POST['type']));
if (empty($name)) {
$err .= 'Введите название папки<br />';
}
if (empty($type)) {
$err .= 'Выберите тип папки<br />';
}
if (!empty($_FILES['icon']['name'])) {
$name1 = $_FILES['icon']['name']; # Название файла
$ext = strtolower(strrchr($name1, '.')); # Расширение файла
$par = getimagesize($_FILES['icon']['tmp_name']); # Разрешение изображения
$size = $_FILES['icon']['size']; # Вес файла
$file = time().$ext;
$pictures = array('.jpg', '.jpeg', '.gif', '.png'); # Допустимые расширения
if (preg_match('/.phtml/i', $name) || preg_match('/.php/i', $name1) || preg_match('/.pl/i', $name1) || $name1 == '.htaccess' || !in_array($ext, $pictures)) {
$err .= 'Не верное расширение файла.<br />';
}
}
if (!empty($err)) {
echo DIV_ERROR . $err . CLOSE_DIV;
} else {
if (!empty($_FILES['icon']['name'])) {
copy($_FILES['icon']['tmp_name'], '../../files/loads/icons/'.$file);
}
if (empty($_FILES['icon']['name'])) {
$icon = '';
} else {
$icon = $file;
}
DB::$dbs->query("INSERT INTO ".LOADS." (`name`, `type`, `icon`) VALUES (?, ?, ?)", array($name, $type, $icon));
header("Location: ".HOME."/loads/");
}
}
$priceSumm = 50; // Начальная цена
$all = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".LOADS."");
if ($all == 0) {
echo DIV_AUT . 'Папки не созданы' . CLOSE_DIV;
} else {
echo DIV_BLOCK . '<b>Лучшие файлы за:</b> <a href="'.HOME.'/loads/new/day/">[сегодня]</a> <a href="'.HOME.'/loads/new/wk/">[неделю]</a> <a href="'.HOME.'/loads/new/month/">[месяц]</a><br />'
. '<br /><a href="'.HOME.'/loads/new/"><b>Последние загруженные</b></a><br />
<a href="'.HOME.'/loads/search/"><b>Поиск файлов</b></a>
'
. CLOSE_DIV;
$sql = DB::$dbs->query("SELECT * FROM ".LOADS." ORDER BY `id` DESC ");
while($folder = $sql -> fetch()) {
$cats = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".LOADS_CAT." WHERE `folder_id` = ? ", array($folder['id']));
$files = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".LOADS_FILE." WHERE `folder_id` = ? ", array($folder['id']));
echo DIV_LI . '<img src="' . (empty($folder['icon']) ? HOME . '/style/icons/folder.png' : HOME . '/files/loads/icons/' . $folder['icon']) . '" wight="16" height="16" /> <a href="'.HOME.'/loads/'.$folder['id'].'/">'.$folder['name'].'</a> ['.$cats.' / '.$files.']' . CLOSE_DIV;
}
}
if (privilegy('zc')) {
echo DIV_AUT;
echo '<form action="#" enctype="multipart/form-data" method="POST">';
echo '<b>Новая папка:</b><br /><input type="text" name="name" /><br />';
echo 'Тип:<br /><select name="type">';
echo '<option value="1">Картинки</option>';
echo '<option value="2">Видео</option>';
echo '<option value="3">Музыка</option>';
echo '<option value="4">Java-приложения</option>';
echo '<option value="5">Android</option>';
echo '<option value="6">Windows Mobile</option>';
echo '<option value="7">iPhone</option>';
echo '<option value="8">Bada</option>';
echo '<option value="9">Flash</option>';
echo '<option value="10">Темы</option>';
echo '<option value="11">Symbian</option>';
echo '</select><br />';
echo 'Иконка:<br /><input name="icon" type="file" /><br />';
echo '<input type="submit" name="add" value="Создать" /></form>';
echo CLOSE_DIV;
}
$array = array();
nav($array);
break;
case 'folder':
$folder = DB::$dbs->queryFetch("SELECT * FROM ".LOADS." WHERE `id` = ? ", array(abs(num($_GET['folder']))));
if (empty($folder)) {
head('Каталог не найден');
echo DIV_TITLE . 'Каталог не найден' . CLOSE_DIV;
echo DIV_ERROR . 'Ошибка!' . CLOSE_DIV;
echo DIV_GO . '<a href="'.HOME.'/">Главная</a> / <a href="'.HOME.'/loads/">Загрузки</a> / <b>Каталог не найден</b>' . CLOSE_DIV;
require_once('../../core/stop.php');
exit();
}
head('Загрузки: ' . $folder['name']);
if (isset($_GET['del']) && privilegy('zc')) {
if (!isset($_GET['go'])) {
echo DIV_LI . '<b>Подтвердите удаление:</b> <a href="?del&go">[Удалить]</a> <a href="'.HOME.'/loads/'.$folder['id'].'/">[Нет]</a>' . CLOSE_DIV;
} else {
$sql = DB::$dbs->query("SELECT * FROM ".LOADS_FILE." WHERE `folder_id` = ? ", array($folder['id']));
while($file = $sql -> fetch()) {
unlink('../../files/loads/files/' . $file['url']);
@unlink('../../files/loads/files/mini_' . $file['url']);
}
@unlink('../../files/loads/icons/'.$folder['icon']);
DB::$dbs->query("DELETE FROM ".LOADS_FILE." WHERE `folder_id` = ? ", array($folder['id']));
DB::$dbs->query("DELETE FROM ".LOADS_CAT." WHERE `folder_id` = ? ", array($folder['id']));
DB::$dbs->query("DELETE FROM ".LOADS." WHERE `id` = ? ", array($folder['id']));
header("Location: ".HOME."/loads/");
}
}
if (isset($_GET['edit']) && privilegy('zc')) {
/* Удаление иконки */
if (isset($_GET['delicon'])) {
unlink('../../files/loads/icons/'.$folder['icon']);
DB::$dbs->query("UPDATE ".LOADS." SET `icon` = ? WHERE `id` = ? ", array('', $folder['id']));
header("Locaion: " . HOME . '/loads/'.$folder['id'].'/?edit');
}
if ($_POST['edit']) {
$name = html($_POST['name']);
$type = abs(num($_POST['type']));
if (empty($name) || empty($type)) {
echo DIV_ERROR . 'Введите название каталога' . CLOSE_DIV;
} else {
DB::$dbs->query("UPDATE ".LOADS." SET `name` = ?, `type` = ? WHERE `id` = ? ", array($name, $type, $folder['id']));
header("Location: ".HOME."/loads/".$folder['id']."/");
}
}
echo DIV_AUT;
echo '<form action="#" method="POST">';
echo 'Редактирование каталога:<br /><input type="text" value="'.$folder['name'].'" name="name" />';
echo 'Тип:<br /><select name="type">';
echo '<option '.(1 == $folder['type'] ? 'selected="selected"' : NULL).' value="1">Картинки</option>';
echo '<option '.(2 == $folder['type'] ? 'selected="selected"' : NULL).' value="2">Видео</option>';
echo '<option '.(3 == $folder['type'] ? 'selected="selected"' : NULL).' value="3">Музыка</option>';
echo '<option '.(4 == $folder['type'] ? 'selected="selected"' : NULL).' value="4">Java-приложения</option>';
echo '<option '.(5 == $folder['type'] ? 'selected="selected"' : NULL).' value="5">Android</option>';
echo '<option '.(6 == $folder['type'] ? 'selected="selected"' : NULL).' value="6">Windows Mobile</option>';
echo '<option '.(7 == $folder['type'] ? 'selected="selected"' : NULL).' value="7">iPhone</option>';
echo '<option '.(8 == $folder['type'] ? 'selected="selected"' : NULL).' value="8">Bada</option>';
echo '<option '.(9 == $folder['type'] ? 'selected="selected"' : NULL).' value="9">Flash</option>';
echo '<option '.(10 == $folder['type'] ? 'selected="selected"' : NULL).' value="10">Темы</option>';
echo '<option '.(11 == $folder['type'] ? 'selected="selected"' : NULL).' value="11">Symbian</option>';
echo '</select><br /><br />';
if (!empty($folder['icon'])) {
echo 'Иконка: <img src="'.HOME.'/files/loads/icons/'.$folder['icon'].'" wight="16" height="16" /> <a href="'.HOME.'/loads/'.$folder['id'].'/?edit&delicon">[x]</a><br /><br />';
} else {
echo 'Иконка: <img src="'.HOME.'/style/icons/folder.png" wight="16" height="16" /> <a href="'.HOME.'/loads/'.$folder['id'].'/?edit&uploadicon">[загрузить]</a><br /><br />';
}
echo '<input type="submit" name="edit" value="Изменить" /></form>';
if (isset($_GET['uploadicon'])) {
if ($_POST['upload']) {
if (isset($_FILES['file']['name'])) {
$name1 = $_FILES['file']['name']; # Название файла
$ext = strtolower(strrchr($name1, '.')); # Расширение файла
$file = time().$ext;
$pictures = array('.jpg', '.jpeg', '.gif', '.png'); # Допустимые расширения
if (preg_match('/.php/i', $name1) || preg_match('/.pl/i', $name1) || $name1 == '.htaccess' || !in_array($ext, $pictures)) {
$err .= 'Не верное расширение файла.<br />';
}
if (!empty($err)) {
echo DIV_ERROR . $err . CLOSE_DIV;
} else {
if (!empty($_FILES['file']['name'])) {
copy($_FILES['file']['tmp_name'], '../../files/loads/icons/'.$file);
}
DB::$dbs->query("UPDATE ".LOADS." SET `icon` = ? WHERE `id` = ? ", array($file, $folder['id']));
header("Location: ".HOME."/loads/" . $folder['id'] . "/?edit&icon");
}
}
}
echo DIV_AUT;
echo '<form action="#" enctype="multipart/form-data" method="POST">';
echo '<b>Иконка:</b><br /><input name="file" type="file" /><br />';
echo '<input type="submit" name="upload" value="Загрузить" /></form>';
echo CLOSE_DIV;
}
echo CLOSE_DIV;
}
if ($_POST['add'] && privilegy('zc')) {
$name = html($_POST['name']);
if (empty($name)) {
$err .= 'Введите название подпапки<br />';
}
if (!empty($_FILES['icon']['name'])) {
$name1 = $_FILES['icon']['name']; # Название файла
$ext = strtolower(strrchr($name1, '.')); # Расширение файла
$par = getimagesize($_FILES['icon']['tmp_name']); # Разрешение изображения
$size = $_FILES['icon']['size']; # Вес файла
$file = time().$ext;
$pictures = array('.jpg', '.jpeg', '.gif', '.png'); # Допустимые расширения
if (preg_match('/.phtml/i', $name) || preg_match('/.php/i', $name1) || preg_match('/.pl/i', $name1) || $name1 == '.htaccess' || !in_array($ext, $pictures)) {
$err .= 'Не верное расширение файла.<br />';
}
}
if (!empty($err)) {
echo DIV_ERROR . $err . CLOSE_DIV;
} else {
if (!empty($_FILES['icon']['name'])) {
copy($_FILES['icon']['tmp_name'], '../../files/loads/icons/'.$file);
}
if (empty($_FILES['icon']['name'])) {
$icon = '';
} else {
$icon = $file;
}
DB::$dbs->query("INSERT INTO ".LOADS_CAT." (`name`, `folder_id`, `icon`) VALUES (?, ?, ?)", array($name, $folder['id'], $file));
header("Location: ".HOME."/loads/".$folder['id']."/");
}
}
panel();
echo DIV_BLOCK . $folder['name'] . CLOSE_DIV;
if ($folder['type'] == 4 || $folder['type'] == 5 || $folder['type'] == 6 || $folder['type'] == 7 || $folder['type'] == 8 || $folder['type'] == 11) {
echo DIV_BLOCK . '<a href="'.HOME.'/loads/top/appl/"><b>ТОП-100</b></a>' . CLOSE_DIV;
}
/* ТОП картинок */
if ($folder['type'] == 1) {
echo DIV_BLOCK . '<a href="'.HOME.'/loads/top/pictures/"><b>ТОП картинок</b></a>' . CLOSE_DIV;
}
$all = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".LOADS_CAT." WHERE `folder_id` = ?", array($folder['id']));
if (empty($all)) {
echo DIV_BLOCK . 'Подкаталоги не созданы' . CLOSE_DIV;
} else {
$n = new Navigator($all,$config['write']['loads_cat'],'folder='.$folder['id'].'&select=folder');
$sql = DB::$dbs->query("SELECT * FROM ".LOADS_CAT." WHERE `folder_id` = ? ORDER BY `id` DESC LIMIT {$n->start()}, ".$config['write']['loads_cat']." ", array($folder['id']));
while($folderc = $sql -> fetch()) {
$files = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".LOADS_FILE." WHERE `folderc_id` = ? ", array($folderc['id']));
echo DIV_LI . '<img src="' . (empty($folderc['icon']) ? HOME . '/style/icons/folder.png' : HOME . '/files/loads/icons/' . $folderc['icon']) . '" wight="16" height="16" /> <a href="'.HOME.'/loads/'.$folder['id'].'/'.$folderc['id'].'/">'.$folderc['name'].'</a> ['.$files.']' . CLOSE_DIV;
}
echo $n->navi();
}
echo DIV_AUT;
echo '<form action="'.HOME.'/loads/search/" enctype="multipart/form-data" method="POST">';
echo '<b>Поиск:</b> <input type="text" name="q" />';
echo '<input type="submit" name="search" value="Найти" /></form>';
echo CLOSE_DIV;
if (privilegy('zc')) {
echo DIV_AUT;
echo '<form action="#" enctype="multipart/form-data" method="POST">';
echo 'Новая подпапка:<br /><input type="text" name="name" /><br />';
echo '<b>Иконка:</b><br /><input name="icon" type="file" /><br />';
echo '<input type="submit" name="add" value="Создать" /></form>';
echo CLOSE_DIV;
echo DIV_BLOCK;
echo '<a href="?edit">Редактировать каталог <b>'.$folder['name'].'</b></a><br />';
echo '<a href="?del">Удалить каталог <b>'.$folder['name'].'</b></a><br />';
echo CLOSE_DIV;
}
$array = array('Загрузки');
nav($array);
break;
case 'folderc':
$folder = DB::$dbs->queryFetch("SELECT * FROM ".LOADS." WHERE `id` = ? ", array(abs(num($_GET['folder']))));
if (empty($folder)) {
head('Каталог не найден');
echo DIV_TITLE . 'Каталог не найден' . CLOSE_DIV;
echo DIV_ERROR . 'Ошибка!' . CLOSE_DIV;
echo DIV_GO . '<a href="'.HOME.'/">Главная</a> / <a href="'.HOME.'/loads/">Загрузки</a> / <b>Каталог не найден</b>' . CLOSE_DIV;
require_once('../../core/stop.php');
exit();
}
$folderc = DB::$dbs->queryFetch("SELECT * FROM ".LOADS_CAT." WHERE `id` = ? ", array(abs(num($_GET['folderc']))));
if (empty($folderc)) {
head('Подкаталог не найден');
echo DIV_TITLE . 'Подкаталог не найден' . CLOSE_DIV;
echo DIV_ERROR . 'Ошибка!' . CLOSE_DIV;
echo DIV_GO . '<a href="'.HOME.'/">Главная</a> / <a href="'.HOME.'/loads/">Загрузки</a> / <b>Подкаталог не найден</b>' . CLOSE_DIV;
require_once('../../core/stop.php');
exit();
}
head('Загрузки: ' . $folderc['name']);
if (isset($_GET['del']) && privilegy('zc')) {
if (!isset($_GET['go'])) {
echo DIV_LI . '<b>Подтвердите удаление:</b> <a href="?del&go">[Удалить]</a> <a href="'.HOME.'/loads/'.$folder['id'].'/'.$folderc['id'].'/">[Нет]</a>' . CLOSE_DIV;
} else {
$sql = DB::$dbs->query("SELECT * FROM ".LOADS_FILE." WHERE `folderc_id` = ? ", array($folderc['id']));
while($file = $sql -> fetch()) {
unlink('../../files/loads/files/' . $file['url']);
@unlink('../../files/loads/files/mini_' . $file['url']);
}
@unlink('../../files/loads/icons/'.$folder['icon']);
DB::$dbs->query("DELETE FROM ".LOADS_FILE." WHERE `folderc_id` = ? ", array($folderc['id']));
DB::$dbs->query("DELETE FROM ".LOADS_CAT." WHERE `id` = ? ", array($folderc['id']));
header("Location: ".HOME."/loads/".$folder['id']."/");
}
}
if (isset($_GET['edit']) && privilegy('zc')) {
if ($_POST['edit']) {
$name = html($_POST['name']);
if (empty($name)) {
echo DIV_ERROR . 'Введите название подкаталога' . CLOSE_DIV;
} else {
DB::$dbs->query("UPDATE ".LOADS_CAT." SET `name` = ? WHERE `id` = ? ", array($name, $folderc['id']));
header("Location: ".HOME."/loads/".$folder['id']."/".$folderc['id']."/");
}
}
echo DIV_AUT;
echo '<form action="#" method="POST">';
echo 'Редактирование подкаталога:<br /><input type="text" value="'.$folderc['name'].'" name="name" />';
echo '<input type="submit" name="edit" value="Изменить" /></form><br />';
if (!empty($folderc['icon'])) {
echo 'Иконка: <img src="'.HOME.'/files/loads/icons/'.$folderc['icon'].'" wight="16" height="16" /> <a href="'.HOME.'/loads/'.$folder['id'].'/'.$folderc['id'].'/?edit&delicon">[x]</a><br /><br />';
} else {
echo 'Иконка: <img src="'.HOME.'/style/icons/folder.png" wight="16" height="16" /> <a href="'.HOME.'/loads/'.$folder['id'].'/'.$folderc['id'].'/?edit&uploadicon">[загрузить]</a><br /><br />';
}
if (isset($_GET['uploadicon'])) {
if ($_POST['upload']) {
if (isset($_FILES['file']['name'])) {
$name1 = $_FILES['file']['name']; # Название файла
$ext = strtolower(strrchr($name1, '.')); # Расширение файла
$file = time().$ext;
$pictures = array('.jpg', '.jpeg', '.gif', '.png'); # Допустимые расширения
if (preg_match('/.phtml/i', $name) || preg_match('/.php/i', $name1) || preg_match('/.pl/i', $name1) || $name1 == '.htaccess' || !in_array($ext, $pictures)) {
$err .= 'Не верное расширение файла.<br />';
}
if (!empty($err)) {
echo DIV_ERROR . $err . CLOSE_DIV;
} else {
if (!empty($_FILES['file']['name'])) {
copy($_FILES['file']['tmp_name'], '../../files/loads/icons/'.$file);
}
DB::$dbs->query("UPDATE ".LOADS_CAT." SET `icon` = ? WHERE `id` = ? ", array($file, $folderc['id']));
header("Location: ".HOME."/loads/" . $folder['id'] . "/".$folderc['id']."/?edit&icon");
}
}
}
echo DIV_AUT;
echo '<form action="#" enctype="multipart/form-data" method="POST">';
echo '<b>Иконка:</b><br /><input name="file" type="file" /><br />';
echo '<input type="submit" name="upload" value="Загрузить" /></form>';
echo CLOSE_DIV;
}
echo CLOSE_DIV;
}
panel();
echo DIV_BLOCK . $folderc['name'] . CLOSE_DIV;
if ($folder['type'] == 4 || $folder['type'] == 5 || $folder['type'] == 6 || $folder['type'] == 7 || $folder['type'] == 8 || $folder['type'] == 11) {
echo DIV_BLOCK . '<a href="'.HOME.'/loads/top/appl/"><b>ТОП-100</b></a>' . CLOSE_DIV;
}
if ($folder['type'] == 1) {
echo DIV_BLOCK . '<a href="'.HOME.'/loads/top/pictures/"><b>ТОП картинок</b></a>' . CLOSE_DIV;
/* Превью изображения */
$array = array(30, 60, 100);
if (!empty($_GET['prev'])) {
$prev1 = $_GET['prev'];
if ($prev1 == $array[0]) {
unset($_SESSION['prev']);
} elseif ($prev1 == $array[1]) {
$_SESSION['prev'] = 1;
} elseif ($prev1 == $array[2]) {
$_SESSION['prev'] = 2;
} else {
$_SESSION['prev'] = 'no';
}
}
if (empty($_SESSION['prev'])) {
$prev = 'wight="'.$array[0].'" height="'.$array[0].'"';
} elseif ($_SESSION['prev'] == 1) {
$prev = 'wight="'.$array[1].'" height="'.$array[1].'"';
} elseif ($_SESSION['prev'] == 2) {
$prev = 'wight="'.$array[2].'" height="'.$array[2].'"';
} else {
$prev = NULL;
}
echo DIV_BLOCK;
echo '<b>Превью:</b> ' . (empty($_SESSION['prev']) ? '<b>['.$array[0].'x'.$array[0].']</b>' : '<a href="?prev='.$array[0].'">['.$array[0].'x'.$array[0].']</a>') . '
' . ($_SESSION['prev'] == 1 ? '<b>['.$array[1].'x'.$array[1].']</b>' : '<a href="?prev='.$array[1].'">['.$array[1].'x'.$array[1].']</a>') . ' ' .
($_SESSION['prev'] == 2 ? '<b>['.$array[2].'x'.$array[2].']</b>' : '<a href="?prev='.$array[2].'">['.$array[2].'x'.$array[2].']</a>') . ' ' .
($_SESSION['prev'] == 'no' ? '<b>[Выкл.]</b>' : '<a href="?prev=no">[Не показывать]</a>');
echo CLOSE_DIV;
}
/* *** */
$all = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".LOADS_FILE." WHERE `folderc_id` = ?", array($folderc['id']));
if (empty($all)) {
echo DIV_BLOCK . 'Файлы не загружены' . CLOSE_DIV;
} else {
$n = new Navigator($all,$config['write']['loads_file'],'folder='.$folder['id'].'&folderc='.$folderc['id'].'&select=folderc');
$sql = DB::$dbs->query("SELECT * FROM ".LOADS_FILE." WHERE `folderc_id` = ? ORDER BY `id` DESC LIMIT {$n->start()}, ".$config['write']['loads_file']." ", array($folderc['id']));
while($file = $sql -> fetch()) {
echo DIV_AUT;
/* Если изображение */
if ($folder['type'] == 1) {
if (empty($_SESSION['prev']) || $_SESSION['prev'] == 1 || $_SESSION['prev'] == 2 ) {
echo '<a href="'.HOME.'/loads/'.$folder['id'].'/'.$folderc['id'].'/'.$file['id'].'/"><img src="'.HOME.'/files/loads/files/mini_'.$file['url'].'" '.$prev.'/></a>';
}
echo ( (empty($_SESSION['prev']) || $_SESSION['prev'] == 1 || $_SESSION['prev'] == 2) ? '<span style="float: right; ">' : NULL );
echo '<a href="'.HOME.'/loads/'.$folder['id'].'/'.$folderc['id'].'/'.$file['id'].'/">'.$file['name'].'</a>';
echo ' | <span style="float: right"><b>Рейтинг:</b> '.(empty($file['rating']) ? '0' : $file['rating']).'</span><br />';
echo '</span>';
} else {
echo '<a href="'.HOME.'/loads/'.$folder['id'].'/'.$folderc['id'].'/'.$file['id'].'/">'.$file['name'].'</a> ['.get_size($file['size']).' / '.$file['type'].']';
echo ' | <b>Рейтинг:</b> '.(empty($file['rating']) ? '0' : $file['rating']).'<br />';
}
echo CLOSE_DIV;
}
echo $n->navi();
}
echo DIV_AUT;
echo '<form action="'.HOME.'/loads/'.$folder['id'].'/'.$folderc['id'].'/upload/" enctype="multipart/form-data" method="POST">';
echo '<b>Загрузить файл:</b> ['.$folder['name'].']<br /><input type="file" name="file"/><br /><br />';
echo '<b>Поддерживаются форматы:</b> ';
echo type_view($folder['type']);
echo '<br /><br />';
if ($folder['type'] == 3) {
echo 'Исполнитель:<br /><input type="text" name="artist" /><br />';
echo 'Название:<br /><input type="text" name="track" /><br />';
echo 'Название альбома:<br /><input type="text" name="album" /><br /><br />';
} else {
echo 'Отоброжать как [название]:<br /><input type="text" name="name" /><br /><br />';
}
echo '<input type="submit" name="upload" value="Загрузить" />';
echo '</form>';
echo CLOSE_DIV;
if (privilegy('zc')) {
echo DIV_BLOCK;
echo '<a href="?edit">Редактировать подкаталог <b>'.$folderc['name'].'</b></a><br />';
echo '<a href="?del">Удалить подкаталог <b>'.$folderc['name'].'</b></a><br />';
echo CLOSE_DIV;
}
echo DIV_LI . '<a href="'.HOME.'/loads/'.$folder['id'].'/">Вернуться назад</a>' . CLOSE_DIV;
echo DIV_AUT;
echo '<form action="'.HOME.'/loads/search/" enctype="multipart/form-data" method="POST">';
echo '<b>Поиск:</b> <input type="text" name="q" />';
echo '<input type="submit" name="search" value="Найти" /></form>';
echo CLOSE_DIV;
$array = array('Загрузки');
nav($array);
require_once('../../core/stop.php');
exit();
break;
}
require_once('../../core/stop.php');
?>