diff --git a/homepage/wkParticipo/abbildungen/060-066.DeAshiBarei.png b/homepage/wkParticipo/abbildungen/060-066.DeAshiBarei.png new file mode 100644 index 0000000..b59b654 Binary files /dev/null and b/homepage/wkParticipo/abbildungen/060-066.DeAshiBarei.png differ diff --git a/homepage/wkParticipo/abbildungen/067-072.HizaGuruma.png b/homepage/wkParticipo/abbildungen/067-072.HizaGuruma.png new file mode 100644 index 0000000..df6dc06 Binary files /dev/null and b/homepage/wkParticipo/abbildungen/067-072.HizaGuruma.png differ diff --git a/homepage/wkParticipo/abbildungen/073-078.png b/homepage/wkParticipo/abbildungen/073-078.png new file mode 100644 index 0000000..ff40ef9 Binary files /dev/null and b/homepage/wkParticipo/abbildungen/073-078.png differ diff --git a/homepage/wkParticipo/abbildungen/177-181.TaiOtoshi.png b/homepage/wkParticipo/abbildungen/177-181.TaiOtoshi.png new file mode 100644 index 0000000..66a2dcb Binary files /dev/null and b/homepage/wkParticipo/abbildungen/177-181.TaiOtoshi.png differ diff --git a/homepage/wkParticipo/abbildungen/182-184.TaiOtoshi.png b/homepage/wkParticipo/abbildungen/182-184.TaiOtoshi.png new file mode 100644 index 0000000..b46dee2 Binary files /dev/null and b/homepage/wkParticipo/abbildungen/182-184.TaiOtoshi.png differ diff --git a/homepage/wkParticipo/abbildungen/185-187.TaiOtoshi.png b/homepage/wkParticipo/abbildungen/185-187.TaiOtoshi.png new file mode 100644 index 0000000..f260f6d Binary files /dev/null and b/homepage/wkParticipo/abbildungen/185-187.TaiOtoshi.png differ diff --git a/homepage/wkParticipo/abbildungen/188-190.TaiOtoshi.png b/homepage/wkParticipo/abbildungen/188-190.TaiOtoshi.png new file mode 100644 index 0000000..6570e92 Binary files /dev/null and b/homepage/wkParticipo/abbildungen/188-190.TaiOtoshi.png differ diff --git a/homepage/wkParticipo/abbildungen/SeoiNage.125-128.png b/homepage/wkParticipo/abbildungen/SeoiNage.125-128.png new file mode 100644 index 0000000..fa7f2c0 Binary files /dev/null and b/homepage/wkParticipo/abbildungen/SeoiNage.125-128.png differ diff --git a/homepage/wkParticipo/abbildungen/SeoiNage.129-131.png b/homepage/wkParticipo/abbildungen/SeoiNage.129-131.png new file mode 100644 index 0000000..51b0d05 Binary files /dev/null and b/homepage/wkParticipo/abbildungen/SeoiNage.129-131.png differ diff --git a/homepage/wkParticipo/addEvent.php b/homepage/wkParticipo/addEvent.php index de4df97..9d05fed 100644 --- a/homepage/wkParticipo/addEvent.php +++ b/homepage/wkParticipo/addEvent.php @@ -12,12 +12,13 @@ $message['error'] = 'Datenbankverbindung fehlgeschlagen: ' . $mysqli->connect_error; } $query = sprintf( - "INSERT INTO wkParticipo_Events (wkId, meldefrist) - SELECT * FROM (SELECT '%s', '%s') as new_event + "INSERT INTO wkParticipo_Events (wkId, datum, meldefrist) + SELECT * FROM (SELECT '%s', '%s', '%s') as new_event WHERE NOT EXISTS ( SELECT wkId FROM wkParticipo_Events WHERE wkId = '%s' ) LIMIT 1;", $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']['wkId']) ); @@ -54,8 +55,14 @@
Benutzerdaten -
/>
-
/>
+
+ + /> +
+
+ + /> +
diff --git a/homepage/wkParticipo/addFahrt.php b/homepage/wkParticipo/addFahrt.php index 5e354b7..7888b56 100644 --- a/homepage/wkParticipo/addFahrt.php +++ b/homepage/wkParticipo/addFahrt.php @@ -66,7 +66,13 @@ Wettkampfplaner - Meldung - + Wettkampfplaner - Meldung - + diff --git a/homepage/wkParticipo/admin/index.php b/homepage/wkParticipo/admin/index.php index ad967ae..12a3ad8 100644 --- a/homepage/wkParticipo/admin/index.php +++ b/homepage/wkParticipo/admin/index.php @@ -15,10 +15,11 @@

Inhalt

-

Neuen Benutzer anlegen.

-

Neuen Event anlegen.

-

User anzeigen.

-

Events anzeigen.

+

Neuen Benutzer anlegen

+

Neuen Event anlegen

+

User anzeigen

+

Events anzeigen

+

Newsletter manuel senden

">Attribute verteilen

diff --git a/homepage/wkParticipo/admin/listEvents.php b/homepage/wkParticipo/admin/listEvents.php index 5c370a9..5a5f906 100644 --- a/homepage/wkParticipo/admin/listEvents.php +++ b/homepage/wkParticipo/admin/listEvents.php @@ -25,7 +25,8 @@ echo $message['error']; die(); } - $eventList = getAllEvents($mysqli); +// $eventList = getAllEvents($mysqli); + $eventList = getCommingWkEvents($mysqli); foreach($eventList as $event){ // $wkData = getWkData($mysqli, $event['wkId']); $wkData = getWkEventData($mysqli, $event['id']); @@ -49,12 +50,6 @@ } ?> - - - diff --git a/homepage/wkParticipo/admin/showUser.php b/homepage/wkParticipo/admin/showUser.php index 2f856ab..8bded86 100644 --- a/homepage/wkParticipo/admin/showUser.php +++ b/homepage/wkParticipo/admin/showUser.php @@ -3,9 +3,12 @@ require_once('../auth.php'); require_once('../local/db.php.inc'); require_once('../lib/wkParticipoLib.inc.php'); + require_once('../lib/wkParticipo-user.php'); $message = array(); $eventData = array(); + + $user = new participo\user(); if(empty($_POST)){ $message['error'] = "Fehler: leeres POST!"; @@ -16,6 +19,11 @@ } else{ if( (string)(int)$_POST['f']['userId'] == $_POST['f']['userId'] ){ + $user->loadFromDb(getCwsvJudoDbConn(), $_POST['f']['userId']); + var_dump($_POST); + var_dump($user); + var_dump($user->toAssoc()); + $mysqli = @new mysqli($db_server, $db_user, $db_password, $db_name); if ($mysqli->connect_error) { $message['error'] = 'Datenbankverbindung fehlgeschlagen: ' . $mysqli->connect_error; diff --git a/homepage/wkParticipo/api.php b/homepage/wkParticipo/api.php new file mode 100644 index 0000000..85ed495 --- /dev/null +++ b/homepage/wkParticipo/api.php @@ -0,0 +1,140 @@ +"#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'])); +} + +?> diff --git a/homepage/wkParticipo/graphiken/HaltestelleAmSuedring.png b/homepage/wkParticipo/graphiken/HaltestelleAmSuedring.png new file mode 100644 index 0000000..6bdc781 Binary files /dev/null and b/homepage/wkParticipo/graphiken/HaltestelleAmSuedring.png differ diff --git a/homepage/wkParticipo/index.php b/homepage/wkParticipo/index.php index 4c3406c..7a6000e 100644 --- a/homepage/wkParticipo/index.php +++ b/homepage/wkParticipo/index.php @@ -249,8 +249,8 @@ setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');

Für offizielle, vom Verband ausgerichtete Wettkämpfe gibt es festgelegte Alters- und Gewichtsklassen:

Achtung: Bindend ist immer die Altersklasse auf der Ausschreibung. Ich kann mich beim Abschreiben ja auch mal vertan haben.

@@ -261,6 +261,9 @@ setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge'); - +
+ +
+ Farben + + + + + + +
+ + + + +