aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-naplo/www/policy
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/www/policy
parentc0f79397dd75e03a7a40303f82926e8187697d07 (diff)
downloadmayor-6947bf23be62a729dadd99f1156ab3456483c204.tar.gz
mayor-6947bf23be62a729dadd99f1156ab3456483c204.zip
Rev: 4501
Diffstat (limited to 'mayor-orig/mayor-naplo/www/policy')
-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
3 files changed, 36 insertions, 15 deletions
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