diff --git a/html/Admin.php b/html/Admin.php index 3c4f302..a0d729c 100644 --- a/html/Admin.php +++ b/html/Admin.php @@ -133,7 +133,7 @@ while ($zeile = mysqli_fetch_array($db_erg, MYSQLI_ASSOC)) { - + Admin Kalenderansicht diff --git a/html/Kalender-all.html b/html/Kalender-all.php similarity index 75% rename from html/Kalender-all.html rename to html/Kalender-all.php index e7d5f6c..23a0a18 100644 --- a/html/Kalender-all.html +++ b/html/Kalender-all.php @@ -1,3 +1,12 @@ + @@ -7,6 +16,7 @@ + @@ -56,30 +66,30 @@ Filtern:
-
-
 
-
 
-
-
-
-
-
-
-
- -
-
-
-
- - - - - +
  - Mehrtagesdienste anzeigen: - Einfärben: - Filtern: -
- Achtung: Ende Nachtdienste wird falsch angezeigt (immer Mitternacht) - Popup-Fenster zeigt richtige Zeiten +Mehrtagesdienste anzeigen: +Einfärben: +Filtern: +
+
@@ -157,14 +161,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());} 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 +183,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 +195,7 @@ function colorize (e){ //KS }; // actual init - scheduler.init('scheduler_here', new Date(2023,4,18), "con"); + scheduler.init('scheduler_here', new 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 diff --git a/html/_login.php b/html/_login.php index 670079e..50e06c2 100644 --- a/html/_login.php +++ b/html/_login.php @@ -48,8 +48,9 @@ if (!isset($_SESSION["HelferID"])) { Helfer <?php echo EVENTNAME ?> Home - - + + +
diff --git a/html/_zeitbereich.php b/html/_zeitbereich.php new file mode 100644 index 0000000..786b9a3 --- /dev/null +++ b/html/_zeitbereich.php @@ -0,0 +1,70 @@ + 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 ""; + echo "$Text" . "\n"; +} +echo ""; //Zeitbereich tr +return [ + 'MeinVon' => $MeinVon, + 'MeinBis' => $MeinBis + ]; +} +?>