Размер файла: 1.94Kb
<?php
/*
*Manag-Develop BolCmS-Suptesat
*Syte- bolcms.cf
*/
$title = 'Загруз-центр';
require("../system/core.php");
switch($_GET['act']){
default:
echo '<div class="phdr"> ' .$lng ['razdel'] . ' </div><div class="bmenu">';
$result = mysql_query("SELECT * FROM `loads_cats`");
$cat = mysql_fetch_assoc($result);
if($cat > 0){
do
{
printf('<a href="?act=cat_view&id=%s">%s</a><br/>', $cat['id'], $cat['name']);
}
while($cat = mysql_fetch_assoc($result));
}else{
echo ' ' .$lng ['ntt'] . ' ';
}
echo '</div>';
nav();
break;
case 'cat_view':
$id = intval($_REQUEST['id']);
$cat = mysql_fetch_assoc(mysql_query("SELECT * FROM `loads_cats` WHERE `id` = '$id'"));
echo '<div class="phdr">'.$cat['name'].'</div><div class="bmenu">';
$result = mysql_query("SELECT * FROM `loads` WHERE `id_cat` = '$id' ORDER BY `time` DESC");
$file = mysql_fetch_assoc($result);
if($file > 0){
do
{
printf('<a href="index.php?act=file_view&id=%s">%s</a> (%s)<br/>', $file['id'], $file['name'], date('d.m.y / H:i', $file['time']));
}
while($file = mysql_fetch_assoc($result));
}else{
echo ' ' .$lng ['fno'] . ' ';
}
echo '</div><div class="phdr"></div><div class="bmenu"><a href="./"> ' .$lng ['nd'] . ' </a><br/><a href="../"> ' .$lng ['niz'] . ' </a></div>';
break;
case 'file_view':
$id = intval($_REQUEST['id']);
$result = mysql_query("SELECT * FROM `loads` WHERE `id` = '$id'");
$file = mysql_fetch_assoc($result);
if(isset($file['id'])){
echo '<div class="bmenu">'.$file['name'].'</div><div class="bmenu">'.nl2br($file['desc']).'<br/><br/> ' .$lng ['autor'] . ' : '.$file['authour'].' (http://'.$file['site'].')<br/> ' .$lng ['datas'] . ' : '.date('d.m.y / H:i', $file['time']).'<br/><a href="files/'.$file['file'].'"> ' .$lng ['fls'] . ' '.$file['name'].'</a></div>';
nav2('./index.php', ' ' .$lng ['nd'] . ' ');
}else{
error(' ' .$lng ['log'] . ' !');
nav2('./index.php', ' ' .$lng ['nd'] . ' ');
}
break;
}
require("../system/end.php");
?>