From 9b0fc52b1c04bde1b147e89dc2b4a2c050f05635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Mon, 14 May 2012 07:46:35 +0000 Subject: [PATCH] =?UTF-8?q?Infomail=20f=C3=BCr=20Bildupload=20funktioniert?= =?UTF-8?q?=20nun=20auch=20bei=20Interessenten=20und=20Bewerbern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/student/studentoverlay.js.php | 30 ++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/content/student/studentoverlay.js.php b/content/student/studentoverlay.js.php index d2cc5fa02..5bf257b19 100644 --- a/content/student/studentoverlay.js.php +++ b/content/student/studentoverlay.js.php @@ -736,14 +736,34 @@ function StudentImageInfomail() sg = 'Sehr geehrte'; else sg = 'Sehr geehrter'; - if(uid!='') - { - body=sg+" "+anrede+" "+nachname+"!%0A%0AIhr Profilbild wurde entfernt, da es nicht den aktuellen Bildrichtlinen entspricht.%0ABitte laden Sie unter CIS->Profil ein neues Profilbild hoch."; - window.location.href="mailto:"+uid+"@?subject=Profilbild&body="+body; + + if(uid=='') + { + var url = 'content/student/studentDBDML.php'; + var req = new phpRequest(url,'',''); + + var person_id = document.getElementById('student-detail-textbox-person_id').value; + req.add('type', 'getprivatemailadress'); + req.add('person_ids', person_id); + + var response = req.executePOST(); + + var val = new ParseReturnValue(response) + email = val.dbdml_data; } else { - alert('Nur bei Studenten verfügbar'); + email = uid+"@"; + } + + if(email!='') + { + body=sg+" "+anrede+" "+nachname+"!%0A%0AIhr Profilbild wurde entfernt, da es nicht den aktuellen Bildrichtlinen entspricht.%0ABitte laden Sie unter CIS->Profil ein neues Profilbild hoch."; + window.location.href="mailto:"+email+"?subject=Profilbild&body="+body; + } + else + { + alert('E-Mail konnte nicht ermittelt werden'); } }