From a6185f7270c04c7469ea1a785e5cb35d2c3fdea6 Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Tue, 21 Sep 2021 13:20:05 +0200 Subject: Rev: 4814 --- .../install/module-naplo/mysql/intezmeny.sql | 1 + .../install/module-naplo/mysql/tanev.sql | 6 +- mayor-orig/mayor-naplo/log/mayor-naplo.rev | 2 +- .../mayor-naplo/update/pre004800-1-intezmeny.sql | 17 +++ .../mayor-naplo/update/pre004812-1-naplo.sql | 13 ++ .../include/menu/private/hu_HU/module-naplo.php | 8 +- .../modules/naplo/haladasi/helyettesites.php | 6 +- .../naplo/intezmeny/tankorTanarHozzarendeles.php | 8 +- .../www/include/modules/naplo/intezmeny/terem.php | 6 +- .../convert-aSc Timetables Ctrl-Shift-E.php | 2 + .../www/include/modules/naplo/share/orarend.php | 12 +- .../lang/hu_HU/module-naplo/intezmeny/osztaly.php | 2 +- .../www/policy/private/naplo/export/kreta-pre.php | 2 +- .../policy/private/naplo/intezmeny/osztaly-pre.php | 38 +++++- .../www/policy/private/naplo/intezmeny/osztaly.php | 12 +- .../intezmeny/tankorTanarHozzarendeles-pre.php | 32 ++--- .../policy/private/naplo/intezmeny/terem-pre.php | 4 +- .../policy/private/naplo/intezmeny/valtas-pre.php | 14 +- .../www/policy/private/naplo/intezmeny/valtas.php | 3 +- .../private/naplo/orarend/orarendBetolto-pre.php | 11 ++ .../private/naplo/orarend/orarendModosito-pre.php | 2 +- .../private/naplo/orarend/orarendModosito.php | 5 + .../policy/private/naplo/tanev/targyBontas-pre.php | 3 +- .../policy/public/naplo/intezmeny/tanarok-pre.php | 11 +- .../www/policy/public/naplo/intezmeny/tanarok.php | 3 +- .../css/intezmeny/tankorTanarHozzarendeles.css | 4 +- .../classic/module-naplo/html/intezmeny/diak.phtml | 1 + .../module-naplo/html/intezmeny/osztaly.phtml | 62 +++++++++ .../module-naplo/html/intezmeny/tanarok.phtml | 144 ++++++++++++++------ .../html/intezmeny/tankorTanarHozzarendeles.phtml | 6 +- .../module-naplo/html/intezmeny/terem.phtml | 10 +- .../module-naplo/html/intezmeny/valtas.phtml | 147 ++++++++++++++------- .../module-naplo/html/orarend/orarendBetolto.phtml | 8 +- .../html/orarend/orarendModosito.phtml | 9 ++ .../classic/module-naplo/html/share/face.phtml | 21 +++ .../module-naplo/html/tanev/targyBontas.phtml | 2 +- .../module-naplo/javascript/naplo.jquery.min.js | 3 + 37 files changed, 486 insertions(+), 154 deletions(-) create mode 100644 mayor-orig/mayor-naplo/update/pre004800-1-intezmeny.sql create mode 100644 mayor-orig/mayor-naplo/update/pre004812-1-naplo.sql (limited to 'mayor-orig/mayor-naplo') diff --git a/mayor-orig/mayor-naplo/install/module-naplo/mysql/intezmeny.sql b/mayor-orig/mayor-naplo/install/module-naplo/mysql/intezmeny.sql index 86b27d3f..6d7c5890 100644 --- a/mayor-orig/mayor-naplo/install/module-naplo/mysql/intezmeny.sql +++ b/mayor-orig/mayor-naplo/install/module-naplo/mysql/intezmeny.sql @@ -140,6 +140,7 @@ CREATE TABLE `diak` ( `telefon` varchar(64) COLLATE utf8_hungarian_ci DEFAULT NULL, `mobil` varchar(64) COLLATE utf8_hungarian_ci DEFAULT NULL, `email` varchar(96) COLLATE utf8_hungarian_ci DEFAULT NULL, + `emailMagan` varchar(255) COLLATE utf8_hungarian_ci DEFAULT NULL, `statusz` enum('felvételt nyert','jogviszonyban van','magántanuló','egyéni munkarend','vendégtanuló','jogviszonya felfüggesztve','jogviszonya lezárva') COLLATE utf8_hungarian_ci NOT NULL, `penzugyiStatusz` enum('állami finanszírozás','térítési díj','tandíj') COLLATE utf8_hungarian_ci DEFAULT 'állami finanszírozás', `szocialisHelyzet` set('szülei elváltak','három vagy több gyerekes család','rendszeres gyermekvédelmi támogatást kap','állami gondozott','veszélyeztetett','hátrányos helyzetű','halmozottan hátrányos helyzetű','sajátos nevelési igényű') COLLATE utf8_hungarian_ci DEFAULT NULL, diff --git a/mayor-orig/mayor-naplo/install/module-naplo/mysql/tanev.sql b/mayor-orig/mayor-naplo/install/module-naplo/mysql/tanev.sql index 853375b0..16b9e1f6 100644 --- a/mayor-orig/mayor-naplo/install/module-naplo/mysql/tanev.sql +++ b/mayor-orig/mayor-naplo/install/module-naplo/mysql/tanev.sql @@ -174,8 +174,8 @@ CREATE TABLE `oraHazifeladatDiak` ( CREATE TABLE `orarendiOraTankor` ( `tanarId` int(10) unsigned NOT NULL, - `osztalyJel` varchar(7) COLLATE utf8_bin NOT NULL, - `targyJel` varchar(32) COLLATE utf8_bin NOT NULL, + `osztalyJel` varchar(7) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, + `targyJel` varchar(96) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `tankorId` int(10) unsigned NOT NULL, PRIMARY KEY (`tanarId`,`osztalyJel`,`targyJel`), KEY `orarendiOraTankor_tankorId` (`tankorId`), @@ -233,7 +233,7 @@ CREATE TABLE `orarendiOra` ( `ora` tinyint(3) unsigned NOT NULL, `tanarId` int(10) unsigned NOT NULL, `osztalyJel` varchar(7) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, - `targyJel` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `targyJel` varchar(96) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `teremId` smallint(5) unsigned DEFAULT NULL, `tolDt` date NOT NULL DEFAULT '0000-00-00', `igDt` date DEFAULT NULL, diff --git a/mayor-orig/mayor-naplo/log/mayor-naplo.rev b/mayor-orig/mayor-naplo/log/mayor-naplo.rev index eda99782..b9400eb9 100644 --- a/mayor-orig/mayor-naplo/log/mayor-naplo.rev +++ b/mayor-orig/mayor-naplo/log/mayor-naplo.rev @@ -1 +1 @@ -4793 +4814 diff --git a/mayor-orig/mayor-naplo/update/pre004800-1-intezmeny.sql b/mayor-orig/mayor-naplo/update/pre004800-1-intezmeny.sql new file mode 100644 index 00000000..9c9b6a20 --- /dev/null +++ b/mayor-orig/mayor-naplo/update/pre004800-1-intezmeny.sql @@ -0,0 +1,17 @@ +DELIMITER $$ +DROP PROCEDURE IF EXISTS upgrade_database_4800 $$ +CREATE PROCEDURE upgrade_database_4800() +BEGIN + +SET NAMES utf8 COLLATE utf8_hungarian_ci; + +IF NOT EXISTS ( + SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=DATABASE() and TABLE_NAME='diak' AND COLUMN_NAME='emailMagan' +) THEN + + alter table `diak` ADD `emailMagan` varchar(255) AFTER `email`; +END IF; + +END $$ +DELIMITER ; +CALL upgrade_database_4800(); diff --git a/mayor-orig/mayor-naplo/update/pre004812-1-naplo.sql b/mayor-orig/mayor-naplo/update/pre004812-1-naplo.sql new file mode 100644 index 00000000..d5644095 --- /dev/null +++ b/mayor-orig/mayor-naplo/update/pre004812-1-naplo.sql @@ -0,0 +1,13 @@ +DELIMITER $$ +DROP PROCEDURE IF EXISTS upgrade_database_4812 $$ + +CREATE PROCEDURE upgrade_database_4812() +BEGIN +SET NAMES utf8 COLLATE utf8_hungarian_ci; + +ALTER TABLE `orarendiOra` MODIFY `targyJel` varchar(96) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL; +ALTER TABLE `orarendiOraTankor` MODIFY `targyJel` varchar(96) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL; + +END $$ +DELIMITER ; +CALL upgrade_database_4812(); diff --git a/mayor-orig/mayor-naplo/www/include/menu/private/hu_HU/module-naplo.php b/mayor-orig/mayor-naplo/www/include/menu/private/hu_HU/module-naplo.php index 7b6c55ae..b015cf54 100644 --- a/mayor-orig/mayor-naplo/www/include/menu/private/hu_HU/module-naplo.php +++ b/mayor-orig/mayor-naplo/www/include/menu/private/hu_HU/module-naplo.php @@ -104,14 +104,16 @@ 'osszesites' => array(array('txt' => 'Összesítés')), ); $MENU['modules']['naplo']['sub']['intezmeny'] = array( - 'tankorDiak' => array(array('txt' => 'Tankörnévsor', 'url' => 'index.php?page=naplo&sub=intezmeny&f=tankorDiak')), + 'valtas'=> array(array('txt' => 'Intézmény, tanévváltás', 'url' => 'index.php?page=naplo&sub=intezmeny&f=valtas')), + 'osztaly' => array(array('txt' => 'Osztályok', 'url' => 'index.php?page=naplo&sub=intezmeny&f=osztaly')), + 'diak' => array(array('txt' => 'Diákok', 'url' => 'index.php?page=naplo&sub=intezmeny&f=diak')), 'diakTankor' => array(array('txt' => 'Diák tankörei', 'url'=> 'index.php?page=naplo&sub=intezmeny&f=diakTankor')), 'diakTankorJelentkezes' => array(array('txt' => 'Diák választott tankörei', 'url'=> 'index.php?page=naplo&sub=intezmeny&f=diakTankorJelentkezes')), - 'diak' => array(array('txt' => 'Diákok', 'url' => 'index.php?page=naplo&sub=intezmeny&f=diak')), 'diakFelmentes' => array(array('txt' => 'Felmentés', 'url' => 'index.php?page=naplo&sub=intezmeny&f=diakFelmentes')), - 'valtas'=> array(array('txt' => 'Tanévváltás', 'url' => 'index.php?page=naplo&sub=intezmeny&f=valtas')), + 'tankorDiak' => array(array('txt' => 'Tankörnévsor', 'url' => 'index.php?page=naplo&sub=intezmeny&f=tankorDiak')), 'tovabbkepzes' => array(array('txt' => 'Továbbképzés')), 'kepzesOraterv' => array(array('txt' => 'Képzés óraterv')), + 'tankorTanarHozzarendeles' => array(array('txt' => 'Tantárgyfelosztás, tankör-tanár')), ); $MENU['modules']['naplo']['sub']['orarend'] = array( 'helyettesites' => array(array('txt'=> 'Helyettesítések')), 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']; diff --git a/mayor-orig/mayor-naplo/www/lang/hu_HU/module-naplo/intezmeny/osztaly.php b/mayor-orig/mayor-naplo/www/lang/hu_HU/module-naplo/intezmeny/osztaly.php index ba29df82..6329029f 100644 --- a/mayor-orig/mayor-naplo/www/lang/hu_HU/module-naplo/intezmeny/osztaly.php +++ b/mayor-orig/mayor-naplo/www/lang/hu_HU/module-naplo/intezmeny/osztaly.php @@ -1,6 +1,6 @@ 1 || $_osztalyJel != $_csoportNev) { $EXPORT[$j][] = ''; $EXPORT[$j][] = $_csoportNev; // B oszlop: csoport név diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/osztaly-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/osztaly-pre.php index 0acd5f0f..0ef378b5 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/osztaly-pre.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/osztaly-pre.php @@ -2,11 +2,39 @@ if (_RIGHTS_OK !== true) die(); -if (__NAPLOADMIN!==true) $_SESSION['alert'][]='page:insufficient_access'; + + require_once('include/modules/naplo/share/osztaly.php'); + require_once('include/modules/naplo/share/szemeszter.php'); + require_once('include/modules/naplo/share/intezmenyek.php'); + + $ADAT['tablo']['tanevek'] = getTanevek(true); + $ADAT['tablo']['telephely'] = getTelephelyek(); + $ADAT['tablo']['telephelyIds'] = array(); + foreach ($ADAT['tablo']['telephely'] as $i => $tAdat) $ADAT['tablo']['telephelyIds'][] = $tAdat['telephelyId']; + + $ADAT['tablo']['osztalyId'] = $osztalyId = $_POST['osztalyId'] = readVariable($_POST['osztalyId'], 'id', readVariable($_GET['osztalyId'],'id',null)); + $ADAT['tablo']['tanev'] = $tanev = readVariable($_POST['tanev'], 'numeric unsigned', __TANEV, $ADAT['tablo']['tanevek']); + + //$telephelyId = readVariable($_POST['telephelyId'], 'id'); + + if ($osztalyId!='') { + $ADAT['tablo']['osztalyAdat'] = getOsztalyAdat($osztalyId, $tanev); + $ADAT['tablo']['diakok'] = getDiakok(array('tanev' => $tanev,'osztalyId'=>$osztalyId)); + $ADAT['tablo']['diakIds'] = array_keys(reindex($ADAT['tablo']['diakok'],array('diakId'))); + $ADAT['tablo']['diakKepzes'] = getKepzesByDiakId($ADAT['tablo']['diakIds'], array('result' => 'assoc')); + } + + $TOOL['osztalySelect'] = array('tipus'=>'cella','paramName' => 'osztalyId', 'post'=>array('tanev','telephelyId','dt'), 'telephelyId' => $telephelyId); + + +// ------------------------------ + +if (__NAPLOADMIN!==true) { + +} else { // naploadmin require_once('include/share/date/names.php'); require_once('include/modules/naplo/share/file.php'); -require_once('include/modules/naplo/share/osztaly.php'); require_once('include/modules/naplo/share/osztalyModifier.php'); require_once('include/modules/naplo/share/intezmenyek.php'); require_once('include/modules/naplo/share/diak.php'); @@ -24,7 +52,7 @@ require_once('include/share/net/upload.php'); define('FILE_UPLOAD_DIR',_DOWNLOADDIR.'/private/naplo/upload/'); -if (defined('__INTEZMENY') and __INTEZMENY != '') { +if (defined('__INTEZMENY') && __INTEZMENY != '') { $ADAT['tanevek'] = getTanevek(true); $ADAT['tanarok'] = getTanarok(); $ADAT['kepzesek'] = getKepzesek(); @@ -350,7 +378,11 @@ $TOOL['datumSelect'] = array('tipus'=>'sor','paramName'=>'dt','tolDt'=>$TA['eloz $TOOL['oldalFlipper'] = array('tipus' => 'cella', 'url' => array('index.php?page=naplo&sub=intezmeny&f=kepzes'), 'titleConst' => array('_KEPZES'), 'post' => array(''), 'paramName'=>'kepzesId'); // paramName ? +} // naploadmin + getToolParameters(); + + ?> \ No newline at end of file diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/osztaly.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/osztaly.php index a1c51b8c..5c2061dc 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/osztaly.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/osztaly.php @@ -1,7 +1,12 @@ =$ADAT['tanev'])) { - putOsztalyAdatokForm($ADAT); if ($ADAT['osztalyJellegek'][ $ADAT['osztalyAdat']['osztalyJellegId'] ]['kovOsztalyJellegId'] != 0) { // NyEK évfolyam @@ -44,5 +50,5 @@ putUjOsztalyForm($ADAT); } } - +} // naploadmin ?> diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/tankorTanarHozzarendeles-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/tankorTanarHozzarendeles-pre.php index 3b5f5133..e7f65b68 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/tankorTanarHozzarendeles-pre.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/tankorTanarHozzarendeles-pre.php @@ -1,7 +1,7 @@ readVariable($_POST['osztalyIds'],'id',array()), 'mkIds'=>readVariable($_POST['mkIds'],'id',array()), 'tanarNelkuliTankorok' => readVariable($_POST['tanarNelkuliTankorok'],'bool'), - 'tanarIds'=>readVariable($_POST['tanarIds'],'id',array()), + 'tanarIds'=>readVariable($_POST['tanarIds'],'id',(!__NAPLOADMIN&&!__VEZETOSEG)?array(__USERTANARID):array()), 'targyIds'=>readVariable($_POST['targyIds'],'id',array()), ); foreach ($ADAT['szuro']['targyak'] as $idx => $tAdat) $ADAT['targyAdat'][ $tAdat['targyId'] ] = $tAdat; @@ -36,29 +36,31 @@ foreach ($ADAT['tankorok'] as $tAdat) if (is_array($tAdat['tanarIds']) && count($tAdat['tanarIds'])>0) $ADAT['keszTankorDb']++; $ADAT['tankorStat'] = getTankorStat(); - if ($action == 'tankorTanarFelvesz') { + if (__NAPLOADMIN===true || __VEZETOSEG===true) { - $tankorId = readVariable($_POST['tankorId'],'id'); - $tanarId = readVariable($_POST['tanarId'],'id'); - $_JSON = array( + if ($action == 'tankorTanarFelvesz') { + + $tankorId = readVariable($_POST['tankorId'],'id'); + $tanarId = readVariable($_POST['tanarId'],'id'); + $_JSON = array( 'post' => $_POST, 'result' => tankorTanarModosit($tankorId, $tanarId, array('tanev'=>__TANEV)) - ); + ); - } elseif ($action == 'tankorTanarTorol') { + } elseif ($action == 'tankorTanarTorol') { - $_tankorId = readVariable($_POST['tankorId'],'id'); - $_tanarId = readVariable($_POST['tanarId'],'id'); - tankorTanarTorol($_tankorId,$_tanarId,array('tanev'=>$tanev)); + $_tankorId = readVariable($_POST['tankorId'],'id'); + $_tanarId = readVariable($_POST['tanarId'],'id'); + tankorTanarTorol($_tankorId,$_tanarId,array('tanev'=>$tanev)); - $_JSON = array( - 'post' => $_POST, - ); + $_JSON = array( + 'post' => $_POST, + ); + } } //dump($ADAT['tanarok']); - } ?> \ No newline at end of file diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/terem-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/terem-pre.php index 3afa9ce2..3c8c6bda 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/terem-pre.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/terem-pre.php @@ -19,6 +19,7 @@ $ADAT['teremIds'] = array_keys($ADAT['teremAdat']); $ADAT['teremTipusok'] = getSetField('naplo_intezmeny','terem','tipus'); $ADAT['teremId'] = readVariable($_POST['teremId'], 'id', readVariable($_GET['teremId'], 'id', null, $ADAT['teremIds']), $ADAT['teremIds']); + $ADAT['teremIdMod'] = readVariable($_POST['teremIdMod'], 'id', null); if ($action == 'teremAdatModositas' || $action=='ujTerem') { @@ -27,7 +28,8 @@ $D['ferohely'] = readVariable($_POST['ferohely'], 'numeric unsigned'); $D['tipus'] = readVariable($_POST['tipus'], 'enum', $ADAT['teremTipusok']); $D['telephelyId'] = readVariable($_POST['telephelyId'], 'id', readVariable($_GET['telephelyId'], 'id', null, $ADAT['telephelyIds']), $ADAT['telephelyIds']); -//echo '
'; var_dump($ADAT['teremIds']); echo ''; + $D['teremId'] = $ADAT['teremId']; + $D['teremIdMod'] = $ADAT['teremIdMod']; teremAdatModositas($D,($action=='ujTerem')); diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/valtas-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/valtas-pre.php index fb04a3ca..954eebba 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/valtas-pre.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/valtas-pre.php @@ -8,6 +8,7 @@ require_once('include/modules/naplo/share/targy.php'); require_once('include/modules/naplo/share/osztaly.php'); require_once('include/modules/naplo/share/munkakozosseg.php'); + require_once('include/modules/naplo/share/kepesites.php'); $intezmeny = readVariable($_POST['intezmeny'], 'strictstring', defined('__INTEZMENY') ? __INTEZMENY : null ); if ($action == 'intezmenyValasztas') { @@ -40,13 +41,24 @@ } } } - $ADAT['tanarok'] = getTanarok(array('extraAttrs'=>'titulus,statusz,besorolas','telephelyId'=>__TELEPHELYID)); + $ADAT['tanarok'] = getTanarok(array('extraAttrs'=>'email,titulus,statusz,besorolas','telephelyId'=>__TELEPHELYID)); $ADAT['targyak'] = getTargyak(array('arraymap'=>array('targyId'))); + + + $ADAT['kepesitesek'] = getKepesitesek(); +// $ADAT['vegzettsegek'] = getEnumField('naplo_intezmeny', 'kepesites', 'vegzettseg'); +// $ADAT['fokozatok'] = getEnumField('naplo_intezmeny', 'kepesites', 'fokozat'); +// $ADAT['specializaciok'] = getEnumField('naplo_intezmeny', 'kepesites', 'specializacio'); + +//dump($ADAT['kepesitesek']); + $lr = db_connect('naplo_intezmeny'); for($i=0; $i