global.php
资源名称:BBWPS.rar [点击查看]
上传用户:yttaitong
上传日期:2009-05-10
资源大小:128k
文件大小:3k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
PHP
- <?PHP
- /*
- [BBWPS!] (C)2006-2010 小蜜蜂版权所有.
- This is NOT a freeware, use is subject to license terms
- 时间:2007年12月
- 描述:打印公共模板
- */
- error_reporting(0);
- require_once("../class/template_class.php");
- require_once("../class/mysql_class.php");
- require_once("../class/ParsePermit_class.php");
- require_once("../config.php");
- require_once("../function/function.php");
- require_once("../function/func_global.php");
- require_once("../function/checkModuleSession.php");
- require_once("../config/module.php");
- require_once("../config/baseCheckCode.php");
- $author=$loginArray["bbwps_user"];
- $prefixGlobal=$prefix;
- $status=$ischeck;
- $db=new DB($hostname,$username,$password,$database);
- $p=new Template("template/");
- $p->set_file("handle_header","index_header.html");
- $p->parse("header","handle_header");
- $p->set_file("handle_footer","index_footer.html");
- $p->set_var("version",$parameterArray["version"]);
- $p->parse("footer","handle_footer");
- $p->set_file("handleUserModule","user_module.html");
- $p->set_block("handleUserModule","user_module_menu_row","row");
- $bbwps_user =$_COOKIE["bbwps_user"];
- $bbwps_pwd =$_COOKIE["bbwps_pwd"];
- $bbwps_check =$_COOKIE["bbwps_check"];
- $bbwps_ip =$_COOKIE["bbwps_ip"];
- $authortype =$_COOKIE['bbwps_regctrl'];
- $bbwps_permit=$_COOKIE["bbwps_permit"];
- $bbwps_uid =$_COOKIE["bbwps_uid"];
- $bbwps_module=$_COOKIE["bbwps_module"];
- $userModuleArray=unserialize(base64_decode($_COOKIE["bbwps_module"]));
- foreach ($userModuleArray as $key=>$value){
- $userModuleArray[$key]="bbwps_module_".$value;
- }
- foreach ($moduleArray as $key=>$module){
- if($module["isstart"]=="1"&&$module["isshow"]=="1"){
- if(in_array($key,$userModuleArray)){
- if(file_exists("../config/".md5($module["idns"].$authortype).".php")){
- include_once("../config/".md5($module["idns"].$authortype).".php");
- }
- else{
- $permitURL=$module["idns"]."user/permit.php?bbwps_regctrl=$authortype&bbwps_user=$bbwps_user&bbwps_permit=$bbwps_permit";
- $permitObj=new PermitParse($permitURL);
- $permitArray=$permitObj->GetItems();
- if($permitArray){
- $permitArrStr.="<?PHPn";
- foreach ($permitArray as $permit){
- $permitArrStr.="$permitArray[]=array('title'=>'{$permit["title"]}','link'=>'{$permit["link"]}');n";
- }
- $fp=fopen("../config/".md5($module["idns"].$authortype).".php","w");
- fwrite($fp,$permitArrStr);
- fclose($fp);
- }
- unset($permitArrStr);
- }
- $p->set_var("row",null);
- foreach ($permitArray as $permit){
- $p->set_var($permit);
- $p->parse("row","user_module_menu_row",true);
- }
- $p->set_var("module_id",$module["id"]);
- $p->set_var("moduleName",$module["name"]);
- $p->parse("user_module","handleUserModule",true);
- unset($permitArray);
- }
- }
- }
- $p->set_file("handleBase","user_base_menu.html");
- $p->set_block("handleBase","user_base_menu_row","ubmr");
- $permitURL=$baseIdns."/user/permit.php";
- $permitObj=new PermitParse($permitURL);
- $permitArray=$permitObj->GetItems();
- foreach ($permitArray as $permit){
- $p->set_var($permit);
- $p->parse("ubmr","user_base_menu_row",true);
- }
- $p->parse("baseMenu_show","handleBase");
- $p->set_var("templatePath","template");
- $p->set_var("basePath",$basePath);
- $p->set_var("baseGetPath","http://$host".$installPath."/user/usermenu.php?ModuleID=");
- ?>