Initial Checkin.
@@ -0,0 +1,22 @@
|
|||||||
|
Options +FollowSymLinks
|
||||||
|
RewriteEngine on
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} !^www\.dialyse-berlin\.net [NC]
|
||||||
|
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
|
||||||
|
|
||||||
|
RewriteCond %{HTTP_HOST} ^www\.dialyse-berlin\.net [NC]
|
||||||
|
RewriteCond %{HTTPS} !=on
|
||||||
|
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
|
||||||
|
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{QUERY_STRING} ([a-zA-Z0-9-_.=&+%]*)
|
||||||
|
RewriteRule ^([0-9a-zA-Z\-]+).html$ index.php?action=$1&%1 [L]
|
||||||
|
RewriteRule ^captcha.png$ captcha.php [L]
|
||||||
|
|
||||||
|
<Files .htaccess>
|
||||||
|
order allow,deny
|
||||||
|
deny from all
|
||||||
|
</Files>
|
||||||
|
|
||||||
|
|
||||||
|
# Allow Robots.txt to pass through muss noch eingebunden werden
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require_once __DIR__ . '/lib/Helper.php';
|
||||||
|
require_once __DIR__ . '/lib/Session.php';
|
||||||
|
|
||||||
|
$session = new Session();
|
||||||
|
|
||||||
|
switch ($_GET['action']) {
|
||||||
|
case 'dialog':
|
||||||
|
$session->set('dialog', 'dismissed');
|
||||||
|
break;
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$captchaText = sha1(microtime());
|
||||||
|
$captchaText = base64_encode($captchaText);
|
||||||
|
$captchaText = substr($captchaText, 1, 5);
|
||||||
|
|
||||||
|
$_SESSION['key'] = strtolower($captchaText);
|
||||||
|
|
||||||
|
$fonts = ["cheapink.ttf"];
|
||||||
|
$fontsizes = array(25);
|
||||||
|
$yCorr = array(25);
|
||||||
|
|
||||||
|
$img = ImageCreateFromPNG('img/captcha.png');
|
||||||
|
$color = ImageColorAllocate($img, 40, 40, 40);
|
||||||
|
|
||||||
|
$index = rand(0, count($fonts)-1);
|
||||||
|
$ttf = 'fonts/' . $fonts[$index];
|
||||||
|
$ttfsize = $fontsizes[$index];
|
||||||
|
|
||||||
|
$angle = rand(2, 6);
|
||||||
|
$t_x = rand(10, 50);
|
||||||
|
$t_y = 24 + $yCorr[$index];
|
||||||
|
|
||||||
|
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
|
||||||
|
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||||
|
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||||
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
|
header("Accept-Ranges: bytes");
|
||||||
|
header("Content-type: image/png");
|
||||||
|
ImageTtfText($img, $ttfsize, $angle, $t_x, $t_y, $color, $ttf, $captchaText);
|
||||||
|
ImagePNG($img);
|
||||||
|
ImageDestroy($img);
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
deny from all
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'smtp' => [
|
||||||
|
'host' => 'smtp.dialyse-berlin.net',
|
||||||
|
'port' => '587',
|
||||||
|
'username' => 'kontakt@dialyse-berlin.net',
|
||||||
|
'password' => 'hgbwX4F7LBNvvzJ6'
|
||||||
|
],
|
||||||
|
'holidays' => [
|
||||||
|
'before' => '2W',
|
||||||
|
'from' => '2022-12-27',
|
||||||
|
'until' => '2025-05-02',
|
||||||
|
'text' => 'Wir suchen aktuell eine(n) Gesundheits- oder Krankenpfleger-(in)/MFA (m/w/d) für den Dialysebereich, sowie eine Küchenkraft/ Dialyseassistenz in Voll- oder Teilzeit. <br>
|
||||||
|
Gründliche Einarbeitung gewährleistet! Melden Sie sich gern unter <a href="mailto:kontakt@dialyse-berlin.de">kontakt@dialyse-berlin.de</a>. <br>
|
||||||
|
Wir freuen uns schon Sie kennen zu lernen!'
|
||||||
|
]
|
||||||
|
];
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require_once __DIR__ . '/lib/SendMail.php';
|
||||||
|
require_once __DIR__ . '/lib/Session.php';
|
||||||
|
|
||||||
|
$session = new Session();
|
||||||
|
|
||||||
|
function validate($data) {
|
||||||
|
return !empty($data['name']) && !empty($data['email']) && !empty($data['phone']) && !empty($data['message']);
|
||||||
|
}
|
||||||
|
|
||||||
|
function isBot($data) {
|
||||||
|
return !empty($data['company']) || ($data['check'] != 'send') && (time() - $data['timestamp']) <= 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($_POST && count($_POST) > 0) {
|
||||||
|
if(isBot($_POST)) {
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!validate($_POST)) {
|
||||||
|
$session->set('form', $_POST);
|
||||||
|
$session->set('alert-class', 'alert-danger');
|
||||||
|
$session->set('alert', 'Nicht alle Pflichtfelder ausgefüllt.');
|
||||||
|
} else {
|
||||||
|
$ip = $_SERVER['REMOTE_ADDR'];
|
||||||
|
|
||||||
|
$mail = new SendMail();
|
||||||
|
$mail->setReplyTo($_POST['email'], $_POST['name']);
|
||||||
|
$mail->setTo('kontakt@dialyse-berlin.net', 'Kontaktformular');
|
||||||
|
// $mail->setTo('dominic.zirpel@web.de', 'Kontaktformular');
|
||||||
|
$mail->setSubject('Kontaktformular - Dialyse Homepage');
|
||||||
|
$mail->setBody(sprintf("Name: %s %s\nTelefon: %s\nIP: %s\nE-Mail: %s\n-----------------------------\n%s", $_POST['surname'], $_POST['name'], $_POST['phone'], $ip, $_POST['email'], $_POST['message']));
|
||||||
|
if($mail->send()) {
|
||||||
|
$session->remove('form');
|
||||||
|
$session->set('alert-class', 'alert-success');
|
||||||
|
$session->set('alert', 'Ihre Anfrage wurde erfolgreich verschickt');
|
||||||
|
} else {
|
||||||
|
$session->set('form', $_POST);
|
||||||
|
$session->set('alert-class', 'alert-danger');
|
||||||
|
$session->set('alert', 'Beim Verschicken Ihrer Anfrage ist ein Fehler aufgetreten!');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
header('Location: kontakt-formular.html');
|
||||||
@@ -0,0 +1,318 @@
|
|||||||
|
@font-face {
|
||||||
|
font-family: 'Open Sans';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
src: url('/fonts/GoogleOpenSans.ttf') format('truetype')
|
||||||
|
}
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
font-family: 'Open Sans', sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #000;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #000;
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
color: #000;
|
||||||
|
text-decoration: underline;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clear {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stack {
|
||||||
|
display: inline-block;
|
||||||
|
width: 70px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.floatLeftImage {
|
||||||
|
float: left;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.floatRightImage {
|
||||||
|
float: right;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.errorMessage {
|
||||||
|
padding: 5px;
|
||||||
|
border: 1px solid #ff4a45;
|
||||||
|
border-radius: 4px;
|
||||||
|
background: #ffc3b6;
|
||||||
|
margin-bottom: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.successMessage {
|
||||||
|
padding: 5px;
|
||||||
|
border: 1px solid #4bff72;
|
||||||
|
border-radius: 4px;
|
||||||
|
background: #bcffc8;
|
||||||
|
margin-bottom: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* menu styles */
|
||||||
|
|
||||||
|
#menu ul {
|
||||||
|
list-style-type: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu ul li {
|
||||||
|
display: inline;
|
||||||
|
float: left;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu ul li a {
|
||||||
|
display: block;
|
||||||
|
color: #000;
|
||||||
|
padding: 6px 10px;
|
||||||
|
text-decoration: none;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu ul li a:hover {
|
||||||
|
color: #fff;
|
||||||
|
background-image: -moz-linear-gradient(top, #FF5961, #B2121B);
|
||||||
|
background-image: -o-linear-gradient(top, #FF5961, #B2121B);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#FF5961), to(#B2121B));
|
||||||
|
background-image: -webkit-linear-gradient(top, #FF5961, #B2121B);
|
||||||
|
background-image: linear-gradient(top, #FF5961, #B2121B);
|
||||||
|
background-image: -ms-linear-gradient(top, #FF5961 0%, #B2121B 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#FF5961', EndColorStr='#B2121B');
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu ul li .active {
|
||||||
|
color: #fff;
|
||||||
|
background-image: -moz-linear-gradient(top, #5EA9FF, #1155A0);
|
||||||
|
background-image: -o-linear-gradient(top, #5EA9FF, #1155A0);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#5EA9FF), to(#1155A0));
|
||||||
|
background-image: -webkit-linear-gradient(top, #5EA9FF, #1155A0);
|
||||||
|
background-image: linear-gradient(top, #5EA9FF, #1155A0);
|
||||||
|
background-image: -ms-linear-gradient(top, #5EA9FF 0%, #1155A0 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#5EA9FF', EndColorStr='#1155A0');
|
||||||
|
}
|
||||||
|
|
||||||
|
/* div styles */
|
||||||
|
|
||||||
|
#outer-container {
|
||||||
|
width: 980px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#headertop {
|
||||||
|
padding: 0;
|
||||||
|
height: 156px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#headerbottom {
|
||||||
|
padding: 0;
|
||||||
|
height: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#wisdom {
|
||||||
|
margin: 4px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bluebar {
|
||||||
|
background-image: -moz-linear-gradient(top, #5EA9FF, #1155A0);
|
||||||
|
background-image: -o-linear-gradient(top, #5EA9FF, #1155A0);
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#5EA9FF), to(#1155A0));
|
||||||
|
background-image: -webkit-linear-gradient(top, #5EA9FF, #1155A0);
|
||||||
|
background-image: linear-gradient(top, #5EA9FF, #1155A0);
|
||||||
|
background-image: -ms-linear-gradient(top, #5EA9FF 0%, #1155A0 100%);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#5EA9FF', EndColorStr='#1155A0');
|
||||||
|
color: #fff;
|
||||||
|
font-size: 30px;
|
||||||
|
font-weight: bold;
|
||||||
|
font-style: italic;
|
||||||
|
padding: 15px;
|
||||||
|
width: 815px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
#wisdom {
|
||||||
|
background-image: url('/img/bn_1.jpg');
|
||||||
|
background-position: right;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
#outer-content {
|
||||||
|
padding: 20px;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center center;
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
#inner-content {
|
||||||
|
background-image: url('/img/bg_alpha.png');
|
||||||
|
padding: 15px;
|
||||||
|
width: 910px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#footer {
|
||||||
|
color: #555;
|
||||||
|
background-color: #ddd;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 10px;
|
||||||
|
padding: 5px;
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#footer a {
|
||||||
|
font-weight: normal;
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
#footer a:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alignRight {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alignCenter {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kontakt td {
|
||||||
|
font-size: 10pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kontakt .tdHead {
|
||||||
|
background-color: #bbb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kontakt .tdHead td {
|
||||||
|
color: #fff;
|
||||||
|
font-size: 10pt;
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: bold;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kontakt td span {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ktColumn {
|
||||||
|
float: left;
|
||||||
|
width: 400px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#kontaktform label {
|
||||||
|
float: left;
|
||||||
|
display: block;
|
||||||
|
width: 85px;
|
||||||
|
padding: 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#kontaktform input[type=text],
|
||||||
|
#kontaktform input[type=email],
|
||||||
|
#kontaktform textarea {
|
||||||
|
border: 1px solid #1155A0;
|
||||||
|
color: #1155A0;
|
||||||
|
padding: 5px;
|
||||||
|
margin: 2px 0;
|
||||||
|
width: 250px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#kontaktform input[type=text]:focus,
|
||||||
|
#kontaktform input[type=email]:focus,
|
||||||
|
#kontaktform textarea:focus {
|
||||||
|
background-color: #D5E9FF;
|
||||||
|
}
|
||||||
|
|
||||||
|
#kontaktform textarea {
|
||||||
|
width: 650px !important;
|
||||||
|
height: 200px;
|
||||||
|
font-family: Verdana;
|
||||||
|
font-size: 10pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
#kontaktbuttons {
|
||||||
|
padding-left: 590px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#kontaktform input[type=button],
|
||||||
|
#kontaktform input[type=reset],
|
||||||
|
#kontaktform input[type=submit] {
|
||||||
|
background-color: #ffffff;
|
||||||
|
border: 1px solid #1155A0;
|
||||||
|
color: #1155A0;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#kontaktform input[type=button]:hover,
|
||||||
|
#kontaktform input[type=reset]:hover,
|
||||||
|
#kontaktform input[type=submit]:hover {
|
||||||
|
background-color: #D5E9FF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert {
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert-danger {
|
||||||
|
border: 1px solid #ebcccc;
|
||||||
|
background-color: #f2dede;
|
||||||
|
color: #a94442;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert-success {
|
||||||
|
border: 1px solid #d0e9c6;
|
||||||
|
background-color: #dff0d8;
|
||||||
|
color: #3c763d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-error input,
|
||||||
|
.form-error textarea {
|
||||||
|
border: 1px solid #ff5b56;
|
||||||
|
background: #ffc3c0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.holiday-bg {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-color: rgba(0, 0, 0, .4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.holiday-dialog {
|
||||||
|
position: absolute;
|
||||||
|
top: 20px;
|
||||||
|
left: 50%;
|
||||||
|
width: 400px;
|
||||||
|
margin-left: -200px;
|
||||||
|
padding: 15px;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 15px;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
.lb-loader,.lightbox{text-align:center;line-height:0;position:absolute;left:0}body.lb-disable-scrolling{overflow:hidden}.lightboxOverlay{position:absolute;top:0;left:0;z-index:9999;background-color:#000;filter:alpha(Opacity=80);opacity:.8;display:none}.lightbox{width:100%;z-index:10000;font-weight:400;outline:0}.lightbox .lb-image{display:block;height:auto;max-width:inherit;max-height:none;border-radius:3px;border:4px solid #fff}.lightbox a img{border:none}.lb-outerContainer{position:relative;width:250px;height:250px;margin:0 auto;border-radius:4px;background-color:#fff}.lb-outerContainer:after{content:"";display:table;clear:both}.lb-loader{top:43%;height:25%;width:100%}.lb-cancel{display:block;width:32px;height:32px;margin:0 auto;background:url(../img/lightbox/loading.gif) no-repeat}.lb-nav{position:absolute;top:0;left:0;height:100%;width:100%;z-index:10}.lb-container>.nav{left:0}.lb-nav a{outline:0;background-image:url(data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==)}.lb-next,.lb-prev{height:100%;cursor:pointer;display:block}.lb-nav a.lb-prev{width:34%;left:0;float:left;background:url(../img/lightbox/prev.png) left 48% no-repeat;filter:alpha(Opacity=0);opacity:0;-webkit-transition:opacity .6s;-moz-transition:opacity .6s;-o-transition:opacity .6s;transition:opacity .6s}.lb-nav a.lb-prev:hover{filter:alpha(Opacity=100);opacity:1}.lb-nav a.lb-next{width:64%;right:0;float:right;background:url(../img/lightbox/next.png) right 48% no-repeat;filter:alpha(Opacity=0);opacity:0;-webkit-transition:opacity .6s;-moz-transition:opacity .6s;-o-transition:opacity .6s;transition:opacity .6s}.lb-nav a.lb-next:hover{filter:alpha(Opacity=100);opacity:1}.lb-dataContainer{margin:0 auto;padding-top:5px;width:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.lb-dataContainer:after{content:"";display:table;clear:both}.lb-data{padding:0 4px;color:#ccc}.lb-data .lb-details{width:85%;float:left;text-align:left;line-height:1.1em}.lb-data .lb-caption{font-size:13px;font-weight:700;line-height:1em}.lb-data .lb-caption a{color:#4ae}.lb-data .lb-number{display:block;clear:left;padding-bottom:1em;font-size:12px;color:#999}.lb-data .lb-close{display:block;float:right;width:30px;height:30px;background:url(../img/lightbox/close.png) top right no-repeat;text-align:right;outline:0;filter:alpha(Opacity=70);opacity:.7;-webkit-transition:opacity .2s;-moz-transition:opacity .2s;-o-transition:opacity .2s;transition:opacity .2s}.lb-data .lb-close:hover{cursor:pointer;filter:alpha(Opacity=100);opacity:1}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
google-site-verification: googlede0df4dedadcafb9.html
|
||||||
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 546 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 703 KiB |
|
After Width: | Height: | Size: 134 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 9.3 KiB |
|
After Width: | Height: | Size: 894 B |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 368 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 282 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 269 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 329 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 363 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 148 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 684 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 500 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 213 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 259 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 195 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 104 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 903 B |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 280 B |
|
After Width: | Height: | Size: 8.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 255 B |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 248 B |
|
After Width: | Height: | Size: 155 B |
|
After Width: | Height: | Size: 211 B |
|
After Width: | Height: | Size: 237 B |
@@ -0,0 +1,56 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$config = include __DIR__ . '/config/config.php';
|
||||||
|
require_once __DIR__ . '/lib/Helper.php';
|
||||||
|
require_once __DIR__ . '/lib/Session.php';
|
||||||
|
|
||||||
|
$session = new Session();
|
||||||
|
|
||||||
|
$loadFile = function($filename) {
|
||||||
|
global $config, $session;
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
include $filename;
|
||||||
|
return ob_get_clean();
|
||||||
|
};
|
||||||
|
|
||||||
|
$action = isset($_GET['action']) ? $_GET['action'] : null;
|
||||||
|
if(!$action) {
|
||||||
|
$action = 'main';
|
||||||
|
}
|
||||||
|
|
||||||
|
$content = null;
|
||||||
|
|
||||||
|
switch ($action) {
|
||||||
|
case 'main':
|
||||||
|
$content = $loadFile('view/main.php');
|
||||||
|
break;
|
||||||
|
case 'leistungen':
|
||||||
|
$content = $loadFile('view/services.php');
|
||||||
|
break;
|
||||||
|
case 'praxis':
|
||||||
|
$content = $loadFile('view/practice.php');
|
||||||
|
break;
|
||||||
|
case 'team':
|
||||||
|
$content = $loadFile('view/team.php');
|
||||||
|
break;
|
||||||
|
case 'kontakt':
|
||||||
|
$content = $loadFile('view/contact.php');
|
||||||
|
break;
|
||||||
|
case 'kontakt-formular':
|
||||||
|
$content = $loadFile('view/contact-form.php');
|
||||||
|
break;
|
||||||
|
case 'impressum':
|
||||||
|
$content = $loadFile('view/imprint.php');
|
||||||
|
break;
|
||||||
|
case 'datenschutz':
|
||||||
|
$content = $loadFile('view/terms.php');
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
http_response_code(404);
|
||||||
|
$content = $loadFile('view/error.php');
|
||||||
|
}
|
||||||
|
|
||||||
|
if($content) {
|
||||||
|
include_once 'view/frontend.php';
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
function initialize() {
|
||||||
|
var geocoder = new google.maps.Geocoder();
|
||||||
|
|
||||||
|
geocoder.geocode( { 'address': 'Thorner Straße 1,12623 Berlin'}, function(results, status) {
|
||||||
|
if(status == google.maps.GeocoderStatus.OK) {
|
||||||
|
var myOptions = {
|
||||||
|
zoom: 15,
|
||||||
|
center: results[0].geometry.location,
|
||||||
|
mapTypeId: google.maps.MapTypeId.ROADMAP,
|
||||||
|
mapTypeControl: false,
|
||||||
|
navigationControl: true,
|
||||||
|
navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL}
|
||||||
|
};
|
||||||
|
|
||||||
|
var map = new google.maps.Map(document.getElementById("googlemap"), myOptions);
|
||||||
|
|
||||||
|
var marker = new google.maps.Marker({
|
||||||
|
position: results[0].geometry.location,
|
||||||
|
map: map
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
alert("Geocode was not successful for the following reason: " + status);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
initialize();
|
||||||
|
|
||||||
|
function sending() {
|
||||||
|
var text = "%6D%61%69%6C%74%6F:%6B%6F%6E%74%61%6B%74@%64%69%61%6C%79%73%65%2D%62%65%72%6C%69%6E%2E%6E%65%74";
|
||||||
|
|
||||||
|
location.href = decodeURI(text);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
deny from all
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class Helper {
|
||||||
|
public static function parseHolidays($config) {
|
||||||
|
$text = $config['holidays']['text'];
|
||||||
|
$from = DateTime::createFromFormat('Y-m-d', $config['holidays']['from']);
|
||||||
|
$until = DateTime::createFromFormat('Y-m-d', $config['holidays']['until']);
|
||||||
|
$text = preg_replace('/\{\{from\}\}/', $from->format('d.m.Y'), $text);
|
||||||
|
$text = preg_replace('/\{\{until\}\}/', $until->format('d.m.Y'), $text);
|
||||||
|
|
||||||
|
return $text;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function isHoliday($config) {
|
||||||
|
if(!array_key_exists('holidays', $config)) {
|
||||||
|
throw new Exception('holidays missing in config');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!array_key_exists('from', $config['holidays']) || !array_key_exists('until', $config['holidays'])) {
|
||||||
|
throw new Exception('from/until missing in holidays config');
|
||||||
|
}
|
||||||
|
|
||||||
|
$from = DateTime::createFromFormat('Y-m-d', $config['holidays']['from']);
|
||||||
|
$from->setTime(0, 0);
|
||||||
|
$until = DateTime::createFromFormat('Y-m-d', $config['holidays']['until']);
|
||||||
|
$until->setTime(23, 59, 59);
|
||||||
|
|
||||||
|
$today = new DateTime();
|
||||||
|
$today->setTime(0, 0);
|
||||||
|
|
||||||
|
$dialogShowFrom = clone $from;
|
||||||
|
|
||||||
|
if(array_key_exists('before', $config['holidays']) && !empty($config['holidays']['before'])) {
|
||||||
|
$dialogShowFrom->sub(new DateInterval('P' . $config['holidays']['before']));
|
||||||
|
}
|
||||||
|
|
||||||
|
return ($dialogShowFrom <= $today && $until > $today);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PHPMailer Exception class.
|
||||||
|
* PHP Version 5.5.
|
||||||
|
*
|
||||||
|
* @see https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project
|
||||||
|
*
|
||||||
|
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
|
||||||
|
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
|
||||||
|
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
|
||||||
|
* @author Brent R. Matzelle (original founder)
|
||||||
|
* @copyright 2012 - 2020 Marcus Bointon
|
||||||
|
* @copyright 2010 - 2012 Jim Jagielski
|
||||||
|
* @copyright 2004 - 2009 Andy Prevost
|
||||||
|
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
||||||
|
* @note This program is distributed in the hope that it will be useful - WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace PHPMailer\PHPMailer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PHPMailer exception handler.
|
||||||
|
*
|
||||||
|
* @author Marcus Bointon <phpmailer@synchromedia.co.uk>
|
||||||
|
*/
|
||||||
|
class Exception extends \Exception
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Prettify error message output.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function errorMessage()
|
||||||
|
{
|
||||||
|
return '<strong>' . htmlspecialchars($this->getMessage(), ENT_COMPAT | ENT_HTML401) . "</strong><br />\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,139 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PHPMailer - PHP email creation and transport class.
|
||||||
|
* PHP Version 5.5.
|
||||||
|
*
|
||||||
|
* @see https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project
|
||||||
|
*
|
||||||
|
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
|
||||||
|
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
|
||||||
|
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
|
||||||
|
* @author Brent R. Matzelle (original founder)
|
||||||
|
* @copyright 2012 - 2020 Marcus Bointon
|
||||||
|
* @copyright 2010 - 2012 Jim Jagielski
|
||||||
|
* @copyright 2004 - 2009 Andy Prevost
|
||||||
|
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
||||||
|
* @note This program is distributed in the hope that it will be useful - WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace PHPMailer\PHPMailer;
|
||||||
|
|
||||||
|
use League\OAuth2\Client\Grant\RefreshToken;
|
||||||
|
use League\OAuth2\Client\Provider\AbstractProvider;
|
||||||
|
use League\OAuth2\Client\Token\AccessToken;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OAuth - OAuth2 authentication wrapper class.
|
||||||
|
* Uses the oauth2-client package from the League of Extraordinary Packages.
|
||||||
|
*
|
||||||
|
* @see http://oauth2-client.thephpleague.com
|
||||||
|
*
|
||||||
|
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
|
||||||
|
*/
|
||||||
|
class OAuth implements OAuthTokenProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* An instance of the League OAuth Client Provider.
|
||||||
|
*
|
||||||
|
* @var AbstractProvider
|
||||||
|
*/
|
||||||
|
protected $provider;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The current OAuth access token.
|
||||||
|
*
|
||||||
|
* @var AccessToken
|
||||||
|
*/
|
||||||
|
protected $oauthToken;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The user's email address, usually used as the login ID
|
||||||
|
* and also the from address when sending email.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $oauthUserEmail = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The client secret, generated in the app definition of the service you're connecting to.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $oauthClientSecret = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The client ID, generated in the app definition of the service you're connecting to.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $oauthClientId = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The refresh token, used to obtain new AccessTokens.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $oauthRefreshToken = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OAuth constructor.
|
||||||
|
*
|
||||||
|
* @param array $options Associative array containing
|
||||||
|
* `provider`, `userName`, `clientSecret`, `clientId` and `refreshToken` elements
|
||||||
|
*/
|
||||||
|
public function __construct($options)
|
||||||
|
{
|
||||||
|
$this->provider = $options['provider'];
|
||||||
|
$this->oauthUserEmail = $options['userName'];
|
||||||
|
$this->oauthClientSecret = $options['clientSecret'];
|
||||||
|
$this->oauthClientId = $options['clientId'];
|
||||||
|
$this->oauthRefreshToken = $options['refreshToken'];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a new RefreshToken.
|
||||||
|
*
|
||||||
|
* @return RefreshToken
|
||||||
|
*/
|
||||||
|
protected function getGrant()
|
||||||
|
{
|
||||||
|
return new RefreshToken();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a new AccessToken.
|
||||||
|
*
|
||||||
|
* @return AccessToken
|
||||||
|
*/
|
||||||
|
protected function getToken()
|
||||||
|
{
|
||||||
|
return $this->provider->getAccessToken(
|
||||||
|
$this->getGrant(),
|
||||||
|
['refresh_token' => $this->oauthRefreshToken]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate a base64-encoded OAuth token.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getOauth64()
|
||||||
|
{
|
||||||
|
//Get a new token if it's not available or has expired
|
||||||
|
if (null === $this->oauthToken || $this->oauthToken->hasExpired()) {
|
||||||
|
$this->oauthToken = $this->getToken();
|
||||||
|
}
|
||||||
|
|
||||||
|
return base64_encode(
|
||||||
|
'user=' .
|
||||||
|
$this->oauthUserEmail .
|
||||||
|
"\001auth=Bearer " .
|
||||||
|
$this->oauthToken .
|
||||||
|
"\001\001"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PHPMailer - PHP email creation and transport class.
|
||||||
|
* PHP Version 5.5.
|
||||||
|
*
|
||||||
|
* @see https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project
|
||||||
|
*
|
||||||
|
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
|
||||||
|
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
|
||||||
|
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
|
||||||
|
* @author Brent R. Matzelle (original founder)
|
||||||
|
* @copyright 2012 - 2020 Marcus Bointon
|
||||||
|
* @copyright 2010 - 2012 Jim Jagielski
|
||||||
|
* @copyright 2004 - 2009 Andy Prevost
|
||||||
|
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
||||||
|
* @note This program is distributed in the hope that it will be useful - WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace PHPMailer\PHPMailer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OAuthTokenProvider - OAuth2 token provider interface.
|
||||||
|
* Provides base64 encoded OAuth2 auth strings for SMTP authentication.
|
||||||
|
*
|
||||||
|
* @see OAuth
|
||||||
|
* @see SMTP::authenticate()
|
||||||
|
*
|
||||||
|
* @author Peter Scopes (pdscopes)
|
||||||
|
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
|
||||||
|
*/
|
||||||
|
interface OAuthTokenProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Generate a base64-encoded OAuth token ensuring that the access token has not expired.
|
||||||
|
* The string to be base 64 encoded should be in the form:
|
||||||
|
* "user=<user_email_address>\001auth=Bearer <access_token>\001\001"
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getOauth64();
|
||||||
|
}
|
||||||
@@ -0,0 +1,467 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PHPMailer POP-Before-SMTP Authentication Class.
|
||||||
|
* PHP Version 5.5.
|
||||||
|
*
|
||||||
|
* @see https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project
|
||||||
|
*
|
||||||
|
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
|
||||||
|
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
|
||||||
|
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
|
||||||
|
* @author Brent R. Matzelle (original founder)
|
||||||
|
* @copyright 2012 - 2020 Marcus Bointon
|
||||||
|
* @copyright 2010 - 2012 Jim Jagielski
|
||||||
|
* @copyright 2004 - 2009 Andy Prevost
|
||||||
|
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
||||||
|
* @note This program is distributed in the hope that it will be useful - WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace PHPMailer\PHPMailer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PHPMailer POP-Before-SMTP Authentication Class.
|
||||||
|
* Specifically for PHPMailer to use for RFC1939 POP-before-SMTP authentication.
|
||||||
|
* 1) This class does not support APOP authentication.
|
||||||
|
* 2) Opening and closing lots of POP3 connections can be quite slow. If you need
|
||||||
|
* to send a batch of emails then just perform the authentication once at the start,
|
||||||
|
* and then loop through your mail sending script. Providing this process doesn't
|
||||||
|
* take longer than the verification period lasts on your POP3 server, you should be fine.
|
||||||
|
* 3) This is really ancient technology; you should only need to use it to talk to very old systems.
|
||||||
|
* 4) This POP3 class is deliberately lightweight and incomplete, implementing just
|
||||||
|
* enough to do authentication.
|
||||||
|
* If you want a more complete class there are other POP3 classes for PHP available.
|
||||||
|
*
|
||||||
|
* @author Richard Davey (original author) <rich@corephp.co.uk>
|
||||||
|
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
|
||||||
|
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
|
||||||
|
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
|
||||||
|
*/
|
||||||
|
class POP3
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The POP3 PHPMailer Version number.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
const VERSION = '6.7.1';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default POP3 port number.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
const DEFAULT_PORT = 110;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default timeout in seconds.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
const DEFAULT_TIMEOUT = 30;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* POP3 class debug output mode.
|
||||||
|
* Debug output level.
|
||||||
|
* Options:
|
||||||
|
* @see POP3::DEBUG_OFF: No output
|
||||||
|
* @see POP3::DEBUG_SERVER: Server messages, connection/server errors
|
||||||
|
* @see POP3::DEBUG_CLIENT: Client and Server messages, connection/server errors
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
public $do_debug = self::DEBUG_OFF;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* POP3 mail server hostname.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $host;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* POP3 port number.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
public $port;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* POP3 Timeout Value in seconds.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
public $tval;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* POP3 username.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $username;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* POP3 password.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $password;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resource handle for the POP3 connection socket.
|
||||||
|
*
|
||||||
|
* @var resource
|
||||||
|
*/
|
||||||
|
protected $pop_conn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Are we connected?
|
||||||
|
*
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
protected $connected = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Error container.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $errors = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Line break constant.
|
||||||
|
*/
|
||||||
|
const LE = "\r\n";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Debug level for no output.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
const DEBUG_OFF = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Debug level to show server -> client messages
|
||||||
|
* also shows clients connection errors or errors from server
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
const DEBUG_SERVER = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Debug level to show client -> server and server -> client messages.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
const DEBUG_CLIENT = 2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Simple static wrapper for all-in-one POP before SMTP.
|
||||||
|
*
|
||||||
|
* @param string $host The hostname to connect to
|
||||||
|
* @param int|bool $port The port number to connect to
|
||||||
|
* @param int|bool $timeout The timeout value
|
||||||
|
* @param string $username
|
||||||
|
* @param string $password
|
||||||
|
* @param int $debug_level
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public static function popBeforeSmtp(
|
||||||
|
$host,
|
||||||
|
$port = false,
|
||||||
|
$timeout = false,
|
||||||
|
$username = '',
|
||||||
|
$password = '',
|
||||||
|
$debug_level = 0
|
||||||
|
) {
|
||||||
|
$pop = new self();
|
||||||
|
|
||||||
|
return $pop->authorise($host, $port, $timeout, $username, $password, $debug_level);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Authenticate with a POP3 server.
|
||||||
|
* A connect, login, disconnect sequence
|
||||||
|
* appropriate for POP-before SMTP authorisation.
|
||||||
|
*
|
||||||
|
* @param string $host The hostname to connect to
|
||||||
|
* @param int|bool $port The port number to connect to
|
||||||
|
* @param int|bool $timeout The timeout value
|
||||||
|
* @param string $username
|
||||||
|
* @param string $password
|
||||||
|
* @param int $debug_level
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function authorise($host, $port = false, $timeout = false, $username = '', $password = '', $debug_level = 0)
|
||||||
|
{
|
||||||
|
$this->host = $host;
|
||||||
|
//If no port value provided, use default
|
||||||
|
if (false === $port) {
|
||||||
|
$this->port = static::DEFAULT_PORT;
|
||||||
|
} else {
|
||||||
|
$this->port = (int) $port;
|
||||||
|
}
|
||||||
|
//If no timeout value provided, use default
|
||||||
|
if (false === $timeout) {
|
||||||
|
$this->tval = static::DEFAULT_TIMEOUT;
|
||||||
|
} else {
|
||||||
|
$this->tval = (int) $timeout;
|
||||||
|
}
|
||||||
|
$this->do_debug = $debug_level;
|
||||||
|
$this->username = $username;
|
||||||
|
$this->password = $password;
|
||||||
|
//Reset the error log
|
||||||
|
$this->errors = [];
|
||||||
|
//Connect
|
||||||
|
$result = $this->connect($this->host, $this->port, $this->tval);
|
||||||
|
if ($result) {
|
||||||
|
$login_result = $this->login($this->username, $this->password);
|
||||||
|
if ($login_result) {
|
||||||
|
$this->disconnect();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//We need to disconnect regardless of whether the login succeeded
|
||||||
|
$this->disconnect();
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Connect to a POP3 server.
|
||||||
|
*
|
||||||
|
* @param string $host
|
||||||
|
* @param int|bool $port
|
||||||
|
* @param int $tval
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function connect($host, $port = false, $tval = 30)
|
||||||
|
{
|
||||||
|
//Are we already connected?
|
||||||
|
if ($this->connected) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//On Windows this will raise a PHP Warning error if the hostname doesn't exist.
|
||||||
|
//Rather than suppress it with @fsockopen, capture it cleanly instead
|
||||||
|
set_error_handler([$this, 'catchWarning']);
|
||||||
|
|
||||||
|
if (false === $port) {
|
||||||
|
$port = static::DEFAULT_PORT;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Connect to the POP3 server
|
||||||
|
$errno = 0;
|
||||||
|
$errstr = '';
|
||||||
|
$this->pop_conn = fsockopen(
|
||||||
|
$host, //POP3 Host
|
||||||
|
$port, //Port #
|
||||||
|
$errno, //Error Number
|
||||||
|
$errstr, //Error Message
|
||||||
|
$tval
|
||||||
|
); //Timeout (seconds)
|
||||||
|
//Restore the error handler
|
||||||
|
restore_error_handler();
|
||||||
|
|
||||||
|
//Did we connect?
|
||||||
|
if (false === $this->pop_conn) {
|
||||||
|
//It would appear not...
|
||||||
|
$this->setError(
|
||||||
|
"Failed to connect to server $host on port $port. errno: $errno; errstr: $errstr"
|
||||||
|
);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Increase the stream time-out
|
||||||
|
stream_set_timeout($this->pop_conn, $tval, 0);
|
||||||
|
|
||||||
|
//Get the POP3 server response
|
||||||
|
$pop3_response = $this->getResponse();
|
||||||
|
//Check for the +OK
|
||||||
|
if ($this->checkResponse($pop3_response)) {
|
||||||
|
//The connection is established and the POP3 server is talking
|
||||||
|
$this->connected = true;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Log in to the POP3 server.
|
||||||
|
* Does not support APOP (RFC 2828, 4949).
|
||||||
|
*
|
||||||
|
* @param string $username
|
||||||
|
* @param string $password
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function login($username = '', $password = '')
|
||||||
|
{
|
||||||
|
if (!$this->connected) {
|
||||||
|
$this->setError('Not connected to POP3 server');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (empty($username)) {
|
||||||
|
$username = $this->username;
|
||||||
|
}
|
||||||
|
if (empty($password)) {
|
||||||
|
$password = $this->password;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Send the Username
|
||||||
|
$this->sendString("USER $username" . static::LE);
|
||||||
|
$pop3_response = $this->getResponse();
|
||||||
|
if ($this->checkResponse($pop3_response)) {
|
||||||
|
//Send the Password
|
||||||
|
$this->sendString("PASS $password" . static::LE);
|
||||||
|
$pop3_response = $this->getResponse();
|
||||||
|
if ($this->checkResponse($pop3_response)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disconnect from the POP3 server.
|
||||||
|
*/
|
||||||
|
public function disconnect()
|
||||||
|
{
|
||||||
|
// If could not connect at all, no need to disconnect
|
||||||
|
if ($this->pop_conn === false) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->sendString('QUIT' . static::LE);
|
||||||
|
|
||||||
|
// RFC 1939 shows POP3 server sending a +OK response to the QUIT command.
|
||||||
|
// Try to get it. Ignore any failures here.
|
||||||
|
try {
|
||||||
|
$this->getResponse();
|
||||||
|
} catch (Exception $e) {
|
||||||
|
//Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
//The QUIT command may cause the daemon to exit, which will kill our connection
|
||||||
|
//So ignore errors here
|
||||||
|
try {
|
||||||
|
@fclose($this->pop_conn);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
//Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean up attributes.
|
||||||
|
$this->connected = false;
|
||||||
|
$this->pop_conn = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a response from the POP3 server.
|
||||||
|
*
|
||||||
|
* @param int $size The maximum number of bytes to retrieve
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
protected function getResponse($size = 128)
|
||||||
|
{
|
||||||
|
$response = fgets($this->pop_conn, $size);
|
||||||
|
if ($this->do_debug >= self::DEBUG_SERVER) {
|
||||||
|
echo 'Server -> Client: ', $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send raw data to the POP3 server.
|
||||||
|
*
|
||||||
|
* @param string $string
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
protected function sendString($string)
|
||||||
|
{
|
||||||
|
if ($this->pop_conn) {
|
||||||
|
if ($this->do_debug >= self::DEBUG_CLIENT) { //Show client messages when debug >= 2
|
||||||
|
echo 'Client -> Server: ', $string;
|
||||||
|
}
|
||||||
|
|
||||||
|
return fwrite($this->pop_conn, $string, strlen($string));
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks the POP3 server response.
|
||||||
|
* Looks for for +OK or -ERR.
|
||||||
|
*
|
||||||
|
* @param string $string
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
protected function checkResponse($string)
|
||||||
|
{
|
||||||
|
if (strpos($string, '+OK') !== 0) {
|
||||||
|
$this->setError("Server reported an error: $string");
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add an error to the internal error store.
|
||||||
|
* Also display debug output if it's enabled.
|
||||||
|
*
|
||||||
|
* @param string $error
|
||||||
|
*/
|
||||||
|
protected function setError($error)
|
||||||
|
{
|
||||||
|
$this->errors[] = $error;
|
||||||
|
if ($this->do_debug >= self::DEBUG_SERVER) {
|
||||||
|
echo '<pre>';
|
||||||
|
foreach ($this->errors as $e) {
|
||||||
|
print_r($e);
|
||||||
|
}
|
||||||
|
echo '</pre>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get an array of error messages, if any.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getErrors()
|
||||||
|
{
|
||||||
|
return $this->errors;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* POP3 connection error handler.
|
||||||
|
*
|
||||||
|
* @param int $errno
|
||||||
|
* @param string $errstr
|
||||||
|
* @param string $errfile
|
||||||
|
* @param int $errline
|
||||||
|
*/
|
||||||
|
protected function catchWarning($errno, $errstr, $errfile, $errline)
|
||||||
|
{
|
||||||
|
$this->setError(
|
||||||
|
'Connecting to the POP3 server raised a PHP warning:' .
|
||||||
|
"errno: $errno errstr: $errstr; errfile: $errfile; errline: $errline"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use PHPMailer\PHPMailer\PHPMailer;
|
||||||
|
use PHPMailer\PHPMailer\SMTP;
|
||||||
|
use PHPMailer\PHPMailer\Exception;
|
||||||
|
|
||||||
|
require_once __DIR__ . '/PHPMailer/Exception.php';
|
||||||
|
require_once __DIR__ . '/PHPMailer/PHPMailer.php';
|
||||||
|
require_once __DIR__ . '/PHPMailer/SMTP.php';
|
||||||
|
|
||||||
|
class SendMail {
|
||||||
|
private $to;
|
||||||
|
private $toName;
|
||||||
|
private $subject;
|
||||||
|
private $body;
|
||||||
|
private $reply;
|
||||||
|
private $replyName;
|
||||||
|
|
||||||
|
private $config;
|
||||||
|
|
||||||
|
public function __construct() {
|
||||||
|
$this->config = include __DIR__ . '/../config/config.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $email
|
||||||
|
* @param string|null $name
|
||||||
|
*/
|
||||||
|
public function setTo($email, $name = null) {
|
||||||
|
$this->to = $email;
|
||||||
|
$this->toName = $name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $email
|
||||||
|
* @param string|null $name
|
||||||
|
*/
|
||||||
|
public function setReplyTo($email, $name = null) {
|
||||||
|
$this->reply = $email;
|
||||||
|
$this->replyName = $name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $subject
|
||||||
|
*/
|
||||||
|
public function setSubject($subject) {
|
||||||
|
$this->subject = $subject;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $body
|
||||||
|
*/
|
||||||
|
public function setBody($body) {
|
||||||
|
$this->body = $body;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function send() {
|
||||||
|
/* @var PHPMailer $mail */
|
||||||
|
$mail = new PHPMailer(true);
|
||||||
|
|
||||||
|
$mail->isSMTP();
|
||||||
|
$mail->isHTML();
|
||||||
|
//$mail->SMTPDebug = SMTP::DEBUG_LOWLEVEL;
|
||||||
|
$mail->SMTPDebug = SMTP::DEBUG_OFF;
|
||||||
|
$mail->SMTPAuth = true;
|
||||||
|
$mail->SMTPOptions = [
|
||||||
|
'ssl' => [
|
||||||
|
'verify_peer' => false,
|
||||||
|
'verify_peer_name' => false,
|
||||||
|
'allow_self_signed' => true
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$mail->Host = $this->config['smtp']['host'];
|
||||||
|
$mail->Port = $this->config['smtp']['port'];
|
||||||
|
$mail->Username = $this->config['smtp']['username'];
|
||||||
|
$mail->Password = $this->config['smtp']['password'];
|
||||||
|
//$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
|
||||||
|
$mail->addAddress($this->to, $this->toName);
|
||||||
|
if($this->reply) {
|
||||||
|
$mail->addReplyTo($this->reply, $this->replyName);
|
||||||
|
}
|
||||||
|
$mail->setFrom($this->config['smtp']['username']);
|
||||||
|
$mail->Subject = $this->subject;
|
||||||
|
$mail->Body = htmlentities($this->body, ENT_QUOTES);
|
||||||
|
|
||||||
|
try {
|
||||||
|
return $mail->send();
|
||||||
|
} catch(\Exception $ex) {
|
||||||
|
var_dump($ex);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class Session {
|
||||||
|
|
||||||
|
public function __construct() {
|
||||||
|
if(array_key_exists('PHPSESSID', $_COOKIE)) {
|
||||||
|
session_id($_COOKIE['PHPSESSID']);
|
||||||
|
}
|
||||||
|
session_start();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get($name) {
|
||||||
|
if($this->has($name)) {
|
||||||
|
return $_SESSION[$name];
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function has($name) {
|
||||||
|
return array_key_exists($name, $_SESSION);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function set($name, $value) {
|
||||||
|
$_SESSION[$name] = $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function remove($name) {
|
||||||
|
unset($_SESSION[$name]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
require_once __DIR__ . '/lib/SendMail.php';
|
||||||
|
ini_set('display_errors', 1);
|
||||||
|
ini_set('display_startup_errors', 1);
|
||||||
|
error_reporting(E_ALL);
|
||||||
|
|
||||||
|
$mail = new SendMail();
|
||||||
|
|
||||||
|
$mail->setTo('itchy4@web.de', 'Kontaktformular');
|
||||||
|
$mail->setSubject('Kontaktformular - Dialyse Homepage');
|
||||||
|
$mail->setBody("Test");
|
||||||
|
|
||||||
|
var_dump($mail->send());
|
||||||