Fix Haemo Master and cleanup files.
No files matched your search
@@ -2,8 +2,6 @@
|
|||||||
.gitignore
|
.gitignore
|
||||||
.dockerignore
|
.dockerignore
|
||||||
Dockerfile
|
Dockerfile
|
||||||
img/gallery/backup_orig/
|
|
||||||
img/logo_dialysezentrum_orig.png
|
|
||||||
files/flyer_template.html
|
files/flyer_template.html
|
||||||
files/flyer_map.png
|
files/flyer_map.png
|
||||||
|
|
||||||
@@ -2,22 +2,11 @@ Options +FollowSymLinks
|
|||||||
|
|
||||||
RewriteEngine on
|
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 %{REQUEST_FILENAME} !-f
|
||||||
RewriteCond %{QUERY_STRING} ([a-zA-Z0-9-_.=&+%]*)
|
RewriteCond %{QUERY_STRING} ([a-zA-Z0-9-_.=&+%]*)
|
||||||
RewriteRule ^([0-9a-zA-Z\-]+).html$ index.php?action=$1&%1 [L]
|
RewriteRule ^([0-9a-zA-Z\-]+).html$ index.php?action=$1&%1 [L]
|
||||||
RewriteRule ^captcha.png$ captcha.php [L]
|
|
||||||
|
|
||||||
<Files .htaccess>
|
<Files .htaccess>
|
||||||
order allow,deny
|
order allow,deny
|
||||||
deny from all
|
deny from all
|
||||||
</Files>
|
</Files>
|
||||||
|
|
||||||
|
|
||||||
# Allow Robots.txt to pass through muss noch eingebunden werden
|
|
||||||
@@ -1,24 +1,15 @@
|
|||||||
FROM php:8.5-apache-trixie
|
FROM php:8.5-apache-trixie
|
||||||
|
|
||||||
# Install system dependencies and PHP GD extension (with FreeType & JPEG/PNG support)
|
# Use official production php.ini and configure timezone & security settings
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \
|
||||||
libfreetype6-dev \
|
&& printf "date.timezone = Europe/Berlin\nexpose_php = Off\nsession.cookie_httponly = 1\nsession.use_strict_mode = 1\n" > "$PHP_INI_DIR/conf.d/99-custom.ini"
|
||||||
libjpeg62-turbo-dev \
|
|
||||||
libpng-dev \
|
# Enable Apache modules and harden server signature
|
||||||
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
RUN a2enmod rewrite headers expires deflate \
|
||||||
&& docker-php-ext-install -j"$(nproc)" gd \
|
&& printf "ServerTokens Prod\nServerSignature Off\n" > /etc/apache2/conf-available/security-hardening.conf \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& a2enconf security-hardening
|
||||||
|
|
||||||
# Use official production php.ini and configure timezone & security settings
|
# Copy application code
|
||||||
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \
|
COPY --chown=www-data:www-data . /var/www/html/
|
||||||
&& printf "date.timezone = Europe/Berlin\nexpose_php = Off\nsession.cookie_httponly = 1\nsession.use_strict_mode = 1\n" > "$PHP_INI_DIR/conf.d/99-custom.ini"
|
|
||||||
|
EXPOSE 80
|
||||||
# Enable Apache modules and harden server signature
|
|
||||||
RUN a2enmod rewrite headers expires deflate \
|
|
||||||
&& printf "ServerTokens Prod\nServerSignature Off\n" > /etc/apache2/conf-available/security-hardening.conf \
|
|
||||||
&& a2enconf security-hardening
|
|
||||||
|
|
||||||
# Copy application code
|
|
||||||
COPY --chown=www-data:www-data . /var/www/html/
|
|
||||||
|
|
||||||
EXPOSE 80␍
|
|
||||||
|
Before Width: | Height: | Size: 34 KiB |
@@ -1,33 +0,0 @@
|
|||||||
<?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);
|
|
||||||
@@ -777,7 +777,7 @@ li {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ==========================================================================
|
/* ==========================================================================
|
||||||
Specialised Medical Highlights (BCM & Hemo-Master)
|
Specialised Medical Highlights (BCM & Haemo-Master)
|
||||||
========================================================================== */
|
========================================================================== */
|
||||||
.highlight-panel {
|
.highlight-panel {
|
||||||
background: linear-gradient(to right, #f8fafc, #ffffff);
|
background: linear-gradient(to right, #f8fafc, #ffffff);
|
||||||
|
|||||||
@@ -493,8 +493,8 @@
|
|||||||
<li>Spezialisierte Betreuung <strong>niereninsuffizienter Diabetiker</strong></li>
|
<li>Spezialisierte Betreuung <strong>niereninsuffizienter Diabetiker</strong></li>
|
||||||
<li><strong>Sonographie</strong> (Ultraschall Nieren/Abdomen), EKG & 24-Std.-Blutdruckmessung</li>
|
<li><strong>Sonographie</strong> (Ultraschall Nieren/Abdomen), EKG & 24-Std.-Blutdruckmessung</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>Hämodialyse (HD) & Hämodiafiltration (HDF / online-HDF):</strong>
|
<strong>Hämodialyse (HD) & Hämodiafiltration (HDF / Online-HDF):</strong>
|
||||||
<span class="sub-note">Nikkiso DBB-07 & DBB-EXA mit <strong>Hemo-Master</strong> zur aktiven Blutvolumen- & Ultrafiltrationsregelung für eine kreislaufschonende Dialyse</span>
|
<span class="sub-note">Nikkiso DBB-07 & DBB-EXA mit <strong>Haemo-Master (BV-UFC/COC)</strong> zur aktiven Blutvolumen-, Ultrafiltrations- & Leitfähigkeitsregelung</span>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>Fresenius BCM (Body Composition Monitor):</strong>
|
<strong>Fresenius BCM (Body Composition Monitor):</strong>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 280 B |
|
Before Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 86 KiB |
|
Before Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 547 KiB |
|
Before Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 703 KiB |
|
Before Width: | Height: | Size: 134 KiB |
|
Before Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 738 B |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 368 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 282 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 269 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 329 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 259 KiB |
|
Before Width: | Height: | Size: 345 KiB |
|
Before Width: | Height: | Size: 138 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 436 KiB |
|
Before Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 145 KiB |
|
Before Width: | Height: | Size: 138 KiB |
|
Before Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 903 B |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 157 KiB |
|
Before Width: | Height: | Size: 255 B |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 248 B |
|
Before Width: | Height: | Size: 155 B |
|
Before Width: | Height: | Size: 211 B |
|
Before Width: | Height: | Size: 237 B |
@@ -1,139 +0,0 @@
|
|||||||
<?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 https://www.gnu.org/licenses/old-licenses/lgpl-2.1.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 https://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"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
<?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 https://www.gnu.org/licenses/old-licenses/lgpl-2.1.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();
|
|
||||||
}
|
|
||||||
@@ -1,469 +0,0 @@
|
|||||||
<?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 https://www.gnu.org/licenses/old-licenses/lgpl-2.1.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.12.0';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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(function () {
|
|
||||||
call_user_func_array([$this, 'catchWarning'], func_get_args());
|
|
||||||
});
|
|
||||||
|
|
||||||
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"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<?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());
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
RewriteEngine off
|
|
||||||
DirectoryIndex webalizer.html
|
|
||||||
AuthUserFile /www/htdocs/v098774/dialyse/usage/.htpasswd
|
|
||||||
AuthGroupFile /dev/null
|
|
||||||
AuthName 'ByPassword'
|
|
||||||
AuthType Basic
|
|
||||||
require valid-user
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
v098774:$1$YbJKN5qT$1ON8jBjlqky72n7P7ONlw1
|
|
||||||
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |