花魁直播高品质美女在线视频互动社区 - 花魁直播官方版

 歡迎來(lái)到素材無(wú)憂網(wǎng),按 + 收藏我們
登錄 注冊(cè) 退出 找回密碼

dedecms織夢(mèng)提示信息提示框美化的代碼教程

時(shí)間: 2018-11-19 09:26 閱讀: 作者:素材無(wú)憂網(wǎng)

打開(kāi) includecommon.func.php 找到
function ShowMsg(
{
    中間代碼省略...
}
整體都改為
查看源碼打印代碼幫助


function ShowMsg($msg, $gourl, $onlymsg=0, $limittime=0)
{
    if(empty($GLOBALS['cfg_plus_dir'])) $GLOBALS['cfg_plus_dir'] = '..';
 
    $htmlhead  = "<html>rn<head>rn<title>提示信息</title>rn<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />rn<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">rn<meta name="renderer" content="webkit">rn<meta http-equiv="Cache-Control" content="no-siteapp" />";
    $htmlhead .= "<base target='_self'/>rn<style>div{line-height:160%;}</style></head>rn<body leftmargin='0' topmargin='0' bgcolor='#FFFFFF'>".(isset($GLOBALS['ucsynlogin']) ? $GLOBALS['ucsynlogin'] : '')."rn<center>rn<script>rn";
    $htmlfoot  = "</script>rn</center>rn</body>rn</html>rn";
 
    $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';rn";
        }
 
        $func .= "      var pgo=0;
      function JumpUrl(){
        if(pgo==0){ location='$gourl'; pgo=1; }
      }rn";
        $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>");rn;";
        $rmsg .= "document.write("<div class='tips tips-box'>";
        $rmsg .= "<div class='title'><p>提示信息</p></div>");rn";
        $rmsg .= "document.write("<div class='content'>");rn";
        $rmsg .= "document.write("".str_replace(""",""",$msg)."");rn";
        $rmsg .= "document.write("";
 
        if($onlymsg==0)
        {
            if( $gourl != 'javascript:;' && $gourl != '')
            {
                $rmsg .= "<a href='{$gourl}' class='go'>點(diǎn)擊跳轉(zhuǎn)</a>";
                $rmsg .= "<br/></div>");rn";
                $rmsg .= "setTimeout('JumpUrl()',$litime);";
            }
            else
            {
                $rmsg .= "<br/></div>");rn";
            }
        }
        else
        {
            $rmsg .= "<br/><br/></div>");rn";
        }
        $msg  = $htmlhead.$rmsg.$htmlfoot;
    }
    echo $msg;
}

版權(quán)聲明: 本站資源均來(lái)自互聯(lián)網(wǎng)或會(huì)員發(fā)布,如果侵犯了您的權(quán)益請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)刪除!謝謝!

轉(zhuǎn)載請(qǐng)注明: dedecms織夢(mèng)提示信息提示框美化的代碼教程

標(biāo)簽:  
相關(guān)文章
模板推薦