Hanno Böck
Spaces between string concat (.) operator, new PER codingstyle
Hanno Böck commited 354c05a at 2023-10-31 17:49:30
<?php
/*
This file belongs to the Webinterface of schokokeks.org Hosting
Written by schokokeks.org Hosting, namely
Bernd Wurst <bernd@schokokeks.org>
Hanno Böck <hanno@schokokeks.org>
This code is published under a 0BSD license.
Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code.
*/
require_once('inc/security.php');
require_once('inc/icons.php');
require_once('class/domain.php');
require_once('domains.php');
require_once('domainapi.php');
require_role(ROLE_CUSTOMER);
use_module('contacts');
require_once('contacts.php');
if (!config('http.net-apikey')) {
system_failure("Dieses System ist nicht eingerichtet zum Hinzufügen von Domains");
}
$dom = null;
if (isset($_REQUEST['domain'])) {
$request = idn_to_utf8($_REQUEST['domain'], 0, INTL_IDNA_VARIANT_UTS46);
if (substr($request, 0, 4) == 'www.') {
$request = str_replace('www.', '', $request);
}
verify_input_hostname_utf8($request);
$punycode = idn_to_ascii($request, 0, INTL_IDNA_VARIANT_UTS46);
if (!check_domain($punycode)) {
warning("Ungültiger Domainname: " . filter_output_html($request));
redirect('adddomain');
}
$dom = new Domain();
if ($dom->loadByName($request) !== false && !$dom->is_customerdomain()) {
warning('Diese Domain ist bei einem anderen Kunden von uns in Nutzung. Kontaktieren Sie den Support, wenn Sie eine Domain in ein anderes Kundenkonto übertragen möchten.');
redirect('adddomain');
}
$dom = new Domain();
if ($dom->loadByName($request) === false) {
// Eintragen mit DNS und Mail
$id = insert_domain_external($request, true, true);
$dom->loadByName($request);
}
$dom->ensure_customerdomain();
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX