aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-naplo
diff options
context:
space:
mode:
authorM.Gergo2019-03-24 21:49:01 +0100
committerM.Gergo2019-03-24 21:49:01 +0100
commit6947bf23be62a729dadd99f1156ab3456483c204 (patch)
tree0ce45528e3f119b52210db2d7dadbc555f7c9363 /mayor-orig/mayor-naplo
parentc0f79397dd75e03a7a40303f82926e8187697d07 (diff)
downloadmayor-6947bf23be62a729dadd99f1156ab3456483c204.tar.gz
mayor-6947bf23be62a729dadd99f1156ab3456483c204.zip
Rev: 4501
Diffstat (limited to 'mayor-orig/mayor-naplo')
-rw-r--r--mayor-orig/mayor-naplo/log/mayor-naplo.rev2
-rw-r--r--mayor-orig/mayor-naplo/www/include/modules/naplo/share/hirnok.php31
-rw-r--r--mayor-orig/mayor-naplo/www/include/modules/naplo/uzeno/uzeno.php11
-rw-r--r--mayor-orig/mayor-naplo/www/policy/private/naplo/admin/kretaHianyzasImport-pre.php25
-rw-r--r--mayor-orig/mayor-naplo/www/policy/private/naplo/hirnok/hirnok-pre.php25
-rw-r--r--mayor-orig/mayor-naplo/www/policy/private/naplo/hirnok/hirnok.php1
-rw-r--r--mayor-orig/mayor-naplo/www/skin/ajax/module-naplo/html/hibabejelento/admin.phtml22
-rw-r--r--mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/hianyzas/osztaly.css2
-rw-r--r--mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/hibabejelento/hibabejelento.phtml1
-rw-r--r--mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/hirnok/hirnok.phtml26
-rw-r--r--mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/osztalyozo/tankor.phtml8
11 files changed, 118 insertions, 36 deletions
diff --git a/mayor-orig/mayor-naplo/log/mayor-naplo.rev b/mayor-orig/mayor-naplo/log/mayor-naplo.rev
index ab5135de..8af91005 100644
--- a/mayor-orig/mayor-naplo/log/mayor-naplo.rev
+++ b/mayor-orig/mayor-naplo/log/mayor-naplo.rev
@@ -1 +1 @@
-4455
+4501
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 @@
<?php
global $ADAT;
+ if (__EMAIL_ENABLED===true && is_null($ADAT['futarEmail']['futar']) && _ALLOW_SUBSCRIBE===true) putHirnokFeliratkozas_user($ADAT['futarEmail']['naplo']);
putHirnokFolyam($ADAT);
?> \ 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 '<div style="height:2px;"></div>';
- echo '<div style="width:90%; margin: 0px auto; border: solid 1px rgb(50,0,50);">';
- echo '<div style="font-size:10px; background-color: #3c3c64; color: white; font-weight: bold; border-bottom: solid 1px #dddddd; padding:3px 10px;">'.superdate($ADAT['kerelmek'][$i]['rogzitesDt']).'</div>';
- echo '<div style="background-color: #cccccc; padding:10px;border-bottom: solid 1px #dddddd; padding:3px 3px; min-height:30px;">';
+ echo '<div style="width:90%; margin: 0px auto; border: solid 1px #aaa; border-radius: 2px; ">';
+ echo '<div style="font-size:10px; background-color: #3c3c64; color: white; font-weight: normal; border-bottom: solid 1px #dddddd; padding:4px 10px;">Hangya - '.superdate($ADAT['kerelmek'][$i]['rogzitesDt']).'</div>';
+ echo '<div style="background-color: #eee; padding:10px;border-bottom: solid 0px #dddddd; padding:3px 3px; min-height:30px;">';
echo '<a style="color: black;" href="'.$_link.'">';
echo '<span class="'.$_class.'" style="color:'.$_color.'; float:left; font-size:30px; height:30px; line-height:30px; padding:0px 4px;"></span>';
- echo '<span style="float:right; height:30px; background-color: '.$_napjaBg.'; color:white; padding: 0px 5px 0px 5px; font-size:25px;">';
+ echo '<span style="float:right; height:30px; background-color: '.$_napjaBg.'; color:white; padding: 0px 4px 0px 4px; font-size:24px;">';
echo $_napja;
- echo '</span>';
+ echo ' napja</span>';
echo htmlspecialchars($ADAT['kerelmek'][$i]['szoveg']);
echo '</a>';
echo '</div>';
- echo '<div style="background-color: '.$_color.'; color: white; padding:10px; border-bottom: solid 1px #3c3c64; padding:3px 10px;">'.htmlspecialchars($ADAT['kerelmek'][$i]['valasz']).' '.$_K['jovahagyasAccount'].'</div>';
+// echo '<div style="background-color: '.$_color.';
+//color: white;
+//padding:10px; border-bottom: solid 1px #3c3c64; padding:3px 10px;">'.
+//htmlspecialchars($ADAT['kerelmek'][$i]['valasz']).' '.$_K['jovahagyasAccount'].'</div>';
echo '<style type="text/css">
- table.kerelemValasz {background-color:#ddd;}
+ table.kerelemValasz {background-color:#ddd;width:100%;}
table.kerelemValasz td {font-size:10px; background-color:white; padding:2px 4px; vertical-align:top;}
table.kerelemValasz td.dt {background-color: #eee;text-align: right;}
</style>';
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 '<textarea name="txt" id="focus" maxlength="255">';
echo '</textarea>';
-
echo '<br />';
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 '<q>'.$D['bejegyzesAdat']['szoveg'].'</q>';
if ($D['tanarAdat']['tanarNev']!='') echo ' - '.$D['tanarAdat']['tanarNev'];
}
+
+
+ function putHirnokFeliratkozas_user($ADAT) {
+
+
+ echo '<div class="hirnokDoboz '.$D['hirnokTipus'].'">';
+ echo '<div class="hirnokBadgeHolder">';
+ echo '<a href="'.href('index.php?page=naplo&sub=hirnok&f=hirnok').'"><span style="background-color: #e91e63" class="material-icons">'.'email</span></a>';
+ echo '</div>';
+ echo '<div class="hirnokText">';
+ 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 '<input type="hidden" name="action" value="hirnokFeliratkozas" />';
+ echo '<table align="center">';
+ echo '<tr>';
+ echo '<td><input type="text" style="font-size:normal; min-width:250px;" placeholder="email" name="email" value="'.$ADAT['email'].'"/></td>';
+ echo '<td><input type="submit"></td>';
+ echo '</tr>';
+ echo '</table>';
+ formEnd();
+
+ echo '</div>';
+ echo '</div>';
+
+ }
+
?> \ 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 '<tbody>';
$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 '<tr class="'.str_replace(' ', '', ekezettelen($ADAT['diakJogviszony'][$diakId][date('Y-m-d')]['statusz'])).'">';
@@ -361,13 +363,13 @@
$_szlo=$_sumsuly = 0;
for ($i=0; $i<count($__JEGYEK['mase']); $i++) {
- $_jegyOsszeg += $_szlo += ($__JEGYEK['mase'][$i]['jegy']) * $SULYOK[$__JEGYEK['mase'][$i]['tipus']-1];
+ $_szlo += ($__JEGYEK['mase'][$i]['jegy']) * $SULYOK[$__JEGYEK['mase'][$i]['tipus']-1];
$_sumsuly += $SULYOK[$__JEGYEK['mase'][$i]['tipus']-1];
if ($KOVETELMENY[$__JEGYEK['mase'][$i]['jegyTipus']]['összeadható']===true) $_osszegMutat = true;
if ($KOVETELMENY[$__JEGYEK['mase'][$i]['jegyTipus']]['átlagolható']===true) $_atlagMutat = true;
}
if ($_sumsuly!=0) $atlag_title .= ' ('.number_format($_szlo/$_sumsuly,2,',','').')';
- $_jegyOszseg += $_szlo;
+ $_jegyOsszeg += $_szlo;
// összeget vagy átlagot mutassunk?
if ($_atlagMutat === true) echo '<span title="'.$atlag_title.'" data-atlag="'.$diakId.':'.str_replace(',','.',$atlag).'">'.$atlag.'</span>';