diff --git a/system/sendZugangscode.php b/system/sendZugangscode.php
index 00664815e..20655ad46 100755
--- a/system/sendZugangscode.php
+++ b/system/sendZugangscode.php
@@ -28,7 +28,7 @@ require_once('../include/kontakt.class.php');
- Check Studenten
+ Zugangscode Senden
@@ -49,6 +49,7 @@ $qry = "SELECT * FROM public.tbl_benutzer
WHERE uid LIKE '__12%'
AND foto is null";
+
if($result = $db->db_query($qry))
{
while($row = $db->db_fetch_object($result))
@@ -60,13 +61,12 @@ if($result = $db->db_query($qry))
$kontakt = new kontakt();
$kontakt->load_persKontakttyp($row->person_id, 'email');
- $name = $row->anrede.' '.$row->nachname;
$zugangscode = $row->zugangscode;
-
+
// Falls mehrere vorhanden sind, an alle schicken
foreach($kontakt->result as $kon)
{
- if(sendMail($kon->kontakt, $name, $zugangscode))
+ if(sendMail($kon->kontakt, $row->nachname, $zugangscode))
$count+=1;
else
$countError+=1;
@@ -84,11 +84,32 @@ function sendMail($email, $name, $zugangscode)
// trim zugangscode
// an private email schicken
- $msg = 'TEXT';
+ $msg = 'Sehr geehrter Herr/Frau '.$name.'
';
+ $msg.= 'Willkommen an der Fachhochschule Technikum Wien.
';
+ $msg.= 'Für Ihren FH-Ausweis, der gleichzeitig als Zutrittskarte dient, benötigen wir ein Foto von Ihnen.
';
+ $msg.= 'Bitte nutzen Sie den folgenden Link und den angegebenen Zugangscode um Ihr Foto hochzuladen.
';
+ $msg.= 'https://cis.technikum-wien.at/cis/public/prestudententool/index.php
';
+ $msg.= 'Zugangscode: '.trim($zugangscode).'
';
+ $msg.= 'Die Kriterien, die Ihr Foto erfüllen muss, finden Sie beim Upload oder unter https://cis.technikum-wien.at/cms/content.php?content_id=6174
';
+ $msg.= 'Technische Unterstützung erhalten Sie unter support@technikum-wien.at
';
+ $msg.= 'Wir wünschen Ihnen einen erfolgreichen Start ins Studium!
';
+ $msg.= 'Fachhochschule Technikum Wien
';
+
+ $msg.= '----------------
';
+ $msg.= 'Dear Mr/Ms '.$name.'
';
+ $msg.= 'Welcome to the University of Applied Sciences Technikum Wien.
';
+ $msg.= 'For your UAS identity card, which also serves as a key card, we need a photo of you.
';
+ $msg.= 'Please use the following link and the access code indicated in order to upload your photo.
';
+ $msg.= 'https://cis.technikum-wien.at/cis/public/prestudententool/index.php
';
+ $msg.= 'Access code: '.trim($zugangscode).'
';
+ $msg.= 'You can find the criteria that your photo has to fulfil either when uploading or under https://cis.technikum-wien.at/cms/content.php?content_id=6174
';
+ $msg.= 'Technical support is available under support@technikum-wien.at
';
+ $msg.= 'We wish you a successful start to your studies!
';
+ $msg.= 'University of Applied Sciences Technikum Wien';
$mail = new mail($email, 'no-reply', 'Fotoupload für Ihren FH-Ausweis', 'Bitte sehen Sie sich die Nachricht in HTML Sicht an, um den Link vollständig darzustellen.');
$mail->setHTMLContent($msg);
- if(!$mail->send())
+ if($mail->send())
return true;
else
return false;