initial commit
This commit is contained in:
parent
f0d0b650f0
commit
5246e97e93
@ -1,4 +1,4 @@
|
||||
<?php
|
||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'');
|
||||
require_once dirname(__FILE__).'/sql/autoload.inc';
|
||||
\SYSTEM\SAI\sai::register('saimod_webcraft_gallery');
|
||||
\SYSTEM\SAI\sai::register('saimod_webcraft_contact');
|
||||
22
js/saimod_webcraft_contact.js
Normal file
22
js/saimod_webcraft_contact.js
Normal file
@ -0,0 +1,22 @@
|
||||
function init_saimod_webcraft_contact() {
|
||||
$("#contact_form input, select, textarea").not("[type=submit]").jqBootstrapValidation({
|
||||
preventSubmit: true,
|
||||
submitError: function($form, event, errors) {},
|
||||
submitSuccess: function($form, event){
|
||||
$.ajax({type :'POST',
|
||||
url : 'https://wat.webcraft-media.de/api.php?',
|
||||
data : { call: 'bug',
|
||||
message: '!!!KUNDENKONTAKT: '+$('#input_contact_message').val(),
|
||||
data: { email: $('#input_contact_email').val(), name: $('#btn_send').attr('project')}},
|
||||
success : function(data) {
|
||||
if(data.status){
|
||||
$('.help-block').html("EMail erfolgreich abgeschickt.");
|
||||
$('#input_contact_message').val('');
|
||||
}else{
|
||||
$('.help-block').html("EMail nicht erfolgreich abgeschickt - wir kümmern uns umgehend darum!");}
|
||||
}
|
||||
});
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
}
|
||||
15
saimod_webcraft_contact.php
Normal file
15
saimod_webcraft_contact.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
class saimod_webcraft_contact extends \SYSTEM\SAI\SaiModule {
|
||||
public static function sai_mod_saimod_webcraft_contact(){
|
||||
$vars = array('project' => \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);
|
||||
}
|
||||
|
||||
public static function html_li_menu(){return '<li><a href="#!contact"><span class="glyphicon glyphicon-envelope"></span> Contact</a></li>';}
|
||||
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'));}
|
||||
public static function css(){return array();}
|
||||
}
|
||||
8
sql/DATA_SAIMOD_WEBCRAFT_CONTACT.php
Normal file
8
sql/DATA_SAIMOD_WEBCRAFT_CONTACT.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
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());
|
||||
}
|
||||
}
|
||||
3
sql/autoload.inc
Normal file
3
sql/autoload.inc
Normal file
@ -0,0 +1,3 @@
|
||||
<?php
|
||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'SQL');
|
||||
\SYSTEM\SQL\setup::register('SQL\\DATA_SAIMOD_WEBCRAFT_CONTACT');
|
||||
1
sql/mysql/system_page.sql
Normal file
1
sql/mysql/system_page.sql
Normal file
@ -0,0 +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');
|
||||
37
tpl/saimod_webcraft_contact.tpl
Normal file
37
tpl/saimod_webcraft_contact.tpl
Normal file
@ -0,0 +1,37 @@
|
||||
<h4>Kontakt</h4>
|
||||
<hr>
|
||||
Nehmen Sie mit <b><a href="https://www.webcraft-media.de" target="blank">Webcraft Media</a></b> Kontakt auf.
|
||||
<br>
|
||||
<br>
|
||||
<div class="row" id="contact_address">
|
||||
<form class="textbox trojan" id="contact_form">
|
||||
<div class="control-group">
|
||||
<div class="controls col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||
<label>Antwort an:</label>
|
||||
<input class="form-control text_width"
|
||||
type="email"
|
||||
id="input_contact_email"
|
||||
placeholder="Email Adresse"
|
||||
data-validation-email-message="Bitte gebe doch eine gültige EMail-Adresse an!"
|
||||
required data-validation-required-message="Bitte gebe doch eine EMail-Adresse an!">
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<div class="controls col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||
<label>Ihre Nachricht:</label>
|
||||
<textarea class="form-control text_width"
|
||||
id="input_contact_message"
|
||||
rows="7"
|
||||
required data-validation-required-message="Bitte beschreibe kurz dein Anliegen ;-)."></textarea>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="help-block"></div>
|
||||
<button type="submit" class="btn-sm btn btn-success" project="${project}" id="btn_send"><span class="glyphicon glyphicon-envelope" aria-hidden="true"></span> Email senden!</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<br>
|
||||
(Sie können uns auch eine EMail schreiben - an <a href="mailto:service@webcraft-media.de">service@webcraft-media.de</a> - oder anrufen unter <b>0157/84841600</b>)
|
||||
Loading…
x
Reference in New Issue
Block a user