diff options
author | M.Gergo | 2018-07-23 11:58:31 +0200 |
---|---|---|
committer | M.Gergo | 2018-07-23 11:58:31 +0200 |
commit | 2f5969b827ff17ee05e05f46025367017fdfcf44 (patch) | |
tree | cb9e56d5212cd12874bb1ae00812bf2e3bcbbd34 /mayor-orig/www/include | |
parent | 0b26d2d6860e7fe428930b97dc953895aa1ca30c (diff) | |
download | mayor-2f5969b827ff17ee05e05f46025367017fdfcf44.tar.gz mayor-2f5969b827ff17ee05e05f46025367017fdfcf44.zip |
Rev: 4340
Diffstat (limited to 'mayor-orig/www/include')
-rw-r--r-- | mayor-orig/www/include/base/log.php | 2 | ||||
-rw-r--r-- | mayor-orig/www/include/base/login.php | 2 | ||||
-rw-r--r-- | mayor-orig/www/include/modules/naplo/base/rights.php | 2 | ||||
-rw-r--r-- | mayor-orig/www/include/modules/naplo/share/kepzes.php | 10 | ||||
-rw-r--r-- | mayor-orig/www/include/modules/naplo/share/tanar.php | 28 | ||||
-rw-r--r-- | mayor-orig/www/include/modules/naplo/tanev/munkaterv.php | 9 |
6 files changed, 36 insertions, 17 deletions
diff --git a/mayor-orig/www/include/base/log.php b/mayor-orig/www/include/base/log.php index 45c669e4..0b8f6fd1 100644 --- a/mayor-orig/www/include/base/log.php +++ b/mayor-orig/www/include/base/log.php @@ -10,7 +10,7 @@ return ($_SERVER['HTTP_X_FORWARDED_FOR']!='')?$_SERVER['HTTP_X_FORWARDED_FOR']:$_SERVER['REMOTE_ADDR']; } - function logLogin($policy, $userAccount, $flag) { + function logLogin($policy, $userAccount, $flag) { //loginLog $q = "INSERT INTO loginLog (dt,ip,userAccount,policy,flag) VALUES (NOW(),'%s','%s','%s', %u)"; db_query($q, array('fv' => 'logLogin', 'modul' => 'login', 'values' => array(_clientIp(), $userAccount, $policy, $flag))); } diff --git a/mayor-orig/www/include/base/login.php b/mayor-orig/www/include/base/login.php index f244b90a..da3217a9 100644 --- a/mayor-orig/www/include/base/login.php +++ b/mayor-orig/www/include/base/login.php @@ -86,8 +86,8 @@ } } else { $result = userAuthentication($userAccount, $userPassword, $accountInformation, $toPolicy); // ??? toPolicy benne van az AccountInformation-ben!!! Ldap backend only? - logLogin($toPolicy, $userAccount, $result); } + logLogin($toPolicy, $userAccount, $result); define('_MAYORAUTHRESULT',$result); if ($result === _AUTH_SUCCESS) { diff --git a/mayor-orig/www/include/modules/naplo/base/rights.php b/mayor-orig/www/include/modules/naplo/base/rights.php index c84853a3..b3967529 100644 --- a/mayor-orig/www/include/modules/naplo/base/rights.php +++ b/mayor-orig/www/include/modules/naplo/base/rights.php @@ -248,8 +248,6 @@ initTanev($RESULT['intezmeny'], $RESULT['tanev']); if (_POLICY == 'parent' && $RESULT['parentDiakId'] != '') define('__PARENTDIAKID', $RESULT['parentDiakId']); -//var_dump($RESULT); -//die(); } // Az (alapértelmezett) intézmény lekérdezése - ha még nincs meg diff --git a/mayor-orig/www/include/modules/naplo/share/kepzes.php b/mayor-orig/www/include/modules/naplo/share/kepzes.php index 39af3847..84553ffb 100644 --- a/mayor-orig/www/include/modules/naplo/share/kepzes.php +++ b/mayor-orig/www/include/modules/naplo/share/kepzes.php @@ -137,16 +137,6 @@ $r = db_query($q, array('modul'=>'naplo_intezmeny','fv'=>'getKepzesOraterv', 'result'=>'indexed','values'=>$v)); $RE = reindex($r, $SET['arraymap']); - - /* Figyelem! Nem az arraymap-et használjuk még. Ezt a függvényt NE írd át! */ -/* for ($i=0; $i<count($r); $i++) { - $targy = (($r[$i]['targyId']=='')) ? $r[$i]['tipus'] : $r[$i]['targyId']; - $RE[$targy][$r[$i]['evfolyam']][$r[$i]['szemeszter']] = array( - 'hetiOraszam'=>$r[$i]['hetiOraszam'], - 'kovetelmeny'=>$r[$i]['kovetelmeny'] - ); - } -*/ return $RE; } diff --git a/mayor-orig/www/include/modules/naplo/share/tanar.php b/mayor-orig/www/include/modules/naplo/share/tanar.php index 0f0b90b6..32027565 100644 --- a/mayor-orig/www/include/modules/naplo/share/tanar.php +++ b/mayor-orig/www/include/modules/naplo/share/tanar.php @@ -38,12 +38,12 @@ array_push($v, $kiDt); } if ($SET['extraAttrs'] != '') $extraAttrs = ', '.$SET['extraAttrs']; -/* --not implemented + +/* if ($SET['telephelyId'] != '') { $where[] = " (telephelyId = %u OR telephelyId IS NULL) "; array_push($v, $SET['telephelyId']); } - // 2015-08-06 - aktualisStatusz kiiktatása - statusz mező megjelenése miatt... IF( beDt <= CURDATE() AND (kiDt IS NULL OR CURDATE()<=kiDt),'jogviszonyban van','nincs jogviszonyban') as aktualisStatusz, */ @@ -165,6 +165,30 @@ $v = array($tanarId, $tanev); return db_query($q, array('fv' => 'getTanarOraszam', 'modul' => 'naplo_intezmeny', 'result' => 'value', 'values' => $v), $olr); } +/* + NOT IMPLEMENTED + + function getTanarTelephely($tanarId) { + + $q = "SELECT * FROM tanarTelephely WHERE tanarId=%u"; + $v = array($tanarId); + $r = db_query($q, array('fv' => 'getTanarOraszam', 'modul' => 'naplo_intezmeny', 'result' => 'indexed', 'values' => $v), $olr); + for ($i=0; $i<count($r); $i++) { + $RET[$r[$i]['tanarId']][] = $r[$i]['telephelyId']; + } + return $RET; + } + + function getTelephelyTanar($telephelyId) { + $q = "SELECT * FROM tanarTelephely WHERE telephelyId=%u"; + $v = array($telephelyId); + $r = db_query($q, array('fv' => 'getTanarOraszam', 'modul' => 'naplo_intezmeny', 'result' => 'indexed', 'values' => $v), $olr); + for ($i=0; $i<count($r); $i++) { + $RET[$r[$i]['telephelyId']][] = $r[$i]['tanarId']; + } + return $RET; + } +*/ ?> diff --git a/mayor-orig/www/include/modules/naplo/tanev/munkaterv.php b/mayor-orig/www/include/modules/naplo/tanev/munkaterv.php index ab52242f..a27528a0 100644 --- a/mayor-orig/www/include/modules/naplo/tanev/munkaterv.php +++ b/mayor-orig/www/include/modules/naplo/tanev/munkaterv.php @@ -27,7 +27,14 @@ $r[] = db_query($q, array('fv' => 'initNapok2', 'modul' => 'naplo', 'values' => $v), $lr); /* --- */ - $kovetkezoTanevAdat = getTanevAdat(__TANEV+1); $tanevVege = date('Y-m-d',strtotime('-1 days',strtotime($kovetkezoTanevAdat['kezdesDt']))); + $kovetkezoTanevAdat = getTanevAdat(__TANEV+1); + if (strtotime($kovetkezoTanevAdat['kezdesDt']) > strtotime($kovetkezoTanevAdat['zarasDt'])) + { + $_SESSION['alert'][] = 'alert:Hiba, a következő ('.(__TANEV+1).') tanév előbb végződik, mint kezdődik! Van következő tanév? (admin/tanévek megnyitása menüpont)'; + $r[] = false; + } + + $tanevVege = date('Y-m-d',strtotime('-1 days',strtotime($kovetkezoTanevAdat['kezdesDt']))); $r[] = napokHozzaadasa(__TANEV, $_TANEV['kezdesDt'], $tanevVege, $_TANEV, $lr); orarendiHetekHozzarendelese($_TANEV['kezdesDt'], $_TANEV['zarasDt'], $Hetek, $lr); |