diff options
author | M.Gergo | 2020-03-18 10:18:10 +0100 |
---|---|---|
committer | M.Gergo | 2020-03-18 10:18:10 +0100 |
commit | 4e81ff6076ac2d39b3a90bcdd68a04fe874e31da (patch) | |
tree | d4092ca4a833ac182d6d69e48ec275a6605b5e24 /mayor-orig/mayor-naplo/www/policy/private | |
parent | 25b091e6e06862ee7f7631471c47f9cd94a2019f (diff) | |
download | mayor-4e81ff6076ac2d39b3a90bcdd68a04fe874e31da.tar.gz mayor-4e81ff6076ac2d39b3a90bcdd68a04fe874e31da.zip |
Rev: 4623rev4623
Diffstat (limited to 'mayor-orig/mayor-naplo/www/policy/private')
-rw-r--r-- | mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/haladasi-pre.php | 11 | ||||
-rw-r--r-- | mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/hazifeladat-pre.php | 11 |
2 files changed, 18 insertions, 4 deletions
diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/haladasi-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/haladasi-pre.php index 79d49bd0..3dbf4c9d 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/haladasi-pre.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/haladasi-pre.php @@ -110,7 +110,6 @@ if ( $skin == 'ajax' // set defaults ++ // if (strtotime($igDt) > strtotime($_TANEV['zarasDt'])) $igDt = $_TANEV['zarasDt']; $maxIgDt = date('Y-m-d', strtotime('next Saturday', strtotime($_TANEV['kovetkezoKezdesDt']))); - if (strtotime($igDt) > strtotime($maxIgDt)) $igDt = $maxIgDt; elseif (strtotime($igDt) < strtotime($_TANEV['kezdesDt'])) $igDt = $_TANEV['kezdesDt']; if (date('w', strtotime($igDt)) == 0) $igDt = date('Y-m-d',strtotime('-1 days',strtotime($igDt))); // Hogy vasárnap még a múltheti látszódjon @@ -130,6 +129,7 @@ if ( $skin == 'ajax' // Vasárnap $igDt = date('Y-m-d',strtotime('Sunday',strtotime($tolDt))); } + if ($csakUres || strtotime($tolDt) < strtotime($_TANEV['kezdesDt'])) $tolDt = date('Y-m-d',strtotime($_TANEV['kezdesDt'])); // Ha ezt kiveszem, akkor mindig kirakja a teljes hetet, de a jövőbeli órákat nem lehet beírni! // Itt a post értékét nem használjuk fel, csak vizsgáljuk. @@ -175,6 +175,15 @@ if ( $skin == 'ajax' // || ((__TANAR || __VEZETOSEG ) && __FOLYO_TANEV) // A tanév közben a tanároknak, vezetőségi tagoknak - az év végi napok problémásak így! ) ) { + // checkNaplo (2020) + /* + checkNaplo($igDt); + $_dt = $igDt; + while (strtotime($_dt)>time()) { + $_dt = date('Y-m-d',strtotime('-1 day',strtotime($_dt))); + checkNaplo($_dt); + } + */ // action if ($action == 'haladasiNaploBeiras' && ( is_array($_POST['oraId']) diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/hazifeladat-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/hazifeladat-pre.php index a4a1e696..ba0a27c4 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/hazifeladat-pre.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/hazifeladat-pre.php @@ -23,14 +23,14 @@ $ADAT['oraId' ] = $oraId = readVariable($_POST['oraId'],'id',readVariable($_GET['oraId'],'id')); // $ADAT['hazifeladatId' ] = $hazifeladatId = readVariable($_POST['hazifeladatId'],'id', readVariable($_GET['hazifeladatId'],'id')); $ADAT['hazifeladatLeiras' ] = readVariable($_POST['hazifeladatLeiras'],'string'); - $ADAT['oraAdat'] = getOraadatById($oraId); $action = readVariable($_POST['action'],'strictstring',null,array('hazifeladatBeiras')); $q = "SELECT hazifeladatId FROM oraHazifeladat WHERE oraId=%u"; $values = array($ADAT['oraId']); $ADAT['hazifeladatId'] = $hazifeladatId = db_query($q, array('modul'=>'naplo','result'=>'value','values'=>$values)); + $ADAT['oraAdat'] = getOraadatById($oraId); - if ($action=='hazifeladatBeiras') { + if (__TANAR===true && $action=='hazifeladatBeiras') { if ($hazifeladatId>0) { // update $q = "UPDATE oraHazifeladat set hazifeladatLeiras='%s' WHERE hazifeladatId=%u"; @@ -40,13 +40,18 @@ $q = "INSERT IGNORE INTO oraHazifeladat (hazifeladatLeiras,oraId) VALUES ('%s',%u)"; $values = array($ADAT['hazifeladatLeiras'],$ADAT['oraId']); $hazifeladatId = db_query($q, array('modul'=>'naplo','result'=>'insert','values'=>$values)); - } + } + if ($oraId>0 && strtotime(date('Y-m-d'))>=strtotime($ADAT['oraAdat']['dt'])) { + $leiras = readVariable($_POST['oraLeiras'],'string'); + updateHaladasiNaploOra($oraId, $leiras); + } } $q = "SELECT * FROM oraHazifeladat WHERE oraId=%u"; $values = array($ADAT['oraId']); $ADAT['hazifeladatAdat'] = db_query($q, array('modul'=>'naplo','result'=>'record','values'=>$values)); + $ADAT['oraAdat'] = getOraadatById($oraId); $TOOL['vissza'] = array('tipus'=>'vissza', |