Kleinere Korrekturen und Erweiterungen

- der Wettkampfkalender soll nicht mehr hin und her gescrollt werden müssen
	geändert:       src/css/cwsvJudo-2018-content.css
- Funktion zum Abfragen aus der Datenbank; zum Schreibaufwand sparen
	geändert:       wkParticipo/lib/wkParticipo-userAttribute.php
- Ergänzung um Wettkampflose Event
	geändert:       wkParticipo/lib/wkParticipoLib.inc.php
- structured Data breadcrumbs für den Wettkampfkalender mit Einzelansicht
	geändert:       wkKalender.php
This commit is contained in:
marko
2019-02-03 15:06:33 +01:00
parent 436e74afd3
commit 0525e59d1d
4 changed files with 182 additions and 83 deletions

View File

@@ -9,6 +9,47 @@ $basePath = "/users/cwsvjudo/www";
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){
$ret = "";
if( !is_array($anArray) )