Файл: moduls/loads/index.php
Строк: 419
<?php
/**
* @package Prime Social
* @link http://primesocial.ru
* @copyright Copyright (C) 2016 Prime Social
* @author BoB | http://primesocial.ru/about
*/
require_once('../../core/start.php');
require_once('func.php');
check_auth();
switch ($select) {
default:
head('Fayl almashinuv');
if ($_POST['add'] && privilegy('zc')) {
$name = html($_POST['name']);
$type = abs(num($_POST['type']));
if (empty($name)) {
$err .= 'Bo`lim nomini kiriting<br />';
}
if (empty($type)) {
$err .= 'Bo`lim turini tanlang<br />';
}
if (!empty($_FILES['icon']['name'])) {
$name1 = $_FILES['icon']['name']; # Fayl nomi
$ext = strtolower(strrchr($name1, '.')); # Fayl formati
$par = getimagesize($_FILES['icon']['tmp_name']); # Rasm shakli
$size = $_FILES['icon']['size']; # Fayl hajmi
$file = time().$ext;
$pictures = array('.jpg', '.jpeg', '.gif', '.png'); # Mumkun bo`lgan formatlar
if (preg_match('/.phtml/i', $name) || preg_match('/.php/i', $name1) || preg_match('/.pl/i', $name1) || $name1 == '.htaccess' || !in_array($ext, $pictures)) {
$err .= 'Fayl shaklida xatolik.<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; // Boshlang`ich baxo
$all = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".LOADS."");
if ($all == 0) {
echo DIV_AUT . 'Bo`limlar ochilmagan' . CLOSE_DIV;
} else {
echo DIV_BLOCK . ''.icon('chart.png').' Eng zo`r fayllar: <a href="'.HOME.'/loads/new/day/">[bugun]</a> <a href="'.HOME.'/loads/new/wk/">[hafta]</a> <a href="'.HOME.'/loads/new/month/">[oy]</a><br />'
. ''.icon('efir.png').' <a href="'.HOME.'/loads/new/">So`ngi kiritilganlar</a><br />
'.icon('search.png').' <a href="'.HOME.'/loads/search/">Fayllarni izlash</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 class="touch"> <a href="'.HOME.'/loads/'.$folder['id'].'/"><img src="' . (empty($folder['icon']) ? HOME . '/files/loads/icons/folder.gif' : HOME . '/files/loads/icons/' . $folder['icon']) . '" /> '.$folder['name'].' <span class="count">'.$cats.'/'.$files.'</span></a> </div>';
}
}
if (privilegy('zc')) {
echo DIV_AUT;
echo '<form action="#" enctype="multipart/form-data" method="POST">';
echo '<b>Yangi bo`lim:</b><br /><input type="text" name="name" /><br />';
echo 'Turi:<br /><select name="type">';
echo '<option value="1">Rasmlar</option>';
echo '<option value="2">Video</option>';
echo '<option value="3">Musiqa</option>';
echo '<option value="4">Java-dasturlar</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">Mavzular</option>';
echo '<option value="11">Symbian</option>';
echo '</select><br />';
echo 'ico:<br /><input name="icon" type="file" /><br />';
echo '<input type="submit" name="add" value="Ochish" /></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('Bo`lim topilmadi');
echo DIV_ERROR . 'Xatolik!' . CLOSE_DIV;
echo DIV_GO . '<a href="'.HOME.'/">Bosh sahifa</a> / <a href="'.HOME.'/loads/">Yuklamalar</a> / <b>Bo`lim topilmadi</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>O`chirishni tastiqlang:</b> <a href="?del&go">[O`chirish]</a> <a href="'.HOME.'/loads/'.$folder['id'].'/">[Yo`q]</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')) {
/* Ikonkani o`chirish */
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 . 'Bo`lim nomini kiriting' . 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 'Bo`limni tahrirlash:<br /><input type="text" value="'.$folder['name'].'" name="name" />';
echo 'Turi:<br /><select name="type">';
echo '<option '.(1 == $folder['type'] ? 'selected="selected"' : NULL).' value="1">Rasmlar</option>';
echo '<option '.(2 == $folder['type'] ? 'selected="selected"' : NULL).' value="2">Video</option>';
echo '<option '.(3 == $folder['type'] ? 'selected="selected"' : NULL).' value="3">Musiqa</option>';
echo '<option '.(4 == $folder['type'] ? 'selected="selected"' : NULL).' value="4">Java-dastur</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">Mavzular</option>';
echo '<option '.(11 == $folder['type'] ? 'selected="selected"' : NULL).' value="11">Symbian</option>';
echo '</select><br /><br />';
if (!empty($folder['icon'])) {
echo 'ico: <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 'ico: <img src="'.HOME.'/files/loads/icons/folder.gif" /> <a href="'.HOME.'/loads/'.$folder['id'].'/?edit&uploadicon">[Yuklash]</a><br /><br />';
}
echo '<input type="submit" name="edit" value="O`zgartirish" /></form>';
if (isset($_GET['uploadicon'])) {
if ($_POST['upload']) {
if (isset($_FILES['file']['name'])) {
$name1 = $_FILES['file']['name']; # Fayl nomi
$ext = strtolower(strrchr($name1, '.')); # Fayl shakli
$file = time().$ext;
$pictures = array('.jpg', '.jpeg', '.gif', '.png'); # Mumkun bo`lgan formatlar
if (preg_match('/.php/i', $name1) || preg_match('/.pl/i', $name1) || $name1 == '.htaccess' || !in_array($ext, $pictures)) {
$err .= 'Fayl shaklida xatolik.<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>ico:</b><br /><input name="file" type="file" /><br />';
echo '<input type="submit" name="upload" value="Yuklash" /></form>';
echo CLOSE_DIV;
}
echo CLOSE_DIV;
}
if ($_POST['add'] && privilegy('zc')) {
$name = html($_POST['name']);
if (empty($name)) {
$err .= 'Ichki bo`lim nomini kiriting<br />';
}
if (!empty($_FILES['icon']['name'])) {
$name1 = $_FILES['icon']['name']; # Fayl nomi
$ext = strtolower(strrchr($name1, '.')); # Fayl formati
$par = getimagesize($_FILES['icon']['tmp_name']); # Rasm shakli
$size = $_FILES['icon']['size']; # Fayl hajmi
$file = time().$ext;
$pictures = array('.jpg', '.jpeg', '.gif', '.png'); # Mumkun bo`lgan formatlar
if (preg_match('/.phtml/i', $name) || preg_match('/.php/i', $name1) || preg_match('/.pl/i', $name1) || $name1 == '.htaccess' || !in_array($ext, $pictures)) {
$err .= 'Fayl shakli xato.<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']."/");
}
}
/* TOP Rasmlar */
if ($folder['type'] == 1) {
echo '<div class="white"><a href="'.HOME.'/loads/top/pictures/"><b>TOP Rasmlar</b></a></div>';
}
echo '<div class="grey">';
echo '<form action="'.HOME.'/loads/search/" enctype="multipart/form-data" method="POST">';
echo '<input type="text" name="q" style="width:60%;"/> ';
echo '<input type="submit" name="search" value="Izlash" /></form>';
echo 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>TOP-100</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 . 'Ichki bo`limlar topilmadi' . 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 class="touch"><a href="'.HOME.'/loads/'.$folder['id'].'/'.$folderc['id'].'/"><img src="' . (empty($folderc['icon']) ? HOME . '/files/loads/icons/folder.gif' : HOME . '/files/loads/icons/' . $folderc['icon']) . '" wight="16" height="16" /> '.$folderc['name'].' <span class="count">'.$files.'</span></a> </div>';
}
echo $n->navi();
}
if (privilegy('zc')) {
echo '<div class="lines">';
echo '<form action="#" enctype="multipart/form-data" method="POST">';
echo 'Yangi ichki bo`lim:<br /><input type="text" name="name" /><br />';
echo '<b>ico:</b><br /><input name="icon" type="file" /><br />';
echo '<input type="submit" name="add" value="Ochish" /></form>';
echo CLOSE_DIV;
echo DIV_BLOCK;
echo '<a href="?edit"><b>'.$folder['name'].'</b> bo`limni tahrishlash</a><br />';
echo '<a href="?del"><b>'.$folder['name'].'</b> bo`limni o`chirish</a><br />';
echo CLOSE_DIV;
}
$array = array('Yuklamalar');
nav($array);
break;
case 'folderc':
$folder = DB::$dbs->queryFetch("SELECT * FROM ".LOADS." WHERE `id` = ? ", array(abs(num($_GET['folder']))));
if (empty($folder)) {
head('Bo`lim topilmadi');
echo DIV_ERROR . 'Xatolik!' . CLOSE_DIV;
echo DIV_GO . '<a href="'.HOME.'/">Bosh sahifa</a> / <a href="'.HOME.'/loads/">Yuklamalar</a> / <b>Bo`lim topilmadi</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('Ichki bo`lim topilmadi');
echo DIV_ERROR . 'Xatolik!' . CLOSE_DIV;
echo DIV_GO . '<a href="'.HOME.'/">Bosh sahifa</a> / <a href="'.HOME.'/loads/">Yuklamalar</a> / <b>Ichki bo`lim topilmadi</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>O`chirishni tastiqlash:</b> <a href="?del&go">[O`chirish]</a> <a href="'.HOME.'/loads/'.$folder['id'].'/'.$folderc['id'].'/">[Yo`q]</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 . 'Bo`lim nomini kiriting' . 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 'Ichki bo`limni tahrirlash:<br /><input type="text" value="'.$folderc['name'].'" name="name" />';
echo '<input type="submit" name="edit" value="O`zgartirish" /></form><br />';
if (!empty($folderc['icon'])) {
echo 'Ico: <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 'Ico: <img src="'.HOME.'/files/loads/icons/folder.gif" wight="16" height="16" /> <a href="'.HOME.'/loads/'.$folder['id'].'/'.$folderc['id'].'/?edit&uploadicon">[Yuklash]</a><br /><br />';
}
if (isset($_GET['uploadicon'])) {
if ($_POST['upload']) {
if (isset($_FILES['file']['name'])) {
$name1 = $_FILES['file']['name']; # Fayl nomi
$ext = strtolower(strrchr($name1, '.')); # Fayl formati
$file = time().$ext;
$pictures = array('.jpg', '.jpeg', '.gif', '.png'); # Mumkun bo`lgan formatlar
if (preg_match('/.phtml/i', $name) || preg_match('/.php/i', $name1) || preg_match('/.pl/i', $name1) || $name1 == '.htaccess' || !in_array($ext, $pictures)) {
$err .= 'Fayl shakli xato.<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>Ico:</b><br /><input name="file" type="file" /><br />';
echo '<input type="submit" name="upload" value="Yuklash" /></form>';
echo CLOSE_DIV;
}
echo CLOSE_DIV;
}
echo '<div class="line">';
echo '<form action="'.HOME.'/loads/search/" enctype="multipart/form-data" method="POST">';
echo '<input type="text" name="q" style="width:60%;"/> ';
echo '<input type="submit" name="search" value="Izlash" /></form>';
echo CLOSE_DIV;
if ($folder['type'] == 1) {
echo '<div class="lines"><a href="'.HOME.'/loads/top/pictures/"><b>TOP Rasmlar</b></a></div>';
}
if ($folder['type'] == 4 || $folder['type'] == 5 || $folder['type'] == 6 || $folder['type'] == 7 || $folder['type'] == 8 || $folder['type'] == 11) {
echo '<div class="lines"><a href="'.HOME.'/loads/top/appl/"><b>TOP-100</b></a></div>';
}
if ($folder['type'] == 1) {
/* Rasm ko`rsatilishi */
$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 class="lines"><b>Ko`rsatish:</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>[O`chr.]</b>' : '<a href="?prev=no">[Ko`rsatmaslik]</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 . 'Fayllar kiritilmagan' . 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 class="lines">';
/* Agar rasm bo`lsa */
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/'.$file['url'].'" '.$prev.'/></a><br/>';
echo ''.icon('rasm.png').' <a href="'.HOME.'/loads/'.$folder['id'].'/'.$folderc['id'].'/'.$file['id'].'/"> '.$file['name'].'</a>';
}
echo ( (empty($_SESSION['prev']) || $_SESSION['prev'] == 1 || $_SESSION['prev'] == 2) ? '<span style="float: right; ">' : NULL );
echo ''.icon('chart.png').' '.(empty($file['rating']) ? '0' : $file['rating']).'<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>reyting:</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>Fayl yuklash:</b> ['.$folder['name'].']<br /><input type="file" name="file"/><br />';
if ($folder['type'] == 3) {
echo 'Ijrochi:<br /><input type="text" name="artist" /><br />';
echo 'Nomi:<br /><input type="text" name="track" /><br />';
echo 'Albom nomi:<br /><input type="text" name="album" /><br />';
} else {
echo 'Fayl nomi:<br /><input type="text" name="name" /><br />';
}
echo '<b>Qo`llanadigan fayl formatlari:</b> ';
echo type_view($folder['type']);
echo '<br /><input type="submit" name="upload" value="Yuklash" />';
echo '</form>';
echo CLOSE_DIV;
if (privilegy('zc')) {
echo '<div class="line">';
echo '<a href="?edit">Tahrirlash</a><br />';
echo '<a href="?del">O`chirish</a><br />';
echo CLOSE_DIV;
}
echo DIV_LI . '<a href="'.HOME.'/loads/'.$folder['id'].'/">Orqaga qaytish</a>' . CLOSE_DIV;
$array = array('Yuklamalar');
nav($array);
require_once('../../core/stop.php');
exit();
break;
}
require_once('../../core/stop.php');
?>