diff --git a/homepage/redesign2018/markdownExperiment/admin/phpcount/phpcountLog.php b/homepage/redesign2018/markdownExperiment/admin/phpcount/phpcountLog.php
index d2c816c..09e8820 100644
--- a/homepage/redesign2018/markdownExperiment/admin/phpcount/phpcountLog.php
+++ b/homepage/redesign2018/markdownExperiment/admin/phpcount/phpcountLog.php
@@ -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);
?>
+ RESET
+
- | date | times |
-".$nodupesEntry['date']." | ".$nodupesEntry['anz']." | " );
-?>
+ | | ", array_column($dailyHitsList, 'date') ) );?> |
+ | ", array_column($dailyHitsList, 'anz') ) );?> |
+
- | Seite | times |
-".$uniqueHitsEntry['pageid']." | ".$uniqueHitsEntry['hitcount']." | " );
-?>
- |
-
diff --git a/homepage/redesign2018/markdownExperiment/phpLib/imgGallery/index.php.tmpl b/homepage/redesign2018/markdownExperiment/phpLib/imgGallery/index.php.tmpl
index 1106973..f637c54 100644
--- a/homepage/redesign2018/markdownExperiment/phpLib/imgGallery/index.php.tmpl
+++ b/homepage/redesign2018/markdownExperiment/phpLib/imgGallery/index.php.tmpl
@@ -3,6 +3,9 @@
require_once($basePath."/config/phpcount.config.php");
require_once($basePath."/config/cwsvJudo.config.php");
+
+ include_once("config.inc.php");
+
require_once($basePath."/ressourcen/phpLib/phpcount/phpcount.php");
function startsWith($haystack, $needle){
@@ -314,14 +317,8 @@ return $retVal;
imgList,
{
onslide: function (index, slide) {
- var counterUrl = "/expCounter/counter.php";
var pageUrl = encodeURIComponent( window.location.href ) + "?index=" + index.toString();
var pageTitle = document.title + " [" + index.toString() + "]";
- var callUrl = counterUrl + "?jscode_version=1.2&chCounter_mode=js&status=active&visible=0&page_title=" + pageTitle + "&page_url=" + pageUrl;
-
- var xmlHttp = new XMLHttpRequest();
- xmlHttp.open("GET", callUrl, true); // true for asynchronous
- xmlHttp.send(null);
},
startSlideshow: true,
stretchImages: true,
diff --git a/homepage/redesign2018/markdownExperiment/src/Makefiles/Makefile.ftpUpload b/homepage/redesign2018/markdownExperiment/src/Makefiles/Makefile.ftpUpload
index 064ed7e..e10898c 100644
--- a/homepage/redesign2018/markdownExperiment/src/Makefiles/Makefile.ftpUpload
+++ b/homepage/redesign2018/markdownExperiment/src/Makefiles/Makefile.ftpUpload
@@ -1,15 +1,27 @@
+# Upload der Videogalleriedateien auf einen Webspace und Eintragen in
+# die "Videodatenbank"
+
include Makefile.cfg
-ftpServer = ftpupload.net
-ftpUser = unaux_22935783
-ftpPassword = eeloor0D
+#ftpServer = ftpupload.net
+#ftpUser = unaux_22935783
+#ftpPassword = eeloor0D
+#httpUrlBase = http://cwsvjudo-media-2018.unaux.com/
-ftpPathBase = /htdocs
+
+ftpServer = cwsvjudo.bplaced.net
+ftpUser = cwsvjudo
+ftpPassword = ***REMOVED***
+httpUrlBase = http://cwsvjudo.bplaced.net.net/
+
+#ftpPathBase = /htdocs
+ftpPathBase = /www
ftpFilePath = videoalben/videoalben.2018
vidGalIndexPhp = /d/temp/cwsvJudo/homepage/redesign2018/markdownExperiment/src/galleryTemplates/indexHier.php
dryRun = --dry-run
timeHandling= --only-newer
+lftpNetLimitRate = 0
vidGalInsertScript = /d/temp/cwsvJudo/homepage/redesign2018/markdownExperiment/src/galleryHelper/vidGalInsert.py
@@ -20,14 +32,14 @@ all:
.PHONY: ftpUpload
ftpUpload:
- lftp -e 'set net:limit-rate 25600; mkdir -f $(ftpPathBase)/$(ftpFilePath)/$(VID_GAL_DIR); mkdir -f $(ftpPathBase)/$(ftpFilePath)/$(VID_GAL_DIR)/thumbnails; mkdir -f $(ftpPathBase)/$(ftpFilePath)/$(VID_GAL_DIR)/webm; put $(vidGalIndexPhp) -o $(ftpPathBase)/$(ftpFilePath)/$(VID_GAL_DIR)/index.php; put videos/config.inc.php -o $(ftpPathBase)/$(ftpFilePath)/$(VID_GAL_DIR)/config.inc.php; mirror $(dryRun) $(timeHandling) -R videos/thumbnails $(ftpPathBase)/$(ftpFilePath)/$(VID_GAL_DIR)/thumbnails; mirror $(dryRun) $(timeHandling) -R videos/webm $(ftpPathBase)/$(ftpFilePath)/$(VID_GAL_DIR)/webm; quit; ' \
+ lftp -e 'set net:limit-rate $(lftpNetLimitRate); mkdir -f $(ftpPathBase)/$(ftpFilePath)/$(VID_GAL_DIR); mkdir -f $(ftpPathBase)/$(ftpFilePath)/$(VID_GAL_DIR)/thumbnails; mkdir -f $(ftpPathBase)/$(ftpFilePath)/$(VID_GAL_DIR)/webm; put $(vidGalIndexPhp) -o $(ftpPathBase)/$(ftpFilePath)/$(VID_GAL_DIR)/index.php; put videos/config.inc.php -o $(ftpPathBase)/$(ftpFilePath)/$(VID_GAL_DIR)/config.inc.php; mirror $(dryRun) $(timeHandling) -R videos/thumbnails $(ftpPathBase)/$(ftpFilePath)/$(VID_GAL_DIR)/thumbnails; mirror $(dryRun) $(timeHandling) -R videos/webm $(ftpPathBase)/$(ftpFilePath)/$(VID_GAL_DIR)/webm; quit; ' \
-u $(ftpUser),$(ftpPassword) ftp://$(ftpServer)
-# for file in videos/webm/*; do \
-# filename=$${file##*/}; \
-# $(vidGalInsertScript) \
-# --shiaiYamlFile=./shiaiData.yaml \
-# --vidUrl="http://cwsvjudo-media-2018.unaux.com/$(ftpFilePath)/$(VID_GAL_DIR)/webm/$${filename}" \
-# --posterUrl="http://cwsvjudo-media-2018.unaux.com/$(ftpFilePath)/$(VID_GAL_DIR)/thumbnails/$${filename%.*}.jpg" \
-# --checkSum=$${filename%.*};\
-# done;\
+ for file in videos/webm/*; do \
+ filename=$${file##*/}; \
+ $(vidGalInsertScript) \
+ --shiaiYamlFile=./shiaiData.yaml \
+ --vidUrl="$(httpUrlBase)/$(ftpFilePath)/$(VID_GAL_DIR)/webm/$${filename}" \
+ --posterUrl="$(httpUrlBase)/$(ftpFilePath)/$(VID_GAL_DIR)/thumbnails/$${filename%.*}.jpg" \
+ --checkSum=$${filename%.*};\
+ done;\
diff --git a/homepage/redesign2018/markdownExperiment/src/Makefiles/Makefile.vidstabTest b/homepage/redesign2018/markdownExperiment/src/Makefiles/Makefile.vidstabTest
index 16dd26b..19280cb 100644
--- a/homepage/redesign2018/markdownExperiment/src/Makefiles/Makefile.vidstabTest
+++ b/homepage/redesign2018/markdownExperiment/src/Makefiles/Makefile.vidstabTest
@@ -1,8 +1,8 @@
FFMPEG = /c/proggis/media/editoren/ffmpeg-4.0.2-win64-static/bin/ffmpeg.exe
GUETZLI = /d/projekte/tests/guetzli.git/bin/Release/guetzli.exe
-#DEFAULT_FFMPEG = ffmpeg
-DEFAULT_FFMPEG = /c/proggis/media/editoren/ffmpeg-4.0.2-win64-static/bin/ffmpeg.exe
+DEFAULT_FFMPEG = ffmpeg
+#DEFAULT_FFMPEG = /c/proggis/media/editoren/ffmpeg-4.0.2-win64-static/bin/ffmpeg.exe
# Für eine schnelle Komprimierung libvpx, sonst vp9
DEFAULT_VID_CODEC_HEIGHT = 360
@@ -18,10 +18,10 @@ VID_CODEC_HEIGHT := $(if $(VID_CODEC_HEIGHT),$(VID_CODEC_HEIGHT),$(DEFAULT_VID_C
VID_CODEC_WIDTH := $(if $(VID_CODEC_WIDTH),$(VID_CODEC_WIDTH),$(DEFAULT_VID_CODEC_WIDTH))
VID_CODEC := $(if $(VID_CODEC),$(VID_CODEC),$(DEFAULT_VID_CODEC))
-targetSourceDirectories = $(sort $(dir $(wildcard ./videos/aufnahmen/*/)))
-targetSourceDir = videos/aufnahmen/
-sourceVideos = $(wildcard videos/.forCompressing/*.video)
+defaultTargetSourceDirectories = $(sort $(dir $(wildcard ./videos/aufnahmen/*/)))
+targetSourceDirectories := $(if $(targetSourceDirectories), $(targetSourceDirectories), $(defaultTargetSourceDirectories))
+sourceVideos = $(wildcard videos/.forCompressing/*.video)
vidstabLogs = $(addsuffix .trf, $(basename $(sourceVideos)))
firstPassLogs = $(addsuffix .firstPassLog-0.log, $(basename $(sourceVideos)))
@@ -35,7 +35,10 @@ ffmpegVideoFilterVidstabTransform = vidstabtransform=optzoom=2:interpol=bicubic:
ffmpegVideoScaleFilter = scale=$(VID_CODEC_WIDTH):$(VID_CODEC_HEIGHT):sws_flags=lanczos,
ffmpegVideoFilterDeinterlace = yadif,
-ffmpegVideoFilterDenoise = hqdn3d,
+ffmpegVideoFilterDenoise = nlmeans,
+#ffmpegVideoFilterDenoise = hqdn3d,
+ffmpegDisplayAspectRatio = 16:9
+#ffmpegDisplayAspectRatio = 9:16
.SECONDARY: $(vidstabLogs) $(firstPassLogs)
@@ -57,7 +60,7 @@ thumbnails: $(jpegThumbs)
echo:
@echo $(webmVideos)
@echo $(firstPassLogs)
- @echo $(targetSourceDir)
+ @echo $(targetSourceDirectories)
# Erzeugen der Targets
@@ -87,13 +90,14 @@ videos/.forCompressing/%.trf: videos/.forCompressing/%.video
videos/.forCompressing/%.firstPassLog-0.log: videos/.forCompressing/%.video videos/.forCompressing/%.trf
# -b:v $(VID_CODEC_BITRATE) \
+# -filter:v $(ffmpegVideoFilterDeinterlace)$(ffmpegVideoFilterDenoise)$(ffmpegVideoFilterVidstabTransform):input="$(basename $<).trf",nlmeans=s=6:p=5:r=7,$(ffmpegVideoScaleFilter)unsharp=5:5:0.8:3:3:0.4 \
# First Pass
$(FFMPEG) -i $< \
- -filter:v $(ffmpegVideoFilterDeinterlace)$(ffmpegVideoFilterDenoise)$(ffmpegVideoFilterVidstabTransform):input="$(basename $<).trf",nlmeans=s=6:p=5:r=7,$(ffmpegVideoScaleFilter)unsharp=5:5:0.8:3:3:0.4 \
+ -filter:v $(ffmpegVideoFilterDeinterlace)$(ffmpegVideoFilterDenoise)$(ffmpegVideoFilterVidstabTransform):input="$(basename $<).trf",$(ffmpegVideoScaleFilter)unsharp=5:5:0.8:3:3:0.4 \
-codec:v $(VID_CODEC) \
-pass 1 \
-passlogfile "$(basename $<).firstPassLog" \
- -aspect 16:9 \
+ -aspect $(ffmpegDisplayAspectRatio) \
-threads 1 \
-speed 4 \
-tile-columns 0 \
@@ -114,13 +118,13 @@ videos/webm/%.webm: videos/.forCompressing/%.video videos/.forCompressing/%.trf
# -b:v $(VID_CODEC_BITRATE) \
# Second Pass
$(FFMPEG) -i $< \
- -filter:v $(ffmpegVideoFilterDeinterlace)$(ffmpegVideoFilterDenoise)$(ffmpegVideoFilterVidstabTransform):input="$(basename $<).trf",nlmeans=s=6:p=5:r=7,$(ffmpegVideoScaleFilter)unsharp=5:5:0.8:3:3:0.4 \
+ -filter:v $(ffmpegVideoFilterDeinterlace)$(ffmpegVideoFilterDenoise)$(ffmpegVideoFilterVidstabTransform):input="$(basename $<).trf",$(ffmpegVideoScaleFilter)unsharp=5:5:0.8:3:3:0.4 \
-codec:v $(VID_CODEC) \
-pass 2 \
-passlogfile "$(basename $<).firstPassLog" \
-deadline best \
-b:v $(shell /d/temp/cwsvJudo/homepage/redesign2018/markdownExperiment/src/galleryHelper/getVideoDurationJson.py $<)k \
- -aspect 16:9 \
+ -aspect $(ffmpegDisplayAspectRatio)\
-threads 1 \
-speed 0 \
-tile-columns 0 \
@@ -136,8 +140,9 @@ videos/webm/%.webm: videos/.forCompressing/%.video videos/.forCompressing/%.trf
videos/thumbnails/%.png: videos/.forCompressing/%.video
mkdir -p videos/thumbnails
# $(FFMPEG) -i "$<" -vf "select=gt(scene\,0.4)" -frames:v 5 -vsync vfr -vf $(ffmpegVideoScaleFilter)fps=fps=1/600 "$@"
- $(FFMPEG) -i "$<" -vf $(ffmpegVideoScaleFilter)thumbnail -frames:v 1 "$@"
+# $(FFMPEG) -i "$<" -vf $(ffmpegVideoScaleFilter)thumbnail -frames:v 1 "$@"
+# $(FFMPEG) -i "$<" -filter:v $(ffmpegVideoFilterDeinterlace)$(ffmpegVideoFilterDenoise)$(ffmpegVideoFilterVidstabTransform):input="$(basename $<).trf",$(ffmpegVideoScaleFilter)unsharp=5:5:0.8:3:3:0.4,thumbnail -frames:v 1 "$@"
+ $(FFMPEG) -i "$<" -filter:v $(ffmpegVideoFilterDeinterlace)$(ffmpegVideoScaleFilter)thumbnail -frames:v 1 "$@"
videos/thumbnails/%.jpg: videos/thumbnails/%.png
$(GUETZLI) --quality 90 "$<" "$@"
-
diff --git a/homepage/redesign2018/markdownExperiment/src/galleryHelper/getVideoDurationJson.py b/homepage/redesign2018/markdownExperiment/src/galleryHelper/getVideoDurationJson.py
index c529732..02322bf 100644
--- a/homepage/redesign2018/markdownExperiment/src/galleryHelper/getVideoDurationJson.py
+++ b/homepage/redesign2018/markdownExperiment/src/galleryHelper/getVideoDurationJson.py
@@ -21,7 +21,7 @@ def probe(vid_file_path):
@vid_file_path : The absolute (full) path of the video file, string.
'''
if type(vid_file_path) != str:
- raise Exception('Gvie ffprobe a full file path of the video')
+ raise Exception('Give ffprobe a full file path of the video')
return
command = ["ffprobe",
diff --git a/homepage/redesign2018/markdownExperiment/src/galleryHelper/videoGallery.tmpl.php b/homepage/redesign2018/markdownExperiment/src/galleryHelper/videoGallery.tmpl.php
new file mode 100644
index 0000000..19613ae
--- /dev/null
+++ b/homepage/redesign2018/markdownExperiment/src/galleryHelper/videoGallery.tmpl.php
@@ -0,0 +1,266 @@
+setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+
+ $wkId = $_GET['wkId'];
+
+ $vidQuery =
+ $cwsvJudoDbConnection->prepare(
+ "SELECT url, posterUrl FROM cwsvjudo.`shiai.videos` WHERE wkId = :wkId;"
+ );
+ $vidQuery->bindParam(':wkId', intval($wkId), PDO::PARAM_INT);
+
+ $vidQuery->execute();
+ $wkVideos = $vidQuery->fetchAll(PDO::FETCH_ASSOC);
+
+
+ $vidList = array();
+ foreach( $wkVideos as $wkVid){
+ $vidList[] = array(
+ 'vidSrc' => $wkVid['url'],
+ 'posterSrc' => $wkVid['posterUrl'],
+// 'width' => $posterSize[0],
+// 'height' => $posterSize[1]
+ );
+ }
+
+/// Hilfsfunktion zum Anpassen der htmlDescription
+function descrName($aName){
+ $retVal = "Videos der Judoka des Chemnitzer WSV beim Wettkampf ".$aName;
+ if( strpos($aName, "Sommerabschlussgrillen") >= 0 ) $retVal = "Videos der Judoka des Chemnitzer WSV beim ".$aName;
+ if( strpos($aName, "Jahrendefeier") >= 0 ) $retVal = "Videos der Judoka des Chemnitzer WSV bei der ".$aName;
+return $retVal;
+}/// Ende descrName
+
+ $messages = array();
+?>
+
+
+
+ - Videoalbum
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Zur Galerieübersicht
+
+
+
+
+
+
+
+ - Videoalbum
+
+
+
+ [ Videos]
+
+
+
+ Auf die jeweiligen Bilder klicken um das Video anzuwählen.
+
+
+
+
+
+ $vidEntry ){
+ echo(
+ ""
+ );
+}
+?>
+
+
+
+
+
+
+
+
+
diff --git a/homepage/redesign2018/markdownExperiment/src/galleryHelper/videoGalleryVue.tmpl.php b/homepage/redesign2018/markdownExperiment/src/galleryHelper/videoGalleryVue.tmpl.php
new file mode 100644
index 0000000..b2391f7
--- /dev/null
+++ b/homepage/redesign2018/markdownExperiment/src/galleryHelper/videoGalleryVue.tmpl.php
@@ -0,0 +1,210 @@
+setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+
+ $wkId = $_GET['wkId'];
+
+ $vidQuery =
+ $cwsvJudoDbConnection->prepare(
+ "SELECT url, posterUrl FROM cwsvjudo.`shiai.videos` WHERE wkId = :wkId;"
+ );
+ $vidQuery->bindParam(':wkId', intval($wkId), PDO::PARAM_INT);
+
+ $vidQuery->execute();
+ $wkVideos = $vidQuery->fetchAll(PDO::FETCH_ASSOC);
+
+
+ $vidList = array();
+ foreach( $wkVideos as $wkVid){
+// $posterSrc = str_replace( ".webm", ".jpg", str_replace("webm/", "thumbnails/", $vid ) );
+// $posterSize = getimagesize( $posterSrc );
+ $vidList[] = array(
+ 'vidSrc' => $wkVid['url'],
+ 'posterSrc' => $wkVid['posterUrl'],
+// 'width' => $posterSize[0],
+// 'height' => $posterSize[1]
+ );
+ }
+
+/// Hilfsfunktion zum Anpassen der htmlDescription
+function descrName($aName){
+ $retVal = "Videos der Judoka des Chemnitzer WSV beim Wettkampf ".$aName;
+ if( strpos($aName, "Sommerabschlussgrillen") >= 0 ) $retVal = "Videos der Judoka des Chemnitzer WSV beim ".$aName;
+ if( strpos($aName, "Jahrendefeier") >= 0 ) $retVal = "Videos der Judoka des Chemnitzer WSV bei der ".$aName;
+return $retVal;
+}/// Ende descrName
+
+ $messages = array();
+?>
+
+
+
+ - Videoalbum
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Zur Galerieübersicht
+
+
+
+
+
+
+
+ - Videoalbum
+
+
+
+ [ Videos]
+
+
+
+ Auf die jeweiligen Bilder klicken um das Video anzuwählen.
+
+
+
+
+
+
+
+
+
diff --git a/homepage/redesign2018/markdownExperiment/src/galleryHelper/yamlRead.py b/homepage/redesign2018/markdownExperiment/src/galleryHelper/yamlRead.py
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/homepage/redesign2018/markdownExperiment/src/galleryHelper/yamlRead.py
@@ -0,0 +1 @@
+