From 8108769bc7e31c6905200a855d1e489d79cd39be Mon Sep 17 00:00:00 2001 From: Tim Repke <timmothey@gmx.de> Date: Mon, 17 Aug 2015 19:06:46 +0200 Subject: [PATCH] fixed status page --- registration-system/status.php | 4 +- registration-system/statuss.php | 80 --------------------------------- 2 files changed, 3 insertions(+), 81 deletions(-) delete mode 100644 registration-system/statuss.php diff --git a/registration-system/status.php b/registration-system/status.php index 1e97d43..c4195bf 100644 --- a/registration-system/status.php +++ b/registration-system/status.php @@ -77,4 +77,6 @@ function show_content(){ } -?> +function echo_headers() { + echo '<link rel="stylesheet" href="view/style.css" />'; +} diff --git a/registration-system/statuss.php b/registration-system/statuss.php deleted file mode 100644 index 1e97d43..0000000 --- a/registration-system/statuss.php +++ /dev/null @@ -1,80 +0,0 @@ -<?php -/** - * Created by PhpStorm. - * User: tim - * Date: 8/16/14 - * Time: 5:41 PM - */ - - -require 'config.inc.php'; -require 'frameworks/medoo.php'; -require 'frameworks/commons.php'; -require 'lang.php'; - -$config_verbose_level = 0; - -$status_db = new medoo(array( - 'database_type' => $config_db["type"], - 'database_name' => $config_db["name"], - 'server' => $config_db["host"], - 'username' => $config_db["user"], - 'password' => $config_db["pass"] -)); - -require 'view/default_index.php'; - - -function show_content(){ - global $status_db, $config_current_fahrt_id, $config_mailtag; - if(!isset($_REQUEST['hash'])) - die("Kein Hash angegeben!"); - - $data = $status_db->get("bachelor", "*", array("bachelor_id"=>substr($_REQUEST['hash'],0,15))); - $wl = FALSE; - if(!$data){ - $data = $status_db->get("waitlist", "*", array("waitlist_id"=>substr($_REQUEST['hash'],0,15))); - $wl = TRUE; - if(!$data) - die("<h1>Kein gültiger Hash gegeben!</h1>"); - } - - $infolist = Array( - 'Anmelde ID' => $data['bachelor_id'], - 'Anmeldetag' => date('d.m.Y', $data['anm_time']), - 'Vor-/Nachname' => $data['forname'].' '.$data['sirname'].(strlen($data['pseudo']) > 0 ? ' ('.$data['pseudo'].')' : ""), - 'eMail-Adresse' => $data['mehl'], - 'Anreisetag & Art' => comm_from_mysqlDate($data["anday"]).' ('.$data["antyp"].')', - 'Abreisetag & Art' => comm_from_mysqlDate($data["abday"]).' ('.$data["abtyp"].')', - 'Essenswunsch' => $data["essen"], - 'Zahlung erhalten' => ((is_null($data["paid"])) ? "nein" : date('d.m.Y',$data["paid"])), - 'Rückzahlung gesendet' => ((is_null($data["repaid"])) ? "nein" : date('d.m.Y',$data["repaid"])), - //'Zurückgetreten' => (($data["backstepped"]==1) ? "ja" : "nein"), - 'Kommentar' => $data["comment"] - ); - - echo ' - <div class="fahrt" style="background: #f9f9f9"><div class="fahrttitle">Anmeldedaten</div>'; - - if($wl) - echo '<div style="color: red; font-weight: bold; font-size: 14pt;">Achtung, dies ist nur ein Eintrag auf der Warteliste!<br /> Sofern keine weiteren Auskünfte folgen, kannst du leider NICHT mitfahren...</div>'; - - echo' - <div class="fahrttable">'; - - foreach($infolist as $key => $value) - { - echo '<div>'; // (invisible(magic(style))) table row - echo "<div style='display:table-cell; font-weight: bold; padding: 3px 40px 3px 0'>$key</div><div style='display:table-cell'>$value</div>"; - echo '</div>'; - } - echo '</div></div>'; - - $mailto = $status_db->get("fahrten", "kontakt", array("fahrt_id"=>$config_current_fahrt_id)); - $subject= $config_mailtag.'Änderung zu '.$data["forname"].' '.$data["sirname"].' ('.$data["pseudo"].')'; - - echo '<a style="float:none;font-weight:bold" href="mailto:'.$mailto.'?subject='.str_replace(" ", "%20",$subject).'">Änderung melden</a>'; - -} - -?> -- GitLab