- pageHits werden jetzt einzeln mit Zeit geloggt

modified:   homepage/redesign2018/markdownExperiment/admin/phpcount/phpcountLog.php
	modified:   homepage/redesign2018/markdownExperiment/config/phpcount.config.php
This commit is contained in:
marko
2018-09-03 14:37:16 +02:00
parent 38a7190b62
commit 59b35c4160
2 changed files with 17 additions and 4 deletions

View File

@@ -24,6 +24,12 @@ try{
); );
$uniqueHitsQuery->execute(); $uniqueHitsQuery->execute();
$uniqueHitsList = $uniqueHitsQuery->fetchAll(PDO::FETCH_ASSOC); $uniqueHitsList = $uniqueHitsQuery->fetchAll(PDO::FETCH_ASSOC);
$pagehitsQuery = $dbConnection->prepare(
"SELECT timeStamp, pageId, userHash FROM `phpcount_pageHits` ORDER BY timeStamp DESC;"
);
$pagehitsQuery->execute();
$pagehitsList = $pagehitsQuery->fetchAll(PDO::FETCH_ASSOC);
} }
catch(PDOException $db_error){ catch(PDOException $db_error){
die( "Error!: " . $db_error->getMessage() ); die( "Error!: " . $db_error->getMessage() );
@@ -35,13 +41,19 @@ catch(PDOException $db_error){
<table> <table>
<tr><th>date</th><th>times</th></tr> <tr><th>date</th><th>times</th></tr>
<?php foreach($nodupesList as $nodupesEntry) <?php foreach($nodupesList as $nodupesEntry)
echo( "\t\t\t\t<tr><td>".$nodupesEntry['date']."</td><td>".$nodupesEntry['anz']."</tr>" ); echo( "\t\t\t\t<tr><td>".$nodupesEntry['date']."</td><td>".$nodupesEntry['anz']."<td></tr>" );
?> ?>
</table> </table>
<table> <table>
<tr><th>Seite</th><th>times</th></tr> <tr><th>Seite</th><th>times</th></tr>
<?php foreach($uniqueHitsList as $uniqueHitsEntry) <?php foreach($uniqueHitsList as $uniqueHitsEntry)
echo( "\t\t\t\t<tr><td>".$uniqueHitsEntry['pageid']."</td><td>".$uniqueHitsEntry['hitcount']."</tr>" ); echo( "\t\t\t\t<tr><td>".$uniqueHitsEntry['pageid']."</td><td>".$uniqueHitsEntry['hitcount']."<td></tr>" );
?>
</table>
<table>
<tr><th>timeStamp</th><th>pageId</th><th>userHash</th></tr>
<?php foreach($pagehitsList as $pagehitsEntry)
echo( "\t\t\t\t<tr><td>".$pagehitsEntry['timeStamp']."</td><td>".$pagehitsEntry['pageId']."</td><td>".substr($pagehitsEntry['userHash'], 0, 5)."...<td></tr>" );
?> ?>
</table> </table>
</body> </body>

View File

@@ -4,6 +4,7 @@ $phpcountConfig["db"]["name"] = "cwsvjudo";
$phpcountConfig["db"]["user"] = "cwsvjudo"; $phpcountConfig["db"]["user"] = "cwsvjudo";
$phpcountConfig["db"]["password"] = "Dee4oquu"; $phpcountConfig["db"]["password"] = "Dee4oquu";
$phpcountConfig["db"]["hitsTable"] = "phpcount_hits"; $phpcountConfig["db"]["hitsTable"] = "phpcount_hits";
$phpcountConfig["db"]["nodupesTable"] = "phpcount_nodupes"; $phpcountConfig["db"]["nodupesTable"] = "phpcount_nodupes";
$phpcountConfig["db"]["pagehitsTable"] = "phpcount_pageHits";
?> ?>