Merge branch 'master' into coronaZeit
6
.gitmodules
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
[submodule "homepage/materialize"]
|
||||
path = submodules/materialize
|
||||
url = https://github.com/materializecss/materialize.git
|
||||
[submodule "homepage/redesign2018/markdownExperiment/zopfli"]
|
||||
path = submodules/zopfli
|
||||
url = https://github.com/google/zopfli.git
|
||||
34
coronaZeit/mdNewsletter.d/2021-05-09-ENDLICH.md
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
title: coronaNewsletter 2021-05-10
|
||||
---
|
||||
|
||||
Hallo liebe Eltern,
|
||||
Hallo liebe Judoka,
|
||||
|
||||
das erste gemeinsame Training nach so langer Zeit ist sehr gut
|
||||
angekommen. Natürlich würde ich mich freuen das gemeinsame Training
|
||||
vor Ort wieder im Trainingsplan zu verankern. Die Einschränkung auf
|
||||
Gruppen von fünf Kindern stellt allerdings eine Herausforderung dar.
|
||||
Um den Schlüssel 1:5 aufrecht zu erhalten, wird vorraussichtlich die
|
||||
Mithilfe von Eltern benötigt. Es würde also sehr helfen, wenn sich
|
||||
Eltern - wenn möglich abwechselnd - an der Aufsicht während des
|
||||
Trainings beteiligen. Den für die Aufsicht geforderten Corona Test
|
||||
würde ich stellen.
|
||||
|
||||
Für die bessere Planung - gerade der Anzahl der nötigen
|
||||
Aufsichtspersonen - bitte ich für das Freitagstraining ein Einschreiben
|
||||
in unseren [Planer][1].
|
||||
|
||||
Für diese Woche wird das Training Mittwoch Online- und Freitag als
|
||||
Freiluft-Variante stattfinden:
|
||||
|
||||
- Mittwoch, 12.05.2021, 17:00 Uhr
|
||||
- [Link](https://webroom.hrz.tu-chemnitz.de/gl/nic-s0t-f4i-biq)
|
||||
- Passwort: 320360
|
||||
- Freitag, 14.05.2021, 17:00 Uhr
|
||||
- [Treppe][2]
|
||||
|
||||
MsG marko
|
||||
|
||||
[1]: http://cwsvjudo.bplaced.net/pages/desktop/wkParticipo
|
||||
[2]: https://www.openstreetmap.org/?mlat=50.80739&mlon=12.87792#map=17/50.80708/12.87956
|
||||
31
coronaZeit/mdNewsletter.d/2021-05-16-TreppeDieDritte.md
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
title: coronaNewsletter 2021-05-16
|
||||
---
|
||||
|
||||
Hallo liebe Eltern,
|
||||
Hallo liebe Judoka,
|
||||
|
||||
das Wetter war uns letzten Freitag gerade noch einmal gut gesonnen. Für
|
||||
den nächsten Freitag sieht es ähnlich aus: Am Nachmittag soll es
|
||||
freundlich werden. Es wird also spannend, aber diese Woche ist das
|
||||
Training wieder Mittwoch als Online- und Freitag als Open Air
|
||||
Veranstaltung geplant:
|
||||
|
||||
- Mittwoch, 19.05.2021, 17:00 Uhr
|
||||
- [Link](https://webroom.hrz.tu-chemnitz.de/gl/nic-s0t-f4i-biq)
|
||||
- Passwort: 320360
|
||||
- Freitag, 21.05.2021, 17:00 Uhr
|
||||
- [Treppe][2]
|
||||
|
||||
Ein bisschen stockend ist noch die Anmeldung zu den Präsenztrainings.
|
||||
Ich muss nochmal darauf hinweisen, dass derzeit für fünf Kinder je ein
|
||||
Übungsleiter abgestellt werden muss. Damit im Vorfeld genügend
|
||||
Übungsleiter organisiert werden können, ist die Anzahl der
|
||||
teilnehmenden Kinder vonnöten. Deshalb hier nochmal die dringende
|
||||
Bitte, mir Bescheid zugeben (am besten über unseren [Planer][1]), mit
|
||||
wievielen Kindern gerechnet werden kann.
|
||||
|
||||
MsG marko
|
||||
|
||||
[1]: http://cwsvjudo.bplaced.net/pages/desktop/wkParticipo
|
||||
[2]: https://www.openstreetmap.org/?mlat=50.80739&mlon=12.87792#map=17/50.80708/12.87956
|
||||
@@ -1,71 +1,113 @@
|
||||
<?php
|
||||
require_once('machs.php');
|
||||
setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
|
||||
require_once("config.php");
|
||||
|
||||
require_once("./local/dbConf.php");
|
||||
require_once("./local/achievementsConf.php");
|
||||
|
||||
PHPCount::AddHit("Achievementsystem (".htmlspecialchars($_SESSION['user']['username']).")");
|
||||
require_once("./lib/db.php");
|
||||
require_once("./lib/achievementsLib.php");
|
||||
require_once("./lib/api.php");
|
||||
|
||||
$dbConnection = getPdoDbConnection(
|
||||
$cwsvJudoConfig["db"]["host"],
|
||||
$cwsvJudoConfig["db"]["name"],
|
||||
$cwsvJudoConfig["db"]["host"],
|
||||
$cwsvJudoConfig["db"]["name"],
|
||||
$cwsvJudoConfig["db"]["user"],
|
||||
$cwsvJudoConfig["db"]["password"]
|
||||
);
|
||||
require_once("./auth.php");
|
||||
|
||||
record::setDbConnection($dbConnection);
|
||||
achievementGroup::setDbConnection($dbConnection);
|
||||
$achievementGroups = achievementGroup::getAllAchievementGroups();
|
||||
$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");
|
||||
|
||||
// $dbConnection = getCwsvJudoDbConn();
|
||||
$dbConnection = getPdoDbConnection(
|
||||
$cwsvJudoConfig["db"]["host"],
|
||||
$cwsvJudoConfig["db"]["name"],
|
||||
$cwsvJudoConfig["db"]["user"],
|
||||
$cwsvJudoConfig["db"]["password"]
|
||||
);
|
||||
|
||||
$achievementGroups = getAchievementGroups($dbConnection);
|
||||
|
||||
processPostData($dbConnection, $_POST);
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
|
||||
<!-- Compiled and minified CSS -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
|
||||
<!-- Compiled and minified JavaScript -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@materializecss/materialize@1.1.0-alpha/dist/css/materialize.min.css">
|
||||
<!-- Compiled and minified JavaScript -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/@materializecss/materialize@1.1.0-alpha/dist/js/materialize.min.js"></script>
|
||||
|
||||
<!-- inits for the materializeCss -->
|
||||
<?php include("lib/machs/materializeInit.php");?>
|
||||
|
||||
|
||||
<title>Achievements</title>
|
||||
<meta name="description" content="Achievements">
|
||||
|
||||
|
||||
<link rel="icon" href="<?echo($config['ressourceUrl']);?>/graphiken/icons/cwsv.ico" />
|
||||
<link rel="apple-touch-icon" href="<?echo($config['baseUrl']);?>/apple-touch-icon.png">
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- sidenav -->
|
||||
<?php include("lib/machs/sidenav.php");?>
|
||||
<!-- end sidenav -->
|
||||
|
||||
<?php // show own achievements, if oneself is inTraining
|
||||
<?php echo $login_status; ?>
|
||||
|
||||
<?php
|
||||
if( hasUserAttribute($dbConnection, $_SESSION['user']['userId'], "inTraining" ) ){
|
||||
echo( "<h2>Eigene Achievements</h2>" );
|
||||
echo( "<div style=\"display:flex; flex-wrap:wrap; align-items:stretch;\" class=\"row\">");
|
||||
foreach($achievementGroups as $g){
|
||||
echo($g->asHtmlCard($_SESSION['user']['userId']));
|
||||
}
|
||||
echo("</div>" );
|
||||
echo( htmlUsersUploadBox($dbConnection, $_SESSION['user']['userId']) );
|
||||
echo(htmlAchievementListForUser(
|
||||
$dbConnection,
|
||||
$achievementGroups,
|
||||
$_SESSION['user']['userId'],
|
||||
getUsersAchievements($dbConnection, $_SESSION['user']['userId'])
|
||||
));
|
||||
}
|
||||
?>
|
||||
|
||||
<?php // show the achievements of each kid
|
||||
$usersKids = getUsersKids($dbConnection, $_SESSION['user']['userId']);
|
||||
foreach($usersKids as $k){
|
||||
if( hasUserAttribute($dbConnection, $k['kidId'], "inTraining" ) ){
|
||||
echo( "<h2>".$k['vorname']." ".$k['name']."</h2>" );
|
||||
echo( "<div style=\"display:flex; flex-wrap:wrap; align-items:stretch;\" class=\"row\">");
|
||||
foreach($achievementGroups as $g){
|
||||
echo($g->asHtmlCard($k['kidId'], ['noForm'=>false]));
|
||||
<?php
|
||||
$usersKids = getUsersKids($dbConnection, $_SESSION['user']['userId']);
|
||||
foreach($usersKids as $k){
|
||||
if( hasUserAttribute($dbConnection, $k['kidId'], "inTraining" ) and ($k['kidId']!=$_SESSION['user']['userId']) ){
|
||||
echo( "<h2>".$k['vorname']." ".$k['name']."</h2>" );
|
||||
echo( htmlUsersUploadBox($dbConnection, $k['kidId']) );
|
||||
echo(htmlAchievementListForUser(
|
||||
$dbConnection,
|
||||
$achievementGroups,
|
||||
$k['id'],
|
||||
getUsersAchievements($dbConnection, $k['id'])
|
||||
));
|
||||
}
|
||||
echo("</div>" );
|
||||
}
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
|
||||
<?php
|
||||
if(isUserAdmin($dbConnection, $_SESSION['user']['userId'])){
|
||||
echo("<h2 id=\"addAchievementBox\">Add Achievements</h2>");
|
||||
echo(htmlAddAchievementBox());
|
||||
|
||||
echo("<h2>Update Achievements</h2>");
|
||||
$achievements = getAchievements($dbConnection);
|
||||
foreach($achievements as $a){
|
||||
echo( htmlUpdateAchievementBox(
|
||||
$a['id'],
|
||||
$a['name'],
|
||||
$a['description'],
|
||||
$a['rootId'],
|
||||
$a['level']
|
||||
));
|
||||
echo("<hr />");
|
||||
}
|
||||
}
|
||||
?>
|
||||
<span id="endOfUpdateAchievementBoxes" style="display:none;" ></span>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -1,51 +1,50 @@
|
||||
<?php
|
||||
require_once("./local/cwsvJudo.config.php");
|
||||
require_once("./lib/db.php");
|
||||
require_once("./lib/api.php");
|
||||
require_once("./local/cwsvJudo.config.php");
|
||||
require_once("./lib/db.php");
|
||||
require_once("./lib/api.php");
|
||||
|
||||
$dbConnection = getPdoDbConnection(
|
||||
$cwsvJudoConfig["db"]["host"],
|
||||
$cwsvJudoConfig["db"]["name"],
|
||||
$cwsvJudoConfig["db"]["user"],
|
||||
$cwsvJudoConfig["db"]["password"]
|
||||
);
|
||||
$dbConnection = getPdoDbConnection(
|
||||
$cwsvJudoConfig["db"]["host"],
|
||||
$cwsvJudoConfig["db"]["name"],
|
||||
$cwsvJudoConfig["db"]["user"],
|
||||
$cwsvJudoConfig["db"]["password"]
|
||||
);
|
||||
|
||||
processPostData($dbConnection, $_POST);
|
||||
processPostData($dbConnection, $_POST);
|
||||
|
||||
$judokas = getUsersWithAttribute($dbConnection, "inTraining");
|
||||
$judokas = getUsersWithAttribute($dbConnection, "inTraining");
|
||||
|
||||
$lastAttendances = getLastAttendances($dbConnection);
|
||||
$lastAttendancesAssocArray = array();
|
||||
foreach($lastAttendances as $a){
|
||||
if(!array_key_exists( $a['date'], $lastAttendancesAssocArray)){
|
||||
$lastAttendancesAssocArray[$a['date']] = array();
|
||||
$lastAttendances = getLastAttendances($dbConnection);
|
||||
$lastAttendancesAssocArray = array();
|
||||
foreach($lastAttendances as $a){
|
||||
if(!array_key_exists( $a['date'], $lastAttendancesAssocArray)){
|
||||
$lastAttendancesAssocArray[$a['date']] = array();
|
||||
}
|
||||
array_push( $lastAttendancesAssocArray[ $a['date'] ], $a );
|
||||
}
|
||||
array_push( $lastAttendancesAssocArray[ $a['date'] ], $a );
|
||||
}
|
||||
|
||||
$dateLastWendsday = new DateTime("last wednesday");
|
||||
$dateLastFriday = new DateTime("last friday");
|
||||
$lastTrainingDay = max($dateLastWendsday, $dateLastFriday);
|
||||
|
||||
$dateLastWendsday = new DateTime("tomorrow last wednesday");
|
||||
$dateLastFriday = new DateTime("tomorrow last friday");
|
||||
$lastTrainingDay = max($dateLastWendsday, $dateLastFriday);
|
||||
?>
|
||||
<html>
|
||||
<header>
|
||||
<!-- Compiled and minified CSS -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
|
||||
<!-- Compiled and minified JavaScript -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var elems = document.querySelectorAll('select');
|
||||
var instances = M.FormSelect.init(elems);
|
||||
});
|
||||
</script>
|
||||
<!--Let browser know website is optimized for mobile-->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
</header>
|
||||
<!-- Compiled and minified CSS -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@materializecss/materialize@1.1.0-alpha/dist/css/materialize.min.css">
|
||||
<!-- Compiled and minified JavaScript -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/@materializecss/materialize@1.1.0-alpha/dist/js/materialize.min.js"></script>
|
||||
<!-- Inits for materializecss-->
|
||||
<?php include_once("lib/mams/materializeInit.php");?>
|
||||
<!--Let browser know website is optimized for mobile-->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
|
||||
<title>Corona-Anwesenheitsliste der Judoka des Chemnitzer WSV</title>
|
||||
</header>
|
||||
<body>
|
||||
<h1>Corona-Anwesenheitsliste der Judoka des Chemnitzer WSV</h1>
|
||||
<h2>Anwesenheiten hinzufügen</h2>
|
||||
<!-- sidenav for mams-->
|
||||
<?php include_once("lib/mams/sidenav.php");?>
|
||||
<h2 id="addAttendences">Anwesenheiten hinzufügen</h2>
|
||||
|
||||
<form action="./index.php" method="POST">
|
||||
<div class="input-field">
|
||||
<input id="giveAttendanceAction" name="action" value="giveAttendance" type="hidden" />
|
||||
@@ -56,7 +55,28 @@ $lastTrainingDay = max($dateLastWendsday, $dateLastFriday);
|
||||
<input type="submit" value="Submit">
|
||||
</div>
|
||||
</form>
|
||||
<h2>Anwesenheiten</h2>
|
||||
|
||||
<h2 id="addCoronaUser">Corona-Trainee hinzufügen</h2>
|
||||
<?php
|
||||
if( array_key_exists('addCoronaUserSuccess', $_GET) ){
|
||||
if($_GET['addCoronaUserSuccess'] == "true"){
|
||||
echo("<div>Added user.</div>");
|
||||
}else{
|
||||
echo("<div>ERROR</div>");
|
||||
}
|
||||
}
|
||||
?>
|
||||
<form action="." method="POST">
|
||||
<input name="action" value="addCoronaUser" type="hidden" />
|
||||
<input placeholder="Name" name="name" type="text" />
|
||||
<input placeholder="Vorname" name="vorname" type="text" />
|
||||
<input placeholder="PLZ" name="corona_PLZ" type ="text" />
|
||||
<input placeholder="Telefon" name="corona_telephon" type="tel" />
|
||||
<input placeholder="eMail" name="corona_eMail" type="text" />
|
||||
<input type="submit" value="Neuen Corona-User eintragen" />
|
||||
</form>
|
||||
|
||||
<h2 id="showAttendences">Anwesenheiten</h2>
|
||||
<h3>Sende Anwesenheitsliste an eMail</h3>
|
||||
<form method="POST" action="." >
|
||||
<input name="toEmail" type="text" placeholder="toEmail" />
|
||||
@@ -86,15 +106,5 @@ $lastTrainingDay = max($dateLastWendsday, $dateLastFriday);
|
||||
echo("</table>");
|
||||
}
|
||||
?>
|
||||
<h2>Trainee hinzufügen</h2>
|
||||
<form action="." method="POST">
|
||||
<input name="action" value="addCoronaUser" type="hidden" />
|
||||
<input placeholder="Name" name="name" type="text" />
|
||||
<input placeholder="Vorname" name="vorname" type="text" />
|
||||
<input placeholder="PLZ" name="corona_PLZ" type ="text" />
|
||||
<input placeholder="Telefon" name="corona_telephon" type="text" />
|
||||
<input placeholder="eMail" name="corona_eMail" type="text" />
|
||||
<input type="submit" value="Neuen Corona-User eintragen" />
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -9,14 +9,31 @@ function processPostData($db, $post, $redirectLocation = "."){
|
||||
updateCoronaData($db, $post['userId'], $post['columnName'], $post['columnValue']);
|
||||
}
|
||||
if($post['action'] == "addCoronaUser"){
|
||||
addCoronaUser(
|
||||
$db,
|
||||
$post['name'],
|
||||
$post['vorname'],
|
||||
$post['corona_PLZ'],
|
||||
$post['corona_telephon'],
|
||||
$post['corona_eMail']
|
||||
);
|
||||
if(
|
||||
array_keys_exist(
|
||||
$post,
|
||||
['name', 'vorname', 'corona_PLZ', 'corona_telephon', 'corona_eMail']
|
||||
)
|
||||
&& isValid($post['corona_PLZ'], "plz")
|
||||
&& isValid($post['corona_telephon'], "phonenumber")
|
||||
&& isValid($post['corona_eMail'], "email")
|
||||
// && isValid($post['name'], "name")
|
||||
// && isValid($post['vorname'], "name")
|
||||
){
|
||||
addCoronaUser(
|
||||
$db,
|
||||
$post['name'],
|
||||
$post['vorname'],
|
||||
$post['corona_PLZ'],
|
||||
$post['corona_telephon'],
|
||||
$post['corona_eMail']
|
||||
);
|
||||
$redirectLocation .= "?addCoronaUserSuccess=true";
|
||||
}
|
||||
else{
|
||||
$redirectLocation .= "?addCoronaUserSuccess=false";
|
||||
}
|
||||
$redirectLocation .= "#addCoronaUser";
|
||||
}
|
||||
if($post['action'] == "sendAttandeesPerEmail"){
|
||||
sendEmail(
|
||||
@@ -78,4 +95,60 @@ function attendancesAssocArray2mdList($attendancesAssocArray, $date=null){
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/// Validaing a phone number
|
||||
/// true if it validates, false if not
|
||||
function validate_phone_number($phone)
|
||||
{
|
||||
// Allow +, - and . in phone number
|
||||
$filtered_phone_number = filter_var($phone, FILTER_SANITIZE_NUMBER_INT);
|
||||
// Remove "-" from number
|
||||
$phone_to_check = str_replace("-", "", $filtered_phone_number);
|
||||
// Check the lenght of number
|
||||
// This can be customized if you want phone number from a specific country
|
||||
if (strlen($phone_to_check) < 10 || strlen($phone_to_check) > 14) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// validate different types of input
|
||||
function isValid($toValidate, $type){
|
||||
// for now we disable the name validation: what do i know how people can be called!
|
||||
// $regexName="/^[A-Z][a-zA-Z]*$/";
|
||||
$regexPlz ="/^[0-9]{5}$/";
|
||||
switch( $type ){
|
||||
case "plz":
|
||||
return preg_match($regexPlz, $toValidate) > 0;
|
||||
case "phonenumber":
|
||||
return validate_phone_number($toValidate);
|
||||
case "email":
|
||||
return filter_var($toValidate, FILTER_VALIDATE_EMAIL);
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//! Checks if multiple keys exist in an array
|
||||
//!
|
||||
//! @param array $array array to check for key
|
||||
//! @param array|string $keys keys to check for
|
||||
//!
|
||||
//! @return bool true, if *all* keys are set in the array
|
||||
function array_keys_exist( array $array, $keys ) {
|
||||
if ( ! is_array( $keys ) ) {
|
||||
$keys = func_get_args();
|
||||
array_shift( $keys );
|
||||
}
|
||||
$count = 0;
|
||||
foreach ( $keys as $key ) {
|
||||
if ( isset( $array[$key] ) || array_key_exists( $key, $array ) ) {
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
|
||||
return count( $keys ) === $count;
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -57,8 +57,8 @@ if( empty($someOptions['dontFetch' ]) ) $someOptions['dontFetch' ] = false;
|
||||
$pdoResult = $pdoStatement->execute();
|
||||
if(!$pdoResult){
|
||||
echo("Error during dbQuery!\n");
|
||||
echo($aDbConnection->errorInfo();
|
||||
echo(PDOStatement::errorInfo();
|
||||
echo($aDbConnection->errorInfo());
|
||||
echo(PDOStatement::errorInfo());
|
||||
}
|
||||
if($someOptions['dontFetch']){
|
||||
$ret = NULL;
|
||||
@@ -83,9 +83,6 @@ if( empty($someOptions['dontFetch' ]) ) $someOptions['dontFetch' ] = false;
|
||||
);
|
||||
}
|
||||
}
|
||||
//var_dump($ret);
|
||||
//var_dump($aQueryString);
|
||||
//var_dump($aBindArray);
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
11
homepage/mams/lib/mams/materializeInit.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<script>
|
||||
options={};
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var elems = document.querySelectorAll('select');
|
||||
var instances = M.FormSelect.init(elems);
|
||||
});
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var sideNavElems = document.querySelectorAll('.sidenav');
|
||||
var sideNavInstances = M.Sidenav.init(sideNavElems, options);
|
||||
});
|
||||
</script>
|
||||
6
homepage/mams/lib/mams/sidenav.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<ul id="slide-out" class="sidenav">
|
||||
<li><a href="#addAttendences" class="sidenav-close">Anwesenheiten hinzufügen</a></li>
|
||||
<li><a href="#addCoronaUser" class="sidenav-close">Trainee hinzufügen</a></li>
|
||||
<li><a href="#showAttendences" class="sidenav-close">Anwesenheiten anzeigen</a></li>
|
||||
</ul>
|
||||
<a href="#" data-target="slide-out" class="sidenav-trigger" style="font-size: 2em;">☰ mams</a>
|
||||
@@ -7,8 +7,8 @@ return (is_numeric($str) && $str > 0 && $str == round($str));
|
||||
function getPdoDbConnection($hostname, $dbName, $user, $password){
|
||||
try{
|
||||
$dbConnection = new PDO(
|
||||
'mysql:host='.$hostname.';dbname='.$dbName,
|
||||
$user,
|
||||
'mysql:host='.$hostname.';dbname='.$dbName,
|
||||
$user,
|
||||
$password
|
||||
);
|
||||
}
|
||||
@@ -23,8 +23,8 @@ global $cwsvJudoConfig;
|
||||
// Datenbankverbindung bereit stellen
|
||||
try{
|
||||
$db_connection = new PDO(
|
||||
'mysql:host='.$cwsvJudoConfig["db"]["host"].';dbname='.$cwsvJudoConfig["db"]["name"],//.';charset=utf8',
|
||||
$cwsvJudoConfig["db"]["user"],
|
||||
'mysql:host='.$cwsvJudoConfig["db"]["host"].';dbname='.$cwsvJudoConfig["db"]["name"],//.';charset=utf8',
|
||||
$cwsvJudoConfig["db"]["user"],
|
||||
$cwsvJudoConfig["db"]["password"]
|
||||
);
|
||||
}
|
||||
@@ -47,7 +47,7 @@ if (is_array($somePossibleEmptyStuff) || $somePossibleEmptyStuff instanceof Trav
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Eine als String gegebene Liste kommagetrennter key=value Paare in
|
||||
/// Eine als String gegebene Liste kommagetrennter key=value Paare in
|
||||
/// ein assoziatives Array überführen
|
||||
function getKeyValueArray($aKeyValueStringList){
|
||||
$retKeyValueArray = array();
|
||||
@@ -87,7 +87,7 @@ if( empty($optionsArray['outCharset']) ) $optionsArray['outCharset'] = "UTF-8";
|
||||
);
|
||||
$pdoStatementForQuerryingZitat->execute();
|
||||
$retZitat = $pdoStatementForQuerryingZitat->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
|
||||
// Zeichensatzkonvertierung
|
||||
foreach($retZitat as &$entry){
|
||||
array_walk(
|
||||
@@ -127,8 +127,8 @@ if( !file_exists($aJsonFileName) ) return null;
|
||||
if( !(is_array( $someLinkNames ) || is_object( $someLinkNames )) ) return null;
|
||||
|
||||
return arrayKeyFilter(
|
||||
json_decode(
|
||||
file_get_contents($aJsonFileName),
|
||||
json_decode(
|
||||
file_get_contents($aJsonFileName),
|
||||
true
|
||||
),
|
||||
$someLinkNames
|
||||
@@ -162,14 +162,14 @@ function toAscii($str, $replace=array(), $delimiter='-') {
|
||||
return $clean;
|
||||
}
|
||||
|
||||
/// Wrapper function for a query to the
|
||||
/// $aDbConnection connection to a db
|
||||
function dbQuery($aDbConnection, $aQueryString, $aBindArray = array(), $someOptions = array( "dbCharset" => "ISO-8859-1", "outCharset" => "UTF-8" ) ){
|
||||
//echo("Doing ".$aQueryString);
|
||||
var_dump($aBindArray);
|
||||
if( empty($someOptions['dbCharset']) ) $someOptions['dbCharset'] = "ISO-8859-1";
|
||||
if( empty($someOptions['outCharset']) ) $someOptions['outCharset'] = "UTF-8";
|
||||
/// @toDo: Bisher wird nur die Rückgabe konvertiert. Eigentlich muss
|
||||
/// doch auch die Eingabe konvertiert werden. Aber das jetzt
|
||||
/// umzustellen wird schwer! Die User m Wettkampfplaner sind ja z.B.
|
||||
/// @toDo: Bisher wird nur die Rückgabe konvertiert. Eigentlich muss
|
||||
/// doch auch die Eingabe konvertiert werden. Aber das jetzt
|
||||
/// umzustellen wird schwer! Die User m Wettkampfplaner sind ja z.B.
|
||||
/// als UTF8 in latin1(?) gespeichert.
|
||||
try{
|
||||
$pdoStatement = $aDbConnection->prepare( $aQueryString );
|
||||
@@ -187,7 +187,7 @@ if( empty($someOptions['outCharset']) ) $someOptions['outCharset'] = "UTF-8";
|
||||
print "Error!: " . $db_error->getMessage() . "<br/>";
|
||||
return null;
|
||||
}
|
||||
//var_dump($ret);
|
||||
|
||||
// Zeichensatzkonvertierung
|
||||
if( is_array($ret) ){
|
||||
foreach($ret as &$entry){
|
||||
|
||||
46
homepage/wkParticipo/achievements.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
// CREATE TABLE `cwsvjudo`.`achievements` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id/primary key' , `name` VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT 'name/caption of the Achivement' , `previousId` INT NOT NULL COMMENT 'id of the previous achievement' , `description` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'full descriptiopn in markdown' , PRIMARY KEY (`id`)) ENGINE = InnoDB CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT = 'eine Liste mit Achievements'; require_once('./local/db.php.inc');
|
||||
setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
|
||||
|
||||
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");
|
||||
|
||||
$dbConnection = getCwsvJudoDbConn();
|
||||
|
||||
try{
|
||||
$results = dbQuery(
|
||||
$dbConnection,
|
||||
//"INSERT INTO `wkParticipo_user<=>userAttributes` (userId, attributeId) VALUES (:userId, :attributeId);",
|
||||
"SELECT * FROM cwsvjudo.achievements;"
|
||||
//array(
|
||||
// ':userId' => array('value'=>$anUserId, 'data_type'=>PDO::PARAM_INT),
|
||||
// ':attributeId'=> array('value'=>$anAttributeId, 'data_type'=>PDO::PARAM_INT)
|
||||
//)
|
||||
);
|
||||
}
|
||||
catch(PDOException $db_error){
|
||||
print "Error!: " . $db_error->getMessage() . "<br/>queryString: ".$queryString."<br />"; var_dump($bindArray);
|
||||
}
|
||||
|
||||
|
||||
// $query = "WITH SortedList (id, previousId, name, Level) AS ( SELECT Id, ParentId, SomeData, 0 as Level FROM cwsvjudo.achievements WHERE `id` IS 1 UNION ALL SELECT ll.id, ll.previousId, ll.name, Level+1 as Level FROM cwsvjudo.achievements ll INNER JOIN SortedList as s ON ll.previousId = s.Id ); SELECT id, previousId, name FROM SortedList ORDER BY Level ";
|
||||
// $query = "SELECT (id, name, rootId, level) FROM cwsvjudo.achievements WHERE `id` = 1 ORDER BY `level`;";
|
||||
// $query = "SELECT * FROM cwsvjudo.achievements;";
|
||||
// $results = $mysqlConn->query($query);
|
||||
|
||||
// var_dump($results);
|
||||
?>
|
||||
|
||||
<html>
|
||||
<body>
|
||||
<?php echo( arrayKeyed2htmlTableString($results, ["id", "name", "rootId", "level", "description"], $withCaption = true) );?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -18,6 +18,31 @@ setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
|
||||
if ($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>
|
||||
<html>
|
||||
@@ -47,6 +72,7 @@ setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
|
||||
|
||||
<nav class="navBar">
|
||||
<ul>
|
||||
<li><a href="/machs">Achievementsystem</a></li>
|
||||
<li><a href="./infoZettel.php">Infozettel</a></li>
|
||||
<li>
|
||||
<a href ="./eventKalender.php">alle geplanten Wettkämpfe als Liste</a>
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
require_once('./local/db.php.inc');
|
||||
require_once('./local/wkParticipoConf.php.inc');
|
||||
require_once('./lib/wkParticipoLib.inc.php');
|
||||
|
||||
$basePath = "/users/cwsvjudo/www";
|
||||
require_once($basePath."/config/phpcount.config.php");
|
||||
require_once($basePath."/ressourcen/phpLib/phpcount/phpcount.php");
|
||||
|
||||
if (isset($_SESSION['login'])) {
|
||||
header('Location: http://' . $_SERVER['HTTP_HOST'] . '/index.php');
|
||||
} else {
|
||||
@@ -36,7 +41,7 @@ if (isset($_SESSION['login'])) {
|
||||
),
|
||||
);
|
||||
$message['success'] = 'Anmeldung erfolgreich, <a href="index.php">weiter zum Inhalt.';
|
||||
// PHPCount::AddHit("wkParticipo-Login ".$_POST['f']['username']);
|
||||
PHPCount::AddHit("wkParticipo-Login ".$_POST['f']['username']);
|
||||
header('Location: http://' . $_SERVER['HTTP_HOST'] . '/pages/desktop/wkParticipo/index.php?user=' . $_POST['f']['username']);
|
||||
} else {
|
||||
sleep(1);
|
||||
|
||||
2
infoZettelOrg/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
uploadTouch/*
|
||||
|
||||
18
infoZettelOrg/2019-02-27-Kyuprüfung2019.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# Kyuprüfung 2019
|
||||
|
||||
Der Termin für die diesjährige Gürtelprüfung steht:
|
||||
|
||||
- Freitag, d. 29.03.2019
|
||||
- 16:00 Uhr Beginn der Prüfungen
|
||||
- Wer sich in Ruhe erwärmen möchte, sollte also früh genug kommen.
|
||||
- mitbringen:
|
||||
- Pass mit Kyumarke (sofern nicht schon mir)
|
||||
- 1 € für den Prüfer
|
||||
|
||||
Falls jemand noch eine Extratrainingseinheit haben möchte, kann sich -
|
||||
am besten gleich zusammen mit seinem Uke - mit mir kurzschließen.
|
||||
|
||||
- Datum: Mit mir und Uke abzustimmen!
|
||||
- Uhrzeit: Mit mir und Uke abzustimmen!
|
||||
- Ort: unser Dojo Str. Usti nad Labem 42
|
||||
- Nicht die Abstimmung mit dem Prüfungsuke vergessen!
|
||||
37
infoZettelOrg/2019-08-24_OGL-2019-3.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# The Little-Otto-Goshi-Liga 2019-3
|
||||
|
||||
## Wettkampfdaten
|
||||
|
||||
- Altersklassen: U9/U12
|
||||
- Datum: 24.08.2019
|
||||
- Ort: Sporthalle (hintere) BBS III, 06120 Halle, Grasnelkenweg 16
|
||||
- Wiegen: 9:30--10:15 Uhr
|
||||
- Wettkampfbeginn: ca. 10:30 Uhr
|
||||
|
||||
|
||||
## Treffpunkt
|
||||
|
||||
- Ort: P+R Parkplatz Südring/Stollberger Straße
|
||||
- Abfahrt: 7:30 Uhr
|
||||
- *Kindersitz nicht vergessen!*
|
||||
|
||||
|
||||
## Nicht vergessen
|
||||
|
||||
- Judopass
|
||||
- Judogi (d. h. Jacke, Hose und Gürtel)
|
||||
- *Hallenschuhe*
|
||||
- Essen/Trinken
|
||||
- Warme Socken und Pullover
|
||||
|
||||
Das Betreten der Sportstätten in Straßenschuhen ist (auch den Fans)
|
||||
nicht gestattet. Bitte Ersatzschuhe (Badelatschen/Hallenschuhe)
|
||||
mitbringen. Sonst muss in Socken gegangen werden!
|
||||
|
||||
|
||||
## Mitfahrgelegenheiten
|
||||
|
||||
Es werden für die nächsten Wettkämpfe noch Mitfahrgelegenheiten
|
||||
gesucht. Bitte mal überprüfen, ob/wer/wann jemand mitfahren kann.
|
||||
|
||||
MsG marko
|
||||
32
infoZettelOrg/2019-11-16-BemU11.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Bezirkseinzelmeisterschaften U11
|
||||
|
||||
## Wettkampfdaten
|
||||
|
||||
- Altersklassen: U11
|
||||
- Datum: 16.11.2019
|
||||
- Ort: Dojo des CPSC BUDO e.V., Sportforum 09125 Chemnitz, Einfahrt
|
||||
Südring
|
||||
- Wiegen: 8:30--9:15 Uhr
|
||||
- Wettkampfbeginn: ca. 10:30 Uhr
|
||||
|
||||
|
||||
## Treffpunkt
|
||||
|
||||
- Ort: direkt am Wettkampfort (Selbstranreise)
|
||||
- Zeit: 8:15 Uhr
|
||||
|
||||
|
||||
## Nicht vergessen
|
||||
|
||||
- Judopass
|
||||
- Judogi (d. h. Jacke, Hose und Gürtel)
|
||||
- *Hallenschuhe*
|
||||
- Essen/Trinken
|
||||
- Warme Socken und Pullover
|
||||
|
||||
Das Betreten der Sportstätten in Straßenschuhen ist (auch den Fans)
|
||||
nicht gestattet. Bitte Ersatzschuhe (Badelatschen/Hallenschuhe)
|
||||
mitbringen. Sonst muss in Socken gegangen werden!
|
||||
|
||||
|
||||
MsG marko
|
||||
37
infoZettelOrg/2020-10-17-Wanderung.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# Wanderung
|
||||
|
||||
## Daten
|
||||
|
||||
- Datum:17.10.2020
|
||||
- Abfahrt: 8:48 Uhr Haltestelle Dr. Salvador Allende Str. mit der 43
|
||||
Richtung Tierpark
|
||||
- Rückkehr: geplant ist wieder 15:00 Uhr zurück an der Haltestelle Dr.
|
||||
Salvador Allende Str. zu sein
|
||||
- Da diese Veranstaltung eine Prämiere für mich ist, weiß ich noch
|
||||
nicht, ob diese Zeit eingehalten werden kann. Falls nicht, würde
|
||||
ich Bescheid geben, deshalb bitte eine Telefonnummer mit angeben.
|
||||
- meine Telefonnummer für Rückfragen: 01590 163 1103
|
||||
|
||||
|
||||
## Infos für den Übungsleiter
|
||||
|
||||
Name des Kindes:
|
||||
|
||||
Kind darf mitwandern: ja/nein
|
||||
|
||||
Telefonnummer am Wandertag:
|
||||
|
||||
Unterschrift :
|
||||
|
||||
\pagebreak
|
||||
|
||||
## Benötigt werden
|
||||
|
||||
- wetterfeste Kleidung
|
||||
- bequeme Wanderschuhe
|
||||
- Verpflegung
|
||||
- Wanderlaune
|
||||
|
||||
|
||||
|
||||
MsG marko
|
||||
32
infoZettelOrg/2021-09-29-LemU13U15.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Offene Landeseinzelmeisterschaften U13/U15 2021
|
||||
|
||||
## Wettkampfdaten
|
||||
|
||||
- Altersklassen: U13, U15
|
||||
- Datum:
|
||||
- U13: 02.10.2021
|
||||
- U15: 03.10.2021
|
||||
- Ort: Sport- und Freizeitzentrum Demitz-Thumitz, Kiefernbuschweg 4, 01877 Demitz-Thumitz
|
||||
- Erwärmung möglich ab: 9:00 Uhr
|
||||
- Wettkampferöffnung: ca. 9:30 Uhr
|
||||
|
||||
|
||||
## Treffpunkt
|
||||
|
||||
- Ort: P+R Parkplatz Südring/Stollberger Straße
|
||||
- Abfahrt: 7:15 Nach Vereinbarung!Uhr
|
||||
- Kindersitz (falls nötig) nicht vergessen!
|
||||
|
||||
## Nicht vergessen
|
||||
|
||||
- Judopass
|
||||
- Judogi (d. h. Jacke, Hose und Gürtel)
|
||||
- *Hallenschuhe* (Auch die Fans!)
|
||||
- Essen/Trinken
|
||||
- Warme Socken und Pullover
|
||||
|
||||
Das Betreten der Sportstätten in Straßenschuhen ist (auch den Fans)
|
||||
nicht gestattet. Bitte Ersatzschuhe (Badelatschen/Hallenschuhe)
|
||||
mitbringen. Sonst muss in Socken gegangen werden!
|
||||
|
||||
MsG marko
|
||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 996 KiB After Width: | Height: | Size: 996 KiB |
|
Before Width: | Height: | Size: 4.1 MiB After Width: | Height: | Size: 4.1 MiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |