2014-07-08 20:14:37 +02:00
|
|
|
<?php
|
|
|
|
//============================================================================
|
|
|
|
// Name : patronGen.php
|
|
|
|
// Author : Patrick Reipschläger, Dirk Legler
|
|
|
|
// Version : 1.0
|
|
|
|
// Date : 10-2013
|
|
|
|
// Description : For generating the group name tickets.
|
|
|
|
//============================================================================
|
|
|
|
include_once 'libs/keyLib.php';
|
|
|
|
include_once 'libs/formLib.php';
|
2016-08-05 10:06:21 +02:00
|
|
|
include_once 'libs/questionnaireLib.php';
|
2014-07-08 20:14:37 +02:00
|
|
|
|
|
|
|
// start a session prevent sending the same post twice
|
|
|
|
// if the user refreshes the page, it will default to the
|
|
|
|
// access code screen
|
|
|
|
//session_start();
|
|
|
|
|
|
|
|
// the key file which should be edited, either the default key file or the one that was specified
|
|
|
|
$keyFile = KEYFILE;
|
|
|
|
if (isset($_GET["keyFile"]))
|
|
|
|
$keyFile = $_GET["keyFile"];
|
|
|
|
// holds the key data, generated from the key file
|
|
|
|
$keyData = ReadKeyFile($keyFile);
|
2016-08-05 10:06:21 +02:00
|
|
|
// the group names and rooms for Monday and their start times for Tuesday, removes "Nicht am Tutorium teilgenommen"
|
|
|
|
$patrons = ReadPatronsFile(PATRONS);
|
|
|
|
array_splice($patrons, 0, 1);
|
2014-07-08 20:14:37 +02:00
|
|
|
|
|
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>Namenspatronzettel</title>
|
|
|
|
<link rel="stylesheet" type="text/css" href="css/print.css" />
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="container">
|
|
|
|
<?php
|
|
|
|
for ($i = 0; $i < count($keyData); $i++)
|
|
|
|
{
|
2016-08-05 10:06:21 +02:00
|
|
|
$pno = $i%(count(array_keys($patrons)));
|
|
|
|
$patron_name = array_keys($patrons)[$pno];
|
2015-09-25 16:48:26 +02:00
|
|
|
?>
|
|
|
|
<div class="ticket">
|
2016-08-05 10:06:21 +02:00
|
|
|
<div class="patron"><?php echo $patron_name; ?></div>
|
2015-09-25 16:48:26 +02:00
|
|
|
<div class="tickettext">
|
|
|
|
<div class="ticketimg"><img src="css/ese-logo.png"/></div>
|
2016-08-05 10:06:21 +02:00
|
|
|
<div class="room">Tutorium in <br><strong><?php echo $patrons[$patron_name][1]; ?></strong></div>
|
2015-09-25 16:48:26 +02:00
|
|
|
<div class="time">
|
|
|
|
<?php
|
|
|
|
// don't display start date if there is none (Master case)
|
2016-08-05 10:06:21 +02:00
|
|
|
echo ($patrons[$patron_name][2]=="") ? " " : "Einschreibestart Dienstag <strong>".$patrons[$patron_name][2]." Uhr</strong>";
|
2015-09-25 16:48:26 +02:00
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php
|
2014-07-08 20:14:37 +02:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|