phpcms2008增加瀏覽次數外掛程式

來源:互聯網
上載者:User
phpcms2008增加瀏覽次數 外掛程式
增加指定文章瀏覽次數,增加指定範圍內的文章的瀏覽次數
增加指定欄目文章的瀏覽次數
增加公司活躍度等
還可以息定義開發其它的
  1. session_start();
  2. extract($_POST);
  3. require dirname(__FILE__).'/include/common.inc.php';
  4. $keyadmin="www.bitefu.net";
  5. if($key && $key==$keyadmin)
  6. {
  7. $_SESSION["NowKey"]=$keyadmin;
  8. }
  9. if($_SESSION["NowKey"] && $_SESSION["NowKey"]=$keyadmin){
  10. ?>
  11. }else{
  12. ?>
  13. //print_r($_POST);
  14. if(!$addnum && $submit){echo "增加值不可為空!";}
  15. if($submit && $addnum)
  16. {
  17. if($thisid){
  18. $sql="update `".DB_PRE."content_count` set `hits` = `hits` + ".$addnum." where `contentid`='$thisid'";
  19. }else if($idstart){
  20. $sql="update `".DB_PRE."content_count` set `hits` = `hits` + ".$addnum." where `contentid` >= '$idstart'";
  21. if($idend){$sql.=" and `contentid` <= '$idend'";}
  22. }else if($comid || $comstart || $comall){
  23. if($comid){
  24. $sql="update `".DB_PRE."member_info` set `logintimes` = `logintimes` + ".$addnum." where `userid`='$comid'";
  25. }else if($comstart){
  26. $sql="update `".DB_PRE."member_info` set `logintimes` = `logintimes` + ".$addnum." where `userid` >= '$comstart'";
  27. if($comend){$sql.=" and `userid` <='$comend'";}
  28. }else if($comall && $comall==1){
  29. $sql="update `".DB_PRE."member_info` set `logintimes` = `logintimes` + ".$addnum;
  30. }else{$sql='';}
  31. }else if($catid){//
  32. if($catid=="all"){
  33. $sql="update `".DB_PRE."content_count` set `hits` = `hits` + ".$addnum;
  34. }else{
  35. $getid_query=mysql_query("select `contentid` from `".DB_PRE."content` where status=99 ".get_sql_catid($catid));
  36. while($rs=mysql_fetch_assoc($getid_query)){$getid[]=$rs['contentid'];}
  37. $idstr=implode(",",$getid);
  38. $sql="update `".DB_PRE."content_count` set `hits` = `hits` + ".$addnum." where `contentid` in ($idstr)";
  39. }
  40. }else{$sql='';}
  41. }
  42. if($sql && $submit)
  43. {
  44. mysql_query($sql);
  45. echo date("Y-m-d H:i:s")."成功執行了添加操作,共影響資料: ".mysql_affected_rows()." 條";
  46. }else if(!$sql && $submit){
  47. echo "
    輸入資訊有誤請確認後再提交!";
  48. }
  49. ?>
複製代碼
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.