217 lines
7.6 KiB
PHP
217 lines
7.6 KiB
PHP
<? \S::set_session( 'form-token', bin2hex( random_bytes( 32 ) ) );?>
|
|
|
|
<div class="contact-box">
|
|
<div class="contact-head">
|
|
<? if ( $alert = \S::get_session( 'alert' ) ):?>
|
|
<div class="alert alert-success">
|
|
<?= $alert;?>
|
|
<? unset( $_SESSION['alert'] );?>
|
|
</div>
|
|
<? endif;?>
|
|
<h2>Kontakt Formular</h2>
|
|
<ul class="contact-social">
|
|
<li>
|
|
<a href="https://www.linkedin.com/company/vidok-fenster-und-turen/?viewAsMember=true" target="_blank">
|
|
<img src="/upload/filemanager/Icons/facebook_black.svg" alt="linkedin">
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="https://www.facebook.com/vidok.fenster.turen/" target="_blank">
|
|
<img src="/upload/filemanager/Icons/linkedin_black.svg" alt="facebook">
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="https://www.youtube.com/@vidokfensterundturen4925" target="_blank">
|
|
<img src="/upload/filemanager/Icons/youtube_black.svg" alt="youtube">
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<form action="" id="contact_form" method="POST">
|
|
<input type="hidden" name="action" value="send_contact_form">
|
|
<input type="hidden" name="token" value="<?= \S::get_session( 'form-token' );?>">
|
|
|
|
<div class="_row-1">
|
|
<div class="_col-1">
|
|
<div class="form_group">
|
|
<!-- <label for="form_names">Art der Zusammenarbeit</label> -->
|
|
<input type="text" name="type_cooperation" id="type_cooperation" placeholder="Art der Zusammenarbeit" required>
|
|
</div>
|
|
<div class="form_group">
|
|
<!-- <label for="form_names">Firmennamen / Unternehmen</label> -->
|
|
<input type="text" name="company_name" id="company_name" placeholder="Geben Sie den Namen Ihres Unternehmens ein. /Geben Sie uns Details zu Ihrem Unternehmen mit" required>
|
|
</div>
|
|
</div>
|
|
<div class="_col-2">
|
|
<div class="form_group">
|
|
<!-- <label for="form_phone">Telefon</label> -->
|
|
<input type="text" name="phone" id="form_phone" placeholder="Geben Sie die Nummer im Format 000 000 000 ..." required>
|
|
</div>
|
|
|
|
<div class="form_group">
|
|
<!-- <label for="form_email">E-Mail</label> -->
|
|
<input type="email" name="email" id="form_email" placeholder="Ihre E-Mail-Adresse" required>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form_group" style="margin-top: 17px;">
|
|
<!-- <label for="form_names">Ihre Nachricht</label> -->
|
|
<textarea name="your_message" id="form_message" placeholder="Stellen Sie uns hier die Frage, die Sie beschäftigt ..." required></textarea>
|
|
</div>
|
|
<div class="_row-2 agreement">
|
|
<div class="agreement-container">
|
|
<div class="form_group_2">
|
|
<input type="checkbox" name="form_check" id="form_check" class="checkbox" required>
|
|
<label for="form_check">Ich stimme zu, dass Fa. Vidok, die von mir oben angegebenen personenbezogenen Daten verarbeitet, um mich über das entsprechende Angebot zu informieren.</label>
|
|
</div>
|
|
<!-- <div class="form_group_2">
|
|
<input type="checkbox" name="form_check2" id="form_check2" class="checkbox" required>
|
|
<label for="form_check">Ich stimme zu, dass Fa. Vidok, die von mir oben angegebenen personenbezogenen Daten verarbeitet, um mich über Werbung per E-Mail zu informieren.</label>
|
|
</div> -->
|
|
</div>
|
|
<button type="submit" class="btn1">Senden</button>
|
|
</div>
|
|
<div class="g-recaptcha" data-sitekey="6LfaovglAAAAAAieLVC7i4xGkQA5ufXUbWLipSbp"></div>
|
|
</form>
|
|
</div>
|
|
|
|
<script class="footer">
|
|
$(function() {
|
|
$('body').on(click_event, '#contact_form .btn-2', function() {
|
|
var form_names = $.trim($('#contact_form #form_names').val());
|
|
var form_email = $.trim($('#contact_form #form_email').val());
|
|
var form_phone = $.trim($('#contact_form #form_phone').val());
|
|
var form_service = $.trim($('#contact_form #form_service').val());
|
|
var form_budget = $.trim($('#contact_form #form_budget').val());
|
|
var form_topic = $.trim($('#contact_form #form_topic').val());
|
|
var form_message = $.trim($('#contact_form #form_message').val());
|
|
|
|
var form_messaform_checkge = $.trim($('#contact_form #form_check').val());
|
|
|
|
if (form_email === '' || form_phone === '' || form_message === '') {
|
|
$.alert({
|
|
title: '<?= ucfirst( $lang['blad'] );?>',
|
|
content: 'Proszę uzupełnić wymagane dane: email, numer telefonu i treść wiadomości.',
|
|
type: 'orange',
|
|
closeIcon: true,
|
|
closeIconClass: 'fa fa-close',
|
|
typeAnimated: true,
|
|
animation: 'opacity',
|
|
autoClose: 'confirm|10000',
|
|
boxWidth: '650px',
|
|
useBootstrap: false,
|
|
theme: 'modern',
|
|
buttons: {
|
|
confirm: {
|
|
text: '<?= $lang['zamknij'];?>',
|
|
btnClass: 'btn-blue',
|
|
keys: ['enter'],
|
|
action: function() {}
|
|
}
|
|
}
|
|
});
|
|
return false;
|
|
}
|
|
|
|
if (!$('.contact_box #form_check').is(':checked')) {
|
|
$.alert({
|
|
title: '<?= ucfirst( $lang['blad'] );?>',
|
|
content: '<?= $lang['prosze-zaznaczyc-zgode'];?>',
|
|
type: 'orange',
|
|
closeIcon: true,
|
|
closeIconClass: 'fa fa-close',
|
|
typeAnimated: true,
|
|
animation: 'opacity',
|
|
autoClose: 'confirm|10000',
|
|
boxWidth: '650px',
|
|
useBootstrap: false,
|
|
theme: 'modern',
|
|
buttons: {
|
|
confirm: {
|
|
text: '<?= $lang['zamknij'];?>',
|
|
btnClass: 'btn-blue',
|
|
keys: ['enter'],
|
|
action: function() {}
|
|
}
|
|
}
|
|
});
|
|
return false;
|
|
}
|
|
|
|
$.ajax({
|
|
type: 'POST',
|
|
cache: false,
|
|
url: '/',
|
|
data: {
|
|
a: 'send_contact_form',
|
|
form_names: form_names,
|
|
form_email: form_email,
|
|
form_phone: form_phone,
|
|
form_service: form_service,
|
|
form_budget: form_budget,
|
|
form_topic: form_topic,
|
|
form_message: form_message
|
|
},
|
|
beforeSend: function() {
|
|
alert1 = $.alert({
|
|
title: '<?= ucfirst( $lang['informacja'] );?>',
|
|
content: '<?= $lang['prosze-czekac'];?>',
|
|
type: 'blue',
|
|
closeIcon: true,
|
|
closeIconClass: 'fa fa-close',
|
|
typeAnimated: true,
|
|
animation: 'opacity',
|
|
autoClose: 'confirm|60000',
|
|
boxWidth: '650px',
|
|
useBootstrap: false,
|
|
theme: 'modern',
|
|
buttons: {
|
|
confirm: {
|
|
text: '<?= $lang['zamknij'];?>',
|
|
btnClass: 'btn-blue',
|
|
keys: ['enter'],
|
|
action: function() {}
|
|
}
|
|
}
|
|
});
|
|
},
|
|
success: function(data) {
|
|
response = jQuery.parseJSON(data);
|
|
|
|
if (response.status === 'ok')
|
|
var msg = '<?= $lang['wiadomosc-zostala-wyslana'];?>';
|
|
else
|
|
var msg = '<?= $lang['wiadomosc-niezostala-wyslana'];?>';
|
|
|
|
alert1.close();
|
|
|
|
$('.contact_box input[type="text"], .contact_box input[type="email"],.contact_box textarea')
|
|
.val('');
|
|
|
|
$.alert({
|
|
title: '<?= ucfirst( $lang['informacja'] );?>',
|
|
content: msg,
|
|
type: 'blue',
|
|
closeIcon: true,
|
|
closeIconClass: 'fa fa-close',
|
|
typeAnimated: true,
|
|
animation: 'opacity',
|
|
autoClose: 'confirm|10000',
|
|
boxWidth: '650px',
|
|
useBootstrap: false,
|
|
theme: 'modern',
|
|
buttons: {
|
|
confirm: {
|
|
text: '<?= $lang['zamknij'];?>',
|
|
btnClass: 'btn-blue',
|
|
keys: ['enter'],
|
|
action: function() {}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
});
|
|
});
|
|
});
|
|
</script>
|