Merge branch 'redesign2018' of /media/sdb1/gitRepositories/judo into redesign2018
Conflicts: homepage/redesign2018/markdownExperiment/src/Makefiles/Makefile.ftpUpload homepage/redesign2018/markdownExperiment/src/galleryHelper/videoGallery.tmpl.php
This commit is contained in:
@@ -13,47 +13,65 @@ try{
|
|||||||
$cwsvJudoConfig["db"]["password"]
|
$cwsvJudoConfig["db"]["password"]
|
||||||
);
|
);
|
||||||
|
|
||||||
$nodupesQuery = $dbConnection->prepare(
|
$dailyHitsQuery = $dbConnection->prepare(
|
||||||
"SELECT COUNT(*) AS anz, DATE(FROM_UNIXTIME( time )) as date FROM `phpcount_nodupes` GROUP BY date ORDER BY date DESC"
|
"SELECT COUNT(*) AS anz, DATE(timeStamp) as date FROM `phpcount_pageHits` GROUP BY date ORDER BY date DESC;"
|
||||||
);
|
);
|
||||||
$nodupesQuery->execute();
|
$dailyHitsQuery->execute();
|
||||||
$nodupesList = $nodupesQuery->fetchAll(PDO::FETCH_ASSOC);
|
$dailyHitsList = $dailyHitsQuery->fetchAll(PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
$uniqueHitsQuery = $dbConnection->prepare(
|
$whereClauses=array();
|
||||||
"SELECT pageid, hitcount FROM `phpcount_hits` WHERE isunique=1 ORDER BY hitcount DESC"
|
if($_GET['userHash'])
|
||||||
);
|
$whereClauses[]="userHash='".$_GET['userHash']."'";
|
||||||
$uniqueHitsQuery->execute();
|
if($_GET['date'])
|
||||||
$uniqueHitsList = $uniqueHitsQuery->fetchAll(PDO::FETCH_ASSOC);
|
$whereClauses[]="DATE(timestamp)='".$_GET['date']."'";
|
||||||
|
if($_GET['pageId'])
|
||||||
|
$whereClauses[]="pageId='".urldecode($_GET['pageId'])."'";
|
||||||
|
|
||||||
|
$whereClause = join(" AND ", $whereClauses);
|
||||||
|
|
||||||
$pagehitsQuery = $dbConnection->prepare(
|
$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, userAgentString FROM `phpcount_pageHits` ".
|
||||||
|
($whereClause?"WHERE ".$whereClause." ":"").
|
||||||
|
"ORDER BY timeStamp DESC;"
|
||||||
);
|
);
|
||||||
$pagehitsQuery->execute();
|
$pagehitsQuery->execute();
|
||||||
$pagehitsList = $pagehitsQuery->fetchAll(PDO::FETCH_ASSOC);
|
$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){
|
catch(PDOException $db_error){
|
||||||
die( "Error!: " . $db_error->getMessage() );
|
die( "Error!: " . $db_error->getMessage() );
|
||||||
}
|
}
|
||||||
|
//var_dump($dailyHitsList);
|
||||||
?>
|
?>
|
||||||
<html>
|
<html>
|
||||||
<body>
|
<body>
|
||||||
<img src="visitorCount.phplot.php" />
|
<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>
|
<table>
|
||||||
<tr><th>date</th><th>times</th></tr>
|
<tr><th><?php echo( join( "</th><th>", array_column($dailyHitsList, 'date') ) );?></th></tr>
|
||||||
<?php foreach($nodupesList as $nodupesEntry)
|
<tr><td><?php echo( join( "</td><td>", array_column($dailyHitsList, 'anz') ) );?></td></tr>
|
||||||
echo( "\t\t\t\t<tr><td>".$nodupesEntry['date']."</td><td>".$nodupesEntry['anz']."<td></tr>" );
|
|
||||||
?>
|
|
||||||
</table>
|
</table>
|
||||||
|
<hr />
|
||||||
<table>
|
<table>
|
||||||
<tr><th>Seite</th><th>times</th></tr>
|
<tr><th>date</th><th>time</th><th>pageId</th><th>userHash</th><th>userAgentString</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>
|
|
||||||
<?php foreach($pagehitsList as $pagehitsEntry)
|
<?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>" ).
|
||||||
|
"<td>".$pagehitsEntry['userAgentString']."</a><td></tr>";
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ global $cwsvJudoConfig;
|
|||||||
// Datenbankverbindung bereit stellen
|
// Datenbankverbindung bereit stellen
|
||||||
try{
|
try{
|
||||||
$db_connection = new PDO(
|
$db_connection = new PDO(
|
||||||
'mysql:host='.$cwsvJudoConfig["db"]["host"].';dbname='.$cwsvJudoConfig["db"]["name"],
|
'mysql:host='.$cwsvJudoConfig["db"]["host"].';dbname='.$cwsvJudoConfig["db"]["name"],//.';charset=utf8',
|
||||||
$cwsvJudoConfig["db"]["user"],
|
$cwsvJudoConfig["db"]["user"],
|
||||||
$cwsvJudoConfig["db"]["password"]
|
$cwsvJudoConfig["db"]["password"]
|
||||||
);
|
);
|
||||||
@@ -161,4 +161,46 @@ function toAscii($str, $replace=array(), $delimiter='-') {
|
|||||||
|
|
||||||
return $clean;
|
return $clean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function dbQuery($aDbConnection, $aQueryString, $aBindArray = array(), $someOptions = array( "dbCharset" => "ISO-8859-1", "outCharset" => "UTF-8" ) ){
|
||||||
|
//echo("Doing ".$aQueryString);
|
||||||
|
var_dump($aBindArray);
|
||||||
|
if( empty($someOptions['dbCharset']) ) $someOptions['dbCharset'] = "ISO-8859-1";
|
||||||
|
if( empty($someOptions['outCharset']) ) $someOptions['outCharset'] = "UTF-8";
|
||||||
|
/// @toDo: Bisher wird nur die Rückgabe konvertiert. Eigentlich muss
|
||||||
|
/// doch auch die Eingabe konvertiert werden. Aber das jetzt
|
||||||
|
/// umzustellen wird schwer! Die User m Wettkampfplaner sind ja z.B.
|
||||||
|
/// als UTF8 in latin1(?) gespeichert.
|
||||||
|
try{
|
||||||
|
$pdoStatement = $aDbConnection->prepare( $aQueryString );
|
||||||
|
foreach( $aBindArray as $bindName => $bind ){
|
||||||
|
$pdoStatement->bindValue(
|
||||||
|
$bindName,
|
||||||
|
$bind['value'],
|
||||||
|
(isset($bind['data_type'])?$bind['data_type']:PDO::PARAM_STR)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$pdoStatement->execute();
|
||||||
|
$ret = $pdoStatement->fetchAll(PDO::FETCH_ASSOC);
|
||||||
|
}
|
||||||
|
catch(PDOException $db_error){
|
||||||
|
print "Error!: " . $db_error->getMessage() . "<br/>";
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
//var_dump($ret);
|
||||||
|
// Zeichensatzkonvertierung
|
||||||
|
if( is_array($ret) ){
|
||||||
|
foreach($ret as &$entry){
|
||||||
|
array_walk(
|
||||||
|
$entry,
|
||||||
|
function (&$value, $key, $someOptions) {
|
||||||
|
$value = iconv($someOptions['dbCharset'], $someOptions['outCharset'], $value);
|
||||||
|
},
|
||||||
|
$someOptions
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ $htmlWkTableString = "";
|
|||||||
str_replace("mannschaft", "mann­schaft", $wk['Veranstaltung']);
|
str_replace("mannschaft", "mann­schaft", $wk['Veranstaltung']);
|
||||||
|
|
||||||
$htmlWkTableString .=
|
$htmlWkTableString .=
|
||||||
"<a href=\"http://cwsvjudo.bplaced.net/wkKalender/".$wk['lfdeNr']."\"><tr>".
|
"<a href=\"http://cwsvjudo.bplaced.net/wkKalender/".$wk['lfdeNr']."/".toAscii( html_entity_decode( $wk['Veranstaltung'] ))."-am-".$wk['Datum']."\"><tr>".
|
||||||
"<script type=\"application/ld+json\">".$wkJsonSd."</script>".
|
"<script type=\"application/ld+json\">".$wkJsonSd."</script>".
|
||||||
"<td data-title=\"Datum\" class=\"noWrap\">".
|
"<td data-title=\"Datum\" class=\"noWrap\">".
|
||||||
"<time class=\"kalenderDatum\" datetime=".$wk['Datum'].">".
|
"<time class=\"kalenderDatum\" datetime=".$wk['Datum'].">".
|
||||||
@@ -340,7 +340,7 @@ return
|
|||||||
"\"startDate\": \"".$wk['Datum']."\",".
|
"\"startDate\": \"".$wk['Datum']."\",".
|
||||||
"\"endDate\": \"".$wk['Datum']."\",".
|
"\"endDate\": \"".$wk['Datum']."\",".
|
||||||
// "\"url\": \"http://cwsvjudo.bplaced.net/pages/desktop/verein.wettkampfkalender.php?wkId=".$wk['lfdeNr']."\",".
|
// "\"url\": \"http://cwsvjudo.bplaced.net/pages/desktop/verein.wettkampfkalender.php?wkId=".$wk['lfdeNr']."\",".
|
||||||
"\"url\": \"http://cwsvjudo.bplaced.net/wkKalender/".$wk['lfdeNr']."/".toAscii( html_entity_decode( $wk['Veranstaltung'] ))."\",".
|
"\"url\": \"http://cwsvjudo.bplaced.net/wkKalender/".$wk['lfdeNr']."/".toAscii( html_entity_decode( $wk['Veranstaltung'] ))."-am-".$wk['Datum']."\",".
|
||||||
"\"description\": \"Judo-Wettkampf der Altersklasse(n) ".nicerAkList( $wk['Altersklassen'] )."\",".
|
"\"description\": \"Judo-Wettkampf der Altersklasse(n) ".nicerAkList( $wk['Altersklassen'] )."\",".
|
||||||
"\"performer\": {".
|
"\"performer\": {".
|
||||||
"\"@type\": \"PerformingGroup\"\,".
|
"\"@type\": \"PerformingGroup\"\,".
|
||||||
@@ -442,13 +442,34 @@ function wkTableHtml(){
|
|||||||
array_push($jahre, $row["DATE_FORMAT( Datum, '%Y')"]);
|
array_push($jahre, $row["DATE_FORMAT( Datum, '%Y')"]);
|
||||||
}
|
}
|
||||||
// ist das übergebene jahr ein gültiges?
|
// ist das übergebene jahr ein gültiges?
|
||||||
$jahr = $_GET["jahr"];
|
$jahr = is_positive_integer($_GET["jahr"])?$_GET["jahr"]:NULL;
|
||||||
|
|
||||||
if($jahr){
|
if($jahr){
|
||||||
if(in_array($jahr, $jahre)){
|
if(in_array($jahr, $jahre)){
|
||||||
$minDate = $jahr."-01-01";
|
$minDate = $jahr."-01-01";
|
||||||
$maxDate = $jahr."-12-31";
|
$maxDate = $jahr."-12-31";
|
||||||
$siteData['mainContent'] .=
|
$siteData['mainContent'] .=
|
||||||
"<h2>Wettkampfkalender ".$jahr."</h2>";
|
"<h2>Wettkampfkalender ".$jahr."</h2>";
|
||||||
|
$siteData['mainContent'].=
|
||||||
|
"<div style=\"display:flex;justify-content:space-between;\">";
|
||||||
|
|
||||||
|
if(in_array((intval($_GET["jahr"])-1), $jahre)){
|
||||||
|
$siteData['mainContent'].=
|
||||||
|
"<a class=\"touchLink\" href=\"http://cwsvjudo.bplaced.net/wkKalender?jahr=".
|
||||||
|
(is_positive_integer($_GET["jahr"])?intval($_GET["jahr"])-1:"").
|
||||||
|
"\">".(is_positive_integer($_GET["jahr"])?intval($_GET["jahr"])-1:"")."</a>";
|
||||||
|
}
|
||||||
|
else $siteData['mainContent'].="<a></a>";
|
||||||
|
// var_dump($_GET, $jahre);
|
||||||
|
if(in_array((intval($_GET["jahr"])+1), $jahre)){
|
||||||
|
$siteData['mainContent'].=
|
||||||
|
"<a class=\"touchLink\" href=\"http://cwsvjudo.bplaced.net/wkKalender?jahr=".
|
||||||
|
(is_positive_integer($_GET["jahr"])?intval($_GET["jahr"])+1:"").
|
||||||
|
"\">".(is_positive_integer($_GET["jahr"])?intval($_GET["jahr"])+1:"")."</a>";
|
||||||
|
}
|
||||||
|
else $siteData['mainContent'].="<a></a>";
|
||||||
|
$siteData['mainContent'].=
|
||||||
|
"</div>";
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$siteData['mainContent'] .=
|
$siteData['mainContent'] .=
|
||||||
|
|||||||
@@ -8,6 +8,13 @@
|
|||||||
|
|
||||||
require_once($basePath."/ressourcen/phpLib/phpcount/phpcount.php");
|
require_once($basePath."/ressourcen/phpLib/phpcount/phpcount.php");
|
||||||
|
|
||||||
|
function myUrlEncode($string) {
|
||||||
|
$entities = array( '%21', '%2A', '%27', '%28', '%29', '%3B', '%3A', '%40', '%26', '%3D', '%2B', '%24', '%2C', '%2F', '%3F', '%25', '%23', '%5B', '%5D');
|
||||||
|
$replacements = array( '!', '*', "'", "(", ")", ";", ":", "@", "&", "=", "+", "$", ",", "/", "?", "%", "#", "[", "]");
|
||||||
|
//return str_replace($entities, $replacements, urlencode($string));
|
||||||
|
return str_replace($entities, $replacements, rawurlencode($string));
|
||||||
|
}
|
||||||
|
|
||||||
function startsWith($haystack, $needle){
|
function startsWith($haystack, $needle){
|
||||||
$length = strlen($needle);
|
$length = strlen($needle);
|
||||||
return (substr($haystack, 0, $length) === $needle);
|
return (substr($haystack, 0, $length) === $needle);
|
||||||
@@ -55,6 +62,19 @@ return $retVal;
|
|||||||
$galleryId = "0";
|
$galleryId = "0";
|
||||||
$pickedImages = array();
|
$pickedImages = array();
|
||||||
|
|
||||||
|
// Wie es scheint ist sind die Dateinamen auf bplaced in "ISO-8859-1"
|
||||||
|
array_walk(
|
||||||
|
$imgList,
|
||||||
|
function (&$value, $key) {
|
||||||
|
$value = iconv( "UTF-8", "ISO-8859-1",$value);
|
||||||
|
//$value = urlencode($value);
|
||||||
|
//$value = urlencode($value);
|
||||||
|
//$value = myUrlEncode($value);
|
||||||
|
//$value=implode('/', array_map('rawurlencode', explode('/', $value)));
|
||||||
|
$value=implode('/', array_map('myUrlEncode', explode('/', $value)));
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
// echo("imgList: "); print_r($imgList);
|
// echo("imgList: "); print_r($imgList);
|
||||||
// foreach($imgList as $img){
|
// foreach($imgList as $img){
|
||||||
// echo(" ".$img." startsWith images/ :".startsWith($img, "images/")."\n");
|
// echo(" ".$img." startsWith images/ :".startsWith($img, "images/")."\n");
|
||||||
|
|||||||
Submodule homepage/redesign2018/markdownExperiment/phpLib/phpcount deleted from f1d3b543d2
@@ -1,27 +1,27 @@
|
|||||||
|
# Upload der Videogalleriedateien auf einen Webspace und Eintragen in
|
||||||
|
# die "Videodatenbank"
|
||||||
|
|
||||||
include Makefile.cfg
|
include Makefile.cfg
|
||||||
|
|
||||||
#ftpServer = ftpupload.net
|
#ftpServer = ftpupload.net
|
||||||
#ftpUser = unaux_22935783
|
#ftpUser = unaux_22935783
|
||||||
#ftpPassword = eeloor0D
|
#ftpPassword = eeloor0D
|
||||||
|
#httpUrlBase = http://cwsvjudo-media-2018.unaux.com/
|
||||||
#ftpPathBase = /htdocs
|
|
||||||
#ftpFilePath = videoalben/videoalben.2018
|
|
||||||
|
|
||||||
ftpServer = cwsvjudo.bplaced.net
|
ftpServer = cwsvjudo.bplaced.net
|
||||||
ftpUser = cwsvjudo
|
ftpUser = cwsvjudo
|
||||||
ftpPassword = ***REMOVED***
|
ftpPassword = ***REMOVED***
|
||||||
|
httpUrlBase = http://cwsvjudo.bplaced.net.net/
|
||||||
|
|
||||||
ftpPathBase = /www
|
|
||||||
ftpFilePath = videoalben/videoalben.2018
|
ftpFilePath = videoalben/videoalben.2018
|
||||||
|
ftpPathBase = /www
|
||||||
|
|
||||||
vidGalIndexPhp = ~/keeper/judo/homepage/redesign2018/markdownExperiment/src/galleryTemplates/indexHier.php
|
vidGalIndexPhp = ~/keeper/judo/homepage/redesign2018/markdownExperiment/src/galleryTemplates/indexHier.php
|
||||||
dryRun = --dry-run
|
dryRun = --dry-run
|
||||||
timeHandling= --only-newer
|
timeHandling= --only-newer
|
||||||
lftpNetLimitRate = 0
|
lftpNetLimitRate = 0
|
||||||
|
|
||||||
|
|
||||||
domain = cwsvJudo.dedyn.io
|
domain = cwsvJudo.dedyn.io
|
||||||
|
|
||||||
vidGalInsertScript = ~/keeper/judo/homepage/redesign2018/markdownExperiment/src/galleryHelper/vidGalInsert.py
|
vidGalInsertScript = ~/keeper/judo/homepage/redesign2018/markdownExperiment/src/galleryHelper/vidGalInsert.py
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#FFMPEG = /c/proggis/media/editoren/ffmpeg-4.0.2-win64-static/bin/ffmpeg.exe
|
FFMPEG = /c/proggis/media/editoren/ffmpeg-4.0.2-win64-static/bin/ffmpeg.exe
|
||||||
FFMPEG = ffmpeg
|
#FFMPEG = ffmpeg
|
||||||
#GUETZLI = /d/projekte/tests/guetzli.git/bin/Release/guetzli.exe
|
GUETZLI = /d/projekte/tests/guetzli.git/bin/Release/guetzli.exe
|
||||||
GUETZLI = /home/marko/proggis/guetzli/bin/Release/guetzli
|
#GUETZLI = /home/marko/proggis/guetzli/bin/Release/guetzli
|
||||||
|
|
||||||
#DEFAULT_FFMPEG = ffmpeg
|
DEFAULT_FFMPEG = ffmpeg
|
||||||
DEFAULT_FFMPEG = /c/proggis/media/editoren/ffmpeg-4.0.2-win64-static/bin/ffmpeg.exe
|
#DEFAULT_FFMPEG = /c/proggis/media/editoren/ffmpeg-4.0.2-win64-static/bin/ffmpeg.exe
|
||||||
|
|
||||||
# Für eine schnelle Komprimierung libvpx, sonst vp9
|
# Für eine schnelle Komprimierung libvpx, sonst vp9
|
||||||
DEFAULT_VID_CODEC_HEIGHT = 360
|
DEFAULT_VID_CODEC_HEIGHT = 360
|
||||||
@@ -20,13 +20,14 @@ 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_WIDTH := $(if $(VID_CODEC_WIDTH),$(VID_CODEC_WIDTH),$(DEFAULT_VID_CODEC_WIDTH))
|
||||||
VID_CODEC := $(if $(VID_CODEC),$(VID_CODEC),$(DEFAULT_VID_CODEC))
|
VID_CODEC := $(if $(VID_CODEC),$(VID_CODEC),$(DEFAULT_VID_CODEC))
|
||||||
|
|
||||||
#VID_CODEC_DEADLINE := -deadline best
|
defaultTargetSourceDirectories = $(sort $(dir $(wildcard ./videos/aufnahmen/*/)))
|
||||||
VID_CODEC_DEADLINE := -deadline realtime
|
VID_CODEC_DEADLINE := -deadline best
|
||||||
|
#VID_CODEC_DEADLINE := -deadline realtime
|
||||||
|
|
||||||
targetSourceDirectories = $(sort $(dir $(wildcard ./videos/aufnahmen/*/)))
|
targetSourceDirectories = $(sort $(dir $(wildcard ./videos/aufnahmen/*/)))
|
||||||
targetSourceDir = videos/aufnahmen/
|
|
||||||
sourceVideos = $(wildcard videos/.forCompressing/*.video)
|
|
||||||
|
|
||||||
|
targetSourceDirectories := $(if $(targetSourceDirectories), $(targetSourceDirectories), $(defaultTargetSourceDirectories))
|
||||||
|
sourceVideos = $(wildcard videos/.forCompressing/*.video)
|
||||||
|
|
||||||
vidstabLogs = $(addsuffix .trf, $(basename $(sourceVideos)))
|
vidstabLogs = $(addsuffix .trf, $(basename $(sourceVideos)))
|
||||||
firstPassLogs = $(addsuffix .firstPassLog-0.log, $(basename $(sourceVideos)))
|
firstPassLogs = $(addsuffix .firstPassLog-0.log, $(basename $(sourceVideos)))
|
||||||
@@ -40,7 +41,10 @@ ffmpegVideoFilterVidstabTransform = vidstabtransform=optzoom=2:interpol=bicubic:
|
|||||||
|
|
||||||
ffmpegVideoScaleFilter = scale=$(VID_CODEC_WIDTH):$(VID_CODEC_HEIGHT):sws_flags=lanczos,
|
ffmpegVideoScaleFilter = scale=$(VID_CODEC_WIDTH):$(VID_CODEC_HEIGHT):sws_flags=lanczos,
|
||||||
ffmpegVideoFilterDeinterlace = yadif,
|
ffmpegVideoFilterDeinterlace = yadif,
|
||||||
ffmpegVideoFilterDenoise = hqdn3d,
|
ffmpegVideoFilterDenoise = nlmeans,
|
||||||
|
#ffmpegVideoFilterDenoise = hqdn3d,
|
||||||
|
ffmpegDisplayAspectRatio = 16:9
|
||||||
|
#ffmpegDisplayAspectRatio = 9:16
|
||||||
|
|
||||||
|
|
||||||
.SECONDARY: $(vidstabLogs) $(firstPassLogs)
|
.SECONDARY: $(vidstabLogs) $(firstPassLogs)
|
||||||
@@ -92,13 +96,14 @@ videos/.forCompressing/%.trf: videos/.forCompressing/%.video
|
|||||||
|
|
||||||
videos/.forCompressing/%.firstPassLog-0.log: videos/.forCompressing/%.video videos/.forCompressing/%.trf
|
videos/.forCompressing/%.firstPassLog-0.log: videos/.forCompressing/%.video videos/.forCompressing/%.trf
|
||||||
# -b:v $(VID_CODEC_BITRATE) \
|
# -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
|
# First Pass
|
||||||
$(FFMPEG) -i $< \
|
$(FFMPEG) -i $< \
|
||||||
-filter:v $(ffmpegVideoFilterDeinterlace)$(ffmpegVideoFilterDenoise)$(ffmpegVideoFilterVidstabTransform):input="$(basename $<).trf",$(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) \
|
-codec:v $(VID_CODEC) \
|
||||||
-pass 1 \
|
-pass 1 \
|
||||||
-passlogfile "$(basename $<).firstPassLog" \
|
-passlogfile "$(basename $<).firstPassLog" \
|
||||||
-aspect 16:9 \
|
-aspect $(ffmpegDisplayAspectRatio) \
|
||||||
-threads 1 \
|
-threads 1 \
|
||||||
-speed 4 \
|
-speed 4 \
|
||||||
-tile-columns 0 \
|
-tile-columns 0 \
|
||||||
@@ -123,9 +128,15 @@ videos/webm/%.webm: videos/.forCompressing/%.video videos/.forCompressing/%.trf
|
|||||||
-codec:v $(VID_CODEC) \
|
-codec:v $(VID_CODEC) \
|
||||||
-pass 2 \
|
-pass 2 \
|
||||||
-passlogfile "$(basename $<).firstPassLog" \
|
-passlogfile "$(basename $<).firstPassLog" \
|
||||||
|
<<<<<<< HEAD
|
||||||
|
-deadline best \
|
||||||
|
-b:v $(shell /d/temp/cwsvJudo/homepage/redesign2018/markdownExperiment/src/galleryHelper/getVideoDurationJson.py $<)k \
|
||||||
|
-aspect $(ffmpegDisplayAspectRatio)\
|
||||||
|
=======
|
||||||
$(VID_CODEC_DEADLINE) \
|
$(VID_CODEC_DEADLINE) \
|
||||||
-b:v $(shell ~/keeper/judo/homepage/redesign2018/markdownExperiment/src/galleryHelper/getVideoDurationJson.py $<)k \
|
-b:v $(shell ~/keeper/judo/homepage/redesign2018/markdownExperiment/src/galleryHelper/getVideoDurationJson.py $<)k \
|
||||||
-aspect 16:9 \
|
-aspect 16:9 \
|
||||||
|
>>>>>>> a763569bdbb2f100ce14b50dcb7828db4e6f4852
|
||||||
-threads 1 \
|
-threads 1 \
|
||||||
-speed 0 \
|
-speed 0 \
|
||||||
-tile-columns 0 \
|
-tile-columns 0 \
|
||||||
@@ -141,9 +152,15 @@ videos/webm/%.webm: videos/.forCompressing/%.video videos/.forCompressing/%.trf
|
|||||||
videos/thumbnails/%.png: videos/.forCompressing/%.video
|
videos/thumbnails/%.png: videos/.forCompressing/%.video
|
||||||
mkdir -p videos/thumbnails
|
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 "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
|
videos/thumbnails/%.jpg: videos/thumbnails/%.png
|
||||||
|
<<<<<<< HEAD
|
||||||
|
$(GUETZLI) --quality 90 "$<" "$@"
|
||||||
|
=======
|
||||||
# $(GUETZLI) --quality 90 "$<" "$@"
|
# $(GUETZLI) --quality 90 "$<" "$@"
|
||||||
convert "$<" "$@"
|
convert "$<" "$@"
|
||||||
|
|
||||||
|
>>>>>>> a763569bdbb2f100ce14b50dcb7828db4e6f4852
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ include_once("config.inc.php");
|
|||||||
|
|
||||||
$vidQuery =
|
$vidQuery =
|
||||||
$cwsvJudoDbConnection->prepare(
|
$cwsvJudoDbConnection->prepare(
|
||||||
"SELECT url FROM cwsvjudo.`shiai.videos` WHERE wkId = :wkId;"
|
"SELECT url, posterUrl FROM cwsvjudo.`shiai.videos` WHERE wkId = :wkId;"
|
||||||
);
|
);
|
||||||
$vidQuery->bindParam(':wkId', intval($wkId), PDO::PARAM_INT);
|
$vidQuery->bindParam(':wkId', intval($wkId), PDO::PARAM_INT);
|
||||||
|
|
||||||
@@ -29,9 +29,10 @@ include_once("config.inc.php");
|
|||||||
foreach( $wkVideos as $wkVid){
|
foreach( $wkVideos as $wkVid){
|
||||||
// $posterSrc = str_replace( ".webm", ".jpg", str_replace("webm/", "thumbnails/", $vid ) );
|
// $posterSrc = str_replace( ".webm", ".jpg", str_replace("webm/", "thumbnails/", $vid ) );
|
||||||
// $posterSize = getimagesize( $posterSrc );
|
// $posterSize = getimagesize( $posterSrc );
|
||||||
|
// 'posterSrc' => $posterSrc,
|
||||||
$vidList[] = array(
|
$vidList[] = array(
|
||||||
'vidSrc' => $wkVid['url'],
|
'vidSrc' => $wkVid['url'],
|
||||||
// 'posterSrc' => $posterSrc,
|
'posterSrc' => $wkVid['posterUrl'],
|
||||||
// 'width' => $posterSize[0],
|
// 'width' => $posterSize[0],
|
||||||
// 'height' => $posterSize[1]
|
// 'height' => $posterSize[1]
|
||||||
);
|
);
|
||||||
@@ -72,13 +73,10 @@ return $retVal;
|
|||||||
|
|
||||||
<link rel="canonical" href="http://cwsvjudo.bplaced.net<?php echo $_SERVER['REQUEST_URI']?>" />
|
<link rel="canonical" href="http://cwsvjudo.bplaced.net<?php echo $_SERVER['REQUEST_URI']?>" />
|
||||||
|
|
||||||
<!--
|
<script type="text/javascript" src="<?php echo($urlBase)?>/ressourcen/blueimpGallery/js/blueimp-gallery.min.js" async=""></script>
|
||||||
<script type="text/javascript" src="/ressourcen/blueimpGallery/js/blueimp-gallery.min.js" async=""></script>
|
|
||||||
-->
|
|
||||||
<!--https://github.com/aFarkas/lazysizes-->
|
<!--https://github.com/aFarkas/lazysizes-->
|
||||||
<!--
|
<script src="<?php echo($urlBase)?>/ressourcen/jsLib/lazysizes.min.js" async=""></script>
|
||||||
<script src="/ressourcen/jsLib/lazysizes.min.js" async=""></script>
|
|
||||||
-->
|
|
||||||
<style>
|
<style>
|
||||||
img.lazyload {
|
img.lazyload {
|
||||||
display: none;
|
display: none;
|
||||||
@@ -108,6 +106,7 @@ return $retVal;
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body style="color: #000000; background-color: #FFAE00" >
|
<body style="color: #000000; background-color: #FFAE00" >
|
||||||
|
<iframe style="width:100%;height:auto;" src="http://cwsvjudo-media-2018.unaux.com/videoalben/videoalben.2018/2018-11-24-RKPXXI-U7U9U11-Schlettau/"></iframe>
|
||||||
<a title="Galerien der Judoka des Chemnitzer WSV" href="/galerien">Zur Galerieübersicht</a>
|
<a title="Galerien der Judoka des Chemnitzer WSV" href="/galerien">Zur Galerieübersicht</a>
|
||||||
<?php
|
<?php
|
||||||
/// Eine kleine Messagebox
|
/// Eine kleine Messagebox
|
||||||
@@ -182,9 +181,10 @@ return $retVal;
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
foreach( $vidList as $vidKey => $vidEntry ){
|
foreach( $vidList as $vidKey => $vidEntry ){
|
||||||
echo(
|
echo(
|
||||||
"<video controls preload=\"none\">".
|
"<video controls preload=\"none\" poster=\"".$vidEntry['posterSrc']."\">".
|
||||||
"<source src=\"".$vidEntry['vidSrc']."\" type=\"video/webm\">".
|
"<source src=\"".$vidEntry['vidSrc']."\" type=\"video/webm\">".
|
||||||
"Dieser Browser scheint das Video nicht abspielen zu können.".
|
"Dieser Browser scheint das Video nicht abspielen zu können.".
|
||||||
"</video>"
|
"</video>"
|
||||||
@@ -202,7 +202,7 @@ foreach( $vidList as $vidKey => $vidEntry ){
|
|||||||
// "src=\"".$vidEntry['posterSrc']."\"".
|
// "src=\"".$vidEntry['posterSrc']."\"".
|
||||||
// "srcset=\"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\"".
|
// "srcset=\"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\"".
|
||||||
"id=\"Video".( $vidKey )."\" ".
|
"id=\"Video".( $vidKey )."\" ".
|
||||||
// "data-src=\"".( $vidEntry['posterSrc'] )."\" ".
|
"data-src=\"".( $vidEntry['posterSrc'] )."\" ".
|
||||||
// "width=\"".$vidEntry['width']."\" ".
|
// "width=\"".$vidEntry['width']."\" ".
|
||||||
// "height=\"".$vidEntry['height']."\" ".
|
// "height=\"".$vidEntry['height']."\" ".
|
||||||
"alt=\"[".( $vidKey + 1 )."/".( count($vidList) )."]\" ".
|
"alt=\"[".( $vidKey + 1 )."/".( count($vidList) )."]\" ".
|
||||||
@@ -212,7 +212,7 @@ foreach( $vidList as $vidKey => $vidEntry ){
|
|||||||
echo(
|
echo(
|
||||||
"<noscript>".
|
"<noscript>".
|
||||||
// "<video controls preload=\"none\" poster=\"".$vidEntry['posterSrc']."\" width=\"".$vidEntry['width']."\" height=\"".$vidEntry['height']."\">".
|
// "<video controls preload=\"none\" poster=\"".$vidEntry['posterSrc']."\" width=\"".$vidEntry['width']."\" height=\"".$vidEntry['height']."\">".
|
||||||
"<video controls preload=\"none\">".
|
"<video controls preload=\"none\" poster=\"".$vidEntry['posterSrc']."\">".
|
||||||
"<source src=\"".$vidEntry['vidSrc']."\" type=\"video/webm\">".
|
"<source src=\"".$vidEntry['vidSrc']."\" type=\"video/webm\">".
|
||||||
"Dieser Browser scheint das Video nicht abspielen zu können.".
|
"Dieser Browser scheint das Video nicht abspielen zu können.".
|
||||||
"</video>".
|
"</video>".
|
||||||
@@ -225,6 +225,7 @@ foreach( $vidList as $vidKey => $vidEntry ){
|
|||||||
|
|
||||||
<!-- BluimpGalerry Lightbox Version -->
|
<!-- BluimpGalerry Lightbox Version -->
|
||||||
<!-- The Gallery as lightbox dialog, should be a child element of the document body -->
|
<!-- The Gallery as lightbox dialog, should be a child element of the document body -->
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<div id="blueimp-gallery" class="blueimp-gallery blueimp-gallery-controls">
|
<div id="blueimp-gallery" class="blueimp-gallery blueimp-gallery-controls">
|
||||||
<div class="slides"></div>
|
<div class="slides"></div>
|
||||||
@@ -241,7 +242,6 @@ foreach( $vidList as $vidKey => $vidEntry ){
|
|||||||
<?php
|
<?php
|
||||||
foreach( $vidList as $vidEntry){
|
foreach( $vidList as $vidEntry){
|
||||||
// echo "{href: '".$vidEntry['vidSrc']."', poster: '".$vidEntry['posterSrc']."', type: 'video/webm'},";
|
// echo "{href: '".$vidEntry['vidSrc']."', poster: '".$vidEntry['posterSrc']."', type: 'video/webm'},";
|
||||||
echo "{href: '".$vidEntry['vidSrc']."', type: 'video/webm'},";
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
];
|
];
|
||||||
@@ -260,7 +260,8 @@ foreach( $vidList as $vidKey => $vidEntry ){
|
|||||||
xmlHttp.send(null);
|
xmlHttp.send(null);
|
||||||
},
|
},
|
||||||
*/
|
*/
|
||||||
startSlideshow: true,
|
preloadRange: 0,
|
||||||
|
startSlideshow: false,
|
||||||
stretchImages: true,
|
stretchImages: true,
|
||||||
index: startIndex,
|
index: startIndex,
|
||||||
}
|
}
|
||||||
@@ -273,6 +274,6 @@ foreach( $vidList as $vidKey => $vidEntry ){
|
|||||||
// startGalleryShow();
|
// startGalleryShow();
|
||||||
</script>
|
</script>
|
||||||
<hr/>
|
<hr/>
|
||||||
-->
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -0,0 +1,210 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$basePath = "/users/cwsvjudo/www";
|
||||||
|
include_once("config.inc.php");
|
||||||
|
|
||||||
|
require_once($basePath."/config/phpcount.config.php");
|
||||||
|
require_once($basePath."/config/cwsvJudo.config.php");
|
||||||
|
|
||||||
|
require_once($basePath."/ressourcen/phpLib/phpcount/phpcount.php");
|
||||||
|
|
||||||
|
require_once($basePath."/ressourcen/phpLib/cwsvJudo/miscAssis.php");
|
||||||
|
|
||||||
|
$cwsvJudoDbConnection = getCwsvJudoDbConn();
|
||||||
|
$cwsvJudoDbConnection->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();
|
||||||
|
?>
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html lang="de">
|
||||||
|
<head>
|
||||||
|
<title><?php echo $wkName?> - Videoalbum</title>
|
||||||
|
<?php //PHPCount::AddHit($wkName." - Videoalbum");?>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
|
<meta name="description" content="<?php echo descrName($wkName);?>">
|
||||||
|
<meta name="keywords" content="Album, Videos">
|
||||||
|
|
||||||
|
<!-- favIcon und Co nach der empfehlung von https://github.com/audreyr/favicon-cheat-sheet -->
|
||||||
|
<link rel="shortcut icon" type="image/x-icon" sizes="16x16 32x32 48x48 64x64" href="/ressourcen/graphiken/logos/favicon/favicon.ico">
|
||||||
|
<link rel="apple-touch-icon" sizes="152x152" href="/ressourcen/graphiken/logos/apple-touch-icon/apple-touch-icon-152.png" />
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="/ressourcen/graphiken/logos/apple-touch-icon/apple-touch-icon-180.png" />
|
||||||
|
<link rel="manifest" href="/manifest.json">
|
||||||
|
|
||||||
|
<link rel="canonical" href="http://cwsvjudo.bplaced.net<?php echo $_SERVER['REQUEST_URI']?>" />
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript" src="https://unpkg.com/vue@2.4.3/dist/vue.js"></script>
|
||||||
|
<script type="text/javascript" src="https://unpkg.com/vue-gallery"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="https://unpkg.com/blueimp-gallery@2.27.0/js/blueimp-gallery.js"></script>
|
||||||
|
<script type="text/javascript" src="https://unpkg.com/blueimp-gallery@2.27.0/js/blueimp-gallery-youtube.js"></script>
|
||||||
|
<script type="text/javascript" src="https://unpkg.com/blueimp-gallery@2.27.0/js/blueimp-gallery-video.js"></script>
|
||||||
|
<script type="text/javascript" src="https://unpkg.com/blueimp-gallery@2.27.0/js/blueimp-gallery-fullscreen.js"></script>
|
||||||
|
<script type="text/javascript" src="https://unpkg.com/blueimp-gallery@2.27.0/js/blueimp-helper.js"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" href="https://unpkg.com/blueimp-gallery@2.27.0/css/blueimp-gallery.min.css">
|
||||||
|
<style type="text/css">
|
||||||
|
.image {
|
||||||
|
float: left;
|
||||||
|
background-size: cover;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center center;
|
||||||
|
border: 1px solid #ebebeb;
|
||||||
|
margin: 5px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script type="text/javascript">
|
||||||
|
window.onload=function(){
|
||||||
|
new Vue({
|
||||||
|
el: '#app',
|
||||||
|
data: function () {
|
||||||
|
return {
|
||||||
|
images: [
|
||||||
|
{
|
||||||
|
title: 'A YouYube video',
|
||||||
|
href: 'https://www.youtube.com/watch?v=hNdlUHBJDKs',
|
||||||
|
type: 'text/html',
|
||||||
|
youtube: 'hNdlUHBJDKs',
|
||||||
|
poster: 'https://img.youtube.com/vi/hNdlUHBJDKs/maxresdefault.jpg'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'A YouYube video 2',
|
||||||
|
href: 'https://www.youtube.com/watch?v=s5iUsaPPtnk',
|
||||||
|
type: 'text/html',
|
||||||
|
youtube: 's5iUsaPPtnk',
|
||||||
|
poster: 'https://img.youtube.com/vi/s5iUsaPPtnk/maxresdefault.jpg'
|
||||||
|
},
|
||||||
|
<?php
|
||||||
|
//foreach( $vidList as $vidKey => $vidEntry ){
|
||||||
|
// echo(
|
||||||
|
// "{href: '".$vidEntry['vidSrc']."', poster: '".$vidEntry['posterSrc']."', type: 'video/webm'},"
|
||||||
|
// );
|
||||||
|
//}
|
||||||
|
?>
|
||||||
|
{
|
||||||
|
title: 'Image',
|
||||||
|
href: 'https://dummyimage.com/1600/ffffff/000000',
|
||||||
|
type: 'image/jpeg',
|
||||||
|
poster: 'https://dummyimage.com/350/ffffff/000000'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
index: null
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
components: {
|
||||||
|
'gallery': VueGallery
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<!--https://github.com/aFarkas/lazysizes-->
|
||||||
|
<script src="<?php echo($urlBase)?>/ressourcen/jsLib/lazysizes.min.js" async=""></script>
|
||||||
|
<style>
|
||||||
|
img.lazyload {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
body{box-sizing: border-box; margin: 0;}
|
||||||
|
.smallFont{font-size: small;}
|
||||||
|
.centerText{text-align: center;}
|
||||||
|
.navButton{
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-color: white;
|
||||||
|
border-style: outset;
|
||||||
|
border-radius: 1em;
|
||||||
|
text-align: center;
|
||||||
|
text-decoration: none;
|
||||||
|
cursor: pointer;
|
||||||
|
display: inline-block;
|
||||||
|
padding-left: .5em;
|
||||||
|
padding-right: .5em;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body style="color: #000000; background-color: #FFAE00" >
|
||||||
|
<a title="Galerien der Judoka des Chemnitzer WSV" href="/galerien">Zur Galerieübersicht</a>
|
||||||
|
<?php
|
||||||
|
/// Eine kleine Messagebox
|
||||||
|
if( !empty($messages) ){
|
||||||
|
?>
|
||||||
|
<div style="border: 1px solid black">
|
||||||
|
<?php
|
||||||
|
if( !empty( $messages['info'] ) ) echo( $messages['info'] );
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<h1 class="centerText" >
|
||||||
|
<?php echo($wkName);?> - Videoalbum
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<p class="centerText smallFont">
|
||||||
|
[<?php echo count($vidList)?> Videos]
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="centerText smallFont">
|
||||||
|
Auf die jeweiligen Bilder klicken um das Video anzuwählen.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<!--vueGallery-->
|
||||||
|
<div id="app">
|
||||||
|
<gallery
|
||||||
|
:images="images"
|
||||||
|
:index="index"
|
||||||
|
:options="{youTubeVideoIdProperty: 'youtube', youTubePlayerVars: undefined, youTubeClickToPlay: true}"
|
||||||
|
@close="index = null"
|
||||||
|
></gallery>
|
||||||
|
<div
|
||||||
|
class="image"
|
||||||
|
v-for="image, imageIndex in images"
|
||||||
|
@click="index = imageIndex"
|
||||||
|
:style="{ backgroundImage: 'url(' + image.poster + ')', width: '300px', height: '200px' }"
|
||||||
|
></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
@@ -0,0 +1,353 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* phpcount.php Ver.1.1- An "anoymizing" hit counter.
|
||||||
|
* Copyright (C) 2013 Taylor Hornby
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This PHP Class provides a hit counter that is able to track unique hits
|
||||||
|
* without recording the visitor's IP address in the database. It does so by
|
||||||
|
* recording the hash of the IP address and page name.
|
||||||
|
*
|
||||||
|
* By hashing the IP address with page name as salt, you prevent yourself from
|
||||||
|
* being able to track a user as they navigate your site. You also prevent
|
||||||
|
* yourself from being able to recover anyone's IP address without brute forcing
|
||||||
|
* through all of the assigned IP address blocks in use by the internet.
|
||||||
|
*
|
||||||
|
* Contact: havoc AT defuse.ca
|
||||||
|
* WWW: https://defuse.ca/
|
||||||
|
*
|
||||||
|
* USAGE:
|
||||||
|
* In your script, use reqire_once() to import this script, then call the
|
||||||
|
* functions like PHPCount::AddHit(...); See each function for help.
|
||||||
|
*
|
||||||
|
* NOTE: You must set the database credentials in the InitDB method.
|
||||||
|
*/
|
||||||
|
|
||||||
|
//global $phpcountConfig;
|
||||||
|
//var_dump($phpcountConfig);
|
||||||
|
|
||||||
|
|
||||||
|
class PHPCount
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Defines how many seconds a hit should be rememberd for. This prevents the
|
||||||
|
* database from perpetually increasing in size. Thirty days (the default)
|
||||||
|
* works well. If someone visits a page and comes back in a month, it will be
|
||||||
|
* counted as another unique hit.
|
||||||
|
*/
|
||||||
|
const HIT_OLD_AFTER_SECONDS = 2592000; // default: 30 days.
|
||||||
|
|
||||||
|
// Don't count hits from search robots and crawlers.
|
||||||
|
const IGNORE_SEARCH_BOTS = true;
|
||||||
|
|
||||||
|
// Don't count the hit if the browser sends the DNT: 1 header.
|
||||||
|
const HONOR_DO_NOT_TRACK = false;
|
||||||
|
|
||||||
|
private static $IP_IGNORE_LIST = array(
|
||||||
|
'127.0.0.1',
|
||||||
|
);
|
||||||
|
|
||||||
|
private static $DB = false;
|
||||||
|
|
||||||
|
private static function InitDB()
|
||||||
|
{
|
||||||
|
global $phpcountConfig;
|
||||||
|
//var_dump($phpcountConfig);
|
||||||
|
|
||||||
|
if(self::$DB)
|
||||||
|
return;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// TODO: Set the database login credentials.
|
||||||
|
//echo("<!--");
|
||||||
|
//var_dump($phpcountConfig);
|
||||||
|
self::$DB = new PDO(
|
||||||
|
'mysql:host='.$phpcountConfig["db"]["host"] .';dbname='.$phpcountConfig["db"]["name"],
|
||||||
|
$phpcountConfig["db"]["user"], // Username
|
||||||
|
$phpcountConfig["db"]["password"]//, // Password
|
||||||
|
//array(PDO::ATTR_PERSISTENT => true)
|
||||||
|
);
|
||||||
|
//echo("-->");
|
||||||
|
}
|
||||||
|
catch(Exception $e)
|
||||||
|
{
|
||||||
|
self::$DB = false;
|
||||||
|
echo("Failed to connect to phpcount database (".$e->getMessage().")\n");
|
||||||
|
// die('Failed to connect to phpcount database ('.$e->getMessage().')');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function setDBAdapter($db)
|
||||||
|
{
|
||||||
|
self::$DB = $db;
|
||||||
|
return $db;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Adds a hit to a page specified by a unique $pageID string.
|
||||||
|
*/
|
||||||
|
public static function AddHit($pageID)
|
||||||
|
{
|
||||||
|
if(self::IGNORE_SEARCH_BOTS && self::IsSearchBot())
|
||||||
|
return false;
|
||||||
|
if(in_array($_SERVER['REMOTE_ADDR'], self::$IP_IGNORE_LIST))
|
||||||
|
return false;
|
||||||
|
if(
|
||||||
|
self::HONOR_DO_NOT_TRACK &&
|
||||||
|
isset($_SERVER['HTTP_DNT']) && $_SERVER['HTTP_DNT'] == "1"
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
self::InitDB();
|
||||||
|
|
||||||
|
self::Cleanup();
|
||||||
|
if(self::UniqueHit($pageID))
|
||||||
|
{
|
||||||
|
self::CountHit($pageID, true);
|
||||||
|
self::LogHit($pageID);
|
||||||
|
}
|
||||||
|
self::CountHit($pageID, false);
|
||||||
|
|
||||||
|
self::LogPageHit($pageID);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Returns (int) the amount of hits a page has
|
||||||
|
* $pageID - the page identifier
|
||||||
|
* $unique - true if you want unique hit count
|
||||||
|
*/
|
||||||
|
public static function GetHits($pageID, $unique = false){
|
||||||
|
global $phpcountConfig;
|
||||||
|
self::InitDB();
|
||||||
|
|
||||||
|
try{
|
||||||
|
$q = self::$DB->prepare(
|
||||||
|
'SELECT hitcount FROM '.$phpcountConfig["db"]["hitsTable"].'
|
||||||
|
WHERE pageid = :pageid AND isunique = :isunique'
|
||||||
|
);
|
||||||
|
$q->bindParam(':pageid', $pageID);
|
||||||
|
$q->bindParam(':isunique', $unique);
|
||||||
|
$q->execute();
|
||||||
|
}
|
||||||
|
catch(Exeption $e){
|
||||||
|
echo("Failed to getHits from phpcount database (".$e->getMessage().")\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(($res = $q->fetch()) !== FALSE)
|
||||||
|
{
|
||||||
|
return (int)$res['hitcount'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//die("Missing hit count from database!");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Returns the total amount of hits to the entire website
|
||||||
|
* When $unique is FALSE, it returns the sum of all non-unique hit counts
|
||||||
|
* for every page. When $unique is TRUE, it returns the sum of all unique
|
||||||
|
* hit counts for every page, so the value that's returned IS NOT the
|
||||||
|
* amount of site-wide unique hits, it is the sum of each page's unique
|
||||||
|
* hit count.
|
||||||
|
*/
|
||||||
|
public static function GetTotalHits($unique = false){
|
||||||
|
global $phpcountConfig;
|
||||||
|
|
||||||
|
self::InitDB();
|
||||||
|
|
||||||
|
$q = self::$DB->prepare(
|
||||||
|
'SELECT hitcount FROM '.$phpcountConfig["db"]["hitsTable"].' WHERE isunique = :isunique'
|
||||||
|
);
|
||||||
|
$q->bindParam(':isunique', $unique);
|
||||||
|
$q->execute();
|
||||||
|
$rows = $q->fetchAll();
|
||||||
|
|
||||||
|
$total = 0;
|
||||||
|
foreach($rows as $row)
|
||||||
|
{
|
||||||
|
$total += (int)$row['hitcount'];
|
||||||
|
}
|
||||||
|
return $total;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*====================== PRIVATE METHODS =============================*/
|
||||||
|
|
||||||
|
private static function IsSearchBot()
|
||||||
|
{
|
||||||
|
// Of course, this is not perfect, but it at least catches the major
|
||||||
|
// search engines that index most often.
|
||||||
|
$keywords = array(
|
||||||
|
'bot',
|
||||||
|
'spider',
|
||||||
|
'spyder',
|
||||||
|
'crawlwer',
|
||||||
|
'walker',
|
||||||
|
'search',
|
||||||
|
'yahoo',
|
||||||
|
'holmes',
|
||||||
|
'htdig',
|
||||||
|
'archive',
|
||||||
|
'tineye',
|
||||||
|
'yacy',
|
||||||
|
'yeti',
|
||||||
|
);
|
||||||
|
|
||||||
|
$agent = strtolower($_SERVER['HTTP_USER_AGENT']);
|
||||||
|
|
||||||
|
foreach($keywords as $keyword)
|
||||||
|
{
|
||||||
|
if(strpos($agent, $keyword) !== false)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function UniqueHit($pageID){
|
||||||
|
global $phpcountConfig;
|
||||||
|
|
||||||
|
$ids_hash = self::IDHash($pageID);
|
||||||
|
|
||||||
|
$q = self::$DB->prepare(
|
||||||
|
'SELECT `time` FROM '.$phpcountConfig["db"]["nodupesTable"].' WHERE ids_hash = :ids_hash'
|
||||||
|
);
|
||||||
|
$q->bindParam(':ids_hash', $ids_hash);
|
||||||
|
$q->execute();
|
||||||
|
|
||||||
|
if(($res = $q->fetch()) !== false)
|
||||||
|
{
|
||||||
|
if($res['time'] > time() - self::HIT_OLD_AFTER_SECONDS)
|
||||||
|
return false;
|
||||||
|
else
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function LogHit($pageID){
|
||||||
|
global $phpcountConfig;
|
||||||
|
|
||||||
|
$ids_hash = self::IDHash($pageID);
|
||||||
|
|
||||||
|
$q = self::$DB->prepare(
|
||||||
|
'SELECT `time` FROM '.$phpcountConfig["db"]["nodupesTable"].' WHERE ids_hash = :ids_hash'
|
||||||
|
);
|
||||||
|
$q->bindParam(':ids_hash', $ids_hash);
|
||||||
|
$q->execute();
|
||||||
|
|
||||||
|
$curTime = time();
|
||||||
|
|
||||||
|
if(($res = $q->fetch()) !== false)
|
||||||
|
{
|
||||||
|
$s = self::$DB->prepare(
|
||||||
|
'UPDATE '.$phpcountConfig["db"]["nodupesTable"].' SET `time` = :time WHERE ids_hash = :ids_hash'
|
||||||
|
);
|
||||||
|
$s->bindParam(':time', $curTime);
|
||||||
|
$s->bindParam(':ids_hash', $ids_hash);
|
||||||
|
$s->execute();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$s = self::$DB->prepare(
|
||||||
|
'INSERT INTO '.$phpcountConfig["db"]["nodupesTable"].' (ids_hash, `time`)
|
||||||
|
VALUES( :ids_hash, :time )'
|
||||||
|
);
|
||||||
|
$s->bindParam(':time', $curTime);
|
||||||
|
$s->bindParam(':ids_hash', $ids_hash);
|
||||||
|
$s->execute();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function LogPageHit($pageId){
|
||||||
|
global $phpcountConfig;
|
||||||
|
|
||||||
|
try{
|
||||||
|
$q = self::$DB->prepare(
|
||||||
|
'INSERT INTO '.$phpcountConfig["db"]["pagehitsTable"].' (userHash, pageId, userAgentString) VALUES (:idsHash, :pageId, :userAgentString);'
|
||||||
|
);
|
||||||
|
$q->bindParam(':idsHash', self::userHash());
|
||||||
|
$q->bindParam(':pageId', $pageId);
|
||||||
|
$q->bindParam(':userAgentString', $_SERVER['HTTP_USER_AGENT']);
|
||||||
|
$q->execute();
|
||||||
|
}
|
||||||
|
catch(Exeption $e){
|
||||||
|
echo("Failed to logPageHits to phpcount database (".$e->getMessage().")\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function CountHit($pageID, $unique){
|
||||||
|
global $phpcountConfig;
|
||||||
|
|
||||||
|
//echo("DEBUG: Counting Hit on ".$pageID."\n");
|
||||||
|
try{
|
||||||
|
$q = self::$DB->prepare(
|
||||||
|
"INSERT INTO ".$phpcountConfig["db"]["hitsTable"]." (pageid, isunique, hitcount) VALUES (:pageid, :isunique, 1) " .
|
||||||
|
"ON DUPLICATE KEY UPDATE hitcount = hitcount + 1"
|
||||||
|
);
|
||||||
|
$q->bindParam(':pageid', $pageID);
|
||||||
|
$unique = $unique ? '1' : '0';
|
||||||
|
$q->bindParam(':isunique', $unique);
|
||||||
|
$q->execute();
|
||||||
|
}
|
||||||
|
catch(Exception $e){
|
||||||
|
die('phpcount failed to CountHit ('.$e->getMessage().')');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function IDHash($pageID)
|
||||||
|
{
|
||||||
|
$visitorID = $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'];
|
||||||
|
return hash("SHA256", $pageID . $visitorID);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function userHash()
|
||||||
|
{
|
||||||
|
$visitorID = $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'];
|
||||||
|
return hash("SHA256", $visitorID);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function Cleanup(){
|
||||||
|
global $phpcountConfig;
|
||||||
|
|
||||||
|
$last_interval = time() - self::HIT_OLD_AFTER_SECONDS;
|
||||||
|
|
||||||
|
$q = self::$DB->prepare(
|
||||||
|
'DELETE FROM '.$phpcountConfig["db"]["nodupesTable"].' WHERE `time` < :time'
|
||||||
|
);
|
||||||
|
$q->bindParam(':time', $last_interval);
|
||||||
|
$q->execute();
|
||||||
|
|
||||||
|
$q = self::$DB->prepare(
|
||||||
|
'DELETE FROM '.$phpcountConfig["db"]["pageHitsTable"].' WHERE `timeStamp` < :time'
|
||||||
|
);
|
||||||
|
$q->bindParam(':time', $last_interval);
|
||||||
|
$q->execute();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
require_once('../local/wkParticipoConf.php.inc');
|
require_once('../local/wkParticipoConf.php.inc');
|
||||||
$message = array();
|
$message = array();
|
||||||
if(!empty($_POST)){
|
if(!empty($_POST)){
|
||||||
if( empty($_POST['f']['wkId']) || empty($_POST['f']['meldefrist']) ){
|
if( empty($_POST['f']['wkId']) || empty($_POST['f']['meldefrist']) || empty($_POST['f']['datum']) ){
|
||||||
$message['error'] = 'Es wurden nicht alle Felder ausgefüllt.';
|
$message['error'] = 'Es wurden nicht alle Felder ausgefüllt.';
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@@ -12,12 +12,13 @@
|
|||||||
$message['error'] = 'Datenbankverbindung fehlgeschlagen: ' . $mysqli->connect_error;
|
$message['error'] = 'Datenbankverbindung fehlgeschlagen: ' . $mysqli->connect_error;
|
||||||
}
|
}
|
||||||
$query = sprintf(
|
$query = sprintf(
|
||||||
"INSERT INTO wkParticipo_Events (wkId, meldefrist)
|
"INSERT INTO wkParticipo_Events (wkId, datum, meldefrist)
|
||||||
SELECT * FROM (SELECT '%s', '%s') as new_event
|
SELECT * FROM (SELECT '%s', '%s', '%s') as new_event
|
||||||
WHERE NOT EXISTS (
|
WHERE NOT EXISTS (
|
||||||
SELECT wkId FROM wkParticipo_Events WHERE wkId = '%s'
|
SELECT wkId FROM wkParticipo_Events WHERE wkId = '%s'
|
||||||
) LIMIT 1;",
|
) LIMIT 1;",
|
||||||
$mysqli->real_escape_string($_POST['f']['wkId']),
|
$mysqli->real_escape_string($_POST['f']['wkId']),
|
||||||
|
$mysqli->real_escape_string($_POST['f']['datum']),
|
||||||
$mysqli->real_escape_string($_POST['f']['meldefrist']),
|
$mysqli->real_escape_string($_POST['f']['meldefrist']),
|
||||||
$mysqli->real_escape_string($_POST['f']['wkId'])
|
$mysqli->real_escape_string($_POST['f']['wkId'])
|
||||||
);
|
);
|
||||||
@@ -55,6 +56,7 @@
|
|||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>Benutzerdaten</legend>
|
<legend>Benutzerdaten</legend>
|
||||||
<div><label for="wkId">wkId</label> <input type="text" name="f[wkId]" id="wkId"<?php echo isset($_POST['f']['wkId']) ? ' value="' . htmlspecialchars($_POST['f']['wkId']) . '"' : '' ?> /></div>
|
<div><label for="wkId">wkId</label> <input type="text" name="f[wkId]" id="wkId"<?php echo isset($_POST['f']['wkId']) ? ' value="' . htmlspecialchars($_POST['f']['wkId']) . '"' : '' ?> /></div>
|
||||||
|
<div><label for="datum">datum</label> <input type="text" name="f[datum]" id="datum" <?php echo isset($_POST['f']['datum']) ? ' value="' . htmlspecialchars($_POST['f']['datum']) . '"' : '' ?> /></div>
|
||||||
<div><label for="meldefrist">meldefrist</label> <input type="text" name="f[meldefrist]" id="meldefrist" <?php echo isset($_POST['f']['meldefrist']) ? ' value="' . htmlspecialchars($_POST['f']['meldefrist']) . '"' : '' ?> /></div>
|
<div><label for="meldefrist">meldefrist</label> <input type="text" name="f[meldefrist]" id="meldefrist" <?php echo isset($_POST['f']['meldefrist']) ? ' value="' . htmlspecialchars($_POST['f']['meldefrist']) . '"' : '' ?> /></div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
$message['wkData'] = "";
|
$message['wkData'] = "";
|
||||||
|
|
||||||
$eventWkId = isset($_POST['f']['wkId']) ? $_POST['f']['wkId'] : "";
|
$eventWkId = isset($_POST['f']['wkId']) ? $_POST['f']['wkId'] : "";
|
||||||
|
$eventMeldefrist = isset($_POST['f']['date']) ? $_POST['f']['date'] : "";
|
||||||
$eventMeldefrist = isset($_POST['f']['meldefrist']) ? $_POST['f']['meldefrist'] : "";
|
$eventMeldefrist = isset($_POST['f']['meldefrist']) ? $_POST['f']['meldefrist'] : "";
|
||||||
|
|
||||||
// echo $_POST['f']['wkId']; echo $eventWkId; echo $eventMeldefrist; die();
|
// echo $_POST['f']['wkId']; echo $eventWkId; echo $eventMeldefrist; die();
|
||||||
@@ -38,7 +39,7 @@
|
|||||||
|
|
||||||
if(!empty($_POST)){
|
if(!empty($_POST)){
|
||||||
// print_r($_POST);
|
// print_r($_POST);
|
||||||
if( empty($_POST['f']['wkId']) || empty($_POST['f']['meldefrist']) ){
|
if( empty($_POST['f']['wkId']) || empty($_POST['f']['date']) || empty($_POST['f']['meldefrist']) ){
|
||||||
// echo $_POST['f']['wkId']." aber ".$_POST['f']['meldefrist'];
|
// echo $_POST['f']['wkId']." aber ".$_POST['f']['meldefrist'];
|
||||||
$message['notice'] .= "Alle Felder ausfüllen und abschicken!<br />";
|
$message['notice'] .= "Alle Felder ausfüllen und abschicken!<br />";
|
||||||
// print_r($message);
|
// print_r($message);
|
||||||
@@ -67,6 +68,7 @@
|
|||||||
"</ul></li>".
|
"</ul></li>".
|
||||||
"</ul>";
|
"</ul>";
|
||||||
// $message['notice'] .= "eventWkDatum: ".$eventWkResult['Datum']."<br />";
|
// $message['notice'] .= "eventWkDatum: ".$eventWkResult['Datum']."<br />";
|
||||||
|
$date=$eventWkResult['Datum'];
|
||||||
$meldefrist = date(
|
$meldefrist = date(
|
||||||
"Y-m-d",
|
"Y-m-d",
|
||||||
strtotime(
|
strtotime(
|
||||||
@@ -93,12 +95,13 @@
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$query = sprintf(
|
$query = sprintf(
|
||||||
"INSERT INTO wkParticipo_Events (wkId, meldefrist)
|
"INSERT INTO wkParticipo_Events (wkId, date, meldefrist)
|
||||||
SELECT * FROM (SELECT '%s', '%s') as new_event
|
SELECT * FROM (SELECT '%s', '%s', '%s') as new_event
|
||||||
WHERE NOT EXISTS (
|
WHERE NOT EXISTS (
|
||||||
SELECT wkId FROM wkParticipo_Events WHERE wkId = '%s'
|
SELECT wkId FROM wkParticipo_Events WHERE wkId = '%s'
|
||||||
) LIMIT 1;",
|
) LIMIT 1;",
|
||||||
$mysqli->real_escape_string($_POST['f']['wkId']),
|
$mysqli->real_escape_string($_POST['f']['wkId']),
|
||||||
|
$mysqli->real_escape_string($_POST['f']['date']),
|
||||||
$mysqli->real_escape_string($_POST['f']['meldefrist']),
|
$mysqli->real_escape_string($_POST['f']['meldefrist']),
|
||||||
$mysqli->real_escape_string($_POST['f']['wkId'])
|
$mysqli->real_escape_string($_POST['f']['wkId'])
|
||||||
);
|
);
|
||||||
@@ -148,6 +151,10 @@
|
|||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>Eventdaten</legend>
|
<legend>Eventdaten</legend>
|
||||||
<div><label for="wkId">wkId</label> <input type="text" name="f[wkId]" id="wkId"<?php echo isset($_POST['f']['wkId']) ? ' value="' . htmlspecialchars($_POST['f']['wkId']) . '"' : "";?> /></div>
|
<div><label for="wkId">wkId</label> <input type="text" name="f[wkId]" id="wkId"<?php echo isset($_POST['f']['wkId']) ? ' value="' . htmlspecialchars($_POST['f']['wkId']) . '"' : "";?> /></div>
|
||||||
|
<div>
|
||||||
|
<label for="date">date</label>
|
||||||
|
<input type="text" name="f[date]" id="date" <?php echo $date != "" ? "value=\"".htmlspecialchars($date)."\" " : "";?> />
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label for="meldefrist">meldefrist</label>
|
<label for="meldefrist">meldefrist</label>
|
||||||
<input type="text" name="f[meldefrist]" id="meldefrist" <?php echo $meldefrist != "" ? "value=\"".htmlspecialchars($meldefrist)."\" " : "";?> />
|
<input type="text" name="f[meldefrist]" id="meldefrist" <?php echo $meldefrist != "" ? "value=\"".htmlspecialchars($meldefrist)."\" " : "";?> />
|
||||||
|
|||||||
@@ -1,4 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
$basePath = "/users/cwsvjudo/www";
|
||||||
|
|
||||||
|
require_once($basePath."/config/cwsvJudo.config.php");
|
||||||
|
require_once($basePath."/ressourcen/phpLib/cwsvJudo/miscAssis.php");
|
||||||
|
|
||||||
require_once('../local/wkParticipoConf.php.inc');
|
require_once('../local/wkParticipoConf.php.inc');
|
||||||
require_once('../auth.php');
|
require_once('../auth.php');
|
||||||
require_once('../local/db.php.inc');
|
require_once('../local/db.php.inc');
|
||||||
@@ -16,7 +23,6 @@
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if( (string)(int)$_POST['f']['eventId'] == $_POST['f']['eventId'] ){
|
if( (string)(int)$_POST['f']['eventId'] == $_POST['f']['eventId'] ){
|
||||||
|
|
||||||
$mysqlConn = @new mysqli($db_server, $db_user, $db_password, $db_name);
|
$mysqlConn = @new mysqli($db_server, $db_user, $db_password, $db_name);
|
||||||
if ($mysqlConn->connect_error) {
|
if ($mysqlConn->connect_error) {
|
||||||
$sqlMessage['error'] .= 'Datenbankverbindung fehlgeschlagen: ' . $mysqlConn->connect_error;
|
$sqlMessage['error'] .= 'Datenbankverbindung fehlgeschlagen: ' . $mysqlConn->connect_error;
|
||||||
@@ -33,7 +39,30 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else $message['error'] = "Fehler: eventId ist kein Int (".$_POST['f']['eventId'].")";
|
|
||||||
|
//var_dump($_POST);
|
||||||
|
if( $_POST['action'] == "deleteStarter" ){
|
||||||
|
try{
|
||||||
|
$dbConnection = new PDO(
|
||||||
|
'mysql:host='.$cwsvJudoConfig["db"]["host"].';dbname='.$cwsvJudoConfig["db"]["name"],
|
||||||
|
$cwsvJudoConfig["db"]["user"],
|
||||||
|
$cwsvJudoConfig["db"]["password"]
|
||||||
|
);
|
||||||
|
if($_POST['action']=="deleteStarter"){
|
||||||
|
echo("DELETE FROM `wkParticipo_Starter` WHERE id=:starterId;");
|
||||||
|
$deleteStarterQuery = $dbConnection->prepare(
|
||||||
|
"DELETE FROM `wkParticipo_Starter` WHERE id=:starterId;"
|
||||||
|
);
|
||||||
|
$deleteStarterQuery->bindParam(':starterId', $_POST['starterId'], PDO::PARAM_INT);
|
||||||
|
if($deleteStarterQuery->execute());
|
||||||
|
else echo("FEHLER\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch(PDOException $db_error){
|
||||||
|
die( "Error!: " . $db_error->getMessage() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else echo("NoActionDeleteStarter\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -132,6 +161,9 @@
|
|||||||
<li>type: <?php echo($startTyp[$starter['type']]);?></li>
|
<li>type: <?php echo($startTyp[$starter['type']]);?></li>
|
||||||
<li>fahrtId: <?php echo $starter['fahrtId']; ?></li>
|
<li>fahrtId: <?php echo $starter['fahrtId']; ?></li>
|
||||||
<li>
|
<li>
|
||||||
|
<form action="./showEvent.php" method="post"><input type="hidden" name="starterId" id="starterId" value="<?php echo($starter['id']);?>"><input type="hidden" name="action" id="action" value="deleteStarter"><input type="hidden" name="f[eventId]" value="<?php echo($starter['eventId']);?>" /><button type="submit">Austragen</button></form>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
<?php
|
<?php
|
||||||
if(empty($starter['fahrtId'])){
|
if(empty($starter['fahrtId'])){
|
||||||
//$fahrten = array();
|
//$fahrten = array();
|
||||||
|
|||||||
@@ -9,47 +9,6 @@ $basePath = "/users/cwsvjudo/www";
|
|||||||
require_once($basePath."/ressourcen/phpLib/cwsvJudo/miscAssis.php");
|
require_once($basePath."/ressourcen/phpLib/cwsvJudo/miscAssis.php");
|
||||||
|
|
||||||
|
|
||||||
function dbQuery($aDbConnection, $aQueryString, $aBindArray = array(), $someOptions = array( "dbCharset" => "ISO-8859-1", "outCharset" => "UTF-8" ) ){
|
|
||||||
//echo("Doing ".$aQueryString);
|
|
||||||
var_dump($aBindArray);
|
|
||||||
if( empty($someOptions['dbCharset']) ) $someOptions['dbCharset'] = "ISO-8859-1";
|
|
||||||
if( empty($someOptions['outCharset']) ) $someOptions['outCharset'] = "UTF-8";
|
|
||||||
/// @toDo: Bisher wird nur die Rückgabe konvertiert. Eigentlich muss
|
|
||||||
/// doch auch die Eingabe konvertiert werden. Aber das jetzt
|
|
||||||
/// umzustellen wird schwer! Die User m Wettkampfplaner sind ja z.B.
|
|
||||||
/// als UTF8 in latin1(?) gespeichert.
|
|
||||||
try{
|
|
||||||
$pdoStatement = $aDbConnection->prepare( $aQueryString );
|
|
||||||
foreach( $aBindArray as $bindName => $bind ){
|
|
||||||
$pdoStatement->bindValue(
|
|
||||||
$bindName,
|
|
||||||
$bind['value'],
|
|
||||||
(isset($bind['data_type'])?$bind['data_type']:PDO::PARAM_STR)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
$pdoStatement->execute();
|
|
||||||
$ret = $pdoStatement->fetchAll(PDO::FETCH_ASSOC);
|
|
||||||
}
|
|
||||||
catch(PDOException $db_error){
|
|
||||||
print "Error!: " . $db_error->getMessage() . "<br/>";
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
//var_dump($ret);
|
|
||||||
// Zeichensatzkonvertierung
|
|
||||||
if( is_array($ret) ){
|
|
||||||
foreach($ret as &$entry){
|
|
||||||
array_walk(
|
|
||||||
$entry,
|
|
||||||
function (&$value, $key, $someOptions) {
|
|
||||||
$value = iconv($someOptions['dbCharset'], $someOptions['outCharset'], $value);
|
|
||||||
},
|
|
||||||
$someOptions
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
function array2htmlTableString($anArray){
|
function array2htmlTableString($anArray){
|
||||||
$ret = "";
|
$ret = "";
|
||||||
if( !is_array($anArray) )
|
if( !is_array($anArray) )
|
||||||
|
|||||||
Reference in New Issue
Block a user