aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-naplo/www/include/modules
diff options
context:
space:
mode:
Diffstat (limited to 'mayor-orig/mayor-naplo/www/include/modules')
-rw-r--r--mayor-orig/mayor-naplo/www/include/modules/naplo/base/zcheck.php2
-rw-r--r--mayor-orig/mayor-naplo/www/include/modules/naplo/haladasi/haladasi.php6
-rw-r--r--mayor-orig/mayor-naplo/www/include/modules/naplo/share/ora.php12
-rw-r--r--mayor-orig/mayor-naplo/www/include/modules/naplo/share/oraModifier.php13
-rw-r--r--mayor-orig/mayor-naplo/www/include/modules/naplo/share/orarend.php5
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'));
+ }
+
?>