1、新建一个js 如 wap.js 内容如下
function browserRedirect(url) {
var sUserAgent = navigator.userAgent.toLowerCase();
var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
var bIsMidp = sUserAgent.match(/midp/i) == "midp";
1、新建一个js 如 wap.js 内容如下
function browserRedirect(url) {
var sUserAgent = navigator.userAgent.toLowerCase();
var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
var bIsMidp = sUserAgent.match(/midp/i) == "midp";
帝国cms调用广告系统图片做幻灯
classid=3 是指
[e:loop={"select picurl,url,target from {$dbtbpre}enewsad where classid=3 order by adid asc limit 3",0,24,0}]
<div class="item" style="background:url(<?=$bqr[picurl]?>)"><a target="_blank" href="<?=$bqr[url]?>"><img src="/Public/images/banner-height.gif" class="center-block" /></a></div>
最近发现vps流量疯长 看了下统计 也没看到网站有大流量,查看源码才发现网页被添加了一段很长的js 内容大概是这样
<SCRIPT Language=VBScript>
调用指定栏目缩略图
[e:loop={"select classid,classname,classimg,intro from phome_enewsclass where classid=栏目id",1,24,0}] <li><a href="<?=$bqsr[classurl]?>" target="_blank"><span><img src="<?=$bqr[classimg]?>" alt="<?=$bqr[classname]?>"></span><?=$bqr[classname]?></a></li> [/e:loop]
<?php $ecms_bq_sql=sys_ReturnEcmsLoopBq('select classid,classname,classpath from [!db.pre!]enewsclass where bclassid=0 and showclass=0 order by myorder limit 8',20,24,0); $bqno=0; while($bqr=$empire->fetch($ecms_bq_sql)) { $bqsr=sys_ReturnEcmsLoopStext($bqr); $bqno++; ?> <?php $classurl=sys_ReturnBqClassname($bqr,9);//取得栏目地址 $bgcolor=""; if($GLOBALS[navclassid]) { $fcr=explode('|',$class_r[$GLOBALS[navclassid]][featherclass]); $topbclassid=$fcr[1]?$fcr[1]:$GLOBALS[navclassid];//取得当前栏目的一级栏目ID if($bqr[classid]==$topbclassid) { $bgcolor="改成高亮css的class值"; } } ?> <li class="<?=$bgcolor?>"><a href="<?=$public_r[newsurl]?><?=$bqr[classpath]?>/"><span class="nav-title"><?=$bqr[classname]?></span></a><ul class="dropdown-box"></ul></li> <li class="dropdown <?=$bgcolor?>"><a href="<?=$public_r[newsurl]?><?=$bqr[classpath]?>/"><span class="nav-title"><?=$bqr[classname]?></span></a> <ul class="dropdown-box"> <?php $ecms_bq_sql2=sys_ReturnEcmsLoopBq("select classid,classname,classpath from [!db.pre!]enewsclass where bclassid='$bqr[classid]' order by myorder limit 9",20,24,0); $bqno2=0; while($bqr2=$empire->fetch($ecms_bq_sql2)) { $bqsr2=sys_ReturnEcmsLoopStext($bqr2); $bqno2++; ?> <li><a href="<?=$public_r[newsurl]?><?=$bqr2[classpath]?>/"><?=$bqr2[classname]?></a></li> <?php } ?> </ul> </li> <?php } ?>
最近由于版权的原因公司不让用微软的Office了,只能用 WPS 但是普通版的广告实在太多,在群里询问得知 专业版的没有广告,装了一下确实没广告。
pc端点击弹窗代码
function Cookie(a,c,b,f,d,e){this.$document=a;this.$name=c;if(b){this.$expiration=new Date((new Date()).getTime()+b*60*1000)}else{this.$expiration=null}if(f){this.$path=f}else{this.$path=null}if(d){this.$domain=d}else{this.$domain=null}if(e){this.$secure=true}else{this.$secure=false}}Cookie.prototype.store=function(c){var b="";if(c&&c!=""){b=c}else{for(var d in this){if((d.charAt(0)=="$")||((typeof this[d])=="function")){continue}if(b!=""){b+="&"}b+=d+":"+escape(this[d])}}if(b.indexOf('"')!=0){b='"'+b+'"'}var a=this.$name+"="+b;if(this.$expiration){a+="; expires="+this.$expiration.toGMTString()}if(this.$path){a+="; path="+this.$path}if(this.$domain){a+="; domain="+this.$domain}if(this.$secure){a+="; secure"}this.$document.cookie=a};Cookie.prototype.load=function(){var e=this.$document.cookie;if(e==""){return false}var g=e.indexOf(this.$name+"=");if(g==-1){return false}g+=this.$name.length+1;var c=e.indexOf(";",g);if(c==-1){c=e.length}var f=e.substring(g,c);if(f.indexOf('"')==0){f=f.substring(1,f.length-1)}var b=f.split("&");for(var d=0;d<b.length;d++){b[d]=b[d].split(":")}for(var d=0;d<b.length;d++){this[b[d][0]]=unescape(b[d][1])}return true};Cookie.prototype.remove=function(){var a;a=this.$name+"=";if(this.$path){a+="; path="+this.$path}if(this.$domain){a+="; domain="+this.$domain}a+="; expires=Fri, 02-Jan-1970 00:00:00 GMT";this.$document.cookie=a};var c=new Cookie(document,"AD_Time_480",60,"/");c.load();var idx=0;if(c.idx){idx=parseInt(c.idx)+1}c.idx=idx;c.store(); var ClickSuccess = false; var opened = false; function myclick() { if (!opened && !ClickSuccess&&c.idx==0){ if (window.Event) { top.document.captureEvents(Event.CLICK); document.captureEvents(Event.CLICK); } top.document.onclick = goto; document.onclick = goto; self.focus(); ClickSuccess=true; } } function goto() { if (!opened) { popwin = window.open("http://www.baidu.com/");//此处就是要弹出页面的广告地址,自己加上吧。 if (popwin) { opened = true; } //self.focus(); } } myclick();
需要修改的模板为“header.php”,打开此模板,找到: