From 00376c3b2ff65877ead60393ed3bb877938b203f Mon Sep 17 00:00:00 2001 From: IT-Master Heizmann Date: Mon, 6 Jan 2025 17:28:03 +0100 Subject: [PATCH] V 0.9.200 - diverse kleinere Bug eliminiert --- .gitignore | 1 + admin.php | 4 ++-- changelog.txt | 3 ++- include/Settings/smalltime.txt | 2 +- include/class_month.php | 14 ++++++++------ include/class_pausen.php | 3 ++- modules/sites_admin/admin04.php | 3 ++- modules/sites_login/login_mehr_02.php | 3 ++- modules/sites_login/login_mehr_04.php | 6 +++--- 9 files changed, 23 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index f36bdc1..048215c 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ debug/* js/js_bak .vscode/* +.ddev/* # Recycle Bin used on file shares $RECYCLE.BIN/ diff --git a/admin.php b/admin.php index d179485..ffef614 100644 --- a/admin.php +++ b/admin.php @@ -2,7 +2,7 @@ /******************************************************************************** * Small Time /******************************************************************************* -* Version 0.9.131 +* Version 0.9.200 * Author: IT-Master * www.it-master.ch / info@it-master.ch * Copyright (c), IT-Master, All rights reserved @@ -272,7 +272,7 @@ function my_session_start() { $id = $_GET['delete_user_id']; $_infotext04 = $_users->delete_user($id, $_users->_array[$id][0]); header("Location: admin.php?action=delete_user&show=delete&admin_id=1"); - } elseif ($_POST['absenden'] == "CANCEL") { + } elseif (@$_POST['absenden'] == "CANCEL") { $_infotext = getinfotext("User wurde nicht gelöscht.", "td_background_heute"); $_template->_user02 = "sites_admin/admin02.php"; $_template->_user04 = "sites_admin/admin04.php"; diff --git a/changelog.txt b/changelog.txt index 3bcc3c7..bb7a7e0 100644 --- a/changelog.txt +++ b/changelog.txt @@ -38,4 +38,5 @@ V 0.9.128 10.05.2023 -> declare(strict_types=1); führt zu einer weissen Seite u V 0.9.129 16.05.2023 -> jquery & jqueryui update - Sicherheitslücken eliminiert V 0.9.130 16.05.2023 -> unter Linux noch Fehler beim Konvertieren V 0.9.131 16.05.2023 -> UserDelete - crash fix, PDF mit vielen Zeiten , Darstellung optimiert, Filter bei vielen Usern im Adminbereich optimiert -V 0.9.132 03.01.2025 -> Der 1. Advent wurde falsch berechnet, und somit auch der 2. bis. 4. \ No newline at end of file +V 0.9.132 03.01.2025 -> Der 1. Advent wurde falsch berechnet, und somit auch der 2. bis. 4. +V 0.9.200 07.01.2025 -> diverse kleinere Bug eliminiert \ No newline at end of file diff --git a/include/Settings/smalltime.txt b/include/Settings/smalltime.txt index c5d6b4e..0d4e814 100644 --- a/include/Settings/smalltime.txt +++ b/include/Settings/smalltime.txt @@ -1,2 +1,2 @@ -0.9.132 +0.9.200 http://www.small.li \ No newline at end of file diff --git a/include/class_month.php b/include/class_month.php index fe9b4b2..ba56e73 100644 --- a/include/class_month.php +++ b/include/class_month.php @@ -3,7 +3,7 @@ /******************************************************************************* * Monatsberechnungen /******************************************************************************* -* Version 0.9.126 +* Version 0.9.200 * Author: IT-Master * www.it-master.ch / info@it-master.ch * Copyright (c), IT-Master, All rights reserved @@ -199,10 +199,10 @@ private function set_monatsdaten($monat, $jahr) $this->_MonatsArray[$i][16] = ""; $this->_MonatsArray[$i][17] = 0; if ($tmp && count($tmp)) { - $this->_MonatsArray[$i][14] = $tmp[1]; - $this->_MonatsArray[$i][15] = floatval($tmp[2]); // Anzahl der Absenz - $this->_MonatsArray[$i][16] = $tmp[3]; - $this->_MonatsArray[$i][17] = floatval($tmp[4]); + if(isset($tmp[1])) $this->_MonatsArray[$i][14] = $tmp[1]; + if(isset($tmp[2])) $this->_MonatsArray[$i][15] = floatval($tmp[2]); // Anzahl der Absenz + if(isset($tmp[3])) $this->_MonatsArray[$i][16] = $tmp[3]; + if(isset($tmp[4])) $this->_MonatsArray[$i][17] = floatval($tmp[4]); } $tmp1 = 0; // Liegen die Absenzen oder die Zeiten in der Zukunft, dann nicht berechnen @@ -242,7 +242,9 @@ private function set_monatsdaten($monat, $jahr) //wenn absenz(15) == 1 Prozentual ausrechnen sowie tmp=0(nicht in der Zukunft) if ($this->_MonatsArray[$i][15] == 1 and $tmp1 == 1) { $this->_MonatsArray[$i][18] = round((floatval($this->_MonatsArray[$i][8]) - floatval($this->_MonatsArray[$i][13])) * floatval($this->_MonatsArray[$i][17]) / 100, 2); - $this->_MonatsArray[$i][15] = round((floatval($this->_MonatsArray[$i][8]) - floatval($this->_MonatsArray[$i][13])) / floatval($this->_MonatsArray[$i][8]), 2); + if(isset($this->_MonatsArray[$i][8]) && floatval($this->_MonatsArray[$i][8]) != 0){ + $this->_MonatsArray[$i][15] = round((floatval($this->_MonatsArray[$i][8]) - floatval($this->_MonatsArray[$i][13])) / floatval($this->_MonatsArray[$i][8]), 2); + } $this->_MonatsArray[$i][15] = round(floatval($this->_MonatsArray[$i][15]) * floatval($this->_MonatsArray[$i][4]), 2); $saldo = floatval($this->_MonatsArray[$i][18]) + floatval($this->_MonatsArray[$i][13]); } diff --git a/include/class_pausen.php b/include/class_pausen.php index 7b0686e..01e030e 100644 --- a/include/class_pausen.php +++ b/include/class_pausen.php @@ -3,7 +3,7 @@ * Automatische Pausenregelung für Mitarbeiter * werden von den Arbeitszeiten abgezogen /******************************************************************************* -* Version 0.9.1 +* Version 0.9.200 * Author: IT-Master * www.it-master.ch / info@it-master.ch * Copyright (c), IT-Master, All rights reserved @@ -52,6 +52,7 @@ public static function get(){ } public static function save(){ $meldung = ""; + $pausen = []; // ---------------------------------------------------------------------------- // $pausen = get_pausen(); // ---------------------------------------------------------------------------- diff --git a/modules/sites_admin/admin04.php b/modules/sites_admin/admin04.php index 06b1d75..6b7105c 100644 --- a/modules/sites_admin/admin04.php +++ b/modules/sites_admin/admin04.php @@ -2,11 +2,12 @@ /******************************************************************************** * Small Time /******************************************************************************* -* Version 0.896 +* Version 0.9.200 * Author: IT-Master * www.it-master.ch / info@it-master.ch * Copyright (c), IT-Master, All rights reserved *******************************************************************************/ +global $_infotext04; ?> diff --git a/modules/sites_login/login_mehr_02.php b/modules/sites_login/login_mehr_02.php index df9e720..26efd68 100644 --- a/modules/sites_login/login_mehr_02.php +++ b/modules/sites_login/login_mehr_02.php @@ -2,11 +2,12 @@ /******************************************************************************** * Small Time /******************************************************************************* -* Version 0.896 +* Version 0.9.200 * Author: IT-Master * www.it-master.ch / info@it-master.ch * Copyright (c), IT-Master, All rights reserved *******************************************************************************/ +global $_infotext02; if($_settings->_array[13][1]){ get_gruppen(); }else{ diff --git a/modules/sites_login/login_mehr_04.php b/modules/sites_login/login_mehr_04.php index fc9414a..686cbaa 100644 --- a/modules/sites_login/login_mehr_04.php +++ b/modules/sites_login/login_mehr_04.php @@ -2,7 +2,7 @@ /******************************************************************************** * Small Time /******************************************************************************* -* Version 0.9.020 +* Version 0.9.200 * Author: IT-Master * www.it-master.ch / info@it-master.ch * Copyright (c), IT-Master, All rights reserved @@ -130,13 +130,13 @@ function setAdmin(){ } //vSettings - Einstellungen : Anwesenheitsliste anzeigen -if($_settings->_array[13][1] OR $_SESSION['admin']){ +if($_settings->_array[13][1] OR @$_SESSION['admin']){ //template unsterstützt Bootstrap if(strstr($_template->_bootstrap,'true')){ //------------------------------------------------------------------------------------------------------------- // Anzeige der Anwesenheitsliste //------------------------------------------------------------------------------------------------------------- - if(!$_grpwahl) $_grpwahl = 1; + if(!isset($_grpwahl) OR !$_grpwahl) $_grpwahl = 1; if($_grpwahl == -1)$_grpwahl = 1; $_group = new time_group($_grpwahl); if(@$id) $_grpwahl = $_group->get_usergroup($id);