- wurden bisher noch nicht verfolgt:

neue Datei:     admin/.htaccess
	neue Datei:     admin/.htgroups
	neue Datei:     admin/.htusers
	neue Datei:     admin/config.inc.php
- Erstellung der news erweitert (promoImg)
	geändert:       admin/newsAdmin.php
	neue Datei:     admin/newsAmpTest.php
	neue Datei:     admin/newsLib.php.inc
	neue Datei:     admin/newsTest.php
	neue Datei:     admin/redirecter/redirectLog.php
	neue Datei:     css/cwsvJudo-2018-quiz.css
	geändert:       md/galerie.md
	geändert:       md/trainingszeiten.md
	neue Datei:     phpLib/cwsvJudo/gallery.lib.php
	geändert:       phpLib/cwsvJudo/miscAssis.php
	geändert:       phpLib/imgGallery/index.php.tmpl
	gelöscht:       phpLib/imgGallery/indexDev.php.tmpl
This commit is contained in:
marko
2018-07-29 18:47:48 +02:00
parent a3234541c7
commit 1865d45e09
16 changed files with 543 additions and 375 deletions

View File

@@ -0,0 +1,41 @@
<?php
$basePath = "/users/cwsvjudo/www";
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();
function getGalleryById( $aGalleryId, $someOptions = array() ){
//var_dump($aGalleryId, $someOptions);
$retGallery = null;
$someOptions['galCharset'] = firstNonEmptyOf([$someOptions['newsCharset'], "UTF-8"]);
$someOptions['dbCharset'] = firstNonEmptyOf([$someOptions['dbCharset'] , "ISO-8859-1"]);
if($someOptions['dbConnection'])
$dbConnection = $someOptions['dbConnection'];
else
$dbConnection = getCwsvJudoDbConn();
try{
$stmt = $dbConnection->prepare(
"SELECT * FROM wkGalerien WHERE id = :galId ;"
);
$stmt->bindParam(':galId', $aGalleryId);
$stmt->execute();
$retGallery = $stmt->fetchAll(PDO::FETCH_ASSOC); // wir fragen einen primary key ab, deshalb kann es nur einer oder keiner sein!
var_dump($ret);
}
catch(PDOException $e){
echo( "Error: " . $e->getMessage() );
}
return $retGallery;
}

View File

@@ -20,6 +20,20 @@ global $cwsvJudoConfig;
return $db_connection;
}
/// Gibt entweder das erste, nichtleere Element zurück, oder null
function firstNonEmptyOf($somePossibleEmptyStuff){
if (is_array($somePossibleEmptyStuff) || $somePossibleEmptyStuff instanceof Traversable){
foreach($somePossibleEmptyStuff as $entry){
if(empty($entry))
continue;
else
return $entry;
}
}
return null;
}
/// Eine als String gegebene Liste kommagetrennter key=value Paare in
/// ein assoziatives Array überführen
function getKeyValueArray($aKeyValueStringList){