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

fixed date format on statuspage; changed template progress for admin panel,...

fixed date format on statuspage; changed template progress for admin panel, added print template, started implementation on export
parent 3b15d85f
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,7 @@ require_once("../config.inc.php");
require_once("../frameworks/medoo.php");
$template = file_get_contents("../view/admin_template.html");
$title = "FSFahrt - Admin Panel";
$navigation = "";
$headers = "";
$text = "";
......@@ -79,5 +80,10 @@ else
if(isset($_REQUEST['ajax']))
echo $ajax;
else
echo str_replace("{headers}", $headers, str_replace("{text}", $text, str_replace("{navigation}", $navigation, $template)));
else{
$rep = ["{headers}" => $headers,
"{text}" => $text,
"{navigation}" => $navigation,
"{title}" => $title];
echo str_replace(array_keys($rep), array_values($rep), $template);
}
\ No newline at end of file
......@@ -10,10 +10,70 @@ global $config_studitypen, $config_reisearten, $config_essen, $admin_db, $config
$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="?page=export&ex=refra" target="_blank">RefRat-Liste</a> (<a href="http://www.refrat.hu-berlin.de/finanzen/TeilnehmerInnenlisteMitEinverstaendniserklaerung.pdf">orig</a>)</li>
<li><a href="?page=export&ex=treff" target="_blank">Treffpunktanwesenheitsliste</a></li>
<li><a href="?page=export&ex=konto" target="_blank">Kontodatenliste</a></li>
<li><a href="?page=export&ex=unter" target="_blank">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
NOTE: No Chrome support! Webkit/Blink haven\'t implemented support for @media print... This feature is developed to support Firefox.
';
if(isset($_REQUEST['ex'])){
global $template;
$template = file_get_contents("../view/print_template.html");
$text = "";
switch($_REQUEST['ex']){
case "refra": genRefRa(); break;
case "treff": genTreff(); break;
case "konto": genKonto(); break;
case "unter": genUnter(); break;
default:
break;
}
}
function genRefRa(){
global $text;
printTable(["col 1", "vol2"], [["a","b"],["c","d"]]);
$text .= "
<div class='footer'>TESTFOOT</div>
<div class='header'>TESTHEAD</div>";
}
function genTreff(){
}
function genKonto(){
}
function genUnter(){
}
function printTable($headers, $data){
global $text;
$text.="
<table>
<thead>
<tr>";
foreach($headers as $h)
$text.="<th>".$h."</th>";
$text.="
</tr>
</thead>
<tbody>";for($i=0; $i<300; $i++){
foreach($data as $dr){
$text .= "<tr>";
foreach($dr as $dc)
$text .= "<td>".$dc."</td>";
$text .= "</tr>";
}}
$text .="
</tbody>
</table>";
}
\ No newline at end of file
......@@ -39,8 +39,8 @@ function show_content(){
'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 &amp; Art' => date('d.m.Y', $data["anday"]).' ('.$data["antyp"].')',
'Abreisetag &amp; Art' => date('d.m.Y', $data["abday"]).' ('.$data["abtyp"].')',
'Anreisetag &amp; Art' => comm_from_mysqlDate($data["anday"]).' ('.$data["antyp"].')',
'Abreisetag &amp; 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"])),
......
......@@ -2,7 +2,7 @@
<html>
<head>
<title>FSFahrt - Admin Panel</title>
<title>{title}</title>
<meta charset="UTF-8" />
<link rel="stylesheet" href="../view/admin_style.css" />
{headers}
......
<!DOCTYPE html>
<html>
<head>
<title>{title}</title>
{headers}
<style type="text/css">
@media print {
div.footer {
position: fixed;
bottom: 0;
}
div.header {
position: fixed;
top: 0;
}
thead{
display: table-header-group;
}
}
</style>
</head>
<body>
{text}
</body>
</html>
\ No newline at end of file
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