From 3e048b47d8730b1cfc0811bd20ea873347d1d1bf Mon Sep 17 00:00:00 2001 From: rylon Date: Wed, 28 May 2014 00:29:09 +0200 Subject: [PATCH] rhein: fixed anfrage --- rhein/api/api_rhein.php | 23 ++++++++++++----------- rhein/dbd/sql/api_rhein.sql.sql | 5 +++++ 2 files changed, 17 insertions(+), 11 deletions(-) create mode 100644 rhein/dbd/sql/api_rhein.sql.sql diff --git a/rhein/api/api_rhein.php b/rhein/api/api_rhein.php index c251942..9cd7a7d 100644 --- a/rhein/api/api_rhein.php +++ b/rhein/api/api_rhein.php @@ -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(); } } \ No newline at end of file diff --git a/rhein/dbd/sql/api_rhein.sql.sql b/rhein/dbd/sql/api_rhein.sql.sql new file mode 100644 index 0000000..37a2ec4 --- /dev/null +++ b/rhein/dbd/sql/api_rhein.sql.sql @@ -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'); \ No newline at end of file