From 61e92376413adccdd924b43fb1bd19b5f56e20ef Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Fri, 29 Mar 2019 17:07:58 +0100 Subject: [PATCH] updated saimod_webcraf_contact - send email, new design --- autoload.inc | 4 +- js/saimod_webcraft_contact.js | 31 +++++++---- saimod_webcraft_contact.php | 16 ++++-- sql/DATA_SAIMOD_WEBCRAFT_CONTACT.php | 3 +- sql/mysql/system_api.sql | 2 + sql/mysql/system_page.sql | 2 +- tpl/saimod_webcraft_contact.tpl | 78 ++++++++++++++++------------ 7 files changed, 83 insertions(+), 53 deletions(-) create mode 100644 sql/mysql/system_api.sql diff --git a/autoload.inc b/autoload.inc index 6ed40d9..61b02ad 100644 --- a/autoload.inc +++ b/autoload.inc @@ -1,4 +1,4 @@ \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_PROJECT)); - return \SYSTEM\PAGE\replace::replaceFile((new PSAI('saimod_webcraft_contact/tpl/saimod_webcraft_contact.tpl'))->SERVERPATH(),$vars); + return \SYSTEM\PAGE\replace::replaceFile((new \PSAI('saimod_webcraft_contact/tpl/saimod_webcraft_contact.tpl'))->SERVERPATH(),$vars); + } + + public static function sai_mod__SAI_saimod_webcraft_contact_action_mail($data){ + return \SYSTEM\LOG\JsonResult::status( + \mail( 'service@webcraft-media.de', + 'SAI: '.$data['project'].' - '.$data['email'], + 'EMail: '.$data['email']."\n\nProject: ".$data['project']."\n\nMessage:\n".$data['message'])); } public static function menu(){ return new \SYSTEM\SAI\sai_module_menu( 10, \SYSTEM\SAI\sai_module_menu::POISITION_RIGHT, \SYSTEM\SAI\sai_module_menu::DIVIDER_RIGHT, - \SYSTEM\PAGE\replace::replaceFile((new PSAI('saimod_webcraft_contact/tpl/menu.tpl'))->SERVERPATH()));} + \SYSTEM\PAGE\replace::replaceFile((new \PSAI('saimod_webcraft_contact/tpl/menu.tpl'))->SERVERPATH()));} public static function right_public(){return false;} public static function right_right(){return true;} public static function js(){ return array( \LIB\lib_jqbootstrapvalidation::js(), - new PSAI('saimod_webcraft_contact/js/saimod_webcraft_contact.js'));} + new \PSAI('saimod_webcraft_contact/js/saimod_webcraft_contact.js'));} public static function css(){return array();} } \ No newline at end of file diff --git a/sql/DATA_SAIMOD_WEBCRAFT_CONTACT.php b/sql/DATA_SAIMOD_WEBCRAFT_CONTACT.php index d2e8eae..95e61f9 100644 --- a/sql/DATA_SAIMOD_WEBCRAFT_CONTACT.php +++ b/sql/DATA_SAIMOD_WEBCRAFT_CONTACT.php @@ -3,6 +3,7 @@ namespace SQL; class DATA_SAIMOD_WEBCRAFT_CONTACT extends \SYSTEM\DB\QI { public static function get_class(){return \get_class();} public static function files_mysql(){ - return array( (new \PSAI('/saimod_webcraft_contact/sql/mysql/system_page.sql'))->SERVERPATH()); + return array( (new \PSAI('/saimod_webcraft_contact/sql/mysql/system_api.sql'))->SERVERPATH(), + (new \PSAI('/saimod_webcraft_contact/sql/mysql/system_page.sql'))->SERVERPATH()); } } \ No newline at end of file diff --git a/sql/mysql/system_api.sql b/sql/mysql/system_api.sql new file mode 100644 index 0000000..9830436 --- /dev/null +++ b/sql/mysql/system_api.sql @@ -0,0 +1,2 @@ +REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5400, 42, 0, 0, '_SAI_saimod_webcraft_contact', 'action', NULL); +REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5410, 42, 2, 5400, 'mail', 'data', 'JSON'); \ No newline at end of file diff --git a/sql/mysql/system_page.sql b/sql/mysql/system_page.sql index d3a7536..a395603 100644 --- a/sql/mysql/system_page.sql +++ b/sql/mysql/system_page.sql @@ -1 +1 @@ -REPLACE INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (5400, 42, 'contact', 'contact', -1, 0, 0, '#content', './sai.php?sai_mod=saimod_webcraft_contact', 'init_saimod_webcraft_contact', 'saimod_webcraft_contact'); \ No newline at end of file +REPLACE INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (5400, 42, 'contact', 'contact', -1, 0, 0, '#content', './sai.php?sai_mod=.SAI.saimod_webcraft_contact', 'init_saimod_webcraft_contact', '\\SAI\\saimod_webcraft_contact'); \ No newline at end of file diff --git a/tpl/saimod_webcraft_contact.tpl b/tpl/saimod_webcraft_contact.tpl index 20843bf..01a95f0 100644 --- a/tpl/saimod_webcraft_contact.tpl +++ b/tpl/saimod_webcraft_contact.tpl @@ -1,37 +1,47 @@ -

Kontakt

-
-Nehmen Sie mit Webcraft Media Kontakt auf. -
-
-
-
-
-
- - +
+
+

   Kontakt

+
+
+
+
+
+ Nehmen Sie mit Webcraft Media Kontakt auf. +
-
-
-
-
-
- - -
-
-
- + +
+
+ + +
+
+
+ + +
+
+
+
+
+ +
+
+ +
+
+ (Sie können uns auch eine EMail schreiben - an service@webcraft-media.de - oder anrufen unter 0157/84841600) +
+
- -
-
-(Sie können uns auch eine EMail schreiben - an service@webcraft-media.de - oder anrufen unter 0157/84841600) \ No newline at end of file +
+
\ No newline at end of file