代码如下:
KEYadmin="www.aspku.net";if($key && $key==$keyadmin){$_SESSION["NowKey"]=$keyadmin;}if($_SESSION["NowKey"] && $_SESSION["NowKey"]=$keyadmin){?>
}?>增加值不能为空!";}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 "输入信息有误请确认后再提交!";}?>














发表评论