<?
header('Content-type: text/html; charset=UTF-8');
define('TEMPLATE_COMPILATION_DIR',ROOT_PATH.'tpls/');
define('TEMPLATE_COMPILATION_URL',$glo_domain_directory.'tpls/');
define('MODULES_DIR',ROOT_PATH.'modules/');
define('TEMPLATE_DIR', ROOT_PATH . '/tpls/'.$glo_config_arr['now_template']['value']);
define('TEMPLATE_C_DIR', ROOT_PATH . '/compiler_tpl/');

require_once(ROOT_PATH.'/includes/template.php');
require_once(ROOT_PATH.'includes/glo_template_extension.php');
$tpl_ex     =     new template_ex($db_obj,$glo_config_arr['now_template']['value']);



$site_logo				=	dir_to_url($glo_config_arr['site_logo']['value']);
$site_title				=	htmlspecialchars(trim($glo_config_arr['site_title']['value']));
$site_desc				=	$glo_config_arr['site_desc']['value'];
$site_keywords			=	htmlspecialchars(trim($glo_config_arr['site_keywords']['value']));
$site_name				=	htmlspecialchars(trim($glo_config_arr['site_name']['value']));
$site_external_link	=	storage_dencode($glo_config_arr['site_external_link']['value']);
if($site_external_link){
	foreach($site_external_link as $key =>$val){
		$site_external_link[$key]['name']		=		htmlspecialchars($val['name'],ENT_QUOTES);
	}
}
$site_book_mark			=	storage_dencode($glo_config_arr['book_mark']['value']);
$site_copyright		=	htmlspecialchars($glo_config_arr['site_copyright']['value'],ENT_QUOTES);

$glo_this_is_here													=	array();

$sql							=	" SELECT * FROM {$db_obj->db_pre}channel WHERE is_open=1 ORDER BY sort_order DESC";
$glo_channel_res			=	$db_obj->getRecords($sql);
$glo_channel_res			=	format_channel_list($glo_channel_res);
$glo_channel_home_focus	=	true;

$glo_only_software_id		=		get_only_software_id();
if($glo_only_software_id){
		get_only_software_all_data($glo_only_software_id);
}
