<?php
require dirname(__FILE__).'/sys.php';//初始化系统环境
//检查系统是否已安装
(isset($get_id))? $get_id=intval($get_id):$get_id=0;
if(!isset($get_act)) $get_act="";

$this_user_name=$obj_ctl_user->uname;
$this_is_admin=$obj_ctl_user->is_admin();
$this_user_id=$obj_ctl_user->id;
$this_page_charset=DB_CHARSET;

if(!isset($get_app))$get_app="index";
if(!isset($get_temp)) $get_temp="";

if(WEB_URL!=WEB_DOMAIN){
	include_once SYS_ROOT."/cls_ctl/ctl.domain.php";
	$obj_ctl_domain=new cls_ctl_domain;
	if($obj_ctl_domain->id>0){
		if($obj_ctl_domain->type=="company"){
			$get_app="companyview";
			$get_id=$obj_ctl_domain->id;
		}else{
			$get_temp=$obj_ctl_domain->temp;
		}
	}
}
if($get_temp!=""){
	set_cookie("hr_default_temp",$get_temp);
}else{
	$get_temp="default";
}


$str_apppath="";
if(isset($get_apppath)&&$get_apppath!=""){
	$str_apppath=$get_apppath;
	$str_apppath=str_replace("\\","/",$str_apppath);
	if(substr($str_apppath,-1,1)!="/") $str_apppath.="/";
	if(substr($str_apppath,0,1)=="/") $str_apppath=substr($str_apppath,1);
	$str_temp_path="/".$str_apppath;
}else{
	$str_temp_path="/".$get_temp."/";
}
if(isset($get_appdir)&&$get_appdir!=""){
	$get_appdir=str_replace("\\","/",$get_appdir);
	if(substr($get_appdir,-1,1)!="/") $get_appdir.="/";
	if(substr($get_appdir,0,1)=="/") $get_appdir=substr($get_appdir,1);
	$str_temp_path.="/".$get_appdir;
}
?>