commit
ce214d5ccf
|
|
@ -53,14 +53,21 @@ while ($zeile = mysqli_fetch_array($db_erg, MYSQLI_ASSOC)) {
|
||||||
<div style="width: 100%;">
|
<div style="width: 100%;">
|
||||||
|
|
||||||
<table class="commontable">
|
<table class="commontable">
|
||||||
<th><button name="BackHelferdaten" value="1" onclick="window.location.href = 'index.php';"><b>↩</b></button> <b>Admin HelferDB</b>
|
<th>
|
||||||
|
<button name="BackHelferdaten" value="1" onclick="window.location.href = 'index.php';">
|
||||||
|
<b>↩</b>
|
||||||
|
</button>
|
||||||
|
<b>Admin HelferDB</b>
|
||||||
</th>
|
</th>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
|
|
||||||
<tr onclick="window.location.href='AdminDienste.php';">
|
<tr onclick="window.location.href='AdminDienste.php';">
|
||||||
<td>
|
<td>
|
||||||
<a class="fallbacklink" href='AdminDienste.php'><img src="Bilder/PfeilRechts.jpeg" style="width:30px;height:30px;"><b> Dienste und Schichten verwalten</b></a>
|
<a class="fallbacklink" href='AdminDienste.php'>
|
||||||
|
<img src="Bilder/PfeilRechts.jpeg" style="width:30px;height:30px;">
|
||||||
|
<b> Dienste und Schichten verwalten</b>
|
||||||
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr onclick="window.location.href='CreateHelfer.php';"> <td>
|
<tr onclick="window.location.href='CreateHelfer.php';"> <td>
|
||||||
|
|
@ -72,11 +79,17 @@ while ($zeile = mysqli_fetch_array($db_erg, MYSQLI_ASSOC)) {
|
||||||
</td> </tr>
|
</td> </tr>
|
||||||
<tr onclick="window.location.href='AdminHelferUebersicht.php';">
|
<tr onclick="window.location.href='AdminHelferUebersicht.php';">
|
||||||
<td>
|
<td>
|
||||||
<a class="fallbacklink" href='AdminHelferUebersicht.php'><img src="Bilder/PfeilRechts.jpeg" style="width:30px;height:30px;"><b>Helferübersicht (und als Admin ändern)</b></a>
|
<a class="fallbacklink" href='AdminHelferUebersicht.php'>
|
||||||
|
<img src="Bilder/PfeilRechts.jpeg" style="width:30px;height:30px;">
|
||||||
|
<b>Helfer als Admin ändern</b>
|
||||||
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<th><b>Helfer als Admin ändern:<b> <form style="display:inline-block;" method=post><select style="height:33px;width:350px;font-size:20" name="AliasHelferID" id="AliasHelferID" onchange="submit()">
|
<th>
|
||||||
|
<b>Helfer als Admin ändern:<b>
|
||||||
|
<form style="display:inline-block;" method=post>
|
||||||
|
<select style="height:33px;width:350px;font-size:20" name="AliasHelferID" id="AliasHelferID" onchange="submit()">
|
||||||
<?php
|
<?php
|
||||||
$db_erg = HelferListe($db_link);
|
$db_erg = HelferListe($db_link);
|
||||||
while ($zeile = mysqli_fetch_array($db_erg, MYSQLI_ASSOC)) {
|
while ($zeile = mysqli_fetch_array($db_erg, MYSQLI_ASSOC)) {
|
||||||
|
|
@ -98,13 +111,25 @@ while ($zeile = mysqli_fetch_array($db_erg, MYSQLI_ASSOC)) {
|
||||||
- inner table for indent-->
|
- inner table for indent-->
|
||||||
<tr onclick="window.location.href='AdminUserdaten.php';">
|
<tr onclick="window.location.href='AdminUserdaten.php';">
|
||||||
<!--td class="invis"></td-->
|
<!--td class="invis"></td-->
|
||||||
<td><img src="Bilder/dot.png" width="30px" height="2px"><img src="Bilder/PfeilRechts.jpeg" style="width:30px;height:30px;"><b> Helferdaten ändern</b></td>
|
<td>
|
||||||
|
<img src="Bilder/dot.png" width="30px" height="2px">
|
||||||
|
<img src="Bilder/PfeilRechts.jpeg" style="width:30px;height:30px;">
|
||||||
|
<b> Helferdaten ändern</b>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr onclick="window.location.href='AdminMeineSchichten.php';">
|
<tr onclick="window.location.href='AdminMeineSchichten.php';">
|
||||||
<td><img src="Bilder/dot.png" width="30px" height="2px"><img src="Bilder/PfeilRechts.jpeg" style="width:30px;height:30px;"><b> Schichten Anzeigen/Löschen</b></td>
|
<td>
|
||||||
|
<img src="Bilder/dot.png" width="30px" height="2px">
|
||||||
|
<img src="Bilder/PfeilRechts.jpeg" style="width:30px;height:30px;">
|
||||||
|
<b>Schichten Anzeigen/Löschen</b>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr onclick="window.location.href='AdminAlleSchichten.php';">
|
<tr onclick="window.location.href='AdminAlleSchichten.php';">
|
||||||
<td><img src="Bilder/dot.png" width="30px" height="2px"><img src="Bilder/PfeilRechts.jpeg" style="width:30px;height:30px;"><b> Schichten Hinzufügen</b></td>
|
<td>
|
||||||
|
<img src="Bilder/dot.png" width="30px" height="2px">
|
||||||
|
<img src="Bilder/PfeilRechts.jpeg" style="width:30px;height:30px;">
|
||||||
|
<b> Schichten Hinzufügen</b>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!--</table></td> </tr> inner table for indent end-->
|
<!--</table></td> </tr> inner table for indent end-->
|
||||||
<!--<tr><th>Weiteres</th></tr>-->
|
<!--<tr><th>Weiteres</th></tr>-->
|
||||||
|
|
@ -115,8 +140,12 @@ while ($zeile = mysqli_fetch_array($db_erg, MYSQLI_ASSOC)) {
|
||||||
<td > <img src="Bilder/More.jpeg" style="width:30px;height:30px;"> <b>Ausdrucke</b> </td>
|
<td > <img src="Bilder/More.jpeg" style="width:30px;height:30px;"> <b>Ausdrucke</b> </td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<p> <img src="Bilder/Info.jpeg" width="25px" height="25px"> Dienst: z.B. Badgekontrolle Eingang A. Schicht: ein Dienst zu einer bestimmten Zeit zB 9-12 Uhr
|
<p>
|
||||||
|
<img src="Bilder/Info.jpeg" width="25px" height="25px">
|
||||||
|
Dienst: z.B. Badgekontrolle Eingang A. Schicht: ein Dienst zu einer bestimmten Zeit zB 9-12 Uhr
|
||||||
</p>
|
</p>
|
||||||
<button class=back name="BackHelferdaten" value="1" onclick="window.location.href = 'index.php';"><b>↩</b></button>
|
<button class=back name="BackHelferdaten" value="1" onclick="window.location.href = 'index.php';">
|
||||||
|
<b>↩</b>
|
||||||
|
</button>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,10 @@ if ($AdminStatus != 1) {
|
||||||
<head>
|
<head>
|
||||||
<title>Helfer Drop am See Alle Schichten</title>
|
<title>Helfer Drop am See Alle Schichten</title>
|
||||||
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="css/style_desktop.css" media="screen and (min-width:781px)"/>
|
<link rel="stylesheet" href="css/style_desktop.css" media="screen and (min-width:781px)"/>
|
||||||
<link rel="stylesheet" href="css/style_mobile.css" media="screen and (max-width:780px)"/>
|
<link rel="stylesheet" href="css/style_mobile.css" media="screen and (max-width:780px)"/>
|
||||||
<meta name="viewport" content="width=480" />
|
<meta name="viewport" content="width=480" />
|
||||||
|
|
||||||
<script src="js/jquery-3.7.1.min.js" type="text/javascript"></script>
|
<script src="js/jquery-3.7.1.min.js" type="text/javascript"></script>
|
||||||
<script src="js/helferdb.js" type="text/javascript"></script>
|
<script src="js/helferdb.js" type="text/javascript"></script>
|
||||||
<script> collapse_table_rows();
|
<script> collapse_table_rows();
|
||||||
|
|
@ -140,18 +140,13 @@ while ($zeile = mysqli_fetch_array($db_erg, MYSQLI_ASSOC)) {
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
if (isset($_POST['plusschicht'])) {
|
if (isset($_POST['plusschicht'])) {
|
||||||
$messages = [];
|
$messages = [];
|
||||||
$SchichtId = $_POST['plusschicht'];
|
$SchichtID = $_POST['plusschicht'];
|
||||||
|
// Nutzer hat hier zuletzt etwas geändert und wir klappen das deshalb auf,
|
||||||
// Eingaben überprüfen:
|
// indem wir unten target=active setzen
|
||||||
|
$_SESSION["SchichtIdAktiv"] = $SchichtID;
|
||||||
// if(!preg_match('/^[a-zA-Z]+[a-zA-Z0-9._]+$/', $HelferName)) {
|
|
||||||
// $messages[] = 'Bitte prüfen Sie die eingegebenen Namen';
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
if (empty($messages)) {
|
if (empty($messages)) {
|
||||||
// Helfer Schicht zuweisen
|
// Helfer Schicht zuweisen
|
||||||
$db_erg = HelferSchichtZuweisen($db_link, $AliasHelferID, $SchichtId, $AdminID);
|
$db_erg = HelferSchichtZuweisen($db_link, $AliasHelferID, $SchichtID, $AdminID);
|
||||||
|
|
||||||
// Erfolg vermelden und Skript beenden, damit Formular nicht erneut ausgegeben wird
|
// Erfolg vermelden und Skript beenden, damit Formular nicht erneut ausgegeben wird
|
||||||
$HelferName = '';
|
$HelferName = '';
|
||||||
|
|
@ -197,7 +192,7 @@ if (isset($_POST['minusschicht'])) {
|
||||||
$db_erg = SchichtenSummeEinesHelfers($db_link, $AliasHelferID);
|
$db_erg = SchichtenSummeEinesHelfers($db_link, $AliasHelferID);
|
||||||
$zeile = mysqli_fetch_array($db_erg, MYSQLI_ASSOC);
|
$zeile = mysqli_fetch_array($db_erg, MYSQLI_ASSOC);
|
||||||
|
|
||||||
echo '<table id="customers"><tr class="header"><th onclick="window.location.href=\'AdminMeineSchichten.php\'">';
|
echo '<table class="commontable"><tr class="header"><th onclick="window.location.href=\'AdminMeineSchichten.php\'">';
|
||||||
echo " Dienstplan von $HelferName (Zusammenfassung)<br>";
|
echo " Dienstplan von $HelferName (Zusammenfassung)<br>";
|
||||||
echo $zeile['Anzahl'];
|
echo $zeile['Anzahl'];
|
||||||
echo " Schichten insgesamt ";
|
echo " Schichten insgesamt ";
|
||||||
|
|
@ -266,7 +261,7 @@ if ($addschicht != '0') {
|
||||||
|
|
||||||
|
|
||||||
//echo "<p><button name='addschicht' value='0'><b>↩</b></button></p>";
|
//echo "<p><button name='addschicht' value='0'><b>↩</b></button></p>";
|
||||||
echo '<table id="customers">';
|
echo '<table class="commontable">';
|
||||||
echo "<thead>";
|
echo "<thead>";
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo "</tr><th colspan='7'>" . "Alle Schichten der Con (" . $iBelegteSchichtenCount . "/" . $iAlleSchichtenCount . ")</th></tr>";
|
echo "</tr><th colspan='7'>" . "Alle Schichten der Con (" . $iBelegteSchichtenCount . "/" . $iAlleSchichtenCount . ")</th></tr>";
|
||||||
|
|
@ -333,7 +328,7 @@ if ($addschicht != '0') {
|
||||||
//print_r($MeineDienste);
|
//print_r($MeineDienste);
|
||||||
|
|
||||||
echo '</table>';
|
echo '</table>';
|
||||||
echo '<table id="customers">';
|
echo '<table class="commontable collapsible">';
|
||||||
|
|
||||||
while ($zeile = mysqli_fetch_array($db_erg, MYSQLI_ASSOC)) {
|
while ($zeile = mysqli_fetch_array($db_erg, MYSQLI_ASSOC)) {
|
||||||
if ($dienstsort == '1') {
|
if ($dienstsort == '1') {
|
||||||
|
|
@ -385,6 +380,9 @@ if ($addschicht != '0') {
|
||||||
$rowstyle = 'style="dummy:' . $zeile['SchichtID'] . '"';
|
$rowstyle = 'style="dummy:' . $zeile['SchichtID'] . '"';
|
||||||
$regtext = '';
|
$regtext = '';
|
||||||
}
|
}
|
||||||
|
if ($_SESSION["SchichtIdAktiv"] == $zeile['SchichtID']) {
|
||||||
|
$rowstyle = $rowstyle . " target='active' "; // dont collapse when the user did something
|
||||||
|
}
|
||||||
|
|
||||||
echo '<tr ' . $rowstyle . 'onclick="window.location.href=\'DetailsSchichten.php?InfoAlleSchichtID=' . $zeile['SchichtID'] . '#Info\';" >';
|
echo '<tr ' . $rowstyle . 'onclick="window.location.href=\'DetailsSchichten.php?InfoAlleSchichtID=' . $zeile['SchichtID'] . '#Info\';" >';
|
||||||
|
|
||||||
|
|
@ -399,7 +397,7 @@ if ($addschicht != '0') {
|
||||||
echo "" . $zeile['Soll'] . "</td>";
|
echo "" . $zeile['Soll'] . "</td>";
|
||||||
// buttons sind in der selben Zelle
|
// buttons sind in der selben Zelle
|
||||||
echo "<td width='30px'>" . "<button width='20px' name='plusschicht' value='" . $zeile['SchichtID'] . "'>+</button>" . "";
|
echo "<td width='30px'>" . "<button width='20px' name='plusschicht' value='" . $zeile['SchichtID'] . "'>+</button>" . "";
|
||||||
echo "" . " <button width='120px' name='minusschicht' value='" . $zeile['SchichtID'] . "'>–</button> $regtext" . "</td>";
|
echo " <button width='120px' name='minusschicht' value='" . $zeile['SchichtID'] . "'>–</button> $regtext" . "</td>";
|
||||||
//echo "<td>$regtext</td>";
|
//echo "<td>$regtext</td>";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ echo "<br><br><table class='commontable' style='page-break-before:always'>";
|
||||||
<th><button name="BackHelferdaten" value="1" onclick="window.location.href = 'Admin.php';"><b>↩</b></button> <b>Übersicht Helfer und Ihre Schichten</b></th>
|
<th><button name="BackHelferdaten" value="1" onclick="window.location.href = 'Admin.php';"><b>↩</b></button> <b>Übersicht Helfer und Ihre Schichten</b></th>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<table class="commontable">
|
<table class="commontable collapsible">
|
||||||
<?php
|
<?php
|
||||||
$db_erg = AlleHelferSchichtenUebersicht($db_link);
|
$db_erg = AlleHelferSchichtenUebersicht($db_link);
|
||||||
$dauer = 0;
|
$dauer = 0;
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ if (isset($_GET['ZeitBereich'])) {
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<form method="post" action="AlleSchichten.php#Info">
|
<form method="post" action="AlleSchichten.php">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -112,24 +112,17 @@ if (isset($_GET['ZeitBereich'])) {
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
if (isset($_POST['plusschicht'])) {
|
if (isset($_POST['plusschicht'])) {
|
||||||
$messages = [];
|
$messages = [];
|
||||||
$SchichtId = $_POST['plusschicht'];
|
$SchichtID = $_POST['plusschicht'];
|
||||||
|
// Nutzer hat hier zuletzt etwas geändert und wir klappen das deshalb auf,
|
||||||
// Eingaben überprüfen:
|
// indem wir unten target=active setzen
|
||||||
|
$_SESSION["SchichtIdAktiv"] = $SchichtID;
|
||||||
// if(!preg_match('/^[a-zA-Z]+[a-zA-Z0-9._]+$/', $HelferName)) {
|
|
||||||
// $messages[] = 'Bitte prüfen Sie die eingegebenen Namen';
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
if (empty($messages)) {
|
if (empty($messages)) {
|
||||||
// Helfer Schicht zuweisen
|
// Helfer Schicht zuweisen
|
||||||
$db_erg = HelferSchichtZuweisen($db_link, $HelferID, $SchichtId);
|
$db_erg = HelferSchichtZuweisen($db_link, $HelferID, $SchichtID);
|
||||||
|
|
||||||
// Erfolg vermelden und Skript beenden, damit Formular nicht erneut ausgegeben wird
|
|
||||||
$HelferName = '';
|
$HelferName = '';
|
||||||
$HelferEmail = '';
|
$HelferEmail = '';
|
||||||
$HelferHandy = '';
|
$HelferHandy = '';
|
||||||
//die('<div class="Helfer wurde angelegt.</div>');
|
|
||||||
} else {
|
} else {
|
||||||
// Fehlermeldungen ausgeben:
|
// Fehlermeldungen ausgeben:
|
||||||
echo '<div class="error"><ul>';
|
echo '<div class="error"><ul>';
|
||||||
|
|
@ -145,6 +138,8 @@ if (isset($_POST['minusschicht'])) {
|
||||||
$messages = [];
|
$messages = [];
|
||||||
|
|
||||||
$SchichtID = $_POST['minusschicht'];
|
$SchichtID = $_POST['minusschicht'];
|
||||||
|
// Nutzer hat hier zuletzt etwas geaenndert und wir klappen das deshalb auf:
|
||||||
|
$_SESSION["SchichtIdAktiv"] = $SchichtID;
|
||||||
|
|
||||||
if (empty($messages)) {
|
if (empty($messages)) {
|
||||||
// Helfer aus Schicht entfernen
|
// Helfer aus Schicht entfernen
|
||||||
|
|
@ -169,6 +164,7 @@ if (isset($_POST['minusschicht'])) {
|
||||||
$db_erg = SchichtenSummeEinesHelfers($db_link, $HelferID);
|
$db_erg = SchichtenSummeEinesHelfers($db_link, $HelferID);
|
||||||
$zeile = mysqli_fetch_array($db_erg, MYSQLI_ASSOC);
|
$zeile = mysqli_fetch_array($db_erg, MYSQLI_ASSOC);
|
||||||
|
|
||||||
|
//"Mein Dienstplan"
|
||||||
echo '<table class="commontable"><tr class="header"><th onclick="window.location.href=\'MeineSchichten.php\'">';
|
echo '<table class="commontable"><tr class="header"><th onclick="window.location.href=\'MeineSchichten.php\'">';
|
||||||
echo '<img src="Bilder/PfeilRechts2.png" style="width:30px;height:30px;align:middle;">' . " Mein Dienstplan (";
|
echo '<img src="Bilder/PfeilRechts2.png" style="width:30px;height:30px;align:middle;">' . " Mein Dienstplan (";
|
||||||
echo $zeile['Anzahl'];
|
echo $zeile['Anzahl'];
|
||||||
|
|
@ -206,7 +202,6 @@ if ($addschicht == '0') {
|
||||||
echo "<button name='addschicht' value='2'>Dienste</button></p>";
|
echo "<button name='addschicht' value='2'>Dienste</button></p>";
|
||||||
}
|
}
|
||||||
|
|
||||||
//echo "InfoAlleSchichtID ".$InfoAlleSchichtID;
|
|
||||||
|
|
||||||
if ($addschicht != '0') {
|
if ($addschicht != '0') {
|
||||||
//$db_erg = AlleSchichten($db_link,$dienstsort);
|
//$db_erg = AlleSchichten($db_link,$dienstsort);
|
||||||
|
|
@ -237,21 +232,11 @@ if ($addschicht != '0') {
|
||||||
$iBelegteSchichtenCount = AlleBelegteSchichtenCount($db_link);
|
$iBelegteSchichtenCount = AlleBelegteSchichtenCount($db_link);
|
||||||
echo "<button type='button' onclick='expand_all_table_rows();'>Alles Ausklappen</button>";
|
echo "<button type='button' onclick='expand_all_table_rows();'>Alles Ausklappen</button>";
|
||||||
|
|
||||||
//echo "<p><button name='addschicht' value='0'><b>↩</b></button></p>";
|
// "Alle Schichten der Con"
|
||||||
echo '<table id="customers">';
|
echo '<table class="commontable">';
|
||||||
echo "<tr class='header'>";
|
echo "<tr class='header'>";
|
||||||
echo "<th colspan='7'>" . "Alle Schichten der Con (" . $iBelegteSchichtenCount . "/" . $iAlleSchichtenCount . ")</th></tr>";
|
echo "<th colspan='7'>Alle Schichten der Con (" . $iBelegteSchichtenCount . "/" . $iAlleSchichtenCount . ")</th></tr>";
|
||||||
|
|
||||||
/*
|
|
||||||
if ($dienstsort=='1')
|
|
||||||
{
|
|
||||||
echo "<th>". "Dienst" . "</th>";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
echo "<th>". "Von" . "</th>";
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
echo "<tr class='header'>"; // Zeitbereich tr
|
echo "<tr class='header'>"; // Zeitbereich tr
|
||||||
if ($ZeitBereich == 1) {
|
if ($ZeitBereich == 1) {
|
||||||
echo "<th style='width:100px; background-color:#0000FF' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=1\"'>" . "Alle" . "</th>";
|
echo "<th style='width:100px; background-color:#0000FF' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=1\"'>" . "Alle" . "</th>";
|
||||||
|
|
@ -298,7 +283,8 @@ if ($addschicht != '0') {
|
||||||
//print_r($MeineDienste);
|
//print_r($MeineDienste);
|
||||||
|
|
||||||
echo '</table>';
|
echo '</table>';
|
||||||
echo '<table id="customers">';
|
// Tabelle mit allen Diensten und Schichten
|
||||||
|
echo '<table class="commontable collapsible">';
|
||||||
while ($zeile = mysqli_fetch_array($db_erg, MYSQLI_ASSOC)) {
|
while ($zeile = mysqli_fetch_array($db_erg, MYSQLI_ASSOC)) {
|
||||||
if ($dienstsort == '1') {
|
if ($dienstsort == '1') {
|
||||||
$Tag = $zeile['Tag'];
|
$Tag = $zeile['Tag'];
|
||||||
|
|
@ -313,7 +299,8 @@ if ($addschicht != '0') {
|
||||||
$Was = $zeile['Was'];
|
$Was = $zeile['Was'];
|
||||||
|
|
||||||
if ($Was != $OldWas) {
|
if ($Was != $OldWas) {
|
||||||
echo "<tr class='header'><th colspan='7' style='width:100%'>";
|
// + in <span> becomes - when rows are opened
|
||||||
|
echo "<tr class='header'><th colspan='7' style='width:100%'><span>+</span> ";
|
||||||
echo $Was;
|
echo $Was;
|
||||||
echo "</th>";
|
echo "</th>";
|
||||||
/*
|
/*
|
||||||
|
|
@ -349,6 +336,9 @@ if ($addschicht != '0') {
|
||||||
$rowstyle = 'dbinfo="SchichtID:' . $zeile['SchichtID'] . ';helferlvl:' . $HelferLevel . '" ';
|
$rowstyle = 'dbinfo="SchichtID:' . $zeile['SchichtID'] . ';helferlvl:' . $HelferLevel . '" ';
|
||||||
$regtext = '';
|
$regtext = '';
|
||||||
}
|
}
|
||||||
|
if ($_SESSION["SchichtIdAktiv"] == $zeile['SchichtID']) {
|
||||||
|
$rowstyle = $rowstyle . " target='active' "; // dont collapse when the user did something
|
||||||
|
}
|
||||||
|
|
||||||
echo '<tr ' . $rowstyle . 'onclick="window.location.href=\'DetailsSchichten.php?InfoAlleSchichtID=' . $zeile['SchichtID'] . '#Info\';" >';
|
echo '<tr ' . $rowstyle . 'onclick="window.location.href=\'DetailsSchichten.php?InfoAlleSchichtID=' . $zeile['SchichtID'] . '#Info\';" >';
|
||||||
|
|
||||||
|
|
@ -363,8 +353,7 @@ if ($addschicht != '0') {
|
||||||
echo "" . $zeile['Soll'] . "</td>";
|
echo "" . $zeile['Soll'] . "</td>";
|
||||||
// buttons sind in der selben Zelle
|
// buttons sind in der selben Zelle
|
||||||
echo "<td width='30px'>" . "<button width='20px' name='plusschicht' value='" . $zeile['SchichtID'] . "'>+</button>" . "";
|
echo "<td width='30px'>" . "<button width='20px' name='plusschicht' value='" . $zeile['SchichtID'] . "'>+</button>" . "";
|
||||||
echo "" . " <button width='120px' name='minusschicht' value='" . $zeile['SchichtID'] . "'>–</button> $regtext" . "</td>";
|
echo " <button width='120px' name='minusschicht' value='" . $zeile['SchichtID'] . "'>–</button> $regtext" . "</td>";
|
||||||
//echo "<td>$regtext</td>";
|
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
}
|
}
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ while ($zeile = mysqli_fetch_array($db_erg, MYSQLI_ASSOC)) {
|
||||||
</tr>
|
</tr>
|
||||||
<tr onclick="window.location.href='TeilnehmerSchichtenAusdruck.php';">
|
<tr onclick="window.location.href='TeilnehmerSchichtenAusdruck.php';">
|
||||||
<td > <img src="Bilder/More.jpeg" style="width:30px;height:30px;"> <b>Ausdruck Schichten(I)</b> </td> </tr>
|
<td > <img src="Bilder/More.jpeg" style="width:30px;height:30px;"> <b>Ausdruck Schichten(I)</b> </td> </tr>
|
||||||
<tr onclick="window.location.href='TeilnehmerSchichtenAusdruck.php';">
|
<tr onclick="window.location.href='TeilnehmerSchichtenAusdruck2.php';">
|
||||||
<td > <img src="Bilder/More.jpeg" style="width:30px;height:30px;"> <b>Ausdruck Schichten(II)</b> </td> </tr>
|
<td > <img src="Bilder/More.jpeg" style="width:30px;height:30px;"> <b>Ausdruck Schichten(II)</b> </td> </tr>
|
||||||
</table>
|
</table>
|
||||||
<button class=back name="BackHelferdaten" value="1" onclick="window.location.href = 'Admin.php';"><b>↩</b></button>
|
<button class=back name="BackHelferdaten" value="1" onclick="window.location.href = 'Admin.php';"><b>↩</b></button>
|
||||||
|
|
|
||||||
|
|
@ -18,18 +18,18 @@
|
||||||
|
|
||||||
SESSION_START();
|
SESSION_START();
|
||||||
|
|
||||||
require_once ('konfiguration.php');
|
require_once('konfiguration.php');
|
||||||
//require_once ('SQL.php');
|
//require_once ('SQL.php');
|
||||||
include 'SQL.php';
|
include 'SQL.php';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$db_link = mysqli_connect (
|
$db_link = mysqli_connect(
|
||||||
MYSQL_HOST,
|
MYSQL_HOST,
|
||||||
MYSQL_BENUTZER,
|
MYSQL_BENUTZER,
|
||||||
MYSQL_KENNWORT,
|
MYSQL_KENNWORT,
|
||||||
MYSQL_DATENBANK
|
MYSQL_DATENBANK
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -39,52 +39,47 @@ $db_link = mysqli_connect (
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(isset($_GET['InfoAlleSchichtID']))
|
if (isset($_GET['InfoAlleSchichtID'])) {
|
||||||
{
|
$InfoAlleSchichtID = $_GET['InfoAlleSchichtID'];
|
||||||
$InfoAlleSchichtID = $_GET['InfoAlleSchichtID'];
|
unset($InfoMeineSchichtID);
|
||||||
UNSET($InfoMeineSchichtID);
|
//echo "<b>". $SchichtID . "</b><br>";
|
||||||
//echo "<b>". $SchichtID . "</b><br>";
|
|
||||||
|
|
||||||
$zeile = DetailSchicht($db_link,$InfoAlleSchichtID);
|
$zeile = DetailSchicht($db_link, $InfoAlleSchichtID);
|
||||||
|
|
||||||
$Was = $zeile['Was'];
|
$Was = $zeile['Was'];
|
||||||
$Wo = $zeile['Wo'];
|
$Wo = $zeile['Wo'];
|
||||||
$Dauer=$zeile['Dauer'];
|
$Dauer = $zeile['Dauer'];
|
||||||
$Leiter = $zeile['Name'];
|
$Leiter = $zeile['Name'];
|
||||||
$LeiterHandy = $zeile['Handy'];
|
$LeiterHandy = $zeile['Handy'];
|
||||||
$LeiterEmail = $zeile['Email'];
|
$LeiterEmail = $zeile['Email'];
|
||||||
$Info = $zeile['Info'];
|
$Info = $zeile['Info'];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Beteiligte Helfer Holen
|
// Beteiligte Helfer Holen
|
||||||
$db_erg = BeteiligteHelfer($db_link,$InfoAlleSchichtID);
|
$db_erg = BeteiligteHelfer($db_link, $InfoAlleSchichtID);
|
||||||
|
|
||||||
|
|
||||||
$x=0;
|
$x = 0;
|
||||||
|
|
||||||
while ($zeile = mysqli_fetch_array( $db_erg, MYSQLI_ASSOC))
|
|
||||||
{
|
|
||||||
$MitHelferID[$x] = $zeile['HelferID'];
|
|
||||||
$MitHelfer[$x] = $zeile['Name'];
|
|
||||||
$MitHelferHandy[$x]= $zeile['Handy'];
|
|
||||||
$x++;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
while ($zeile = mysqli_fetch_array($db_erg, MYSQLI_ASSOC)) {
|
||||||
|
$MitHelferID[$x] = $zeile['HelferID'];
|
||||||
|
$MitHelfer[$x] = $zeile['Name'];
|
||||||
|
$MitHelferHandy[$x] = $zeile['Handy'];
|
||||||
|
$x++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$HelferID = $_SESSION["HelferID"];
|
$HelferID = $_SESSION["HelferID"];
|
||||||
$AdminID = $_SESSION["AdminID"];
|
$AdminID = $_SESSION["AdminID"];
|
||||||
|
|
||||||
if(isset($_POST['HelferID']))
|
if (isset($_POST['HelferID'])) {
|
||||||
{
|
$HelferID = $_POST['HelferID'];
|
||||||
$HelferID = $_POST['HelferID'];
|
}
|
||||||
|
if (isset($_POST['ShowHelfer'])) {
|
||||||
|
$HelferID = $_POST['HelperSearch'];
|
||||||
}
|
}
|
||||||
if(isset($_POST['ShowHelfer'])) {
|
|
||||||
$HelferID=$_POST['HelperSearch'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$_SESSION["HelferID"] = $HelferID;
|
$_SESSION["HelferID"] = $HelferID;
|
||||||
|
|
||||||
|
|
@ -131,33 +126,32 @@ echo '<table id="customers">';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo "<th>".$Was."</th>";
|
echo "<th>" . $Was . "</th>";
|
||||||
echo "<tr><td>";
|
echo "<tr><td>";
|
||||||
|
|
||||||
//echo "<p><button name='Del' value='CloseInfo'><b>↩</b></button><br>";
|
//echo "<p><button name='Del' value='CloseInfo'><b>↩</b></button><br>";
|
||||||
echo "<b>Beschreibung:</b><br>";
|
echo "<b>Beschreibung:</b><br>";
|
||||||
echo $Info . "<br><br>";
|
echo $Info . "<br><br>";
|
||||||
echo "<b>Ort:</b><br>". $Wo . "<br><br>";
|
echo "<b>Ort:</b><br>" . $Wo . "<br><br>";
|
||||||
echo "<b>Dauer:</b><br>". $Dauer . "<br><br>";
|
echo "<b>Dauer:</b><br>" . $Dauer . "<br><br>";
|
||||||
echo "<b>Ansprechparter:</b><br>". $Leiter .", ";
|
echo "<b>Ansprechparter:</b><br>" . $Leiter . ", ";
|
||||||
echo $LeiterHandy.", ";
|
echo $LeiterHandy . ", ";
|
||||||
echo $LeiterEmail . "<br><br>";
|
echo $LeiterEmail . "<br><br>";
|
||||||
echo "<b>Helfer der Schicht:</b><br>";
|
echo "<b>Helfer der Schicht:</b><br>";
|
||||||
$x=0;
|
$x = 0;
|
||||||
$arrayLength = count($MitHelfer);
|
$arrayLength = count($MitHelfer);
|
||||||
while ($x<$arrayLength)
|
while ($x < $arrayLength) {
|
||||||
{
|
echo "ID:" . $MitHelferID[$x] . ", ";
|
||||||
echo "ID:".$MitHelferID[$x].", ";
|
echo $MitHelfer[$x] . ", ";
|
||||||
echo $MitHelfer[$x].", ";
|
echo $MitHelferHandy[$x] . "<br>";
|
||||||
echo $MitHelferHandy[$x]."<br>";
|
$x++;
|
||||||
$x++;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
echo "</td></tr>\n";
|
echo "</td></tr>\n";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -167,7 +161,7 @@ echo '<table id="customers">';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mysqli_free_result( $db_erg );
|
mysqli_free_result($db_erg);
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,6 @@ if (isset($_GET['ZeitBereich'])) {
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<!--form method="post" action="AlleSchichtenAusdruck.php#Info"-->
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -176,7 +175,8 @@ $iBelegteSchichtenCount = AlleBelegteSchichtenCount($db_link);
|
||||||
//echo "<p><button name='addschicht' value='0'><b>↩</b></button></p>";
|
//echo "<p><button name='addschicht' value='0'><b>↩</b></button></p>";
|
||||||
echo '<table class="commontable">';
|
echo '<table class="commontable">';
|
||||||
echo "<tr class='header'>";
|
echo "<tr class='header'>";
|
||||||
echo "<th colspan='7'>" . "Alle Schichten der Con (" . $iBelegteSchichtenCount . "/" . $iAlleSchichtenCount . ")</th></tr>";
|
echo "<th colspan='7'>" . "Alle Schichten der Con (";
|
||||||
|
echo $iBelegteSchichtenCount . "/" . $iAlleSchichtenCount . ")</th></tr>";
|
||||||
|
|
||||||
echo "\n<tr class='header'>\n"; // Zeitbereich tr
|
echo "\n<tr class='header'>\n"; // Zeitbereich tr
|
||||||
|
|
||||||
|
|
@ -227,7 +227,9 @@ foreach ($ZeitBereichWerte as &$EinZeitBereich) {
|
||||||
//$Text="$Text <br>$MeinVon $MeinBis"; // debug time strings
|
//$Text="$Text <br>$MeinVon $MeinBis"; // debug time strings
|
||||||
|
|
||||||
// write the field for each day
|
// write the field for each day
|
||||||
echo "<th style='width:{$ZeitBereichFeldBreite}%; $color' onclick='window.location.href=\"AlleSchichtenAusdruck.php?ZeitBereich={$EinZeitBereich}\";'>" . "$Text" . "</th>\n";
|
echo "<th style='width:{$ZeitBereichFeldBreite}%; $color' ";
|
||||||
|
echo "onclick='window.location.href=\"TeilnehmerSchichtenAusdruck.php?ZeitBereich={$EinZeitBereich}\";'>";
|
||||||
|
echo "$Text" . "</th>\n";
|
||||||
}
|
}
|
||||||
echo "</tr>"; //Zeitbereich tr
|
echo "</tr>"; //Zeitbereich tr
|
||||||
|
|
||||||
|
|
@ -242,13 +244,16 @@ $MeineDienste = SchichtIdArrayEinesHelfers($db_link, $HelferID);
|
||||||
|
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
|
|
||||||
// Table to print out the shifts for people to enter their name in. If a shift is already taken, the name is printed out.
|
// Table to print out the shifts for people to enter their name in.
|
||||||
|
// If a shift is already taken, the name is printed out.
|
||||||
// The table prints just one day, specified via Zeitbereich. The heading above wrote out the day.
|
// The table prints just one day, specified via Zeitbereich. The heading above wrote out the day.
|
||||||
// the table is sorted by shift type (Was) first and then by time (Ab).
|
// the table is sorted by shift type (Was) first and then by time (Ab).
|
||||||
// "Was" is printed in the middle together with two-letter day and time.
|
// "Was" is printed in the middle together with two-letter day and time.
|
||||||
// the first and the 5th (last) column also contain two-letter day and time for people to tear off and take with them.
|
// the first and the 5th (last) column also contain two-letter day and time for people to tear off and take with them.
|
||||||
// the 2nd and 4th column are for the namer. if the shift is already taken, the name is printed in, else the field is empty to write in.
|
// the 2nd and 4th column are for the name.
|
||||||
// we iterate over all tasks (Was) and then over Ist and Soll for each task, filling one field for each Ist or Soll and filling in the name in Ist and leave it empty if it is Soll.
|
// if the shift is already taken, the name is printed in, else the field is empty to write in.
|
||||||
|
// we iterate over all tasks (Was) and then over Ist and Soll for each task,
|
||||||
|
// filling one field for each Ist or Soll and filling in the name in Ist and leave it empty if it is Soll.
|
||||||
echo "<br>next table<br>\n";
|
echo "<br>next table<br>\n";
|
||||||
echo "<table class='commontable'>\n";
|
echo "<table class='commontable'>\n";
|
||||||
// $db_erg ist aus AlleSchichtenImZeitbereich
|
// $db_erg ist aus AlleSchichtenImZeitbereich
|
||||||
|
|
@ -269,7 +274,8 @@ while ($zeile = mysqli_fetch_array($db_erg, MYSQLI_ASSOC)) {
|
||||||
echo "<tr class='header'>";
|
echo "<tr class='header'>";
|
||||||
echo "<th colspan=5 style='text-align:center'>$Was ($TagKurz)</th></tr>\n";
|
echo "<th colspan=5 style='text-align:center'>$Was ($TagKurz)</th></tr>\n";
|
||||||
}
|
}
|
||||||
$db_erg_helfer = BeteiligteHelfer($db_link, $zeile['SchichtID']); // get the people who are already signed up for this shift
|
// get the people who are already signed up for this shift
|
||||||
|
$db_erg_helfer = BeteiligteHelfer($db_link, $zeile['SchichtID']);
|
||||||
// Wir geben zwei Helfer pro Zeile fuer die selbe Schicht aus
|
// Wir geben zwei Helfer pro Zeile fuer die selbe Schicht aus
|
||||||
while ($Soll > 0) {
|
while ($Soll > 0) {
|
||||||
$Soll = $Soll - 1;
|
$Soll = $Soll - 1;
|
||||||
|
|
|
||||||
|
|
@ -30,16 +30,21 @@ function collapse_table_rows()
|
||||||
{
|
{
|
||||||
$(document).ready(
|
$(document).ready(
|
||||||
function () {
|
function () {
|
||||||
$('tr:not(.header)').hide();
|
// Unter-Zeilen in collapsible Tabellen verbergen
|
||||||
|
$('table.collapsible tr:not(.header)').hide();
|
||||||
$('tr.header').click(
|
// Zeile mit dem target="active" (von PHP nach submit gesetzt) und dazugehoerige Zeilen anzeigen
|
||||||
|
$('table.collapsible tr[target="active"]').prevUntil('tr.header').addBack().nextUntil('tr.header').addBack().show();
|
||||||
|
// id="active" als Anker auf letztes tr.header vor der target=active Seite setzen und dort hin springen
|
||||||
|
// damit der Nutzer nach Abschicken des Posts seine geoeffneten Optionen sieht
|
||||||
|
$('table.collapsible tr[target="active"]').prevAll('.header').first().attr('id', 'active');
|
||||||
|
location.href = '#active';
|
||||||
|
$('table.collapsible tr.header').click(
|
||||||
function () {
|
function () {
|
||||||
$(this).find('span').text(
|
$(this).find('span').text(
|
||||||
function (_, value) {
|
function (_, value) {
|
||||||
return value == '-' ? '+' : '-'
|
return value == '-' ? '+' : '-'
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
$(this).nextUntil('tr.header').slideToggle(100, function () {});
|
$(this).nextUntil('tr.header').slideToggle(100, function () {});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
@ -50,6 +55,5 @@ function collapse_table_rows()
|
||||||
function expand_all_table_rows()
|
function expand_all_table_rows()
|
||||||
{
|
{
|
||||||
|
|
||||||
$('tr:not(.header)').hide(); // make all collapsed so that slideToggle doesnt close opened ones
|
$('tr:not(.header)').show();
|
||||||
$('tr:not(.header)').slideToggle(100, function () {});
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue