Ereignisse brauchen nicht mehr zwingend einen Wettkampf im

Wettkampfkalender

- Die Ereignisse wurden um ihr Datum erweitert
- Daten, die sonst aus dem Wettkampfeintrag des zugehörigen Wettkampfes
gezogen worden wären, müssen jetzt als json in die Bemerkunksspalte
geschrieben werden
- Events ohne zugehörigen Wettkampf im Wettkampfkalender müssen
momentan noch per Hand eingefügt werden. Es gibt keine Oberfläche
dafür.

Changes to be committed:
	modified:   addFahrt.php
	modified:   addStarter.php
	modified:   addStarterDev.php
	modified:   admin/adminAddStarter.php
	modified:   admin/newsLetter.php
	modified:   admin/showEvent.php
	modified:   admin/showFahrt.php
	modified:   auth.php
	modified:   authLogin.php
	modified:   index.php
	modified:   lib/wkParticipoLib.inc.php
	modified:   showWkEvent.php
This commit is contained in:
marko
2018-11-29 15:52:09 +01:00
parent c3a324fa4e
commit 21922347d3
12 changed files with 181 additions and 85 deletions

View File

@@ -1,9 +1,17 @@
<?php
setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
require_once('./local/wkParticipoConf.php.inc');
// require_once('./auth.php');
require_once('./authLogin.php');
require_once('./local/db.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");
$message = array();
$eventData = array();
@@ -21,8 +29,26 @@
$message['error'] .= 'Datenbankverbindung fehlgeschlagen: ' . $mysqli->connect_error;
}
else{
$eventData = getEventData($mysqli, $_GET['eventId']);
$eventData = getWkEventData($mysqli, $_GET['eventId']);
if( empty($eventData) ) $message['error'] .= 'Fehler: keine Eventdaten zurückgeliefert!';
else{
if(!empty($eventData['bemerkungen'])){
$tmpJson = json_decode( $eventData['bemerkungen'], true);
if($tmpJson){
$eventData['Datum'] = $tmpJson['Datum'];
$eventData['Veranstaltung'] = $tmpJson['Veranstaltung'];
$eventData['Altersklassen'] = $tmpJson['Altersklassen'];
$eventData['Routenplaner'] = $tmpJson['Routenplaner'];
$eventData['Ausschreibung'] = $tmpJson['Ausschreibung'];
$eventData['bemerkungen'] = $tmpJson['bemerkungen'];
}
}
PHPCount::AddHit(
"Wettkampfplaner ".
($_SESSION['user']['username']?("(".htmlspecialchars($_SESSION['user']['username']).") "):"").
"- ".$eventData['Veranstaltung']
);
}
}
}
else $message['error'] .= "Fehler: eventId ist kein Int (".$_GET['eventId'].")";
@@ -34,7 +60,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Wettkampfplanung - Wettkampfdetails<?php echo (empty($eventData) ? "" : " ".mb_convert_encoding($eventData['Veranstaltung'], 'UTF-8', 'ISO-8859-1'));?></title>
<title>Wettkampfplanung - Wettkampfdetails<?php echo( empty($eventData) ? "" : " ".$eventData['Veranstaltung'] );?></title>
<link rel="stylesheet" href="./style.css">
</head>
<body>
@@ -55,15 +81,15 @@
}
else{
?>
<h1><?php echo (empty($eventData) ? "" : " ".mb_convert_encoding($eventData['Veranstaltung'], 'UTF-8', 'ISO-8859-1'));?></h1>
<h1><?php echo (empty($eventData) ? "" : " ".$eventData['Veranstaltung']);?></h1>
<h2>Wettkampfdaten</h2>
<ul>
<li>Wettkampfname: <?php echo mb_convert_encoding($eventData['Veranstaltung'], 'UTF-8', 'ISO-8859-1');?></li>
<li>Datum: <time datetime="<?php echo mb_convert_encoding($eventData['Datum'], 'UTF-8', 'ISO-8859-1');?>"><?php echo mb_convert_encoding($eventData['Datum'], 'UTF-8', 'ISO-8859-1');?></time></li>
<li>Frist zum Einschreiben: <time datetime="<?php echo mb_convert_encoding($eventData['meldefrist'], 'UTF-8', 'ISO-8859-1');?>"><?php echo mb_convert_encoding($eventData['meldefrist'], 'UTF-8', 'ISO-8859-1');?></time> <a class="touchLink" href ="<?php echo(addToGcalUrl(mb_convert_encoding($eventData['Veranstaltung'], 'UTF-8', 'ISO-8859-1'), mb_convert_encoding($eventData['meldefrist'], 'UTF-8', 'ISO-8859-1') ));?>">Einschreibefrist in den Google Calendar übernehmen</a></li>
<li>Altersklassen: <?php echo mb_convert_encoding($eventData['Altersklassen'], 'UTF-8', 'ISO-8859-1');?></li>
<li>Ort: <a class="touchLink" href="<?php echo $eventData['Routenplaner'];?>"><?php echo mb_convert_encoding($eventData['Ort'], 'UTF-8', 'ISO-8859-1');?></a></li>
<li>Wettkampfname: <?php echo $eventData['Veranstaltung'];?></li>
<li>Datum: <time datetime="<?php echo $eventData['Datum'];?>"><?php echo $eventData['Datum'];?></time></li>
<li>Frist zum Einschreiben: <time datetime="<?php echo $eventData['meldefrist'];?>"><?php echo $eventData['meldefrist'];?></time> <a class="touchLink" href ="<?php echo(addToGcalUrl($eventData['Veranstaltung'], $eventData['meldefrist']));?>">Einschreibefrist in den Google Calendar übernehmen</a></li>
<li>Altersklassen: <?php echo $eventData['Altersklassen'];?></li>
<li>Ort: <a class="touchLink" href="<?php echo $eventData['Routenplaner'];?>"><?php echo $eventData['Ort'];?></a></li>
<li>Bemerkungen: <?php echo $eventData['bemerkungen'];?></li>
</ul>
@@ -85,7 +111,7 @@
</a>
</li>
<li>
<a href ="<?php echo(addToGcalUrl(mb_convert_encoding($eventData['Veranstaltung'], 'UTF-8', 'ISO-8859-1'), mb_convert_encoding($eventData['Datum'], 'UTF-8', 'ISO-8859-1') ));?>">
<a href ="<?php echo(addToGcalUrl($eventData['Veranstaltung'], $eventData['Datum'] ));?>">
<div>Termin in den Google Calendar übernehmen</div>
</a>
</li>
@@ -179,7 +205,7 @@
echo "<button class=\"touchButton\" type=\"submit\" disabled>Die Frist zum Einschreiben (".$eventData['meldefrist'].") ist bereits abgelaufen!</button>";
if (!empty($_SESSION['login'])){
echo( "<p>Frist für das Einschreiben verpasst? Für ein nachträgliches Eintragen mit dem Admin verständigen (<a href=\"mailto:cwsvjudo@arcor.de?Subject=".rawurlencode("Meldefrist ".mb_convert_encoding($eventData['Veranstaltung'], 'UTF-8', 'ISO-8859-1'))."\" target=\"_top\">Email an cwsvjudo@arcor.de</a>).</p>" );
echo( "<p>Frist für das Einschreiben verpasst? Für ein nachträgliches Eintragen mit dem Admin verständigen (<a href=\"mailto:cwsvjudo@arcor.de?Subject=".rawurlencode("Meldefrist ".$eventData['Veranstaltung'])."\" target=\"_top\">Email an cwsvjudo@arcor.de</a>).</p>" );
}
}
else{
@@ -232,13 +258,6 @@
}
}
if($mysqli) $mysqli->close();
?>
<!--Beginn der Einbindung des Counters-->
<?php
$chCounter_page_title = "Wettkampfplaner -- Eventansicht -- ".mb_convert_encoding($eventData['Veranstaltung'], 'UTF-8', 'ISO-8859-1');
$chCounter_page_url = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$chCounter_visible =0 ;
// include( $_SERVER['DOCUMENT_ROOT'].'/expCounter/counter.php');
?>
</body>
</html>