diff --git a/homepage/participo/css/participo.css b/homepage/participo/css/participo.css
index af93700..3b81feb 100644
--- a/homepage/participo/css/participo.css
+++ b/homepage/participo/css/participo.css
@@ -1,16 +1,49 @@
/*
on large screens add a padding on the left for the fixed sidnav
*/
-header, main, footer {
+header,
+main,
+footer {
padding-left: 300px;
- }
+}
+
@media only screen and (max-width : 992px) {
- header, main, footer {
+
+ header,
+ main,
+ footer {
padding-left: 0;
}
}
-.card video{
+.card video {
width: 100%;
max-width: 100%;
}
+
+/*
+overrides for the header font sizes
+*/
+h1 {
+ font-size: 2.00rem;
+}
+
+h2 {
+ font-size: 1.50rem;
+}
+
+h3 {
+ font-size: 1.25rem;
+}
+
+h3 {
+ font-size: 1.20rem;
+}
+
+h3 {
+ font-size: 1.15rem;
+}
+
+h6 {
+ font-size: 1.10rem;
+}
diff --git a/homepage/participo/events.inc.php b/homepage/participo/events.inc.php
new file mode 100644
index 0000000..c4c1378
--- /dev/null
+++ b/homepage/participo/events.inc.php
@@ -0,0 +1,25 @@
+
\ No newline at end of file
diff --git a/homepage/participo/events.php b/homepage/participo/events.php
new file mode 100644
index 0000000..2978706
--- /dev/null
+++ b/homepage/participo/events.php
@@ -0,0 +1,49 @@
+ "Event Planer",
+ 'description' => "Planung von (Nich-)Teilnahmen an Wettkämpfen und anderen Veranstaltungen"
+);
+
+include_once("events.inc.php");
+
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ])>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/homepage/participo/lib/planerLib/planer.php b/homepage/participo/lib/planerLib/planer.php
index 2e5422f..7b6c91b 100644
--- a/homepage/participo/lib/planerLib/planer.php
+++ b/homepage/participo/lib/planerLib/planer.php
@@ -1,11 +1,5 @@
$db = $db;
- }
-}
class shiai{
private $id = null; //< unique id
@@ -20,9 +14,9 @@ class shiai{
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->id = (int) $id;
+ $this->date = DateTime::createFromFormat("Y-m-d", $date);
+ $this->name = $name;
$this->ageclasses = $ageclasses;
$this->place = $place;
$this->announcementUrl = $announcementUrl;
@@ -30,18 +24,29 @@ class shiai{
$this->galleryUrl = $galleryUrl;
$this->promoImgUrl = $promoImgUrl;
}
- static public function fromArray($member){
- $id = $member['lfdeNr'] ?? null;
- $date = $member['Datum'] ?? null;
- $name = $member['Veranstaltung'] ?? "";
- $ageclasses = $member['Altersklassen'] ?? null;
- $place = $member['Ort'] ?? "";
- $announcementUrl = $member['Ausschreibung'] ?? null;
- $routeUrl = $member['Routenplaner'] ?? null;
- $galleryUrl = $member['galleryLink'] ?? null;
- $promoImgUrl = $member['promoPic'] ?? null;
+
+ public function getName(){
+ return $this->name;
}
-}
+ public function getId(){
+ return $this->id;
+ }
+
+ static public function fromArray($member){
+ return new shiai(
+ $member['lfdeNr'] ?? null,
+ $member['Datum'] ?? null,
+ $member['Veranstaltung'] ?? "",
+ $member['Altersklassen'] ?? null,
+ $member['Ort'] ?? "",
+ $member['Ausschreibung'] ?? null,
+ $member['Routenplaner'] ?? null,
+ $member['galleryLink'] ?? null,
+ $member['promoPic'] ?? null
+ );
+ }
+} // end class shiai
+
class event{
private $id = null; //< unique id of the event in the db
private $date = null; //< date for the event (@todo ranges?)
@@ -51,14 +56,94 @@ class event{
private $shiai = null;
- function __construct($id, $date, $shiaiId, $deadline, $remarks){
+ function __construct($id, $date, $shiaiId, $deadline, $remarks, $shiai){
//! @todo InputValidation
- $this->$id = (int) $id;
- $this->$date = DateTime::createFromFormat("Y-m-d", $date);
+ $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->deadline = DateTime::createFromFormat("Y-m-d", $deadline);
$this->remarks = $remarks;
+
+ $this->shiai = $shiai;
+ }
+
+ public function htmlTableRow(){
+ return
+ "".
+ "| ".$this->date->format("Y-m-d")." | ".
+ "id."\" >".$this->shiai->getName()." | ".
+ "
";
+ }
+
+ static public function fromArray($member){
+ $shiai = json_decode($member['bemerkungen'], true);
+
+ return new event(
+ $member['id'] ?? null,
+ $member['date'] ?? null,
+ $member['wkId'] ?? null,
+ $member['meldefrist'] ?? null,
+ $member['bemerkungen'] ?? null,
+ shiai::fromArray( ($shiai != null) ? $shiai : $member )
+ );
+ }
+} // end class event
+
+class eventPlaner{
+ static private $db = null;
+ // set the dbConnection (just setting, no establishing)
+ public static function setDbConnection($dbConnection){
+ if($dbConnection instanceof PDO)
+ self::$db = $dbConnection;
+ else
+ self::$db = null;
+ return;
+ }
+
+ static public function getCommingWkEvents($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(self::$db, $query);
+ $events = array();
+ foreach($ret as $event){
+ array_push( $events, event::fromArray( $event ) );
+ }
+ return $events;
+ }
+
+ static public function getHtmlEventTable($eventList){
+ $ret = "";
+ foreach($eventList as $event){
+ $ret .= $event->htmlTableRow();
+ }
+ $ret .= "
";
+ return $ret;
}
}
-
?>
\ No newline at end of file
diff --git a/homepage/participo/shared/sidenav.inc.php b/homepage/participo/shared/sidenav.inc.php
new file mode 100644
index 0000000..453ab71
--- /dev/null
+++ b/homepage/participo/shared/sidenav.inc.php
@@ -0,0 +1,39 @@
+
+