Размер файла: 1.58Kb
<?php
defined('_IN_JOHNCMS') or die('Error: restricted access');
$id = intval($_GET['id']);
require_once ("func.php");
#Error_Reporting(E_ALL & E_NOTICE);
$rew = mysql_query("SELECT * FROM `lib_settings`;");
$lib = array();
while ($re = mysql_fetch_row($rew))
$lib[$re[0]] = $re[1];
mysql_free_result($rew);
$kolfile = $lib['kol_file'];
$new_fil = $lib['new_fil'];
$simvo = $lib['simvol'];
$dos_load = $lib['dos_load'];
$kol_file = !empty($_SESSION['file'])?intval($_SESSION['file']):$kolfile;
$simvol = !empty($_SESSION['symb'])?intval($_SESSION['symb']):$simvo;
$error = '';
// Заголовки библиотеки
###########################################################################################
if (empty ($id)) {
$textl = 'Библиотека';
}
else {
$req = mysql_query("select * from `library` where `id` = '".$id."' LIMIT 1");
if(mysql_num_rows($req) == "0")
{
$error = '<p>ОШИБКА!<br /><a href="index.php">Назад</a></p>';
}
if(empty($error))
{
$al = array();
$dirid = $id;
while($dirid!=="0" && $dirid!=="")
{
$res = mysql_fetch_array(mysql_query("select `fid`,`name` from `library` where `id` = '".$dirid."' LIMIT 1"));
$al[] = $res['name'];
$dirid = $res['fid'];
}
krsort($al);
$textl = 'Библиотека | ';
foreach($al as $v)
{
$textl .= $v.' | ';
}
}
}
###########################################################################################
?>