Просмотр файла publs_v1_0/inc/conf.php

Размер файла: 1.76Kb
<?php
if (!defined('BASEDIR')) {
	exit (header('Location: /index.php'));
}

$id = isset($_GET['id']) ? intval($_GET['id']) : false;
require_once ("func.php");

//	Error_Reporting(E_ALL & E_NOTICE);

// Получаем записи из pub_sett
/*
$BD = DB::run() -> query("SELECT * FROM `pub_sett`;");
$cats = $BD -> fetchAll();
$lib = array();
foreach ($cats as $row) {
	$lib[$row['key']] = $row['val'];
}
*/
$BDset = DB::run() -> query("SELECT `key`, `val` FROM `pub_sett`;");
$lib = $BDset -> fetchAssoc();

$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;
$closed = $lib['closed'] ;
$error		= '';

#####################################################################
##						Заголовки библиотеки					   ##
#####################################################################
if (empty($id)) {
	$textl = 'Публикации';
} else {/*
	$req = mysql_query("select * from `pub_arts` 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 `pub_arts` where `id` = '".$dirid."' LIMIT 1"));
			$al[] = $res['name'];
			$dirid = $res['fid'];
		}
		krsort($al);
		$textl = 'Публикации /| ';
		foreach($al as $v) {
			$textl .= $v.' | ';
		}
	}*/
}
###########################################################################################

?>