Zum Commit vorgemerkte Änderungen:

geändert:       index.php
This commit is contained in:
marko
2021-06-08 20:13:50 +02:00
parent f60fef0904
commit 239ae8b68a
2 changed files with 19 additions and 14 deletions

View File

@@ -7,8 +7,8 @@ return (is_numeric($str) && $str > 0 && $str == round($str));
function getPdoDbConnection($hostname, $dbName, $user, $password){
try{
$dbConnection = new PDO(
'mysql:host='.$hostname.';dbname='.$dbName,
$user,
'mysql:host='.$hostname.';dbname='.$dbName,
$user,
$password
);
}
@@ -23,8 +23,8 @@ global $cwsvJudoConfig;
// Datenbankverbindung bereit stellen
try{
$db_connection = new PDO(
'mysql:host='.$cwsvJudoConfig["db"]["host"].';dbname='.$cwsvJudoConfig["db"]["name"],//.';charset=utf8',
$cwsvJudoConfig["db"]["user"],
'mysql:host='.$cwsvJudoConfig["db"]["host"].';dbname='.$cwsvJudoConfig["db"]["name"],//.';charset=utf8',
$cwsvJudoConfig["db"]["user"],
$cwsvJudoConfig["db"]["password"]
);
}
@@ -47,7 +47,7 @@ if (is_array($somePossibleEmptyStuff) || $somePossibleEmptyStuff instanceof Trav
return null;
}
/// Eine als String gegebene Liste kommagetrennter key=value Paare in
/// Eine als String gegebene Liste kommagetrennter key=value Paare in
/// ein assoziatives Array überführen
function getKeyValueArray($aKeyValueStringList){
$retKeyValueArray = array();
@@ -87,7 +87,7 @@ if( empty($optionsArray['outCharset']) ) $optionsArray['outCharset'] = "UTF-8";
);
$pdoStatementForQuerryingZitat->execute();
$retZitat = $pdoStatementForQuerryingZitat->fetchAll(PDO::FETCH_ASSOC);
// Zeichensatzkonvertierung
foreach($retZitat as &$entry){
array_walk(
@@ -127,8 +127,8 @@ if( !file_exists($aJsonFileName) ) return null;
if( !(is_array( $someLinkNames ) || is_object( $someLinkNames )) ) return null;
return arrayKeyFilter(
json_decode(
file_get_contents($aJsonFileName),
json_decode(
file_get_contents($aJsonFileName),
true
),
$someLinkNames
@@ -162,14 +162,14 @@ function toAscii($str, $replace=array(), $delimiter='-') {
return $clean;
}
/// Wrapper function for a query to the
/// $aDbConnection connection to a db
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.
/// @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 );
@@ -187,7 +187,7 @@ if( empty($someOptions['outCharset']) ) $someOptions['outCharset'] = "UTF-8";
print "Error!: " . $db_error->getMessage() . "<br/>";
return null;
}
//var_dump($ret);
// Zeichensatzkonvertierung
if( is_array($ret) ){
foreach($ret as &$entry){

View File

@@ -72,6 +72,11 @@ return $ret;
<nav class="navBar">
<ul>
<<<<<<< Updated upstream
=======
<li><a href="/machs">Achievementsystem</a></li>
<li><a href="./infoZettel.php">Infozettel</a></li>
>>>>>>> Stashed changes
<li>
<a href ="./eventKalender.php">alle geplanten Wettkämpfe als Liste</a>
</li>