国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

69 行
2.0KB

  1. <?php
  2. /**
  3. * 流量统计表
  4. *
  5. * @version $id:statistics_list.php 2024-04-15 tianya,xushubieli $
  6. * @package DedeBIZ.Administrator
  7. * @copyright Copyright (c) 2022 DedeBIZ.COM
  8. * @license GNU GPL v2 (https://www.dedebiz.com/license)
  9. * @link https://www.dedebiz.com
  10. */
  11. require_once(dirname(__FILE__)."/config.php");
  12. require_once(DEDEINC.'/datalistcp.class.php');
  13. function RenderUrlType($t) {
  14. switch ($t) {
  15. case -1:
  16. return "蜘蛛";
  17. case 1:
  18. return "列表";
  19. case 2:
  20. return "文档";
  21. case 3:
  22. return "搜索";
  23. case 4:
  24. return "标签";
  25. default:
  26. return "综合";
  27. }
  28. }
  29. //检查权限,感谢:乖乖女
  30. if (isset($id) && isset($reid)) {
  31. if ($id == 0 && $reid == 0) {
  32. CheckPurview('c_List');
  33. }
  34. }
  35. $ip = isset($ip) ? HtmlReplace(trim($ip)) : '';
  36. $url_type = isset($url_type) ? intval($url_type) : 0;
  37. if (empty($mobile)) $mobile = '';
  38. if (isset($dopost) && $dopost == "delete") {
  39. $ids = explode('`',$aids);
  40. $dquery = "";
  41. foreach ($ids as $id)
  42. {
  43. $id = intval($id);
  44. if ($dquery == "") $dquery .= "id='$id' ";
  45. else $dquery .= " OR id='$id' ";
  46. }
  47. if ($dquery != "") $dquery = " WHERE ".$dquery;
  48. $dsql->ExecuteNoneQuery("DELETE FROM `#@__statistics_detail` $dquery");
  49. ShowMsg("成功删除指定的记录", "statistics_list.php");
  50. exit();
  51. } else {
  52. $addsql = " WHERE ip LIKE '%$ip%' ";
  53. if ($url_type === -1) {
  54. $addsql .= " AND url_type = -1 ";
  55. } else if ($url_type === 1) {
  56. $addsql .= " AND url_type > 0 ";
  57. }
  58. $sql = "SELECT * FROM `#@__statistics_detail` $addsql ORDER BY id DESC";
  59. $dlist = new DataListCP();
  60. //流量列表数
  61. $dlist->pagesize = 30;
  62. $tplfile = DEDEADMIN."/templets/statistics_list.htm";
  63. $dlist->SetParameter("ip", $ip);
  64. $dlist->SetParameter("url_type", $url_type);
  65. $dlist->SetTemplate($tplfile);
  66. $dlist->SetSource($sql);
  67. $dlist->Display();
  68. }
  69. ?>