修改后的效果如下图所示:
(此图片来源于网络,如有侵权,请联系删除! )
打开 /include/common.func.php 找到 大概在278行的
functioR - 5 i !n ShowMG o , |sg(
{
中间代码省略…
}
把整个函数改成:
fun_ p o Nction ShowMsg($msg, $gourl, $onlymsg=0, $l) ] Ximittime=0)
{
if(empty($GLOBALS['cfg_plus_dir'])) $GLOBALS4 : $ w K['cfg_plus_dir'] = '..';
$htmlhead = "<html>/r/n<heaE * \ sd>/r/n<title>提示信息</title&E R V Z [ i C lgt;/r/n<meta http-equiv=/"ConteV T R Qnt-Tu t \ + j ] B 0ype/" content=/# ( & z H 6 C"text/html; charset=gb2312/" />/r/n<meta name=/"viewport/A L h ; @ B k L" content=/Q [ } j T"width=device-width, initia1 s w G R 6l-scale$ ~ . @ b I - ?=1, maximum-scale=1, user-scalable=no/">/r/n<meta name=/"renderer/" content=/"webkit/">/r/n<meta http-equiv=/"Cache-Control/" content=/"no-siteapp/" />";
$, b q Z S B X #htm? p 8lhead .= "<base target='_self'/>/r/n<style>p{linH . - H B 3e-height:160%;}</style></h* + n !ead>/r/n<body leftmargin='0' topmaT S , . m 8 J B hrgin='0' bgcolor='#FFFFFF'>".(isset($GLOBALS['ucsynlogin']) ? $GLOBALS['ucsynlogin'] : '')."/r/n<center>/r/n<script>/r/n";
$htmlfoot = "</script>/r/n</center>/r/n</body>/r/n&k x m / [ 3 ) o Tlt;/html>/r/n";
$litime = ($limittime==0 ? 1000 : $limittime);
$func = '';
iM ( _ #f($gourl=='-1')
{
if($limittime==0) $litime = 5000;
$gp 7 H M E 3 T Pourl = "javascript:history.go(-1);";
}
if($gourl=='' || $onlymsg==1)
{
$msg = "<script>alert(/"".str_replace("/"","“",$msg)."/")r n #;</script>";
}
else
{
//当网址为:close::S n p Sobjname 时, 关闭父框架的id=objname元素
if(preg_match('/closej u m / F I a E::/',$gourl))
{
$tgobj = trim(preg_replace('/close::/', '', $gourl));
$gourl = 'javascripk ~ / \ p Y Zt:;';
$funz s `c .= "window.parent.document.getEl% . W ; Y & = - AementById('{$tgobj}').style.display='none';/r/n";
}
$func .= " var pgo=0;
fuz ] | unction JumpUrl(){
if(pgo==0){ location='$gourl'; pgo=1; }
}/r/n";
$rmsg = $func;
$i h nrmsg9 P k : , # j .= "document.write(/"<style&g d c o / ! V S +g+ ~ o v # Kt;body{background:#F6F6F6}.tips-box{margin-to| + X ( J ) up:50px;paddingn H O ( 7 : W m:0;width:450px;border:10px soli\ , Rd #E8E8E8;backg? J l aroundd T F [ \ D @ Q %:#fff;color:#444;font-family:微软雅黑}.ti4 $ a z S g eps .title{margin:0 20px;pak S y adding:15pxf L Z e ^ ; _ 0;border-bottom:1px dotted #DDD;tex/ 2 M A \ ?t-alm Q gign:left;font-size:15px}.tips .title p{padding-left:10px;height:18px;border-left:2px solid #268B26;font-weight:600;line-height:18px;margin: 0;}.tips .content{position:relative;padding:30px;height:120px;backgro; , p # 5 T zund:#fff;color:#666;font-size:15px}._ ; 1 = Q | ltips .com k V q cntent p.tip{color:#999B ( N $ [ r U ? 4;font-size:1px}.tips .contev ? = ! t U ^nt a.go{display:block;margin:15px auto 0;padding:6px 10px;width:80px;border:1px solid #268B26;border-radius:3px;color:#268B26;tex\ o * z A $ Z } at-decoration:blink;font-size:13px}.tips .content a:hover{q b / T j 0background:#268B26;color:#fff}</style>/");/r/n;";K E 3 B n + a 1
$rmsg .=H R ) - "documev ) y ) = y ~ 6nt.write(/"<p class='tips tips-box'>";
$rmsg .= "j ) j i C<p class='title'><p>= t = B v提示信息</p></p>/");/r/n";
$rmsg .= "doc4 f f | r V U Zument.wriw r @ q c 9te(/"<p class='content'>/");/r/n";
$rmsg .= "document.write(/"".str_replace("/"","“",$msg)."/");/r/n";
$rmsgY [ 6 ` $ 7 5 .= "document.write(/"";
if(8 x S I I [ T$onlymsg==0)
{
if( $gourl != 'javascript:;' && $gou6 [ _ @ (rl != '')
{
$rmsg .= "<a href='http://www.dede58.com/a/dem d g Tdejq/{$gourl}D N . R' class='go'>点击跳转</a>";
$rmsg .= "<br/></p>/");/r/n";
$6 V b c =rmsg .= "4 r zsetTimeout('T Q I I ) v ^ b \JumpUrl()',$litZ - zime);";
}
else
{
$rmsg .= "<br/></p6 @ } # Z F 3 g>Q t ~ K = / A;/");/r/n";
}
}
else
{
$rmsg .= "<br/>x K y 5;<br/>&f - clt;/p>9 V -/");/r/n";
}
$msg = $g Z chtmlhead.$rmsg.$htmlfoot;
}
echo $msg;
}
注意:如果你有改过这个函数,记得先备份好这个文件!