rhein: fixed anfrage

This commit is contained in:
Ulf Gebhardt 2014-05-28 00:29:09 +02:00
parent 649c2b02cf
commit 3e048b47d8
2 changed files with 17 additions and 11 deletions

View File

@ -2,19 +2,20 @@
class api_rhein extends \SYSTEM\API\api_system{
public static function call_anfrage($name, $telefon, $email, $anfrage, $handy = ''){
// Die Nachricht
$nachricht = 'Name: '.$name.
'\Telefon: '.$telefon.
'\Handy: '.$handy.
'\EMail: '.$email.
'\Anfrage: '.$anfrage;
$betreff = 'FeWo-Anfrage: '.$name.' '.$email;
$atmail = 'admin@webcraft-media.de';
$nachricht = 'Name: '.$name.
"\r\nTelefon: ".$telefon.
"\r\nHandy: ".$handy.
"\r\nEMail: ".$email.
"\r\nAnfrage: ".$anfrage;
$betreff = 'FeWo-Anfrage: '.$name.' '.$email;
$atmail = 'info@fewo-rhein-zwbg.de';
// Falls eine Zeile der Nachricht mehr als 70 Zeichen enthälten könnte,
// sollte wordwrap() benutzt werden
$nachricht = wordwrap($nachricht, 70);
// Falls eine Zeile der Nachricht mehr als 70 Zeichen enthälten könnte,
// sollte wordwrap() benutzt werden
$nachricht = wordwrap($nachricht, 70);
// Send
// Send
mail($atmail, $betreff , $nachricht);
return JsonResult::ok();
}
}

View File

@ -0,0 +1,5 @@
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (130, 0, 2, 0, 'anfrage', 'name', 'STRING');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (131, 0, 2, 0, 'anfrage', 'telefon', 'STRING');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (132, 0, 2, 0, 'anfrage', 'email', 'STRING');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (133, 0, 2, 0, 'anfrage', 'anfrage', 'STRING');
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (134, 0, 3, 0, 'anfrage', 'handy', 'STRING');