From 0e8de1ea03765f564bc1757504e0d8c14334b79e Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Tue, 19 Nov 2019 00:13:36 +0100 Subject: Rev: 4572 --- .../private/naplo/orarend/orarendModosito-pre.php | 43 ++++++++++++++++++---- 1 file changed, 36 insertions(+), 7 deletions(-) (limited to 'mayor-orig/mayor-naplo/www/policy/private') diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/orarend/orarendModosito-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/orarend/orarendModosito-pre.php index 17acc6ff..e0fe07db 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/orarend/orarendModosito-pre.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/orarend/orarendModosito-pre.php @@ -33,7 +33,14 @@ $refTolDt = readVariable($_POST['refTolDt'],'date'); $refIgDt = readVariable($_POST['refIgDt'],'date'); - if ($refTolDt=='' || $refIgDt=='') $_SESSION['alert'][] = 'info:nincs_intervallum'; + if ($refTolDt=='' || $refIgDt=='') { + //$_SESSION['alert'][] = 'info:nincs_intervallum'; + $refTolIgNincsKitoltve = true; + } + if ($tanarId=='' && $osztalyId =='') { + $missingTanarOsztaly = true; + } + $ADAT['telephelyek'] = getTelephelyek(); $ADAT['haladasiModositando'] = readVariable($_POST['haladasiModositando'], 'bool'); @@ -67,9 +74,18 @@ // itt ellenőrizzük, hogy a dt (referenciadátum) beleesik-e a tolIg be! if (isset($tolDt) && isset($refTolDt) && isset($refIgDt)) { - if (strtotime($tolDt)strtotime($refIgDt)) $_SESSION['alert'][] = 'message:wrong_data:hibás referenciadátum!'; - if (strtotime($refTolDt)>strtotime($refIgDt)) $_SESSION['alert'][] = 'message:wrong_data:hibás referenciadátum!'; + if (strtotime($tolDt)strtotime($refIgDt)) { + // $_SESSION['alert'][] = 'message:wrong_data:hibás referenciadátum!'; + $refDtHibas = true; + } + if (strtotime($refTolDt)>strtotime($refIgDt)) { + // $_SESSION['alert'][] = 'message:wrong_data:hibás referenciadátum!'; + $refDtHibas = true; + } } if ($action==='do') { $HOT = readVariable($_POST['HALADASIORATOROL'],'id'); @@ -262,6 +278,9 @@ 'tolDt' => date('Y-m-d', strtotime('last Monday', strtotime($_TANEV['kezdesDt']))), // 'tolDt' => $_TANEV['elozoZarasDt'], 'igDt' => $_TANEV['kovetkezoKezdesDt'], + 'kotelezo' => true, + 'hianyzik' => $refTolIgNincsKitoltve, + 'hibas' => $refDtHibas ); $TOOL['datumTolIgSelect'] = array( 'tipus' => 'sor', 'title' => 'REFDT', @@ -272,18 +291,28 @@ 'override' => true, 'tolDt' => date('Y-m-d', strtotime('last Monday', strtotime($_TANEV['kezdesDt']))), 'igDt' => $_TANEV['zarasDt'], + 'kotelezo' => true, + 'hianyzik' => $refTolIgNincsKitoltve, + 'hibas' => $refDtHibas ); + //$TOOL['orarendiHetSelect'] = array('tipus'=>'cella' , 'paramName' => 'het', 'post'=>array('targyId','tankorId','osztalyId','tanarId'), 'disabled'=>true); // if ($osztalyId!='' || $diakId!='') { // $TOOL['diakSelect'] = array('tipus'=>'sor','paramName'=>'diakId', 'post'=>array('refTolDt','refIgDt','tolDt','osztalyId','telephely')); // } else // $TOOL['munkakozossegSelect'] = array('tipus'=>'sor', 'paramName'=>'mkId', 'post'=>array('refTolDt','refIgDt','tolDt','telephely')); - $TOOL['tanarSelect'] = array('tipus'=>'cella', 'paramName'=>'tanarId', 'post'=>array('refTolDt','refIgDt','tolDt','telephely')); - $TOOL['osztalySelect']= array('tipus'=>'cella', 'paramName'=>'osztalyId', 'post'=>array('refTolDt','refIgDt','tolDt')); + $TOOL['tanarSelect'] = array('tipus'=>'cella', 'paramName'=>'tanarId', 'post'=>array('refTolDt','refIgDt','tolDt','telephely'), + 'kotelezo'=>true, + 'hianyzik'=>$missingTanarOsztaly + ); + $TOOL['osztalySelect']= array('tipus'=>'cella', 'paramName'=>'osztalyId', 'post'=>array('refTolDt','refIgDt','tolDt'), + 'kotelezo'=>true, + 'hianyzik'=>$missingTanarOsztaly + ); // $TOOL['telephelySelect'] = array('tipus'=>'cella', 'paramName'=>'telephely', 'post'=>array('refTolDt','refIgDt','tolDt','mkId','tanarId')); // $TOOL['teremSelect'] = array('tipus'=>'cella', 'paramName'=>'teremId', 'telephely'=>$telephely, 'post'=>array('refTolDt','refIgDt','tolDt','telephely')); - if ($osztalyId!='' || $tanarId!='' || $diakId!='' || $mkId!='') $TOOL['tankorSelect'] = array('tipus'=>'sor','paramName'=>'tankorId', 'post'=>array('refTolDt','refIgDt','tolDt','osztalyId','targyId','tanarId','diakId','telephely')); +// if ($osztalyId!='' || $tanarId!='' || $diakId!='' || $mkId!='') $TOOL['tankorSelect'] = array('tipus'=>'sor','paramName'=>'tankorId', 'post'=>array('refTolDt','refIgDt','tolDt','osztalyId','targyId','tanarId','diakId','telephely')); getToolParameters(); ?> -- cgit v1.2.3