diff options
author | M.Gergo | 2019-03-08 21:20:34 +0100 |
---|---|---|
committer | M.Gergo | 2019-03-08 21:20:34 +0100 |
commit | f51c9ed2abe5c68211bb3736be5f70b1fe2c9ec0 (patch) | |
tree | e13e60e4b94a3b58f1e2bfbe271102c8f04b67bd /mayor-orig/www/policy/private/naplo/tanmenet | |
parent | c76a004b0135786f2742283f8d5f917106f58bd8 (diff) | |
download | mayor-f51c9ed2abe5c68211bb3736be5f70b1fe2c9ec0.tar.gz mayor-f51c9ed2abe5c68211bb3736be5f70b1fe2c9ec0.zip |
további rendrakás
Diffstat (limited to 'mayor-orig/www/policy/private/naplo/tanmenet')
14 files changed, 0 insertions, 490 deletions
diff --git a/mayor-orig/www/policy/private/naplo/tanmenet/tanmenet-pre.php b/mayor-orig/www/policy/private/naplo/tanmenet/tanmenet-pre.php deleted file mode 100644 index 58d44e40..00000000 --- a/mayor-orig/www/policy/private/naplo/tanmenet/tanmenet-pre.php +++ /dev/null @@ -1,5 +0,0 @@ -<?php - - header('Location: '.location('index.php?page=naplo&sub=tanmenet&f=tanmenetTankor')); - -?> diff --git a/mayor-orig/www/policy/private/naplo/tanmenet/tanmenet.php b/mayor-orig/www/policy/private/naplo/tanmenet/tanmenet.php deleted file mode 100644 index e69de29b..00000000 --- a/mayor-orig/www/policy/private/naplo/tanmenet/tanmenet.php +++ /dev/null diff --git a/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetInfo-pre.php b/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetInfo-pre.php deleted file mode 100644 index a60e71d0..00000000 --- a/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetInfo-pre.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php - - if (_RIGHTS_OK !== true) die(); - if (!__DIAK && !__TITKARSAG && !__TANAR && !__NAPLOADMIN && !__VEZETOSEG) $_SESSION['alert'][] = 'page:insufficient_access'; - - require_once('include/modules/naplo/share/tanar.php'); - require_once('include/modules/naplo/share/tankor.php'); - require_once('include/modules/naplo/share/targy.php'); - require_once('include/modules/naplo/share/tanmenet.php'); - require_once('include/share/date/names.php'); - - $ADAT['tanmenetId'] = $tanmenetId = readVariable($_POST['tanmenetId'], 'id', readVariable($_GET['tanmenetId'], 'id')); - if (isset($tanmenetId)) { - - $ADAT['tanmenetAdat'] = getTanmenetAdat($tanmenetId); - $ADAT['tanarId'] = $tanarId = $ADAT['tanmenetAdat']['tanarId']; - $ADAT['targyId'] = $targyId = $ADAT['tanmenetAdat']['targyId']; - - } else { - $ADAT['tanarId'] = $tanarId = readVariable($_POST['tanarId'], 'id', (!isset($_POST['targyId'])&&__TANAR)?__USERTANARID:null); - $ADAT['targyId'] = $targyId = readVariable($_POST['targyId'], 'id'); - } - - $TOOL['tanarSelect'] = array('tipus'=>'cella', 'paramName'=>'tanarId', 'post'=>array('targyId')); - $TOOL['targySelect'] = array('tipus'=>'cella', 'paramName'=>'targyId', 'post'=>array('tanarId')); - if (isset($tanarId) || isset($targyId)) { - $TOOL['tanmenetSelect'] = array('tipus'=>'sor', 'paramName'=>'tanmenetId', 'post'=>array('tanarId','targyId')); - $TOOL['oldalFlipper'] = array('tipus' => 'cella', 'url' => array('index.php?page=naplo&sub=tanmenet&f=tanmenetModositas'), - 'titleConst' => array('_MODOSITAS'), 'post' => array('tanarId','targyId'), - 'paramName'=>'tanmenetId'); - } - getToolParameters(); - - -?> diff --git a/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetInfo.php b/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetInfo.php deleted file mode 100644 index 9d2b70e0..00000000 --- a/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetInfo.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php - - if (_RIGHTS_OK !== true) die(); - - global $ADAT; - - if (isset($ADAT['tanmenetId'])) putTanmenetInfo($ADAT); - else { - if ($skin != 'ajax') formBegin(array('class'=>"tanmenet")); - echo '<input type="hidden" name="tanmenetId" id="informTanmenetId" value="" />'."\n"; - echo '<p class="kiemelt">Nincs tanmenet megadva!</p>'; - if ($skin != 'ajax') formEnd(); - } - -?> diff --git a/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetJovahagyas-pre.php b/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetJovahagyas-pre.php deleted file mode 100644 index d173ab93..00000000 --- a/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetJovahagyas-pre.php +++ /dev/null @@ -1,88 +0,0 @@ -<?php - - if (_RIGHTS_OK !== true) die(); - if (!__TANAR && !__NAPLOADMIN && !__VEZETOSEG) $_SESSION['alert'][] = 'page:insufficient_access'; - - - require_once('include/modules/naplo/share/tanar.php'); - require_once('include/modules/naplo/share/tankor.php'); - require_once('include/modules/naplo/share/targy.php'); - require_once('include/modules/naplo/share/tanmenet.php'); - require_once('include/modules/naplo/share/munkakozosseg.php'); - - - if (__TANAR) $ADAT['vezetettMkIds'] = getVezetettMunkakozossegByTanarId(__USERTANARID); - if (!is_array($ADAT['vezetettMkIds'])) $ADAT['vezetettMkIds'] = array(); - - $mkId = readVariable($_POST['mkId'], 'id'); - if ($mkId == '' && count($ADAT['vezetettMkIds'])>0) $mkId = $ADAT['vezetettMkIds'][0]; - $ADAT['mkId'] = $mkId; - - if ($mkId != 0) { - - - $ADAT['tanarok'] = getTanarok(array('mkId'=>$mkId, 'tanev'=>__TANEV, 'result'=>'assoc')); - $ADAT['tanarIds'] = array_keys($ADAT['tanarok']); - $ADAT['tanarId'] = $tanarId = readVariable($_POST['tanarId'], 'id', null, $ADAT['tanarIds']); - $Filter = array(); - if ($tanarId != '') { - $tTankorIds = getTankorByTanarId($tanarId, __TANEV, array('csakId'=>true)); - if (is_array($tTankorIds) && count($tTankorIds) > 0) $Filter[] = 'tankor.tankorId IN ('.implode(',',$tTankorIds).')'; - } - $ADAT['osztalyId'] = $osztalyId = readVariable($_POST['osztalyId'], 'id', null); - if ($osztalyId != '') { - $oTankorIds = getTankorByOsztalyId($osztalyId, __TANEV, array('csakId'=>true)); - if (is_array($oTankorIds) && count($oTankorIds) > 0) $Filter[] = 'tankor.tankorId IN ('.implode(',',$oTankorIds).')'; - - } - define('__JOVAHAGYHAT', __VEZETOSEG || __NAPLOADMIN || in_array($mkId, $ADAT['vezetettMkIds'])); - $ADAT['tankorok'] = getTankorByMkId($mkId, __TANEV, array('csakId'=>false, 'filter'=>$Filter)); - $ADAT['tankorIds'] = array(); - foreach ($ADAT['tankorok'] as $tAdat) { - $ADAT['tankorIds'][] = $tAdat['tankorId']; - } - if (count($ADAT['tankorIds']) > 0) { - $ADAT['tankorTanmenet'] = getTanmenetByTankorIds($ADAT['tankorIds']); - $ADAT['tanmenetAdat'] = $tanmenetIds = array(); - foreach ($ADAT['tankorTanmenet'] as $tankorId => $tanmenetId) { - if (!in_array($tanmenetId, $tanmenetIds)) $tanmenetIds[] = $tanmenetId; - } - foreach ($tanmenetIds as $tanmenetId) $ADAT['tanmenetAdat'][$tanmenetId] = getTanmenetAdat($tanmenetId); - } // vannak tankorok - - - if ($action == 'tanmenetModositas' && __JOVAHAGYHAT) { - - $tanmenetId = readVariable($_POST['tanmenetId'], 'id'); - $statusz = readVariable($_POST['statusz'], 'enum', array('új','kész','jóváhagyott','publikus')); - if ($tanmenetId != '' && $statusz != '') { - $D = array( - 'tanmenetNev' => $ADAT['tanmenetAdat'][$tanmenetId]['tanmenetNev'], - 'oraszam' => $ADAT['tanmenetAdat'][$tanmenetId]['oraszam'], - 'evfolyamJel' => $ADAT['tanmenetAdat'][$tanmenetId]['evfolyamJel'], - 'tanmenetId' => $tanmenetId, - 'ujStatusz' => $statusz - ); - if (tanmenetAdatModositas($D)) $ADAT['tanmenetAdat'][$tanmenetId]['statusz'] = $statusz; - } - } - - } // van mkId - - $TOOL['munkakozossegSelect'] = array('tipus'=>'cella', 'paramName'=>'mkId', 'post'=>array('tanarId','osztalyId')); - if ($mkId != '') { - $TOOL['tanarSelect'] = array('tipus'=>'cella', 'paramName'=>'tanarId', 'mkId'=>$mkId, 'post'=>array('mkId','osztalyId')); - $TOOL['osztalySelect'] = array('tipus'=>'cella', 'paramName'=>'osztalyId', 'mkId'=>$mkId, 'post'=>array('mkId','tanarId')); - } -/* - $TOOL['targySelect'] = array('tipus'=>'cella', 'paramName'=>'targyId', 'post'=>array()); - if (isset($tanarId) || isset($targyId)) { - $TOOL['tanmenetSelect'] = array('tipus'=>'cella', 'paramName'=>'tanmenetId', 'post'=>array('tanarId','targyId')); - $TOOL['oldalFlipper'] = array('tipus' => 'cella', 'url' => array('index.php?page=naplo&sub=tanmenet&f=tanmenetModositas'), - 'titleConst' => array('_MODOSITAS'), 'post' => array('tanarId','targyId'), - 'paramName'=>'tanmenetId'); - } -*/ - getToolParameters(); - -?>
\ No newline at end of file diff --git a/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetJovahagyas.php b/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetJovahagyas.php deleted file mode 100644 index f0a92c71..00000000 --- a/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetJovahagyas.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - - if (_RIGHTS_OK !== true) die(); - - global $ADAT; - - putTanmenetJovahagyas($ADAT); - -?>
\ No newline at end of file diff --git a/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetLeadas-pre.php b/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetLeadas-pre.php deleted file mode 100644 index a71c14b0..00000000 --- a/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetLeadas-pre.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php - - if (_RIGHTS_OK !== true) die(); - if (!__NAPLOADMIN && !__VEZETOSEG) $_SESSION['alert'][] = 'page:insufficient_access'; - - require_once('include/modules/naplo/share/tanar.php'); - require_once('include/modules/naplo/share/tankor.php'); - require_once('include/modules/naplo/share/targy.php'); - require_once('include/modules/naplo/share/szemeszter.php'); - require_once('include/modules/naplo/share/tanmenet.php'); -// require_once('include/share/date/names.php'); - - $tanev = $ADAT['tanev'] = readVariable($_POST['tanev'], 'numeric unsigned', defined('__TANEV')?__TANEV:null); - $ADAT['idoszak'] = getIdoszakByTanev(array('tanev' => $ADAT['tanev'], 'tipus' => array('tanmenet leadás'), 'tolDt' => date('Y-m-d'), 'igDt' => date('Y-m-d'))); - define('__TANMENETLEADASIDOSZAK',(count($ADAT['idoszak']) > 0)); - if (!__TANMENETLEADASIDOSZAK) $_SESSION['alert'][] = 'info:nincs_tanmenetleadas_idoszak:tanev='.$ADAT['tanev']; - else $_SESSION['alert'][] = 'info:tanmenetleadas_idoszak_vege:'.substr($ADAT['idoszak'][0]['igDt'],0,10); - - $ADAT['tanarok'] = getTanarok(array('tanev' => $tanev)); - - $ADAT['tankorIds'] = array(); - for ($i = 0; $i < count($ADAT['tanarok']); $i++) { - $tanarId = $ADAT['tanarok'][$i]['tanarId']; - $ADAT['tanarok'][$i]['tankorIds'] = getTankorByTanarId($tanarId, __TANEV, array('csakId' => true)); - $ADAT['tankorIds'] = array_unique(array_merge($ADAT['tankorIds'], $ADAT['tanarok'][$i]['tankorIds'])); - } - $ADAT['tankorok'] = getTankorAdatByIds($ADAT['tankorIds'], array('tanev' => __TANEV, 'dt' => $_TANEV['kezdesDt'])); - $ADAT['tankorTanmenet'] = getTanmenetByTankorIds($ADAT['tankorIds'], array('tanev' => $ADAT['tanev'])); - $ADAT['tanmenetek'] = getTanmenetek(); - -//echo '<pre>'; var_dump($ADAT['tanmenetek']); echo '<pre>'; - // Melyik tanárnak hány "leadott jóváhagyott" / "leadott, nem jóváhagyott" / "nem leadott" tanmenet-tankör hozzárendelése van? - for ($i = 0; $i < count($ADAT['tanarok']); $i++) { - $tanarId = $ADAT['tanarok'][$i]['tanarId']; - foreach ($ADAT['tanarok'][$i]['tankorIds'] as $tankorId) { - if (isset($ADAT['tankorTanmenet'][$tankorId])) { - $tanmenetId = $ADAT['tankorTanmenet'][$tankorId]; - if ( - $ADAT['tanmenetek'][$tanmenetId]['statusz'] == 'jóváhagyott' - || $ADAT['tanmenetek'][$tanmenetId]['statusz'] == 'publikus' - ) $ADAT['tanarok'][$i]['db']['jóváhagyott']++; - elseif ($ADAT['tanmenetek'][$tanmenetId]['statusz'] == 'kész') $ADAT['tanarok'][$i]['db']['kész']++; - else $ADAT['tanarok'][$i]['db']['új']++; -// if ($ADAT['tanmenetek'][$tanmenetId]['jovahagyva']) $ADAT['tanarok'][$i]['db']['jovahagyva']++; -// else $ADAT['tanarok'][$i]['db']['nincs jovahagyva']++; - } else { - $ADAT['tanarok'][$i]['db']['hiányzik']++; - } - } - } -?> diff --git a/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetLeadas.php b/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetLeadas.php deleted file mode 100644 index 12e8e920..00000000 --- a/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetLeadas.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - - if (_RIGHTS_OK !== true) die(); - - global $ADAT; - - putTanmenetLeadas($ADAT); - -?> diff --git a/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetModositas-pre.php b/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetModositas-pre.php deleted file mode 100644 index 0afd8498..00000000 --- a/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetModositas-pre.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php - - if (_RIGHTS_OK !== true) die(); - if (!__TANAR && !__NAPLOADMIN && !__VEZETOSEG) $_SESSION['alert'][] = 'page:insufficient_access'; - - require_once('include/modules/naplo/share/tanar.php'); - require_once('include/modules/naplo/share/tankor.php'); - require_once('include/modules/naplo/share/targy.php'); - require_once('include/modules/naplo/share/tanmenet.php'); - require_once('include/modules/naplo/share/munkakozosseg.php'); - require_once('include/share/date/names.php'); - - $ADAT['tanarId'] = $tanarId = readVariable($_POST['tanarId'], 'id', __TANAR?__USERTANARID:null); - $ADAT['targyId'] = $targyId = readVariable($_POST['targyId'], 'id'); - - $ADAT['tanmenetId'] = $tanmenetId = readVariable($_POST['tanmenetId'], 'id', readVAriable($_GET['tanmenetId'], 'id')); - if (isset($tanmenetId)) { - - $ADAT['evfolyamJelek'] = getEvfolyamJelek(array('result'=>'idonly')); - $ADAT['tanmenetAdat'] = getTanmenetAdat($tanmenetId); - $ADAT['mkAdat'] = getMunkakozossegByTargyId($ADAT['tanmenetAdat']['targyId']); - $ADAT['tanarId'] = $tanarId = $ADAT['tanmenetAdat']['tanarId']; - $ADAT['targyId'] = $targyId = $ADAT['tanmenetAdat']['targyId']; - define('__KESZITO', (__USERTANARID == $ADAT['tanmenetAdat']['tanarId'])); - define('__MKVEZETO', (__USERTANARID == $ADAT['mkAdat']['mkVezId'])); - define('__MODOSITHAT', - __NAPLOADMIN // admin bármikor - || ( - (__VEZETOSEG || __KESZITO || __MKVEZETO) // vezetőségi tag, mk.vez és a létrehozó szaktanár... - && ($ADAT['tanmenetAdat']['statusz'] == 'új' || $ADAT['tanmenetAdat']['statusz'] == 'kész') // ... ha még nincs jóváhagyva - ) - ); - if (__NAPLOADMIN || __VEZETOSEG || __MKVEZETO) $ADAT['statusz'] = array('új','kész','jóváhagyott','publikus','elavult'); - elseif (__KESZITO) { - if (in_array($ADAT['tanmenetAdat']['statusz'], array('új','kész'))) { $ADAT['statusz'] = array('új','kész'); } - else { $ADAT['statusz'] = array('jóváhagyott','publikus'); } - } else $ADAT['statusz'] = array(); - - if ($action != '') { - if (__MODOSITHAT && $action == 'tanmenetTemakorModositas') { - $ADAT['temakor']['oraszam'] = readVariable($_POST['oraszam'], 'numeric unsigned'); - $ADAT['temakor']['temakorMegnevezes'] = readVariable($_POST['temakorMegnevezes'], 'string', ''); - tanmenetTemakorModositas($ADAT); - $ADAT['tanmenetAdat'] = getTanmenetAdat($tanmenetId); - } elseif ($action == 'tanmenetAdatModositas') { - if ((__NAPLOADMIN === true || __KESZITO) && readVariable($_POST['tanmenetTorol'],'numeric unsigned') == 1) { - if (tanmenetTorol($tanmenetId)===false) { - $_SESSION['alert'][] = 'info:error:hiba a tanmenet törlésekor'; - } else { - $_SESSION['alert'][] = 'info:success'; - unset ($ADAT); - unset($tanmenetId); - } - } else { - if (__MODOSITHAT) { // Az óraszám és évfolyam-jel is változtatható - $DAT['oraszam'] = readVariable($_POST['oraszam'], 'numeric unsigned'); - $DAT['evfolyamJel'] = readVariable($_POST['evfolyamJel'], 'numeric unsigned'); - } else { // csak a tanmenet neve és státusza változtatható - $DAT = $ADAT['tanmenetAdat']; - } - $DAT['tanmenetId'] = $tanmenetId; - $DAT['tanmenetNev'] = readVariable($_POST['tanmenetNev'], 'string'); - $DAT['ujStatusz'] = readVariable($_POST['statusz'], 'enum', $ADAT['tanmenetAdat']['statusz'], $ADAT['statusz']); - tanmenetAdatModositas($DAT); - $ADAT['tanmenetAdat'] = getTanmenetAdat($tanmenetId); - } - } - } - } - - - $TOOL['tanarSelect'] = array('tipus'=>'cella', 'paramName'=>'tanarId', 'post'=>array()); - $TOOL['targySelect'] = array('tipus'=>'cella', 'paramName'=>'targyId', 'post'=>array()); - if (isset($tanarId) || isset($targyId) || isset($tanmenetId)) { - $TOOL['tanmenetSelect'] = array('tipus'=>'sor', 'paramName'=>'tanmenetId', 'post'=>array('tanarId','targyId')); - $TOOL['oldalFlipper'] = array('tipus' => 'cella', 'url' => array('index.php?page=naplo&sub=tanmenet&f=tanmenetInfo'), - 'titleConst' => array('_MUTAT'), 'post' => array('tanmenetId','tanarId','targyId'), - 'paramName'=>'tanmenetId'); - } - getToolParameters(); - - -?> diff --git a/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetModositas.php b/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetModositas.php deleted file mode 100644 index e741e222..00000000 --- a/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetModositas.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - - if (_RIGHTS_OK !== true) die(); - - global $ADAT; - - if (isset($ADAT['tanmenetId'])) putTanmenetModositasForm($ADAT); - -?> diff --git a/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetTankor-pre.php b/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetTankor-pre.php deleted file mode 100644 index 74ca1a6e..00000000 --- a/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetTankor-pre.php +++ /dev/null @@ -1,95 +0,0 @@ -<?php - - if (_RIGHTS_OK !== true) die(); - if (!__TANAR && !__VEZETOSEG && !__NAPLOADMIN) $_SESSION['alert'][] = 'page:insufficient_access'; - - require_once('include/modules/naplo/share/tanar.php'); - require_once('include/modules/naplo/share/szemeszter.php'); -// require_once('include/modules/naplo/share/osztaly.php'); - require_once('include/modules/naplo/share/tankor.php'); -// require_once('include/modules/naplo/share/munkakozosseg.php'); - require_once('include/modules/naplo/share/targy.php'); - require_once('include/modules/naplo/share/tanmenet.php'); - - $ADAT['tanev'] = __TANEV; - $ADAT['tanarId'] = $tanarId = readVariable($_POST['tanarId'], 'id', readVariable($_GET['tanarId'], 'id', __TANAR?__USERTANARID:null)); - - if (isset($tanarId)) { - $ADAT['tankorIds'] = getTankorByTanarId($tanarId, __TANEV, array('csakId' => true)); - $ADAT['tankorok'] = getTankorAdatByIds($ADAT['tankorIds'], array('tanev' => __TANEV, 'dt' => $_TANEV['kezdesDt'])); - $ADAT['tankorTanmenet'] = getTanmenetByTankorIds($ADAT['tankorIds'], array('tanev' => $ADAT['tanev'])); - $tanmenetAdat = $ADAT['tanmenetek'] = array(); - if (is_array($ADAT['tankorok'])) - foreach ($ADAT['tankorok'] as $tankorId => $tAdat) { - if (!is_array($ADAT['tanmenetek'][ $tAdat['targyId'] ])) { - $ADAT['tanmenetek'][ $tAdat['targyId'] ] = getTanmenetByTargyId($tAdat['targyId'], array('result'=>'assoc')); - if (is_array($ADAT['tanmenetek'][ $tAdat['targyId'] ])) - foreach ($ADAT['tanmenetek'][ $tAdat['targyId'] ] as $tanmenetId => $tanAdat) { - // Mikor módosítható az adott tanmenet? - $ADAT['tanmenetek'][ $tAdat['targyId'] ][ $tanmenetId ]['modosithato'] = ( - __NAPLOADMIN // admin bármikor - || ( - (__VEZETOSEG || __USERTANARID == $tanAdat['tanarId']) // vezetőségi tag és a létrehozó szaktanár... - && ($tanAdat['statusz'] == 'új' || $tanAdat['statusz'] == 'kész') // ... ha még nincs jóváhagyva - ) - - ); - $ADAT['tanmenetAdat'][$tanmenetId] = $tanAdat; - } - } - } - -//echo '<pre>'; var_dump($ADAT['tanmenetek']); echo '</pre>'; - - $ADAT['idoszak'] = getIdoszakByTanev(array('tanev' => $ADAT['tanev'], 'tipus' => array('tanmenet leadás'), 'tolDt' => date('Y-m-d'), 'igDt' => date('Y-m-d'))); - define('__TANMENETLEADASIDOSZAK',(count($ADAT['idoszak']) > 0)); - if (!__TANMENETLEADASIDOSZAK) $_SESSION['alert'][] = 'info:nincs_tanmenetleadas_idoszak:tanev='.$ADAT['tanev']; - define('__MODOSITHAT', - __NAPLOADMIN // admin bármikor - || __VEZETOSEG || __USERTANARID == $ADAT['tanarId'] // vezetőség és szaktanár is bármikor -// || ( -// (__VEZETOSEG || __USERTANARID == $ADAT['tanarId']) // vezetőségi tag és a létrehozó szaktanár... -// && __TANMENETLEADASIDOSZAK // megfelelő időszakban vagyunk -// ) - ); - - - if (__MODOSITHAT===true && $action == 'hozzarendeles') { - if (isset($_POST['masolas'])) $action = 'masolas'; - elseif (isset($_POST['uj'])) $action = 'uj'; - elseif (isset($_POST['modosit'])) $action = 'modosit'; - elseif (isset($_POST['info'])) $action = 'info'; - } else { - $action = ''; - } - $ADAT['tankorId'] = readVariable($_POST['tankorId'], 'id'); - - if (__MODOSITHAT === true) { - if ($action == 'hozzarendeles') { - $ADAT['tanmenetId'] = readVariable($_POST['tanmenetId'], 'id'); - tankorTanmenetHozzarendeles($ADAT); - $ADAT['tankorTanmenet'][$ADAT['tankorId']] = $ADAT['tanmenetId']; - } elseif (__TANAR && $action == 'uj') { - header('Location: '.location('index.php?page=naplo&sub=tanmenet&f=ujTanmenet&tankorId='.$ADAT['tankorId'])); - } elseif (__TANAR && $action == 'masolas') { - $eredetiTanmenetId = readVariable($_POST['tanmenetId'], 'id'); - if (isset($eredetiTanmenetId)) { - $ADAT['tanmenetId'] = tanmenetDuplikalas($eredetiTanmenetId, __USERTANARID); - tankorTanmenetHozzarendeles($ADAT); - header('Location: '.location('index.php?page=naplo&sub=tanmenet&f=tanmenetModositas&tanmenetId='.$ADAT['tanmenetId'])); - } - } elseif ($action == 'modosit') { - $ADAT['tanmenetId'] = readVariable($_POST['tanmenetId'], 'id'); - if (isset($ADAT['tanmenetId'])) header('Location: '.location('index.php?page=naplo&sub=tanmenet&f=tanmenetModositas&tanmenetId='.$ADAT['tanmenetId'])); - } elseif ($action == 'info') { - $ADAT['tanmenetId'] = readVariable($_POST['tanmenetId'], 'id'); - if (isset($ADAT['tanmenetId'])) header('Location: '.location('index.php?page=naplo&sub=tanmenet&f=tanmenetInfo&tanmenetId='.$ADAT['tanmenetId'])); - } - } - } - - - $TOOL['tanarSelect'] = array('tipus'=>'cella', 'paramName'=>'tanarId', 'post'=>array()); -// $TOOL['osztalySelect']= array('tipus'=>'cella', 'paramName'=>'osztalyId', 'post'=>array()); - getToolParameters(); -?> diff --git a/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetTankor.php b/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetTankor.php deleted file mode 100644 index 814e624d..00000000 --- a/mayor-orig/www/policy/private/naplo/tanmenet/tanmenetTankor.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - - if (_RIGHTS_OK !== true) die(); - - global $ADAT; - - if (isset($ADAT['tanarId'])) { - putTankorLista($ADAT); - } - -?> diff --git a/mayor-orig/www/policy/private/naplo/tanmenet/ujTanmenet-pre.php b/mayor-orig/www/policy/private/naplo/tanmenet/ujTanmenet-pre.php deleted file mode 100644 index e0d2402d..00000000 --- a/mayor-orig/www/policy/private/naplo/tanmenet/ujTanmenet-pre.php +++ /dev/null @@ -1,72 +0,0 @@ -<?php - - if (_RIGHTS_OK !== true) die(); - if (!__TANAR) $_SESSION['alert'][] = 'page:insufficient_access'; - - require_once('include/modules/naplo/share/tanar.php'); - require_once('include/modules/naplo/share/osztaly.php'); - require_once('include/modules/naplo/share/tankor.php'); - require_once('include/modules/naplo/share/munkakozosseg.php'); - require_once('include/modules/naplo/share/targy.php'); - require_once('include/modules/naplo/share/tanmenet.php'); - - $ADAT['evfolyamJelek'] = getEvfolyamJelek(); - $ADAT['tanarId'] = __USERTANARID; - $ADAT['munkakozosseg'] = getMunkakozossegByTanarId($ADAT['tanarId'], array('result' => 'indexed')); - $ADAT['mkIds'] = $ADAT['targyIds'] = $ADAT['targy'] = array(); - foreach ($ADAT['munkakozosseg'] as $key => $mkAdat) { - $tmp = getTargyakByMkId($mkAdat['munkakozossegId'], array('result' => 'indexed')); - $ADAT['mkIds'][] = $mkAdat['munkakozossegId']; - $ADAT['targy'] = array_merge($ADAT['targy'], $tmp); - } - for ($i = 0; $i < count($ADAT['targy']); $i++) $ADAT['targyIds'][] = $ADAT['targy'][$i]['targyId']; - - // tanév - alapértelmezetten a __TANEV - $ADAT['tanev'] = readVariable($_POST['tanev'], 'numeric unsigned', is_numeric(__TANEV)?__TANEV:null); - - // Egy tankörhöz rendelendő új tanmenethez - $ADAT['tankorId'] = $tankorId = readVariable($_POST['tankorId'],'id', readVariable($_GET['tankorId'], 'id')); - - // tankör --> tárgy --> munkaközösség - if (isset($tankorId)) { - $TA = getTankorAdat($tankorId); - $ADAT['tankorAdat'] = $TA[$tankorId][0]; - $ADAT['tankorAdat']['osztalyIds'] = getTankorOsztalyaiByTanev($tankorId, $ADAT['tanev']); - $evf = array(); - foreach ($ADAT['tankorAdat']['osztalyIds'] as $osztalyId) $evf[] = getEvfolyamJel($osztalyId, $ADAT['tanev']); - $ADAT['tankorAdat']['evfolyamJel'] = $evf[0]; - } - - // Munkaközösség és tankör - $mkId = readVariable($_POST['mkId'], 'id', null, $ADAT['mkIds']); - $ADAT['targyId'] = $targyId = readVariable($_POST['targyId'], 'id', $ADAT['tankorAdat']['targyId'], $ADAT['targyIds']); - if (isset($tankorId) && $targyId != $ADAT['tankorAdat']['targyId']) unset($tankorId); - - $ADAT['evfolyamJel'] = $evfolyamJel = readVariable($_POST['evfolyamJel'], 'enum', $ADAT['tankorAdat']['evfolyamJel']); - if (isset($targyId) && isset($evfolyamJel)) { - $ADAT['targyAdat'] = getTargyById($targyId); - // Itt lekérdezhetnénk az eddigi ilyen tanmenetek listáját - megjelenítés céljából - $ADAT['tanmenetek'] = getTanmenetByTargyId($targyId); -//echo '<pre>'; var_dump($ADAT['tanmenetek']); echo '</pre>'; - } - - if ($action == 'ujTanmenet') { - $ADAT['tanmenetNev'] = readVariable($_POST['tanmenetNev'], 'string', $evfolyamJel.'. '.$ADAT['targyAdat']['targyNev'].' ('.$ADAT['targyAdat']['targyJelleg'].')'); - $ADAT['oraszam'] = readVariable($_POST['oraszam'], 'numeric unsigned'); - $ADAT['tanmenetId'] = $tanmenetId = ujTanmenet($ADAT); - if (isset($tankorId)) { - // itt kellene hozzárendelni a tankorhoz? - tankorTanmenetHozzarendeles($ADAT); - } - if ($tanmenetId) header('Location: '.location('index.php?page=naplo&sub=tanmenet&f=tanmenetModositas&tanmenetId='.$tanmenetId)); - } - - // $TOOL['tanevSelect'] = array('tipus' => 'cella', 'paramName' => 'tanev', 'post' => array('tankorId','targyId','evfolyamJel')); - $TOOL['munkakozossegSelect'] = array('tipus'=>'cella','paramName' => 'mkId', 'munkakozossegek' => $ADAT['munkakozosseg'], 'post'=>array('tankorId','evfolyamJel')); - if (isset($mkId)) $TOOL['targySelect'] = array('tipus'=>'cella', 'mkId' => $mkId, 'post'=>array('mkId', 'tankorId','evfolyamJel')); - else $TOOL['targySelect'] = array('tipus'=>'cella', 'mkId' => $mkId, 'targyak' => $ADAT['targy'], 'post'=>array('mkId', 'tankorId','evfolyamJel')); - $TOOL['evfolyamJelSelect'] = array('tipus'=>'cella', 'paramName' => 'evfolyamJel', 'paramDesc'=>'evfolyamJel','adatok' => $ADAT['evfolyamJelek'],'post'=>array('targyId', 'tankorId')); - getToolParameters(); - - -?> diff --git a/mayor-orig/www/policy/private/naplo/tanmenet/ujTanmenet.php b/mayor-orig/www/policy/private/naplo/tanmenet/ujTanmenet.php deleted file mode 100644 index f304c404..00000000 --- a/mayor-orig/www/policy/private/naplo/tanmenet/ujTanmenet.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php - - if (_RIGHTS_OK !== true) die(); - - global $ADAT; - - if (isset($ADAT['targyId']) && isset($ADAT['evfolyamJel'])) putUjTanevForm($ADAT); -?> |