From a6185f7270c04c7469ea1a785e5cb35d2c3fdea6 Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Tue, 21 Sep 2021 13:20:05 +0200 Subject: Rev: 4814 --- .../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 +- 13 files changed, 106 insertions(+), 34 deletions(-) (limited to 'mayor-orig/mayor-naplo/www/policy') diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/export/kreta-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/export/kreta-pre.php index 0f68d17a..63b90b8f 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/export/kreta-pre.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/export/kreta-pre.php @@ -155,7 +155,7 @@ if (!__NAPLOADMIN && !__VEZETOSEG) { $_csoportNev = getTankorCsoportByTankorId($ADAT['tankorok'][$i]['tankorId'])[0]['csoportNev']; $_osztalyIds = getTankorOsztalyaiByTanev($ADAT['tankorok'][$i]['tankorId']); - $_osztalyJel = $ADAT['osztalyAdat'][$_osztalyIds[0]]['osztalyJel']; + $_osztalyJel = kisbetus($ADAT['osztalyAdat'][$_osztalyIds[0]]['osztalyJel']); if (count($osztalyIds) > 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