<?
define('SOFTPUBS_IN', true);
require_once(dirname(__FILE__) . '/includes/init.php');

require_once(ROOT_PATH.'includes/header.php');
if(!is_file(TEMPLATE_DIR.'/article.html')){
	require_once(ROOT_PATH.'/article_list.php');
	exit;
}
	
this_channel(CHANNEL_ARTICLE_LIST_ID);	

$article_id			=	(int)$_GET['article_id'];
$art_detail_res	=	$db_obj->getRecord("SELECT * FROM {$db_obj->db_pre}article WHERE article_id=$article_id");
$art_detail_res	=	format_art($art_detail_res);

if($art_detail_res){
	$glo_category_obj->get_cat_this_is_here('article',$art_detail_res['cat_id'],'article_list');	
	$rel_soft_res	=	$db_obj->getRecords("SELECT software_brief,software_name,software_version,software_id FROM {$db_obj->db_pre}software WHERE software_id IN ({$art_detail_res['rel_software_id']}) AND is_stop=0");
	if($rel_soft_res){
		$rel_soft_res		=	format_software_list($rel_soft_res);
	}
}

$glo_this_is_here[]	=	array(
	'name'		=>	$art_detail_res['title'],
	'url'			=>	get_url('aritcle.php?article_id='.$art_detail_res['article_id'],$art_detail_res['title']),
);
parse_template('article.html');
