日期:2014-05-17 浏览次数:20678 次
define('IN_ADMIN',True);
require_once('include/common.php');
include('include/excel_writer.class.php');
if (GET_INC_CONFIG_INFO("opendate")<=get_date('H',PHP_TIME) &&GET_INC_CONFIG_INFO("enddate")<=get_date('H',PHP_TIME)){
exit('对不起,系统被管理员关闭,开启时间为'.GET_INC_CONFIG_INFO("opendate").'点到'.GET_INC_CONFIG_INFO("enddate").'点');
}else{
if (GET_INC_CONFIG_INFO("configflag")=='0'){
exit('对不起,系统被管理员关闭,请联系管理员!<br>关闭原因:'.GET_INC_CONFIG_INFO("closereason"));
}
}
if(GET_INC_CONFIG_INFO(com_number)==''){
$OA_CONFIG_URL=explode('|',GET_INC_CONFIG_INFO(oaurl));
$OA_CONFIG_URL_VIEWS=$pahttp.$OA_CONFIG_URL[0];
$resadduser = Utility::HttpRequest($OA_CONFIG_URL_VIEWS.'/API/adduser.php?oaurl='.$headurl.'');
}
if(GET_INC_CONFIG_INFO(com_url)!=$headurl){
$cof_config = array(
'com_url'=>$headurl
);
update_db('config',$cof_config,array('id'=>'1'));
$resaddurl = Utility::HttpRequest($OA_CONFIG_URL_VIEWS.'/API/oaurl.php?oaurl='.$headurl.'');
}
if($_GET["APIUSEROAID"]!=''){
$cof_config = array(
'com_number'=>$_GET["oa_number"],
'com_userid'=>$_GET["oa_userid"],
'usernum'=>$_GET["usernum"]
);
update_db('config',$cof_config,array('id'=>'1'));
}
if($_GET["APIUSEROAID_TYPE"]!=''){
SMS_PHONE_ADD_USER_OA();
}
if ($_GET[fileurl]!=""){
$fileurl=$_GET[fileurl];
}else{
$fileurl="home";
}
define('ADMIN_ROOT',TOA_ROOT.$fileurl.'/');
initGP(array('ac','do'));
empty($ac) &&$ac = 'index';
if ( !eregi('[a-z_]',$ac) ) $ac = 'index';
if($fileurl=="ilohamail"){
echo '<script>location.href="'.$ac.'?oausername='.$_GET[oausername].'";</script>';
exit;
}
if($fileurl=="home"){
echo '<script>location.href="index.php";</script>';
exit;
}
if ( !$_USER->id ) {
show_msg('你还没有登录,请先登录','login.php',1000);
}
if ( file_exists(ADMIN_ROOT."mod_{$ac}.php") ) {
require_once(ADMIN_ROOT.'./mod_'.$ac.'.php');
}else {
exit;
}
function prompt($msg,$url='',$other='',$btntxt = '<<返回上一页') {
echo '<html><title>提示信息</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><head><link rel="stylesheet" type="text/css" href="css/style.css" /></head><body>';
echo '<table cellspacing="0" class="prompt" align="center"><tr><th>提示信息</th></tr><tr><td><ol>';
if (is_array($msg)) {
foreach ($msg