########################################################################
# KBase Express #
# http://www.sensationdesigns.com/products/scripts/kbase_express #
# #
# Website: http://www.sensationdesigns.com #
# Contact: sales@sensationdesigns.com #
# Support: support@sensationdesigns.com #
# #
# KBase Express is NOT free software. It may NOT be redistributed in #
# any way. Please see the license agreement for further information: #
# http://www.sensationdesigns.com/policies/license.php #
# #
# Copyright (c) 2005 Sensation Designs. All rights reserved. #
########################################################################
require('data/config.php');
require('includes/functions.php');
dbConnect($cfg['db_host'], $cfg['db_user'], $cfg['db_pass'], $cfg['db_name']);
$action = $_GET['action'];
$paction = $_POST['paction'];
$id = $_GET['id'];
$errmsg = '';
if ($action == 'view') {
$query = "SELECT * FROM categories WHERE id=$id";
$result = mysql_query($query) or die('Error in MySQL query!
'.$query.'
Error #'.mysql_errno().': '.mysql_error());
if (mysql_num_rows($result) == 1) {
while ($row = mysql_fetch_object($result)) {
$category = array();
$category['id'] = $row->id;
$category['parentid'] = $row->parentid;
$category['title'] = $row->title;
$category['description'] = $row->description;
$category['article_count'] = $row->article_count;
}
}
else {
$errmsg = 'Invalid category Id specified!';
require($cfg['tpl_dir'].'/error.php');
die();
}
require($cfg['tpl_dir'].'/category_view.php');
}
displayCopyright();
?>