Skip to content
Snippets Groups Projects
Commit 890cb610 authored by Tim Repke's avatar Tim Repke
Browse files

initial exportoptioncommit + some edit on cost

parent 7bd14e1a
No related branches found
No related tags found
No related merge requests found
...@@ -37,6 +37,7 @@ if (isLoggedIn()) ...@@ -37,6 +37,7 @@ if (isLoggedIn())
"Kosten" => "cost", "Kosten" => "cost",
"Rundmail" => "mail", "Rundmail" => "mail",
"Notizen" => "notes", "Notizen" => "notes",
"Listenexport" => "export",
"Deadlink" => "dead" "Deadlink" => "dead"
); );
...@@ -64,6 +65,8 @@ if (isLoggedIn()) ...@@ -64,6 +65,8 @@ if (isLoggedIn())
page_mail(); break; page_mail(); break;
case "notes": case "notes":
page_notes(); break; page_notes(); break;
case "export":
page_export(); break;
default: default:
page_404($page); page_404($page);
} }
......
...@@ -111,6 +111,9 @@ function page_mail(){ ...@@ -111,6 +111,9 @@ function page_mail(){
function page_cost(){ function page_cost(){
require_page("pages_cost.php"); require_page("pages_cost.php");
} }
function page_export(){
require_page("pages_export.php");
}
function require_page($page){ function require_page($page){
if(!@file_exists($page) ) { if(!@file_exists($page) ) {
......
...@@ -8,45 +8,87 @@ ...@@ -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; 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>"; $text .= "<h3>Kalkulation</h3>";
$d = array(array("Übernachtung", 2, 10.50), $h1 = array("Position", "Anzahl (normal)", "Satz", "Summe");
array("Zwiebel", 300, 5), $s1[3] = array(1,2);
array("Brötchen", 200, 0.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 .= "<h3>Rechnung</h3>";
$text .= html_table($h, $d, $s, $t); $h3 = array("Position", "Menge", "Anzahl", "Satz", "Summe");
$s3[4] = array(1,2,3);
$text .= "<h2>Einkaufen</h2>"; $t3[3] = " €";
$text .= html_table($h, $d, $s, $t); $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 .= "<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 * is an array of the headers
* $data * $data
* is an array with the data to output * is an array with the data to output
* $sum * $sum
* is an array declaring which cols should be summed up and put below the table, * 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) * 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 * 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 * return value: variable containing the html code for echo
*/ */
function html_table($header, $data, $sum = array(), $type = array()){ function html_table($header, $data, $sum = array(), $type = array()){
$summy = array(); $summy = array();
$ret = "<table class=\"cost-table\"> $ret = "<table class=\"cost-table\">
<thead> <thead>
<tr>\n"; <tr>\n";
...@@ -74,7 +116,7 @@ function html_table($header, $data, $sum = array(), $type = array()){ ...@@ -74,7 +116,7 @@ function html_table($header, $data, $sum = array(), $type = array()){
$tmp = (is_null($tmp)) ? $row[$s] : $tmp*$row[$s]; $tmp = (is_null($tmp)) ? $row[$s] : $tmp*$row[$s];
} }
$ret .= prepval($tmp,(isset($type[$i]) ? $type[$i] : "")); $ret .= prepval($tmp,(isset($type[$i]) ? $type[$i] : ""));
if(!isset($summy[$i])) if(!isset($summy[$i]))
$summy[$i] = $tmp; $summy[$i] = $tmp;
else else
...@@ -102,7 +144,7 @@ function html_table($header, $data, $sum = array(), $type = array()){ ...@@ -102,7 +144,7 @@ function html_table($header, $data, $sum = array(), $type = array()){
</tfoot>\n"; </tfoot>\n";
} }
$ret.= "</table>"; $ret.= "</table>";
return $ret; return $ret;
} }
......
<?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
...@@ -19,6 +19,12 @@ a:active, a:hover { ...@@ -19,6 +19,12 @@ a:active, a:hover {
color:#ff6000; color:#ff6000;
text-decoration:none; text-decoration:none;
} }
a[href ^= "http"]:after {
content: " " url("graphics/outlonk.png");
}
table {
border-collapse: collapse;
}
#linkbar{ #linkbar{
border-bottom: 1px dashed coral; border-bottom: 1px dashed coral;
width: 100%; width: 100%;
...@@ -51,7 +57,7 @@ form table tr td{ ...@@ -51,7 +57,7 @@ form table tr td{
} }
.cost-table{ .cost-table{
padding: 5px;
} }
.cost-table td{ .cost-table td{
padding-left: 12px; padding-left: 12px;
...@@ -70,3 +76,7 @@ form table tr td{ ...@@ -70,3 +76,7 @@ form table tr td{
.cost-table-invisible{ .cost-table-invisible{
border: 0; border: 0;
} }
.cost-table tfoot td{
border-bottom: 1px solid #0c0c0c;
border-top: 1px dashed #0c0c0c;
}
\ No newline at end of file
registration-system/view/graphics/outlonk.png

143 B

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment