<?php

define('IN_ART',true);
define('IS_MVC',false);

require('includes'.DIRECTORY_SEPARATOR.'inc_common.php');
$wk=requestGet('wk',TYPE_STRING,30);
define('URLMODE', WSKM::getConfig('urlMode'));

WSKM::using('wskm_page_abstract');
WSKM::using('wskm_template_easy');
WSKM::using('wskm_http_mvc');

loadCacheSystem('style');
loadCacheSystem('category');
loadCacheSystem('nav');
if (wskm_note::read('cache')) {
	gotoUrl(URL_HOME);
}
$user=WSKM::user();
if ( is_object($user)) {
	define('STYLEID',$user->getStyleid());
	$temp=getWebStyle(STYLEID);
	define('STYLENAME',$temp['name']);
	define('STYLEVERSION',$temp['version']);
	
	define('UNAME',$user->getUname());
	define('UID',$user->getUid());
	define('ADMINID',$user->getAdminid());
	define('GROUPID',$user->getGroupid());
}

$temp=WSKM::getValue('category');
assign_var('categorylist',$temp['tree']);
assign_var('topnav',WSKM::getValue('nav'));
assign_var('popBgShow',(int)WSKM::getConfig('popBgShow'));
assign_var('popBgColor',WSKM::getConfig('popBgColor'));
if (!IS_HTML && (bool)WSKM::getConfig('isSwitchTheme')) {
	assign_var('themelist',WSKM::getValue('style'));
}
unset($temp);

define('PLUGIN_URL',ART_URL.'plugins/'.PLUGIN_KEY.'/');
define('PLUGIN_PATH',ART_ROOT.'plugins'.DS.PLUGIN_KEY.DS);

?>