Merge branch 'wkParticipo'

This commit is contained in:
marko
2020-08-30 18:31:07 +02:00
24 changed files with 544 additions and 24 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

@@ -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 @@
<?php endif; ?>
<fieldset>
<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="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="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="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>
<div><input type="submit" name="submit" value="Erstellen" /></div>

View File

@@ -66,7 +66,13 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<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>
<body>
<?php

View File

@@ -103,7 +103,13 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<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>
<body>
<?php echo $login_status; ?>

View File

@@ -15,10 +15,11 @@
<body>
<?php echo $login_status; ?>
<h1>Inhalt</h1>
<p><a href="./register.php">Neuen Benutzer 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="./listEvents.php">Events anzeigen.</a></p>
<p><a href="./register.php">Neuen Benutzer 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="./listEvents.php">Events anzeigen</a></p>
<p><a href="./newsLetter.php?sendNewsletter">Newsletter manuel senden</a></p>
<p><a href="<?php echo( $baseUrl."/lib/wkParticipo-userAttribute.php");?>">Attribute verteilen</a></p>
</body>
</html>

View File

@@ -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 @@
}
?>
</ul>
<!--Beginn der Einbindung des Counters-->
<?php
$chCounter_page_title = "Wettkampfplanung - Administration - eventList";
$chCounter_visible=0;
//include( $_SERVER['DOCUMENT_ROOT'].'/expCounter/counter.php');?>
</body>
</html>

View File

@@ -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;

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']));
}
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

View File

@@ -249,8 +249,8 @@ setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
<p>
Für offizielle, vom Verband ausgerichtete Wettkämpfe gibt es festgelegte Alters- und Gewichtsklassen:
<ul>
<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/Djb2019'>Alters- und Gewichtsklassen im Deutschen Judo Bundes</a></li>
<li><a href='http://cwsvjudo.bplaced.net/JudoWiki/AkGk/Jvs2020'>Alters- und Gewichtsklassen des Judoverbandes Sachsen</a></li>
<li><a href='http://cwsvjudo.bplaced.net/JudoWiki/AkGk/Djb2020'>Alters- und Gewichtsklassen im Deutschen Judo Bundes</a></li>
</ul>
</p>
<p><em>Achtung</em>: Bindend ist immer die Altersklasse auf der Ausschreibung. Ich kann mich beim Abschreiben ja auch mal vertan haben.</p>
@@ -261,6 +261,9 @@ setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
<nav class="navBar">
<ul >
<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="./infoZettel.php">Infozettel</a></li>
<li><a href="./horstWolfJudosport.php">Wurflexikon</a></li>
<li><a href="./logout.php">Abmelden</a></li>

View File

@@ -0,0 +1,55 @@
<?php
namespace participo;
$basePath = "/users/cwsvjudo/www";
require_once($basePath."/ressourcen/phpLib/cwsvJudo/miscAssis.php");
require_once($basePath."/config/cwsvJudo.config.php");
class user{
public $id;
public $loginName;
public $name;
public $vorname;
public $gebDatum;
public $eMail;
/// Setzen aller Attribute
/// @todo Inputvalidation
function set($userData){
$this->id = $userData["id"];
$this->loginName = $userData["loginName"];
$this->name = $userData["name"];
$this->vorname = $userData["vorname"];
$this->gebDatum = $userData["gebDatum"];
$this->eMail = $userData["eMail"];
return;
}
function toAssoc(){
return array(
"id" => $this->id,
"loginName"=> $this->loginName,
"name" => $this->name,
"vorname" => $this->vorname,
"gebDatum" => $this->gebDatum,
"eMail" => $this->eMail);
}
function loadFromDb($dbConn, $id){
$this->set(
loadUserDataFromDb($dbConn, $id)
);
}
}
/// request user from db via id
/// return user as assoziative array
function loadUserDataFromDb($dbConn, $userId){
return
dbQuery(
$dbConn,
"SELECT * FROM `wkParticipo_Users` WHERE id = :userId;",
array(
":userId"=>array('value'=>(int)$userId, 'data_type'=>\PDO::PARAM_INT)
)
)[0];
}
?>

View File

@@ -27,6 +27,23 @@ $ret = "";
return $ret;
}
function arrayKeyed2htmlTableString($anArray, $keyList){
$ret = "";
if( !is_array($anArray) )
return "";
$ret .= "<table>";
foreach($anArray as $row){
if( !is_array($anArray) )
continue;
$ret .= "<tr>";
foreach( $keyList as $key )
$ret .= "<td>".$row[$key]."</td>";
$ret .= "</tr>";
}
$ret .= "</table>";
return $ret;
}
/// einem User ein Attribut zuordnen
///
/// @param $aDbConnection PDO-Datenbankverbindung, die benutzt werden soll
@@ -185,13 +202,37 @@ $userAttributes =
<?php echo(array2htmlTableString($userAttributes));?>
<?php
foreach($userAttributes as $userAttribute){
echo("<h2>".$userAttribute["name"]."</h2>");
// get the users with the attribute by a cross join
// remark: there are two id-columns, from which one gets lost (the one from the user) in the phpArray.
// so we (have to) use the userId from the attribute
// in short attributed => userId, unattributed => id (is the id of the user)
$attributedUsers =
dbQuery(
$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;",
array(":attributeId"=>array('value'=>$userAttribute['id'], 'data_type'=>PDO::PARAM_INT))
);
echo( "<h2>".$userAttribute['name']."</h2>".array2htmlTableString($attributedUsers) );
// Add a withthraw link entry
foreach($attributedUsers as $index => $user){
$attributedUsers[$index] += ["withdrawLink" => "<a href=\"?action=withdrawUsersAttribute&userId=".$user["userId"]."&attributeId=".$userAttribute["id"]."\">withdraw ".$userAttribute["name"]."</a>"];
}
echo( "<h3>have it</h3>".arrayKeyed2htmlTableString($attributedUsers, ["userId", "name", "vorname", "withdrawLink"]) );
$attributedKeyList = [];
foreach($attributedUsers as $user){
$attributedKeyList[] = $user["userId"];
}
$unattributedUsers = array();
foreach($users as $user){
if(!in_array($user["id"], $attributedKeyList)){
$unattributedUsers[] = $user;
}
}
// Add a giveAttribute link entry to every user
foreach($unattributedUsers as $index => $user){
$unattributedUsers[$index] += ["giveAttributeLink" => "<a href=\"?action=giveUserAnUserAttribute&userId=".$user["id"]."&attributeId=".$userAttribute["id"]."\">give Attribute ".$userAttribute["name"]."</a>"];
}
echo( "<h3>give it</h3>".arrayKeyed2htmlTableString($unattributedUsers, ["id", "name", "vorname", "giveAttributeLink"]) );
}
?>

View File

@@ -1349,4 +1349,27 @@ function isUserAdmin($dbConn, $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

@@ -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

@@ -65,7 +65,13 @@ setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<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>
<body>
<?php

View File

@@ -11,6 +11,7 @@
$userInfo = getUserData( $mysqlConn, $_SESSION['user']['userId'] );
$kinderInfo = getUsersKidsData( $mysqlConn, $_SESSION['user']['userId'] );
?>
<!DOCTYPE html>
<html>
@@ -24,7 +25,13 @@
<link rel="icon" href="/ressourcen/graphiken/icons/cwsv.ico" />
<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>
<body>
@@ -81,6 +88,21 @@
</li>
</ul>
</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>
</html>