diff options
author | M.Gergo | 2019-09-02 02:25:31 +0200 |
---|---|---|
committer | M.Gergo | 2019-09-02 02:25:31 +0200 |
commit | 4b6b59c8a750fe6408d5d0cbc0e584a737dd12c1 (patch) | |
tree | 80cfa850023ac36406512e530ed582201537e518 /mayor-orig/mayor-naplo/www/include/modules | |
parent | a4f28686f7de4a0ca86c2215d28bddb9a378335a (diff) | |
download | mayor-rev4535.tar.gz mayor-rev4535.zip |
Rev: 4535rev4535
Diffstat (limited to 'mayor-orig/mayor-naplo/www/include/modules')
5 files changed, 37 insertions, 1 deletions
diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/base/zcheck.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/base/zcheck.php index 38c03a11..91e3905a 100644 --- a/mayor-orig/mayor-naplo/www/include/modules/naplo/base/zcheck.php +++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/base/zcheck.php @@ -80,6 +80,8 @@ } if (!defined('__TANITASINAP_HETENTE')) define('__TANITASINAP_HETENTE',5); + if (!define('__ORACIMKE_ENABLED')) define('__ORACIMKE_ENABLED',true) ; + /* üzenő szerepkor beallitasa */ if (__UZENOADMIN===true) { $__asWho = readVariable($_POST['asWho'],'strictstring','asIs',array('asAdmin','asIs')); diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/haladasi/haladasi.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/haladasi/haladasi.php index 7b890fad..9c46b400 100644 --- a/mayor-orig/mayor-naplo/www/include/modules/naplo/haladasi/haladasi.php +++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/haladasi/haladasi.php @@ -124,6 +124,12 @@ } $sor['csoport'] = $tankorAdat[$sor['tankorId']]['csoport']; } + if (__ORACIMKE_ENABLED === true) { + // Cimkek + $q = "SELECT cimkeId from oraCimke where oraId=%u"; + $v = array($sor['oraId']); + $sor['cimke'] = db_query($q, array('fv' => 'getHaladasi/cimkek', 'modul' => 'naplo', 'result' => 'idonly', 'values' => $v), $lr); + } $ret[$sor['dt']][] = $sor; } // Nap információk lekérdezése diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/share/ora.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/share/ora.php index cdadeb00..73430f3d 100644 --- a/mayor-orig/mayor-naplo/www/include/modules/naplo/share/ora.php +++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/share/ora.php @@ -622,4 +622,16 @@ return false; } + function getOraCimkek() { + return getCimkek(); + } + function getCimkek() { + if (__ORACIMKE_ENABLED === true) { + $q = "SELECT * FROM ".__INTEZMENYDBNEV.".cimke ORDER BY cimkeLeiras"; + $R = db_query($q,array('debug'=>false,'fv'=>'getCimkek','modul'=>'naplo','values'=>$v,'result'=>'indexed'),$olr_naplo); + return $R; + } + } + + ?> diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/share/oraModifier.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/share/oraModifier.php index 9165ac7c..53b6c763 100644 --- a/mayor-orig/mayor-naplo/www/include/modules/naplo/share/oraModifier.php +++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/share/oraModifier.php @@ -78,7 +78,7 @@ return $RESULT; } - function updateHaladasiNaploOra($oraId, $leiras, $csoportAdat = '', $ki = '', $olr = '') { + function updateHaladasiNaploOra($oraId, $leiras, $cimkeId=0, $csoportAdat = '', $ki = '', $olr = '') { $RESULT = true; @@ -135,6 +135,17 @@ $RESULT = db_query($q, array('fv' => 'updateHaladasiNaploOra', 'modul' => 'naplo', 'values' => $v), $lr); //$_SESSION['alert'][] = $q; } + + if (__ORACIMKE_ENABLED === true) { + $q = "DELETE FROM oraCimke WHERE oraId=%u"; + $v = array($oraId); + db_query($q, array('fv' => 'updateHaladasiNaploOra/cimke', 'modul' => 'naplo', 'values' => $v), $lr); + if ($cimkeId>0) { // később tömb! + $q = "INSERT IGNORE INTO oraCimke VALUES (%u,%u)"; + $v = array($oraId,$cimkeId,$oraId); + db_query($q, array('fv' => 'updateHaladasiNaploOra/cimke', 'modul' => 'naplo', 'values' => $v), $lr); + } + } } else { // $RESULT = false; // igaziból nincs hiba, hisz nem csináltunk semmit $_SESSION['alert'][] = 'message:wrong_data:nem modosithato ora!!!'; 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 5ae3a43a..0e2a5836 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 @@ -419,4 +419,9 @@ return reindex($result,$SET['arraymap']); } + function orarendvane() { + $q = "SELECT IF(count(*)>0,1,0) FROM orarendiOra"; + return db_query($q, array('fv'=>'orarendvane','modul'=>'naplo','result'=>'value')); + } + ?> |