概述
//导入语言包
function LoadLang($file){
global $ecms_config;
return '../data/language/'.$ecms_config['sets']['elang'].'/'.$file;
//return '../data/language/gb/'.$file;
}
function printerror($error="",$gotourl="",$ecms=0,$noautourl=0,$novar=0){
global $empire,$editor,$public_r,$ecms_config;
if($editor==1){
$a="../";
}elseif($editor==2){
$a="../../";
}elseif($editor==3){
$a="../../../";
}else{
$a="";
}
if($ecms==1||$ecms==9){
$a=ECMS_PATH."e/data/";
}
if(strstr($gotourl,"(")||empty($gotourl)){
if(strstr($gotourl,"(-2")){
$gotourl_js="history.go(-2)";
$gotourl="javascript:history.go(-2)";
}else{
$gotourl_js="history:go(-1)";
$gotourl="javascript:history.go(-1)";
}
}else{
$gotourl_js='self.location.href="'.$gotourl.'";';
}
if(empty($error)){
$error="DbError";
}
if($ecms==9)//前台弹出对话框
{
//包含前台信息提示语言包
//@include $a."../data/language/gb/pub/q_message.php";
@include $a.LoadLang("pub/q_message.php");
$error=empty($novar)?$qmessage_r[$error]:$error;
echo '";
db_close();
$empire=null;
exit();
}
elseif($ecms==8)//后台弹出对话框
{
//包含后台信息提示语言包
//@include $a."../data/language/gb/pub/message.php";
@include $a.LoadLang("pub/message.php");
$error=empty($novar)?$message_r[$error]:$error;
echo '";
db_close();
$empire=null;
exit();
}
elseif($ecms==7)//前台弹出对话框并关闭窗口
{
@include $a.LoadLang("pub/q_message.php");
$error=empty($novar)?$qmessage_r[$error]:$error;
echo '';
db_close();
$empire=null;
exit();
}
elseif($ecms==6)//后台弹出对话框并关闭窗口
{
@include $a.LoadLang("pub/message.php");
$error=empty($novar)?$message_r[$error]:$error;
echo'';
db_close();
$empire=null;
exit();
}
elseif($ecms==0)
{
@include $a.LoadLang("pub/message.php");
$error=empty($novar)?$message_r[$error]:$error;
@include($a."message.php");
}
else
{
@include $a.LoadLang("pub/q_message.php");
$error=empty($novar)?$qmessage_r[$error]:$error;
@include($a."../message/index.php");
}
db_close();
$empire=null;
exit();
}
?>
最后
以上就是复杂板栗为你收集整理的printerror php,帝国cms错误提示printerror()函数代码注释-网站程序网的全部内容,希望文章能够帮你解决printerror php,帝国cms错误提示printerror()函数代码注释-网站程序网所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复