aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-naplo/www
diff options
context:
space:
mode:
authorM.Gergo2021-10-28 15:10:04 +0200
committerM.Gergo2021-10-28 15:10:04 +0200
commit3a1c1811413c635c5ee6e40cb7d497de7313dbe1 (patch)
treedf7591ff0287ef6b96b18da723b1914fd5dc3e20 /mayor-orig/mayor-naplo/www
parenta6185f7270c04c7469ea1a785e5cb35d2c3fdea6 (diff)
downloadmayor-3a1c1811413c635c5ee6e40cb7d497de7313dbe1.tar.gz
mayor-3a1c1811413c635c5ee6e40cb7d497de7313dbe1.zip
Rev: 4820rev4820
Diffstat (limited to 'mayor-orig/mayor-naplo/www')
-rw-r--r--mayor-orig/mayor-naplo/www/include/modules/naplo/base/rights.php4
-rw-r--r--mayor-orig/mayor-naplo/www/include/modules/naplo/share/diak.php13
-rw-r--r--mayor-orig/mayor-naplo/www/include/modules/naplo/share/hirnok.php13
-rw-r--r--mayor-orig/mayor-naplo/www/lang/hu_HU/module-naplo/szulinap.php2
-rw-r--r--mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/valtas.php9
-rw-r--r--mayor-orig/mayor-naplo/www/policy/private/naplo/szulinap-pre.php28
-rw-r--r--mayor-orig/mayor-naplo/www/policy/private/naplo/szulinap.php46
-rw-r--r--mayor-orig/mayor-naplo/www/policy/public/naplo/intezmeny/tanarok-pre.php15
-rw-r--r--mayor-orig/mayor-naplo/www/policy/public/naplo/intezmeny/tanarok.php4
-rw-r--r--mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/intezmeny/tanarok.phtml21
-rw-r--r--mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/intezmeny/valtas.phtml11
11 files changed, 125 insertions, 41 deletions
diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/base/rights.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/base/rights.php
index 53eb1ed5..e5653309 100644
--- a/mayor-orig/mayor-naplo/www/include/modules/naplo/base/rights.php
+++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/base/rights.php
@@ -62,7 +62,7 @@
function initTanev($intezmeny, $tanev) {
- global $MYSQL_DATA, $_TANEV;
+ global $MYSQL_DATA, $_TANEV, $policy;
$MYSQL_DATA['naplo'] = $MYSQL_DATA['naplo_base'];
$MYSQL_DATA['naplo']['db']= tanevDbNev($intezmeny, $tanev);
@@ -85,7 +85,7 @@
if (__FOLYO_TANEV === true)
if (__MUNKATERV_OK && __ORAREND_OK && __TANKOROK_OK) checkNaplo(date('Y-m-d'));
else {
- if (MAYOR_SOCIAL!==true) $_SESSION['alert'][]= 'info:checkNaploFailed:Tanév:'.($_TANEV['tanev']).':Részletek '.((__MUNKATERV_OK)?'munkaterv ok':'#chknaplo1 nincs munkaterv!').':'.((__ORAREND_OK)?'órarend ok':'#chknaplo2 nincs órarend!').':'.((__TANKOROK_OK)?'órarend-tankörök ok':'#chknaplo3 órarendi óra tankör összerendezési hiány!');
+ if (MAYOR_SOCIAL!==true && $policy==='private') $_SESSION['alert'][]= 'info:checkNaploFailed:Tanév:'.($_TANEV['tanev']).':Részletek '.((__MUNKATERV_OK)?'munkaterv ok':'#chknaplo1 nincs munkaterv!').':'.((__ORAREND_OK)?'órarend ok':'#chknaplo2 nincs órarend!').':'.((__TANKOROK_OK)?'órarend-tankörök ok':'#chknaplo3 órarendi óra tankör összerendezési hiány!');
}
}
}
diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/share/diak.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/share/diak.php
index 25ac8d8a..b98dbcb5 100644
--- a/mayor-orig/mayor-naplo/www/include/modules/naplo/share/diak.php
+++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/share/diak.php
@@ -434,7 +434,7 @@
$q = "SELECT diak.*, TRIM(CONCAT_WS(' ',viseltNevElotag, ViseltCsaladiNev, viseltUtoNev)) AS diakNev, TIMESTAMPDIFF(YEAR, diak.szuletesiIdo, CURDATE()) AS diakEletkor, dj.dt AS jogviszonyDt, dj.statusz AS jogviszonyStatusz
FROM ".__INTEZMENYDBNEV.".diak LEFT JOIN ".__INTEZMENYDBNEV.".diakJogviszony AS dj
ON diak.diakId=dj.diakId AND dj.dt=(SELECT MAX(dt) FROM ".__INTEZMENYDBNEV.".diakJogviszony WHERE dt<=CURDATE() AND diakId=dj.diakId)
- WHERE diak.diakId IN (".implode(',', array_fill(0, count($diakIds), '%u')).")";
+ WHERE diak.diakId IN (".implode(',', array_fill(0, count($diakIds), '%u')).") ORDER BY diakNev";
$r = db_query($q, array('fv' => 'getDiakAdatById', 'modul' => 'naplo_intezmeny', 'result' => $result, 'keyfield'=>$SET['keyfield'],'values' => $diakIds), $lr);
@@ -444,15 +444,22 @@
function getDiakBySzulDt($md)
{
+
+ $lr = db_connect('naplo_intezmeny');
if ($md == '') $md = date('m-d');
- $q = "SELECT diakId FROM diak WHERE szuletesiIdo like '%%-%s' AND jogviszonyVege is NULL"; // credits: Neumayer Béla <szepi1971@gmail.com>
- $diakIds = db_query($q, array('fv' => 'getDiakBySzulDt', 'modul' => 'naplo_intezmeny', 'result' => 'idonly', 'values' => array($md)));
+ $q = "SELECT diakId FROM diak WHERE szuletesiIdo like '%s' AND jogviszonyVege is NULL"; // credits: Neumayer Béla <szepi1971@gmail.com>
+ $diakIds = db_query($q, array('lr'=>$lr,'fv' => 'getDiakBySzulDt', 'modul' => 'naplo_intezmeny', 'result' => 'idonly', 'values' => array('____-'.$md)));
if (count($diakIds)>0) {
$RET['diak'] = getDiakAdatById($diakIds);
+ for ($i=0; $i<count($diakIds); $i++) {
+ $diakId = $diakIds[$i];
+ $RET['diak'][$i]['osztaly'] = getDiakOsztalya($diakId,null,$lr);
+ }
$RET['diakOsztaly'] = getDiakokOsztalyai($diakIds);
} else {
$RET = false;
}
+ db_close($lr);
return $RET;
}
diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/share/hirnok.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/share/hirnok.php
index 94ffa865..86cd0e49 100644
--- a/mayor-orig/mayor-naplo/www/include/modules/naplo/share/hirnok.php
+++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/share/hirnok.php
@@ -191,12 +191,17 @@ global $SZEMESZTER;
} // ha diák
if (__TANAR === true || (__NAPLOADMIN===true && $tanarId>0)) {
if (defined('__USERTANARID') && is_numeric(__USERTANARID)) {
+ $q = "SELECT COUNT(*) AS dbBeirtOra FROM ora WHERE ki=".__USERTANARID." AND dt <= CURDATE() AND (leiras!='')";
+ $dbBeirtOra = db_query($q, array('fv' => 'getBeirasiAdatok', 'modul' => 'naplo', 'result' => 'value'));
$q = "SELECT COUNT(*) FROM ora WHERE ki=".__USERTANARID." AND dt <= CURDATE() AND (leiras IS NULL OR leiras='')";
$r = db_query($q, array('fv' => 'getBeirasiAdatok', 'modul' => 'naplo', 'result' => 'value'));
- $R[mktime()][] = array(
- 'hirnokTipus'=>'haladasiBeiratlan',
- 'db'=>$r
- );
+ if ($dbBeirtOra>0) { // csak ha van mar egy beirt oraja legalabb
+ $R[mktime()][] = array(
+ 'hirnokTipus'=>'haladasiBeiratlan',
+ 'db'=>$r,
+ 'dbBeirtOra'=>$dbBeirtOra
+ );
+ }
$q = "select * from idoszak where NOW() BETWEEN tolDt AND igDt ORDER BY tolDt";
$r = db_query($q, array('fv' => 'getIdoszakAktiv', 'modul' => 'naplo_intezmeny', 'result' => 'indexed'));
for ($i=0; $i<count($r); $i++) {
diff --git a/mayor-orig/mayor-naplo/www/lang/hu_HU/module-naplo/szulinap.php b/mayor-orig/mayor-naplo/www/lang/hu_HU/module-naplo/szulinap.php
index d770fd52..3140f521 100644
--- a/mayor-orig/mayor-naplo/www/lang/hu_HU/module-naplo/szulinap.php
+++ b/mayor-orig/mayor-naplo/www/lang/hu_HU/module-naplo/szulinap.php
@@ -1,5 +1,5 @@
<?php
define('_HAPPYBIRTHDAY','Boldog Szülinapot Kívánunk! :)');
-
+ define('__PAGETITLE','Heti születésnaposok');
?>
diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/valtas.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/valtas.php
index d5ddca45..9725b1f9 100644
--- a/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/valtas.php
+++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/valtas.php
@@ -3,6 +3,11 @@
if (_RIGHTS_OK !== true) die();
global $ADAT;
- if (__INTEZMENY=='kanizsay') putTanarLista_large($ADAT);
- else putTanarLista($ADAT);
+ if (__INTEZMENY=='kanizsay') {
+ $ADAT['kulsosview']=false;
+ putTanarLista_large($ADAT);
+ $ADAT['kulsosview']=true;
+ putTanarLista_large($ADAT);
+ } else putTanarLista($ADAT);
+
?>
diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/szulinap-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/szulinap-pre.php
index 46164faf..25332988 100644
--- a/mayor-orig/mayor-naplo/www/policy/private/naplo/szulinap-pre.php
+++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/szulinap-pre.php
@@ -2,14 +2,36 @@
if (_RIGHTS_OK !== true) die();
- if ($skin=='ajax') {
+// if ($skin=='ajax') {
require_once('include/modules/naplo/share/diak.php');
require_once('include/modules/naplo/share/osztaly.php');
- $ADAT['ma'] = getDiakBySzulDt($dt);
+ $ADAT['ma'] = getDiakBySzulDt(date('Y-m-d'));
+
+ $dt = readVariable($_POST['dt'],'date');
+ if (is_null($dt)) {
+ $refDt = date('Y-m-d',strtotime('+1 days'));
+ $dt = date('Y-m-d',strtotime('last sunday',strtotime($refDt)));
+ }
+ for ($i=0; $i<=6; $i++) {
+ $_md = date('m-d',strtotime('+'.$i.' day',strtotime($dt)));
+ $ADAT['heti'][$i]['dt']= date('Y-m-d',strtotime('+'.$i.' day',strtotime($dt)));
+ $ADAT['heti'][$i]['diakok'] = getDiakBySzulDt($_md);
+ }
$ADAT['osztaly'] = getOsztalyok(__TANEV,array('result'=>'assoc'));
- }
+// }
+
+ if ($skin!='ajax') {
+ global $_TANEV;
+ $TOOL['datumSelect'] = array(
+ 'tipus'=>'sor', 'post'=>array('tanarId', 'diakId', 'osztalyId', 'tankorId'),
+ 'paramName' => 'dt', 'hanyNaponta' => 7,
+ 'tolDt' => date('Y-m-d', strtotime('last sunday', strtotime($_TANEV['kezdesDt']))),
+ 'igDt' => date('Y-m-d', strtotime('last sunday', strtotime($_TANEV['zarasDt']))),
+ 'override' => true
+ );
+ }
?>
diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/szulinap.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/szulinap.php
index 93606734..390733b8 100644
--- a/mayor-orig/mayor-naplo/www/policy/private/naplo/szulinap.php
+++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/szulinap.php
@@ -2,13 +2,14 @@
if (_RIGHTS_OK !== true) die();
- global $ADAT;
+ global $ADAT,$aHetNapjai;
-if ($skin=='ajax') {
+//if ($skin=='ajax') {
$szulinapos= false;
- if (__NAPLOADMIN || __TANAR) {
+// if (__NAPLOADMIN===true || __TANAR===true) {
+/*
echo '<ul>';
for ($i=0; $i<count($ADAT['ma']['diak']); $i++) {
echo '<li>';
@@ -18,6 +19,34 @@ if ($skin=='ajax') {
echo '</li>';
}
echo '</ul>';
+*/
+ if ($skin!='ajax') echo '<div style="margin-left:40px">';
+
+ echo '<style type="text/css">
+ a.btn_szulinap {display:block;text-align:center; margin-top:4px; margin-bottom:2px; }
+ a.btn_szulinap button { font-size:x-small;}
+ div.szulinaposok_dt {text-align: left; padding-left:4px; color:#888;padding-top:4px; padding-bottom:2px;}
+ ul.szulinap li span.eletkor {display:none;}
+ ul.szulinap:hover li span.eletkor { display: inline-block; background-color: #ddd; border-radius:10%; padding: 0px 4px; margin-left: 2px; }
+</style>';
+
+ for ($n=0; $n<=6; $n++) {
+ echo '<div class="szulinaposok_dt">'.(date('Y.m.d.',strtotime($ADAT['heti'][$n]['dt']))).' '.$aHetNapjai[(6+date('w',strtotime($ADAT['heti'][$n]['dt'])))%7].'</div>';
+ echo '<ul class="szulinap" style="list-style-type: none;">';
+ for ($i=0; $i<count($ADAT['heti'][$n]['diakok']['diak']); $i++) {
+ $_D = $ADAT['heti'][$n]['diakok']['diak'][$i];
+ echo '<li class="diakAdat diakNev" data-diakid="'.$_D['diakId'].'">';
+ echo $ADAT['heti'][$n]['diakok']['diak'][$i]['viseltNevElotag'].' ';
+ echo $ADAT['heti'][$n]['diakok']['diak'][$i]['viseltCsaladinev'].' ';
+ echo $ADAT['heti'][$n]['diakok']['diak'][$i]['viseltUtonev'];
+ if ($ADAT['heti'][$n]['diakok']['diak'][$i]['diakEletkor']<=20) echo '<span class="eletkor">'.$ADAT['heti'][$n]['diakok']['diak'][$i]['diakEletkor'].'</span>';
+ if ($ADAT['heti'][$n]['diakok']['diak'][$i]['osztaly'][0]['osztalyJel']!='') {
+ echo ' ('.$ADAT['heti'][$n]['diakok']['diak'][$i]['osztaly'][0]['osztalyJel'].')';
+ }
+ echo '</li>';
+ }
+ echo '</ul>';
+
}
if (is_array($ADAT['ma']['diakOsztaly'])) foreach($ADAT['ma']['diakOsztaly'] as $_diakId => $_osztalyId) {
@@ -28,6 +57,13 @@ if ($skin=='ajax') {
if ($szulinapos) echo _HAPPYBIRTHDAY;
+ echo '<a href="'.href('index.php?page=naplo&f=szulinap').'" class="btn_szulinap">';
+ echo '<button><span class="icon-th-list" style="font-size:8px; color:#888"></span> Születésnaposok</button>';
+ echo '</a>';
+
+ if ($skin!='ajax') echo '</div>';
+
+/*
if (is_array($O)) {
echo '<ul>';
foreach($O as $osztalyId => $db) {
@@ -38,7 +74,7 @@ if ($skin=='ajax') {
}
echo '</ul>';
}
-
-}
+*/
+//}
?>
diff --git a/mayor-orig/mayor-naplo/www/policy/public/naplo/intezmeny/tanarok-pre.php b/mayor-orig/mayor-naplo/www/policy/public/naplo/intezmeny/tanarok-pre.php
index 18f17ec6..784f32f1 100644
--- a/mayor-orig/mayor-naplo/www/policy/public/naplo/intezmeny/tanarok-pre.php
+++ b/mayor-orig/mayor-naplo/www/policy/public/naplo/intezmeny/tanarok-pre.php
@@ -17,21 +17,6 @@
if (is_array($Telephelyek)) foreach ($Telephelyek as $index => $tAdat) $telephelyIds[] = $tAdat['telephelyId'];
$tanev = readVariable($_POST['tanev'], 'id', defined('__TANEV') ? __TANEV : null, $Tanevek);
$telephelyId = readVariable($_POST['telephelyId'], 'id', defined('__TELEPHELYID') ? __TELEPHELYID : null, $telephelyIds);
-/*
- if ($action == 'tanevValasztas') {
- if (isset($tanev) && $tanev !== __TANEV) {
- if (updateSessionTanev($tanev)) {
- header('Location: '.location('index.php?page=naplo&sub=intezmeny&f=valtas'));
- }
- }
- } elseif ($action == 'telephelyValasztas') {
- if (isset($telephelyId) && $telephelyId != __TELEPHELYID) {
- if (updateSessionTelephelyId($telephelyId)) {
- header('Location: '.location('index.php?page=naplo&sub=intezmeny&f=valtas'));
- }
- }
- }
-*/
}
$ADAT['tanarok'] = getTanarok(array('extraAttrs'=>'titulus,statusz,besorolas,email,YEAR(beDt) AS belepesEve,IFNULL("",YEAR(kiDt)) AS kilepesEve, elerhetoseg'));
$ADAT['targyak'] = getTargyak(array('arraymap'=>array('targyId')));
diff --git a/mayor-orig/mayor-naplo/www/policy/public/naplo/intezmeny/tanarok.php b/mayor-orig/mayor-naplo/www/policy/public/naplo/intezmeny/tanarok.php
index d028bd19..97d9d6b0 100644
--- a/mayor-orig/mayor-naplo/www/policy/public/naplo/intezmeny/tanarok.php
+++ b/mayor-orig/mayor-naplo/www/policy/public/naplo/intezmeny/tanarok.php
@@ -3,6 +3,10 @@
if (_RIGHTS_OK !== true) die();
global $ADAT;
+ $ADAT['kulsosview'] = false;
+ putTanarLista_large($ADAT);
+
+ $ADAT['kulsosview'] = true;
putTanarLista_large($ADAT);
?>
diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/intezmeny/tanarok.phtml b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/intezmeny/tanarok.phtml
index e01375dc..42c84c3f 100644
--- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/intezmeny/tanarok.phtml
+++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/intezmeny/tanarok.phtml
@@ -104,6 +104,9 @@ div.tanarGrid .item {
padding:4px 4px;
border-radius:2px;
}
+div.tanarGrid .item.kulsos {
+ background-color:#ddd;
+}
h1.osztaly,h2.osztalyfonok,h3.kepzes { text-align:center; }
@@ -121,14 +124,22 @@ div.besorolas { font-size:x-small; color: #aaa;}
echo '<div class="tanarGrid">';
for($i=0; $i<count($ADAT['tanarok']); $i++) {
- $T = $ADAT['tanarok'][$i];
- echo '<div class="item tanarNev" data-tanarid="'.$T['tanarId'].'">';
+ $T = $ADAT['tanarok'][$i];
+
+ $_kulsos = ($T['statusz']=='külső óraadó');
+ $_kulsosClassName = ($_kulsos) ? 'kulsos':'';
+
+ if (isset($ADAT['kulsosview'])) {
+ if ($ADAT['kulsosview']===true && $T['statusz']!='külső óraadó') continue;
+ elseif ($ADAT['kulsosview']!==true && $T['statusz']=='külső óraadó') continue;
+ }
+ echo '<div class="item tanarNev '.$_kulsosClassName.'" data-tanarid="'.$T['tanarId'].'">';
if (($_img = getFaceURI($T['tanarId'],'tanar')) != '') echo '<img src="'.$_img.'" class="arckep">';
else {
- echo '<div class="arckepPlaceholder" style="display:flex; flex-direction: column">';
- // echo '<div class="icon-adult" style="font-size:120px; color:#eee;"></div>';
- echo '</div>';
+ echo '<div class="arckepPlaceholder" style="display:flex; flex-direction: column">';
+ // echo '<div class="icon-adult" style="font-size:120px; color:#eee;"></div>';
+ echo '</div>';
}
echo '<br/>';
diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/intezmeny/valtas.phtml b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/intezmeny/valtas.phtml
index 0a2e7fde..6ed78912 100644
--- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/intezmeny/valtas.phtml
+++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/intezmeny/valtas.phtml
@@ -41,7 +41,16 @@ div.besorolas { font-size:x-small; color: #aaa;}
for($i=0; $i<count($ADAT['tanarok']); $i++) {
$T = $ADAT['tanarok'][$i];
- echo '<div class="item tanarNev" data-tanarid="'.$T['tanarId'].'">';
+ $_kulsos = ($T['statusz']=='külső óraadó');
+ $_kulsosClassName = ($_kulsos) ? 'kulsos':'';
+
+ if (isset($ADAT['kulsosview'])) {
+ if ($ADAT['kulsosview']===true && $T['statusz']!='külső óraadó') continue;
+ elseif ($ADAT['kulsosview']!==true && $T['statusz']=='külső óraadó') continue;
+ }
+
+ echo '<div class="item tanarNev '.$_kulsosClassName.'" data-tanarid="'.$T['tanarId'].'">';
+
if (($_img = getFaceURI($T['tanarId'],'tanar')) != '') echo '<img src="'.$_img.'" class="arckep">';
else {
echo '<div class="arckepPlaceholder" style="display:flex; flex-direction: column">';