diff --git a/registration-system/admin/index.php b/registration-system/admin/index.php index 4c36f4603eaf254d1696d3a468eded9b2bac35d5..f91df203ba747707ee15d6ecc68f1ee3eb5954bd 100644 --- a/registration-system/admin/index.php +++ b/registration-system/admin/index.php @@ -37,6 +37,7 @@ if (isLoggedIn()) "Kosten" => "cost", "Rundmail" => "mail", "Notizen" => "notes", + "Listenexport" => "export", "Deadlink" => "dead" ); @@ -64,6 +65,8 @@ if (isLoggedIn()) page_mail(); break; case "notes": page_notes(); break; + case "export": + page_export(); break; default: page_404($page); } diff --git a/registration-system/admin/pages.php b/registration-system/admin/pages.php index 3d57dd608cd42ac6de0daa9905ae20ea0b58916f..6aaf132717a1df11615f3df5518d441cf32c524b 100644 --- a/registration-system/admin/pages.php +++ b/registration-system/admin/pages.php @@ -111,6 +111,9 @@ function page_mail(){ function page_cost(){ require_page("pages_cost.php"); } +function page_export(){ + require_page("pages_export.php"); +} function require_page($page){ if(!@file_exists($page) ) { diff --git a/registration-system/admin/pages_cost.php b/registration-system/admin/pages_cost.php index c3acf358bb285ee8f93b48b65e697a45776da44b..a4e15fe53210fa4f3c8b6cacdb796775f584735e 100644 --- a/registration-system/admin/pages_cost.php +++ b/registration-system/admin/pages_cost.php @@ -8,45 +8,87 @@ global $config_studitypen, $config_reisearten, $config_essen, $admin_db, $config_current_fahrt_id, $config_admin_verbose_level, $config_verbose_level, $text, $headers, $ajax; -$text .= "<h2>Unterkunft</h2>"; -$h = array("Position", "Anzahl", "Satz", "Summe"); -$s[3] = array(1,2); -$t[2] = " €"; -$t[3] = " €"; - $text .= "<h3>Kalkulation</h3>"; -$d = array(array("Übernachtung", 2, 10.50), - array("Zwiebel", 300, 5), - array("Brötchen", 200, 0.2)); +$h1 = array("Position", "Anzahl (normal)", "Satz", "Summe"); +$s1[3] = array(1,2); +$t1[2] = " €"; +$t1[3] = " €"; +$d1 = array(array("Reisekosten", 2, 1.9), + array("Übernachtung (HP)", 2, 17.8), + array("Bettwäsche", 1, 4), + array("Grillen", 1, 0.3), + array("Kurzreisezuschlag", 1, 2)); +$text .= html_table($h1, $d1, $s1, $t1); +$text .= "<h2>Einkaufen</h2>"; +$h2 = array("Position", "Anzahl", "Satz", "Summe"); +$s2[3] = array(1,2); +$t2[2] = " €"; +$t2[3] = " €"; +$d2 = array(array("Club Mate", 120, 0.69), + array("Chips", 15,0.5), + array("Flips", 15, 0.5), + array("Fanta", 24, 0.39), + array("Wasser", 42, 0.3)); +$text .= html_table($h2, $d2, $s2, $t2); -$text .= html_table($h, $d, $s, $t); $text .= "<h3>Rechnung</h3>"; -$text .= html_table($h, $d, $s, $t); - -$text .= "<h2>Einkaufen</h2>"; -$text .= html_table($h, $d, $s, $t); +$h3 = array("Position", "Menge", "Anzahl", "Satz", "Summe"); +$s3[4] = array(1,2,3); +$t3[3] = " €"; +$t3[4] = " €"; +$d3 = array( + array("Übernachtung", 2, 69, 10.5), + array("Bettwäsche", 1, 75, 4), + array("Grillnutzung", 1, 69, 0.3), + array("Kurzreisezuschlag", 1, 69, 2), + array("Halbpension", 2, 69, 7.3)); +$text .= html_table($h3, $d3, $s3, $t3); $text .= "<h2>Money In/Out</h2>"; -$text .= html_table($h, $d, $s, $t); +$text .= '<div style="float:left">'; +$h4 = array("Position", "Summe"); +$s4 = array(); +$t4[1] = " €"; +$d4_out = array( + array("Frauensee", 2815.1), + array("Einkauf", 590.13), + array("Busfahrt", 216), + array("Bäcker", 22.4), + array("Kaution", 100) +); +$d4_in = array( + array("Pfand1", 82.17), + array("Pfand2", 10), + array("Pfand3", 15), + array("Fachschaft (Reste)", 76), + array("Kollekte", 4620), + array("Förderung", 2200), + array("Kaution", 100) +); +$text .= html_table($h4, $d4_out, $s4, $t4); +$text .= '</div><div style="float:left">'; +$text .= html_table($h4, $d4_in, $s4, $t4); +$text .= '</div><div style="clear:both"></div>'; + /** - * $headers + * $headers * is an array of the headers * $data * is an array with the data to output - * $sum - * is an array declaring which cols should be summed up and put below the table, + * $sum + * is an array declaring which cols should be summed up and put below the table, * second dimension declares which cols need to be multiplied (if no second dimension, just sum at the end) - * $type + * $type * is an array declaring type of data to put behind the value (i.e. €), not all cols need to be declared * * return value: variable containing the html code for echo */ function html_table($header, $data, $sum = array(), $type = array()){ $summy = array(); - + $ret = "<table class=\"cost-table\"> <thead> <tr>\n"; @@ -74,7 +116,7 @@ function html_table($header, $data, $sum = array(), $type = array()){ $tmp = (is_null($tmp)) ? $row[$s] : $tmp*$row[$s]; } $ret .= prepval($tmp,(isset($type[$i]) ? $type[$i] : "")); - + if(!isset($summy[$i])) $summy[$i] = $tmp; else @@ -102,7 +144,7 @@ function html_table($header, $data, $sum = array(), $type = array()){ </tfoot>\n"; } $ret.= "</table>"; - + return $ret; } diff --git a/registration-system/admin/pages_export.php b/registration-system/admin/pages_export.php new file mode 100644 index 0000000000000000000000000000000000000000..79e217ee163dd78f4ee339cd1df9e9e19dde650a --- /dev/null +++ b/registration-system/admin/pages_export.php @@ -0,0 +1,19 @@ +<?php +/** + * Created by PhpStorm. + * User: tim + * Date: 8/26/14 + * Time: 10:05 PM + */ + +global $config_studitypen, $config_reisearten, $config_essen, $admin_db, $config_current_fahrt_id, $config_admin_verbose_level, $config_verbose_level, $text, $headers, $ajax; + +$text .= ' +<ul> + <li><a href="?page=export&ex=refra">RefRat-Liste</a> (<a href="http://www.refrat.hu-berlin.de/finanzen/TeilnehmerInnenlisteMitEinverstaendniserklaerung.pdf">orig</a>)</li> + <li><a href="?page=export&ex=treff">Treffpunktanwesenheitsliste</a></li> + <li><a href="?page=export&ex=konto">Kontodatenliste</a></li> + <li><a href="?page=export&ex=unter">Anwesenheitsunterschriftsliste für Unterkunft</a></li> + <li><a href="http://www.refrat.de/docs/finanzen/FormularFSErstattung_sepa_form_2.pdf">Erstattungsformular</a></li> +</ul> +'; \ No newline at end of file diff --git a/registration-system/view/admin_style.css b/registration-system/view/admin_style.css index b3c907606553d07667e64d479637a14e8a9ae8d8..409da2da57ce650e68c69a5b2321db2947b82626 100644 --- a/registration-system/view/admin_style.css +++ b/registration-system/view/admin_style.css @@ -19,6 +19,12 @@ a:active, a:hover { color:#ff6000; text-decoration:none; } +a[href ^= "http"]:after { + content: " " url("graphics/outlonk.png"); +} +table { + border-collapse: collapse; +} #linkbar{ border-bottom: 1px dashed coral; width: 100%; @@ -51,7 +57,7 @@ form table tr td{ } .cost-table{ - + padding: 5px; } .cost-table td{ padding-left: 12px; @@ -70,3 +76,7 @@ form table tr td{ .cost-table-invisible{ border: 0; } +.cost-table tfoot td{ + border-bottom: 1px solid #0c0c0c; + border-top: 1px dashed #0c0c0c; +} \ No newline at end of file diff --git a/registration-system/view/graphics/outlonk.png b/registration-system/view/graphics/outlonk.png new file mode 100644 index 0000000000000000000000000000000000000000..acf260fcd9c744bf3479f8e15c66b458b22df568 Binary files /dev/null and b/registration-system/view/graphics/outlonk.png differ