<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_19422"> phpcms2008增加浏览次数 插件 <br> 增加指定文章浏览次数,增加指定范围内的文章的浏览次数 <br> 增加指定栏目文章的浏览次数 <br> 增加公司活跃度等 <br> 还可以息定义开发其它的 <br> <div class="blockcode"> <div id="code_EZF"><ol> <li> <?php <li>session_start();</li> <li>extract($_POST);</li> <li>require dirname(__FILE__).'/include/common.inc.php';</li> <li>$keyadmin="www.bitefu.net";</li> <li>if($key && $key==$keyadmin)</li> <li>{</li> <li> $_SESSION["NowKey"]=$keyadmin;</li> <li>}</li> <li>if($_SESSION["NowKey"] && $_SESSION["NowKey"]=$keyadmin){</li> <li>?></li> <li><script language="JavaScript" src="images/js/jquery.min.js"></script></li> <li><form action="" method="post" name="form"> <li>选择增加类型:<br><br> </li> <li><hr></li> <li>指定ID:</li> <li><input name="thisid" type="text" id="thisid" size="10"></li> <li><br></li> <li>ID范围:</li> <li><input name="idstart" type="text" id="idstart" size="10"></li> <li>-</li> <li><input name="idend" type="text" id="idend" size="10"></li> <li><hr></li> <li>公司活跃<br>指定ID:</li> <li> <input name="comid" type="text" id="comid" size="10"> </li> <li> <br>ID范围:</li> <li> <input name="comstart" type="text" id="comstart" size="10"> </li> <li> - </li> <li> <input name="comend" type="text" id="comend" size="10"> </li> <li> <br>全部:</li> <li> <input name="comall" type="checkbox" id="comall" value="1"> </li> <li><hr></li> <li>栏目ID:</li> <li><input type="hidden" name="catid" id="catid" value="all"></li> <li> <span onclick="this.style.display='none';$('#reselect_catid').show();" style="cursor:pointer;">全部 <font color="red">点击重选</font></span> </li> <li> <span id="reselect_catid" style="display:none;"><li> <span id="load_catid"></span> </li> <li> <a href="javascript:category_reload();">重选</a> </li> <li> </li></span><script type="text/javascript"><li> function category_load(id)<li> {<li> $.get('load.php', { field: 'catid', id: id },<li> function(data){<li> $('#load_catid').append(data);<li> });<li> }<li> function category_reload()<li> {<li> $('#load_catid').html('');<li> category_load(0);<li> }<li> category_load(0);<li> </script> </li> <li> <br><hr> </li> <li><br></li> <li>增加值:<input name="addnum" type="text" size="10" value="<?=$addnum;?>">【必填】</li> <li><br></li> <li><input type="submit" name="submit" value="提交"></li> <li> </form></li> <li> <?php <li>}else{</li> <li>?></li> <li><form id="form1" name="form1" method="post" action=""> <li>KEY:<input type="text" name="key"> </li> <li><input type="submit" name="checkkey" value="提交"></li> <li> </form></li> <li> }?></li> <li> <li> <?php <li>//print_r($_POST);</li> <li>if(!$addnum && $submit){echo "<span style="color:red">增加值不能为空!</span>";}</li> <li>if($submit && $addnum)</li> <li>{</li> <li> if($thisid){</li> <li> $sql="update `".DB_PRE."content_count` set `hits` = `hits` + ".$addnum." where `contentid`='$thisid'";</li> <li> }else if($idstart){</li> <li> $sql="update `".DB_PRE."content_count` set `hits` = `hits` + ".$addnum." where `contentid` >= '$idstart'";</li> <li> if($idend){$sql.=" and `contentid` }else if($comid || $comstart || $comall){</li> <li> if($comid){</li> <li> $sql="update `".DB_PRE."member_info` set `logintimes` = `logintimes` + ".$addnum." where `userid`='$comid'";</li> <li> }else if($comstart){</li> <li> $sql="update `".DB_PRE."member_info` set `logintimes` = `logintimes` + ".$addnum." where `userid` >= '$comstart'";</li> <li> if($comend){$sql.=" and `userid` }else if($comall && $comall==1){</li> <li> $sql="update `".DB_PRE."member_info` set `logintimes` = `logintimes` + ".$addnum;</li> <li> }else{$sql='';}</li> <li> }else if($catid){//</li> <li> if($catid=="all"){</li> <li> $sql="update `".DB_PRE."content_count` set `hits` = `hits` + ".$addnum;</li> <li> }else{</li> <li> $getid_query=mysql_query("select `contentid` from `".DB_PRE."content` where status=99 ".get_sql_catid($catid));</li> <li> while($rs=mysql_fetch_assoc($getid_query)){$getid[]=$rs['contentid'];}</li> <li> $idstr=implode(",",$getid);</li> <li> $sql="update `".DB_PRE."content_count` set `hits` = `hits` + ".$addnum." where `contentid` in ($idstr)";</li> <li> }</li> <li> }else{$sql='';}</li> <li>}</li> <li>if($sql && $submit)</li> <li>{</li> <li> mysql_query($sql);</li> <li> echo date("Y-m-d H:i:s")."成功执行了添加操作,共影响数据: ".mysql_affected_rows()." 条";</li> <li>}else if(!$sql && $submit){</li> <li> echo "<br><span style="color:red">输入信息有误请确认后再提交!</span>";</li> <li>}</li> <li>?></li> </ol></div> <em onclick="copycode($('code_EZF'));">复制代码</em> </div> </td></tr></table> <div id="comment_19422" class="cm"> </div> <div id="post_rate_div_19422"></div> <br><br>