... | ... |
@@ -45,14 +45,14 @@ function config($key, $localonly = false) |
45 | 45 |
if (array_key_exists($key, $config)) { |
46 | 46 |
return $config[$key]; |
47 | 47 |
} |
48 |
- |
|
48 |
+ |
|
49 | 49 |
if ($localonly) { |
50 | 50 |
return null; |
51 | 51 |
} |
52 | 52 |
|
53 | 53 |
/* read configuration from database */ |
54 | 54 |
$result = db_query("SELECT `key`, value FROM misc.config"); |
55 |
- |
|
55 |
+ |
|
56 | 56 |
while ($object = $result->fetch()) { |
57 | 57 |
if (!array_key_exists($object['key'], $config)) { |
58 | 58 |
$config[$object['key']]=$object['value']; |
... | ... |
@@ -433,7 +433,7 @@ function html_datepicker($nameprefix, $timestamp) |
433 | 433 |
$current_year+2 => $current_year+2, |
434 | 434 |
$current_year+3 => $current_year+3, |
435 | 435 |
$current_year+4 => $current_year+4); |
436 |
- |
|
436 |
+ |
|
437 | 437 |
$selected_day = date('d', $timestamp); |
438 | 438 |
$selected_month = date('m', $timestamp); |
439 | 439 |
$selected_year = date('Y', $timestamp); |
... | ... |
@@ -73,7 +73,7 @@ function verify_input_username($input) |
73 | 73 |
function filter_input_hostname($input, $wildcard=false) |
74 | 74 |
{ |
75 | 75 |
// FIXME: Eine "filter"-Funktion sollte keinen system_failure verursachen sondern einfach einen bereinigten String liefern. |
76 |
- |
|
76 |
+ |
|
77 | 77 |
DEBUG('filter_input_hostname("'.$input.'", $wildcard='.$wildcard.')'); |
78 | 78 |
$input = str_replace(array('Ä', 'Ö', 'Ü'), array('ä', 'ö', 'ü'), strtolower($input)); |
79 | 79 |
$input = rtrim($input, "\t\n\r\x00 ."); |
... | ... |
@@ -55,7 +55,7 @@ function get_domain_offer($domainname) |
55 | 55 |
$temp = $result->fetch(); |
56 | 56 |
$data["gebuehr"] = $temp["gebuehr"]; |
57 | 57 |
$data["setup"] = ($temp["setup"] ? $temp["setup"] : 0.0); |
58 |
- |
|
58 |
+ |
|
59 | 59 |
$available = api_domain_available($domainname); |
60 | 60 |
if (! $available) { |
61 | 61 |
warning('Die Domain »'.$domainname.'« ist leider nicht verfügbar.'); |
... | ... |
@@ -88,7 +88,7 @@ function register_domain($domainname, $uid) |
88 | 88 |
if (! $useraccount) { |
89 | 89 |
system_failure('Kein User gesetzt'); |
90 | 90 |
} |
91 |
- |
|
91 |
+ |
|
92 | 92 |
$args = array(":cid" => $cid, |
93 | 93 |
":useraccount" => $useraccount, |
94 | 94 |
":basename" => $data['basename'], |
... | ... |
@@ -411,7 +411,7 @@ function contact_as_string($contact) |
411 | 411 |
} |
412 | 412 |
$pgp = '<p class="contact-pgp">'.other_icon('key.png').' PGP ID:<br>'.$pgpid.'</p>'; |
413 | 413 |
} |
414 |
- |
|
414 |
+ |
|
415 | 415 |
$contact_string = "<p class=\"contact-id\">#{$contact['id']}</p><p class=\"contact-address\"><strong>$name</strong>$adresse</p><p class=\"contact-contact\">$email</p>$pgp"; |
416 | 416 |
return $contact_string; |
417 | 417 |
} |
... | ... |
@@ -31,7 +31,7 @@ if (isset($_REQUEST['back'])) { |
31 | 31 |
|
32 | 32 |
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'delete') { |
33 | 33 |
$contact = get_contact($_REQUEST['id']); |
34 |
- |
|
34 |
+ |
|
35 | 35 |
$contact_string = display_contact($contact); |
36 | 36 |
|
37 | 37 |
$sure = user_is_sure(); |
... | ... |
@@ -98,7 +98,7 @@ if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'delete') { |
98 | 98 |
system_failure("Ungültige E-Mail-Adresse!"); |
99 | 99 |
} |
100 | 100 |
} |
101 |
- |
|
101 |
+ |
|
102 | 102 |
|
103 | 103 |
if (isset($_REQUEST['telefon']) && $_REQUEST['telefon'] != '') { |
104 | 104 |
$num = format_number(verify_input_general($_REQUEST['telefon']), $_REQUEST['land']); |
... | ... |
@@ -131,7 +131,7 @@ if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'delete') { |
131 | 131 |
$c['fax'] = null; |
132 | 132 |
} |
133 | 133 |
|
134 |
- |
|
134 |
+ |
|
135 | 135 |
if (isset($_REQUEST['usepgp']) && $_REQUEST['usepgp'] == 'yes' && isset($_REQUEST['pgpid'])) { |
136 | 136 |
$pgpid = preg_replace('/[^0-9a-fA-F]/', '', $_REQUEST['pgpid']); |
137 | 137 |
DEBUG('PGP-ID: '.$pgpid.' / Länge: '.strlen($pgpid)); |
... | ... |
@@ -34,7 +34,7 @@ function contract_html() |
34 | 34 |
{ |
35 | 35 |
use_module('contacts'); |
36 | 36 |
require_once('contacts.php'); |
37 |
- |
|
37 |
+ |
|
38 | 38 |
$kundenkontakte = get_kundenkontakte(); |
39 | 39 |
$kunde = get_contact($kundenkontakte['kunde']); |
40 | 40 |
$adresse = nl2br("\n".filter_input_general($kunde['address'])."\n".filter_input_general($kunde['country']).'-'.filter_input_general($kunde['zip']).' '.filter_input_general($kunde['city'])); |
... | ... |
@@ -44,7 +44,7 @@ function contract_html() |
44 | 44 |
} |
45 | 45 |
$email = filter_input_general($kunde['email']); |
46 | 46 |
$address = "<strong>$name</strong>$adresse</p><p>E-Mail-Adresse: $email"; |
47 |
- |
|
47 |
+ |
|
48 | 48 |
$date = date('d.m.Y'); |
49 | 49 |
|
50 | 50 |
$DIR=realpath(dirname(__FILE__).'/..'); |
... | ... |
@@ -58,7 +58,7 @@ if (isset($_GET['action']) && ($_GET['action'] == 'delete')) { |
58 | 58 |
} |
59 | 59 |
} else { |
60 | 60 |
// Sicherheitsprüfungen passieren im Backend |
61 |
- |
|
61 |
+ |
|
62 | 62 |
$record['hostname'] = $_REQUEST['hostname']; |
63 | 63 |
$record['domain'] = (int) $_REQUEST['domain']; |
64 | 64 |
$record['ip'] = (isset($_REQUEST['ip']) ? $_REQUEST['ip'] : null); |
... | ... |
@@ -66,7 +66,7 @@ if (isset($_GET['action']) && ($_GET['action'] == 'delete')) { |
66 | 66 |
$record['dyndns'] = (isset($_REQUEST['dyndns']) ? (int) $_REQUEST['dyndns'] : null); |
67 | 67 |
$record['spec'] = (isset($_REQUEST['spec']) ? (int) $_REQUEST['spec'] : null); |
68 | 68 |
$record['ttl'] = (int) $_REQUEST['ttl']; |
69 |
- |
|
69 |
+ |
|
70 | 70 |
save_dns_record($id, $record); |
71 | 71 |
|
72 | 72 |
if (!$debugmode) { |
... | ... |
@@ -88,18 +88,18 @@ $form = '<p><label for="handle">Bezeichnung:</label> <input type="text" nam |
88 | 88 |
|
89 | 89 |
$output .= html_form('dyndns_edit', 'save', 'type=dyndns&action=edit&'.(isset($_REQUEST['id']) ? 'id='.$_REQUEST['id'] : ''), $form); |
90 | 90 |
|
91 |
- |
|
91 |
+ |
|
92 | 92 |
if (! $new) { |
93 | 93 |
$records = get_dyndns_records($_REQUEST['id']); |
94 | 94 |
|
95 | 95 |
$output .= '<h4>Folgende DNS-records sind mit diesem DynDNS-Account verknüpft:</h4> |
96 | 96 |
|
97 | 97 |
<ul>'; |
98 |
- |
|
98 |
+ |
|
99 | 99 |
foreach ($records as $record) { |
100 | 100 |
$output .= '<li>'.$record['fqdn'].' (Typ: '.strtoupper($record['type']).' / TTL: '.$record['ttl'].' Sek.)</li>'; |
101 | 101 |
} |
102 |
- |
|
102 |
+ |
|
103 | 103 |
$output .= '</ul>'; |
104 | 104 |
output("<p>".internal_link('dyndns_hostnames', "Liste ändern...", "id={$_REQUEST['id']}")."</p>"); |
105 | 105 |
} |
... | ... |
@@ -38,12 +38,12 @@ $dyndns = get_dyndns_account($id); |
38 | 38 |
} |
39 | 39 |
$record = blank_dns_record($type); |
40 | 40 |
// Sicherheitsprüfungen passieren im Backend |
41 |
- |
|
41 |
+ |
|
42 | 42 |
$record['hostname'] = $_REQUEST['hostname']; |
43 | 43 |
$record['domain'] = (int) $_REQUEST['domain']; |
44 | 44 |
$record['dyndns'] = $id; |
45 | 45 |
$record['ttl'] = 120; |
46 |
- |
|
46 |
+ |
|
47 | 47 |
save_dns_record(null, $record); |
48 | 48 |
|
49 | 49 |
if (!$debugmode) { |
... | ... |
@@ -429,14 +429,14 @@ function check_dns($domainname, $tld) |
429 | 429 |
$NS = preg_replace("/^.*\\sIN\\s+NS\\s+(\\S+)$/", '\1', $line); |
430 | 430 |
$tld_ns[$tld] = $NS; |
431 | 431 |
} |
432 |
- |
|
432 |
+ |
|
433 | 433 |
$resp = shell_exec('dig @'.$tld_ns[$tld].' +noall +authority -t ns '.$domain.'.'); |
434 | 434 |
$line = explode("\n", $resp, 2)[0]; |
435 | 435 |
if (preg_match('/^.*\\sIN\\s+NS\\s+/', $line) === 0) { |
436 | 436 |
return "NXDOMAIN"; |
437 | 437 |
} |
438 | 438 |
$NS = preg_replace("/^.*\\sIN\\s+NS\\s+(\\S+).$/", '\1', $line); |
439 |
- |
|
439 |
+ |
|
440 | 440 |
$own_ns = own_ns(); |
441 | 441 |
|
442 | 442 |
if (in_array($NS, $own_ns)) { |
... | ... |
@@ -49,14 +49,14 @@ if (isset($_GET['type']) && $_GET['type'] == 'dyndns') { |
49 | 49 |
} |
50 | 50 |
if ($_GET['action'] == 'edit') { |
51 | 51 |
check_form_token('dyndns_edit'); |
52 |
- |
|
52 |
+ |
|
53 | 53 |
$newid = null; |
54 | 54 |
if ($id) { |
55 | 55 |
edit_dyndns_account($id, $_POST['handle'], $_POST['password_http'], $_POST['sshkey']); |
56 | 56 |
} else { |
57 | 57 |
$newid = create_dyndns_account($_POST['handle'], $_POST['password_http'], $_POST['sshkey']); |
58 | 58 |
} |
59 |
- |
|
59 |
+ |
|
60 | 60 |
if (! ($debugmode || we_have_an_error())) { |
61 | 61 |
if ($id) { |
62 | 62 |
// Bearbeitung |
... | ... |
@@ -274,7 +274,7 @@ if ($dom->mailserver_lock == 1 && $dom->status != 'prereg') { |
274 | 274 |
} |
275 | 275 |
output('<h4>Inhaberschaft bestätigen</h4>'); |
276 | 276 |
output('<p>Um eine extern registrierte Domain in vollem Umfang zu nutzen, ohne die lokalen DNS-Server als zuständig einzurichten, müssen Sie die Inhaberschaft bestätigen. Erst nach diesem Schritt können Sie diese Domain bei '.config('company_name').' als Mail-Domain nutzen.</p>'); |
277 |
- |
|
277 |
+ |
|
278 | 278 |
output('<p>Die Zeichenkette zur Bestätigung lautet <strong>'.$dom->secret.'</strong>.</p>'); |
279 | 279 |
output('<p>Richten Sie bitte auf dem zuständigen DNS-Server einen DNS-Record vom Typ TXT unter dem Hostname <strong>_schokokeks.'.$dom->fqdn.'</strong> ein und hinterlegen Sie dort diese Zeichenkette als Inhalt:</p> |
280 | 280 |
<p><code>_schokokeks.'.$dom->fqdn.'. IN TXT "'.$dom->secret.'"</code></p> |
... | ... |
@@ -55,7 +55,7 @@ if (isset($_REQUEST['domain'])) { |
55 | 55 |
if ($dom->provider == 'terions') { |
56 | 56 |
system_failure("Diese Domain ist bereits auf Ihr Kundenkonto registriert."); |
57 | 57 |
} |
58 |
- |
|
58 |
+ |
|
59 | 59 |
// An diesem Punkt ist die Domain eingetragen als extern und ggf. mit Mailserver-Lock |
60 | 60 |
// Bei der Reg-Bestätigung wird das Lock entfernt und die Daten entsprechend gesetzt, inklusive Preise. |
61 | 61 |
|
... | ... |
@@ -29,7 +29,7 @@ function api_download_domain($id) |
29 | 29 |
system_failure('Domain nicht gefunden'); |
30 | 30 |
} |
31 | 31 |
$dom = $result->fetch(); |
32 |
- |
|
32 |
+ |
|
33 | 33 |
$data = array("domainName" => $dom['fqdn']); |
34 | 34 |
$result = api_request('domainInfo', $data); |
35 | 35 |
if ($result['status'] != 'success') { |
... | ... |
@@ -152,7 +152,7 @@ function get_auth_dns($domainname, $tld) |
152 | 152 |
|
153 | 153 |
$resp = shell_exec('dig @'.$NS.' -t ns '.$domain.'.'); |
154 | 154 |
$lines = explode("\n", $resp); |
155 |
- |
|
155 |
+ |
|
156 | 156 |
$NS = null; |
157 | 157 |
$NS_IP = null; |
158 | 158 |
$sec = null; |
... | ... |
@@ -271,7 +271,7 @@ function get_domain_offer($tld) |
271 | 271 |
$data["gebuehr"] = $temp["gebuehr"]; |
272 | 272 |
$data["interval"] = $temp["interval"]; |
273 | 273 |
$data["setup"] = ($temp["setup"] ? $temp["setup"] : 0.0); |
274 |
- |
|
274 |
+ |
|
275 | 275 |
return $data; |
276 | 276 |
} |
277 | 277 |
|
... | ... |
@@ -312,7 +312,7 @@ function insert_domain_external($domain, $dns = false, $mail = true) |
312 | 312 |
$tld = $info['domainSuffix']; |
313 | 313 |
$domainname = str_replace(".$tld", "", $info['domainNameUnicode']); |
314 | 314 |
logger(LOG_WARNING, 'modules/domains/include/domains', 'domains', 'Inserting external domain '.$info['domainNameUnicode']." DNS:{$dns} / Mail:{$mail}"); |
315 |
- |
|
315 |
+ |
|
316 | 316 |
db_query("INSERT INTO kundendaten.domains (status, kunde, useraccount, domainname, tld, billing, provider, dns, mail, mailserver_lock) VALUES |
317 | 317 |
('external', ?, ?, ?, ?, 'external', 'other', 0, ?, 1)", array($cid, $uid, $domainname, $tld, ($mail ? 'auto' : 'none'))); |
318 | 318 |
$id = db_insert_id(); |
... | ... |
@@ -30,7 +30,7 @@ if ($_REQUEST['action'] == 'chguser') { |
30 | 30 |
change_user((int)$_REQUEST['id'], $_REQUEST['domainuser']); |
31 | 31 |
redirect('detail?id='.(int)$_REQUEST['id']); |
32 | 32 |
} |
33 |
- |
|
33 |
+ |
|
34 | 34 |
if ($_REQUEST['action'] == 'ownerchange') { |
35 | 35 |
if (!(isset($_POST['accept']) && $_POST['accept'] == '1')) { |
36 | 36 |
redirect('detail?error=1'); |
... | ... |
@@ -65,7 +65,7 @@ foreach ($domains as $id => $dom) { |
65 | 65 |
$check_off = ($dom['type'] == 'none' ? ' checked="checked"' : ''); |
66 | 66 |
$check_webinterface = ($dom['type'] == 'virtual' ? ' checked="checked"' : ''); |
67 | 67 |
$check_manual = ($dom['type'] == 'auto' || $dom['type'] == 'manual' ? ' checked="checked"' : ''); |
68 |
- |
|
68 |
+ |
|
69 | 69 |
$buttons = '<span class="buttonset'.($edit_disabled ? ' disabled':'').'" id="buttonset-'.$id.'"> |
70 | 70 |
<input type="radio" name="option-'.$id.'" id="option-'.$id.'-webinterface" value="webinterface"'.$check_webinterface.' '.($edit_disabled ? ' disabled="disabled"':'').'/> |
71 | 71 |
<label for="option-'.$id.'-webinterface">Webinterface</label> |
... | ... |
@@ -87,7 +87,7 @@ if (! $accountlogin) { |
87 | 87 |
$password_message = '<span style="font-size: 80%"><br /><em>Sie haben bereits ein Passwort gesetzt. Wenn Sie dieses Feld nicht ändern, wird das bisherige Passwort beibehalten.</em></span>'; |
88 | 88 |
$password_value = '**********'; |
89 | 89 |
} |
90 |
- |
|
90 |
+ |
|
91 | 91 |
$form .= " |
92 | 92 |
<p><input class=\"option_group\" type=\"checkbox\" id=\"mailbox\" name=\"mailbox\" value=\"yes\" ".($is_mailbox ? 'checked="checked" ' : '')." /><label for=\"mailbox\"> <strong>In Mailbox speichern</strong></label></p> |
93 | 93 |
<div style=\"margin-left: 2em;\" id=\"mailbox_config\" class=\"option_group\"> |
... | ... |
@@ -150,7 +150,7 @@ function create_mailaccount($arr) |
150 | 150 |
logger(LOG_INFO, "modules/imap/include/mailaccounts", "imap", "created account »{$arr['account']}«"); |
151 | 151 |
} |
152 | 152 |
|
153 |
- |
|
153 |
+ |
|
154 | 154 |
function get_mailaccount_id($accountname) |
155 | 155 |
{ |
156 | 156 |
list($local, $domain) = explode('@', $accountname, 2); |
... | ... |
@@ -169,7 +169,7 @@ function get_mailaccount_id($accountname) |
169 | 169 |
$acc = $result->fetch(); |
170 | 170 |
return $acc['id']; |
171 | 171 |
} |
172 |
- |
|
172 |
+ |
|
173 | 173 |
|
174 | 174 |
function delete_mailaccount($id) |
175 | 175 |
{ |
... | ... |
@@ -261,7 +261,7 @@ function save_vmail_account($account) |
261 | 261 |
return false; |
262 | 262 |
} |
263 | 263 |
} |
264 |
- |
|
264 |
+ |
|
265 | 265 |
$forwards = array(); |
266 | 266 |
if (count($account['forwards']) > 0) { |
267 | 267 |
for ($i = 0 ; $i < count($account['forwards']) ; $i++) { |
... | ... |
@@ -300,7 +300,7 @@ function save_vmail_account($account) |
300 | 300 |
} else { |
301 | 301 |
$free = get_max_mailboxquota($oldaccount['server'], $oldaccount['quota']); |
302 | 302 |
} |
303 |
- |
|
303 |
+ |
|
304 | 304 |
$newquota = max((int) config('vmail_basequota'), (int) $account['quota']); |
305 | 305 |
if ($newquota > config('vmail_basequota') && $newquota > ($free+config('vmail_basequota'))) { |
306 | 306 |
$newquota = $free + config('vmail_basequota'); |
... | ... |
@@ -310,7 +310,7 @@ function save_vmail_account($account) |
310 | 310 |
} |
311 | 311 |
warning("Ihr Speicherplatz reicht für diese Postfach-Größe nicht mehr aus. Ihr Postfach wurde auf {$newquota} MB reduziert. Bitte beachten Sie, dass damit Ihr Benutzerkonto keinen freien Speicherplatz mehr aufweist!"); |
312 | 312 |
} |
313 |
- |
|
313 |
+ |
|
314 | 314 |
$account['quota'] = $newquota; |
315 | 315 |
} |
316 | 316 |
|
... | ... |
@@ -319,7 +319,7 @@ function save_vmail_account($account) |
319 | 319 |
} else { |
320 | 320 |
$account['quota_threshold'] = min((int) $account['quota_threshold'], (int) $account['quota']); |
321 | 321 |
} |
322 |
- |
|
322 |
+ |
|
323 | 323 |
$account['local'] = strtolower($account['local']); |
324 | 324 |
# Leerstring wird zu NULL |
325 | 325 |
$account['smtpreply'] = ($account['smtpreply'] ? $account['smtpreply'] : null); |
... | ... |
@@ -376,7 +376,7 @@ function save_vmail_account($account) |
376 | 376 |
":quote" => $quote); |
377 | 377 |
db_query($query, $args); |
378 | 378 |
} |
379 |
- |
|
379 |
+ |
|
380 | 380 |
|
381 | 381 |
|
382 | 382 |
if (! $newaccount) { |
... | ... |
@@ -485,7 +485,7 @@ function domainsettings($only_domain=null) |
485 | 485 |
if (! array_key_exists($mydom['id'], $subdomains)) { |
486 | 486 |
$subdomains[$mydom['id']] = array(); |
487 | 487 |
} |
488 |
- |
|
488 |
+ |
|
489 | 489 |
$type = 'auto'; |
490 | 490 |
if ($mydom['v_id']) { |
491 | 491 |
$type = 'virtual'; |
... | ... |
@@ -513,11 +513,11 @@ function change_domain($id, $type) |
513 | 513 |
if (domain_has_vmail_accounts($id)) { |
514 | 514 |
system_failure("Sie müssen zuerst alle E-Mail-Konten mit dieser Domain löschen, bevor Sie die Webinterface-Verwaltung für diese Domain abschalten können."); |
515 | 515 |
} |
516 |
- |
|
516 |
+ |
|
517 | 517 |
if (! in_array($type, array('none','auto','virtual'))) { |
518 | 518 |
system_failure("Ungültige Aktion"); |
519 | 519 |
} |
520 |
- |
|
520 |
+ |
|
521 | 521 |
$old = domainsettings($id); |
522 | 522 |
if ($old['type'] == $type) { |
523 | 523 |
system_failure('Domain ist bereits so konfiguriert'); |
... | ... |
@@ -43,7 +43,7 @@ if ($_GET['action'] == 'edit') { |
43 | 43 |
$account['id'] = null; |
44 | 44 |
if ($id) { |
45 | 45 |
$account['id'] = $id; |
46 |
- |
|
46 |
+ |
|
47 | 47 |
$oldaccount = get_account_details($id); |
48 | 48 |
$account['local'] = $oldaccount['local']; |
49 | 49 |
$account['domain'] = $oldaccount['domain']; |
... | ... |
@@ -65,7 +65,7 @@ if ($_GET['action'] == 'edit') { |
65 | 65 |
if (isset($_POST['quota'])) { |
66 | 66 |
$account['quota'] = $_POST['quota']; |
67 | 67 |
} |
68 |
- |
|
68 |
+ |
|
69 | 69 |
$account['quota_threshold'] = -1; |
70 | 70 |
if (isset($_POST['quota_notify']) && isset($_POST['quota_threshold']) && $_POST['quota_notify'] == 1) { |
71 | 71 |
$account['quota_threshold'] = $_POST['quota_threshold']; |
... | ... |
@@ -145,7 +145,7 @@ if ($_GET['action'] == 'edit') { |
145 | 145 |
if (isset($_POST['ar_from']) && $_POST['ar_from'] == 'custom' && isset($_POST['ar_fromname'])) { |
146 | 146 |
$ar['fromname'] = $_POST['ar_fromname']; |
147 | 147 |
} |
148 |
- |
|
148 |
+ |
|
149 | 149 |
$account['autoresponder'] = $ar; |
150 | 150 |
|
151 | 151 |
|
... | ... |
@@ -226,7 +226,7 @@ if ($_GET['action'] == 'edit') { |
226 | 226 |
} |
227 | 227 |
} |
228 | 228 |
$account_string = $account['local'] . "@" . $domain; |
229 |
- |
|
229 |
+ |
|
230 | 230 |
if (!isset($_POST['smtpreply']) || !$_POST['smtpreply']) { |
231 | 231 |
system_failure('Zur Stilllegung einer Adresse müssen Sie einen Text eingeben den der Absender als Fehlermeldung erhält.'); |
232 | 232 |
} |
... | ... |
@@ -251,7 +251,7 @@ if ($_GET['action'] == 'edit') { |
251 | 251 |
} |
252 | 252 |
} |
253 | 253 |
$account_string = $account['local'] . "@" . $domain; |
254 |
- |
|
254 |
+ |
|
255 | 255 |
$account['smtpreply'] = null; |
256 | 256 |
|
257 | 257 |
save_vmail_account($account); |
... | ... |
@@ -25,7 +25,7 @@ require_once('hasdomain.php'); |
25 | 25 |
|
26 | 26 |
if (! user_has_vmail_domain()) { |
27 | 27 |
title("E-Mail-Verwaltung"); |
28 |
- |
|
28 |
+ |
|
29 | 29 |
output(' |
30 | 30 |
<p>Sie können bei '.config('company_name').' die E-Mails Ihrer Domains auf zwei unterschiedliche Arten empfangen.</p> |
31 | 31 |
<ol><li>Sie können einfache E-Mail-Konten erstellen, die ankommende E-Mails speichern oder weiterleiten.</li> |
... | ... |
@@ -87,14 +87,14 @@ function save_ftpuser($data) |
87 | 87 |
} elseif (! $data['id']) { |
88 | 88 |
system_failure('Wenn Sie einen neuen Zugang anlegen, müssen Sie ein Passwort setzen'); |
89 | 89 |
} |
90 |
- |
|
90 |
+ |
|
91 | 91 |
$args = array(":username" => $_SESSION['userinfo']['username'].'-'.$data['username'], |
92 | 92 |
":homedir" => $homedir, |
93 | 93 |
":active" => ($data['active'] == 1 ? 1 : 0), |
94 | 94 |
":forcessl" => ($data['forcessl'] == 0 ? 0 : 1), |
95 | 95 |
":server" => $server, |
96 | 96 |
":uid" => $_SESSION['userinfo']['uid']); |
97 |
- |
|
97 |
+ |
|
98 | 98 |
if ($data['id']) { |
99 | 99 |
$args[":id"] = $data['id']; |
100 | 100 |
if ($set_password) { |
... | ... |
@@ -55,7 +55,7 @@ if (isset($_GET['id'])) { |
55 | 55 |
$ftpuser = load_ftpuser($_GET['id']); |
56 | 56 |
} |
57 | 57 |
|
58 |
- |
|
58 |
+ |
|
59 | 59 |
$ftpuser['username'] = $_REQUEST['ftpusername']; |
60 | 60 |
$ftpuser['password'] = $_REQUEST['password']; |
61 | 61 |
$ftpuser['homedir'] = $_REQUEST['homedir']; |
... | ... |
@@ -75,7 +75,7 @@ if (isset($_REQUEST['server'])) { |
75 | 75 |
$ftpuser['server'] = $_REQUEST['server']; |
76 | 76 |
} |
77 | 77 |
|
78 |
- |
|
78 |
+ |
|
79 | 79 |
save_ftpuser($ftpuser); |
80 |
- |
|
80 |
+ |
|
81 | 81 |
redirect('accounts'); |
... | ... |
@@ -145,7 +145,7 @@ function list_users() |
145 | 145 |
DEBUG("user-config does not exist"); |
146 | 146 |
return array(); |
147 | 147 |
} |
148 |
- |
|
148 |
+ |
|
149 | 149 |
$lines = file($userconfig); |
150 | 150 |
$users = array(); |
151 | 151 |
foreach ($lines as $line) { |
... | ... |
@@ -172,7 +172,7 @@ function list_foreign_users() |
172 | 172 |
DEBUG("user-config does not exist"); |
173 | 173 |
return array(); |
174 | 174 |
} |
175 |
- |
|
175 |
+ |
|
176 | 176 |
$lines = file($userconfig); |
177 | 177 |
$users = array(); |
178 | 178 |
foreach ($lines as $line) { |
... | ... |
@@ -281,7 +281,7 @@ function newkey($pubkey, $handle) |
281 | 281 |
{ |
282 | 282 |
global $key_dir, $config_dir; |
283 | 283 |
$username = $_SESSION['userinfo']['username']; |
284 |
- |
|
284 |
+ |
|
285 | 285 |
$handle = $username.'-'.$handle; |
286 | 286 |
if (! validate_name($handle) || (str_replace(".", "x", $handle) != $handle)) { |
287 | 287 |
system_failure("Der eingegebene Name enthält ungültige Zeichen. Bitte nur Buchstaben, Zahlen, Unterstrich und Bindestrich benutzen."); |
... | ... |
@@ -289,7 +289,7 @@ function newkey($pubkey, $handle) |
289 | 289 |
|
290 | 290 |
$keyfile = $key_dir.'/'.$handle.'.pub'; |
291 | 291 |
file_put_contents($keyfile, $pubkey); |
292 |
- |
|
292 |
+ |
|
293 | 293 |
DEBUG("checking public key $keyfile"); |
294 | 294 |
$proc = popen("/usr/bin/ssh-keygen -l -f '{$keyfile}' 2>&1", 'r'); |
295 | 295 |
$output = fread($proc, 512); |
... | ... |
@@ -299,7 +299,7 @@ function newkey($pubkey, $handle) |
299 | 299 |
unlink($keyfile); |
300 | 300 |
system_failure('Der angegebene SSH-Key scheint ungültig zu sein.'); |
301 | 301 |
} |
302 |
- |
|
302 |
+ |
|
303 | 303 |
|
304 | 304 |
git_wrapper('add '.$keyfile); |
305 | 305 |
|
... | ... |
@@ -316,7 +316,7 @@ function newkey($pubkey, $handle) |
316 | 316 |
file_put_contents($userconfig, "# user {$handle}\n".$content); |
317 | 317 |
} |
318 | 318 |
git_wrapper('add '.$userconfig); |
319 |
- |
|
319 |
+ |
|
320 | 320 |
git_wrapper('commit --allow-empty -m "added new key for '.$handle.'"'); |
321 | 321 |
git_wrapper('push'); |
322 | 322 |
} |
... | ... |
@@ -369,7 +369,7 @@ function delete_key($handle) |
369 | 369 |
file_put_contents($userconfig, implode('', $newcontent)); |
370 | 370 |
} |
371 | 371 |
git_wrapper('add '.$userconfig); |
372 |
- |
|
372 |
+ |
|
373 | 373 |
git_wrapper('commit -m "deleted key for '.$handle.'"'); |
374 | 374 |
git_wrapper('push'); |
375 | 375 |
} |
... | ... |
@@ -423,7 +423,7 @@ function delete_repo($repo) |
423 | 423 |
if (!array_key_exists($repo, $repos)) { |
424 | 424 |
system_failure("Ein solches Repository existiert nicht!"); |
425 | 425 |
} |
426 |
- |
|
426 |
+ |
|
427 | 427 |
global $config_dir; |
428 | 428 |
$username = $_SESSION['userinfo']['username']; |
429 | 429 |
$userconfig = $config_dir . '/' . $username . '.conf'; |
... | ... |
@@ -432,7 +432,7 @@ function delete_repo($repo) |
432 | 432 |
$data = remove_repo_from_array($data, $repo); |
433 | 433 |
file_put_contents($userconfig, implode('', $data)); |
434 | 434 |
git_wrapper('add '.$userconfig); |
435 |
- |
|
435 |
+ |
|
436 | 436 |
git_wrapper('commit --allow-empty -m "deleted repo '.$repo.'"'); |
437 | 437 |
git_wrapper('push'); |
438 | 438 |
} |
... | ... |
@@ -501,7 +501,7 @@ function save_repo($repo, $permissions, $description) |
501 | 501 |
} |
502 | 502 |
file_put_contents($userconfig, implode('', $data)); |
503 | 503 |
git_wrapper('add '.$userconfig); |
504 |
- |
|
504 |
+ |
|
505 | 505 |
git_wrapper('commit --allow-empty -m "written repo '.$repo.'"'); |
506 | 506 |
git_wrapper('push'); |
507 | 507 |
} |
... | ... |
@@ -25,20 +25,20 @@ if ($_GET['action'] == 'new') { |
25 | 25 |
if (! isset($_SESSION['clientcert_cert'])) { |
26 | 26 |
system_failure('Kein Zertifikat'); |
27 | 27 |
} |
28 |
- |
|
28 |
+ |
|
29 | 29 |
add_clientcert( |
30 |
- |
|
30 |
+ |
|
31 | 31 |
$_SESSION['clientcert_cert'], |
32 |
- |
|
32 |
+ |
|
33 | 33 |
$_SESSION['clientcert_dn'], |
34 |
- |
|
34 |
+ |
|
35 | 35 |
$_SESSION['clientcert_issuer'], |
36 | 36 |
$_SESSION['clientcert_serial'], |
37 |
- |
|
37 |
+ |
|
38 | 38 |
$_SESSION['clientcert_valid_from'], |
39 |
- |
|
39 |
+ |
|
40 | 40 |
$_SESSION['clientcert_valid_until'] |
41 |
- |
|
41 |
+ |
|
42 | 42 |
); |
43 | 43 |
|
44 | 44 |
// Räume session auf |
... | ... |
@@ -100,23 +100,23 @@ function invalidate_customer_token($customerno) |
100 | 100 |
{ |
101 | 101 |
db_query("UPDATE kundendaten.kunden SET token=NULL, token_create=NULL WHERE id=?", array($customerno)); |
102 | 102 |
} |
103 |
- |
|
103 |
+ |
|
104 | 104 |
function invalidate_systemuser_token($uid) |
105 | 105 |
{ |
106 | 106 |
db_query("DELETE FROM system.usertoken WHERE uid=?", array($uid)); |
107 | 107 |
} |
108 |
- |
|
108 |
+ |
|
109 | 109 |
function create_token($username) |
110 | 110 |
{ |
111 | 111 |
expire_tokens(); |
112 | 112 |
$result = db_query("SELECT uid FROM system.useraccounts WHERE username=?", array($username)); |
113 | 113 |
$uid = (int) $result->fetch()['uid']; |
114 |
- |
|
114 |
+ |
|
115 | 115 |
$result = db_query("SELECT created FROM system.usertoken WHERE uid=?", array($uid)); |
116 | 116 |
if ($result->rowCount() > 0) { |
117 | 117 |
system_failure("Für Ihr Benutzerkonto ist bereits eine Passwort-Erinnerung versendet worden. Bitte wenden Sie sich an den Support wenn Sie diese nicht erhalten haben."); |
118 | 118 |
} |
119 |
- |
|
119 |
+ |
|
120 | 120 |
$args = array(":uid" => $uid, |
121 | 121 |
":token" => random_string(16)); |
122 | 122 |
db_query("INSERT INTO system.usertoken VALUES (:uid, NOW(), NOW() + INTERVAL 1 DAY, :token)", $args); |
... | ... |
@@ -22,7 +22,7 @@ $show = 'token'; |
22 | 22 |
|
23 | 23 |
if (isset($_SESSION['role']) && $_SESSION['role'] != ROLE_ANONYMOUS) { |
24 | 24 |
@session_destroy(); |
25 |
- |
|
25 |
+ |
|
26 | 26 |
header('Location: '.$PHP_SELF); |
27 | 27 |
die(); |
28 | 28 |
} |
... | ... |
@@ -30,7 +30,7 @@ if (isset($_SESSION['role']) && $_SESSION['role'] != ROLE_ANONYMOUS) { |
30 | 30 |
if (isset($_REQUEST['token'])) { |
31 | 31 |
$token = $_REQUEST['token']; |
32 | 32 |
$uid = get_uid_for_token($token); |
33 |
- |
|
33 |
+ |
|
34 | 34 |
if ($uid != null && validate_uid_token($uid, $token)) { |
35 | 35 |
$show = 'agb'; |
36 | 36 |
if (isset($_REQUEST['agb']) && $_REQUEST['agb'] == '1') { |
... | ... |
@@ -21,7 +21,7 @@ $show = 'token'; |
21 | 21 |
if (isset($_REQUEST['customerno']) and isset($_REQUEST['token'])) { |
22 | 22 |
$customerno = (int) $_REQUEST['customerno']; |
23 | 23 |
$token = $_REQUEST['token']; |
24 |
- |
|
24 |
+ |
|
25 | 25 |
require_once('newpass.php'); |
26 | 26 |
require_once('inc/security.php'); |
27 | 27 |
if (validate_token($customerno, $token)) { |
... | ... |
@@ -98,7 +98,7 @@ DE91602911200041512006 |
98 | 98 |
|
99 | 99 |
|
100 | 100 |
RE '.$id.' KD '.$customerno.' vom '.$datum; |
101 |
- |
|
101 |
+ |
|
102 | 102 |
$descriptorspec = array( |
103 | 103 |
0 => array("pipe", "r"), // STDIN ist eine Pipe, von der das Child liest |
104 | 104 |
1 => array("pipe", "w"), // STDOUT ist eine Pipe, in die das Child schreibt |
... | ... |
@@ -121,7 +121,7 @@ RE '.$id.' KD '.$customerno.' vom '.$datum; |
121 | 121 |
// Es ist wichtig, dass Sie alle Pipes schließen bevor Sie |
122 | 122 |
// proc_close aufrufen, um Deadlocks zu vermeiden |
123 | 123 |
$return_value = proc_close($process); |
124 |
- |
|
124 |
+ |
|
125 | 125 |
return $pngdata; |
126 | 126 |
} else { |
127 | 127 |
warning('Es ist ein interner Fehler im Webinterface aufgetreten, aufgrund dessen kein QR-Code erstellt werden kann. Sollte dieser Fehler mehrfach auftreten, kontaktieren Sie bitte die Administratoren.'); |
... | ... |
@@ -270,7 +270,7 @@ function get_customerquota() |
270 | 270 |
function save_more_storage($items, $storage) |
271 | 271 |
{ |
272 | 272 |
$cid = (int) $_SESSION['customerinfo']['customerno']; |
273 |
- |
|
273 |
+ |
|
274 | 274 |
$queries = array(); |
275 | 275 |
|
276 | 276 |
if ($storage < 1024 || $storage > 10240) { |
... | ... |
@@ -304,7 +304,7 @@ function save_more_storage($items, $storage) |
304 | 304 |
input_error("Ungültige Daten"); |
305 | 305 |
return; |
306 | 306 |
} |
307 |
- |
|
307 |
+ |
|
308 | 308 |
$param = array(); |
309 | 309 |
foreach ($data as $k => $v) { |
310 | 310 |
$param[':'.$k] = $v; |
... | ... |
@@ -317,7 +317,7 @@ function save_more_storage($items, $storage) |
317 | 317 |
if (count($queries) < 2) { |
318 | 318 |
system_failure("irgendwas stimmt jetzt nicht"); |
319 | 319 |
} |
320 |
- |
|
320 |
+ |
|
321 | 321 |
foreach ($queries as $q) { |
322 | 322 |
db_query($q[0], $q[1]); |
323 | 323 |
} |
... | ... |
@@ -26,7 +26,7 @@ $section = 'invoice_current'; |
26 | 26 |
|
27 | 27 |
if ($_GET['action'] == 'new') { |
28 | 28 |
check_form_token('sepamandat_neu'); |
29 |
- |
|
29 |
+ |
|
30 | 30 |
$gueltig_ab = $_REQUEST['gueltig_ab']; |
31 | 31 |
if ($gueltig_ab == 'datum') { |
32 | 32 |
$gueltig_ab = $_REQUEST['gueltig_ab_datum_year'].'-'.$_REQUEST['gueltig_ab_datum_month'].'-'.$_REQUEST['gueltig_ab_datum_day']; |
... | ... |
@@ -75,8 +75,8 @@ if ($_GET['action'] == 'new') { |
75 | 75 |
} |
76 | 76 |
DEBUG('BIC: '.$bic); |
77 | 77 |
|
78 |
- |
|
78 |
+ |
|
79 | 79 |
sepamandat($name, $adresse, $iban, $bankname, $bic, $gueltig_ab); |
80 |
- |
|
80 |
+ |
|
81 | 81 |
redirect($prefix.'go/invoice/current'); |
82 | 82 |
} |
... | ... |
@@ -79,7 +79,7 @@ function create_jabber_account($local, $domain, $password) |
79 | 79 |
return; |
80 | 80 |
} |
81 | 81 |
$data[':password'] = $password; |
82 |
- |
|
82 |
+ |
|
83 | 83 |
if ($domain > 0) { |
84 | 84 |
$args = array(":domain" => $data[":domain"], ":customerno" => $data[":customerno"]); |
85 | 85 |
$result = db_query("SELECT id FROM kundendaten.domains WHERE kunde=:customerno AND jabber=1 AND id=:domain", $args); |
... | ... |
@@ -118,7 +118,7 @@ function change_jabber_password($id, $password) |
118 | 118 |
$args = array(":customerno" => $_SESSION['customerinfo']['customerno'], |
119 | 119 |
":id" => $id, |
120 | 120 |
":password" => $password); |
121 |
- |
|
121 |
+ |
|
122 | 122 |
db_query("UPDATE jabber.accounts SET password=:password WHERE customerno=:customerno AND id=:id", $args); |
123 | 123 |
logger(LOG_INFO, "modules/jabber/include/jabberaccounts", "jabber", "changed password for account »{$id}«"); |
124 | 124 |
} |
... | ... |
@@ -128,7 +128,7 @@ function change_jabber_password($id, $password) |
128 | 128 |
function delete_jabber_account($id) |
129 | 129 |
{ |
130 | 130 |
require_role(ROLE_CUSTOMER); |
131 |
- |
|
131 |
+ |
|
132 | 132 |
$args = array(":customerno" => $_SESSION['customerinfo']['customerno'], |
133 | 133 |
":id" => $id); |
134 | 134 |
|
... | ... |
@@ -55,7 +55,7 @@ if ($_GET['action'] == 'new') { |
55 | 55 |
} elseif ($_GET['action'] == 'delete') { |
56 | 56 |
$title = "Jabber-Account löschen"; |
57 | 57 |
$section = 'jabber_accounts'; |
58 |
- |
|
58 |
+ |
|
59 | 59 |
$account = get_jabberaccount_details($_GET['account']); |
60 | 60 |
$account_string = filter_input_general($account['local'].'@'.$account['domain']); |
61 | 61 |
$sure = user_is_sure(); |
... | ... |
@@ -54,7 +54,7 @@ if (count(additional_servers()) > 0) { |
54 | 54 |
$available_servers = additional_servers(); |
55 | 55 |
$available_servers[] = my_server_id(); |
56 | 56 |
$available_servers = array_unique($available_servers); |
57 |
- |
|
57 |
+ |
|
58 | 58 |
$selectable_servers = array(); |
59 | 59 |
$all_servers = server_names(); |
60 | 60 |
foreach ($all_servers as $id => $fqdn) { |
... | ... |
@@ -72,7 +72,7 @@ if (count($users) > 0) { |
72 | 72 |
$form .= '<p><input type="checkbox" id="access_'.$user['username'].'" name="access[]" value="'.$user['username'].'" /> <label for="access_'.$user['username'].'">'.$user['username'].'</label></p>'; |
73 | 73 |
} |
74 | 74 |
} |
75 |
- |
|
75 |
+ |
|
76 | 76 |
$form .= '<p><input type="submit" name="submit" value="Speichern"/><p>'; |
77 | 77 |
|
78 | 78 |
|
... | ... |
@@ -46,7 +46,7 @@ function invalidate_customer_token($customerno) |
46 | 46 |
$customerno = (int) $customerno; |
47 | 47 |
db_query("UPDATE kundendaten.kunden SET token=NULL, token_create=NULL WHERE id={$customerno} LIMIT 1;"); |
48 | 48 |
} |
49 |
- |
|
49 |
+ |
|
50 | 50 |
function create_token($customerno) |
51 | 51 |
{ |
52 | 52 |
$customerno = (int) $customerno; |
... | ... |
@@ -37,7 +37,7 @@ function create_customer($data) |
37 | 37 |
} |
38 | 38 |
|
39 | 39 |
logger(LOG_INFO, 'modules/register/include/register', 'register', "Creating new account: ".print_r($data, true)); |
40 |
- |
|
40 |
+ |
|
41 | 41 |
db_query("INSERT INTO kundendaten.kunden (firma, nachname, vorname, anrede, email, erstellungsdatum,status) VALUES (:firma, :nachname, :vorname, :anrede, :email, CURDATE(), 3)", $data); |
42 | 42 |
$customerno = db_insert_id(); |
43 | 43 |
return $customerno; |
... | ... |
@@ -19,7 +19,7 @@ function list_system_users() |
19 | 19 |
require_role(ROLE_SYSADMIN); |
20 | 20 |
|
21 | 21 |
$result = db_query("SELECT uid,username FROM system.v_useraccounts ORDER BY username"); |
22 |
- |
|
22 |
+ |
|
23 | 23 |
$ret = array(); |
24 | 24 |
while ($item = $result->fetch(PDO::FETCH_OBJ)) { |
25 | 25 |
array_push($ret, $item); |
... | ... |
@@ -33,7 +33,7 @@ function list_customers() |
33 | 33 |
require_role(ROLE_SYSADMIN); |
34 | 34 |
|
35 | 35 |
$result = db_query("SELECT id, IF(firma IS NULL, CONCAT_WS(' ', vorname, nachname), CONCAT(firma, ' (', CONCAT_WS(' ', vorname, nachname), ')')) AS name FROM kundendaten.kunden"); |
36 |
- |
|
36 |
+ |
|
37 | 37 |
$ret = array(); |
38 | 38 |
while ($item = $result->fetch(PDO::FETCH_OBJ)) { |
39 | 39 |
array_push($ret, $item); |
... | ... |
@@ -102,7 +102,7 @@ function build_results($term) |
102 | 102 |
{ |
103 | 103 |
global $ret; |
104 | 104 |
$ret = array(); |
105 |
- |
|
105 |
+ |
|
106 | 106 |
$add = function ($val, $id, $value) { |
107 | 107 |
global $ret; |
108 | 108 |
if (isset($ret[$val]) && is_array($ret[$val])) { |
... | ... |
@@ -141,7 +141,7 @@ function build_results($term) |
141 | 141 |
} |
142 | 142 |
|
143 | 143 |
ksort($ret); |
144 |
- |
|
144 |
+ |
|
145 | 145 |
$allentries = array(); |
146 | 146 |
foreach ($ret as $group) { |
147 | 147 |
usort($group, function ($a, $b) { |
... | ... |
@@ -37,7 +37,7 @@ function list_subusers() |
37 | 37 |
function load_subuser($id) |
38 | 38 |
{ |
39 | 39 |
$args = array(":id" => $id, ":uid" => $_SESSION['userinfo']['uid']); |
40 |
- |
|
40 |
+ |
|
41 | 41 |
$result = db_query("SELECT id, username, modules FROM system.subusers WHERE uid=:uid AND id=:id", $args); |
42 | 42 |
$item = $result->fetch(); |
43 | 43 |
$item['modules'] = explode(',', $item['modules']); |
... | ... |
@@ -64,7 +64,7 @@ function available_modules() |
64 | 64 |
function delete_subuser($id) |
65 | 65 |
{ |
66 | 66 |
$args = array(":id" => $id, ":uid" => $_SESSION['userinfo']['uid']); |
67 |
- |
|
67 |
+ |
|
68 | 68 |
db_query("DELETE FROM system.subusers WHERE id=:id AND uid=:uid", $args); |
69 | 69 |
} |
70 | 70 |
|
... | ... |
@@ -99,7 +99,7 @@ function new_subuser($username, $requested_modules, $password) |
99 | 99 |
if (count($modules) == 0) { |
100 | 100 |
system_failure("Es sind (nach der Filterung) keine Module mehr übrig!"); |
101 | 101 |
} |
102 |
- |
|
102 |
+ |
|
103 | 103 |
$result = strong_password($password); |
104 | 104 |
if ($result !== true) { |
105 | 105 |
system_failure("Unsicheres Passwort: ".$result); |
... | ... |
@@ -150,7 +150,7 @@ function edit_subuser($id, $username, $requested_modules, $password) |
150 | 150 |
if (count($modules) == 0) { |
151 | 151 |
system_failure("Es sind (nach der Filterung) keine Module mehr übrig!"); |
152 | 152 |
} |
153 |
- |
|
153 |
+ |
|
154 | 154 |
$args = array(":uid" => $_SESSION['userinfo']['uid'], |
155 | 155 |
":id" => $id, |
156 | 156 |
":username" => $username, |
... | ... |
@@ -50,7 +50,7 @@ if (! customer_may_have_useraccounts()) { |
50 | 50 |
$percent = round((($q["systemquota_used"]+$q["mailquota"]) / $q["systemquota"]) * 100); |
51 | 51 |
$color = ($percent > 99 ? 'red' : ($percent > 80 ? "yellow" : "green")); |
52 | 52 |
$width = 2 * min($percent, 100) - $mailwidth; |
53 |
- |
|
53 |
+ |
|
54 | 54 |
$used_space = $q['systemquota_used'] + $q['mailquota']; |
55 | 55 |
$quota[] = "<p>Server <strong>{$q['server']}</strong><br />{$percent}%: {$used_space} MB von {$q['systemquota']} MB belegt{$mailstring}.</p> |
56 | 56 |
<div style=\"margin: 0; padding: 0; width: 200px; border: 1px solid black;\">{$mailbar}<div style=\"font-size: 1px; background-color: {$color}; height: 10px; width: {$width}px; margin: 0; margin-left: {$mailwidth}px; padding: 0;\"> </div></div>"; |
... | ... |
@@ -60,7 +60,7 @@ if (! customer_may_have_useraccounts()) { |
60 | 60 |
output("<tr><td><p><strong>{$acc['username']}</strong> - {$realname}</p><p style=\"color: #555;\">Existiert seit {$acc['erstellungsdatum']}<br />Verwendete Shell: {$shell}</p></td>"); |
61 | 61 |
output("<td>{$quotastring}</td>"); |
62 | 62 |
output("<td>".internal_link('edit', other_icon('user_edit.png', 'Bearbeiten'), "uid={$acc['uid']}")); |
63 |
- |
|
63 |
+ |
|
64 | 64 |
if (! customer_useraccount($acc['uid'])) { |
65 | 65 |
output("   ".internal_link('pwchange', icon_pwchange('Passwort neu setzen'), "uid={$acc['uid']}")); |
66 | 66 |
#output("   ".internal_link('deluser', other_icon('user_delete.png', 'Benutzer löschen'), "uid={$acc['uid']}")); |
... | ... |
@@ -45,7 +45,7 @@ foreach ($usedquota as $q) { |
45 | 45 |
$percent = round((($q["systemquota_used"]+$q["mailquota"]) / $q["systemquota"]) * 100); |
46 | 46 |
$color = ($percent > 99 ? 'red' : ($percent > 80 ? "yellow" : "green")); |
47 | 47 |
$width = 2 * min($percent, 100) - $mailwidth; |
48 |
- |
|
48 |
+ |
|
49 | 49 |
$used_space = $q['systemquota_used'] + $q['mailquota']; |
50 | 50 |
$quota[] = "<p>Server <strong>{$q['server']}</strong><br />{$percent}%: {$used_space} MB von {$q['systemquota']} MB belegt{$mailstring}.</p> |
51 | 51 |
<div style=\"margin: 0; padding: 0; width: 200px; border: 1px solid black;\">{$mailbar}<div style=\"font-size: 1px; background-color: {$color}; height: 10px; width: {$width}px; margin: 0; margin-left: {$mailwidth}px; padding: 0;\"> </div></div>"; |
... | ... |
@@ -57,5 +57,5 @@ output("<h5>Stammdaten</h5><div style=\"margin-left: 2em;\"><p>Benutzername: <st |
57 | 57 |
output("<p>".internal_link('edit', other_icon('user_edit.png', 'Bearbeiten').' Daten bearbeiten').'</p>'); |
58 | 58 |
output("</div>\n"); |
59 | 59 |
output("<h5>Speicherplatz</h5><div style=\"margin-left: 2em;\">{$quotastring}</div>"); |
60 |
- |
|
60 |
+ |
|
61 | 61 |
output("<p><sup>*</sup>) Die Werte für den verbrauchten Speicherplatz werden periodisch eingelesen und hier erst verspätet angezeigt!</p>"); |
... | ... |
@@ -45,7 +45,7 @@ foreach ($usedquota as $q) { |
45 | 45 |
} |
46 | 46 |
$color = ($percent > 99 ? 'red' : ($percent > 80 ? "yellow" : "green")); |
47 | 47 |
$width = 2 * min($percent, 100) - $mailwidth; |
48 |
- |
|
48 |
+ |
|
49 | 49 |
$used_space = $q['systemquota_used'] + $q['mailquota']; |
50 | 50 |
$msg = ""; |
51 | 51 |
if ($multiserver) { |
... | ... |
@@ -67,5 +67,5 @@ output("<h5>Speicherplatz</h5><div style=\"margin-left: 2em;\">{$quotastring}</d |
67 | 67 |
if (have_module('invoice') && $need_more_storage) { |
68 | 68 |
addnew('../invoice/more_storage?section='.$section, 'Mehr Speicherplatz bestellen'); |
69 | 69 |
} |
70 |
- |
|
70 |
+ |
|
71 | 71 |
output("<p>Die Werte für den verbrauchten Speicherplatz werden periodisch eingelesen und hier verzögert angezeigt!</p>"); |
... | ... |
@@ -81,7 +81,7 @@ else |
81 | 81 |
if ($role & ROLE_CUSTOMER) { |
82 | 82 |
$customerquota = get_customer_quota(); |
83 | 83 |
$maxquota = $customerquota['max'] - $customerquota['assigned'] + $account['quota']; |
84 |
- |
|
84 |
+ |
|
85 | 85 |
$quota = (int) $_POST['quota']; |
86 | 86 |
if ($quota > $maxquota) { |
87 | 87 |
system_failure("Sie können diesem Account maximal {$maxquota} MB Speicherplatz zuweisen."); |
... | ... |
@@ -94,7 +94,7 @@ else |
94 | 94 |
} else { |
95 | 95 |
$account['name'] = filter_input_general($_POST['fullname']); |
96 | 96 |
} |
97 |
- |
|
97 |
+ |
|
98 | 98 |
$shells = available_shells(); |
99 | 99 |
if (isset($shells[$_POST['shell']])) { |
100 | 100 |
$account['shell'] = $_POST['shell']; |
... | ... |
@@ -54,7 +54,7 @@ foreach ($aliases as $alias) { |
54 | 54 |
$remove_forward = internal_link('aliasoptions', 'In zusätzliche Adresse umwandeln', "alias={$alias['id']}&forward=0&formtoken={$formtoken}"); |
55 | 55 |
$typetoggle = (strstr($alias['options'], 'forward') ? $remove_forward : $to_forward); |
56 | 56 |
|
57 |
- |
|
57 |
+ |
|
58 | 58 |
$form .= "<tr> |
59 | 59 |
<td>{$alias['fqdn']}{$wwwalias}</td> |
60 | 60 |
<td>{$aliastype}<br />{$typetoggle}</td> |
... | ... |
@@ -84,7 +84,7 @@ $form .= " |
84 | 84 |
</table>"; |
85 | 85 |
|
86 | 86 |
output(html_form('vhosts_add_alias', 'save', 'action=addalias&vhost='.$vhost['id'], $form)); |
87 |
- |
|
87 |
+ |
|
88 | 88 |
output("<p> |
89 | 89 |
".internal_link("vhosts", "Zurück zur Übersicht")." |
90 | 90 |
</p>"); |
... | ... |
@@ -37,7 +37,7 @@ if (isset($_GET['aliaswww'])) { |
37 | 37 |
if ($aliaswww) { |
38 | 38 |
array_push($new_options, 'aliaswww'); |
39 | 39 |
} |
40 |
- |
|
40 |
+ |
|
41 | 41 |
DEBUG($old_options); |
42 | 42 |
DEBUG($new_options); |
43 | 43 |
$alias['options'] = implode(',', $new_options); |
... | ... |
@@ -65,7 +65,7 @@ if (isset($_GET['forward'])) { |
65 | 65 |
if ($forward) { |
66 | 66 |
array_push($new_options, 'forward'); |
67 | 67 |
} |
68 |
- |
|
68 |
+ |
|
69 | 69 |
DEBUG($old_options); |
70 | 70 |
DEBUG($new_options); |
71 | 71 |
$alias['options'] = implode(',', $new_options); |
... | ... |
@@ -62,7 +62,7 @@ function cert_details($id) |
62 | 62 |
{ |
63 | 63 |
$id = (int) $id; |
64 | 64 |
$uid = (int) $_SESSION['userinfo']['uid']; |
65 |
- |
|
65 |
+ |
|
66 | 66 |
$result = db_query("SELECT id, lastchange, valid_from, valid_until, subject, cn, chain, cert, `key` FROM vhosts.certs WHERE uid=:uid AND id=:id", array(":uid" => $uid, ":id" => $id)); |
67 | 67 |
if ($result->rowCount() != 1) { |
68 | 68 |
system_failure("Ungültiges Zertifikat #{$id}"); |
... | ... |
@@ -85,7 +85,7 @@ function csr_details($id) |
85 | 85 |
{ |
86 | 86 |
$id = (int) $id; |
87 | 87 |
$uid = (int) $_SESSION['userinfo']['uid']; |
88 |
- |
|
88 |
+ |
|
89 | 89 |
$result = db_query("SELECT id, created, hostname, bits, `replace`, csr, `key` FROM vhosts.csr WHERE uid=:uid AND id=:id", array(":uid" => $uid, ":id" => $id)); |
90 | 90 |
if ($result->rowCount() != 1) { |
91 | 91 |
system_failure("Ungültiger CSR"); |
... | ... |
@@ -148,7 +148,7 @@ function validate_certificate($cert, $key) |
148 | 148 |
if (! in_array($certinfo['type'], array(OPENSSL_KEYTYPE_RSA, OPENSSL_KEYTYPE_DSA))) { |
149 | 149 |
system_failure("Dieser Schlüssel nutzt einen nicht unterstützten Algorithmus."); |
150 | 150 |
} |
151 |
- |
|
151 |
+ |
|
152 | 152 |
// Bei ECC-Keys treten kürzere Schlüssellängen auf, die können wir aktuell aber sowieso nicht unterstützen |
153 | 153 |
if ($certinfo['bits'] < 2048) { |
154 | 154 |
warning("Dieser Schlüssel hat eine sehr geringe Bitlänge und ist daher als nicht besonders sicher einzustufen!"); |
... | ... |
@@ -262,7 +262,7 @@ function delete_cert($id) |
262 | 262 |
{ |
263 | 263 |
$uid = (int) $_SESSION['userinfo']['uid']; |
264 | 264 |
$id = (int) $id; |
265 |
- |
|
265 |
+ |
|
266 | 266 |
db_query("DELETE FROM vhosts.certs WHERE uid=? AND id=?", array($uid, $id)); |
267 | 267 |
} |
268 | 268 |
|
... | ... |
@@ -270,7 +270,7 @@ function delete_csr($id) |
270 | 270 |
{ |
271 | 271 |
$uid = (int) $_SESSION['userinfo']['uid']; |
272 | 272 |
$id = (int) $id; |
273 |
- |
|
273 |
+ |
|
274 | 274 |
db_query("DELETE FROM vhosts.csr WHERE uid=? AND id=?", array($uid, $id)); |
275 | 275 |
} |
276 | 276 |
|
... | ... |
@@ -345,7 +345,7 @@ commonName_default = {$cn} |
345 | 345 |
if ($retval != 0) { |
346 | 346 |
system_failure("Die Erzeugung des CSR ist fehlgeschlagen. Ausgabe des OpenSSL-Befehls: ".print_r($output, true)); |
347 | 347 |
} |
348 |
- |
|
348 |
+ |
|
349 | 349 |
$csr = file_get_contents($csrfile); |
350 | 350 |
$key = file_get_contents($keyfile); |
351 | 351 |
|
... | ... |
@@ -369,7 +369,7 @@ function save_csr($cn, $bits, $replace=null) |
369 | 369 |
$csr = null; |
370 | 370 |
$key = null; |
371 | 371 |
list($csr, $key) = create_csr(implode(',', $domains), $bits); |
372 |
- |
|
372 |
+ |
|
373 | 373 |
$uid = (int) $_SESSION['userinfo']['uid']; |
374 | 374 |
db_query( |
375 | 375 |
"INSERT INTO vhosts.csr (uid, hostname, san, bits, `replace`, csr, `key`) VALUES (:uid, :cn, :san, :bits, :replace, :csr, :key)", |
... | ... |
@@ -79,10 +79,10 @@ function empty_vhost() |
79 | 79 |
{ |
80 | 80 |
$vhost['id'] = null; |
81 | 81 |
$vhost['hostname'] = null; |
82 |
- |
|
82 |
+ |
|
83 | 83 |
$vhost['domain_id'] = null; |
84 | 84 |
$vhost['domain'] = null; |
85 |
- |
|
85 |
+ |
|
86 | 86 |
$vhost['homedir'] = $_SESSION['userinfo']['homedir']; |
87 | 87 |
$vhost['docroot'] = null; |
88 | 88 |
$vhost['php'] = 'fpm72'; |
... | ... |
@@ -97,7 +97,7 @@ function empty_vhost() |
97 | 97 |
$vhost['is_svn'] = 0; |
98 | 98 |
$vhost['is_webapp'] = 0; |
99 | 99 |
$vhost['webapp_id'] = null; |
100 |
- |
|
100 |
+ |
|
101 | 101 |
$vhost['cert'] = null; |
102 | 102 |
$vhost['certid'] = null; |
103 | 103 |
$vhost['ipv4'] = null; |
... | ... |
@@ -112,10 +112,10 @@ function empty_vhost() |
112 | 112 |
function empty_alias() |
113 | 113 |
{ |
114 | 114 |
$alias['hostname'] = null; |
115 |
- |
|
115 |
+ |
|
116 | 116 |
$alias['domain_id'] = -1; |
117 | 117 |
$alias['domain'] = $_SESSION['userinfo']['username'].'.'.config('masterdomain'); |
118 |
- |
|
118 |
+ |
|
119 | 119 |
$alias['options'] = null; |
120 | 120 |
return $alias; |
121 | 121 |
} |
... | ... |
@@ -492,13 +492,13 @@ function get_alias_details($id) |
492 | 492 |
$id = (int) $id; |
493 | 493 |
$uid = (int) $_SESSION['userinfo']['uid']; |
494 | 494 |
$result = db_query("SELECT * FROM vhosts.v_alias WHERE id=?", array($id)); |
495 |
- |
|
495 |
+ |
|
496 | 496 |
if ($result->rowCount() != 1) { |
497 | 497 |
system_failure('Interner Fehler beim Auslesen der Alias-Daten'); |
498 | 498 |
} |
499 |
- |
|
499 |
+ |
|
500 | 500 |
$alias = $result->fetch(); |
501 |
- |
|
501 |
+ |
|
502 | 502 |
if ($alias['domain_id'] == null) { |
503 | 503 |
$alias['domain_id'] = -1; |
504 | 504 |
} |
... | ... |
@@ -21,7 +21,7 @@ $role = $_SESSION['role']; |
21 | 21 |
if ($role & ROLE_SYSTEMUSER) { |
22 | 22 |
$menu["vhosts_vhosts"] = array("label" => "Websites", "file" => "vhosts", "weight" => 2); |
23 | 23 |
$menu["vhosts_stats"] = array("label" => "Zugriffs-Statistiken", "file" => "stats", "weight" => 12, "submenu" => "vhosts_vhosts"); |
24 |
- |
|
24 |
+ |
|
25 | 25 |
if (user_has_manual_certs() or ($section == 'vhosts_certs')) { |
26 | 26 |
$menu["vhosts_certs"] = array("label" => "TLS-Zertifikate", "file" => "certs", "weight" => 10, "submenu" => "vhosts_vhosts"); |
27 | 27 |
} |
... | ... |
@@ -72,7 +72,7 @@ if ($_GET['action'] == 'edit') { |
72 | 72 |
$docroot = ''; |
73 | 73 |
if ($_POST['vhost_type'] == 'regular' || $_POST['vhost_type'] == 'dav') { |
74 | 74 |
$defaultdocroot = $vhost['homedir'].'/websites/'.((strlen($hostname) > 0) ? $hostname.'.' : '').($domainname).'/htdocs'; |
75 |
- |
|
75 |
+ |
|
76 | 76 |
$docroot = ''; |
77 | 77 |
if (isset($_POST['docroot'])) { |
78 | 78 |
if (! check_path($_POST['docroot'])) { |
... | ... |
@@ -83,7 +83,7 @@ if ($_GET['action'] == 'edit') { |
83 | 83 |
if ((isset($_POST['use_default_docroot']) && $_POST['use_default_docroot'] == '1') || ($docroot == $defaultdocroot)) { |
84 | 84 |
$docroot = null; |
85 | 85 |
} |
86 |
- |
|
86 |
+ |
|
87 | 87 |
DEBUG("Document-Root: ".$docroot); |
88 | 88 |
} |
89 | 89 |
$php = null; |
... | ... |
@@ -136,7 +136,7 @@ if ($_GET['action'] == 'edit') { |
136 | 136 |
$vhost['webapp_id'] = (int) $_POST['webapp']; |
137 | 137 |
} |
138 | 138 |
|
139 |
- |
|
139 |
+ |
|
140 | 140 |
$ssl = null; |
141 | 141 |
switch ($_POST['ssl']) { |
142 | 142 |
case 'http': |
... | ... |
@@ -167,7 +167,7 @@ if ($_GET['action'] == 'edit') { |
167 | 167 |
} |
168 | 168 |
} |
169 | 169 |
} |
170 |
- |
|
170 |
+ |
|
171 | 171 |
$cert = (isset($_POST['cert']) ? (int) $_POST['cert'] : null); |
172 | 172 |
|
173 | 173 |
$ipv4 = (isset($_POST['ipv4']) ? $_POST['ipv4'] : null); |
... | ... |
@@ -180,7 +180,7 @@ if ($_GET['action'] == 'edit') { |
180 | 180 |
} else { |
181 | 181 |
$vhost['autoipv6'] = 0; |
182 | 182 |
} |
183 |
- |
|
183 |
+ |
|
184 | 184 |
|
185 | 185 |
$logtype = ''; |
186 | 186 |
switch ($_POST['logtype']) { |
... | ... |
@@ -210,7 +210,7 @@ if ($_GET['action'] == 'edit') { |
210 | 210 |
if ($logtype == '') { |
211 | 211 |
$vhost['stats'] = null; |
212 | 212 |
} |
213 |
- |
|
213 |
+ |
|
214 | 214 |
DEBUG("PHP: {$php} / Logging: {$logtype}"); |
215 | 215 |
|
216 | 216 |
$old_options = explode(',', $vhost['options']); |
... | ... |
@@ -273,7 +273,7 @@ if ($_GET['action'] == 'edit') { |
273 | 273 |
$vhost['logtype'] = $logtype; |
274 | 274 |
$vhost['errorlog'] = $errorlog; |
275 | 275 |
$vhost['options'] = $options; |
276 |
- |
|
276 |
+ |
|
277 | 277 |
DEBUG($vhost); |
278 | 278 |
save_vhost($vhost); |
279 | 279 |
success_msg("Ihre Einstellungen wurden gespeichert. Es dauert jedoch einige Minuten bis die Änderungen wirksam werden."); |
... | ... |
@@ -290,7 +290,7 @@ if ($_GET['action'] == 'edit') { |
290 | 290 |
$alias = empty_alias(); |
291 | 291 |
$alias['vhost'] = $vhost['id']; |
292 | 292 |
|
293 |
- |
|
293 |
+ |
|
294 | 294 |
$hostname = filter_input_hostname($_POST['hostname'], true); |
295 | 295 |
$domainid = (int) $_POST['domain']; |
296 | 296 |
if ($domainid >= 0) { |
... | ... |
@@ -326,9 +326,9 @@ if ($_GET['action'] == 'edit') { |
326 | 326 |
|
327 | 327 |
$alias['hostname'] = $hostname; |
328 | 328 |
$alias['domain_id'] = $domainid; |
329 |
- |
|
329 |
+ |
|
330 | 330 |
$alias ['options'] = $options; |
331 |
- |
|
331 |
+ |
|
332 | 332 |
save_alias($alias); |
333 | 333 |
|
334 | 334 |
if (! $debugmode) { |
... | ... |
@@ -337,15 +337,15 @@ if ($_GET['action'] == 'edit') { |
337 | 337 |
} elseif ($_GET['action'] == 'deletealias') { |
338 | 338 |
$title = "Subdomain löschen"; |
339 | 339 |
$section = 'vhosts_vhosts'; |
340 |
- |
|
340 |
+ |
|
341 | 341 |
$alias = get_alias_details((int) $_GET['alias']); |
342 | 342 |
DEBUG($alias); |
343 | 343 |
$alias_string = $alias['fqdn']; |
344 |
- |
|
344 |
+ |
|
345 | 345 |
$vhost = get_vhost_details($alias['vhost']); |
346 | 346 |
DEBUG($vhost); |
347 | 347 |
$vhost_string = $vhost['fqdn']; |
348 |
- |
|
348 |
+ |
|
349 | 349 |
$sure = user_is_sure(); |
350 | 350 |
if ($sure === null) { |
351 | 351 |
are_you_sure("action=deletealias&alias={$_GET['alias']}", "Möchten Sie das Alias »{$alias_string}« für die Subdomain »{$vhost_string}« wirklich löschen?"); |
... | ... |
@@ -362,10 +362,10 @@ if ($_GET['action'] == 'edit') { |
362 | 362 |
} elseif ($_GET['action'] == 'delete') { |
363 | 363 |
$title = "Subdomain löschen"; |
364 | 364 |
$section = 'vhosts_vhosts'; |
365 |
- |
|
365 |
+ |
|
366 | 366 |
$vhost = get_vhost_details((int) $_GET['vhost']); |
367 | 367 |
$vhost_string = $vhost['fqdn']; |
368 |
- |
|
368 |
+ |
|
369 | 369 |
$sure = user_is_sure(); |
370 | 370 |
if ($sure === null) { |
371 | 371 |
are_you_sure("action=delete&vhost={$_GET['vhost']}", "Möchten Sie die Subdomain »{$vhost_string}« wirklich löschen?"); |
... | ... |
@@ -43,7 +43,7 @@ if ($mode == 'csr') { |
43 | 43 |
<textarea cols=\"70\" rows=\"20\"> |
44 | 44 |
{$cert} |
45 | 45 |
</textarea>"); |
46 |
- |
|
46 |
+ |
|
47 | 47 |
if (isset($_REQUEST['private']) && $_REQUEST['private'] == 'yes') { |
48 | 48 |
output("<h4>privater Schlüssel</h4> |
49 | 49 |
<textarea cols=\"70\" rows=\"20\"> |
... | ... |
@@ -71,7 +71,7 @@ if ($mode == 'csr') { |
71 | 71 |
<textarea cols=\"70\" rows=\"20\"> |
72 | 72 |
{$cert} |
73 | 73 |
</textarea>"); |
74 |
- |
|
74 |
+ |
|
75 | 75 |
if (isset($_REQUEST['private']) && $_REQUEST['private'] == 'yes') { |
76 | 76 |
output("<h4>privater Schlüssel</h4> |
77 | 77 |
<textarea cols=\"70\" rows=\"20\"> |
... | ... |
@@ -42,7 +42,7 @@ if (is_file($file)) { |
42 | 42 |
header("Content-Type: image/png"); |
43 | 43 |
header("Content-Length: " . filesize($file)); |
44 | 44 |
header("Content-Transfer-Encoding: binary\n"); |
45 |
- |
|
45 |
+ |
|
46 | 46 |
$fp = fopen($file, "r"); |
47 | 47 |
fpassthru($fp); |
48 | 48 |
die(); |
... | ... |
@@ -73,7 +73,7 @@ if (is_file($file)) { |
73 | 73 |
$html = preg_replace('/=([-0-9a-zA-Z]+)([ >])/', '="$1"$2', $html); |
74 | 74 |
// Bilder rewriten |
75 | 75 |
$html = preg_replace('_<img ([^>]+[^/])>_', '<img $1 />', $html); |
76 |
- |
|
76 |
+ |
|
77 | 77 |
// Bilder rewriten |
78 | 78 |
$html = preg_replace('/src="((daily_|hourly_|ctry_)?usage(_[0-9]+)?\.png)"/', 'src="showstats?vhost='.$vhost['id'].'&file=$1"', $html); |
79 | 79 |
// Interne Links rewriten |
... | ... |
@@ -67,7 +67,7 @@ if (isset($_REQUEST['vhost'])) { |
67 | 67 |
} else { |
68 | 68 |
output("<td>".icon_disabled("Diese Statistiken können nur hier im Webinterface betrachtet werden.")."</td>"); |
69 | 69 |
} |
70 |
- |
|
70 |
+ |
|
71 | 71 |
output("<td>"); |
72 | 72 |
if ($v['stats'] == 'public') { |
73 | 73 |
output(internal_link("", other_icon("lock.png", "Statistiken nicht mehr öffentlich anzeigen"), "vhost={$v['id']}&public=0")); |
... | ... |
@@ -111,7 +111,7 @@ if (count($vhosts) > 0) { |
111 | 111 |
} |
112 | 112 |
$stats = $vhost['stats'] ? internal_link("showstats", other_icon("chart_bar.png", "Statistiken anzeigen"), "vhost={$vhost['id']}").' ' : ''; |
113 | 113 |
output("<td>{$stats}{$logfiles}</td>"); |
114 |
- |
|
114 |
+ |
|
115 | 115 |
if ($vhost['ssl'] == 'http') { |
116 | 116 |
output("<td>".icon_disabled('HTTPS ausgeschaltet')."</td>"); |
117 | 117 |
} elseif (strstr($vhost['options'], "letsencrypt") && $vhost['cert']) { |
... | ... |
@@ -33,7 +33,7 @@ function validate_data($post) |
33 | 33 |
$dbdata = create_webapp_mysqldb('drupal6', $post['sitename']); |
34 | 34 |
|
35 | 35 |
$passwordhash = md5($post['adminpassword']); |
36 |
- |
|
36 |
+ |
|
37 | 37 |
$data = "adminuser={$post['adminuser']} |
38 | 38 |
adminpassword={$passwordhash} |
39 | 39 |
adminemail={$post['adminemail']} |
... | ... |
@@ -36,7 +36,7 @@ function validate_data($post) |
36 | 36 |
|
37 | 37 |
$salt = random_string(8); |
38 | 38 |
$salthash = ':B:' . $salt . ':' . md5($salt . '-' . md5($post['adminpassword'])); |
39 |
- |
|
39 |
+ |
|
40 | 40 |
$data = "adminuser={$adminuser} |
41 | 41 |
adminpassword={$salthash} |
42 | 42 |
adminemail={$post['adminemail']} |
... | ... |
@@ -104,13 +104,13 @@ function create_webapp_mysqldb($application, $sitename) |
104 | 104 |
{ |
105 | 105 |
// dependet auf das mysql-modul |
106 | 106 |
require_once('modules/mysql/include/mysql.php'); |
107 |
- |
|
107 |
+ |
|
108 | 108 |
$username = $_SESSION['userinfo']['username']; |
109 | 109 |
$description = "Automatisch erzeugte Datenbank für {$application} ({$sitename})"; |
110 |
- |
|
110 |
+ |
|
111 | 111 |
// zuerst versuchen wir username_webappname. Wenn das nicht klappt, dann wird hochgezählt |
112 | 112 |
$handle = $username.'_'.$application; |
113 |
- |
|
113 |
+ |
|
114 | 114 |
if (validate_mysql_username($handle) && validate_mysql_dbname($handle) && ! (has_mysql_user($handle) || has_mysql_database($handle))) { |
115 | 115 |
logger(LOG_INFO, "webapps/include/webapp-installer", "create", "creating db and user »{$handle}«"); |
116 | 116 |
create_mysql_database($handle, $description); |
... | ... |
@@ -34,7 +34,7 @@ if (! $docroot) { |
34 | 34 |
if (isset($_POST['submit'])) { |
35 | 35 |
require_once('install-drupal6.php'); |
36 | 36 |
require_once('webapp-installer.php'); |
37 |
- |
|
37 |
+ |
|
38 | 38 |
check_form_token('install_drupal6'); |
39 | 39 |
|
40 | 40 |
$data = validate_data($_POST); |
... | ... |
@@ -42,14 +42,14 @@ if (isset($_POST['submit'])) { |
42 | 42 |
system_failure('wtf?!'); |
43 | 43 |
} |
44 | 44 |
create_new_webapp('drupal6', $docroot, $url, $data); |
45 |
- |
|
45 |
+ |
|
46 | 46 |
title("Drupal wird installiert"); |
47 | 47 |
output('<p>Ihr Drupal wird jetzt installiert. Sie erhalten eine E-Mail, sobald die Website betriebsbereit ist.</p> |
48 | 48 |
'); |
49 | 49 |
} else { |
50 | 50 |
require_once('modules/vhosts/include/vhosts.php'); |
51 | 51 |
$vhosts = list_vhosts(); |
52 |
- |
|
52 |
+ |
|
53 | 53 |
output('<p>Die Einrichtung von Drupal erfordert die Angabe ein paar weniger Daten.</p>'); |
54 | 54 |
|
55 | 55 |
$form = ' |