Aufräumarbeiten im Zweig redesign2018
Auf Branch redesign2018 zum Commit vorgemerkte Änderungen: neue Datei: backup/ampPages-backup-2018-06-11-06-49/.htaccess neue Datei: backup/ampPages-backup-2018-06-11-06-49/config.inc.php neue Datei: backup/ampPages-backup-2018-06-11-06-49/css/cwsvJudoAmp.css neue Datei: backup/ampPages-backup-2018-06-11-06-49/cwsvJudo.ampTemplate.inc.php neue Datei: backup/ampPages-backup-2018-06-11-06-49/expCounter/counter.php neue Datei: backup/ampPages-backup-2018-06-11-06-49/galerien.php neue Datei: backup/ampPages-backup-2018-06-11-06-49/googlef3ad27a876479282.html neue Datei: backup/ampPages-backup-2018-06-11-06-49/index.php neue Datei: backup/ampPages-backup-2018-06-11-06-49/kontakt.php neue Datei: backup/ampPages-backup-2018-06-11-06-49/news.php neue Datei: backup/ampPages-backup-2018-06-11-06-49/newsDev.php neue Datei: backup/ampPages-backup-2018-06-11-06-49/pages/desktop/verein.galerien.php neue Datei: backup/ampPages-backup-2018-06-11-06-49/phpLib/ampify.php neue Datei: backup/ampPages-backup-2018-06-11-06-49/phpLib/cwsvJudoAmpLib.php neue Datei: backup/ampPages-backup-2018-06-11-06-49/robots.txt neue Datei: backup/ampPages-backup-2018-06-11-06-49/sitemap.xml neue Datei: backup/ampPages-backup-2018-06-11-06-49/trainingszeiten.php neue Datei: backup/ampPages-backup-2018-06-11-06-49/urllist.txt neue Datei: backup/ampPages-backup-2018-06-11-06-49/verein.training.php neue Datei: backup/config.inc.php neue Datei: graphiken/icons/cwsv.ico neue Datei: impressumsVorlagen/impressum-recht-de.html neue Datei: impressumsVorlagen/impressum-recht.de neue Datei: impressumsVorlagen/muster_impressum_vorlage_von_www_jurarat_de.txt neue Datei: impressumsVorlagen/sqr-law.de gelöscht: phpLib/imgGallery.square7/indexDev.php.tmpl.orig neue Datei: sitemap.xml geändert: src/Makefiles/Makefile.vp9 neue Datei: src/tools/config.inc.php neue Datei: src/tools/index.php neue Datei: src/tools/indexHier.php neue Datei: src/tools/indexInArbeit.php neue Datei: src/tools/mkGalGen/Makefile.mkGalGen neue Datei: src/tools/mkGalGen/ReadMe.md neue Datei: src/tools/mkGalGen/createImageList.py neue Datei: src/tools/mkGalGen/jpgListCreator.py neue Datei: src/tools/mkGalGen/jpgListLoader.py neue Datei: src/tools/mkGalGen/jpgSelector.py neue Datei: src/tools/mkGalGen/jsonAlbumTest-Template.sh neue Datei: src/tools/mkGalGen/jsonJpgList2IndexPhp.py neue Datei: src/tools/mkGalGen/jsonJpgList2Makefile.py neue Datei: src/tools/mkGalGen/jsonJpgList2ViewPhp.py neue Datei: src/tools/mkGalGen/sortierer.py neue Datei: src/tools/mkGalGen/testingArea/Makefile
This commit is contained in:
@@ -1,324 +0,0 @@
|
||||
<?php
|
||||
// Daten der Datenbank laden
|
||||
require_once($_SERVER['DOCUMENT_ROOT']."/bonus/db.inc");
|
||||
|
||||
/// Abfrage der ausgewählten Bilder einer Galerie
|
||||
function getPickedImages($aMysqlConn, $aGalId){
|
||||
$retPickedImages = array();
|
||||
/// Erstmal bisher ausgewählte Bilder abfragen ...
|
||||
$queryPickedImages = sprintf(
|
||||
"SELECT * FROM cwsvjudo.galImgPicker WHERE galId = '%s';",
|
||||
$aMysqlConn->real_escape_string($aGalId)
|
||||
);
|
||||
|
||||
// die($queryPickedImages);
|
||||
|
||||
$resultsPickedImages = $aMysqlConn->query($queryPickedImages);
|
||||
|
||||
/// @todo Wie kann ich hier sinnvoll einen Fehler zurückliefern? Nullpointer?
|
||||
if( !$resultsPickedImages ){
|
||||
$retMessage['error'] .= "Fehler ('".$aMysqlConn->error."') bei Datenbankabfrage '".$queryPickedImages."'<br />";
|
||||
die( "Fehler ('".$aMysqlConn->error."') bei Datenbankabfrage '".$queryPickedImages."'<br />");
|
||||
}
|
||||
else{
|
||||
while( $pickedImagesResult = $resultsPickedImages->fetch_assoc() ){
|
||||
$retPickedImages = array_merge($retPickedImages, explode(',', $pickedImagesResult['pickedImages']) );
|
||||
}
|
||||
}
|
||||
//print_r($retPickedImages); die();
|
||||
return array_unique( $retPickedImages );
|
||||
}/// Ende getPickedImages
|
||||
|
||||
/// Hilfsfunktion zum anpassen der htmlDescription
|
||||
function descrName($aName){
|
||||
$retVal = "Bilder der Judoka des Chemnitzer WSV beim Wettkampf ".$aName;
|
||||
if( strpos($aName, "Sommerabschlussgrillen") >= 0 ) $retVal = "Bilder der Judoka des Chemnitzer WSV beim ".$aName;
|
||||
if( strpos($aName, "Jahrendefeier") >= 0 ) $retVal = "Bilder der Judoka des Chemnitzer WSV bei der ".$aName;
|
||||
return $retVal;
|
||||
}/// Ende descrName
|
||||
|
||||
$loginStatus = "false";
|
||||
$chooseMode = "false";
|
||||
$showAllMode = "false";
|
||||
$messages = array();
|
||||
$galleryId = "0";
|
||||
$pickedImages = array();
|
||||
|
||||
/// Übergebene galleryId abfragen
|
||||
if( !empty($_GET['galId'] ) ) $galleryId = $_GET['galId'];
|
||||
/// @todo Woher erhalte ich die galleryID, wenn sie nicht übergeben wird?
|
||||
|
||||
/// Nachschauen, ob alle Bilder gezeigt werden sollen
|
||||
if( $_GET['showAll'] == "true" )
|
||||
$showAllMode = "true";
|
||||
|
||||
// Testen, ob wir im Bilderauswahlmodus sind...
|
||||
if($_GET['chooseMode'] == "true"){
|
||||
$chooseMode = "true";
|
||||
// Falls ja, dann teste, ob man angemeldet ist
|
||||
/// @todo brauche ich das, wenn ich nur testen will, ob bereits angemeldet ist? -> anscheinend ja!
|
||||
session_start();
|
||||
session_regenerate_id();
|
||||
// Falls der serverseitige Logincookie nicht gesetzt ist
|
||||
if( empty($_SESSION['login']) ){
|
||||
$loginStatus = "false";
|
||||
$messages['info'] .= "Info: Der Bilderauswahlmodus ist nur möglich, wenn man angemeldet ist!<br />";
|
||||
}
|
||||
else{
|
||||
$loginStatus = "true";
|
||||
/// @todo Testen, ob eine intZahl vorliegt
|
||||
/// @todo Testen, ob wir in der richtigen Galerie sind
|
||||
$messages['info'] .= "Info: Der Bilderauswahlmodus für Galerie ".$galleryId." ist aktiv!<br />";
|
||||
}
|
||||
}
|
||||
|
||||
$mysqlConn = @new mysqli($db_server, $db_user, $db_password, $db_name);
|
||||
|
||||
if($mysqlConn->connect_error){
|
||||
$message['error'] .= "Fehler: Datenbankverbindung fehlgeschlagen: " . $mysqlConn->connect_error . "<br />";
|
||||
}
|
||||
else{
|
||||
$pickedImages = getPickedImages( $mysqlConn, $galleryId );
|
||||
$mysqlConn->close();
|
||||
}
|
||||
|
||||
/// Überschreiben der imgList mit den ausgewählten Bildern
|
||||
$allImgList = $imgList; // Sicherungskopie
|
||||
|
||||
if( count($pickedImages) > 24 )
|
||||
$pickedImages = array_rand( $pickedImages, 24);
|
||||
else{
|
||||
$restImages = array_diff( $allImgList, $pickedImages );
|
||||
// echo("restImages: "); print_r($restImages);
|
||||
foreach( array_rand( $restImages, 24-count($pickedImages) ) as $k ) {
|
||||
$pickedImages[] = $restImages[$k];
|
||||
}
|
||||
// echo("pickedImages: "); print_r($pickedImages);
|
||||
}
|
||||
$imgList = $pickedImages;
|
||||
// echo("imgList: "); print_r($imgList);
|
||||
|
||||
/// @todo ein Sortieren nach dem ursprünglichen Index fehlt
|
||||
usort($imgList, function($a, $b) use($allImgList){return array_search($a, $allImgList) > array_search($b, $allImgList);} );
|
||||
$imgList = array_values( $imgList );// Zum reNummerieren
|
||||
// echo("imgList: "); print_r($imgList);
|
||||
<<<<<<< HEAD
|
||||
|
||||
if( $showAllMode == "true") $imgList = $allImgList;
|
||||
|
||||
=======
|
||||
|
||||
>>>>>>> d971010d9cd5d2b4b6e4aea87836759422091f96
|
||||
$imgInfos = array();
|
||||
foreach( $imgList as $imgName ){
|
||||
array_push( $imgInfos, getimagesize("thumbs/".str_replace(".jpg", ".png", $imgName)));
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<title><?php echo $wkName?> - Bilderalbum</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="description" content="<?php echo descrName($wkName);?>">
|
||||
<meta name="keywords" content="Album, Fotos">
|
||||
<!-- BluimpGallery Zeug -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="/ressourcen/blueimpGallery/css/blueimp-gallery.css">
|
||||
<link rel="stylesheet" href="/ressourcen/blueimpGallery/css/blueimp-gallery-indicator.css">
|
||||
<link rel="stylesheet" href="/ressourcen/blueimpGallery/css/blueimp-gallery-video.css">
|
||||
|
||||
<!-- 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="/ressourcen/jsLib/jquery-3.1.1.min.js"></script>
|
||||
<script type="text/javascript" src="/ressourcen/jsLib/jquery.lazyload.min.js"></script>
|
||||
<style>
|
||||
.lazy{ display: none;}
|
||||
.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" >
|
||||
<?php
|
||||
include( $_SERVER['DOCUMENT_ROOT'].'/ressourcen/phpLib/is_mobile.php');
|
||||
if(is_mobile()) echo "<a title=\"Galerien der Judoka des Chemnitzer WSV\" href=\"/pages/mobile/verein.wettkampfgalerien.php\">Zur Galerieübersicht</a>";
|
||||
else echo "<a title=\"Galerien der Judoka des Chemnitzer WSV\" href=\"/pages/desktop/verein.galerien.php\">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
|
||||
}
|
||||
// echo("pickedImages: "); print_r($pickedImages);
|
||||
/// Ende MessageBox
|
||||
?>
|
||||
|
||||
<h1 class="centerText" >
|
||||
Photoalbum [<b><?php echo $wkName?></b>]
|
||||
</h1>
|
||||
<?php
|
||||
if( $showAllMode == "true" ){
|
||||
?>
|
||||
<p class="centerText smallFont">
|
||||
[<?php echo count($imgList)?> Bilder]
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
else{
|
||||
?>
|
||||
<a href=<?php echo( "\"?galId=".(empty($galleryId)?"0":$galleryId)."&showAll=true\"");?>><div class="navButton" style="width: 100%;">Alle Bilder einblenden </div></a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<p class="centerText smallFont">
|
||||
Auf die jeweiligen Bilder klicken um eine größere Ansicht zu bekommen.
|
||||
</p>
|
||||
<hr/>
|
||||
<!-- The container for the list of example images -->
|
||||
<div id="links" class="links centerText">
|
||||
<?php
|
||||
if( $chooseMode == "true" ){
|
||||
echo( "<form action=\"http://cwsvjudo.bplaced.net/ressourcen/phpLib/imgGallery/imgPicker.php\" method=\"post\">" );
|
||||
echo( "<input type=\"hidden\" name=\"galId\" value=\"".$galleryId."\">" );
|
||||
}
|
||||
$imgSize = count( $imgList );
|
||||
for( $imgIndex = 0; $imgIndex < $imgSize; ++$imgIndex){
|
||||
/// Das Bild soll nur angezeigt werden, falls es ausgewählt ist, oder alle gezeigt werden sollen
|
||||
// if( $chooseMode == "true" || $showAllMode == "true" || in_array($imgList[$imgIndex], $pickedImages) ){
|
||||
if( $chooseMode == "true" ){
|
||||
echo( "<label><input type=\"checkbox\" name=\"pickedImages[]\" value=\"".$imgList[$imgIndex]."\">" );
|
||||
}
|
||||
echo "\t\t\t\t<span>".
|
||||
"<img class=\"lazy\" ".
|
||||
"id=\"Image".( $imgIndex )."\" ".
|
||||
"data-original=\"./thumbs/".str_replace(".jpg", ".png", $imgList[$imgIndex])."\" ".
|
||||
$imgInfos[$imgIndex][3]." ".
|
||||
"alt=\"[".( $imgIndex )."/".( $imgSize )."]\" ".
|
||||
"title=\"".( $wkName )." Bild ".( $imgIndex +1 )." von ".( $imgSize )."\" ".
|
||||
"onclick=\"startGalleryShow(" . $imgIndex . ");\"".
|
||||
"/>".
|
||||
"</span>\n";
|
||||
if( $chooseMode == "true" ){
|
||||
echo( "</label>" );
|
||||
}
|
||||
// }
|
||||
}
|
||||
if( $chooseMode == "true" ){
|
||||
echo( "<button type=\"submit\">Eingaben absenden</button>" );
|
||||
echo( "</form>" );
|
||||
}
|
||||
?>
|
||||
<noscript>
|
||||
<?php
|
||||
$imgSize = count( $imgList );
|
||||
for( $imgIndex = 0; $imgIndex < $imgSize; ++$imgIndex){
|
||||
echo
|
||||
"\t\t\t\t<span>".
|
||||
"<a href=\"view.php?index=".( $imgIndex )."\" >".
|
||||
"<img id=\"Image".( $imgIndex + 1)."\" ".
|
||||
// "src=\"./thumbs/".str_replace(".jpg", ".png", $imgList[$imgIndex])."\" ".
|
||||
"src=\"./thumbs/r_".str_replace(".jpg", ".png", $imgList[$imgIndex])."\" ".
|
||||
"alt=\"[".( $imgIndex )."/".( $imgSize )."]\" ".
|
||||
"title=\"".( $wkName )." Bild ".( $imgIndex + 1 )." von ".( $imgSize )."\" ".
|
||||
"/>".
|
||||
"</a>".
|
||||
"</span>\n";
|
||||
}
|
||||
?>
|
||||
</noscript>
|
||||
</div>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$(function() {
|
||||
$("img.lazy").show().lazyload();
|
||||
// $("img.lazy").lazyload();
|
||||
});
|
||||
</script>
|
||||
<!-- BluimpGalerry Lightbox Version -->
|
||||
<!-- 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 class="slides"></div>
|
||||
<h2 class="title"><?php echo $wkName?></h2>
|
||||
<a class="prev">‹</a>
|
||||
<a class="next">›</a>
|
||||
<a class="close">×</a>
|
||||
<a class="play-pause"></a>
|
||||
<ol class="indicator"></ol>
|
||||
</div>
|
||||
<script type="text/javascript" src="/ressourcen/blueimpGallery/js/blueimp-gallery.min.js"></script>
|
||||
<script type="text/javascript" src="/ressourcen/blueimpGallery/js/jquery.blueimp-gallery.min.js"></script>
|
||||
<script>
|
||||
function startGalleryShow(startIndex = 0){
|
||||
var imgList = [
|
||||
<?php
|
||||
$imgSize = count( $imgList );
|
||||
for( $imgIndex = 0; $imgIndex < $imgSize; ++$imgIndex){
|
||||
echo "\"".( $imgList[ $imgIndex ] )."\", ";
|
||||
}
|
||||
?>];
|
||||
var gallery = blueimp.Gallery(
|
||||
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,
|
||||
index: startIndex,
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
window.onload = function () {
|
||||
startGalleryShow();
|
||||
};
|
||||
// startGalleryShow();
|
||||
</script>
|
||||
<hr/>
|
||||
<!--Beginn der Einbindung des Counters-->
|
||||
<?php
|
||||
$chCounter_template = <<<TEMPLATE
|
||||
<table>
|
||||
<tr>
|
||||
<td>Besucher online: {V_VISITORS_CURRENTLY_ONLINE}</td>
|
||||
<td>Besucher bisher: {V_PAGE_VIEWS_THIS_PAGE}</td>
|
||||
</tr>
|
||||
</table>
|
||||
TEMPLATE;
|
||||
$chCounter_page_title = "Photoalbum ".$wkName;
|
||||
$chCounter_visible=1; include( $_SERVER['DOCUMENT_ROOT'].'/expCounter/counter.php');?>
|
||||
<!--Ende der Einbindung des Counters-->
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user