dedecms織夢提示信息提示框美化
打開 \include\common.func.php 找到
function ShowMsg(
{
中間代碼省略...
}
|
整體都改為
function ShowMsg($msg, $gourl, $onlymsg=0, $limittime=0)
{
if(empty($GLOBALS['cfg_plus_dir'])) $GLOBALS['cfg_plus_dir'] = '..';
$htmlhead = "<html>\r\n<head>\r\n<title>提示信息</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\" />\r\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no\">\r\n<meta name=\"renderer\" content=\"webkit\">\r\n<meta http-equiv=\"Cache-Control\" content=\"no-siteapp\" />";
$htmlhead .= "<base target='_self'/>\r\n<style>div{line-height:160%;}</style></head>\r\n<body leftmargin='0' topmargin='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</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
{
//當(dāng)網(wǎng)址為:close::objname 時(shí), 關(guān)閉父框架的id=objname元素
if(preg_match('/close::/',$gourl))
{
$tgobj = trim(preg_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(\"<style>body{background:#F6F6F6}.tips-box{margin-top:50px;padding:0;width:450px;border:10px solid #E8E8E8;background:#fff;color:#444;font-family:微軟雅黑}.tips .title{margin:0 20px;padding:15px 0;border-bottom:1px dotted #DDD;text-align:left;font-size:15px}.tips .title p{padding-left:10px;height:18px;border-left:2px solid #009688;font-weight:600;line-height:18px;margin: 0;}.tips .content{position:relative;padding:30px;height:120px;background:#fff;color:#666;font-size:15px}.tips .content p.tip{color:#999;font-size:1px}.tips .content a.go{display:block;margin:15px auto 0;padding:6px 10px;width:80px;border:1px solid #019688;border-radius:3px;color:#1AA094;text-decoration:blink;font-size:13px}.tips .content a:hover{background:#1AA094;color:#fff}</style>\");\r\n;";
$rmsg .= "document.write(\"<div class='tips tips-box'>";
$rmsg .= "<div class='title'><p>提示信息</p></div>\");\r\n";
$rmsg .= "document.write(\"<div class='content'>\");\r\n";
$rmsg .= "document.write(\"".str_replace("\"","“",$msg)."\");\r\n";
$rmsg .= "document.write(\"";
if($onlymsg==0)
{
if( $gourl != 'javascript:;' && $gourl != '')
{
$rmsg .= "<a href='{$gourl}' class='go'>點(diǎn)擊跳轉(zhuǎn)</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;
}
|
上一篇:dedecms織夢欄目靜態(tài)生成后分頁URL鏈接絕對路徑實(shí)現(xiàn)方法
欄 目:dedecms
本文標(biāo)題:dedecms織夢提示信息提示框美化
本文地址:http://mengdiqiu.com.cn/a1/dedecms/13779.html
您可能感興趣的文章
- 08-05Dedecms文件目錄結(jié)構(gòu)解說(能知道織夢每個(gè)文件有什么用)
- 08-05Dedecms5.7版ckeditor網(wǎng)頁編輯器添加中文字體
- 08-05織夢DedeCMS獲取當(dāng)前欄目文章數(shù)量
- 08-05織夢模板如何添加和調(diào)用自定義字段的方法
- 08-05DedeCMS后臺模塊列表顯示空白的解決辦法
- 08-05DedeCMS自定義字段圖片調(diào)用的問題{dede:img ...}解決方法
- 08-05織夢DedeCMS調(diào)用顯示discuz里面主題的方法
- 08-05限制織夢會(huì)員每天投稿數(shù)量方法
- 08-05常用的織夢dedecms安全設(shè)置集合整理
- 08-05織夢教程:后臺編輯器添加中文字體方法