Merge ../judoRepo into redesign2017
This commit is contained in:
@@ -62,6 +62,8 @@ $endif$
|
||||
$if(quotes)$
|
||||
<style>
|
||||
q { quotes: "“" "”" "‘" "’"; }
|
||||
.fontSizeXxSmall{font-size: xx-small;}
|
||||
.displayNone{display: none;}
|
||||
</style>
|
||||
$endif$
|
||||
$if(highlighting-css)$
|
||||
@@ -69,6 +71,9 @@ $if(highlighting-css)$
|
||||
$highlighting-css$
|
||||
</style>
|
||||
$endif$
|
||||
$for(css)$
|
||||
<link rel="stylesheet" href="/$css$">
|
||||
$endfor$
|
||||
$for(extraCss)$
|
||||
<link rel="stylesheet" href="$extraCss$">
|
||||
$endfor$
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
//var_dump($_POST);
|
||||
require_once('./local/db.php.inc');
|
||||
require_once('./local/wkParticipoConf.php.inc');
|
||||
require_once('./auth.php');
|
||||
require_once('./local/db.php.inc');
|
||||
require_once('./local/wkParticipoConf.php.inc');
|
||||
require_once('./auth.php');
|
||||
@@ -26,7 +28,6 @@
|
||||
);
|
||||
$result = $mysqli->query($query);
|
||||
if(!$result){
|
||||
//echo "Fehler bei der Meldung: " . mysql_error(); die($query);
|
||||
echo "Fehler bei der Meldung: "; die($query);
|
||||
}
|
||||
$message['success'] =
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,6 @@
|
||||
<?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');
|
||||
@@ -36,8 +35,7 @@ if (isset($_SESSION['login'])) {
|
||||
),
|
||||
);
|
||||
$message['success'] = 'Anmeldung erfolgreich, <a href="index.php">weiter zum Inhalt.';
|
||||
|
||||
PHPCount::AddHit("wkParticipo - login - ".$row['loginName']);
|
||||
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);
|
||||
|
||||
223
homepage/redesign2018/markdownExperiment/wkParticipo/test.php
Normal file
223
homepage/redesign2018/markdownExperiment/wkParticipo/test.php
Normal file
@@ -0,0 +1,223 @@
|
||||
<?php
|
||||
require_once('./local/wkParticipoConf.php.inc');
|
||||
require_once('./auth.php');
|
||||
require_once('./local/db.php.inc');
|
||||
require_once('./lib/wkParticipoLib.php.inc');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>Wettkampfplanung der Judoka des CWSV</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
<?php echo $login_status; ?>
|
||||
|
||||
<h1>Wettkampfplanung - Übersicht</h1>
|
||||
|
||||
|
||||
<h2>Springe zu den ...</h2>
|
||||
|
||||
<a class="touchLink" href="#meldungen"><div>abge­gebenen Meldungen.</div></a>
|
||||
<a class="touchLink" href="#mitfahrgelegenheiten"><div>angemel­deten Mitfahr­gelegen­heiten.</div></a>
|
||||
<a class="touchLink" href="#wettkaempfen"><div>kommenden Wett­kämpfen.</div></a>
|
||||
<hr />
|
||||
<?php
|
||||
$mysqli = @new mysqli($db_server, $db_user, $db_password, $db_name);
|
||||
if ($mysqli->connect_error) {
|
||||
$message['error'] = 'Datenbankverbindung fehlgeschlagen: ' . $mysqli->connect_error;
|
||||
echo $message['error']; die();
|
||||
}
|
||||
?>
|
||||
<h2 id="meldungen">Meldungen zu kommenden Wettkämpfen</h2>
|
||||
|
||||
<?php
|
||||
|
||||
foreach( explode( ',', getUserData($mysqli, $_SESSION['user']['userId'])['kinder']) as $kindId){
|
||||
$kindDaten = getUserData($mysqli, $kindId);
|
||||
?>
|
||||
<h3><?php echo $kindDaten['name'].", ".$kindDaten['vorname'].": ";?></h3>
|
||||
<?php
|
||||
// $wkEventData = getUsersCommingWkEvents($mysqli, $kindId);
|
||||
$wkEventData = getUsersWkEvents($mysqli, $kindId);
|
||||
if(empty($wkEventData)){
|
||||
?>
|
||||
<?php echo mb_convert_encoding($kindDaten['name'].", ".$kindDaten['vorname'], 'UTF-8');?> ist derzeit bei keinem Wettkampf eingeschrieben!
|
||||
<?php
|
||||
}
|
||||
else{
|
||||
foreach($wkEventData as $wkEvent){
|
||||
?>
|
||||
<h4><?php echo mb_convert_encoding($wkEvent['Veranstaltung'], 'UTF-8', 'ISO-8859-1');?></h4>
|
||||
<?php print_r($wkEvent);?>
|
||||
<ul>
|
||||
<li>Datum: <?php echo mb_convert_encoding($wkEvent['Datum'], 'UTF-8', 'ISO-8859-1');?></li>
|
||||
<li>Altersklassen: <?php echo mb_convert_encoding($wkEvent['Altersklassen'], 'UTF-8', 'ISO-8859-1');?></li>
|
||||
</ul>
|
||||
<a class="touchLink" href ="/ressourcen/phpLib/calendar.php?wkID=<?php echo $wkEvent['lfdeNr']?>"><div>Termin in Kalender übernehmen</div></a>
|
||||
<form action="./showWkEvent.php" method="post">
|
||||
<input type="hidden" name="f[eventId]" value="<?php echo (isset( $wkEvent['eventId'] ) ? $wkEvent['eventId'] : "");?>" />
|
||||
<button type="submit">Detailansicht</button>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
echo "</ul>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<h2 id="mitfahrgelegenheiten">Angemeldete Mitfahrgelegenheiten</h2>
|
||||
<?php
|
||||
$fahrten = array();
|
||||
$fahrten = getUsersCommingFahrten($mysqli, $_SESSION['user']['userId']);
|
||||
if( empty($fahrten) ){
|
||||
?>
|
||||
Keine Mitfahrangebote gefunden
|
||||
<?php
|
||||
}
|
||||
else{
|
||||
foreach($fahrten as $fahrt){
|
||||
$mitfahrerData = getMitfahrer($mysqli, $fahrt['id']);
|
||||
?>
|
||||
<div class="wkBox">
|
||||
<h3><?php echo (isset($fahrt['Veranstaltung']) ? mb_convert_encoding($fahrt['Veranstaltung'], 'UTF-8', 'ISO-8859-1') : "<fehlender Wettkampfname>" );?></h3>
|
||||
<ul>
|
||||
<li>Datum: <?php echo (isset($fahrt['Datum']) ? mb_convert_encoding($fahrt['Datum'], 'UTF-8', 'ISO-8859-1') : "<fehlendes Datum>" );?></li>
|
||||
<li>Meldefrist: <?php echo (isset($fahrt['meldefrist']) ? mb_convert_encoding($fahrt['meldefrist'], 'UTF-8', 'ISO-8859-1') : "<fehlende Meldefrist>" );?></li>
|
||||
<li>Altersklassen: <?php echo (isset($fahrt['Altersklassen']) ? mb_convert_encoding($fahrt['Altersklassen'], 'UTF-8', 'ISO-8859-1') : "<fehlende Altersklassen>" );?></li>
|
||||
<li>Ort: <a href="<?php echo (isset($fahrt['Routenplaner']) ? mb_convert_encoding($fahrt['Routenplaner'], 'UTF-8', 'ISO-8859-1') : "" );?>"><?php echo (isset($fahrt['Ort']) ? mb_convert_encoding($fahrt['Ort'], 'UTF-8', 'ISO-8859-1') : "<fehlender Ort>" );?></a></li>
|
||||
<li>Anzahl Plätze: <?php echo count($mitfahrerData)."/".$fahrt['plaetze'];?><ul><?php foreach($mitfahrerData as $mitfahrer){echo "<li>".$mitfahrer['name'].", ".$mitfahrer['vorname']."</li>";};?></ul></li>
|
||||
</ul>
|
||||
<a class="touchLink" href ="/ressourcen/phpLib/calendar.php?wkID=<?php echo $fahrt['lfdeNr']?>"><div>Termin in Kalender übernehmen</div></a>
|
||||
<form action="./showWkEvent.php" method="post">
|
||||
<input type="hidden" name="f[eventId]" value="<?php echo (isset( $fahrt['eventId'] ) ? $fahrt['eventId'] : "");?>" />
|
||||
<button type="submit">Detailansicht</button>
|
||||
</form>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<h2 id="wettkaempfen">Anstehende Wettkämpfe</h2>
|
||||
<?php
|
||||
$wkEvents = getCommingWkEvents($mysqli);
|
||||
|
||||
if( empty($wkEvents) ){
|
||||
?>
|
||||
<p>Momentan befinden sich anscheinend keine Wettkämpfe in Planung!</p>
|
||||
<?php
|
||||
}
|
||||
else{
|
||||
foreach( $wkEvents as $wk){
|
||||
//print_r($wk);
|
||||
?>
|
||||
<div class="wkBox"><ul>
|
||||
<li>Datum: <?php echo mb_convert_encoding($wk['Datum'], 'UTF-8', 'ISO-8859-1')?></li>
|
||||
<li>Wettkampf: <?php echo mb_convert_encoding($wk['Veranstaltung'], 'UTF-8', 'ISO-8859-1')?></li>
|
||||
<li>Altersklassen: <?php echo mb_convert_encoding($wk['Altersklassen'], 'UTF-8', 'ISO-8859-1')?></li>
|
||||
<li>Meldefrist: <?php echo mb_convert_encoding($wk['meldefrist'], 'UTF-8', 'ISO-8859-1')?></li>
|
||||
<li>angemeldete Starter:
|
||||
<?php
|
||||
$starters = getStarterForEvent($mysqli, $wk['id']);
|
||||
if( empty($starters) ){
|
||||
?>
|
||||
Noch hat sich niemand für diesen Wettkampf gemeldet!
|
||||
<?php
|
||||
}
|
||||
else{
|
||||
echo count($starters);
|
||||
}
|
||||
?>
|
||||
</li>
|
||||
<?php
|
||||
$fahrten = getFahrtenForEvent($mysqli, $wk['id']);
|
||||
$anzPlätze = 0;
|
||||
foreach($fahrten as $fahrt)
|
||||
$anzPlätze += $fahrt['plaetze'];
|
||||
echo "<li".( ($anzPlätze<count($starters)) ? " style=\"color: red\"" : "" ).">Anzahl Plätze: ".$anzPlätze."</li>";
|
||||
?>
|
||||
</ul>
|
||||
<form action="./showWkEvent.php" method="post">
|
||||
<input type="hidden" name="f[eventId]" value="<?php echo (isset( $wk['id'] ) ? $wk['id'] : "");?>" />
|
||||
<button type="submit">Detailansicht</button>
|
||||
</form>
|
||||
<hr />
|
||||
Für diesen Wettkampf ...
|
||||
<form action="./addStarter.php" method="post">
|
||||
<input type="hidden" name="f[eventId]" value=<?php echo ( isset( $wk['id'] ) ? $wk['id'] : "");?> />
|
||||
<?php
|
||||
if( date("Y-m-d") > $wk['meldefrist'] ){
|
||||
?>
|
||||
<button type="submit" disabled>ist die Meldefrist bereits abgelaufen!</button>
|
||||
<?php
|
||||
}
|
||||
else{
|
||||
?>
|
||||
<button type="submit">einen Starter melden</button>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
<form action="./addFahrt.php" method="post">
|
||||
<input type="hidden" name="f[eventId]" value="<?php echo ( isset( $wk['id'] ) ? $wk['id'] : "" );?>" />
|
||||
<?php
|
||||
// print_r($wk);
|
||||
// echo $wk['id'];
|
||||
if($wk['Datum'] > date("Y-m-d")){
|
||||
?>
|
||||
<button type="submit">eine Mitfahrgelegenheiten melden.</button>
|
||||
<?php
|
||||
}
|
||||
else{
|
||||
?>
|
||||
<button type="submit" disabled>ist es leider zu spät, noch Mitfahrgelegenheiten hinzuzufügen.</button>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
</div>
|
||||
<hr />
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<h2 id="ergebnisse">Letzte Ergebnisse</h2>
|
||||
|
||||
<ul>
|
||||
<?php
|
||||
foreach( explode( ',', getUserData($mysqli, $_SESSION['user']['userId'])['kinder']) as $kindId){
|
||||
$kindDaten = getUserData($mysqli, $kindId);
|
||||
|
||||
echo "<li>".$kindDaten['name'].", ".$kindDaten['vorname'].":<ul>";
|
||||
$ergebnisse = getUsersErgebnisse($mysqli, $kindId);
|
||||
foreach( $ergebnisse as $ergebnis ){
|
||||
?>
|
||||
<li><?php echo mb_convert_encoding($ergebnis['Datum'], 'UTF-8', 'ISO-8859-1')?></li>
|
||||
<li><?php echo mb_convert_encoding($ergebnis['Veranstaltung'], 'UTF-8', 'ISO-8859-1');?></li>
|
||||
<li>Platz: <?php echo mb_convert_encoding($ergebnis['platz'], 'UTF-8', 'ISO-8859-1'); ?></li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</ul></li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<?php
|
||||
$mysqli->close();
|
||||
?>
|
||||
|
||||
<!--Beginn der Einbindung des Counters-->
|
||||
<?php
|
||||
$chCounter_page_title = "Wettkampfplaner -- Übersicht";
|
||||
$chCounter_page_url = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . "?user=".$_SESSION['user']['username'];
|
||||
$chCounter_visible=0;
|
||||
// include( $_SERVER['DOCUMENT_ROOT'].'/expCounter/counter.php');
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user