aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-naplo/www/include
diff options
context:
space:
mode:
authorM.Gergo2020-03-16 23:29:28 +0100
committerM.Gergo2020-03-16 23:29:28 +0100
commitc3cbdd8305d2c46a6a18fc4f1fcc3a3f3f127029 (patch)
tree0381667179713a267488512d43795e3c77efb191 /mayor-orig/mayor-naplo/www/include
parent6cdef5739ed7e029d4631b849f157462e64bd045 (diff)
downloadmayor-c3cbdd8305d2c46a6a18fc4f1fcc3a3f3f127029.tar.gz
mayor-c3cbdd8305d2c46a6a18fc4f1fcc3a3f3f127029.zip
Rev: 4620rev4620
Diffstat (limited to 'mayor-orig/mayor-naplo/www/include')
-rw-r--r--mayor-orig/mayor-naplo/www/include/modules/naplo/haladasi/haladasi.php2
-rw-r--r--mayor-orig/mayor-naplo/www/include/modules/naplo/share/ora.php18
2 files changed, 15 insertions, 5 deletions
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 e5090c18..0be1c61a 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
@@ -72,10 +72,12 @@
// Csatlakozás az adatbázishoz
$lr = db_connect('naplo', array('fv' => 'getHaladasi'));
$q = "SELECT oraId, dt, ora, ki, kit, tankorId, teremId, ora.leiras, tipus, eredet, csoportId, feladatTipusId,
+ hazifeladatId,
getOraTolTime(oraId) AS tolTime,
getOraIgTime(oraId) AS igTime
FROM ora
LEFT JOIN tankorCsoport USING (tankorId)
+ LEFT JOIN oraHazifeladat USING (oraId)
LEFT JOIN ".__INTEZMENYDBNEV.".feladatTipus USING (feladatTipusId)
WHERE dt>='%s' AND dt<='%s' AND tipus NOT LIKE 'elmarad%%'
$feltetel $teremFeltetel
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 73430f3d..7c4c4b4e 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
@@ -23,15 +23,17 @@
TRIM(CONCAT_WS(' ', t2.viseltNevElotag, t2.viseltCsaladiNev, t2.viseltUtonev)) AS kitCn,
tankorNev,
feladatTipusId,
- munkaido
+ munkaido,
+ hazifeladatId, hazifeladatLeiras
FROM `%s`.ora
+ LEFT JOIN `%s`.oraHazifeladat USING (oraId)
LEFT JOIN ".__INTEZMENYDBNEV.".tankorSzemeszter USING (tankorId)
LEFT JOIN ".__INTEZMENYDBNEV.".tanar AS t1 ON ki=t1.tanarId
LEFT JOIN ".__INTEZMENYDBNEV.".tanar AS t2 ON kit=t2.tanarId
LEFT JOIN ".__INTEZMENYDBNEV.".feladatTipus USING (feladatTipusId)
LEFT JOIN ".__INTEZMENYDBNEV.".terem USING (teremId)
WHERE oraId=%u AND (tanev=%u OR feladatTipusId IS NOT NULL)";
- $v = array(tanevDbNev(__INTEZMENY, $tanev), $oraId, $tanev);
+ $v = array(tanevDbNev(__INTEZMENY, $tanev),tanevDbNev(__INTEZMENY, $tanev), $oraId, $tanev);
return db_query($q, array('fv' => 'getOraAdatById', 'modul' => 'naplo_intezmeny', 'result' => 'record', 'values' => $v), $olr);
} else {
@@ -345,7 +347,9 @@
array_unshift($v, $tolDt, $igDt, $tanarId);
$RESULT = db_query($q, array('modul' => 'naplo', 'fv' => 'getTanarOrak', 'result' => 'idonly', 'values' => $v));
} else {
- $q = "SELECT * FROM ora WHERE dt>='%s' and dt<='%s' AND (ki=%u OR kit=%u) $WHERE ORDER BY dt,ora";
+ $q = "SELECT * FROM ora
+LEFT JOIN oraHazifeladat USING (oraId)
+WHERE dt>='%s' and dt<='%s' AND (ki=%u OR kit=%u) $WHERE ORDER BY dt,ora";
array_unshift($v, $tolDt, $igDt, $tanarId, $tanarId);
if ($SET['result']=='assoc')
$RESULT = db_query($q, array('modul' => 'naplo', 'fv' => 'getTanarOrak', 'keyfield' => 'ora', 'result' => 'assoc', 'values' => $v));
@@ -385,10 +389,14 @@
$RE = db_query($q, array('modul' => 'naplo', 'fv' => 'getOrak', 'result' => 'indexed', 'values' => $v));
} else {
if ($SET['elmaradokNelkul'])
- $q = "SELECT *,getOraTolTime(ora.oraId) AS tolTime,getOraIgTime(ora.oraId) AS igTime FROM ora WHERE dt>='%s' and dt<='%s' AND tankorId IN (".implode(',', array_fill(0, count($TANKORIDK), '%u')).")
+ $q = "SELECT *,getOraTolTime(ora.oraId) AS tolTime,getOraIgTime(ora.oraId) AS igTime FROM ora
+LEFT JOIN oraHazifeladat USING (oraId)
+WHERE dt>='%s' and dt<='%s' AND tankorId IN (".implode(',', array_fill(0, count($TANKORIDK), '%u')).")
AND tipus NOT IN ('elmarad','elmarad máskor')";
else
- $q = "SELECT *,getOraTolTime(ora.oraId) AS tolTime,getOraIgTime(ora.oraId) AS igTime FROM ora WHERE dt>='%s' and dt<='%s' AND tankorId IN (".implode(',', array_fill(0, count($TANKORIDK), '%u')).")";
+ $q = "SELECT *,getOraTolTime(ora.oraId) AS tolTime,getOraIgTime(ora.oraId) AS igTime FROM ora
+LEFT JOIN oraHazifeladat USING (oraId)
+WHERE dt>='%s' and dt<='%s' AND tankorId IN (".implode(',', array_fill(0, count($TANKORIDK), '%u')).")";
$R = db_query($q, array('modul' => 'naplo', 'fv' => 'getOrak', 'result' => 'indexed', 'values' => $v));
$RE['tankorok']=array();
for ($i = 0; $i < count($R); $i++) {