From 8ba4eb09ddb764eaf01fabe30bdd49a202858d4d Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Sun, 29 Sep 2024 04:28:14 +0200 Subject: Rev: 4859 --- .../private/naplo/felveteli/level-mzsg-pre.php | 71 ++++++++++++++++++++++ .../policy/private/naplo/felveteli/level-mzsg.php | 0 .../naplo/felveteli/levelIgazgato-mzsg-pre.php | 68 +++++++++++++++++++++ .../private/naplo/felveteli/levelIgazgato-mzsg.php | 30 +++++++++ .../private/naplo/orarend/orarendModosito-pre.php | 1 + 5 files changed, 170 insertions(+) create mode 100644 mayor-orig/mayor-naplo/www/policy/private/naplo/felveteli/level-mzsg-pre.php create mode 100644 mayor-orig/mayor-naplo/www/policy/private/naplo/felveteli/level-mzsg.php create mode 100644 mayor-orig/mayor-naplo/www/policy/private/naplo/felveteli/levelIgazgato-mzsg-pre.php create mode 100644 mayor-orig/mayor-naplo/www/policy/private/naplo/felveteli/levelIgazgato-mzsg.php (limited to 'mayor-orig/mayor-naplo/www/policy/private') diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/felveteli/level-mzsg-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/felveteli/level-mzsg-pre.php new file mode 100644 index 00000000..ccccf906 --- /dev/null +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/felveteli/level-mzsg-pre.php @@ -0,0 +1,71 @@ +'naplo','result'=>'indexed')); + $ADAT['level'] = $r; + for ($i = 0; $i < count($ADAT['level']); $i++) { + $D = $ADAT['level'][$i]; + if (chop($D['mashova']) == "") $ADAT['level'][$i]['mashova'] = array(); else $ADAT['level'][$i]['mashova'] = explode(',',$D['mashova']); + if (chop($D['helyhiany']) == "") $ADAT['level'][$i]['helyhiany'] = array(); else $ADAT['level'][$i]['helyhiany'] = explode(',',$D['helyhiany']); + if (chop($D['elutasitott']) == "") $ADAT['level'][$i]['elutasitott'] = array(); else $ADAT['level'][$i]['elutasitott'] = explode(',',$D['elutasitott']); + } + $file = __INTEZMENY.'_'.date('Y').'_teljes'; + if (pdfLevel($file, $ADAT)) { + header('Location: '.location('index.php?page=session&f=download&download=true&dir=naplo/felveteli/level&file='.$file.'.pdf')); + } else { + $_SESSION['alert'][] = 'info::Hiba a file-generáláskor!'; + } + + } else { + + if (strlen($token)==40) { + + $q = "SELECT oId FROM felveteli_levelLog WHERE token='%s' AND generalasDt>= NOW() - interval 10 MINUTE"; + $v = array($token); + $oId = db_query($q, array('modul'=>'naplo','result'=>'value','values'=>$v,'debug'=>false)); + + if ($oId=='') { + $_SESSION['alert'][] = 'info::Ez a token már nem érvényes!'; + } else { + //$q = "SELECT * FROM adatok_"._EV." ORDER BY evfolyam,nev"; + $q = "SELECT * FROM felveteli_eredmeny WHERE oId='%s'"; + $v = array($oId); + $r = db_query($q, array('modul'=>'naplo','result'=>'indexed','values'=>$v)); + $ADAT['level'] = $r; + $D = $ADAT['level'][0]; + if (chop($D['mashova']) == "") $ADAT['level'][0]['mashova'] = array(); else $ADAT['level'][0]['mashova'] = explode(',',$D['mashova']); + if (chop($D['helyhiany']) == "") $ADAT['level'][0]['helyhiany'] = array(); else $ADAT['level'][0]['helyhiany'] = explode(',',$D['helyhiany']); + if (chop($D['elutasitott']) == "") $ADAT['level'][0]['elutasitott'] = array(); else $ADAT['level'][0]['elutasitott'] = explode(',',$D['elutasitott']); +# $ADAT['iktsz'] = 'C8-62/2021'; + $file = __INTEZMENY.'_'.date('Y').'_'.$oktid.$token; + if (pdfLevel($file, $ADAT)) { + $q = "UPDATE felveteli_levelLog SET letoltesDt=NOW() WHERE token='%s'"; + $v = array($token); + db_query($q, array('modul'=>'naplo','values'=>$v,'debug'=>false)); + header('Location: '.location('index.php?page=session&f=download&download=true&dir=naplo/felveteli/level&file='.$file.'.pdf')); + exit; + } else { + $_SESSION['alert'][] = 'info::Hiba a file-generáláskor!'; + } + } + } else { + $_SESSION['alert'][] = 'info::Nem adtál meg érvényes kulcsot a letöltéshez!'; + } + } + // ha eljutottunk idáig, visszairányíthatnánk a lekérdező oldalra + //header('Location: '.location('index.php?page=felveteli&f=kozponti')); + +?> diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/felveteli/level-mzsg.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/felveteli/level-mzsg.php new file mode 100644 index 00000000..e69de29b diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/felveteli/levelIgazgato-mzsg-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/felveteli/levelIgazgato-mzsg-pre.php new file mode 100644 index 00000000..b954f0c2 --- /dev/null +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/felveteli/levelIgazgato-mzsg-pre.php @@ -0,0 +1,68 @@ + 'FIKTIV'"; +// $ADAT['iskola'] = db_query($q, array('modul'=>'naplo','result'=>'assoc','keyfield'=>'omkod')); + $ADAT['iskola'] = db_query($q, array('modul'=>'naplo','result'=>'assoc','keyfield'=>'OM')); +// $q = "SELECT distinct omkod FROM felveteli WHERE level2 != 'nem kell értesíteni' AND omkod != '' ORDER BY omkod"; + $q = "SELECT distinct OM FROM felveteli_eredmeny WHERE OM != '' ORDER BY OM"; + $ADAT['OM'] = $R = db_query($q, array('modul'=>'naplo','result'=>'idonly')); + for ($i=0; $i'naplo','result'=>'indexed','values'=>array($_om))); + $file = _EV . '_' . ($i+1) . '_' . $_om; + $ADAT['iktsz'] = $IKTSZ; // . ($i+1) . '/' . _EV; + if ($ADAT['generatePDF']==true) pdfLevel($file, $ADAT); + if (is_array($ADAT['sendMAIL']) && in_array($_om,$ADAT['sendMAIL'])) { + //echo $ADAT['iskola'][$_om]['email']; + $mail = new PHPMailer; +// $mail->isSMTP(); +// $mail->Host = 'smtp.gmail.com'; +// $mail->Port = 587; +// $mail->SMTPSecure = 'tls'; +// $mail->SMTPAuth = true; +// $mail->Username = _FELVETELI_SMTP_USERNAME; +// $mail->Password = _FELVETELI_SMTP_PASSWORD; + $mail->setFrom('igazgato@moricz-bp.hu', 'Budapest II. Kerületi Móricz Zsigmond Gimnázium'); + $mail->addReplyTo('felveteli@moricz-bp.hu', 'Felvételi ügyintézés - Móricz Zsigmond Gimnázium'); + $mail->addAddress($ADAT['iskola'][$_om]['email'], 'Igazgató'); + $mail->addAddress('bence.barnkopf@moricz-bp.hu', 'Igazgató'); + $mail->Subject = 'Értesítés felvételi eredményekről - 2024/2025-ös beiskolázás'; + $mail->msgHTML("A levelet a MaYoR elektronikus napló generálta PDF csatolmány tartalmazza."); + $mail->AltBody="A levelet a MaYoR elektronikus napló generálta PDF csatolmány tartalmazza."; + $mail->addAttachment(_DOWNLOADDIR."/private/naplo/felveteli/levelIgazgato/".$file.'.pdf'); + if (!$mail->send()) { + echo "Mailer Error: " . $mail->ErrorInfo; + } else { + echo "Message sent! " . $ADAT['iskola'][$_om]['email']; + $qr = "UPDATE felveteli SET level2='értesítve' WHERE omkod='%s'"; + db_query($qr, array('modul'=>'naplo','values'=>array($_om))); + } + } + // header('Location: '.location('index.php?page=session&f=download&download=true&dir=felveteli/levelIgazgato&file='.$file.'.pdf')); + } + } + +?> diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/felveteli/levelIgazgato-mzsg.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/felveteli/levelIgazgato-mzsg.php new file mode 100644 index 00000000..9a862f17 --- /dev/null +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/felveteli/levelIgazgato-mzsg.php @@ -0,0 +1,30 @@ +PDF generálás?Generáljunk pdf-eket? (Lassan fut!)
'; + echo ''; + + echo '

Email küldés

'; + echo '
'; + for ($i=0; $i'; + echo $i.". "; + echo 'SENDEMAIL '; + echo $_om.' : '; + var_dump($ADAT['iskola'][$_om]['email']); + $file= $file = _EV . '_' . ($i+1) . '_' . $_om; + echo 'PDF'; + echo '
'; + if ($i%5==0) echo '
'; + } + echo ''; + formEnd(); + } + +?> \ No newline at end of file diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/orarend/orarendModosito-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/orarend/orarendModosito-pre.php index 250197a0..dc26ec7b 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/orarend/orarendModosito-pre.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/orarend/orarendModosito-pre.php @@ -185,6 +185,7 @@ $ADAT['termek'] = getTermek(array('result'=>'assoc')); + $ADAT['szabadTermek'] = getSzabadTermekByDtInterval($tolDt,$igDt,''); $ADAT['tanarok'] = getTanarok(array('result'=>'assoc')); // ===================== if ($tankorId!='') { -- cgit v1.2.3