phpcms2008增加浏览次数插件代码

技术教程 2026-01-09 16:19:31 浏览

代码如下:

phpcms2008

KEYadmin="www.aspku.net";if($key && $key==$keyadmin){$_SESSION["NowKey"]=$keyadmin;}if($_SESSION["NowKey"] && $_SESSION["NowKey"]=$keyadmin){?>

选择增加类型:
指定ID:ID范围:-
公司活跃指定ID:ID范围:-全部:
栏目ID:全部 点击重选重选
增加值:【必填】
KEY:
增加值不能为空!";}if($submit && $addnum){if($thisid){$sql="upDate `".DB_PRE."content_count` Set `hits` = `hits` + ".$addnum." where `contentid`='$thisid'";}else if($idstart){$sql="update `".DB_PRE."content_count` set `hits` = `hits` + ".$addnum." where `contentid` >= '$idstart'";if($idend){$sql.=" and `contentid` <= '$idend'";}}else if($comid || $comstart || $comall){if($comid){$sql="update `".DB_PRE."member_info` set `logintimes` = `logintimes` + ".$addnum." where `userid`='$comid'";}else if($comstart){$sql="update `".DB_PRE."member_info` set `logintimes` = `logintimes` + ".$addnum." where `userid` >= '$comstart'";if($comend){$sql.=" and `userid` <='$comend'";}}else if($comall && $comall==1){$sql="update `".DB_PRE."member_info` set `logintimes` = `logintimes` + ".$addnum;}else{$sql='';}}else if($catid){//if($catid=="all"){$sql="update `".DB_PRE."content_count` set `hits` = `hits` + ".$addnum;}else{$getid_query=mysql_query("select `contentid` From `".DB_PRE."content` where status=99 ".get_sql_catid($catid));while($rs=mysql_fetch_assoc($getid_query)){$getid[]=$rs['contentid'];}$idstr=implode(",",$getid);$sql="update `".DB_PRE."content_count` set `hits` = `hits` + ".$addnum." where `contentid` in ($idstr)";}}else{$sql='';}}if($sql && $submit){Mysql_query($sql);echo date("Y-m-d H:i:s")."成功执行了添加操作,共影响数据: ".mysql_affected_rows()." 条";}else if(!$sql && $submit){echo "输入信息有误请确认后再提交!";}?>

本文版权声明本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,请联系本站客服,一经查实,本站将立刻删除。

发表评论

热门推荐