- Einschränkung auf einzelne Seiten, Tage und userHashes
modified: redesign2018/markdownExperiment/admin/phpcount/phpcountLog.php - vergeblicher Versuch die fehlerhafte Anzeige bei deaktiviertem JS zu beheben modified: redesign2018/markdownExperiment/phpLib/imgGallery/index.php.tmpl - Anpassungen von Hand für einzelne Spezialfälle (@todo eifachere Individualkonfiguration) modified: redesign2018/markdownExperiment/src/Makefiles/Makefile.ftpUpload modified: redesign2018/markdownExperiment/src/Makefiles/Makefile.vidstabTest - Konzept einer neuen Videogalerie modified: redesign2018/markdownExperiment/src/galleryHelper/getVideoDurationJson.py new file: redesign2018/markdownExperiment/src/galleryHelper/videoGallery.tmpl.php new file: redesign2018/markdownExperiment/src/galleryHelper/videoGalleryVue.tmpl.php new file: redesign2018/markdownExperiment/src/galleryHelper/yamlRead.py
This commit is contained in:
@@ -13,47 +13,70 @@ try{
|
||||
$cwsvJudoConfig["db"]["password"]
|
||||
);
|
||||
|
||||
$nodupesQuery = $dbConnection->prepare(
|
||||
"SELECT COUNT(*) AS anz, DATE(FROM_UNIXTIME( time )) as date FROM `phpcount_nodupes` GROUP BY date ORDER BY date DESC"
|
||||
$dailyHitsQuery = $dbConnection->prepare(
|
||||
"SELECT COUNT(*) AS anz, DATE(timeStamp) as date FROM `phpcount_pageHits` GROUP BY date ORDER BY date DESC;"
|
||||
);
|
||||
$nodupesQuery->execute();
|
||||
$nodupesList = $nodupesQuery->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
$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']."'";
|
||||
if($_GET['date'])
|
||||
$whereClauses[]="DATE(timestamp)='".$_GET['date']."'";
|
||||
if($_GET['pageId'])
|
||||
$whereClauses[]="pageId='".urldecode($_GET['pageId'])."'";
|
||||
|
||||
$whereClause = join(" AND ", $whereClauses);
|
||||
|
||||
$pagehitsQuery = $dbConnection->prepare(
|
||||
"SELECT timeStamp, pageId, userHash FROM `phpcount_pageHits` ORDER BY timeStamp DESC;"
|
||||
"SELECT DATE(timeStamp) as date, TIME(timestamp) as time, pageId, userHash FROM `phpcount_pageHits` ".
|
||||
($whereClause?"WHERE ".$whereClause." ":"").
|
||||
"ORDER BY timeStamp DESC;"
|
||||
);
|
||||
$pagehitsQuery->execute();
|
||||
$pagehitsList = $pagehitsQuery->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
// var_dump($_GET);
|
||||
if($_GET['action']=="deleteHitter"){
|
||||
//var_dump($_GET['action']);
|
||||
$deleteHitterQuery = $dbConnection->prepare(
|
||||
"DELETE FROM `phpcount_pageHits` WHERE userHash=:userHash;"
|
||||
);
|
||||
$deleteHitterQuery->bindParam(':userHash', $_GET['userHash']);
|
||||
if($deleteHitterQuery->execute());
|
||||
else echo("FEHLER\n");
|
||||
}
|
||||
}
|
||||
catch(PDOException $db_error){
|
||||
die( "Error!: " . $db_error->getMessage() );
|
||||
}
|
||||
//var_dump($dailyHitsList);
|
||||
?>
|
||||
<html>
|
||||
<body>
|
||||
<img src="visitorCount.phplot.php" />
|
||||
<a href="?">RESET</a>
|
||||
<?php if(isset($_GET['userHash']))?><form action="./phpcountLog.php"><input type="hidden" name="userHash" id="userHash" value="<?php echo($_GET['userHash']);?>"><input type="hidden" name="action" id="action" value="deleteHitter"><button type="submit">DeleteHitter</button></form>
|
||||
<table>
|
||||
<tr><th>date</th><th>times</th></tr>
|
||||
<?php foreach($nodupesList as $nodupesEntry)
|
||||
echo( "\t\t\t\t<tr><td>".$nodupesEntry['date']."</td><td>".$nodupesEntry['anz']."<td></tr>" );
|
||||
?>
|
||||
<tr><th><?php echo( join( "</th><th>", array_column($dailyHitsList, 'date') ) );?></th></tr>
|
||||
<tr><td><?php echo( join( "</td><td>", array_column($dailyHitsList, 'anz') ) );?></td></tr>
|
||||
</table>
|
||||
<hr />
|
||||
<table>
|
||||
<tr><th>Seite</th><th>times</th></tr>
|
||||
<?php foreach($uniqueHitsList as $uniqueHitsEntry)
|
||||
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>
|
||||
<tr><th>date</th><th>time</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>" );
|
||||
echo( "\t\t\t\t<tr>".
|
||||
"<td><a href=\"?date=".$pagehitsEntry['date']."\">".$pagehitsEntry['date']."</a></td>".
|
||||
"<td>".$pagehitsEntry['time']."</td>".
|
||||
"<td><a href=\"?pageId=".urlencode( $pagehitsEntry['pageId'] )."\">".urldecode($pagehitsEntry['pageId'])."</a></td>".
|
||||
"<td><a href=\"?userHash=".$pagehitsEntry['userHash']."\">".substr($pagehitsEntry['userHash'], 0, 5)."...</a><td></tr>" );
|
||||
?>
|
||||
</table>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user