diff --git a/homepage/redesign2018/markdownExperiment/admin/phpcount/phpcountLog.php b/homepage/redesign2018/markdownExperiment/admin/phpcount/phpcountLog.php index 09e8820..e24cce6 100644 --- a/homepage/redesign2018/markdownExperiment/admin/phpcount/phpcountLog.php +++ b/homepage/redesign2018/markdownExperiment/admin/phpcount/phpcountLog.php @@ -18,13 +18,7 @@ try{ ); $dailyHitsQuery->execute(); $dailyHitsList = $dailyHitsQuery->fetchAll(PDO::FETCH_ASSOC); -/* - $uniqueHitsQuery = $dbConnection->prepare( - "SELECT pageid, hitcount FROM `phpcount_hits` WHERE isunique=1 ORDER BY hitcount DESC" - ); - $uniqueHitsQuery->execute(); - $uniqueHitsList = $uniqueHitsQuery->fetchAll(PDO::FETCH_ASSOC); -*/ + $whereClauses=array(); if($_GET['userHash']) $whereClauses[]="userHash='".$_GET['userHash']."'"; @@ -36,7 +30,7 @@ try{ $whereClause = join(" AND ", $whereClauses); $pagehitsQuery = $dbConnection->prepare( - "SELECT DATE(timeStamp) as date, TIME(timestamp) as time, pageId, userHash FROM `phpcount_pageHits` ". + "SELECT DATE(timeStamp) as date, TIME(timestamp) as time, pageId, userHash, userAgentString FROM `phpcount_pageHits` ". ($whereClause?"WHERE ".$whereClause." ":""). "ORDER BY timeStamp DESC;" ); @@ -70,13 +64,14 @@ catch(PDOException $db_error){
| date | time | pageId | userHash | |
|---|---|---|---|---|
| date | time | pageId | userHash | userAgentString | ".$pagehitsEntry['date']." | ". "".$pagehitsEntry['time']." | ". "".urldecode($pagehitsEntry['pageId'])." | ". - "".substr($pagehitsEntry['userHash'], 0, 5)."... | " ); + " | ".substr($pagehitsEntry['userHash'], 0, 5)."... | " ). + " | ".$pagehitsEntry['userAgentString']." | "; ?> |