<!DOCTYPE html> <html lang="zh-cmn-Hans"> <head> <meta charset='utf-8'> <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=1"> <title>标题</title> <meta name="keywords" content="关键词"/> <meta name="description" content="不超过150个字符"/> <meta name="author" content="大路, me@dalu.info"/> <link rel="icon" href="/favicon.ico" type="image/x-icon" /> 禁止缓存 <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> <meta http-equiv="Pragma" content="no-cache" /> <meta http-equiv="Expires" content="0" /> <style type="text/css"> a { text-decoration: none; color: # } </style> <link href="/skin/default/css/style.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="/skin/default/js/tabs.js"></script> </head> <body> 居中图片 <div align="center"><img src="/qun7.jpg" width="70" height="50" /></div> 横线 <hr style="height:1px;border:none;border-top:1px dashed #ccc;" /> 链接按钮 <a style="padding: 3px 6px;margin-left:10px;color:#fff;font-size: 14px;background: #0068d7;"href="dalu.info" target="_blank">dalu.info</a> 输入框 <input name='title' type='text' value='' style="height: 30px; width: 100%;" placeholder="填写你的邮箱或手机号以方便回复您(*)"> <textarea name='saytext' style="height: 70px; width: 100%;" placeholder="此处填写您的留言内容(*)"></textarea> 表格 <table width="100%" border="0" cellspacing="0" cellpadding="5" bordercolor="#D9ECFF" bgcolor="#FFFFE1"> <tr> <td height="30" align="left" valign="top" bgcolor="#008ED2">&nbsp;1<a href="/" onclick="return confirm('确认要打开?');"><span style="font-size:14px;color:#FFFFFF;text-decoration:none;">注册通通</span></a></td> </tr> <tr> <td align="center" valign="middle" bgcolor="#0097DF">2</td> </tr> <tr> <td align="right" valign="bottom" bgcolor="#009FEC">3</td> </tr> <tr> <td bgcolor="#59C9FF">4</td> </tr> <tr> <td bgcolor="#7DD5FF">5</td> </tr> <tr> <td bgcolor="#AEE4FF">6</td> </tr> <tr> <td colspan="2" bgcolor="#CEEFFF">7合并表格</td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="5"> <tr> <td bgcolor="#FFFF80">11黄</td> <td bgcolor="#FF0000">22红</td> <td bgcolor="#008080">33绿</td> <td bgcolor="#808080">44灰</td> </tr> </table> <span style="color:#FFFFFF;">白色</span> <span style="color:#009900;">绿色</span> <span style="color:#337FE5;">蓝色</span> <span style="color:#E56600;">橙色</span> <span style="color:#E53333;">红色</span> <span style="background-color:#FFE500;">背景黄</span> //圆头像 <style> .tx{ width:50px; height:50px; border-radius:50%; font-size:16px; color:#FFF; line-height: 50px; text-align:center; background: #456BD9; } </style> <div class="tx">大路</div> //黄底橙边框 <p style="background:#fff9e3;clear:both;border:1px solid #fadc80;line-height:120%;margin:8px auto 16px auto;float:none;padding:10px 10px 7px 10px;">-ERR invalid user/passwd</p> //蓝底无边框 <div style="margin-top:70px;padding:4px 0 4px 0;background:#eaf3ff;line-height:200%;font-size:11px;text-align:center;"><span>&copy;&nbsp;1998 Reserved</span></div> <table style="width:100%; border-collapse:collapse; margin:0 0 10px" cellpadding="0" cellspacing="0" border="0"> <tr><td colspan="2" style="font-size:14px;font-weight:bold;padding:5px 10px; border:1px solid #C1D9F3; background:#C1D9F3">无法通过 的SMTP服务器代发邮件到 @aliyun.com </td></tr> <tr> <td style="width:100px; font-size:14px;text-align:center; background:#EFF5FB; border:1px solid #C1D9F3">出错信息</td> <td style="border:1px solid #C1D9F3; font-family:verdana; padding:5px 15px; line-height:20px; font-size:14px;"> 收件人(@aliyun.com)所属域名不存在,邮件无法送达。 <br /> Name service error for name=smtp..info type=MX: Host not found </td> </tr> <tr> <td style="width:100px; font-size:14px; text-align:center; background:#EFF5FB; border:1px solid #C1D9F3">解决方案</td> <td style="border:1px solid #C1D9F3; font-family:verdana; padding:5px 15px; line-height:20px; font-size:14px;"> 请确定您的其他邮箱配置正确,并已开启SMTP服务。如稍后重试仍失败,建议您设置由QQ邮箱代发。<p style="display:none">请联系您的收件人,重新核实邮箱地址,或发送到其他收信邮箱。</p> </td></tr></table> 视频音频 <video controls="controls" width="98%" height="50"><source src="http://www.com/.mp3/mp4" type="video/mp4"></source></video> 表单 <input name="uname" type="text" id="uname" value="nydalu" placeholder="填写您的昵称" style="height:60px;"> 返回上一页链接 onclick="javascript:history.go(-1);" 网页跳转 <meta http-equiv="refresh" content="0;url=http://www.cn"> 如果是手机浏览则跳转 (function(){var ua=navigator.userAgent.toLowerCase();var bIsIpad=ua.match(/ipad/i)=="ipad";var bIsIphoneOs=ua.match(/iphone os/i)=="iphone os";var bIsAndroid=ua.match(/android/i)=="android";var bIsWM=ua.match(/windows mobile/i)=="windows mobile";if(bIsIpad||bIsIphoneOs||bIsAndroid||bIsWM){window.location.href="/e/wap/show.php?classid=[!--self.classid--]&id=[!--id--]"}})(); 只在微信中打开 $(function(){ var useragent = navigator.userAgent; if (useragent.match(/MicroMessenger/i) != 'MicroMessenger') { window.location.href = "wxError.html";//若不是微信浏览器,跳转到温馨error页面 } }) 全页嵌套 <html> <head> <meta name="viewport" content="width=device-width,initial-scale=1"> </head> <frameset border="0" rows="100%,*" cols="100%" frameborder="no"> <frame name="TopFrame" scrolling="yes" noresize src="http://dalu.dapanshi.com"> <frame name="BottomFrame" scrolling="no" noresize> <noframes></noframes> </frameset> 禁止抓取 <meta name="robots" content="nofollow"> <meta name="googlebot" content="noindex, nofollow"> 网页嵌套 <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset=utf-8> <meta name=viewport content="width=device-width,initial-scale=1.0"> <title>南阳</title> <meta name=keywords content="南阳"> <meta name=description content="南阳"> <style>body{margin:0;padding:0;overflow:hidden;}</style> </head> <body> <iframe src="http://nyzbw.dapanshi.com/" width=100% frameborder=0></iframe> 简单嵌套 <iframe src="http://kindeditor.net/" frameborder="0" style="width:560px;height:362px;"></iframe> 全站嵌套 <frameset border="0" rows="100%,*" cols="100%" frameborder="no"> <frame name="TopFrame" scrolling="yes" noresize src="http://dalu.dapanshi.com"> <frame name="BottomFrame" scrolling="no" noresize> <noframes></noframes> </frameset> 浮动联系 <a href="/" id="CustomerChatFloat" style="position: fixed; right: 0px; top: 150px; z-index: 99999; height: 70px; width: 65px; min-width: 65px; background: url(/skin/dalu/139/oicq.png) 0px 0px no-repeat; background-size:65px auto"></a> <script type="text/javascript"> var obj=document.getElementById('CustomerChatFloat'); obj.addEventListener("touchmove", function () { obj.style.left = (event.targetTouches[0].pageX - -document.body.scrollLeft - 30) + "px"; obj.style.top = (event.targetTouches[0].pageY - document.body.scrollTop - 30) + "px";}, false); </script> 跳转到当前页面的锚点 <a href="#x">到x处</a> <a name="x"></a> 帝国CMS PHP 前台隐藏 <input name="zip" type="text" id="zip" value="$_GET[uid]" size="5"> 另一种前台字段表单隐藏方法: if($loginadminstyleid==1 || $loginadminstyleid==2) { <tr><td height=25 bgcolor='ffffff'>审核日期</td><td bgcolor='ffffff'>[!--fax--]</td></tr> } 网站名称 $public_r['sitename'] 当前信息ID $navinfor['id'] 打印页面链接 /e/DoPrint/?classid=[!--classid--]&id=[!--id--]&tempid=3 加入收藏链接 /e/member/fava/add/?classid=[!--classid--]&id=[!--id--] 加好友链接 /e/member/friend/add/?fname=nydalu 发短信链接/e/member/msg/AddMsg/?username=nydalu 报错链接 e/public/report/?classid=[!--classid--]&id=[!--id--]&cid=1 留言板 /e/tool/gbook/?bid=1 信息反馈 /e/tool/feedback/?bid=1 人个空间 /e/space/?userid=1 个人资料 /e/space/UserInfo.php?userid=1 个人留言板 /e/space/gbook.php?userid=1 个人反馈/e/space/feedback.php?userid=1 个人新闻列表 /e/space/list.php?userid=1&mid=1 /e/member/cp/功能菜单 /e/member/EditInfo/修改资料 /e/member/my/帐号状态 /e/member/msg/站内信息 /e/member/mspace/SetSpace.php空间设置 /e/DoInfo/管理信息 /e/member/fava/收藏夹 /e/payapi/在线支付 /e/member/friend/我的好友 /e/member/buybak/消费记录 /e/member/buygroup/在线充值 /e/member/card/点卡充值 href="#ecms" onclick="window.open('/e/ShopSys/buycar/','','width=680,height=500,scrollbars=yes,resizable=yes');我的购物车 /e/ShopSys/ListDd/我的订单 /e/member/login/重新登陆 /e/enews/?enews=exit" onclick="return confirm('确认要退出?');退出登陆 /e/member/login/会员登陆 /e/member/register/注册帐号 /e/DoInfo/发布投稿 隐藏JS <div style="display:none"><script src=js地址></script></div> 数量统计输出: $empire->gettotal("select count(userid) as total from {$dbtbpre}enewsfava where userid='$myuserid'");?> $num=$empire->gettotal("select count(*) as total from {$dbtbpre}ecms_news"); echo"新闻表共有 ".$num." 条新闻"; 单个多个字段值输出: $member=$empire->fetch1("select userpic from phome_enewsmemberadd where userid='$muserid'"); $r=$empire->fetch1("select userid,a from {$dbtbpre}enewsmemberadd where userid='$myuserid' "); ?> $r[a]?> 多条循环输出: $spacesql=$empire->query("select userid,a from {$dbtbpre}enewsmemberadd where userid='$myuserid' order by id asc limit 9 "); while($spacer=$empire->fetch($spacesql)) { $spacer[a]?> 帝国CMS使用PHP调用方法可以调用数据库中任何信息,例如调用评论表数据: $sql=$empire->query("select * from {$dbtbpre}enewspl_1 order by saytime limit 10"); while($r=$empire->fetch($sql)) //循环获取查询记录 { echo "<li><span class='time'>".date('m-d',$r[saytime])."</span><a target=_blank href='/e/action/ShowInfo.php?classid=".$r['classid']."&id=".$r['id']."'>".$r['saytext']."</a></li>"; } 将会员组为3的用户批量改为会员组为3变为5,后边的是会员ID从1到50的会员 update phome_enewsmember set groupid=REPLACE(groupid,'3','5') WHERE userid BETWEEN 1 AND 50; 更新指定范围中的内容 update phome_ecms_表名 set 字段名=REPLACE(字段名,'旧内容','新内容') where id>1 and id<1000; 更新指定信息中的两个字段 update {$dbtbpre}dalu_looklist set time=$time,needtime=$needtime where uid=$uid and classid=$classid and id=$id 批量修改文章发布时间 UPDATE 表名 SET newstime =’1583405675′; 批量替换内容中的指定字符 update phome_ecms_news set newstext=REPLACE(newstext,'原字符','新字符'); update phome_ecms_news_data_1 set newstext=replace(newstext,'原来','现在'); update phome_ecms_news set newstext=REPLACE(newstext,'原域名','新域名'),titlepic=REPLACE(titlepic,'原域名','新域名') 批量修改文章作者ID姓名及是否会员 update phome_ecms_news_check set userid='1',username='nydalu',ismember='0'; 批量删除标题带有某字符的SQL delete from phome_ecms_表名 where title like '%中文网%' 批量删除指定范围内的会员 delete from phome_enewsmember where userid>=1 and userid<=3809; delete from phome_enewsmemberadd where userid>=1 and userid<=3809; 删除指定信息 delete from phome_ecms_表 where id=信息id 把指定信息添加到指定归档表 insert into {$dbtbpre}ecms_info_doc select * from {$dbtbpre}ecms_info where id='信息id' 清空留言表 TRUNCATE [!db.pre!]enewsgbook; TRUNCATE [!db.pre!]enewslog;//后台登陆日志 TRUNCATE [!db.pre!]enewsdolog;//后台操作日志 TRUNCATE [!db.pre!]enewsloginfail;//后台登陆失败 将id字段的值复制到filename字段中 update phome_ecms_news set filename=id 备份时出错因为PHP版本原因,将 mysql_escape_string 修改为: mysql_real_escape_string 帝国CMS7.5版本在php5.6---php7.4通用写法总结 1、数据库连接改为 mysqli 2、connect.php文件里常量 MAGIC_QUOTES_GPC改为如下 define('MAGIC_QUOTES_GPC', version_compare(PHP_VERSION, '5.6.40') > 0 ? false : function_exists('get_magic_quotes_gpc')&&get_magic_quotes_gpc()); 3、关闭所以错误报告 打开 /e/class/connect.php找到 define('MAGIC_QUOTES_GPC',function_exists('get_magic_quotes_gpc')&&get_magic_quotes_gpc()); 改成define('MAGIC_QUOTES_GPC',false); 或者是 define('MAGIC_QUOTES_GPC',(ini_get('magic_quotes_gpc') == 1) ? true : false);//php7.4使用 帝国cms的编码转换文件e/class/doiconv.php