syncronize materialize imports
This commit is contained in:
242
homepage/participo/attendence.php
Normal file
242
homepage/participo/attendence.php
Normal file
@@ -0,0 +1,242 @@
|
||||
<?php
|
||||
setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
|
||||
require_once("config/participo.php");
|
||||
|
||||
require_once("./local/dbConf.php");
|
||||
require_once("./local/cwsvJudo.php");
|
||||
|
||||
require_once("./lib/db.php");
|
||||
require_once("./lib/api.php");
|
||||
require_once("./lib/participoLib/participo.php");
|
||||
|
||||
require_once("./auth.php");
|
||||
|
||||
require_once($config['basePath']."/config/cwsvJudo.config.php");
|
||||
require_once($config['basePath']."/config/phpcount.config.php");
|
||||
|
||||
$dbConnection = getPdoDbConnection(
|
||||
$cwsvJudoConfig["db"]["host"],
|
||||
$cwsvJudoConfig["db"]["name"],
|
||||
$cwsvJudoConfig["db"]["user"],
|
||||
$cwsvJudoConfig["db"]["password"]
|
||||
);
|
||||
$userData = getUserData($dbConnection, $_SESSION['user']['userId']);
|
||||
|
||||
function getCommingWkEvents($dbConn, $someOptions=array() ){
|
||||
// wir befinden uns in der Übergangsphase:
|
||||
// - als Standard wird das derzeitige Verhalten definiert (ISO-8859-1
|
||||
// und die Konvertierung erfolgt ausserhalb)
|
||||
// - wenn einmal alle mbConvertEncoding weg sind, kann der Standard auf
|
||||
// das gewünschte Verhalten umgestellt werden
|
||||
$dbCharset = $someOptions['dbCharset'] ?? "ISO-8859-1";
|
||||
// dbCharset = $someOptions['outCharset'] ?? "UTF-8";// das spätere, gewünschte Verhalten
|
||||
$outCharset = $someOptions['outCharset'] ?? "ISO-8859-1";
|
||||
|
||||
$query =
|
||||
"SELECT ".
|
||||
"wkParticipo_Events.id, ".
|
||||
"wkParticipo_Events.date, ".
|
||||
"wkParticipo_Events.wkId, ".
|
||||
"wkParticipo_Events.meldefrist, ".
|
||||
"wkParticipo_Events.bemerkungen, ".
|
||||
"wkParticipo_Events.kvOptions, ".
|
||||
"wettkampfkalender.Datum, ".
|
||||
"wettkampfkalender.Veranstaltung, ".
|
||||
"wettkampfkalender.Altersklassen, ".
|
||||
"wettkampfkalender.Ort, ".
|
||||
"wettkampfkalender.Ausschreibung, ".
|
||||
"wettkampfkalender.Routenplaner ".
|
||||
"FROM wkParticipo_Events ".
|
||||
"LEFT JOIN wettkampfkalender ".
|
||||
"ON wettkampfkalender.lfdeNr = wkParticipo_Events.wkId ".
|
||||
"WHERE wkParticipo_Events.date >= CURDATE() ".
|
||||
"ORDER BY wkParticipo_Events.date;";
|
||||
$ret = dbQuery($dbConn, $query);
|
||||
// $results = $anMysqlConn->query($query);
|
||||
|
||||
// // Bei einem Fehler bei der Abfrage soll NULL zurückgeliefert werden
|
||||
// if( !$results ){
|
||||
// echo("No Results: ".$anMysqlConn->error);
|
||||
// return NULL;
|
||||
// }
|
||||
// // Bei einem leeren Ergebnis (NULL oder leeres Array) soll ein leeres Array zurückgeliefert werden
|
||||
// if( empty($results) ) return array();
|
||||
|
||||
// while( $result = $results->fetch_assoc() ){
|
||||
// array_walk(
|
||||
// $result,
|
||||
// function (&$value, $key, $someOptions) {
|
||||
// $value = iconv($someOptions['dbCharset'], $someOptions['outCharset'], $value);
|
||||
// },
|
||||
// $someOptions
|
||||
// );
|
||||
// array_push( $ret, $result);
|
||||
// }
|
||||
return $ret;
|
||||
}
|
||||
|
||||
// array(12) {
|
||||
// ["id"]=> string(3) "139"
|
||||
// ["date"]=> string(10) "2021-12-29"
|
||||
// ["wkId"]=> string(0) ""
|
||||
// ["meldefrist"]=> string(10) "2021-12-28"
|
||||
// ["bemerkungen"]=> string(374) "{ "Datum": "2021-12-29", "Veranstaltung": "Jahresabschlusstraining", "Altersklassen": "alle", "bemerkungen": "
|
||||
|
||||
// Zum Abschluss des Jahres noch einmal eine kleine Einheit hauptsächlich zum Spielen
|
||||
// Zeit: 16:00--19:00 Uhr
|
||||
|
||||
// ", "Ort": "unser Dojo, Str. Usti nad Labem 42, 09120 Chemnitz", "Routenplaner": "https://osm.org/go/0MIYhLf3Q-" }"
|
||||
// ["kvOptions"]=> string(0) ""
|
||||
// ["Datum"]=> string(0) ""
|
||||
// ["Veranstaltung"]=> string(0) ""
|
||||
// ["Altersklassen"]=> string(0) ""
|
||||
// ["Ort"]=> string(0) ""
|
||||
// ["Ausschreibung"]=> string(0) ""
|
||||
// ["Routenplaner"]=> string(0) ""
|
||||
// }
|
||||
function getHtmlEventTable($eventList){
|
||||
$ret = "</a><table>";
|
||||
foreach($eventList as $event){
|
||||
$e = json_decode($event['bemerkungen'], true);
|
||||
$e = (($e==null)?$event:$e);
|
||||
$e['id']=$event['id'];
|
||||
$ret .= "<tr><td>".$e['Datum']."</td><td><a href=\"/pages/desktop/wkParticipo/showWkEvent.php?eventId=".$e['id']."\" >".$e['Veranstaltung']."</a></td></tr>";
|
||||
}
|
||||
$ret .= "</table><a>";
|
||||
return $ret;
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<?php readfile("./shared/imports.php");?>
|
||||
|
||||
<!-- inits for the materializeCss -->
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var elems = document.querySelectorAll('.sidenav');
|
||||
var instances = M.Sidenav.init(elems, {
|
||||
// specify options here
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<title>participo</title>
|
||||
<meta name="description" content="Online-Apps der Judoka des Chemnitzer WSV">
|
||||
|
||||
<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>
|
||||
|
||||
<header>
|
||||
<nav class="indigo darken-4">cwsvJudo Apps<a class="right top-nav sidenav-trigger waves-effect waves-light hide-on-large-only" href="#" data-target="nav-mobile">
|
||||
<i class="material-icons">menu</i>
|
||||
</a></nav>
|
||||
<ul class="sidenav sidenav-fixed sidenav-close" id="nav-mobile">
|
||||
<li class="logo">
|
||||
<a style="height:auto;" class="brand-logo" id="logo-container" href="/participo/">
|
||||
<img alt="cwsvJudoApps" style="max-width:100%;height:12vh;" class="responsive-img" src="http://cwsvjudo.bplaced.net/ressourcen/graphiken/logos/cwsvJudoLogoWappen.x256.png" />
|
||||
</a>
|
||||
</li>
|
||||
<?php require_once("sidenav/loginStatus.php");?><!-- brings its own li -->
|
||||
<li class="bold">
|
||||
<a class="waves-effect waves-teal right-align" href="#AppList">Apps</a>
|
||||
</li>
|
||||
<li class="bold">
|
||||
<a class="waves-effect waves-teal right-align" href="#Configs">UserInfos</a>
|
||||
</li>
|
||||
<?php if( isUserAdmin($dbConnection, $userData['id']) ){?>
|
||||
<li class="bold">
|
||||
<a class="waves-effect waves-teal right-align" href="#Admin">adminStuff</a>
|
||||
</li>
|
||||
<?php }?>
|
||||
</ul>
|
||||
</header>
|
||||
|
||||
<?php
|
||||
if($_SESSION['login']){
|
||||
?>
|
||||
<main>
|
||||
<!-- List of Mitmach-Apps -->
|
||||
<div class="row" id="AppList">
|
||||
<?php
|
||||
//var_dump(getCommingWkEvents($dbConnection));
|
||||
echo(
|
||||
AppCard::fromArray([
|
||||
'link' => "kyu",
|
||||
'title' => "Kyu",
|
||||
'description'=> "Die Prüfungsprogamme der einzelnen Gürtelstufen in Bild, Ton und Text",
|
||||
'imgUrl' => "images/obi.svg",
|
||||
'actions' => [
|
||||
AppCardAction::fromArray(['caption'=>"Kyu-Programme", 'link'=>"kyu"]),
|
||||
],
|
||||
])->htmlCode().
|
||||
AppCard::fromArray([
|
||||
'link' => "/machs",
|
||||
'title' => "<em>M</em>ein <em>Ach</em>ievement <em>S</em>ystem",
|
||||
'description'=> "Ein kleines Achievementsystem für die tägliche Herausforderung",
|
||||
'imgUrl' => "images/mountain-climber.svg",
|
||||
'actions' => [
|
||||
AppCardAction::fromArray(['caption'=>"MAchS", 'link'=>"/machs"]),
|
||||
],
|
||||
])->htmlCode().
|
||||
AppCard::fromArray([
|
||||
'link' => "/pages/desktop/wkParticipo",
|
||||
'title' => "Event-Planer",
|
||||
'description'=> "Organisieren der Teilnahmen (und nicht-Teilnahmen) an Wettkämpfen, Sondertrainingseinheiten, Feiern etc.</p>".getHtmlEventTable(getCommingWkEvents($dbConnection))."<p>",
|
||||
'imgUrl' => "/ressourcen/graphiken/icons/terminKalender.svg",
|
||||
'actions' => [
|
||||
AppCardAction::fromArray(['caption'=>"Planer", 'link'=>"/pages/desktop/wkParticipo"]),
|
||||
],
|
||||
])->htmlCode().
|
||||
AppCard::fromArray([
|
||||
'link' => "infoZettel",
|
||||
'title' => "Infozettel",
|
||||
'description'=> "Online-Variante der Infozettel und Newsletter",
|
||||
'imgUrl' => "images/info.svg",
|
||||
'actions' => [
|
||||
AppCardAction::fromArray(['caption'=>"Info", 'link'=>"infoZettel"]),
|
||||
],
|
||||
])->htmlCode()
|
||||
);
|
||||
?>
|
||||
</div><!-- End of MitmachApps -->
|
||||
|
||||
<div class="divider"></div>
|
||||
|
||||
<!-- List of ConfigStuff -->
|
||||
<div class="row" id="Configs">
|
||||
<?php
|
||||
echo(
|
||||
AppCard::fromArray([
|
||||
'link' => "user",
|
||||
'title' => "User-Config",
|
||||
'description' => "Einstellungen zum aktuellen Benutzer dessen Kindern",
|
||||
'imgUrl' => "images/account.svg",
|
||||
'actions' => [
|
||||
AppCardAction::fromArray(['caption'=>"Config", 'link'=>"user"]),
|
||||
],
|
||||
])->htmlCode()
|
||||
);
|
||||
// AdminStuff, thats only visible for Admins
|
||||
if( isUserAdmin($dbConnection, $userData['id']) ){
|
||||
echo(
|
||||
AppCard::fromArray([
|
||||
'title' =>"lastLogins",
|
||||
'description' => "</p>".lastLoginTable()."</p>"
|
||||
])->htmlCode()
|
||||
);
|
||||
}
|
||||
?>
|
||||
</div><!-- End of ConfigStuff -->
|
||||
</main>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -112,16 +112,7 @@ function getHtmlEventTable($eventList){
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<!-- MaterializeCss Ressources -->
|
||||
<!-- - 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>
|
||||
<!-- - Import Google Icon Font-->
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
||||
|
||||
<!-- participo specific style adjustments -->
|
||||
<link rel="stylesheet" href="css/participo.css">
|
||||
<?php readfile("./shared/imports.php");?>
|
||||
|
||||
<!-- inits for the materializeCss -->
|
||||
<script>
|
||||
|
||||
@@ -22,16 +22,7 @@ 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" />
|
||||
|
||||
<!-- MaterializeCss Ressources -->
|
||||
<!-- - 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>
|
||||
<!-- - Import Google Icon Font-->
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
||||
|
||||
<!-- participo specific style adjustments -->
|
||||
<link rel="stylesheet" href="css/participo.css">
|
||||
<?php readfile("./shared/imports.php");?>
|
||||
<!-- adjustments to parsedowncards (smaller headings) -->
|
||||
<link rel="stylesheet" href="css/parsedownCard.css">
|
||||
|
||||
|
||||
@@ -138,12 +138,8 @@ function ytLightEmbed($item){
|
||||
<meta charset="UTF-8">
|
||||
<title>Gürtelprüfungsordnung</title>
|
||||
|
||||
<!-- 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>
|
||||
<!--Import Google Icon Font-->
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
<?php readfile("./shared/imports.php");?>
|
||||
|
||||
<!-- unpkg : use the latest version of Video.js -->
|
||||
<link href="https://unpkg.com/video.js/dist/video-js.min.css" rel="stylesheet">
|
||||
<script src="https://unpkg.com/video.js/dist/video.min.js"></script>
|
||||
|
||||
64
homepage/participo/lib/planerLib/planer.php
Normal file
64
homepage/participo/lib/planerLib/planer.php
Normal file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
class eventPlaner{
|
||||
static private $db = null;
|
||||
function setDbConnection($db){
|
||||
$this->$db = $db;
|
||||
}
|
||||
}
|
||||
|
||||
class shiai{
|
||||
private $id = null; //< unique id
|
||||
private $date = null; //< date of the shiai
|
||||
private $name = null; //< name of the shiai as string
|
||||
private $ageclasses = null; //< age classes as space separated Uxy in a string
|
||||
private $place = null; //< place of the shiai as string
|
||||
private $announcementUrl = null; //< url to the announcement
|
||||
private $routeUrl = null; //< url to a routing planner
|
||||
private $galleryUrl = null; //< url of the gallery to a gallery of the shiai
|
||||
private $promoImgUrl = null; //< promotional image for the shiai (as url)
|
||||
|
||||
function __construct($id, $date, $name, $ageclasses, $place, $announcementUrl, $routeUrl, $galleryUrl, $promoImgUrl){
|
||||
//! @todo input validation and sanitation
|
||||
$this->$id = (int) $id;
|
||||
$this->$date = DateTime::createFromFormat("Y-m-d", $date);
|
||||
$this->$name = $name;
|
||||
$this->ageclasses = $ageclasses;
|
||||
$this->place = $place;
|
||||
$this->announcementUrl = $announcementUrl;
|
||||
$this->routeUrl = $routeUrl;
|
||||
$this->galleryUrl = $galleryUrl;
|
||||
$this->promoImgUrl = $promoImgUrl;
|
||||
}
|
||||
static public function fromArray($member){
|
||||
$id = $member['lfdeNr'] ?? null;
|
||||
$date = $member['Datum'] ?? null;
|
||||
$name = $member['Veranstaltung'] ?? "<fehlender Name>";
|
||||
$ageclasses = $member['Altersklassen'] ?? null;
|
||||
$place = $member['Ort'] ?? "<fehlender Ort>";
|
||||
$announcementUrl = $member['Ausschreibung'] ?? null;
|
||||
$routeUrl = $member['Routenplaner'] ?? null;
|
||||
$galleryUrl = $member['galleryLink'] ?? null;
|
||||
$promoImgUrl = $member['promoPic'] ?? null;
|
||||
}
|
||||
}
|
||||
class event{
|
||||
private $id = null; //< unique id of the event in the db
|
||||
private $date = null; //< date for the event (@todo ranges?)
|
||||
private $shiaiId = null; //< unique id of the shiai in the db (if appropriate)
|
||||
private $deadline = null; //< until when one can register for the event
|
||||
private $remarks = null; //< remarks to the event (special rules) or a json object for missing data (e.g. non-shiai events)
|
||||
|
||||
private $shiai = null;
|
||||
|
||||
function __construct($id, $date, $shiaiId, $deadline, $remarks){
|
||||
//! @todo InputValidation
|
||||
$this->$id = (int) $id;
|
||||
$this->$date = DateTime::createFromFormat("Y-m-d", $date);
|
||||
$this->shiaiId = (($shiaiId!=null)?((int)$shiaiId):(null));
|
||||
$this->deadline = DateTime::createFromFormat("Y-m-d");
|
||||
$this->remarks = $remarks;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -102,7 +102,7 @@ else{
|
||||
<!-- Materialize: Compiled and minified JavaScript -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
|
||||
|
||||
<title>Login des Achievementsystemes der Judoka des Chemnitzer WSV</title>
|
||||
<title>cwsvJudo Online Apps</title>
|
||||
<meta name="description" content="Loginseite der Online-Apps der Judoka des CWSV">
|
||||
</head>
|
||||
<body class="container">
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
<!-- Compiled and minified CSS -->
|
||||
<!-- MaterializeCss -->
|
||||
<!-- - 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>
|
||||
<!--Import Google Icon Font-->
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
||||
|
||||
<!-- participo specific style adjustments -->
|
||||
<link rel="stylesheet" href="css/participo.css">
|
||||
|
||||
@@ -32,9 +32,7 @@ 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" />
|
||||
|
||||
<?php
|
||||
readfile("./shared/imports.php");
|
||||
?>
|
||||
<?php readfile("./shared/imports.php");?>
|
||||
<!-- inits for the materializeCss -->
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
Reference in New Issue
Block a user