<?php
define('ADMIN_ROOT',dirname(__FILE__));
$str_sys_root=dirname(ADMIN_ROOT);

require $str_sys_root.'/sys.php';//初始化系统环境
require $str_sys_root.'/'.SYS_DIR.'/cls_ctl/ctl.limit.php';//引入权限控制
//检查管理员是否登陆
if(!$obj_ctl_user->is_admin_login()){
	go_url(WEB_URL."/".basename(dirname(__FILE__))."/login.php?go_url=".WEB_SCRIPT_URL);
	exit;
}

$obj_ctl_limit=new cls_ctl_limit;
$msg_return=$obj_ctl_limit->chk_limit();
if($msg_return["err"]!=""){
	echo $msg_return["err"];exit;
}
//后台日志
require SYS_ROOT."/cls_tab/tab.sys.admin.log.php";
$obj_tab_admin_log=new cls_tab_sys_admin_log();
$arr_msg=$obj_tab_admin_log->on_save();
if($arr_msg["err"]!=""){
	print_r($arr_msg);exit;
}
//初始管理用户数据

function inc_init_fztop(){
	global $get_fz_id,$cfg_fz_list;
	if(defined("SYS_OPEN_FZ") && SYS_OPEN_FZ=="1"){
		$arr_admin_page=array("resume.php","job_apply.php","job_search.php","company.php","job.php","job_invite.php","resume_collect.php","resume_search.php");
		$str_pagename=basename($_SERVER["SCRIPT_FILENAME"]);
		if(in_array($str_pagename,$arr_admin_page)){
			($get_fz_id=="" || $get_fz_id==-1)? $get_fz_id=-1:$get_fz_id=(int)$get_fz_id;
			$str_x="";
			if($get_fz_id==0){
				$str_x_sel1="";
				$str_x_sel2=" class='sel'";
			}else{
				$str_x_sel1=" class='sel'";
				$str_x_sel2="";
			}
			foreach($cfg_fz_list as $item){
				$str_sel="";
				if($get_fz_id==$item["fz_id"]){
					$str_x_sel1="";
					$str_x_sel2="";
					$str_sel=" class='sel'";
				}
				$str_x.="<li".$str_sel."><a href=\"javascript:frmSet('fz_id',".$item["fz_id"].");frmExecute('');\">".$item["fz_name"]."</a></li>";
			}
			echo '<div class="pMenu2">';
			echo "<li".$str_x_sel1."><a href=\"javascript:frmSet('fz_id',-1);frmExecute('');\">全部</a></li>";
			echo "<li".$str_x_sel2."><a href=\"javascript:frmSet('fz_id',0);frmExecute('');\">默认</a></li>".$str_x;
			echo '<input type="hidden" name="fz_id" value="'.$get_fz_id.'">';
			echo '</div>';
		}
	}
}
?>