diff options
author | M.Gergo | 2021-09-21 13:20:05 +0200 |
---|---|---|
committer | M.Gergo | 2021-09-21 13:20:05 +0200 |
commit | a6185f7270c04c7469ea1a785e5cb35d2c3fdea6 (patch) | |
tree | dfdea96ca1ce29c407d3a046bf82c518a26a2ba0 /mayor-orig/mayor-naplo/www/include/modules | |
parent | a50bf390cca05255feebfdce6bb70cdbb6c52733 (diff) | |
download | mayor-a6185f7270c04c7469ea1a785e5cb35d2c3fdea6.tar.gz mayor-a6185f7270c04c7469ea1a785e5cb35d2c3fdea6.zip |
Rev: 4814rev4814
Diffstat (limited to 'mayor-orig/mayor-naplo/www/include/modules')
5 files changed, 25 insertions, 9 deletions
diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/haladasi/helyettesites.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/haladasi/helyettesites.php index 2fbbc4ac..152c5371 100644 --- a/mayor-orig/mayor-naplo/www/include/modules/naplo/haladasi/helyettesites.php +++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/haladasi/helyettesites.php @@ -418,7 +418,7 @@ $error = ''; db_start_trans($lr); - $q = "INSERT INTO csere VALUES ('')"; + $q = "INSERT INTO csere VALUES (NULL)"; $csereId = db_query($q, array('fv' => 'oraMozgatas', 'modul' => 'naplo', 'result' => 'insert', 'rollback' => true), $lr); if (!$csereId) { if ($olr == '') db_close($lr); return false; } @@ -561,7 +561,7 @@ db_start_trans($lr); - $q = "INSERT INTO csere VALUES ('')"; + $q = "INSERT INTO csere VALUES (NULL)"; $csereId1 = db_query($q, array('fv' => 'oraCsere', 'modul' => 'naplo', 'result' => 'insert', 'rollback' => true), $lr); if (!$csereId1) { if ($olr == '') db_close($lr); return false; } @@ -614,7 +614,7 @@ db_start_trans($lr); - $q = "INSERT INTO csere VALUES ('')"; + $q = "INSERT INTO csere VALUES (NULL)"; $csereId2 = db_query($q, array('fv' => 'oraCsere', 'modul' => 'naplo', 'result' => 'insert', 'rollback' => true), $lr); if (!$csereId2) { if ($olr == '') db_close($lr); return false; } diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/intezmeny/tankorTanarHozzarendeles.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/intezmeny/tankorTanarHozzarendeles.php index 600ee897..4e178097 100644 --- a/mayor-orig/mayor-naplo/www/include/modules/naplo/intezmeny/tankorTanarHozzarendeles.php +++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/intezmeny/tankorTanarHozzarendeles.php @@ -158,7 +158,7 @@ hetiMunkaora,hetiKotelezoOraszam, hetiLekotottMinOraszam,hetiLekotottMaxOraszam,hetiKotottMaxOraszam FROM tanar WHERE statusz IN ('határozatlan idejű','határozott idejű','külső óraadó') - AND beDt<'".$_TANEV['kezdesDt']."' AND (kiDt IS NULL OR kiDt<'".$_TANEV['zarasDt']."') + AND beDt<='".$_TANEV['kezdesDt']."' AND (kiDt IS NULL OR kiDt<'".$_TANEV['zarasDt']."') AND tanarId IN (".implode(',', array_fill(0, count($Szuro['tanarIds']), '%u')).")"; $v = array_merge($v, $Szuro['tanarIds']); } @@ -168,7 +168,7 @@ hetiLekotottMinOraszam,hetiLekotottMaxOraszam,hetiKotottMaxOraszam FROM tanar LEFT JOIN mkTanar USING (tanarId) WHERE statusz IN ('határozatlan idejű','határozott idejű','külső óraadó') - AND beDt<'".$_TANEV['kezdesDt']."' AND (kiDt IS NULL OR kiDt<'".$_TANEV['zarasDt']."') + AND beDt<='".$_TANEV['kezdesDt']."' AND (kiDt IS NULL OR kiDt<'".$_TANEV['zarasDt']."') AND mkId IN (".implode(',', array_fill(0, count($Szuro['mkIds']), '%u')).")"; $v = array_merge($v, $Szuro['mkIds']); } @@ -179,7 +179,7 @@ FROM tanar LEFT JOIN tanarKepesites USING (tanarId) LEFT JOIN kepesitesTargy USING (kepesitesId) WHERE statusz IN ('határozatlan idejű','határozott idejű','külső óraadó') - AND beDt<'".$_TANEV['kezdesDt']."' AND (kiDt IS NULL OR kiDt<'".$_TANEV['zarasDt']."') + AND beDt<='".$_TANEV['kezdesDt']."' AND (kiDt IS NULL OR kiDt<'".$_TANEV['zarasDt']."') AND targyId IN (".implode(',', array_fill(0, count($targyIds), '%u')).")"; $v = array_merge($v, $targyIds); $q[] = "SELECT tanarId, concat_ws(' ',viseltNevElotag,viseltCsaladinev,viseltUtonev) as tanarNev, @@ -188,7 +188,7 @@ FROM tanar LEFT JOIN mkTanar USING (tanarId) LEFT JOIN targy USING (mkId) WHERE statusz IN ('határozatlan idejű','határozott idejű','külső óraadó') - AND beDt<'".$_TANEV['kezdesDt']."' AND (kiDt IS NULL OR kiDt<'".$_TANEV['zarasDt']."') + AND beDt<='".$_TANEV['kezdesDt']."' AND (kiDt IS NULL OR kiDt<'".$_TANEV['zarasDt']."') AND targyId IN (".implode(',', array_fill(0, count($targyIds), '%u')).")"; $v = array_merge($v, $targyIds); diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/intezmeny/terem.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/intezmeny/terem.php index ee640a54..82326db2 100644 --- a/mayor-orig/mayor-naplo/www/include/modules/naplo/intezmeny/terem.php +++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/intezmeny/terem.php @@ -3,7 +3,7 @@ function teremAdatModositas($ADAT,$uj=false) { if ($uj===true) { - $q = "INSERT INTO `terem` (`teremId`,`leiras`,`tipus`,`ferohely`,`telephelyId`) VALUES ((SELECT max(teremId)+1 FROM terem AS s),'%s','%s',%u,NULL)"; + $q = "INSERT INTO `terem` (`teremId`,`leiras`,`tipus`,`ferohely`,`telephelyId`) VALUES ((SELECT IF(teremId>0,max(teremId)+1,1) FROM terem AS s),'%s','%s',%u,NULL)"; $v = array($ADAT['leiras'], $ADAT['tipus'], intval($ADAT['ferohely'])); } else { $q = "UPDATE `terem` SET `leiras`='%s',`tipus`='%s'"; @@ -13,6 +13,10 @@ if (isset($ADAT['telephelyId'])) { $q .= ",`telephelyId`=%u"; $v[] = $ADAT['telephelyId']; } else { $q .= ",`telephelyId`=NULL"; } + if ($ADAT['teremIdMod']!='' && $ADAT['teremIdMod']!=$ADAT['teremId']) { + $q .= ",`teremId`=".intval($ADAT['teremIdMod']); + } + $q .= " WHERE teremId=%u"; $v[] = $ADAT['teremId']; } diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/orarend/convert-aSc Timetables Ctrl-Shift-E.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/orarend/convert-aSc Timetables Ctrl-Shift-E.php index 01e14858..fe656b3a 100644 --- a/mayor-orig/mayor-naplo/www/include/modules/naplo/orarend/convert-aSc Timetables Ctrl-Shift-E.php +++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/orarend/convert-aSc Timetables Ctrl-Shift-E.php @@ -72,7 +72,9 @@ dump($Tanarok); $oJelek = explode(',', $rec[4]); if (count($oJelek) > 1) $osztalyJel = $oJelek[0].'...'; // Nem fér ki több, csak jelezzük, hogy volt még... else $osztalyJel = $oJelek[0]; // nem érdemes szétvágni, mert nem feleltethető meg... + $osztalyJel = substr($osztalyJel,0,16); $targyJel = mb_convert_encoding($rec[6],'UTF-8','ISO-8859-2'); //.$rec[12]; + $targyJel = substr($targyJel,0,32); $teremIds = explode(',',$rec[9]); // szétvág $tolDt = $ADAT['tolDt']; $igDt = $ADAT['igDt']; diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/share/orarend.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/share/orarend.php index 45d8754c..2180b9b1 100644 --- a/mayor-orig/mayor-naplo/www/include/modules/naplo/share/orarend.php +++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/share/orarend.php @@ -20,7 +20,17 @@ } return getOrarend($TANKORIDK, array('tolDt'=>$tolDt, 'igDt'=>$igDt)); } - + + function getLebegoOrarendiOra($tanarId, $SET=array('tolDt'=>'','igDt'=>'')) { + $tolDt = $SET['tolDt']; $igDt = $SET['igDt']; + initTolIgDt(__TANEV, $tolDt, $igDt); + + $q = "SELECT * FROM orarendiOra LEFT JOIN orarendiOraTankor USING (tanarId,osztalyJel,targyJel) + WHERE igDt>='%s' AND tolDt<='%s' AND tanarId=%u"; + $v = array($tolDt, $igDt, $tanarId); + $RES = db_query($q, array('fv' => 'getLebegoOrarendiOra', 'modul' => 'naplo', 'result' => 'indexed', 'values' => $v)); + return $RES; + } // ++ function getOrarendByTanarId($tanarId, $SET=array('tolDt'=>'','igDt'=>'', 'telephely'=>null, 'orarendiOraTankor'=>false)) { $tolDt = $SET['tolDt']; $igDt = $SET['igDt']; |