dede ShowMsg

服务错误提示,成功操作提示等

Java代码   收藏代码
  1. function ShowMsg($msg,$gourl,$onlymsg=0,$limittime=0, $site_desc="系统提示信息")  
  2. {  
  3.     if(empty($GLOBALS['cfg_phpurl'])) $GLOBALS['cfg_phpurl'] = '..';  
  4.   
  5.     $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";  
  6.     $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";  
  7.     $htmlfoot  = "</script>\r\n</center>\r\n</body>\r\n</html>\r\n";  
  8.   
  9.     $litime = ($limittime==0 ? 1000 : $limittime);  
  10.     $func = '';  
  11.   
  12.     if($gourl=='-1')  
  13.     {  
  14.         if($limittime==0) $litime = 5000;  
  15.         $gourl = "javascript:history.go(-1);";  
  16.     }  
  17.   
  18.     if($gourl=='' || $onlymsg==1)  
  19.     {  
  20.         $msg = "<script>alert(\"".str_replace("\"","“",$msg)."\");</script>";  
  21.     }  
  22.     else  
  23.     {  
  24.         //当网址为:close::objname 时, 关闭父框架的id=objname元素  
  25.         if(eregi('close::',$gourl))  
  26.         {  
  27.             $tgobj = trim(eregi_replace('close::''', $gourl));  
  28.             $gourl = 'javascript:;';  
  29.             $func .= "window.parent.document.getElementById('{$tgobj}').style.display='none';\r\n";  
  30.         }  
  31.           
  32.         $func .= "      var pgo=0;  
  33.       function JumpUrl(){  
  34.         if(pgo==0){ location='$gourl'; pgo=1; }  
  35.       }\r\n";  
  36.         $rmsg = $func;  
  37.         $rmsg .= "document.write(\"<br /><div style='width:450px;padding:0px;border:1px solid #D1DDAA;'>";  
  38.         $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";  
  39.         $rmsg .= "document.write(\"<div style='height:130px;font-size:10pt;background:#ffffff'><br />\");\r\n";  
  40.         $rmsg .= "document.write(\"".str_replace("\"","“",$msg)."\");\r\n";  
  41.         $rmsg .= "document.write(\"";  
  42.           
  43.         if($onlymsg==0)  
  44.         {  
  45.             if( $gourl != 'javascript:;' && $gourl != '')  
  46.             {  
  47.                 $rmsg .= "<br /><a href='{$gourl}'>如果你的浏览器没反应,请点击这里...</a>";  
  48.                 $rmsg .= "<br/></div>\");\r\n";  
  49.                 $rmsg .= "setTimeout('JumpUrl()',$litime);";  
  50.             }  
  51.             else  
  52.             {  
  53.                 $rmsg .= "<br/></div>\");\r\n";  
  54.             }  
  55.         }  
  56.         else  
  57.         {  
  58.             $rmsg .= "<br/><br/></div>\");\r\n";  
  59.         }  
  60.         $msg  = $htmlhead.$rmsg.$htmlfoot;  
  61.     }  
  62.     echo $msg;  
  63. }  
  64.   
  65. function ShowMsg1($msg,$gourl,$onlymsg=0,$limittime=0, $site_desc="系统提示信息"){  
  66.     if(empty($GLOBALS['cfg_phpurl'])) $GLOBALS['cfg_phpurl'] = '..';  
  67.   
  68.     $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";  
  69.     $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";  
  70.     $htmlfoot  = "</script>\r\n</center>\r\n</body>\r\n</html>\r\n";  
  71.   
  72.     $litime = ($limittime==0 ? 1000 : $limittime);  
  73.     $func = '';  
  74.   
  75.     if($gourl=='-1'){  
  76.         if($limittime==0) $litime = 5000;  
  77.         $gourl = "javascript:history.go(-1);";  
  78.     }  
  79.   
  80.     if($gourl=='' || $onlymsg==1){  
  81.         $msg = "<script>alert(\"".str_replace("\"","“",$msg)."\");</script>";  
  82.     }else{  
  83.   //当网址为:close::objname 时, 关闭父框架的id=objname元素  
  84.         if(eregi('close::',$gourl))  
  85.         {  
  86.             $tgobj = trim(eregi_replace('close::''', $gourl));  
  87.             $gourl = 'javascript:;';  
  88.             $func .= "window.parent.document.getElementById('{$tgobj}').style.display='none';\r\n";  
  89.         }  
  90.     
  91.         $func .= " var pgo=0;  
  92.       function JumpUrl(){  
  93.         if(pgo==0){ location='$gourl'; pgo=1; }  
  94.       }\r\n";  
  95.         $rmsg = $func;  
  96.         $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";  
  97.         $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";  
  98.         $rmsg .= "document.write(\"".str_replace("\"","“",$msg)."\");\r\n";  
  99.         $rmsg .= "document.write(\"";  
  100.         if($onlymsg==0){  
  101.             if( $gourl != 'javascript:;' && $gourl != ''){  
  102.                 $rmsg .= "<br /><a style='COLOR: #1f376d;' href='{$gourl}'>如果你的浏览器没反应,请点击这里...</a>";  
  103.                 $rmsg .= "<br/></div>\");\r\n";  
  104.                 $rmsg .= "setTimeout('JumpUrl()',$litime);";  
  105.             }else{  
  106.             $rmsg .= "<br/></div>\");\r\n";  
  107.            }  
  108.         }else{  
  109.             $rmsg .= "<br/><br/></div>\");\r\n";  
  110.         }  
  111.         $msg  = $htmlhead.$rmsg.$htmlfoot;  
  112.     }  
  113.     echo $msg;  
  114. }  

ShowMsg("您已经是本圈管理员!","-1");die;

ShowMsg("您不是该圈子正式会员,无法申请管理员!","group.php?id=$id");die;

ShowMsg("主题已改变!", '-1',0,'1500');die;

ShowMsg('找不到所需要的软件资源!', 'JavaScript:;');die;

ShowMsg("谢谢您对本网站的支持,我们会尽快处理您的建议!","javascript:window.close();");die;

 

ShowMsg('验证码不正确!','');

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值