| @@ -77,7 +77,7 @@ $menusMain = "<m:top item='1_' name='常用功能' icon='fa fa-desktop'> | |||
| <m:item name='评论管理' link='feedback_main.php' rank='sys_Feedback' target='main' /> | |||
| <m:item name='专题管理' link='content_s_list.php' ischannel='1' channelid='-1' linkadd='spec_add.php' rank='spec_New' target='main' /> | |||
| <m:item name='文档回收站' link='recycling.php' ischannel='1' addico='fa fa-minus-circle' linkadd='archives_do.php?dopost=clear&aid=no&recycle=1' rank='a_List,a_AccList,a_MyList' target='main' /> | |||
| <m:item name='流量统计表' link='statchart_list.php' rank='t_List,t_AccList' target='main' /> | |||
| <m:item name='流量统计表' link='statistics_list.php' rank='t_List,t_AccList' target='main' /> | |||
| </m:top> | |||
| <m:top item='2_' name='文档管理' icon='fa fa-file-text'> | |||
| $addset | |||
| @@ -2,7 +2,7 @@ | |||
| /** | |||
| * 流量统计表 | |||
| * | |||
| * @version $id:statchart_list.php 2024-04-15 xushubieli $ | |||
| * @version $id:statistics_list.php 2024-04-15 tianya,xushubieli $ | |||
| * @package DedeBIZ.Administrator | |||
| * @copyright Copyright (c) 2022 DedeBIZ.COM | |||
| * @license GNU GPL v2 (https://www.dedebiz.com/license) | |||
| @@ -10,29 +10,46 @@ | |||
| */ | |||
| require_once(dirname(__FILE__)."/config.php"); | |||
| require_once(DEDEINC.'/datalistcp.class.php'); | |||
| function RenderUrlType($t) { | |||
| switch ($t) { | |||
| case 1: | |||
| return "列表"; | |||
| case 2: | |||
| return "内容"; | |||
| case 3: | |||
| return "搜索"; | |||
| case 4: | |||
| return "Tag"; | |||
| default: | |||
| return "其他"; | |||
| } | |||
| } | |||
| //检查权限 | |||
| if ($id == 0 && $reid == 0) { | |||
| CheckPurview('c_List'); | |||
| } | |||
| $ip = isset($ip) ? HtmlReplace(trim($ip)) : ''; | |||
| if (empty($mobile)) $mobile = ''; | |||
| if ($dopost=="delete") { | |||
| $ids = explode('`',$aids); | |||
| $dquery = ""; | |||
| foreach ($ids as $id) { | |||
| $id = intval($id); | |||
| if ($dquery=="") $dquery .= "id='$id' "; | |||
| else $dquery .= " OR id='$id' "; | |||
| } | |||
| if($dquery!="") $dquery = " WHERE ".$dquery; | |||
| $dsql->ExecuteNoneQuery("DELETE FROM `#@__statistics_detail` $dquery"); | |||
| ShowMsg("成功删除指定的记录", "statchart_list.php"); | |||
| ShowMsg("成功删除指定的记录", "statistics_list.php"); | |||
| exit(); | |||
| } else { | |||
| $addsql = " WHERE ip LIKE '%$ip%' "; | |||
| $sql = "SELECT * FROM `#@__statistics_detail` $addsql ORDER BY id DESC"; | |||
| $dlist = new DataListCP(); | |||
| //流量列表数 | |||
| $dlist->pageSize = 30; | |||
| $tplfile = DEDEADMIN."/templets/statchart_list.htm"; | |||
| $dlist->pagesize = 30; | |||
| $tplfile = DEDEADMIN."/templets/statistics_list.htm"; | |||
| $dlist->SetParameter("ip",$ip); | |||
| $dlist->SetTemplate($tplfile); | |||
| $dlist->SetSource($sql); | |||
| $dlist->Display(); | |||
| @@ -7,6 +7,9 @@ | |||
| <link rel="stylesheet" href="/static/web/css/font-awesome.min.css"> | |||
| <link rel="stylesheet" href="/static/web/css/bootstrap.min.css"> | |||
| <link rel="stylesheet" href="/static/web/css/admin.css"> | |||
| <script src="/static/web/js/jquery.min.js"></script> | |||
| <script src="/static/web/js/bootstrap.min.js"></script> | |||
| <script src="/static/web/js/admin.main.js"></script> | |||
| </head> | |||
| <body> | |||
| <ol class="breadcrumb"> | |||
| @@ -15,8 +18,8 @@ | |||
| </ol> | |||
| <div class="card shadow-sm mb-3"> | |||
| <div class="card-body"> | |||
| <form name="form1" action="statchart_list.php" method="get"> | |||
| <input type="text" name="ip" class="admin-input-lg" placeholder="请输入地址ip"> | |||
| <form name="form1" action="statistics_list.php" method="get"> | |||
| <input type="text" name="ip" class="admin-input-lg" placeholder="请输入地址ip" value="<?php echo !empty($ip)? $ip : '';?>"> | |||
| <button type="submit" class="btn btn-success btn-sm">搜索</button> | |||
| </form> | |||
| </div> | |||
| @@ -35,7 +38,7 @@ | |||
| <td scope="col">地址</td> | |||
| <td scope="col">浏览器内核</td> | |||
| <td scope="col">操作系统</td> | |||
| <td scope="col">浏览特征</td> | |||
| <td scope="col">浏览类型</td> | |||
| <td scope="col">浏览时间</td> | |||
| </tr> | |||
| </thead> | |||
| @@ -48,7 +51,7 @@ | |||
| <td>{dede:field.ip/}</td> | |||
| <td>{dede:field.browser/}</td> | |||
| <td>{dede:field.os/}</a></td> | |||
| <td>{dede:field.created_hour/}点</td> | |||
| <td>{dede:field.url_type function="RenderUrlType(@me)"/}</td> | |||
| <td>{dede:field.t function="MyDate('Y-m-d H:i:s',@me)"/}</td> | |||
| </tr> | |||
| {/dede:datalist} | |||
| @@ -88,10 +91,10 @@ | |||
| function DelSel() { | |||
| var nid = getCheckboxItem(); | |||
| if (nid == "") { | |||
| alert("请选择要删除的信息"); | |||
| ShowMsg("请选择要删除的信息"); | |||
| return; | |||
| } | |||
| location.href = "statchart_list.php?dopost=delete&aids=" + nid; | |||
| location.href = "statistics_list.php?dopost=delete&aids=" + nid; | |||
| } | |||
| </script> | |||
| </body> | |||