Merge pull request #20 from iridos/15-kalender-wird-für-normale-benutzer-gar-nicht-angezeigt
15 kalender wird fuer normale benutzer gar nicht angezeigt
This commit is contained in:
commit
1483af2b8c
|
|
@ -133,7 +133,7 @@ while ($zeile = mysqli_fetch_array($db_erg, MYSQLI_ASSOC)) {
|
|||
</tr>
|
||||
<!--</table></td> </tr> inner table for indent end-->
|
||||
<!--<tr><th>Weiteres</th></tr>-->
|
||||
<tr onclick="window.location.href='Kalender-all.html';">
|
||||
<tr onclick="window.location.href='Kalender-all.php';">
|
||||
<td><img src="Bilder/More.jpeg" style="width:30px;height:30px"><b> Admin Kalenderansicht</b> </td>
|
||||
</tr>
|
||||
<tr onclick="window.location.href='Ausdrucke.php';">
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ if (isset($_GET['InfoAlleSchichtID'])) {
|
|||
if (isset($_GET['ZeitBereich'])) {
|
||||
$ZeitBereich = $_GET['ZeitBereich'];
|
||||
} else {
|
||||
$ZeitBereich = 1;
|
||||
$ZeitBereich = 0;
|
||||
}
|
||||
|
||||
function HelferAuswahlButton($db_link, $AliasHelferID)
|
||||
|
|
@ -111,6 +111,7 @@ if (isset($_POST['AliasHelferID'])) {
|
|||
$AliasHelferID = $_SESSION["AliasHelferID"];
|
||||
} else {
|
||||
HelferAuswahlButton($db_link, $AliasHelferID);
|
||||
echo "<p>Erst Helfer auswählen</p>";
|
||||
exit;
|
||||
}
|
||||
HelferAuswahlButton($db_link, $AliasHelferID);
|
||||
|
|
@ -118,7 +119,7 @@ HelferAuswahlButton($db_link, $AliasHelferID);
|
|||
$_SESSION["AliasHelferID"] = $AliasHelferID;
|
||||
$AdminID = $_SESSION["AdminID"];
|
||||
|
||||
$db_erg = Helferdaten($db_link, $HelferID);
|
||||
$db_erg = Helferdaten($db_link, $AliasHelferID);
|
||||
while ($zeile = mysqli_fetch_array($db_erg, MYSQLI_ASSOC)) {
|
||||
$HelferName = $zeile['Name'];
|
||||
}
|
||||
|
|
@ -192,8 +193,9 @@ if (isset($_POST['minusschicht'])) {
|
|||
$db_erg = SchichtenSummeEinesHelfers($db_link, $AliasHelferID);
|
||||
$zeile = mysqli_fetch_array($db_erg, MYSQLI_ASSOC);
|
||||
|
||||
//"Dienstplan von"
|
||||
echo '<table class="commontable"><tr class="header"><th onclick="window.location.href=\'AdminMeineSchichten.php\'">';
|
||||
echo " Dienstplan von $HelferName (Zusammenfassung)<br>";
|
||||
echo '<img src="Bilder/PfeilRechts2.png" style="width:30px;height:30px;align:middle;">' . "Dienstplan von $HelferName: ";
|
||||
echo $zeile['Anzahl'];
|
||||
echo " Schichten insgesamt ";
|
||||
echo $zeile['Dauer'] / 3600;
|
||||
|
|
@ -232,94 +234,24 @@ if ($addschicht == '0') {
|
|||
//echo "InfoAlleSchichtID ".$InfoAlleSchichtID;
|
||||
|
||||
if ($addschicht != '0') {
|
||||
//$db_erg = AlleSchichten($db_link,$dienstsort);
|
||||
//$db_erg = AlleSchichtenImZeitbereich($db_link,"2023-05-18 00:00:00","2023-05-19 00:00:00");
|
||||
if ($ZeitBereich == 1) { // Alle
|
||||
$db_erg = AlleSchichtenImZeitbereich($db_link, "2000-05-18 00:00:00", "2200-05-19 00:00:00", -1);
|
||||
}
|
||||
if ($ZeitBereich == 2) { // Davor
|
||||
$db_erg = AlleSchichtenImZeitbereich($db_link, "2000-05-18 00:00:00", "2023-05-18 00:00:00", -1);
|
||||
}
|
||||
if ($ZeitBereich == 3) { // Do
|
||||
$db_erg = AlleSchichtenImZeitbereich($db_link, "2023-05-18 00:00:00", "2023-05-19 00:00:00", -1);
|
||||
}
|
||||
if ($ZeitBereich == 4) { // Fr
|
||||
$db_erg = AlleSchichtenImZeitbereich($db_link, "2023-05-19 00:00:00", "2023-05-20 00:00:00", -1);
|
||||
}
|
||||
if ($ZeitBereich == 5) { // Sa
|
||||
$db_erg = AlleSchichtenImZeitbereich($db_link, "2023-05-20 00:00:00", "2023-05-21 00:00:00", -1);
|
||||
}
|
||||
if ($ZeitBereich == 6) { // So
|
||||
$db_erg = AlleSchichtenImZeitbereich($db_link, "2023-05-21 00:00:00", "2023-05-22 00:00:00", -1);
|
||||
}
|
||||
if ($ZeitBereich == 7) { // Danach
|
||||
$db_erg = AlleSchichtenImZeitbereich($db_link, "2023-05-22 00:00:00", "2223-05-22 00:00:00", -1);
|
||||
}
|
||||
echo '<table class="commontable">';
|
||||
require('_zeitbereich.php');
|
||||
$Bereich = AusgabeZeitbereichZeile($start_date, $ZeitBereich, $TageNamenDeutsch, "AdminAlleSchichten.php");
|
||||
$MeinVon = $Bereich['MeinVon'];
|
||||
$MeinBis = $Bereich['MeinBis'];
|
||||
$db_erg = AlleSchichtenImZeitbereich($db_link, $MeinVon, $MeinBis, -1);
|
||||
|
||||
// fuer Anzahlanzeige in Ueberschrift
|
||||
$iAlleSchichtenCount = AlleSchichtenCount($db_link);
|
||||
$iBelegteSchichtenCount = AlleBelegteSchichtenCount($db_link);
|
||||
|
||||
echo '</table>';
|
||||
|
||||
//echo "<p><button name='addschicht' value='0'><b>↩</b></button></p>";
|
||||
echo '<table class="commontable">';
|
||||
echo "<thead>";
|
||||
echo "<tr>";
|
||||
echo "</tr><th colspan='7'>" . "Alle Schichten der Con (" . $iBelegteSchichtenCount . "/" . $iAlleSchichtenCount . ")</th></tr>";
|
||||
|
||||
/*
|
||||
if ($dienstsort=='1')
|
||||
{
|
||||
echo "<th>". "Dienst" . "</th>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<th>". "Von" . "</th>";
|
||||
}
|
||||
*/
|
||||
if ($ZeitBereich == 1) {
|
||||
echo "<th style='width:100px; background-color:#0000FF' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=1\"'>" . "Alle" . "</th>";
|
||||
} else {
|
||||
echo "<th style='width:100px' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=1\"'>" . "Alle" . "</th>";
|
||||
}
|
||||
if ($ZeitBereich == 2) {
|
||||
echo "<th style='width:100px; background-color:#0000FF' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=2\"'>" . "Davor" . "</th>";
|
||||
} else {
|
||||
echo "<th style='width:100px' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=2\"'>" . "Davor" . "</th>";
|
||||
}
|
||||
if ($ZeitBereich == 3) {
|
||||
echo "<th style='width:50px; background-color:#0000FF' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=3\"'>" . "Do" . "</th>";
|
||||
} else {
|
||||
echo "<th style='width:50px' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=3\"'>" . "Do" . "</th>";
|
||||
}
|
||||
if ($ZeitBereich == 4) {
|
||||
echo "<th style='width:50px; background-color:#0000FF' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=4\"'>" . "Fr" . "</th>";
|
||||
} else {
|
||||
echo "<th style='width:50px' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=4\"'>" . "Fr" . "</th>";
|
||||
}
|
||||
if ($ZeitBereich == 5) {
|
||||
echo "<th style='width:50px; background-color:#0000FF' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=5\"'>" . "Sa" . "</th>";
|
||||
} else {
|
||||
echo "<th style='width:50px' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=5\"'>" . "Sa" . "</th>";
|
||||
}
|
||||
if ($ZeitBereich == 6) {
|
||||
echo "<th style='width:50px; background-color:#0000FF' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=6\"'>" . "So" . "</th>";
|
||||
} else {
|
||||
echo "<th style='width:50px' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=6\"'>" . "So" . "</th>";
|
||||
}
|
||||
if ($ZeitBereich == 7) {
|
||||
echo "<th style='width:100px; background-color:#0000FF' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=7\"'>" . "Danach" . "</th>";
|
||||
} else {
|
||||
echo "<th style='width:100px' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=7\"'>" . "Danach" . "</th>";
|
||||
}
|
||||
//echo "<th style='width:100px' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=2\"'>". "Davor" . "</th>";
|
||||
//echo "<th style='width:50px'>". "Do" . "</th>";
|
||||
//echo "<th style='width:50px'>". "Fr" . "</th>";
|
||||
//echo "<th style='width:50px'>". "Sa" . "</th>";
|
||||
//echo "<th style='width:50px'>". "So" . "</th>";
|
||||
//echo "<th style='width:100px'>". "Danach" . "</th>";
|
||||
echo "<tr class='header'>";
|
||||
echo "<th colspan='7'>Alle Schichten der Con (" . $iBelegteSchichtenCount . "/" . $iAlleSchichtenCount . ")</th></tr>";
|
||||
|
||||
echo "</tr>";
|
||||
echo "</thead>";
|
||||
|
||||
$OldTag = "";
|
||||
$OldWas = "";
|
||||
|
|
@ -344,7 +276,8 @@ if ($addschicht != '0') {
|
|||
$Was = $zeile['Was'];
|
||||
|
||||
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 "</th>";
|
||||
/*
|
||||
|
|
@ -377,7 +310,7 @@ if ($addschicht != '0') {
|
|||
$regtext = 'Meine!';
|
||||
} else {
|
||||
// dummy-style, um SchichtID unsichtbar im Tag anzuzeigen
|
||||
$rowstyle = 'style="dummy:' . $zeile['SchichtID'] . '"';
|
||||
$rowstyle = 'dbinfo="SchichtID:' . $zeile['SchichtID'] . ';helferlvl:' . $HelferLevel . '" ';
|
||||
$regtext = '';
|
||||
}
|
||||
if ($_SESSION["SchichtIdAktiv"] == $zeile['SchichtID']) {
|
||||
|
|
@ -398,7 +331,6 @@ if ($addschicht != '0') {
|
|||
// buttons sind in der selben Zelle
|
||||
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 "<td>$regtext</td>";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
echo "</table>";
|
||||
|
|
@ -414,9 +346,9 @@ mysqli_free_result($db_erg);
|
|||
|
||||
|
||||
?>
|
||||
|
||||
</form>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ if (isset($_GET['InfoAlleSchichtID'])) {
|
|||
if (isset($_GET['ZeitBereich'])) {
|
||||
$ZeitBereich = $_GET['ZeitBereich'];
|
||||
} else {
|
||||
$ZeitBereich = 1;
|
||||
$ZeitBereich = 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -134,15 +134,15 @@ if (isset($_POST['minusschicht'])) {
|
|||
$_SESSION["SchichtIdAktiv"] = $SchichtID;
|
||||
|
||||
if (empty($messages)) {
|
||||
// Helfer aus Schicht entfernen
|
||||
$db_erg = HelferVonSchichtLoeschen_SchichtID($db_link, $HelferID, $SchichtID);
|
||||
// Helfer aus Schicht entfernen
|
||||
$db_erg = HelferVonSchichtLoeschen_SchichtID($db_link, $HelferID, $SchichtID);
|
||||
} else {
|
||||
// Fehlermeldungen ausgeben:
|
||||
echo '<div class="error"><ul>';
|
||||
// Fehlermeldungen ausgeben:
|
||||
echo '<div class="error"><ul>';
|
||||
foreach ($messages as $message) {
|
||||
echo '<li>' . htmlspecialchars($message) . '</li>';
|
||||
}
|
||||
echo '</ul></div>';
|
||||
echo '</ul></div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -157,7 +157,7 @@ if (isset($_POST['minusschicht'])) {
|
|||
$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 $zeile['Anzahl'];
|
||||
echo " Schichten, ";
|
||||
|
|
@ -196,32 +196,17 @@ if ($addschicht == '0') {
|
|||
|
||||
|
||||
if ($addschicht != '0') {
|
||||
//$db_erg = AlleSchichten($db_link,$dienstsort);
|
||||
//$db_erg = AlleSchichtenImZeitbereich($db_link,"2023-05-18 00:00:00","2023-05-19 00:00:00",$HelferLevel);
|
||||
if ($ZeitBereich == 1) { // Alle
|
||||
$db_erg = AlleSchichtenImZeitbereich($db_link, "2000-05-18 00:00:00", "2200-05-19 00:00:00", $HelferLevel);
|
||||
}
|
||||
if ($ZeitBereich == 2) { // Davor
|
||||
$db_erg = AlleSchichtenImZeitbereich($db_link, "2000-05-18 00:00:00", "2023-05-18 00:00:00", $HelferLevel);
|
||||
}
|
||||
if ($ZeitBereich == 3) { // Do
|
||||
$db_erg = AlleSchichtenImZeitbereich($db_link, "2023-05-18 00:00:00", "2023-05-19 00:00:00", $HelferLevel);
|
||||
}
|
||||
if ($ZeitBereich == 4) { // Fr
|
||||
$db_erg = AlleSchichtenImZeitbereich($db_link, "2023-05-19 00:00:00", "2023-05-20 00:00:00", $HelferLevel);
|
||||
}
|
||||
if ($ZeitBereich == 5) { // Sa
|
||||
$db_erg = AlleSchichtenImZeitbereich($db_link, "2023-05-20 00:00:00", "2023-05-21 00:00:00", $HelferLevel);
|
||||
}
|
||||
if ($ZeitBereich == 6) { // So
|
||||
$db_erg = AlleSchichtenImZeitbereich($db_link, "2023-05-21 00:00:00", "2023-05-22 00:00:00", $HelferLevel);
|
||||
}
|
||||
if ($ZeitBereich == 7) { // Danach
|
||||
$db_erg = AlleSchichtenImZeitbereich($db_link, "2023-05-22 00:00:00", "2223-05-22 00:00:00", $HelferLevel);
|
||||
}
|
||||
echo '<table class="commontable">';
|
||||
require('_zeitbereich.php');
|
||||
$Bereich = AusgabeZeitbereichZeile($start_date, $ZeitBereich, $TageNamenDeutsch, "AlleSchichten.php");
|
||||
$MeinVon = $Bereich['MeinVon'];
|
||||
$MeinBis = $Bereich['MeinBis'];
|
||||
$db_erg = AlleSchichtenImZeitbereich($db_link, $MeinVon, $MeinBis, -1);
|
||||
|
||||
// fuer Anzahlanzeige in Ueberschrift
|
||||
$iAlleSchichtenCount = AlleSchichtenCount($db_link);
|
||||
$iBelegteSchichtenCount = AlleBelegteSchichtenCount($db_link);
|
||||
echo '</table>';
|
||||
echo "<button type='button' onclick='expand_all_table_rows();'>Alles Ausklappen</button>";
|
||||
|
||||
// "Alle Schichten der Con"
|
||||
|
|
@ -229,44 +214,7 @@ if ($addschicht != '0') {
|
|||
echo "<tr class='header'>";
|
||||
echo "<th colspan='7'>Alle Schichten der Con (" . $iBelegteSchichtenCount . "/" . $iAlleSchichtenCount . ")</th></tr>";
|
||||
|
||||
echo "<tr class='header'>"; // Zeitbereich tr
|
||||
if ($ZeitBereich == 1) {
|
||||
echo "<th style='width:100px; background-color:#0000FF' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=1\"'>" . "Alle" . "</th>";
|
||||
} else {
|
||||
echo "<th style='width:100px' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=1\"'>" . "Alle" . "</th>";
|
||||
}
|
||||
if ($ZeitBereich == 2) {
|
||||
echo "<th style='width:100px; background-color:#0000FF' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=2\"'>" . "Davor" . "</th>";
|
||||
} else {
|
||||
echo "<th style='width:100px' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=2\"'>" . "Davor" . "</th>";
|
||||
}
|
||||
if ($ZeitBereich == 3) {
|
||||
echo "<th style='width:50px; background-color:#0000FF' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=3\"'>" . "Do" . "</th>";
|
||||
} else {
|
||||
echo "<th style='width:50px' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=3\"'>" . "Do" . "</th>";
|
||||
}
|
||||
if ($ZeitBereich == 4) {
|
||||
echo "<th style='width:50px; background-color:#0000FF' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=4\"'>" . "Fr" . "</th>";
|
||||
} else {
|
||||
echo "<th style='width:50px' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=4\"'>" . "Fr" . "</th>";
|
||||
}
|
||||
if ($ZeitBereich == 5) {
|
||||
echo "<th style='width:50px; background-color:#0000FF' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=5\"'>" . "Sa" . "</th>";
|
||||
} else {
|
||||
echo "<th style='width:50px' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=5\"'>" . "Sa" . "</th>";
|
||||
}
|
||||
if ($ZeitBereich == 6) {
|
||||
echo "<th style='width:50px; background-color:#0000FF' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=6\"'>" . "So" . "</th>";
|
||||
} else {
|
||||
echo "<th style='width:50px' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=6\"'>" . "So" . "</th>";
|
||||
}
|
||||
if ($ZeitBereich == 7) {
|
||||
echo "<th style='width:100px; background-color:#0000FF' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=7\"'>" . "Danach" . "</th>";
|
||||
} else {
|
||||
echo "<th style='width:100px' onclick='window.location.href=\"AlleSchichten.php?ZeitBereich=7\"'>" . "Danach" . "</th>";
|
||||
}
|
||||
|
||||
echo "</tr>"; //Zeitbereich tr
|
||||
echo "</tr>";
|
||||
|
||||
$OldTag = "";
|
||||
$OldWas = "";
|
||||
|
|
|
|||
|
|
@ -1,3 +1,11 @@
|
|||
<?php
|
||||
SESSION_START();
|
||||
require_once 'konfiguration.php';
|
||||
require 'SQL.php';
|
||||
$db_link = ConnectDB();
|
||||
require '_login.php';
|
||||
require '_zeitbereich.php';
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
|
@ -7,6 +15,7 @@
|
|||
<script src="scheduler/codebase/dhtmlxscheduler.js"></script>
|
||||
<!--link href="scheduler/codebase/dhtmlxscheduler.css" rel="stylesheet" type="text/css" charset="utf-8"-->
|
||||
<link href="scheduler/codebase/dhtmlxscheduler_contrast_black.css" rel="stylesheet" type="text/css" charset="utf-8">
|
||||
<link rel="stylesheet" href="scheduler/samples/common/controls_styles.css">
|
||||
<style>
|
||||
|
||||
html, body{
|
||||
|
|
@ -24,23 +33,23 @@ border:none !important;
|
|||
</style>
|
||||
<!-- darkstyle
|
||||
style type="text/css" >
|
||||
.filters_wrapper {
|
||||
background-color: black;
|
||||
color: white;
|
||||
font: 500 14px Roboto;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
.filters_wrapper span {
|
||||
font-weight: bold;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
color: rgba(0,0,0,0.7);
|
||||
}
|
||||
.filters_wrapper label {
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
.filters_wrapper {
|
||||
background-color: black;
|
||||
color: white;
|
||||
font: 500 14px Roboto;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
.filters_wrapper span {
|
||||
font-weight: bold;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
color: rgba(0,0,0,0.7);
|
||||
}
|
||||
.filters_wrapper label {
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
</style-->
|
||||
|
||||
</head>
|
||||
|
|
@ -56,30 +65,30 @@ Filtern: <input type="text" id="filterWrap">
|
|||
</div>
|
||||
|
||||
<div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'>
|
||||
<div class="dhx_cal_navline">
|
||||
<div class="dhx_cal_prev_button"> </div>
|
||||
<div class="dhx_cal_next_button"> </div>
|
||||
<div class="dhx_cal_today_button"></div>
|
||||
<div class="dhx_cal_date"></div>
|
||||
<div class="dhx_cal_tab" name="day_tab"></div>
|
||||
<div class="dhx_cal_tab" name="week_tab"></div>
|
||||
<div class="dhx_cal_tab" name="month_tab"></div>
|
||||
<div class="dhx_cal_tab" data-tab="con" style="right:280px;"></div>
|
||||
<div class="dhx_cal_tab" data-tab="prep" style="right:280px;" ></div>
|
||||
|
||||
</div>
|
||||
<div class="dhx_cal_header"></div>
|
||||
<div class="dhx_cal_data"></div>
|
||||
</div>
|
||||
<script>
|
||||
<div class="dhx_cal_navline">
|
||||
<div class="dhx_cal_prev_button"> </div>
|
||||
<div class="dhx_cal_next_button"> </div>
|
||||
<div class="dhx_cal_today_button"></div>
|
||||
<div class="dhx_cal_date"></div>
|
||||
<div class="dhx_cal_tab" name="day_tab"></div>
|
||||
<div class="dhx_cal_tab" name="week_tab"></div>
|
||||
<div class="dhx_cal_tab" name="month_tab"></div>
|
||||
<div class="dhx_cal_tab" data-tab="con" style="right:280px;"></div>
|
||||
<div class="dhx_cal_tab" data-tab="prep" style="right:280px;" ></div>
|
||||
|
||||
</div>
|
||||
<div class="dhx_cal_header"></div>
|
||||
<div class="dhx_cal_data"></div>
|
||||
</div>
|
||||
<script>
|
||||
//https://docs.dhtmlx.com/scheduler/filtering.html
|
||||
|
||||
var filter = document.querySelector("#filterWrap");
|
||||
filter.addEventListener("input", function(){
|
||||
scheduler.setCurrentView();
|
||||
})
|
||||
scheduler.setCurrentView();
|
||||
})
|
||||
scheduler.filter_month = scheduler.filter_day = scheduler.filter_week = scheduler.filter_con = scheduler.filter_prep = function(id, event) {
|
||||
if(filter.value == ""){
|
||||
if(filter.value == ""){
|
||||
return true;
|
||||
}
|
||||
if(event.text.toLowerCase().includes(filter.value.toLowerCase()) ){
|
||||
|
|
@ -151,14 +160,14 @@ function colorize (e){ //KS
|
|||
|
||||
scheduler.attachEvent("onTemplatesReady",function(){ // for custom time ranges
|
||||
//Con timeslot
|
||||
scheduler.date.con_start = function(date){return date;}; //new Date(202x,5,16);}; // calculates start-day of range from current day
|
||||
scheduler.date.con_start = function(date){return date;};
|
||||
scheduler.templates.con_date = scheduler.templates.week_date;
|
||||
scheduler.templates.con_scale_date = scheduler.templates.week_scale_date;
|
||||
scheduler.date.add_con=function(date,inc){ return scheduler.date.add(date,inc*4,"day"); }//"next" gives you the next 4 days
|
||||
scheduler.date.get_con_end=function(date){ return scheduler.date.add(date,4,"day"); }
|
||||
|
||||
//preparation phase 2 days
|
||||
function setprep(){scheduler.setCurrentView(new Date(2023,4,16));}
|
||||
function setprep(){scheduler.setCurrentView(new Date(<?php echo KalenderDatum($start_date);?>));}
|
||||
scheduler.date.prep_start = function(date){return date};
|
||||
scheduler.templates.prep_date = scheduler.templates.week_date;
|
||||
scheduler.templates.prep_scale_date = scheduler.templates.week_scale_date;
|
||||
|
|
@ -173,10 +182,10 @@ function colorize (e){ //KS
|
|||
};
|
||||
|
||||
scheduler.config.all_timed = "short"; // night events arent multi-day - events under 24h are shown
|
||||
scheduler.config.lightbox.sections=[
|
||||
{name:"description", height:130, map_to:"text", type:"textarea" , focus:true},
|
||||
{name:"Dienstbeschreibung", height:90, type:"textarea", map_to:"Info" },
|
||||
{name:"Konakt", height:200, type:"textarea", map_to:"Kontakt" },
|
||||
scheduler.config.lightbox.sections=[
|
||||
{name:"description", height:130, map_to:"text", type:"textarea" , focus:true},
|
||||
{name:"Dienstbeschreibung", height:90, type:"textarea", map_to:"Info" },
|
||||
{name:"Konakt", height:200, type:"textarea", map_to:"Kontakt" },
|
||||
{name:"time", height:72, type:"time", map_to:"auto"}
|
||||
];
|
||||
|
||||
|
|
@ -185,7 +194,7 @@ function colorize (e){ //KS
|
|||
};
|
||||
|
||||
// actual init
|
||||
scheduler.init('scheduler_here', new Date(2023,4,18), "con");
|
||||
scheduler.init('scheduler_here', new Date(<?php echo KalenderDatum($start_date);?>), "con");
|
||||
scheduler.load("data/api-full.php");
|
||||
//https://docs.dhtmlx.com/scheduler/api__scheduler_createdataprocessor.html
|
||||
//var dp = scheduler.createDataProcessor("data/api.php"); // this would be for saving
|
||||
|
|
@ -1,64 +1,67 @@
|
|||
<?php
|
||||
|
||||
// Login und Admin Status testen. Wenn kein Admin-Status, Weiterleiten auf index.php und beenden
|
||||
SESSION_START();
|
||||
require_once 'konfiguration.php';
|
||||
require 'SQL.php';
|
||||
$db_link = ConnectDB();
|
||||
require '_login.php';
|
||||
|
||||
require '_zeitbereich.php';
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title> Helferdienste </title>
|
||||
<meta charset="utf-8">
|
||||
<!--meta name="viewport" content="width=device-width, initial-scale=1 ,user-scalable=1"-->
|
||||
<script src="scheduler/codebase/dhtmlxscheduler.js"></script>
|
||||
<!-- link href="scheduler/codebase/dhtmlxscheduler_contrast_black.css" rel="stylesheet" type="text/css" charset="utf-8"-->
|
||||
<link href="scheduler/codebase/dhtmlxscheduler.css" rel="stylesheet" type="text/css" charset="utf-8">
|
||||
<link rel="stylesheet" href="../scheduler/samples/common/controls_styles.css">
|
||||
<style>
|
||||
<title> Helferdienste </title>
|
||||
<meta charset="utf-8">
|
||||
<!--meta name="viewport" content="width=device-width, initial-scale=1 ,user-scalable=1"-->
|
||||
<script src="scheduler/codebase/dhtmlxscheduler.js"></script>
|
||||
<!--link href="scheduler/codebase/dhtmlxscheduler.css" rel="stylesheet" type="text/css" charset="utf-8"-->
|
||||
<link href="scheduler/codebase/dhtmlxscheduler_contrast_black.css" rel="stylesheet" type="text/css" charset="utf-8">
|
||||
<link rel="stylesheet" href="scheduler/samples/common/controls_styles.css">
|
||||
<style>
|
||||
|
||||
html, body{
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
height:100%;
|
||||
overflow:hidden;
|
||||
html, body{
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
height:100%;
|
||||
overflow:hidden;
|
||||
}
|
||||
.dhx_cal_event_line,.dhx_body,.dhx_cal_event .dhx_footer,.dhx_cal_event .dhx_header,.dhx_cal_event .dhx_title{
|
||||
border:none !important;
|
||||
border-radius:3px 3px 3px 3px !important;
|
||||
}
|
||||
.dhx_scale_holder {background-image: url('Bilder/calendar_lines1.png') !important; background-blend-mode:color-dodge;}
|
||||
|
||||
</style>
|
||||
<!-- darkstyle
|
||||
style type="text/css" >
|
||||
.filters_wrapper {
|
||||
background-color: black;
|
||||
color: white;
|
||||
font: 500 14px Roboto;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
<!-- darkstyle
|
||||
style type="text/css" >
|
||||
.filters_wrapper {
|
||||
background-color: black;
|
||||
color: white;
|
||||
font: 500 14px Roboto;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
.filters_wrapper span {
|
||||
font-weight: bold;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
color: rgba(0,0,0,0.7);
|
||||
}
|
||||
.filters_wrapper label {
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
.filters_wrapper span {
|
||||
font-weight: bold;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
color: rgba(0,0,0,0.7);
|
||||
}
|
||||
.filters_wrapper label {
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
</style-->
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<button name="BackHelferdaten" value="1" onclick="window.location.href = 'index.php';"><b>↩</b></button><br>
|
||||
<div class="filters_wrapper" id="filters_wrapper">
|
||||
|
||||
Mehrtagesdienste anzeigen: <input id="multidaycheck" class="sch_radio" type="checkbox" checked onchange="toggleMultiday(this)">
|
||||
Einfärben: <input type="text" id="colorize"> <!--onchange="markEntries(this.value);" onpaste = "this.onchange();" onsubmit="markEntries(this.value);"-->
|
||||
Filtern: <input type="text" id="filterWrap">
|
||||
<br/>
|
||||
Achtung: Ende Nachtdienste wird falsch angezeigt (immer Mitternacht) - Popup-Fenster zeigt richtige Zeiten
|
||||
Mehrtagesdienste anzeigen: <input id="multidaycheck" class="sch_radio" type="checkbox" checked onchange="toggleMultiday(this)">
|
||||
Einfärben: <input type="text" id="colorize"> <!--onchange="markEntries(this.value);" onpaste = "this.onchange();" onsubmit="markEntries(this.value);"-->
|
||||
Filtern: <input type="text" id="filterWrap">
|
||||
<br/>
|
||||
<!--Achtung: Ende Nachtdienste wird falsch angezeigt (immer Mitternacht) - Popup-Fenster zeigt richtige Zeiten-->
|
||||
</div>
|
||||
|
||||
<div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'>
|
||||
|
|
@ -157,14 +160,14 @@ function colorize (e){ //KS
|
|||
|
||||
scheduler.attachEvent("onTemplatesReady",function(){ // for custom time ranges
|
||||
//Con timeslot
|
||||
scheduler.date.con_start = function(date){return date;}; //new Date(202,5,16);}; // calculates start-day of range from current day
|
||||
scheduler.date.con_start = function(date){return date;};
|
||||
scheduler.templates.con_date = scheduler.templates.week_date;
|
||||
scheduler.templates.con_scale_date = scheduler.templates.week_scale_date;
|
||||
scheduler.date.add_con=function(date,inc){ return scheduler.date.add(date,inc*4,"day"); }//"next" gives you the next 4 days
|
||||
scheduler.date.get_con_end=function(date){ return scheduler.date.add(date,4,"day"); }
|
||||
|
||||
//preparation phase 2 days
|
||||
function setprep(){scheduler.setCurrentView(new Date(2023,4,16));}
|
||||
function setprep(){scheduler.setCurrentView(new Date(<?php echo KalenderDatum($start_date);?>));}
|
||||
scheduler.date.prep_start = function(date){return date};
|
||||
scheduler.templates.prep_date = scheduler.templates.week_date;
|
||||
scheduler.templates.prep_scale_date = scheduler.templates.week_scale_date;
|
||||
|
|
@ -179,7 +182,7 @@ function colorize (e){ //KS
|
|||
};
|
||||
|
||||
scheduler.config.all_timed = "short"; // night events arent multi-day - events under 24h are shown
|
||||
scheduler.config.lightbox.sections=[
|
||||
scheduler.config.lightbox.sections=[
|
||||
{name:"description", height:130, map_to:"text", type:"textarea" , focus:true},
|
||||
{name:"Dienstbeschreibung", height:90, type:"textarea", map_to:"Info" },
|
||||
{name:"Konakt", height:200, type:"textarea", map_to:"Kontakt" },
|
||||
|
|
@ -191,7 +194,7 @@ function colorize (e){ //KS
|
|||
};
|
||||
|
||||
// actual init
|
||||
scheduler.init('scheduler_here', new Date(2023,4,18), "con");
|
||||
scheduler.init('scheduler_here', new Date(<?php echo KalenderDatum($start_date);?>), "con");
|
||||
scheduler.load("data/api-helfer.php");
|
||||
//https://docs.dhtmlx.com/scheduler/api__scheduler_createdataprocessor.html
|
||||
//var dp = scheduler.createDataProcessor("data/api.php"); // this would be for saving
|
||||
|
|
|
|||
|
|
@ -162,11 +162,6 @@ if (isset($_POST['minusschicht'])) {
|
|||
|
||||
/// Schichten Auswahl
|
||||
////////////////////////////////////////////////////////
|
||||
if ($addschicht == '0') {
|
||||
echo "<p><b>Schichten Hinzufügen geordnet nach</b>";
|
||||
echo "<button name='addschicht' value='1'>Tage</button>";
|
||||
echo "<button name='addschicht' value='2'>Dienste</button></p>";
|
||||
}
|
||||
|
||||
|
||||
// fuer Anzahlanzeige in Ueberschrift
|
||||
|
|
@ -179,60 +174,12 @@ $iBelegteSchichtenCount = AlleBelegteSchichtenCount($db_link);
|
|||
echo "<th colspan='7'>" . "Alle Schichten der Con (";
|
||||
echo $iBelegteSchichtenCount . "/" . $iAlleSchichtenCount . ")</th></tr>";
|
||||
|
||||
echo "\n<tr class='header'>\n"; // Zeitbereich tr
|
||||
|
||||
// Zeitbereich: -1 davor, 0 kein Limit, 1-N Tag N der Con, 1000: nach der Con
|
||||
$ZeitBereichWerte = ZEITBEREICHWERTE;
|
||||
$ZeitBereichFelder = count($ZeitBereichWerte);
|
||||
$ZeitBereichFeldBreite = round(100 / $ZeitBereichFelder); // % width for style
|
||||
require('_zeitbereich.php');
|
||||
|
||||
$format = 'Y-m-d';
|
||||
|
||||
// iterate over all days plus "before" and "after"
|
||||
// Wenn TAG_DAUER=4, dann sind die Werte 1-4 die Tage der Con
|
||||
// ZeitBereichWerte = [-1, 0, 1, 2, 3, 4, 1000]
|
||||
// -1: davor, 0: alle, 1-4: Tag 1-4, 1000: danach
|
||||
foreach ($ZeitBereichWerte as &$EinZeitBereich) {
|
||||
if ($EinZeitBereich > 0 && $EinZeitBereich <= TAGE_DAUER) {
|
||||
$PlusTage = $EinZeitBereich - 1;
|
||||
//TODO: only if locale DE
|
||||
$day = $start_date->add(new DateInterval("P{$PlusTage}D"));
|
||||
$Wochentag = $TageNamenDeutsch[date_format($day, 'w')];
|
||||
|
||||
$Text = "$Wochentag (Tag{$EinZeitBereich})";
|
||||
$Von = date_format($day, $format) . " 00:00:00";
|
||||
$Bis = date_format($day, $format) . " 23:59:59";
|
||||
} elseif ($EinZeitBereich == -1) {
|
||||
$Text = 'Davor';
|
||||
$Von = "2000-01-01 00:00:00";
|
||||
$Bis = date_format($start_date, $format) . " 00:00:00";
|
||||
} elseif ($EinZeitBereich == 0) {
|
||||
$Text = 'Alle' ;
|
||||
$Von = "2000-01-01 00:00:00";
|
||||
$Bis = "3000-01-01 00:00:00";
|
||||
} elseif ($EinZeitBereich == 1000) {
|
||||
$Text = 'Danach';
|
||||
$tage_dauer = TAGE_DAUER;
|
||||
$day = $start_date->add(new DateInterval("P{$tage_dauer}D"));
|
||||
$Von = date_format($day, $format) . " 00:00:00";
|
||||
$Bis = "3000-01-01 00:00:00";
|
||||
}
|
||||
// highlight the selected time range
|
||||
if ($EinZeitBereich == $ZeitBereich) {
|
||||
$color = 'background-color:#0000FF; ' ;
|
||||
$MeinVon = $Von;
|
||||
$MeinBis = $Bis;
|
||||
} else {
|
||||
$color = '';
|
||||
}
|
||||
//$Text="$Text <br>$MeinVon $MeinBis"; // debug time strings
|
||||
|
||||
// write the field for each day
|
||||
echo "<th style='width:{$ZeitBereichFeldBreite}%; $color' ";
|
||||
echo "onclick='window.location.href=\"TeilnehmerSchichtenAusdruck.php?ZeitBereich={$EinZeitBereich}\";'>";
|
||||
echo "$Text" . "</th>\n";
|
||||
}
|
||||
echo "</tr>"; //Zeitbereich tr
|
||||
$Bereich = AusgabeZeitbereichZeile($start_date, $ZeitBereich, $TageNamenDeutsch, "TeilnehmerSchichtenAusdruck.php");
|
||||
$MeinVon = $Bereich['MeinVon'];
|
||||
$MeinBis = $Bereich['MeinBis'];
|
||||
|
||||
$db_erg = AlleSchichtenImZeitbereich($db_link, $MeinVon, $MeinBis, $HelferLevel);
|
||||
//echo "<tr><th class=header> AlleSchichtenImZeitbereich(db_link,$Von,$Bis,$HelferLevel);</th></tr>"; // debug
|
||||
|
|
@ -255,7 +202,6 @@ echo "</table>\n";
|
|||
// 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 "<table class='commontable'>\n";
|
||||
// $db_erg ist aus AlleSchichtenImZeitbereich
|
||||
// und gibt zurueck Was, Ab, Bis, Ist, Tag, Soll - Ist und Soll sind die HelferStunden
|
||||
|
|
|
|||
|
|
@ -48,8 +48,9 @@ if (!isset($_SESSION["HelferID"])) {
|
|||
<title>Helfer <?php echo EVENTNAME ?> Home</title>
|
||||
<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)"/>
|
||||
<meta name="viewport" content="width=480" />
|
||||
<meta charset="utf-8">
|
||||
<script src="js/helferdb.js" type="text/javascript"></script>
|
||||
<meta name="viewport" content="width=480" />
|
||||
<meta charset="utf-8">
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" action="#Info">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
|
||||
function KalenderDatum($start_date)
|
||||
{
|
||||
$format = 'Y,m,d';
|
||||
// the calender counts monts from 0 for whatever reason,
|
||||
// so we have to subtract 1 from the month. Subtracting 1 month is not possible because it can wrap to december
|
||||
$KalenderDatum = date_format($start_date, "Y");
|
||||
$KalenerMonat = date_format($start_date, "m") - 1;
|
||||
$KalenderDatum = "$KalenderDatum,$KalenerMonat," . date_format($start_date, "d");
|
||||
return ($KalenderDatum );
|
||||
}
|
||||
function AusgabeZeitbereichZeile($start_date, $ZeitBereich, $TageNamenDeutsch, $SeitenName)
|
||||
{
|
||||
// SeitenName kann vom aufrufenden Script ueber pathinfo( __FILE__ )['filename'] gesetzt werden
|
||||
// ZeitbereichWerte (array): -1 davor, 0 kein Limit, 1-N Tag N der Con, 1000: nach der Con
|
||||
$ZeitBereichWerte = ZEITBEREICHWERTE;
|
||||
$ZeitBereichFelder = count($ZeitBereichWerte);
|
||||
$ZeitBereichFeldBreite = round(100 / $ZeitBereichFelder); // % width for style
|
||||
|
||||
$format = 'Y-m-d';
|
||||
echo "\n<tr class='header'>\n"; // Zeitbereich tr
|
||||
// iterate over all days plus "before" and "after"
|
||||
// Wenn TAG_DAUER=4, dann sind die Werte 1-4 die Tage der Con
|
||||
// ZeitBereichWerte = [-1, 0, 1, 2, 3, 4, 1000]
|
||||
// -1: davor, 0: alle, 1-4: Tag 1-4, 1000: danach
|
||||
foreach ($ZeitBereichWerte as &$EinZeitBereich) {
|
||||
if ($EinZeitBereich > 0 && $EinZeitBereich <= TAGE_DAUER) {
|
||||
$PlusTage = $EinZeitBereich - 1;
|
||||
//TODO: only if locale DE
|
||||
$day = $start_date->add(new DateInterval("P{$PlusTage}D"));
|
||||
$Wochentag = $TageNamenDeutsch[date_format($day, 'w')];
|
||||
|
||||
$Text = "$Wochentag (Tag{$EinZeitBereich})";
|
||||
$Von = date_format($day, $format) . " 00:00:00";
|
||||
$Bis = date_format($day, $format) . " 23:59:59";
|
||||
} elseif ($EinZeitBereich == -1) {
|
||||
$Text = 'Davor';
|
||||
$Von = "2000-01-01 00:00:00";
|
||||
$Bis = date_format($start_date, $format) . " 00:00:00";
|
||||
} elseif ($EinZeitBereich == 0) {
|
||||
$Text = 'Alle' ;
|
||||
$Von = "2000-01-01 00:00:00";
|
||||
$Bis = "3000-01-01 00:00:00";
|
||||
} elseif ($EinZeitBereich == 1000) {
|
||||
$Text = 'Danach';
|
||||
$tage_dauer = TAGE_DAUER;
|
||||
$day = $start_date->add(new DateInterval("P{$tage_dauer}D"));
|
||||
$Von = date_format($day, $format) . " 00:00:00";
|
||||
$Bis = "3000-01-01 00:00:00";
|
||||
}
|
||||
// highlight the selected time range
|
||||
if ($EinZeitBereich == $ZeitBereich) {
|
||||
$color = 'background-color:#0000FF; ' ;
|
||||
$MeinVon = $Von;
|
||||
$MeinBis = $Bis;
|
||||
} else {
|
||||
$color = '';
|
||||
}
|
||||
// write the field for each day
|
||||
echo "<th style='width:{$ZeitBereichFeldBreite}%; $color' ";
|
||||
echo "onclick='window.location.href=\"{$SeitenName}?ZeitBereich={$EinZeitBereich}\";'>";
|
||||
echo "$Text" . "</th>\n";
|
||||
}
|
||||
echo "</tr>"; //Zeitbereich tr
|
||||
return [
|
||||
'MeinVon' => $MeinVon,
|
||||
'MeinBis' => $MeinBis
|
||||
];
|
||||
}
|
||||
Loading…
Reference in New Issue