//改一下文件asianhats.inc 密码账户名,
// index.php3 路径
// viewphoto.php3 密码账户名
// templet/lan/chn_lan.inc 管理员email
// templet/lan/eng_lan.inc 管理员email
// $base_dir ='e:/zfweb/asianhats/';
$base_dir ='../' ; //相对于index.php3所定的
$base_url ='../';
require($base_dir. "common/db_config.inc"); // jinhengyu数据库配置文件
// $base_url ='http://www.asianhats.com/';
// $base_url ='http://test/bzfitem/asianhats/';
require($base_dir. "common/asianhats.inc"); // asianhats配置文件
?>
include(COMMON_LIB_DIR.'db_mysql.inc') ; // 加载数据库类
include(COMMON_LIB_DIR.'ah_session.inc'); // 加载session类
include(COMMON_LIB_DIR.'ah_perm.inc') ; // 加载perm类
include(COMMON_DIR.'func_my.inc'); // 通用函数
include(COMMON_DIR.'func_asianhats.inc'); // 本站点用函数
include(COMMON_DIR.'func_pagedisp.inc'); // 页面格式输出函数
include(COMMON_DIR.'config.inc') ; // 基本模块设置
// $beg_time=gettime();
?>
$db = new ah_DB;
$sess = new ah_Session; // $sess
$perm = new ah_Perm; // $perm
$vars = array();
$sess->register($REMOTE_ADDR);
if (!isset($auth)) { // $auth
$auth = array();
$sess->register("auth");
}
$sess->register("lan");
// $sess->register("vars");
//page检查
if (!isset($page)) $page='index/index';
$modulename = dirname($page);
$pagename = basename($page);
// 如果四种语言都没发现,表明sessid是人为输入,且错,则什么也不显示(admin除外)
$lan=strtolower($lan);
if ($modulename=='admin') $lan='chn' ;
if (($lan!="chn")and($lan!="eng")and($lan!="fr")and($lan!="jap")) exit ;
if ($HTTP_POST_VARS) { $vars = $HTTP_POST_VARS; }
elseif($HTTP_GET_VARS ) { $vars = $HTTP_GET_VARS ; }
if (!isset($module[$modulename][$pagename][$lan])) {
$page='error/notfound'; // 防人为输入page且错,显示出错页。
$modulename = dirname($page);
$pagename = basename($page);
}
//获得该page需要的权限
$page_auth_list = get_page_auth($page);
//检测当前user是否具有权限,没有则进入登录界面
if (!$perm->check($page_auth_list)) {
if ($modulename=='admin') $page='admin/login' ;
if ($modulename=='member') $page='member/login' ;
$modulename = dirname($page);
$pagename = basename($page);
}
$lan=strtolower($lan);
//以模块为中心,分别取它的头(header)、身(body)、尾(footer)
$hf_lan_url = MODULE_TEMPLET_DIR.'lan/'; // Header和Footer所用的语言内容
$header_url = MODULE_TEMPLET_DIR; // 指定某个模块用的是哪一个header
$body_lan_url = MODULE_DIR.$modulename."/lan/"; // Load language file for this module
$body_func_url= MODULE_DIR.$modulename."/function/"; // Load language file for this module
$body_url = MODULE_DIR.$modulename.'/'; //
$footer_url = MODULE_TEMPLET_DIR; //
include($hf_lan_url .'lan_'.$lan.'.inc');
include($header_url .$module[$modulename]['header'][$lan]); // Load Header
include($body_lan_url .$module[$modulename]['lan'][$lan]); // 记在模块目录地下用于节省系统资源
if (isset($module[$modulename]['function'])) {
include($body_func_url.$module[$modulename]['function']); // 本模块所调用的函数
}
include($body_url .$module[$modulename][$pagename][$lan]); // Load Body(语言和程序)
include($footer_url .$module[$modulename]['footer'][$lan]); // Load footer
//$module三维数组中header,lan,footer,function是固定的,$pagename是变化的主体
$sess->save();
?>
$end_time=gettime();
$escape_time=$end_time-$beg_time;
// require("debug_vars.inc");
?>
if ($vars['full']['photocontent']!='') $vars['full']['photocontent']='';
if ($vars['thumb']['photocontent']!='') $vars['thumb']['photocontent']='';
$debug_vars['Position of Debug']=
'asianhats\main\debug_vars.inc (.\main\index.php3 Get)';
$debug_vars['$vars'] = $vars;
$debug_vars['$HTTP_POST_VARS'] = $HTTP_POST_VARS;
$debug_vars['$HTTP_GET_VARS'] = $HTTP_GET_VARS;
// $debug_vars['member_query_reg'] =$member_query_reg ; //记录$member_query_reg
// $debug_vars['order'] = $order ;
// $debug_vars['order_way'] = $order_way ; //记录排序方式
// $debug_vars['$sess_id'] = $sess->sessid;
// $debug_vars['$sess_sdata'] = $sess->sdata;
// $debug_vars['$HTTP_COOKIE_VARS'] = $HTTP_COOKIE_VARS;
// $debug_vars['$perm'] = $perm;
// $debug_vars['$auth'] = $auth;
$debug_vars['$escape_time']= $escape_time;
// $debug_vars['$sess'] = $sess;
//ksort($debug_vars);
//echo dump_array($debug_vars,70);
?>