From 6947bf23be62a729dadd99f1156ab3456483c204 Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Sun, 24 Mar 2019 21:49:01 +0100 Subject: Rev: 4501 --- .../www/include/modules/naplo/share/hirnok.php | 31 +++++++++++++++++++++- .../www/include/modules/naplo/uzeno/uzeno.php | 11 +++++--- .../naplo/admin/kretaHianyzasImport-pre.php | 25 +++++++++-------- .../www/policy/private/naplo/hirnok/hirnok-pre.php | 25 ++++++++++++++--- .../www/policy/private/naplo/hirnok/hirnok.php | 1 + .../module-naplo/html/hibabejelento/admin.phtml | 22 ++++++++------- .../classic/module-naplo/css/hianyzas/osztaly.css | 2 +- .../html/hibabejelento/hibabejelento.phtml | 1 - .../classic/module-naplo/html/hirnok/hirnok.phtml | 26 ++++++++++++++++++ .../module-naplo/html/osztalyozo/tankor.phtml | 8 +++--- 10 files changed, 117 insertions(+), 35 deletions(-) (limited to 'mayor-orig/mayor-naplo/www') 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 0607670f..4aee93d5 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 @@ -309,7 +309,7 @@ global $SZEMESZTER; $values = array(_USERACCOUNT,_POLICY); } } else { - $q = "SELECT naploTipus,naploId FROM hirnokFeliratkozas WHERE userAccount='%s' AND policy='%s'"; + $q = "SELECT naploTipus,naploId,email FROM hirnokFeliratkozas WHERE userAccount='%s' AND policy='%s'"; $values = array(_USERACCOUNT,_POLICY); } $r = db_query($q, array('modul'=>'naplo_intezmeny','result'=>'indexed','values'=>$values)); @@ -324,6 +324,35 @@ global $SZEMESZTER; return $result; } + function getHirnokEmail() {return getFutarEmail;} + function getFutarEmail() { + + if ( _POLICY=='parent' && defined('__PARENTDIAKID') ) { + $naploId = __USERDIAKID; + $naploTipus='diak'; + $q = "SELECT email FROM `szulo` WHERE szuloId=%u"; + $values = array(__USERSZULOID); + $email = db_query($q, array('modul'=>'naplo_intezmeny','result'=>'record','values'=>$values)); + } elseif (__DIAK===true) { + $naploId = __USERDIAKID; + $naploTipus='diak'; + $q = "SELECT email FROM `diak` WHERE diakId=%u"; + $values = array($naploId); + $email = db_query($q, array('modul'=>'naplo_intezmeny','result'=>'record','values'=>$values)); + } elseif (__TANAR ===true) { // tanár nézet + $naploId = __USERTANARID; + $naploTipus='tanar'; + $q = "SELECT email FROM `tanar` WHERE tanarId=%u"; + $values = array($naploId); + $email = db_query($q, array('modul'=>'naplo_intezmeny','result'=>'record','values'=>$values)); + } else return false; + + $q = "SELECT email FROM `hirnokFeliratkozas` WHERE userAccount='%s' AND policy='%s' AND naploTipus='%s' AND naploId=%u"; + $values = array(_USERACCOUNT,_POLICY,$naploTipus,$naploId); + $futarEmail = db_query($q, array('modul'=>'naplo_intezmeny','result'=>'record','values'=>$values)); + return array('futar'=>$futarEmail,'hirnok'=>$futarEmail,'naplo'=>$email); + } + function addHirnokFeliratkozas($ADAT) { if (intval($ADAT['naploId'])==0) return false; diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/uzeno/uzeno.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/uzeno/uzeno.php index 71df3eae..de157fa3 100644 --- a/mayor-orig/mayor-naplo/www/include/modules/naplo/uzeno/uzeno.php +++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/uzeno/uzeno.php @@ -44,10 +44,13 @@ function getUzenoUzenetek($SET=array('tanev'=>__TANEV,'count'=>false,'filter'=>array(),'ignoreAdmin'=>false,'filterFlag'=>array(),'limits'=>array(),'order'=>'DESC')) { - $__SZEREP = __SZEREP; // cronból is szeretnénk használni - - if (__SZEREP=='') return array(); - + if (_RUNLEVEL==='cron') { + $__SZEREP = $SET['szerep']; + if ($__SZEREP=='') return array(); + } else { + $__SZEREP = __SZEREP; // cronból is szeretnénk használni + if (__SZEREP=='') return array(); + } $feladoId = setUzenoFeladoId(); $TIPUSOK = initUzenoTipusok(array('csakId'=>true,'result'=>'idonly','tanev'=>$SET['tanev'],'forRead'=>true)); diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/admin/kretaHianyzasImport-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/admin/kretaHianyzasImport-pre.php index 8f4cb909..5771a84a 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/admin/kretaHianyzasImport-pre.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/admin/kretaHianyzasImport-pre.php @@ -42,15 +42,17 @@ /* kretaHianyzasImportarray (size=10) 0 => string 'Bacsó Dániel József' (length=22) - 1 => string '72437828706' (length=11) - 2 => string '2018-12-17' (length=10) - 3 => string '2' (length=1) - 4 => string '08.A' (length=4) - 5 => string 'ének-zene' (length=10) - 6 => string 'Hiányzás' (length=10) - 7 => string '' (length=0) - 8 => string 'Igen' (length=4) - 9 => string 'Orvosi igazolás' (length=16) + 1 => string '2018-12-17' (length=10) + 2 => string '2' (length=1) + 3 => string '08.A' (length=4) + 4 => string 'ének-zene' (length=10) + 5 => string 'Hiányzás' (length=10) + 6 => string '' (length=0) + 7 => string 'Igen' (length=4) + 8 => string 'Orvosi igazolás' (length=16) + + ha van: 9 => string '72437828706' (length=11) + */ $D = array(); $D['diakNev'] = $record[0]; @@ -62,8 +64,9 @@ kretaHianyzasImportarray (size=10) $D['diakId'] = $DIAKNEV2diakId[$D['diakNev']][0]['diakId']; $D['oId'] = $DIAKNEV2diakId[$D['diakNev']][0]['oId']; } - $_tmp = explode('/',$record[1]); - $D['dt'] = $_tmp[2] .'-'. $_tmp[0] .'-'. $_tmp[1]; + // $_tmp = explode('/',$record[1]); + // $D['dt'] = $_tmp[2] .'-'. $_tmp[0] .'-'. $_tmp[1]; + $D['dt'] = $record[1]; $D['ora'] = intval($record[2]); $D['kretaTankorNev'] = $record[3]; $D['kretaTantargyNev'] = $record[4]; diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/hirnok/hirnok-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/hirnok/hirnok-pre.php index adc18ddc..6e2902ae 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/hirnok/hirnok-pre.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/hirnok/hirnok-pre.php @@ -11,8 +11,8 @@ ) ); if (strtotime($tolDt)>strtotime(date('Y-m-d H:i:s'))) $tolDt = date('Y-m-d',strtotime('-10 day')); - $osztalyId = readVariable($_POST['osztalyId'], 'id'); + if (__NAPLOADMIN === true) { // csak adminnak engedjük kiválasztani - lásd még include $diakId = readVariable($_POST['diakId'], 'id', readVariable($_GET['diakId'], 'id')); $tanarId = readVariable($_POST['tanarId'], 'id', readVariable($_GET['tanarId'], 'id')); @@ -20,12 +20,29 @@ if ($diakId==0 && count($feliratkozott['diak'])>0) $diakId = $feliratkozott['diak']; if ($tanarId==0 && count($feliratkozott['tanar'])>0) $tanarId = $feliratkozott['tanar']; if ($tanarId==0 && defined('__USERTANARID')) $tanarId = __USERTANARID; + define('_ALLOW_SUBSCRIBE',false); } else { if (__DIAK===true) { // diák nézet - $diakId = __USERDIAKID; + $naploId = $diakId = __USERDIAKID; + $naploTipus='diak'; + define('_ALLOW_SUBSCRIBE',true); } elseif (__TANAR ===true) { // tanár nézet - $tanarId = __USERTANARID; - } + $naploId=$tanarId = __USERTANARID; + $naploTipus='tanar'; + define('_ALLOW_SUBSCRIBE',true); + } else { + define('_ALLOW_SUBSCRIBE',false); + } + if ($action=='hirnokFeliratkozas' && _ALLOW_SUBSCRIBE===true) { + $S['email'] = readVariable($_POST['email'],'email'); + $S['naploId'] = $naploId; + $S['naploTipus'] = $naploTipus; + $S['hirnokFeliratkozasId'] = readVariable($_POST['hirnokFeliratkozasId'],'numeric'); + if ($S['hirnokFeliratkozasId']>0) delHirnokFeliratkozas($S); + elseif ($S['email']!='') addHirnokFeliratkozas($S); + unset($S); + } + $ADAT['futarEmail'] = getFutarEmail(); } $ADAT['hirnokFolyam'] = hirnokWrapper(array('tolDt'=>$tolDt,'diakId'=>$diakId,'tanarId'=>$tanarId)); diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/hirnok/hirnok.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/hirnok/hirnok.php index ce3b7f72..dbb79f35 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/hirnok/hirnok.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/hirnok/hirnok.php @@ -1,6 +1,7 @@ \ No newline at end of file diff --git a/mayor-orig/mayor-naplo/www/skin/ajax/module-naplo/html/hibabejelento/admin.phtml b/mayor-orig/mayor-naplo/www/skin/ajax/module-naplo/html/hibabejelento/admin.phtml index c2d3b6a1..69585645 100644 --- a/mayor-orig/mayor-naplo/www/skin/ajax/module-naplo/html/hibabejelento/admin.phtml +++ b/mayor-orig/mayor-naplo/www/skin/ajax/module-naplo/html/hibabejelento/admin.phtml @@ -57,7 +57,7 @@ $_K = $ADAT['kerelmek'][$i]; $kerelemId = $_K['kerelemId']; $_napja = round(((strtotime(date('Y-m-d H:i:s')) - strtotime($_K['rogzitesDt']))/(24*60*60))); - if ($_napja>60) $_napjaBg = '#f00; outline: solid 2px orange;'; else if ($_napja>7) $_napjaBg = '#f44336; outline: solid 2px red; '; else $_napjaBg = '#aaa'; + if ($_K['lezarasDt']!='') { $_color = "#888"; $_class="icon-paper-clip-alt"; @@ -65,25 +65,27 @@ $_color = "#64ce64"; $_class="icon-ok-sign"; } else { - $_color="#ce6464"; + $_color='#ff5722'; $_class="icon-question-sign"; } - echo '
'; - echo '
'; - echo '
'.superdate($ADAT['kerelmek'][$i]['rogzitesDt']).'
'; - echo '
'; + echo '
'; + echo '
Hangya - '.superdate($ADAT['kerelmek'][$i]['rogzitesDt']).'
'; + echo '
'; echo ''; echo ''; - echo ''; + echo ''; echo $_napja; - echo ''; + echo ' napja'; echo htmlspecialchars($ADAT['kerelmek'][$i]['szoveg']); echo ''; echo '
'; - echo '
'.htmlspecialchars($ADAT['kerelmek'][$i]['valasz']).' '.$_K['jovahagyasAccount'].'
'; +// echo '
'. +//htmlspecialchars($ADAT['kerelmek'][$i]['valasz']).' '.$_K['jovahagyasAccount'].'
'; echo ''; diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/hianyzas/osztaly.css b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/hianyzas/osztaly.css index cf0665a2..d5c8c881 100644 --- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/hianyzas/osztaly.css +++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/hianyzas/osztaly.css @@ -164,7 +164,7 @@ table.navi th, table.navi td { text-align: center; border-style: solid none solid none; - border-width: 1px 0px 2px 0px; + border-width: 1px 0px 1px 0px; border-color: #aabbc0; } table.navi input { diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/hibabejelento/hibabejelento.phtml b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/hibabejelento/hibabejelento.phtml index 08bec2a3..350e2363 100644 --- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/hibabejelento/hibabejelento.phtml +++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/hibabejelento/hibabejelento.phtml @@ -12,7 +12,6 @@ echo ''; - echo '
'; if (count($KERELEM_TAG)>0) { diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/hirnok/hirnok.phtml b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/hirnok/hirnok.phtml index 0ab0693c..ab05f322 100644 --- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/hirnok/hirnok.phtml +++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/hirnok/hirnok.phtml @@ -317,4 +317,30 @@ if ($D['bejegyzesAdat']['szoveg'] !='') echo ''.$D['bejegyzesAdat']['szoveg'].''; if ($D['tanarAdat']['tanarNev']!='') echo ' - '.$D['tanarAdat']['tanarNev']; } + + + function putHirnokFeliratkozas_user($ADAT) { + + + echo '
'; + echo '
'; + echo ''.'email'; + echo '
'; + echo '
'; + echo 'A gombra kattintva feliratkozhatsz a MaYoR Hírnök Futár szolgáltatására. Add meg azt az email címedet, amin elérünk! Leiratkozni a hírnök beállítások menüpontban tudsz.'; + formBegin(); + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo '
'; + formEnd(); + + echo '
'; + echo '
'; + + } + ?> \ No newline at end of file diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/osztalyozo/tankor.phtml b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/osztalyozo/tankor.phtml index cbac5b68..7000aec1 100644 --- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/osztalyozo/tankor.phtml +++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/osztalyozo/tankor.phtml @@ -212,12 +212,14 @@ echo ''; $db = 0; if (is_array($Diakok['nevek'])) foreach ($Diakok['nevek'] as $diakId => $DIAKADAT) { - $JEGYET_KAP = ( in_array($ADAT['diakJogviszony'][$diakId][date('Y-m-d')]['statusz'],array('jogviszonyban van','vendégtanuló')) || ($ADAT['diakJogviszony'][$diakId][date('Y-m-d')]['statusz']=='magántanuló' && $tankorJelleg == 'gyakorlat') + || + ($ADAT['diakJogviszony'][$diakId][date('Y-m-d')]['statusz']=='magántanuló' && defined('MAYOR_SOCIAL')=== true && MAYOR_SOCIAL===true) ); + $__JEGYEK = array(); //$diakKovetelmeny = $Diakok['adatok'][$diakId][count($Diakok['adatok'][$diakId])-1]['kovetelmeny']; (ezt nem használjuk!!!) echo ''; @@ -361,13 +363,13 @@ $_szlo=$_sumsuly = 0; for ($i=0; $i'.$atlag.''; -- cgit v1.2.3