当前位置:网站首页>织梦提示信息提示框美化
织梦提示信息提示框美化
2022-08-02 17:30:00 【网站建设影子】

教程如下
打开 /include/common.func.php 找到 大概在278行的
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
{
//当网址为:close::objname 时, 关闭父框架的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 #268B26;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 #268B26;border-radius:3px;color:#268B26;text-decoration:blink;font-size:13px}.tips .content a:hover{background:#268B26;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'>点击跳转</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;
}注意:如果你有改过这个函数,记得备份一个你的再尝试!
边栏推荐
- 边界访问的空间权限
- 融云「 IM 进阶实战高手课」系列直播上线
- executeScript异步执行的时候没有返回值的原因
- SQL Statement Basics
- 字节面试官狂问我:你没有高并发、性能调优经验,为什么录取你?
- 「全球数字经济大会」登陆 N 世界,融云提供通信云服务支持
- Google Earth Engine APP—— 一个不用写代码可以直接下载相应区域的1984-2021年的GIF遥感影像动态图
- 小程序毕设作品之微信体育馆预约小程序毕业设计成品(6)开题答辩PPT
- Several common cross-domain solutions
- Kubernetes:(七)优化大法(江湖失传已久的武林秘籍)
猜你喜欢

Simulink脚本自动创建Autosar Parameter Port及Mapping

MySQL常用的日期时间函数

潮玩的“第二春”,在哪?

融云「 IM 进阶实战高手课」系列直播上线
![[C Language Brush Questions] Three Questions for Getting Started with Pointers | String Length, String Copy, Two Number Swap](/img/40/0bf9f887051954131b346ece0765d4.png)
[C Language Brush Questions] Three Questions for Getting Started with Pointers | String Length, String Copy, Two Number Swap

谁抢走了华大基因的生意?

Smart Contract Security - delegatecall (1)

阿波罗 planning代码-modules\planning\lattice\trajectory_generation\PiecewiseBrakingTrajectoryGenerator类详解

租房小程序自动定位城市

Flink SQL builds real-time data warehouse DWD layer
随机推荐
Informatica旗下PowerCenter的元数据库解析
Common software silent installation parameters
Mysql应用安装后找不到my.ini文件
NoSQL之redis缓存雪崩、穿透、击穿概念解决办法
AI+医疗:使用神经网络进行医学影像识别分析
LeetCode·每日一题·
When Oracle analyzes the archive log content, it finds many nulls?
攻防世界-favorite_number
Nacos interview questions
H5网页播放器EasyPlayer.js播放器界面的加载效果无法消失是什么原因?
Continuous integration (4) Jenkins configuration alarm mechanism
全面认识二极管,一篇文章就够了
创新云集技术咖,工赋汇聚实战派:2022工赋开发者峰会
租房小程序自动定位城市
The days of patching are more difficult than the days of writing code
什么是实时流引擎?
golang源码分析(4):select
npm install 报错问题解决合集
Numpy those things
小程序毕设作品之微信体育馆预约小程序毕业设计成品(6)开题答辩PPT