Abgleich mit dem Stand auf dem Server. Irgendwie sind hier Commits verloren/nie gemacht worden.

This commit is contained in:
marko
2019-12-24 14:22:53 +01:00
parent 18394392de
commit f60fef0904
32 changed files with 876 additions and 115 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

View File

@@ -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']) || empty($_POST['f']['datum']) ){ if( empty($_POST['f']['wkId']) || empty($_POST['f']['meldefrist']) ){
$message['error'] = 'Es wurden nicht alle Felder ausgefüllt.'; $message['error'] = 'Es wurden nicht alle Felder ausgefüllt.';
} }
else{ else{
@@ -12,13 +12,12 @@
$message['error'] = 'Datenbankverbindung fehlgeschlagen: ' . $mysqli->connect_error; $message['error'] = 'Datenbankverbindung fehlgeschlagen: ' . $mysqli->connect_error;
} }
$query = sprintf( $query = sprintf(
"INSERT INTO wkParticipo_Events (wkId, datum, meldefrist) "INSERT INTO wkParticipo_Events (wkId, meldefrist)
SELECT * FROM (SELECT '%s', '%s', '%s') as new_event SELECT * FROM (SELECT '%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'])
); );
@@ -56,7 +55,6 @@
<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>

View File

@@ -65,7 +65,13 @@
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Wettkampfplaner - Meldung</title> <title>Wettkampfplaner - Meldung</title>
<link rel="stylesheet" href="style.css"> <style>
<?php
$css = file_get_contents( $basePath."/pages/desktop/wkParticipo/wkParticipo.css");
echo(colorThemeCss($_SESSION['user']['userConfig']['colors']));
echo($css);
?>
</style>
</head> </head>
<body> <body>
<?php <?php

View File

@@ -103,7 +103,13 @@
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Wettkampfplaner - Meldung</title> <title>Wettkampfplaner - Meldung</title>
<link rel="stylesheet" href="style.css"> <style>
<?php
$css = file_get_contents( $basePath."/pages/desktop/wkParticipo/wkParticipo.css");
echo(colorThemeCss($_SESSION['user']['userConfig']['colors']));
echo($css);
?>
</style>
</head> </head>
<body> <body>
<?php echo $login_status; ?> <?php echo $login_status; ?>

View File

@@ -19,7 +19,7 @@
$message['error'] .= "Datenbankverbindung fehlgeschlagen: ".$mysqlConn->connect_error."<br /"; $message['error'] .= "Datenbankverbindung fehlgeschlagen: ".$mysqlConn->connect_error."<br /";
} }
else{ else{
$wkEventData = getWkEventData($mysqlConn, $_POST['f']['eventId']); $wkEventData = getEventData($mysqlConn, $_POST['f']['eventId']);
if( date("Y-m-d") > $wkEventData['meldefrist']){ if( date("Y-m-d") > $wkEventData['meldefrist']){
$message['error'] .= "Die Meldefrist ist bereits abgelaufen!<br />"; $message['error'] .= "Die Meldefrist ist bereits abgelaufen!<br />";

View File

@@ -1,4 +1,5 @@
<?php <?php
$baseUrl = "http://cwsvjudo.bplaced.net/pages/desktop/wkParticipo";
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');
@@ -18,6 +19,6 @@
<p><a href="./addEvent.php">Neuen Event anlegen.</a></p> <p><a href="./addEvent.php">Neuen Event anlegen.</a></p>
<p><a href="./listUsers.php">User anzeigen.</a></p> <p><a href="./listUsers.php">User anzeigen.</a></p>
<p><a href="./listEvents.php">Events anzeigen.</a></p> <p><a href="./listEvents.php">Events anzeigen.</a></p>
<p><a href="<?php echo( $baseUrl."/lib/wkParticipo-userAttribute.php");?>">Attribute verteilen</a></p>
</body> </body>
</html> </html>

View File

@@ -1,18 +1,8 @@
<?php <?php
setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
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');
require_once('../lib/wkParticipoLib.inc.php'); require_once('../lib/wkParticipoLib.inc.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");
$pdoDbConn = getCwsvJudoDbConn();
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>

View File

@@ -15,6 +15,7 @@
"WHERE kinder IS NOT NULL AND attribute LIKE '%wantsNewsletter=true%';"; "WHERE kinder IS NOT NULL AND attribute LIKE '%wantsNewsletter=true%';";
$eMailErgebnis = $mysqlConn->query( $queryForEmailAdresses ); $eMailErgebnis = $mysqlConn->query( $queryForEmailAdresses );
$eMailAdresses = $eMailErgebnis->fetchAll(); $eMailAdresses = $eMailErgebnis->fetchAll();
// foreach($eMailAdresses as $add) echo($add[0].", ");
// print_r($eMailAdresses);die(); // print_r($eMailAdresses);die();
$queryForEinschreibefristen = $queryForEinschreibefristen =

View File

@@ -23,24 +23,24 @@ $basePath = "/users/cwsvjudo/www";
} }
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); $mysqli = @new mysqli($db_server, $db_user, $db_password, $db_name);
if ($mysqlConn->connect_error) { if ($mysqli->connect_error) {
$sqlMessage['error'] .= 'Datenbankverbindung fehlgeschlagen: ' . $mysqlConn->connect_error; $sqlMessage['error'] .= 'Datenbankverbindung fehlgeschlagen: ' . $mysqli->connect_error;
} }
else{ else{
// Abfrage der Eventdaten // Abfrage der Eventdaten
$eventData = getWkEventData($mysqlConn, $_POST['f']['eventId'], array('outCharset'=>"UTF-8")); $eventData = getWkEventData($mysqli, $_POST['f']['eventId'], array('outCharset'=>"UTF-8"));
if( empty($eventData) ) $message['error'] = 'Fehler: keine Eventdaten zurückgeliefert!'; if( empty($eventData) ) $message['error'] = 'Fehler: keine Eventdaten zurückgeliefert!';
else{ else{
// Abfrage der Starterdaten des Events // Abfrage der Starterdaten des Events
$starterData = getStarterForEvent($mysqlConn, $eventData['id']); $starterData = getStarterForEvent($mysqli, $eventData['id']);
// Abfrage der Fahrtdaten des Events // Abfrage der Fahrtdaten des Events
$fahrten = getFahrtenForEvent($mysqlConn, $eventData['id']); $fahrten = getFahrtenForEvent($mysqli, $eventData['id']);
} }
} }
} }
//var_dump($_POST); var_dump($_POST);
if( $_POST['action'] == "deleteStarter" ){ if( $_POST['action'] == "deleteStarter" ){
try{ try{
$dbConnection = new PDO( $dbConnection = new PDO(
@@ -204,7 +204,7 @@ $basePath = "/users/cwsvjudo/www";
} }
echo("<table>"); echo("<table>");
echo("<tr><th>Name</th><th>Vorname</th><th>Masse</th><th>Platz</th><th>starterId</th><th>fahrtId</th></tr>"); echo("<tr><th>Name</th><th>Vorname</th><th>Geb.Dat.</th><th>Masse</th><th>Platz</th><th>starterId</th><th>fahrtId</th></tr>");
foreach( $starterData as $starter ){ foreach( $starterData as $starter ){
if( empty($starter) ){ if( empty($starter) ){
@@ -217,6 +217,7 @@ $basePath = "/users/cwsvjudo/www";
$userData = getUserData($mysqli, $starter['userId']); $userData = getUserData($mysqli, $starter['userId']);
echo("<td>".mb_convert_encoding($userData['name'], 'UTF-8', 'ISO-8859-1')."</td>"); echo("<td>".mb_convert_encoding($userData['name'], 'UTF-8', 'ISO-8859-1')."</td>");
echo("<td>".mb_convert_encoding($userData['vorname'], 'UTF-8', 'ISO-8859-1')."</td>"); echo("<td>".mb_convert_encoding($userData['vorname'], 'UTF-8', 'ISO-8859-1')."</td>");
echo("<td>".mb_convert_encoding(date("d.m.Y", strtotime($userData['gebDatum'])), 'UTF-8', 'ISO-8859-1')."</td>");
echo("<td>".$starter['masse']."</td>"); echo("<td>".$starter['masse']."</td>");
echo("<td>".$starter['platz']."</td>"); echo("<td>".$starter['platz']."</td>");
echo("<td>".$starter['id']."</td>"); echo("<td>".$starter['id']."</td>");
@@ -227,7 +228,7 @@ $basePath = "/users/cwsvjudo/www";
} }
} }
// $fahrtenData = array(); // $fahrtenData = array();
// $fahrtenData = getFahrtenForEvent($mysqli, $eventData['id']); $fahrtenData = getFahrtenForEvent($mysqli, $eventData['id']);
?> ?>
<h2>Fahrten:</h2> <h2>Fahrten:</h2>
<ul> <ul>

View File

@@ -0,0 +1,140 @@
<?php
///---
/// Interface zum Wettkampfplaner
///
/// - zum externen Aufrufen über http
/// - Datenüberegabe über POST-Request
/// - alle (User-)Parameter werden in einem assoziativen Array
/// `parameter` erwartet
/// - die aufzurufende funktion wird als `action`-Parameter des
/// queueStrings erwartet.
/// - Für jede aufzurufende Funktion wird ein Wrapper inklusive
/// Inputdatenvaildierung bereitgestellt
///---
setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
$defaultValues['backtoUrl'] = "http://cwsvjudo.bplaced.net/pages/desktop/wkParticipo";
/// @todo was wird hier wirklich benötigt?
require_once('./local/wkParticipoConf.php.inc');
require_once('./auth.php');
require_once('./local/db.php.inc');
require_once('./lib/wkParticipoLib.inc.php');
$basePath = "/users/cwsvjudo/www";
require_once($basePath."/config/cwsvJudo.config.php");
require_once($basePath."/config/phpcount.config.php");
require_once($basePath."/ressourcen/phpLib/phpcount/phpcount.php");
require_once($basePath."/ressourcen/phpLib/cwsvJudo/miscAssis.php");
/// Setzen der Farben des Users
function setUserColors($dbConn, $userId, $wantedColors = ['backgroundColor'=>"#FFAE00", 'highlightColor'=>"#FF8100", 'buttonColor'=>"#291670"]){
//$colorTypes = ["backgroundColor", "highlightColor", "buttonColor"];
$defaultColors =[ // unterstützte Farben und ihre Standardbelegung
'backgroundColor'=> "#FFAE00", // Hintergrundfarbe
'highlightColor'=>"#FF8100", // Markierungen zum hervorheben
'buttonColor'=>"#291670" // Interaktionsflächen
];
// Abfragen der gesamten Konfiguration des Users
$tmpBindArray = array(
":userId"=>array('value'=>$userId, 'data_type'=>PDO::PARAM_INT)
);
// echo("DBG: setColors-userId".strval($userId));
// echo("DBG: setColors-BindArray");var_dump($tmpBindArray);
$usersConfig = dbQuery(
$dbConn,
"SELECT config FROM `wkParticipo_Users` WHERE id = :userId;",
//"SELECT * FROM `wkParticipo_Users` WHERE id = :userId;",
array(
":userId"=>array('value'=>(int)$userId, 'data_type'=>PDO::PARAM_INT)
)
);
// echo("DBG: setUserColors-usersConfig"); var_dump($usersConfig);
// - json-formatierten Konfigurationsstring in ein Assoziatives Array
// laden
// - Im Fehlerfalle ein leeres Array weitergeben
try{
$usersConfig = json_decode($usersConfig[0]['config'], true);
if( empty($usersConfig) )
throw new Exception("No usersConfig available!");
}
catch(Exception $e) {
echo("Message: " .$e->getMessage());
$usersConfig = array();
}
// Nicht mehr unterstützte Farben entfernen
foreach($usersConfig['colors'] as $colorType=>$colorValue){
// echo("DBG: setUserColors-colorType: ".$colorType);
// echo("DBG: setUserColors-defaultColors:"); var_dump($defaultColors);
if( !array_key_exists($colorType, $defaultColors) ){
//echo("DBG: ".$colorType." is no defaultColor! DefaultColors are\n");var_dump($defaultColors);
unset($usersConfig['colors'][$colorType]);
}
}
// - Neue Farben setzen, sofern sie validiert werden können
// - Es werden nur Farben übernommen, die auch unterstützt werden
foreach($defaultColors as $key=>$value){ // Alle unterstützten Farben testen
if( !preg_match("/^#(?:[0-9a-fA-F]{3}){1,2}$/", $wantedColors[$key]) ){
//echo("DBG: ".$wantedColors[$key]." doesn't regmatches to a color!");
$usersConfig['colors'][$key] = $value;
}
else{
$usersConfig['colors'][$key] = $wantedColors[$key];
}
}
// Die aktualiserte Fassung der Konfiguration abspeicher
//echo("DBG: update\n"); var_dump($usersConfig);
dbQuery(
$dbConn,
"UPDATE `wkParticipo_Users` SET config = :jsonConfig WHERE id = :userId;",
array(
":jsonConfig"=>array('value'=>json_encode($usersConfig), 'data_type'=>PDO::PARAM_STR),
":userId"=>array('value'=>$userId, 'data_type'=>PDO::PARAM_INT)
)
);
// Auch die aktuellen sessionDaten noch anpassen
$_SESSION['user']['userConfig']['colors'] = $usersConfig['colors'];
}
function apiActionSetUserColors($parameter){
//echo("DBG: apiActionSetColors-parameter:");var_dump($parameter);
// Inputvalidierung
try{
if( !is_positive_integer($parameter['userId']) )
throw new Exception("EXP: userId has to be a positive integer, but is !");
if( !is_array($parameter['colors']) )
throw new Exception("EXP: colors not given in an array!");
setUserColors(getCwsvJudoDbConn(), $parameter['userId'], $parameter['colors']);
}
catch(Exception $e){
echo("apiActionSetUserColors - ".$e->getMessage()."\n");
echo("parameter:"); var_dump($parameter);
}
return;
}
// Als allererstes den Header setzen, damit wir auch Fehlermeldungen
// ausgeben können
if(isset($_POST['backtoUrl'])){
if (filter_var($_POST['backtoUrl'], FILTER_VALIDATE_URL)) {
header("Location: ".$_POST['backtoUrl']);
} else {
header("Location: ".$defaultValues['backtoUrl']);
}
}
//echo("DBG: api-POST"); var_dump($_POST);
/// @todo übersichtlichere Variante gewüscht
if($_POST['action'] == "setUserColors"){
apiActionSetUserColors(array('userId'=>$_POST['parameter']['userId'], 'colors'=>$_POST['parameter']['colors']));
}
?>

View File

@@ -1,7 +1,5 @@
<?php <?php
session_start([ session_start();
'cookie_lifetime' => 86400, // 86400s sind 24h
]);
session_regenerate_id(); session_regenerate_id();
// Falls der serverseitige Logincookie nicht gesetzt ist, leite zur // Falls der serverseitige Logincookie nicht gesetzt ist, leite zur
if (empty($_SESSION['login'])) { if (empty($_SESSION['login'])) {
@@ -14,5 +12,6 @@
"Sie sind als <strong>".htmlspecialchars($_SESSION['user']['username'])."</strong> angemeldet.<br />". "Sie sind als <strong>".htmlspecialchars($_SESSION['user']['username'])."</strong> angemeldet.<br />".
"<a href=\"./logout.php\">Sitzung beenden</a>". "<a href=\"./logout.php\">Sitzung beenden</a>".
"</div>"; "</div>";
//<div style=\"border: 1px solid black\">".var_export($_SESSION, true)."</div>";
} }
?> ?>

View File

@@ -1,7 +1,5 @@
<?php <?php
session_start([ session_start();
'cookie_lifetime' => 86400, // 86400s sind 24h
]);
session_regenerate_id(); session_regenerate_id();
// Falls der serverseitige Logincookie nicht gesetzt ist, leite zur // Falls der serverseitige Logincookie nicht gesetzt ist, leite zur
if (empty($_SESSION['login'])){ if (empty($_SESSION['login'])){

View File

@@ -186,7 +186,7 @@
<!--Beginn der Einbindung des Counters--> <!--Beginn der Einbindung des Counters-->
<?php <?php
$chCounter_page_title = "Wettkampfplaner -- Bilderauswahlübersicht"; $chCounter_page_title = "Wettkampfplaner -- Bilderauswahlübersicht";
$chCounter_page_url = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . "?user=".$_SESSION['user']['username']; $chCounter_page_url = $_SERVER[HTTP_HOST] . $_SERVER[REQUEST_URI] . "?user=".$_SESSION['user']['username'];
$chCounter_visible=0; $chCounter_visible=0;
// include( $_SERVER['DOCUMENT_ROOT'].'/expCounter/counter.php'); // include( $_SERVER['DOCUMENT_ROOT'].'/expCounter/counter.php');
?> ?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

View File

@@ -61,7 +61,7 @@
<!--Beginn der Einbindung des Counters--> <!--Beginn der Einbindung des Counters-->
<?php <?php
// $chCounter_page_title = "Wettkampfplaner -- Wurflexikon"; // $chCounter_page_title = "Wettkampfplaner -- Wurflexikon";
// $chCounter_page_url = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . "?user=".$_SESSION['user']['username']; // $chCounter_page_url = $_SERVER[HTTP_HOST] . $_SERVER[REQUEST_URI] . "?user=".$_SESSION['user']['username'];
// $chCounter_visible=0; // $chCounter_visible=0;
// include( $_SERVER['DOCUMENT_ROOT'].'/expCounter/counter.php'); // include( $_SERVER['DOCUMENT_ROOT'].'/expCounter/counter.php');
?> ?>

View File

@@ -1,13 +1,16 @@
<?php <?php
setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge'); setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
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');
require_once('./lib/wkParticipoLib.inc.php'); require_once('./lib/wkParticipoLib.inc.php');
$basePath = "/users/cwsvjudo/www"; $basePath = "/users/cwsvjudo/www";
require_once($basePath."/config/cwsvJudo.config.php");
require_once($basePath."/config/phpcount.config.php"); require_once($basePath."/config/phpcount.config.php");
require_once($basePath."/ressourcen/phpLib/phpcount/phpcount.php"); require_once($basePath."/ressourcen/phpLib/phpcount/phpcount.php");
require_once($basePath."/ressourcen/phpLib/cwsvJudo/miscAssis.php");
$sqlMessage = array(); $sqlMessage = array();
@@ -15,6 +18,31 @@ setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
if ($mysqlConn->connect_error) { if ($mysqlConn->connect_error) {
$sqlMessage['error'] .= 'Datenbankverbindung fehlgeschlagen: ' . $mysqlConn->connect_error; $sqlMessage['error'] .= 'Datenbankverbindung fehlgeschlagen: ' . $mysqlConn->connect_error;
} }
// var_dump($_SESSION);
/// Stellt den cssCode mit den Variablendefinitionen bereit
/*
function colorThemeCss($colorArray = array('backgroundColor'=>"#FFAE00", 'highlightColor'=>"#FF8100", 'buttonColor'=>"#291670")){
//$colorTypes = ["backgroundColor", "highlightColor", "buttonColor"];
$defaultColors =['backgroundColor'=> "#FFAE00", 'highlightColor'=>"#FF8100", 'buttonColor'=>"#291670"];
//echo("DBG: colorArray:"); var_dump($colorArray);
// Inputdatenvalidierung
foreach($defaultColors as $key=>$value){
if( !preg_match("/^#(?:[0-9a-fA-F]{3}){1,2}$/", $colorArray[$key]) ){
$colorArray[$key] = $defaultColors[$key];
}
}
$ret = ":root{";
foreach($colorArray as $key=>$value){
$ret .= "--".$key.": ".$value."; ";
}
$ret .= "}";
return $ret;
}*/
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
@@ -28,10 +56,13 @@ setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
<link rel="icon" href="/ressourcen/graphiken/icons/cwsv.ico" /> <link rel="icon" href="/ressourcen/graphiken/icons/cwsv.ico" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png"> <link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="stylesheet" href="style.css"> <style>
<link rel="stylesheet" href="wkParticipo.css"> <?php
<link rel="stylesheet" href="http://cwsvjudo.bplaced.net/ressourcen/css/cwsvJudoNavBar.css"> $css = file_get_contents( $basePath."/pages/desktop/wkParticipo/wkParticipo.css");
echo(colorThemeCss($_SESSION['user']['userConfig']['colors']));
echo($css);
?>
</style>
<?php PHPCount::AddHit("Wettkampfplaner (".htmlspecialchars($_SESSION['user']['username']).")");?> <?php PHPCount::AddHit("Wettkampfplaner (".htmlspecialchars($_SESSION['user']['username']).")");?>
</head> </head>
<body> <body>
@@ -39,7 +70,6 @@ setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
<h1>Wettkampf&shy;planung - Übersicht</h1> <h1>Wettkampf&shy;planung - Übersicht</h1>
<nav class="navBar"> <nav class="navBar">
<ul> <ul>
<li> <li>
@@ -51,6 +81,7 @@ setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
<li> <li>
<a href="https://www.google.com/calendar/render?cid=http://cwsvjudo.bplaced.net/pages/desktop/wkParticipo/calendar.php">alle geplanten Wettkämpfe in den Google Kalender übernehmen</a> <a href="https://www.google.com/calendar/render?cid=http://cwsvjudo.bplaced.net/pages/desktop/wkParticipo/calendar.php">alle geplanten Wettkämpfe in den Google Kalender übernehmen</a>
</li> </li>
<?php if(isUserAdmin(getCwsvJudoDbConn(), $_SESSION['user']['userId'])) echo("<li><a href=\"./admin/\">Admin</a></li>");?>
</ul> </ul>
</nav> </nav>
@@ -121,7 +152,7 @@ setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
<h4 class="fontWeightLighter" ><?php echo( $wkEvent['Veranstaltung'] );?></h4> <h4 class="fontWeightLighter" ><?php echo( $wkEvent['Veranstaltung'] );?></h4>
<dl> <dl>
<dt>Datum</dt><dd><time datetime="<?php echo( $wkEvent['date'] );?>"><?php echo( $wkEvent['date'] );?></time></dd> <dt>Datum</dt><dd><time datetime="<?php echo( $wkEvent['date'] );?>"><?php echo( $wkEvent['date'] );?></time></dd>
<dt>Altersklassen</dt><dd><?php echo( $wkEvent['Altersklassen'] );?></dd> <dt>Altersklassen<a href="#hilfeAltersklassen"><sup>?</sup></a></dt><dd><?php echo( $wkEvent['Altersklassen'] );?></dd>
<dt>Eingeschrieben als</dt><dd><?php echo( $startTyp[$wkEvent['type']] );?></dd> <dt>Eingeschrieben als</dt><dd><?php echo( $startTyp[$wkEvent['type']] );?></dd>
</dl> </dl>
</div> </div>
@@ -167,7 +198,7 @@ setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
<div class="wkInfo"><ul> <div class="wkInfo"><ul>
<li>Datum: <?php echo (isset($fahrt['Datum']) ? "<time datetime=\"".mb_convert_encoding($fahrt['Datum'], 'UTF-8', 'ISO-8859-1')."\">".mb_convert_encoding($fahrt['Datum'], 'UTF-8', 'ISO-8859-1')."</time>" : "<fehlendes Datum>" );?></li> <li>Datum: <?php echo (isset($fahrt['Datum']) ? "<time datetime=\"".mb_convert_encoding($fahrt['Datum'], 'UTF-8', 'ISO-8859-1')."\">".mb_convert_encoding($fahrt['Datum'], 'UTF-8', 'ISO-8859-1')."</time>" : "<fehlendes Datum>" );?></li>
<li>Einschreibefrist: <?php echo (isset($fahrt['meldefrist']) ? "<time datetime=\"".mb_convert_encoding($fahrt['meldefrist'], 'UTF-8', 'ISO-8859-1')."\">".mb_convert_encoding($fahrt['meldefrist'], 'UTF-8', 'ISO-8859-1')."</time>" : "<fehlende Meldefrist>" );?></li> <li>Einschreibefrist: <?php echo (isset($fahrt['meldefrist']) ? "<time datetime=\"".mb_convert_encoding($fahrt['meldefrist'], 'UTF-8', 'ISO-8859-1')."\">".mb_convert_encoding($fahrt['meldefrist'], 'UTF-8', 'ISO-8859-1')."</time>" : "<fehlende Meldefrist>" );?></li>
<li>Altersklassen: <?php echo (isset($fahrt['Altersklassen']) ? mb_convert_encoding($fahrt['Altersklassen'], 'UTF-8', 'ISO-8859-1') : "<fehlende Altersklassen>" );?></li> <li>Altersklassen<a href="#hilfeAltersklassen"><sup>?</sup></a>: <?php echo (isset($fahrt['Altersklassen']) ? mb_convert_encoding($fahrt['Altersklassen'], 'UTF-8', 'ISO-8859-1') : "<fehlende Altersklassen>" );?></li>
<li>Ort: <a href="<?php echo (isset($fahrt['Routenplaner']) ? mb_convert_encoding($fahrt['Routenplaner'], 'UTF-8', 'ISO-8859-1') : "" );?>"><?php echo (isset($fahrt['Ort']) ? mb_convert_encoding($fahrt['Ort'], 'UTF-8', 'ISO-8859-1') : "<fehlender Ort>" );?></a></li> <li>Ort: <a href="<?php echo (isset($fahrt['Routenplaner']) ? mb_convert_encoding($fahrt['Routenplaner'], 'UTF-8', 'ISO-8859-1') : "" );?>"><?php echo (isset($fahrt['Ort']) ? mb_convert_encoding($fahrt['Ort'], 'UTF-8', 'ISO-8859-1') : "<fehlender Ort>" );?></a></li>
<li>Anzahl Plätze: <?php echo count($mitfahrerData)."/".$fahrt['plaetze'];?><ul><?php foreach($mitfahrerData as $mitfahrer){echo "<li>".mb_convert_encoding($mitfahrer['name'], 'UTF-8', 'ISO-8859-1').", ".mb_convert_encoding($mitfahrer['vorname'], 'UTF-8', 'ISO-8859-1')."</li>";};?></ul></li> <li>Anzahl Plätze: <?php echo count($mitfahrerData)."/".$fahrt['plaetze'];?><ul><?php foreach($mitfahrerData as $mitfahrer){echo "<li>".mb_convert_encoding($mitfahrer['name'], 'UTF-8', 'ISO-8859-1').", ".mb_convert_encoding($mitfahrer['vorname'], 'UTF-8', 'ISO-8859-1')."</li>";};?></ul></li>
</ul></div> </ul></div>
@@ -229,27 +260,28 @@ setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
?> ?>
<h2 id="hilfe">Erklärungen</h2> <h2 id="hilfe">Erklärungen</h2>
<h3>Fristen</h3> <h3 id="hilfeFristen">Fristen</h3>
<p> <p>
Es gibt zwei verschiedene Fristen. Zum einen die Frist vom Veranstalter, bis wann ihm alle Starter gemeldet sein müssen und zum anderen eine Frist bis wann man einen Starter für einen geplanten Wettkampf bei uns im Planer einschreiben kann. Logischerweise muss vor der Meldung bekannt sein, wer gemeldet werden kann. Deshalb ist die Einschreibefrist des Wettkampfplaners vor der Meldefrist des Veranstalters. Üblicherweise wird mit Meldeschluss die Meldung an den Veranstalter geschickt. Aber nicht immer, z. B. wenn die Teilnehmerzahl beschränkt ist. Sollte mal die Einschreibefrist verstrichen sein und man möchte trotzdem noch jemanden einschreiben, kann dies in den meisten Fällen noch erfolgen indem man mit dem Übungsleiter Rücksprache hält bevor dieser die Meldung an den Veranstalter abschickt. Es gibt zwei verschiedene Fristen. Zum einen die Frist vom Veranstalter, bis wann ihm alle Starter gemeldet sein müssen und zum anderen eine Frist bis wann man einen Starter für einen geplanten Wettkampf bei uns im Planer einschreiben kann. Logischerweise muss vor der Meldung bekannt sein, wer gemeldet werden kann. Deshalb ist die Einschreibefrist des Wettkampfplaners vor der Meldefrist des Veranstalters. Üblicherweise wird mit Meldeschluss die Meldung an den Veranstalter geschickt. Aber nicht immer, z. B. wenn die Teilnehmerzahl beschränkt ist. Sollte mal die Einschreibefrist verstrichen sein und man möchte trotzdem noch jemanden einschreiben, kann dies in den meisten Fällen noch erfolgen indem man mit dem Übungsleiter Rücksprache hält bevor dieser die Meldung an den Veranstalter abschickt.
</p> </p>
<h3>Altersklassen</h3> <h3 id="hilfeAltersklassen">Altersklassen</h3>
<p> <p>
<p> <p>
Im Judo werden die Kämpfer gemäß ihrem Alter, der Masse und (meistens auch) nach ihrem Geschlecht in Gruppen eingeteilt um miteinander zu kämpfen. Weder die Einteilung in <emph>Alters-</emph> noch die in <emph>Gewichtsklassen</emph> ist dabei einheitlich. Da die Wettkämpfe immer jeweils nur für bestimmte Altersklassen und manchmal auch nur für entweder männlich oder weiblich veranstaltet werden, sollte immer auf der Ausschreibung nachgesehen werden, wie der Veranstalter die Altersklassen definiert. Im Judo werden die Kämpfer gemäß ihrem Alter, der Masse und (meistens auch) nach ihrem Geschlecht in Gruppen eingeteilt um miteinander zu kämpfen. Weder die Einteilung in <emph>Alters-</emph> noch die in <emph>Gewichtsklassen</emph> ist dabei einheitlich. Da die Wettkämpfe immer jeweils nur für bestimmte Altersklassen und manchmal auch nur für entweder männlich oder weiblich veranstaltet werden, sollte immer auf der Ausschreibung nachgesehen werden, wie der Veranstalter die Altersklassen definiert.
</p> </p>
<p> <p>
Bezeichnet werden die Altersklassen im Judo meistens mit Ux, wobei x eine Zahl ist. Ux steht für unter x Jahre. Man ist unter x Jahre, wenn man im laufenden Kalenderjahr nicht mehr x Jahre alt wird. Eine Altersklasse geht normalerweise über zwei (teilweise auch drei) Jahrgänge. Zur U11 z.B. würden normalerweise all diejenigen gehören, die im laufenden Jahr 10 oder 9 (bei drei Jahrgängen auch 8) Jahre alt werden. Es gibt aber auch Wettkämpfe in denen die Altersklassen mehr Jahrgänge umfassen. Bezeichnet werden die Altersklassen im Judo meistens mit Ux, wobei x eine Zahl ist. Ux steht für unter x Jahre. Man ist unter x Jahre, wenn man im laufenden Kalenderjahr nicht mehr x Jahre alt wird. Eine Altersklasse geht normalerweise über zwei (teilweise auch drei) Jahrgänge. Zur U11 z.B. würden normalerweise all diejenigen gehören, die im laufenden Jahr 10 oder 9 (bei drei Jahrgängen auch 8) Jahre alt werden. Es gibt aber auch Wettkämpfe in denen die Altersklassen mehr Jahrgänge umfassen. Um dies im Wettkampfplaner ersichtlicher zu machen, habe ich eine eigene Schreibweise eingeführt. Am Bsp. der U11:<ul><li>Eine U11 geht über 2 Jahre.</li><li>Eine U11- geht über 3 Jahre.</li><li>Eine U11-- geht über 4 Jahre.</li><li>Eine &le;U11 ist nach unten offen.</li></ul>Diese Bezeichnung ist aber in keinster Weise offiziell!
</p> </p>
<p>Im Zweifelsfall kann man mich auch jederzeit fragen.</p> <p>Im Zweifelsfall kann man mich auch jederzeit fragen.</p>
<p> <p>
Für offizielle, vom Verband ausgerichtete Wettkämpfe gibt es festgelegte Alters- und Gewichtsklassen: Für offizielle, vom Verband ausgerichtete Wettkämpfe gibt es festgelegte Alters- und Gewichtsklassen:
<ul> <ul>
<li><a href='http://cwsvjudo.bplaced.net/JudoWiki/AkGk/Jvs2018'>Alters- und Gewichtsklassen des Judoverbandes Sachsen</a></li> <li><a href='http://cwsvjudo.bplaced.net/JudoWiki/AkGk/Jvs2019'>Alters- und Gewichtsklassen des Judoverbandes Sachsen</a></li>
<li><a href='http://cwsvjudo.bplaced.net/JudoWiki/AkGk/Djb2018'>Alters- und Gewichtsklassen im Deutschen Judo Bundes</a></li> <li><a href='http://cwsvjudo.bplaced.net/JudoWiki/AkGk/Djb2019'>Alters- und Gewichtsklassen im Deutschen Judo Bundes</a></li>
</ul> </ul>
</p> </p>
<p><em>Achtung</em>: Bindend ist immer die Altersklasse auf der Ausschreibung. Ich kann mich beim Abschreiben ja auch mal vertan haben.</p>
</p> </p>
<h2 id="menue">Menü</h2> <h2 id="menue">Menü</h2>
@@ -257,7 +289,9 @@ setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
<nav class="navBar"> <nav class="navBar">
<ul > <ul >
<li><a href="./userInfo.php">Zur Benutzer&shy;übersichts&shy;seite</a></li> <li><a href="./userInfo.php">Zur Benutzer&shy;übersichts&shy;seite</a></li>
<!-- Seit dem Umzug der Bilder auf lima-city ohne Funktion!
<li><a href="./galImgPicker.php">Bilder&shy;auswahl</a></li> <li><a href="./galImgPicker.php">Bilder&shy;auswahl</a></li>
-->
<li><a href="./infoZettel.php">Infozettel</a></li> <li><a href="./infoZettel.php">Infozettel</a></li>
<li><a href="./horstWolfJudosport.php">Wurflexikon</a></li> <li><a href="./horstWolfJudosport.php">Wurflexikon</a></li>
<li><a href="./logout.php">Abmelden</a></li> <li><a href="./logout.php">Abmelden</a></li>

View File

@@ -60,7 +60,7 @@
<!--Beginn der Einbindung des Counters--> <!--Beginn der Einbindung des Counters-->
<?php <?php
// $chCounter_page_title = "Wettkampfplaner -- Infozettel"; // $chCounter_page_title = "Wettkampfplaner -- Infozettel";
// $chCounter_page_url = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . "?user=".$_SESSION['user']['username']; // $chCounter_page_url = $_SERVER[HTTP_HOST] . $_SERVER[REQUEST_URI] . "?user=".$_SESSION['user']['username'];
// $chCounter_visible=0; // $chCounter_visible=0;
// include( $_SERVER['DOCUMENT_ROOT'].'/expCounter/counter.php'); // include( $_SERVER['DOCUMENT_ROOT'].'/expCounter/counter.php');
?> ?>

View File

@@ -4,52 +4,12 @@ ini_set('display_errors',1);
$basePath = "/users/cwsvjudo/www"; $basePath = "/users/cwsvjudo/www";
require_once($basePath."/config/cwsvJudo.config.php"); require_once($basePath."/config/cwsvJudo.config.php");
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" ) ){ /// Ein Array als htmlTabelle darstellen
//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) )
@@ -67,29 +27,83 @@ $ret = "";
return $ret; return $ret;
} }
/// einem User ein Attribut zuordnen
///
/// @param $aDbConnection PDO-Datenbankverbindung, die benutzt werden soll
/// @param $anUserId ID des Users, der das Attribut erhalten soll
/// @param $anAttributeId ID des zu vergebenden Attributes
///
/// - Es erfolgt keine Kontrolle, ob:
/// - die AttributId überhaupt existiert,
/// - ob die UserId überhaupt existiert,
/// - ob der User das Attribut bereits hat,
function giveUserAnUserAttribute($aDbConnection, $anUserId, $anAttributeId){ function giveUserAnUserAttribute($aDbConnection, $anUserId, $anAttributeId){
echo("Entering giveUserAnUserAttribute!"); withdrawUsersAttribute($aDbConnection, $anUserId, $anAttributeId);
try{ try{
dbQuery( dbQuery(
$aDbConnection, $aDbConnection,
"INSERT INTO `wkParticipo_user<=>userAttributes` (userId, attributeId) VALUES (:userId, :attributeId);", "INSERT INTO `wkParticipo_user<=>userAttributes` (userId, attributeId) VALUES (:userId, :attributeId);",
array( array(
':userId' => array('value'=>$anUserId, 'data_type'=>PDO::PARAM_INT), ':userId' => array('value'=>$anUserId, 'data_type'=>PDO::PARAM_INT),
':attributeId'=>array('value'=>$anAttributeId, 'data_type'=>PDO::PARAM_INT) ':attributeId'=> array('value'=>$anAttributeId, 'data_type'=>PDO::PARAM_INT)
) )
); );
} }
catch(PDOException $db_error){ catch(PDOException $db_error){
print "Error!: " . $db_error->getMessage() . "<br/>"; print "Error!: " . $db_error->getMessage() . "<br/>queryString: ".$queryString."<br />"; var_dump($bindArray);
} }
return; return;
} }
/// einem User ein Attribut entziehen
function withdrawUsersAttribute($aDbConnection, $anUserId, $anAttributeId, $limit = NULL){
try{
// Variablen für das Binden an die Query vorbereiten
// inklusive Validierung der Werte
$bindArray = array();
if( is_positive_integer( $anUserId ) ){
$bindArray[':userId'] = array('value'=>$anUserId, 'data_type'=>PDO::PARAM_INT);
}
else{
throw new InvalidArgumentException("withdrawUsersAttribute: userId must be positive integer!");
}
if( is_positive_integer($anAttributeId) ){
$bindArray[':attributeId'] = array('value'=>$anAttributeId, 'data_type'=>PDO::PARAM_INT);
}
else{
throw new InvalidArgumentException("withdrawUsersAttribute: attributeid must be positive integer");
}
if( is_positive_integer( $limit ) ){
$bindArray[':limit'] = array('value' => $limit, 'data_type' => PDO::PARAM_INT);
}
// Zusammenstellen der Query
$queryString =
"DELETE FROM `wkParticipo_user<=>userAttributes` ".
"WHERE `userId`=:userId ".
"AND `attributeId`=:attributeId".
(is_positive_integer( $limit )?" LIMIT :limit":"").
";";
echo("queryString: ".$queryString."<br />"); var_dump($bindArray);
dbQuery(
$aDbConnection,
$queryString,
$bindArray
);
}
catch(PDOException $db_error){
print "Error!: " . $db_error->getMessage() . "<br/>queryString: ".$queryString."<br />"; var_dump($bindArray);
}
return;
}// Ende withdrawUsersAttribute
#exit(); #exit();
var_dump($_GET); var_dump($_GET);
$actions = ["giveUserAnUserAttribute"]; $actions = ["giveUserAnUserAttribute", "withdrawUsersAttribute"];
$dbConn = getCwsvJudoDbConn(); $dbConn = getCwsvJudoDbConn();
@@ -98,16 +112,23 @@ $dbConn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
if(isset($_GET['action'])){ if(isset($_GET['action'])){
switch($_GET['action']){ switch($_GET['action']){
case "giveUserAnUserAttribute": case "giveUserAnUserAttribute":
//echo("Doing giveUserAnUserAttribute!");
try{ try{
giveUserAnUserAttribute($dbConn, intval($_GET['userIdToGetAttribute']), intval($_GET['attributeIdToGet'])); giveUserAnUserAttribute($dbConn, intval($_GET['userId']), intval($_GET['attributeId']));
}
catch(Exception $e){
print("UPS: ".$e->getMessage());
}
break;
case "withdrawUsersAttribute":
try{
withdrawUsersAttribute($dbConn, intval($_GET['userId']), intval($_GET['attributeId']));
} }
catch(Exception $e){ catch(Exception $e){
print("UPS: ".$e->getMessage()); print("UPS: ".$e->getMessage());
} }
break; break;
default: default:
echo("Ungültige Aktion erwünscht!"); echo("Ungültige Aktion (".$_GET['action'].") erwünscht!");
break; break;
} }
} }
@@ -141,7 +162,7 @@ $userAttributes =
</select> </select>
</label> </label>
<label>User: <label>User:
<select name="userIdToGetAttribute"> <select name="userId">
<option disabled selected value> -- User auswählen -- </option> <option disabled selected value> -- User auswählen -- </option>
<?php <?php
foreach($users as $user) foreach($users as $user)
@@ -150,7 +171,7 @@ $userAttributes =
</select> </select>
</label> </label>
<label>Attribut: <label>Attribut:
<select name="attributeIdToGet"> <select name="attributeId">
<option disabled selected value> -- Attribut auswählen -- </option> <option disabled selected value> -- Attribut auswählen -- </option>
<?php <?php
foreach($userAttributes as $userAttribute) foreach($userAttributes as $userAttribute)
@@ -164,7 +185,7 @@ $userAttributes =
<?php echo(array2htmlTableString($userAttributes));?> <?php echo(array2htmlTableString($userAttributes));?>
<?php <?php
foreach($userAttributes as $userAttribute){ foreach($userAttributes as $userAttribute){
$attributedUsers = $attributedUsers =
dbQuery( dbQuery(
$dbConn, $dbConn,
"SELECT * FROM wkParticipo_Users, `wkParticipo_user<=>userAttributes` WHERE wkParticipo_Users.id = `wkParticipo_user<=>userAttributes`.userId AND `wkParticipo_user<=>userAttributes`.attributeId=:attributeId;", "SELECT * FROM wkParticipo_Users, `wkParticipo_user<=>userAttributes` WHERE wkParticipo_Users.id = `wkParticipo_user<=>userAttributes`.userId AND `wkParticipo_user<=>userAttributes`.attributeId=:attributeId;",

View File

@@ -1270,7 +1270,7 @@ $retHtml = "";
"<div class=\"wkInfoCardWkInfo\">". "<div class=\"wkInfoCardWkInfo\">".
"<h3 class=\"fontWeightLighter\" >".$aWkEvent['Veranstaltung']."</h4>". "<h3 class=\"fontWeightLighter\" >".$aWkEvent['Veranstaltung']."</h4>".
"<dl>". "<dl>".
"<dt>Altersklassen</dt><dd>".$aWkEvent['Altersklassen']."</dd>". "<dt>Altersklassen<a href=\"#hilfeAltersklassen\"><sup>?</sup></a></dt><dd>".$aWkEvent['Altersklassen']."</dd>".
"<dt>Einschreibefrist</dt><dd>".( "<dt>Einschreibefrist</dt><dd>".(
empty($aWkEvent['meldefrist'])? empty($aWkEvent['meldefrist'])?
"fehlende Einschreibefrist" "fehlende Einschreibefrist"
@@ -1337,5 +1337,39 @@ $retHtml = "";
return $retHtml; return $retHtml;
} }
function isUserAdmin($dbConn, $userId){
$adminUsers =
dbQuery(
$dbConn,
"SELECT `wkParticipo_user<=>userAttributes`.userId, `wkParticipo_userAttributes`.name from `wkParticipo_user<=>userAttributes` LEFT JOIN `wkParticipo_userAttributes` ON `wkParticipo_user<=>userAttributes`.attributeId = `wkParticipo_userAttributes`.id WHERE `wkParticipo_userAttributes`.name = :attributeName;",
array(":attributeName"=>array('value'=>"isAdmin", 'data_type'=>PDO::PARAM_STR))
);
foreach($adminUsers as $adminUser)
if($adminUser['userId']==$userId)
return true;
return false;
}
/// Stellt den cssCode mit den Variablendefinitionen bereit
function colorThemeCss($colorArray = array('backgroundColor'=>"#FFAE00", 'highlightColor'=>"#FF8100", 'buttonColor'=>"#291670")){
//$colorTypes = ["backgroundColor", "highlightColor", "buttonColor"];
$defaultColors =['backgroundColor'=> "#FFAE00", 'highlightColor'=>"#FF8100", 'buttonColor'=>"#291670"];
//echo("DBG: colorArray:"); var_dump($colorArray);
// Inputdatenvalidierung
foreach($defaultColors as $key=>$value){
if( !preg_match("/^#(?:[0-9a-fA-F]{3}){1,2}$/", $colorArray[$key]) ){
$colorArray[$key] = $defaultColors[$key];
}
}
$ret = ":root{";
foreach($colorArray as $key=>$value){
$ret .= "--".$key.": ".$value."; ";
}
$ret .= "}";
return $ret;
}
?> ?>

View File

@@ -18,7 +18,7 @@ if (isset($_SESSION['login'])) {
$message['error'] = 'Datenbankverbindung fehlgeschlagen: ' . $mysqli->connect_error; $message['error'] = 'Datenbankverbindung fehlgeschlagen: ' . $mysqli->connect_error;
} else { } else {
$query = sprintf( $query = sprintf(
"SELECT id, loginName, pwHash FROM wkParticipo_Users WHERE loginName = '%s'", "SELECT id, loginName, pwHash, config FROM wkParticipo_Users WHERE loginName = '%s'",
$mysqli->real_escape_string($_POST['f']['username']) $mysqli->real_escape_string($_POST['f']['username'])
); );
$result = $mysqli->query($query); $result = $mysqli->query($query);
@@ -32,12 +32,11 @@ if (isset($_SESSION['login'])) {
'login' => true, 'login' => true,
'user' => array( 'user' => array(
'username' => $row['loginName'], 'username' => $row['loginName'],
'userId' => $row['id'] 'userId' => $row['id'],
'userConfig' => json_decode($row['config'], true)
), ),
); );
$message['success'] = 'Anmeldung erfolgreich, <a href="index.php">weiter zum Inhalt.'; $message['success'] = 'Anmeldung erfolgreich, <a href="index.php">weiter zum Inhalt.';
PHPCount::AddHit("wkParticipo - login - ".$row['loginName']);
header('Location: http://' . $_SERVER['HTTP_HOST'] . '/pages/desktop/wkParticipo/index.php?user=' . $_POST['f']['username']); header('Location: http://' . $_SERVER['HTTP_HOST'] . '/pages/desktop/wkParticipo/index.php?user=' . $_POST['f']['username']);
} else { } else {
sleep(1); sleep(1);

View File

@@ -0,0 +1,207 @@
<?php
require_once('./local/db.php.inc');
require_once('./local/wkParticipoConf.php.inc');
// require_once('./auth.php');
require_once('./lib/wkParticipoLib.inc.php');
if (isset($_SESSION['login'])) {
header('Location: http://' . $_SERVER['HTTP_HOST'] . '/index.php');
} else {
if (!empty($_POST)) {
if (
empty($_POST['f']['username']) ||
empty($_POST['f']['password'])
) {
$message['error'] = 'Es wurden nicht alle Felder ausgefüllt.';
} else {
$mysqli = @new mysqli($db_server, $db_user, $db_password, $db_name);
if ($mysqli->connect_error) {
$message['error'] = 'Datenbankverbindung fehlgeschlagen: ' . $mysqli->connect_error;
} else {
$query = sprintf(
"SELECT id, loginName, pwHash FROM wkParticipo_Users WHERE loginName = '%s'",
$mysqli->real_escape_string($_POST['f']['username'])
);
$result = $mysqli->query($query);
// echo $query; echo '\n'; echo $result; die();
if ($row = $result->fetch_array(MYSQLI_ASSOC)) {
// if (crypt($_POST['f']['password'], $row['password']) == $row['password']) {
if( password_verify( $_POST['f']['password'], $row['pwHash']) ){
session_start();
$_SESSION = array(
'login' => true,
'user' => array(
'username' => $row['loginName'],
'userId' => $row['id']
),
);
$message['success'] = 'Anmeldung erfolgreich, <a href="index.php">weiter zum Inhalt.';
header('Location: http://' . $_SERVER['HTTP_HOST'] . '/pages/desktop/wkParticipo/index.php?user=' . $_POST['f']['username']);
} else {
$message['error'] = 'Das Kennwort ist nicht korrekt.';
}
} else {
$message['error'] = 'Der Benutzer wurde nicht gefunden.';
}
$mysqli->close();
}
}
} else {
$message['notice'] =
"<ul>".
"<li>Dies ist die Wettkampf<em>planung</em> speziell für die Wettkämpfe der Judoka des Chemnitzer WSV. Es gibt auch noch einen <a title=\"Kalender mit Terminen und Ausschreibungen kommender Judowettkämpfe\" href=\"/pages/desktop/verein.wettkampfkalender.php\" >allgemeinen Wettkampf<em>kalender</em></a>, in dem kommende Wettkämpfe aufgelistet sind.</li>".
"<li>Die Zugangsdaten solltet Ihr von Eurem Trainer erhalten haben. Wenn nicht, erinnert ihn daran!</li>".
"<li>Für den Wettkampfplaner müssen die <a href=\"https://de.wikipedia.org/wiki/Cookie\">Cookies im Browser aktiviert sein.</a> Mit dem Einloggen akzeptiert der Nutzer, das die Cookies für Authentifizierungszwecke gesetzt werden.</li>".
"</ul>".
"<em>Anmerkung des Autors</em>: Die online Wettkampfplanung befindet sich in einem <em>experimentellem Stadium</em>. ".
"Es gibt keine Garantie, dass das ganze wirklich funktioniert! ".
"Deshalb kann und soll sie auch überhaupt nicht die persönliche Absprache zu den Wettkämpfen ersetzen. ".
"Wer Fehler findet oder Verbesserungen vorschlagen will, kann sich gerne an mich wenden.";
}
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Wettkampfplanung - Login</title>
<meta name="description" content="Loginseite des Wettkampfplaners der Judoka des Chemnitzer WSV">
<link rel="stylesheet" href="style.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<h1>Wettkampfplanung der Judoka des CWSV</h1>
<?php echo htmlRetMessage($message);?>
<style>
</style>
<form action=""./login.php" method="post">
<!-- <div class="imgcontainer">
<img src="img_avatar2.png" alt="Avatar" class="avatar">
</div>-->
<div class="container">
<label><b>Username</b></label>
<input type="text" placeholder="Enter Username" name="uname" required />
<label><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="psw" required />
<button type="submit">Login</button>
<!-- <input type="checkbox" checked="checked"> Remember me-->
</div>
<div class="container" style="background-color:#f1f1f1">
<button type="button" class="cancelbtn">Cancel</button>
<span class="psw">Forgot <a href="#">password?</a></span>
</div>
</form>
<style>
/* Bordered form */
.loginForm {
border: 3px solid #f1f1f1;
}
/* Full-width inputs */
inputField[type=text], inputField[type=password] {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
box-sizing: border-box;
}
/* Set a style for all buttons */
loginFormButton {
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
}
/* Add a hover effect for buttons */
loginFormButton:hover {
opacity: 0.8;
}
/* Extra style for the cancel button (red) */
.cancelbtn {
width: auto;
padding: 10px 18px;
background-color: #f44336;
}
/* Center the avatar image inside this container */
.imgcontainer {
text-align: center;
margin: 24px 0 12px 0;
}
/* Avatar image */
img.avatar {
width: 40%;
border-radius: 50%;
}
/* Add padding to containers */
.container {
padding: 16px;
}
/* The "Forgot password" text */
span.psw {
float: right;
padding-top: 16px;
}
/* Change styles for span and cancel button on extra small screens */
@media screen and (max-width: 300px) {
span.psw {
display: block;
float: none;
}
.cancelbtn {
width: 100%;
}
}
</style>
<form class="loginForm" action="./login.php" method="post">
<fieldset>
<legend>Benutzerdaten</legend>
<div>
<label for="username">Benutzername</label>
<input class="inputField" id="username" type="text" name="f[username]" <?php echo isset($_POST['f']['username']) ? ' value="' . htmlspecialchars($_POST['f']['username']) . '"' : '' ?> />
</div>
<div>
<label for="password">Kennnwort</label>
<input class="inputField" id="password" type="password" name="f[password]" />
</div>
</fieldset>
<fieldset>
<div>
<button class="loginFormButton" type="submit" name="submit" value="Anmelden">Anmelden</button>
</div>
</fieldset>
<fieldset class="notice"><legend>Hinweise</legend>
<ul>
<li>Änderungen von bereits abgegebenen Meldungen (Starts und Mitfahrgelegenheiten) gehen derzeit nur über einen Administrator.</li>
<li>Man erhält derzeit bei jeder Meldung eine Bestätigungsmail. Dies ist vor allem eine Sicherheitsmaßnahme damit auffällt, wenn etwas falsches (oder der/die falsche) gemeldet wurde.</li>
<li>Dieses Projekt ist in mehr oder weniger aktiven Entwicklung. Sollte mal was nicht funktionieren, kann es sein, dass ich gerade daran herumschreibe. Also ruhig zu einem späteren Zeitpunkt noch einmal probieren.</li>
</ul>
</fieldset>
</form>
<!--Beginn der Einbindung des Counters-->
<?php
$chCounter_page_title = 'Wettkampfplaner - Login';
$chCounter_visible=0;
//include( $_SERVER['DOCUMENT_ROOT'].'/expCounter/counter.php');?>
</body>
</html>

View File

@@ -33,9 +33,13 @@ setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
if( empty($eventData) ) $message['error'] .= 'Fehler: keine Eventdaten zurückgeliefert!'; if( empty($eventData) ) $message['error'] .= 'Fehler: keine Eventdaten zurückgeliefert!';
else{ else{
if(!empty($eventData['bemerkungen'])){ if(!empty($eventData['bemerkungen'])){
// var_dump($eventData);
$tmpJson = json_decode( $eventData['bemerkungen'], true); $tmpJson = json_decode( $eventData['bemerkungen'], true);
// var_dump($tmpJson);
// var_dump($eventData['bemerkungen']);
if($tmpJson){ if($tmpJson){
$eventData['Datum'] = $tmpJson['Datum']; $eventData['Datum'] = $tmpJson['Datum'];
$eventData['Ort'] = $tmpJson['Ort'];
$eventData['Veranstaltung'] = $tmpJson['Veranstaltung']; $eventData['Veranstaltung'] = $tmpJson['Veranstaltung'];
$eventData['Altersklassen'] = $tmpJson['Altersklassen']; $eventData['Altersklassen'] = $tmpJson['Altersklassen'];
$eventData['Routenplaner'] = $tmpJson['Routenplaner']; $eventData['Routenplaner'] = $tmpJson['Routenplaner'];
@@ -61,7 +65,13 @@ setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Wettkampfplanung - Wettkampfdetails<?php echo( empty($eventData) ? "" : " ".$eventData['Veranstaltung'] );?></title> <title>Wettkampfplanung - Wettkampfdetails<?php echo( empty($eventData) ? "" : " ".$eventData['Veranstaltung'] );?></title>
<link rel="stylesheet" href="./style.css"> <style>
<?php
$css = file_get_contents( $basePath."/pages/desktop/wkParticipo/wkParticipo.css");
echo(colorThemeCss($_SESSION['user']['userConfig']['colors']));
echo($css);
?>
</style>
</head> </head>
<body> <body>
<?php <?php

View File

@@ -11,6 +11,7 @@
$userInfo = getUserData( $mysqlConn, $_SESSION['user']['userId'] ); $userInfo = getUserData( $mysqlConn, $_SESSION['user']['userId'] );
$kinderInfo = getUsersKidsData( $mysqlConn, $_SESSION['user']['userId'] ); $kinderInfo = getUsersKidsData( $mysqlConn, $_SESSION['user']['userId'] );
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
@@ -24,7 +25,13 @@
<link rel="icon" href="/ressourcen/graphiken/icons/cwsv.ico" /> <link rel="icon" href="/ressourcen/graphiken/icons/cwsv.ico" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png"> <link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="stylesheet" href="style.css"> <style>
<?php
$css = file_get_contents( $basePath."/pages/desktop/wkParticipo/wkParticipo.css");
echo(colorThemeCss($_SESSION['user']['userConfig']['colors']));
echo($css);
?>
</style>
</head> </head>
<body> <body>
@@ -81,6 +88,21 @@
</li> </li>
</ul> </ul>
</nav> </nav>
<form action="api.php" method="POST">
<?php $userConfig = json_decode($userInfo['config'], true);?>
<fieldset style="display: flex;">
<legend>Farben</legend>
<label for="parameter[colors][backgroundColor]">Hintergrundfarbe</label>
<input type="color" name="parameter[colors][backgroundColor]" value="<?php echo($userConfig['colors']['backgroundColor']);?>" />
<label for="parameter[colors][highlightColor]">hervorgehobender Hintergrund</label>
<input type="color" name="parameter[colors][highlightColor]" value="<?php echo($userConfig['colors']['highlightColor']);?>" />
<label for="parameter[colors][buttonColor]">Farbe für Interaktionsflächen</label>
<input type="color" name="parameter[colors][buttonColor]" value="<?php echo($userConfig['colors']['buttonColor']);?>" />
</fieldset>
<input type="hidden" name="parameter[userId]" value="<?php echo($userInfo['id']);?>" />
<input type="hidden" name="action" value="setUserColors" />
<input type="hidden" name="backtoUrl" value="http://cwsvjudo.bplaced.net/pages/desktop/wkParticipo/userInfo.php" />
<input type="submit" value="Farben ändern"/>
</form>
</body> </body>
</html> </html>

View File

@@ -1,11 +1,257 @@
/* cssTemplate für den Wettkampfplaner
* benötigt die Variablen
*
* - --backgroundColor
* - --highlightColor
* - --buttonColor
*
* für die Farben.
*/
/* blau: #291670 */ /* blau: #291670 */
/* gelb: #fff500*/ /* gelb: #fff500*/
/* Box-Sizing global auf die BorderBox stellen */
html{
box-sizing: border-box;
}
*, ::before, ::after {
box-sizing: inherit;
}
.loginForm{}
.loginForm div{
display: flex;
flex-direction: column;
width: 100%;
}
.loginForm input{
display: block;
margin: 0;
width: 100%;
font-size: 1.5em;
border: 1px solid #bbb;
}
.loginForm button[type=submit]{
display: block;
font-size: 1em;
line-height: 2em;
color: #333;
font-weight: bold;
width: 100%;
background: #fdfdfd;
background: linear-gradient(to bottom, #fdfdfd 0%,#bebebe 100%);
border: 1px solid #bbb;
}
/**
* Wettkampfbox
**/
.wkBox{
border: 1px solid black;
display: flex;
flex-direction: column;
}
.wkBox nav{
/* width: 32%;
float: left;*/
}
.wkBox nav ul li{
display: list-item;
}
.wkBoxWkData{
border: none;
}
@media (min-width: 65em){
.wkBox{
flex-direction: row;
align-items: stretch;
justify-content: space-around;
padding: .5em;
}
.wkBox *{
flex-basis: 30%;
}
}
/* touchable Links*/
.touchLink{
display: inline-block;
padding: 0.25em 0 0.25em 0;
margin: 0.25em 0 0.25em 0;
background-color: var(--highlightColor);
border-radius: .5em;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
/* touchable Buttons */
.touchButton{
display: block;
margin: .5em 0;
font-size: 1em;
line-height: 1.5em;
color: #333;
font-weight: bold;
width: 100%;
background: #fdfdfd;
background: linear-gradient(to bottom, #fdfdfd 0%,#bebebe 100%);
border: 1px solid #bbb;
}
.touchButton[disabled]{
color: Grey;
}
@media (min-width: 65em){
/* .loginForm div{
flex-direction: row;
justify-content: space-between;
align-items: flex-end;
}
.loginForm div div{
flex-direction: column;
align-items: flex-start;
width: 30%;
}
button{
}
*/
}
body{
background-color: var(--backgroundColor);
}
nav ul {
width: 100%;
list-style: none;
padding: 0;
}
nav ul li a{
text-decoration: none;
color: black;
}
nav ul li a div{
text-align: center;
font-size: large;
font-weight: bolder;
border: 3px gray outset;
background: linear-gradient(to bottom, var(--backgroundColor) 0%, var(--highlightColor) 100%);
padding-top: .25em;
padding-bottom: .25em;
}
.navLink{
text-align: center;
/* font-size: large;*/
font-weight: bolder;
border: 3px gray outset;
background: linear-gradient(to bottom, var(--backgroundColor) 0%, var(--highlightColor) 100%);
padding-top: .25em;
padding-bottom: .25em;
}
.navLink div{
display: inline;
}
meldungsBox{
border: 1px solid black;
}
@media only screen and (min-device-width: 481px){
.wkInfo{
width: 68%;
float: right;
}
nav ul{
display: table;
}
nav ul li{
display: table-cell;
}
nav ul li a div{
text-align: center;
}
button[type=submit] {
display: block;
font-size: 1em;
line-height: 1.5em;
color: #333;
font-weight: bold;
width: 100%;
background: #fdfdfd;
background: linear-gradient(to bottom, #fdfdfd 0%,#bebebe 100%);
border: 1px solid #bbb;
}
button[disabled]{
color: Grey;
}
}
@media only screen and (max-device-width: 481px) {
nav ul li a div{
text-align: left;
}
button[type=submit] {
display: block;
font-size: 1em;
line-height: 1.5em;
color: #333;
font-weight: bold;
width: 100%;
background: #fdfdfd;
background: -moz-linear-gradient(top, #fdfdfd 0%, #bebebe 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fdfdfd), color-stop(100%,#bebebe));
background: -webkit-linear-gradient(top, #fdfdfd 0%,#bebebe 100%);
background: -o-linear-gradient(top, #fdfdfd 0%,#bebebe 100%);
background: -ms-linear-gradient(top, #fdfdfd 0%,#bebebe 100%);
background: linear-gradient(to bottom, #fdfdfd 0%,#bebebe 100%);
border: 1px solid #bbb;
-webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px;
}
button[disabled]{
color: Grey;
}
input[type=text], input[type=url], input[type=email], input[type=password], input[type=tel] {
-webkit-appearance: none; -moz-appearance: none;
display: block;
margin: 0;
width: 100%;
/* height: 2em;*/
/* line-height: 1.6em;*/
font-size: 1.5em;
border: 1px solid #bbb;
}
#meldungsBox{
/* font-size: 3em;*/
border: 1px solid black;
}
fieldset div{
font-size: 1em;
}
}
.wkInfoCard{ .wkInfoCard{
border-left: .5rem solid #291670; border-left: .5rem solid var(--buttonColor);
margin: 1rem 0; margin: 1rem 0;
display: flex; display: flex;
background-color: #FFAE00; background-color: var(--backgroundColor);
border-radius: 2px; border-radius: 2px;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.16), box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.16),
0 2px 10px 0 rgba(0, 0, 0, 0.12); 0 2px 10px 0 rgba(0, 0, 0, 0.12);
@@ -20,7 +266,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
color: #291670; color: var(--buttonColor);
padding: 0rem 0.5rem 0rem 0rem; padding: 0rem 0.5rem 0rem 0rem;
width: 6rem; width: 6rem;
} }
@@ -46,7 +292,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex-grow: 1; flex-grow: 1;
background-color: #FF8100; background-color: var(--highlightColor);
} }
@media (min-width: 640px){ @media (min-width: 640px){
.wkInfoCardWkData{ .wkInfoCardWkData{
@@ -91,7 +337,7 @@
} }
.wkInfoCardButtonSuccess { .wkInfoCardButtonSuccess {
background-color: #291670; background-color: var(--buttonColor);
color: #eee; color: #eee;
} }
@@ -130,3 +376,51 @@
.material-icons { .material-icons {
width: 1rem; width: 1rem;
} }
/*
css für Navigationsleiste
*/
.navBar{
width: 100%;
margin: 0 auto;
}
.navBar > ul{
display: flex;
flex-flow: column;
text-align: center;
background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 25%, rgba(255, 255, 255, 0.2) 75%, rgba(255, 255, 255, 0) 100%);
box-shadow: 0 0 .5em rgba(0, 0, 0, 0.1), inset 0 0 1px rgba(255, 255, 255, 0.6);
}
.navBar ul > li > a {
height: 100%;
padding: .25em;
text-transform:uppercase;
color: rgba(0, 35, 122, 0.5);
font-size: Large;
text-decoration: none;
display: block;
}
.navBar > ul > li > a:hover {
box-shadow: 0 0 .2em rgba(0, 0, 0, 0.1), inset 0 0 1px rgba(255, 255, 255, 0.6);
background: rgba(255, 255, 255, 0.1);
color: rgba(0, 35, 122, 0.7);
}
@media (min-width: 640px){
.navBar > ul{
flex-flow: row;
justify-content: space-between;
align-items: stretch;
}
.navBar > ul > li {
align-items: center;
flex-grow: 1;
flex-basis: 100%;
}
}