服务错误提示,成功操作提示等
function ShowMsg($msg,$gourl,$onlymsg=0,$limittime=0, $site_desc="系统提示信息") { if(empty($GLOBALS['cfg_phpurl'])) $GLOBALS['cfg_phpurl'] = '..'; $htmlhead = "<html>\r\n<head>\r\n<title>".$site_desc."</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\" />\r\n"; $htmlhead .= "<base target='_self'/>\r\n<style>div{line-height:160%;}</style></head>\r\n<body leftmargin='0' topmargin='0'>".(isset($GLOBALS['ucsynlogin']) ? $GLOBALS['ucsynlogin'] : '')."\r\n<center>\r\n<script>\r\n"; $htmlfoot = "</script>\r\n</center>\r\n</body>\r\n</html>\r\n"; $litime = ($limittime==0 ? 1000 : $limittime); $func = ''; if($gourl=='-1') { if($limittime==0) $litime = 5000; $gourl = "javascript:history.go(-1);"; } if($gourl=='' || $onlymsg==1) { $msg = "<script>alert(\"".str_replace("\"","“",$msg)."\");</script>"; } else { //当网址为:close::objname 时, 关闭父框架的id=objname元素 if(eregi('close::',$gourl)) { $tgobj = trim(eregi_replace('close::', '', $gourl)); $gourl = 'javascript:;'; $func .= "window.parent.document.getElementById('{$tgobj}').style.display='none';\r\n"; } $func .= " var pgo=0; function JumpUrl(){ if(pgo==0){ location='$gourl'; pgo=1; } }\r\n"; $rmsg = $func; $rmsg .= "document.write(\"<br /><div style='width:450px;padding:0px;border:1px solid #D1DDAA;'>"; $rmsg .= "<div style='padding:6px;font-size:12px;border-bottom:1px solid #D1DDAA;background:#DBEEBD url({$GLOBALS['cfg_phpurl']}/img/wbg.gif)';'><b>".$site_desc."!</b></div>\");\r\n"; $rmsg .= "document.write(\"<div style='height:130px;font-size:10pt;background:#ffffff'><br />\");\r\n"; $rmsg .= "document.write(\"".str_replace("\"","“",$msg)."\");\r\n"; $rmsg .= "document.write(\""; if($onlymsg==0) { if( $gourl != 'javascript:;' && $gourl != '') { $rmsg .= "<br /><a href='{$gourl}'>如果你的浏览器没反应,请点击这里...</a>"; $rmsg .= "<br/></div>\");\r\n"; $rmsg .= "setTimeout('JumpUrl()',$litime);"; } else { $rmsg .= "<br/></div>\");\r\n"; } } else { $rmsg .= "<br/><br/></div>\");\r\n"; } $msg = $htmlhead.$rmsg.$htmlfoot; } echo $msg; } function ShowMsg1($msg,$gourl,$onlymsg=0,$limittime=0, $site_desc="系统提示信息"){ if(empty($GLOBALS['cfg_phpurl'])) $GLOBALS['cfg_phpurl'] = '..'; $htmlhead = "<html>\r\n<head>\r\n<title>".$site_desc."</title>\r \n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\" />\r\n"; $htmlhead .= "<base target='_self'/>\r\n<style>div{line-height:160%;}</style></head>\r\n<body leftmargin='0' topmargin='0'>".(isset($GLOBALS['ucsynlogin']) ? $GLOBALS['ucsynlogin'] : '')."\r\n<center>\r\n<script>\r\n"; $htmlfoot = "</script>\r\n</center>\r\n</body>\r\n</html>\r\n"; $litime = ($limittime==0 ? 1000 : $limittime); $func = ''; if($gourl=='-1'){ if($limittime==0) $litime = 5000; $gourl = "javascript:history.go(-1);"; } if($gourl=='' || $onlymsg==1){ $msg = "<script>alert(\"".str_replace("\"","“",$msg)."\");</script>"; }else{ //当网址为:close::objname 时, 关闭父框架的id=objname元素 if(eregi('close::',$gourl)) { $tgobj = trim(eregi_replace('close::', '', $gourl)); $gourl = 'javascript:;'; $func .= "window.parent.document.getElementById('{$tgobj}').style.display='none';\r\n"; } $func .= " var pgo=0; function JumpUrl(){ if(pgo==0){ location='$gourl'; pgo=1; } }\r\n"; $rmsg = $func; $rmsg .= "document.write(\"<div style='width:400px;border: #aaccee 1px solid; FONT-SIZE: 12px; COLOR: #1f376d; HEIGHT: 28px; line-height:28px; text-align:left; border-width:1px 1px 0 1px;background:#EBF3FB url(http://www.mobantianxia.cn/images/bg.gif) no-repeat 5px -318px; text-indent:30px; margin-top:100px;'>".$site_desc."!</div>\");\r\n"; $rmsg .= "document.write(\"<div style='text-align:left; line-height:25px;width:400px;height:100;font-size:12px;border:1px solid #B8D4F1;background-color:#fff;border-width:0 1px 1px 1px;COLOR: #1f376d;'><span style='float:left;'><img src='http://www.mobantianxia.cn/images/ts.gif'></span><br />\");\r\n"; $rmsg .= "document.write(\"".str_replace("\"","“",$msg)."\");\r\n"; $rmsg .= "document.write(\""; if($onlymsg==0){ if( $gourl != 'javascript:;' && $gourl != ''){ $rmsg .= "<br /><a style='COLOR: #1f376d;' href='{$gourl}'>如果你的浏览器没反应,请点击这里...</a>"; $rmsg .= "<br/></div>\");\r\n"; $rmsg .= "setTimeout('JumpUrl()',$litime);"; }else{ $rmsg .= "<br/></div>\");\r\n"; } }else{ $rmsg .= "<br/><br/></div>\");\r\n"; } $msg = $htmlhead.$rmsg.$htmlfoot; } echo $msg; }
ShowMsg("您已经是本圈管理员!","-1");die;
ShowMsg("您不是该圈子正式会员,无法申请管理员!","group.php?id=$id");die;
ShowMsg("主题已改变!", '-1',0,'1500');die;
ShowMsg('找不到所需要的软件资源!', 'javascript:;');die;
ShowMsg("谢谢您对本网站的支持,我们会尽快处理您的建议!","javascript:window.close();");die;
ShowMsg('验证码不正确!','');