diff --git a/registration-system/index.php b/registration-system/index.php index 154e431643e6bfba23103cced870065eb73e8abd..cb52e52b0032531eb0ad038601626437fc705f84 100644 --- a/registration-system/index.php +++ b/registration-system/index.php @@ -63,6 +63,9 @@ function index_show_content(){ } } +function show_content(){ + index_show_content(); +} /** * puts the dataarray into DB diff --git a/registration-system/status.php b/registration-system/status.php new file mode 100644 index 0000000000000000000000000000000000000000..a64d74ab61201f125d59a11e54499bd4a1abee45 --- /dev/null +++ b/registration-system/status.php @@ -0,0 +1,88 @@ +<?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))); + if(!$data) + die("Kein gültiger Hash gegeben!"); + + echo ' + <table> + <tr> + <td>Melde-ID</td> + <td>'.$data["bachelor_id"].'</td> + </tr> + <tr> + <td>Name</td> + <td>'.$data["forname"].' '.$data["sirname"].' ('.$data["pseudo"].')</td> + </tr> + <tr> + <td>E-Mail-Adresse</td> + <td>'.$data["mehl"].'</td> + </tr> + <tr> + <td>Anreisetag + Art</td> + <td>'.$data["anday"].' ('.$data["antyp"].')</td> + </tr> + <tr> + <td>Abreisetag + Art</td> + <td>'.$data["abday"].' ('.$data["abtyp"].')</td> + </tr> + <tr> + <td>Essenswunsch</td> + <td>'.$data["essen"].'</td> + </tr> + <tr> + <td>Zahlung erhalten</td> + <td>'.((is_null($data["paid"])) ? "nein" : date('d.m.Y',$data["paid"])).'</td> + </tr> + <tr> + <td>Rückzahlung gesendet</td> + <td>'.((is_null($data["repaid"])) ? "nein" : date('d.m.Y',$data["repaid"])).'</td> + </tr> + <!--tr> + <td>Zurückgetreten</td> + <td>'.(($data["backstepped"]==1) ? "ja" : "nein").'</td> + </tr--> + <tr> + <td>Kommentar</td> + <td>'.$data["comment"].'</td> + </tr> + </table>'; + + $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" href="mailto:'.$mailto.'?subject='.str_replace(" ", "%20",$subject).'">Änderung melden</a>'; + +} + +?> \ No newline at end of file diff --git a/registration-system/view/default_index.php b/registration-system/view/default_index.php index 86792b00304584342499031d3bdc34fcd88eca1b..3c40f4cd6cbede7eaf2df8a44eac6d7698c90d24 100644 --- a/registration-system/view/default_index.php +++ b/registration-system/view/default_index.php @@ -16,7 +16,7 @@ <div id="menubox"> <?php - index_show_content(); + show_content(); ?>