mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
0bc0a09bf4
- application/extensions file system permission now is 775 - application/logs file system permission now is 775 - Added extensions directory in application/: config, controllers, helpers, hooks, libraries, models, views and widgets - Added view views/extensions/manage.php - Added controller controllers/system/extensions/Manager.php - Added library ExtensionsLib to manage extensions - Added model models/system/Extensions_model.php - Moved code related to print out info from MigrationLib to EPrintfLib
71 lines
2.9 KiB
PHP
71 lines
2.9 KiB
PHP
<?php
|
|
/* Copyright (C) 2013 FH Technikum-Wien
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as
|
|
* published by the Free Software Foundation; either version 2 of the
|
|
* License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
|
*
|
|
* Authors: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>
|
|
*/
|
|
/**
|
|
* Cronjob zur Versendung von Infomails wenn Coodle Umfragen Beendet sind
|
|
*/
|
|
require_once('../config/vilesci.config.inc.php');
|
|
require_once('../include/coodle.class.php');
|
|
require_once('../include/phrasen.class.php');
|
|
require_once('../include/benutzer.class.php');
|
|
require_once('../include/mail.class.php');
|
|
|
|
$coodle = new coodle();
|
|
$coodle->getCoodleBeendet();
|
|
$p = new phrasen();
|
|
|
|
foreach($coodle->result as $row)
|
|
{
|
|
$benutzer = new benutzer($row->ersteller_uid);
|
|
$subject='Ablauf der Coodle Umfrage';
|
|
|
|
$mailtext='';
|
|
$mailtexthtml='';
|
|
switch($benutzer->geschlecht)
|
|
{
|
|
case 'm':
|
|
$mailtext.="Sehr geehrter Herr ".$benutzer->vorname.' '.$benutzer->nachname."!\n\n";
|
|
$mailtexthtml.="Sehr geehrter Herr ".$benutzer->vorname.' '.$benutzer->nachname."!<br><br>";
|
|
break;
|
|
case 'w':
|
|
$mailtext.="Sehr geehrte Frau ".$benutzer->vorname.' '.$benutzer->nachname."!\n\n";
|
|
$mailtexthtml.="Sehr geehrte Frau ".$benutzer->vorname.' '.$benutzer->nachname."!<br><br>";
|
|
break;
|
|
default:
|
|
$mailtext.="Sehr geehrte(r) Herr/Frau ".$benutzer->vorname.' '.$benutzer->nachname."!\n\n";
|
|
$mailtexthtml.="Sehr geehrte(r) Herr/Frau ".$benutzer->vorname.' '.$benutzer->nachname."!<br><br>";
|
|
break;
|
|
}
|
|
|
|
$mailtext.="Ihre Terminumfrage zum Thema \"".$row->titel."\" ist beendet.\n";
|
|
$mailtext.="Bitte folgen sie dem Link um die Terminumfrage abzuschließen: ".CIS_ROOT."cis/public/coodle.php?coodle_id=".$row->coodle_id."\n\n";
|
|
$mailtext.= $p->t('mail/signatur');
|
|
|
|
$mailtexthtml.="Ihre Terminumfrage zum Thema \"".$row->titel."\" ist beendet.<br>";
|
|
$mailtexthtml.="Bitte folgen sie dem Link um die Terminumfrage abzuschließen: <a href=\"".CIS_ROOT."cis/public/coodle.php?coodle_id=".$row->coodle_id."\">Link zur Umfrage</a><br><br>";
|
|
$mailtexthtml.= nl2br($p->t('mail/signatur'));
|
|
|
|
$mail = new mail($row->ersteller_uid.'@'.DOMAIN, 'no-reply@'.DOMAIN, $subject, $mailtext);
|
|
$mail->setHTMLContent($mailtexthtml);
|
|
if($mail->send())
|
|
echo "Mail versandt an $row->ersteller_uid CoodleID $row->coodle_id<br>\n";
|
|
else
|
|
echo "Fehler beim Mailversand an $row->ersteller_uid CoodleID $row->coodle_id<br>\n";
|
|
}
|
|
?>
|