bernd commited on 2009-08-29 17:08:03
Zeige 29 geänderte Dateien mit 147 Einfügungen und 36 Löschungen.
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1445 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -100,8 +100,8 @@ function get_domain_list($customerno, $uid = NULL) |
100 | 100 |
$domains = array(); |
101 | 101 |
DEBUG('Result set is '.mysql_num_rows($result)." rows.<br />\n"); |
102 | 102 |
if (mysql_num_rows($result) > 0) |
103 |
- while ($domain = mysql_fetch_object($result)->id) |
|
104 |
- array_push($domains, new Domain((int) $domain)); |
|
103 |
+ while ($domain = mysql_fetch_object($result)) |
|
104 |
+ array_push($domains, new Domain((int) $domain->id)); |
|
105 | 105 |
DEBUG($domains); |
106 | 106 |
return $domains; |
107 | 107 |
} |
... | ... |
@@ -0,0 +1,64 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+require_once('inc/base.php'); |
|
4 |
+ |
|
5 |
+function icon_warning($title = '') |
|
6 |
+{ |
|
7 |
+ global $prefix; |
|
8 |
+ return "<img src=\"{$prefix}images/warning.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\" />"; |
|
9 |
+} |
|
10 |
+ |
|
11 |
+ |
|
12 |
+ |
|
13 |
+function icon_enabled($title = '') |
|
14 |
+{ |
|
15 |
+ global $prefix; |
|
16 |
+ return "<img src=\"{$prefix}images/ok.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\" />"; |
|
17 |
+} |
|
18 |
+ |
|
19 |
+ |
|
20 |
+function icon_disabled($title = '') |
|
21 |
+{ |
|
22 |
+ global $prefix; |
|
23 |
+ return ""; |
|
24 |
+ //return "<img src=\"{$prefix}images/disabled.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\" />"; |
|
25 |
+} |
|
26 |
+ |
|
27 |
+ |
|
28 |
+function icon_ok($title = '') |
|
29 |
+{ |
|
30 |
+ global $prefix; |
|
31 |
+ return "<img src=\"{$prefix}images/ok.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\" />"; |
|
32 |
+} |
|
33 |
+ |
|
34 |
+ |
|
35 |
+ |
|
36 |
+function icon_error($title = '') |
|
37 |
+{ |
|
38 |
+ global $prefix; |
|
39 |
+ return "<img src=\"{$prefix}images/error.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\" />"; |
|
40 |
+} |
|
41 |
+ |
|
42 |
+function icon_pwchange($title = '') |
|
43 |
+{ |
|
44 |
+ global $prefix; |
|
45 |
+ return "<img src=\"{$prefix}images/pwchange.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\" />"; |
|
46 |
+} |
|
47 |
+ |
|
48 |
+ |
|
49 |
+function icon_add($title = '') |
|
50 |
+{ |
|
51 |
+ global $prefix; |
|
52 |
+ return "<img src=\"{$prefix}images/add.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\" />"; |
|
53 |
+} |
|
54 |
+ |
|
55 |
+ |
|
56 |
+ |
|
57 |
+function icon_delete($title = '') |
|
58 |
+{ |
|
59 |
+ global $prefix; |
|
60 |
+ return "<img src=\"{$prefix}images/delete.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\" />"; |
|
61 |
+} |
|
62 |
+ |
|
63 |
+ |
|
64 |
+ |
... | ... |
@@ -6,7 +6,7 @@ if (! defined("TOP_INCLUDED")) |
6 | 6 |
define("TOP_INCLUDED", true); |
7 | 7 |
|
8 | 8 |
require_once("inc/error.php"); |
9 |
-global $prefix; |
|
9 |
+global $prefix, $section; |
|
10 | 10 |
|
11 | 11 |
$menuitem = array(); |
12 | 12 |
$weighted_menuitem = array(); |
... | ... |
@@ -68,7 +68,7 @@ header("Content-Type: ".config('mime_type')); |
68 | 68 |
<head> |
69 | 69 |
|
70 | 70 |
<?php |
71 |
-if ($title != "") |
|
71 |
+if (isset($title) and ($title != "")) |
|
72 | 72 |
echo '<title>Administration - '.$title.'</title>'; |
73 | 73 |
else |
74 | 74 |
echo '<title>Administration</title>'; |
... | ... |
@@ -77,6 +77,7 @@ echo ' |
77 | 77 |
<link rel="stylesheet" href="'.$prefix.'css/admin.css" type="text/css" media="screen" title="Normal" /> |
78 | 78 |
<link rel="shortcut icon" href="'.$prefix.'favicon.ico" type="image/x-icon" />'; |
79 | 79 |
|
80 |
+if (isset($html_header)) |
|
80 | 81 |
echo $html_header; |
81 | 82 |
?> |
82 | 83 |
</head> |
... | ... |
@@ -9,8 +9,8 @@ $title = "E-Mail-Adresse bearbeiten"; |
9 | 9 |
$section = 'email_vmail'; |
10 | 10 |
require_role(ROLE_SYSTEMUSER); |
11 | 11 |
|
12 |
-$id = (int) $_GET['id']; |
|
13 | 12 |
$account = empty_account(); |
13 |
+$id = (isset($_GET['id']) ? (int) $_GET['id'] : 0); |
|
14 | 14 |
|
15 | 15 |
if ($id != 0) |
16 | 16 |
$account = get_account_details($id); |
... | ... |
@@ -119,7 +119,7 @@ else |
119 | 119 |
$form .= '</div>'; |
120 | 120 |
|
121 | 121 |
$form .= '<p style="margin-left: 2em;">[ <a href="#" onclick="moreForward();">mehr Empfänger</a> ]</p> |
122 |
- <p><input type="submit" value="Speichern" />    '.internal_link('accounts', 'Abbrechen').'</p>'; |
|
122 |
+ <p><input type="submit" value="Speichern" />    '.internal_link('vmail', 'Abbrechen').'</p>'; |
|
123 | 123 |
|
124 | 124 |
output(html_form('vmail_edit_mailbox', 'save', 'action=edit'.($id != 0 ? '&id='.$id : ''), $form)); |
125 | 125 |
|
... | ... |
@@ -5,6 +5,8 @@ require_once('session/start.php'); |
5 | 5 |
require_once('class/domain.php'); |
6 | 6 |
require_once('mailaccounts.php'); |
7 | 7 |
|
8 |
+require_once('inc/icons.php'); |
|
9 |
+ |
|
8 | 10 |
require_role(ROLE_SYSTEMUSER); |
9 | 11 |
|
10 | 12 |
|
... | ... |
@@ -206,7 +208,7 @@ else |
206 | 208 |
<td>'.internal_link('imap', $account['account'], 'edit='.$account['id']).'</td> |
207 | 209 |
<td>'.$mailbox.'</td> |
208 | 210 |
<td><b>'.($account['enabled'] ? 'Ja' : 'Nein').'</b></td> |
209 |
- <td>'.internal_link("imap", "löschen", "action=delete&account=".$account['id']).'</td></tr>'); |
|
211 |
+ <td>'.internal_link("imap", icon_delete("»{$account['account']}« löschen"), "action=delete&account=".$account['id']).'</td></tr>'); |
|
210 | 212 |
} |
211 | 213 |
output('</table>'); |
212 | 214 |
if (imap_on_vmail_domain()) |
... | ... |
@@ -6,6 +6,7 @@ require_once('class/domain.php'); |
6 | 6 |
require_once('jabberaccounts.php'); |
7 | 7 |
|
8 | 8 |
require_once('inc/security.php'); |
9 |
+require_once('inc/icons.php'); |
|
9 | 10 |
|
10 | 11 |
require_role(ROLE_CUSTOMER); |
11 | 12 |
|
... | ... |
@@ -26,7 +27,7 @@ foreach ($jabberaccounts as $acc) |
26 | 27 |
$domain = new Domain(); |
27 | 28 |
$domain->fqdn = config('masterdomain'); |
28 | 29 |
} |
29 |
- output("<tr><td>{$local}@{$domain->fqdn}</td><td>".internal_link('chpass', 'Passwort ändern', 'account='.$acc['id'])."   ".internal_link('save', 'Löschen', 'action=delete&account='.$acc['id']).'</td></tr>'); |
|
30 |
+ output("<tr><td>{$local}@{$domain->fqdn}</td><td>".internal_link('chpass', icon_pwchange('Passwort ändern'), 'account='.$acc['id'])."   ".internal_link('save', icon_delete("»{$local}@{$domain->fqdn}« löschen"), 'action=delete&account='.$acc['id']).'</td></tr>'); |
|
30 | 31 |
} |
31 | 32 |
|
32 | 33 |
output('</table>'); |
... | ... |
@@ -1,6 +1,7 @@ |
1 | 1 |
<?php |
2 | 2 |
|
3 | 3 |
require_once('session/start.php'); |
4 |
+require_once('inc/icons.php'); |
|
4 | 5 |
require_role(array(ROLE_SYSTEMUSER)); |
5 | 6 |
|
6 | 7 |
global $prefix; |
... | ... |
@@ -135,9 +136,9 @@ if ($output_something) |
135 | 136 |
foreach ($users as $user) |
136 | 137 |
{ |
137 | 138 |
$desc = ($user['description'] ? $user['description'].' (Erstellt: '.$user['created'].')' : 'Erstellt: '.$user['created']); |
138 |
- $form .= "<th><span title=\"{$desc}\">{$user['username']}</span><br />".internal_link("", "<img src=\"{$prefix}images/delete.png\" title=\"Benutzer »{$user['username']}« löschen\" alt=\"löschen\" />", "action=delete_user&user={$user['username']}")."</th>"; |
|
139 |
+ $form .= "<th><span title=\"{$desc}\">{$user['username']}</span><br />".internal_link("", icon_delete("Benutzer »{$user['username']}« löschen"), "action=delete_user&user={$user['username']}")."</th>"; |
|
139 | 140 |
} |
140 |
- $form .= '<th><input type="text" name="new_user" size="10" value="" /></th></tr> |
|
141 |
+ $form .= '<th><input type="text" name="new_user" size="10" value="" /><br />'.icon_add().'</th></tr> |
|
141 | 142 |
'; |
142 | 143 |
|
143 | 144 |
array_push($users, array('username' => "new", 'description' => NULL)); |
... | ... |
@@ -145,14 +146,14 @@ if ($output_something) |
145 | 146 |
foreach($dbs as $db) |
146 | 147 |
{ |
147 | 148 |
$desc = ($db['description'] ? $db['description'].' (Erstellt: '.$db['created'].')' : 'Erstellt: '.$db['created']); |
148 |
- $form .= "<tr><td style=\"border: 0px; font-weight: bold; text-align: right;\"><span title=\"{$desc}\">{$db['name']}</span> ".internal_link("", "<img src=\"{$prefix}images/delete.png\" title=\"Datenbank »{$db['name']}« löschen\" alt=\"löschen\" />", "action=delete_db&db={$db['name']}")."</td>"; |
|
149 |
+ $form .= "<tr><td style=\"border: 0px; font-weight: bold; text-align: right;\"><span title=\"{$desc}\">{$db['name']}</span> ".internal_link("", icon_delete("Datenbank »{$db['name']}« löschen"), "action=delete_db&db={$db['name']}")."</td>"; |
|
149 | 150 |
foreach ($users as $user) |
150 | 151 |
$form .= '<td style="text-align: center;"><input type="checkbox" id="'.$db['name'].'_'.$user['username'].'" name="access['.$db['name'].'][]" value="'.$user['username'].'" '.(get_mysql_access($db['name'], $user['username']) ? 'checked="checked" ' : '')." /></td>"; |
151 | 152 |
$form .= "</tr>\n"; |
152 | 153 |
} |
153 | 154 |
|
154 | 155 |
$form .= ' |
155 |
- <tr><td style="border: 0px; font-weight: bold; text-align: right;"><input type="text" name="new_db" size="15" value="" /></td>'; |
|
156 |
+ <tr><td style="border: 0px; font-weight: bold; text-align: right;"><input type="text" name="new_db" size="15" value="" />'.icon_add().'</td>'; |
|
156 | 157 |
foreach ($users as $user) |
157 | 158 |
$form .= '<td style="text-align: center;"><input type="checkbox" id="new_'.$user['username'].'" name="access[new][]" value="'.$user['username'].'" /></td>'; |
158 | 159 |
$form .= '</tr> |
... | ... |
@@ -113,7 +113,7 @@ function save_cert($info, $cert, $key) |
113 | 113 |
} |
114 | 114 |
|
115 | 115 |
|
116 |
-function refresh_cert($id, $info, $cert) |
|
116 |
+function refresh_cert($id, $info, $cert, $key = NULL) |
|
117 | 117 |
{ |
118 | 118 |
$id = (int) $id; |
119 | 119 |
$oldcert = cert_details($id); |
... | ... |
@@ -122,7 +122,10 @@ function refresh_cert($id, $info, $cert) |
122 | 122 |
$valid_from = mysql_real_escape_string($info['valid_from']); |
123 | 123 |
$valid_until = mysql_real_escape_string($info['valid_until']); |
124 | 124 |
|
125 |
- db_query("UPDATE vhosts.certs SET cert='{$cert}', valid_from='{$valid_from}', valid_until='{$valid_until}' WHERE id={$id} LIMIT 1"); |
|
125 |
+ $keyop = ''; |
|
126 |
+ if ($key) |
|
127 |
+ $keyop = ", `key`='".mysql_real_escape_string($key)."'"; |
|
128 |
+ db_query("UPDATE vhosts.certs SET cert='{$cert}'{$keyop}, valid_from='{$valid_from}', valid_until='{$valid_until}' WHERE id={$id} LIMIT 1"); |
|
126 | 129 |
} |
127 | 130 |
|
128 | 131 |
|
... | ... |
@@ -3,6 +3,19 @@ |
3 | 3 |
include_once('certs.php'); |
4 | 4 |
require_role(ROLE_SYSTEMUSER); |
5 | 5 |
|
6 |
+$hint = ''; |
|
7 |
+$oldcert = NULL; |
|
8 |
+if (isset($_REQUEST['replace'])) |
|
9 |
+{ |
|
10 |
+ $cert = cert_details($_REQUEST['replace']); |
|
11 |
+ $oldcert = $cert['id']; |
|
12 |
+ $hint = "<p class=\"warning\"><strong>Hinweis:</strong> Dieses Zertifkkat soll als Ersatz für ein bestehendes Zertifikat eingetragen werden. Dabei wird jede Benutzung des alten Zertifikats durch das neue ersetzt. Das alte Zertifikat wird dann umgehend gelöscht.<p> |
|
13 |
+ |
|
14 |
+<p><strong>Daten des alten Zertifikats:</strong></p> |
|
15 |
+<p><strong>CN:</strong> {$cert['cn']}<br /><strong>Gültigkeit:</strong> {$cert['valid_from']} - {$cert['valid_until']}</p>"; |
|
16 |
+ |
|
17 |
+} |
|
18 |
+ |
|
6 | 19 |
$section = 'vhosts_certs'; |
7 | 20 |
|
8 | 21 |
$title = 'Neues Server-Zertifikat hinzufügen'; |
... | ... |
@@ -14,7 +27,8 @@ output('<h3>Neues Server-Zertifikat hinzufügen</h3> |
14 | 27 |
<pre>-----BEGIN CERTIFICATE----- |
15 | 28 |
... |
16 | 29 |
-----END CERTIFICATE-----</pre> |
17 |
-<p>aufweisen. Sind die genannten Vorausetzungen erfüllt, können Sie Ihre Zertifikats-Daten einfach in untenstehendes Formular eingeben.</p>'); |
|
30 |
+<p>aufweisen. Sind die genannten Vorausetzungen erfüllt, können Sie Ihre Zertifikats-Daten einfach in untenstehendes Formular eingeben.</p> |
|
31 |
+'.$hint); |
|
18 | 32 |
|
19 | 33 |
|
20 | 34 |
$form = ' |
... | ... |
@@ -28,4 +42,4 @@ $form = ' |
28 | 42 |
|
29 | 43 |
'; |
30 | 44 |
|
31 |
-output(html_form('vhosts_certs_new', 'savecert', 'action=new', $form)); |
|
45 |
+output(html_form('vhosts_certs_new', 'savecert', 'action=new&replace='.$oldcert, $form)); |
... | ... |
@@ -12,13 +12,19 @@ $cert = cert_details($_REQUEST['id']); |
12 | 12 |
output("<h3>Neue Version eines Zertifikats einspielen</h3> |
13 | 13 |
<p>Ein bereits vorhandenes Zetifikat können Sie (z.B. wenn es bald abläuft) durch eine neue Version des selben |
14 | 14 |
Zertifikats ersetzen. Die meisten Zertifizierungsstellen bieten diese Funktion an ohne dass ein neuer CSR erzeugt |
15 |
-werden muss.</p> |
|
15 |
+werden muss. Der private Schlüssel wird dabei erhalten und kann unverändert weiter benutzt werden.</p> |
|
16 | 16 |
|
17 | 17 |
<p>Bitte stellen Sie sicher, dass es sich um das richtige Zertifikat handelt. Das bisherige Zertifikat wurde |
18 | 18 |
ausgestellt als <strong>{$cert['subject']}</strong>. Nur das dazu passende Zertifikat wird akzeptiert.</p> |
19 | 19 |
|
20 | 20 |
<p>Wenn die Überprüfung erfolgreich verläuft, wird das alte Zertifikat in unserer Datenbank durch die neue |
21 |
-Version ersetzt. Der private Schlüssel bleibt erhalten."); |
|
21 |
+Version ersetzt. Der private Schlüssel bleibt erhalten.</p> |
|
22 |
+ |
|
23 |
+<p>Möchten Sie das Zertifikat durch ein gänzlich neues Zertifikat mit neuem privaten Schlüssel ersetzen, so |
|
24 |
+folgen Sie bitte diesem Link: ".internal_link('newcert', 'Neues Zertifikat als Ersatz für dieses Zertifikat |
|
25 |
+hochladen', 'replace='.$cert['id'])."</p> |
|
26 |
+ |
|
27 |
+"); |
|
22 | 28 |
|
23 | 29 |
$form = ' |
24 | 30 |
<h4>neues Zertifikat:</h4> |
... | ... |
@@ -31,7 +31,7 @@ if ($_GET['action'] == 'edit') |
31 | 31 |
$domainid = $domain->id; |
32 | 32 |
} |
33 | 33 |
|
34 |
- if (! is_array($_POST['options'])) |
|
34 |
+ if (! (isset($_POST['options']) && is_array($_POST['options']))) |
|
35 | 35 |
$_POST['options'] = array(); |
36 | 36 |
$aliaswww = in_array('aliaswww', $_POST['options']); |
37 | 37 |
|
... | ... |
@@ -41,18 +41,21 @@ if ($_GET['action'] == 'edit') |
41 | 41 |
{ |
42 | 42 |
$defaultdocroot = $vhost['homedir'].'/websites/'.((strlen($hostname) > 0) ? $hostname.'.' : '').($domain->fqdn).'/htdocs'; |
43 | 43 |
|
44 |
+ $docroot = ''; |
|
45 |
+ if (isset($_POST['docroot'])) |
|
46 |
+ { |
|
44 | 47 |
if (! check_path( $_POST['docroot'] )) |
45 | 48 |
system_failure("Eingegebener Pfad enthält ungültige Angaben"); |
46 | 49 |
$docroot = $vhost['homedir'].'/websites/'.$_POST['docroot']; |
47 |
- |
|
48 |
- if (($_POST['use_default_docroot'] == '1') || ($docroot == $defaultdocroot)) { |
|
50 |
+ } |
|
51 |
+ if ((isset($_POST['use_default_docroot']) && $_POST['use_default_docroot'] == '1') || ($docroot == $defaultdocroot)) { |
|
49 | 52 |
$docroot = ''; |
50 | 53 |
} |
51 | 54 |
|
52 | 55 |
DEBUG("Document-Root: ".$docroot); |
53 | 56 |
} |
54 | 57 |
$php = ''; |
55 |
- if ($_POST['vhost_type'] == 'regular') |
|
58 |
+ if ($_POST['vhost_type'] == 'regular' && isset($_POST['php'])) |
|
56 | 59 |
{ |
57 | 60 |
switch ($_POST['php']) { |
58 | 61 |
case 'mod_php': |
... | ... |
@@ -15,6 +15,11 @@ if ($_GET['action'] == 'new') |
15 | 15 |
$csr = csr_details($_REQUEST['csr']); |
16 | 16 |
$key = $csr['key']; |
17 | 17 |
} |
18 |
+ $oldcert = NULL; |
|
19 |
+ if ($_REQUEST['replace']) |
|
20 |
+ { |
|
21 |
+ $oldcert = cert_details($_REQUEST['replace']); |
|
22 |
+ } |
|
18 | 23 |
|
19 | 24 |
if (! $cert or ! $key) |
20 | 25 |
system_failure('Es muss ein Zertifikat und der dazu passende private Schlüssel eingetragen werden'); |
... | ... |
@@ -24,6 +29,9 @@ if ($_GET['action'] == 'new') |
24 | 29 |
{ |
25 | 30 |
case CERT_OK: |
26 | 31 |
$certinfo = parse_cert_details($cert); |
32 |
+ if ($oldcert) |
|
33 |
+ refresh_cert($oldcert['id'], $certinfo, $cert, $key); |
|
34 |
+ else |
|
27 | 35 |
save_cert($certinfo, $cert, $key); |
28 | 36 |
if (isset($_REQUEST['csr'])) |
29 | 37 |
delete_csr($_REQUEST['csr']); |
... | ... |
@@ -36,7 +44,10 @@ if ($_GET['action'] == 'new') |
36 | 44 |
case CERT_NOCHAIN: |
37 | 45 |
warning('Ihr Zertifikat konnte nicht mit einer Zertifikats-Kette validiert werden. Dies wird zu Problemen beim Betrachten der damit betriebenen Websites führen. Meist liegt dies an einem nicht hinterlegten CA-Bundle. Die Admins können Ihr Zertifikats-Bundle auf dem System eintragen. Das Zertifikat wurde dennoch gespeichert.'); |
38 | 46 |
$certinfo = parse_cert_details($cert); |
39 |
- save_cert($certinfo, $cert, $key, $cabundle); |
|
47 |
+ if ($oldcert) |
|
48 |
+ refresh_cert($oldcert['id'], $certinfo, $cert, $key); |
|
49 |
+ else |
|
50 |
+ save_cert($certinfo, $cert, $key); |
|
40 | 51 |
output('<p>'.internal_link('certs', 'Zurück zur Übersicht').'</p>'); |
41 | 52 |
if (isset($_REQUEST['csr'])) |
42 | 53 |
delete_csr($_REQUEST['csr']); |
... | ... |
@@ -1,6 +1,7 @@ |
1 | 1 |
<?php |
2 | 2 |
require_once('inc/debug.php'); |
3 | 3 |
require_once('inc/security.php'); |
4 |
+require_once('inc/icons.php'); |
|
4 | 5 |
|
5 | 6 |
require_once('vhosts.php'); |
6 | 7 |
|
... | ... |
@@ -31,7 +32,7 @@ if (count($vhosts) > 0) |
31 | 32 |
$fqdn = $vhost['fqdn']; |
32 | 33 |
$class = 'odd'; |
33 | 34 |
if ($even) $class = 'even'; |
34 |
- output("<tr class=\"{$class}\"><td>".internal_link('edit', $fqdn, "vhost={$vhost['id']}", 'title="Einstellungen bearbeiten"')."</td><td>".internal_link('save', "<img src=\"{$prefix}images/delete.png\" style=\"height: 16px; width: 16px;\" title=\"»{$vhost['fqdn']}« löschen\" alt=\"löschen\" />", 'action=delete&vhost='.$vhost['id'] )."</td><td>"); |
|
35 |
+ output("<tr class=\"{$class}\"><td>".internal_link('edit', $fqdn, "vhost={$vhost['id']}", 'title="Einstellungen bearbeiten"')."</td><td>".internal_link('save', icon_delete("»{$vhost['fqdn']}« löschen"), 'action=delete&vhost='.$vhost['id'] )."</td><td>"); |
|
35 | 36 |
$aliases = get_all_aliases($vhost['id']); |
36 | 37 |
$tmp = ''; |
37 | 38 |
if (count($aliases) > 0) |
... | ... |
@@ -61,7 +62,7 @@ if (count($vhosts) > 0) |
61 | 62 |
|
62 | 63 |
if ($vhost['ssl'] == 'http') |
63 | 64 |
{ |
64 |
- output("<td><img src=\"{$prefix}images/error.png\" style=\"height: 18px; width: 18px;\" alt=\"aus\" title=\"SSL ausgeschaltet\" /></td>"); |
|
65 |
+ output("<td>".icon_disabled('SSL ausgeschaltet')."</td>"); |
|
65 | 66 |
} |
66 | 67 |
elseif ($vhost['cert']) |
67 | 68 |
{ |
... | ... |
@@ -69,7 +70,7 @@ if (count($vhosts) > 0) |
69 | 70 |
} |
70 | 71 |
else |
71 | 72 |
{ |
72 |
- output("<td><img src=\"{$prefix}images/ok.png\" style=\"height: 17px; width: 17px;\" alt=\"ein\" title=\"SSL eingeschaltet\" /></td>"); |
|
73 |
+ output("<td>".icon_enabled('SSL eingeschaltet')."</td>"); |
|
73 | 74 |
} |
74 | 75 |
|
75 | 76 |
if ($vhost['is_webapp'] == 1) { |
... | ... |
@@ -86,13 +87,13 @@ if (count($vhosts) > 0) |
86 | 87 |
switch ($php) |
87 | 88 |
{ |
88 | 89 |
case NULL: |
89 |
- $php = "<img src=\"{$prefix}images/error.png\" style=\"height: 18px; width: 18px;\" alt=\"aus\" title=\"PHP ausgeschaltet\" />"; |
|
90 |
+ $php = icon_disabled('PHP ausgeschaltet'); |
|
90 | 91 |
break; |
91 | 92 |
case 'mod_php': |
92 |
- $php = "<img src=\"{$prefix}images/warning.png\" style=\"height: 17px; width: 17px;\" alt=\"mod_php\" title=\"Veraltet: Bitte umstellen\" /> Apache-Modul"; |
|
93 |
+ $php = icon_warning('[mod_php] Veraltet, bitte umstellen!').' Apache-Modul'; |
|
93 | 94 |
break; |
94 | 95 |
case 'fastcgi': |
95 |
- $php = "<img src=\"{$prefix}images/ok.png\" style=\"height: 17px; width: 17px;\" alt=\"ein\" title=\"PHP eingeschaltet\" />"; |
|
96 |
+ $php = icon_enabled('PHP eingeschaltet'); |
|
96 | 97 |
break; |
97 | 98 |
} |
98 | 99 |
output("<td>{$php}</td>"); |
... | ... |
@@ -9,7 +9,7 @@ require_role(array(ROLE_SYSTEMUSER)); |
9 | 9 |
|
10 | 10 |
$uid = (int) $_SESSION['userinfo']['uid']; |
11 | 11 |
|
12 |
-if (in_array($_POST['freq'],array("day","week","month"))) { |
|
12 |
+if (isset($_POST['freq']) && in_array($_POST['freq'],array("day","week","month"))) { |
|
13 | 13 |
check_form_token('freewvs_freq'); |
14 | 14 |
db_query("REPLACE INTO qatools.freewvs (user,freq) VALUES ({$uid},'{$_POST['freq']}');"); |
15 | 15 |
header("Location: freewvs"); |
... | ... |
@@ -31,8 +31,8 @@ $form .= '<h4>Installationsort:</h4> |
31 | 31 |
<div style="margin-left: 2em;"> |
32 | 32 |
<h5>Name</h5> |
33 | 33 |
'; |
34 |
-$form .= "<div style=\"margin-left: 2em;\"><input type=\"text\" name=\"hostname\" id=\"hostname\" size=\"10\" value=\"{$vhost['hostname']}\" onkeyup=\"document.getElementById('radio_new').checked=true\" /><strong>.</strong>".domainselect('', 'onchange="document.getElementById(\'radio_new\').checked=true"'); |
|
35 |
-$form .= "<br /><input type=\"checkbox\" name=\"options[]\" id=\"aliaswww\" value=\"aliaswww\" {$s}/> <label for=\"aliaswww\">Auch mit <strong>www</strong> davor.</label></div>"; |
|
34 |
+$form .= "<div style=\"margin-left: 2em;\"><input type=\"text\" name=\"hostname\" id=\"hostname\" size=\"10\" onkeyup=\"document.getElementById('radio_new').checked=true\" /><strong>.</strong>".domainselect('', 'onchange="document.getElementById(\'radio_new\').checked=true"'); |
|
35 |
+$form .= "<br /><input type=\"checkbox\" name=\"options[]\" id=\"aliaswww\" value=\"aliaswww\" /> <label for=\"aliaswww\">Auch mit <strong>www</strong> davor.</label></div>"; |
|
36 | 36 |
$form .= " |
37 | 37 |
<h5>SSL-Verschlüsselung</h5> |
38 | 38 |
<div style=\"margin-left: 2em;\"> |
... | ... |
@@ -16,10 +16,12 @@ if ($_POST['target'] == 'new') |
16 | 16 |
$hostname = filter_input_hostname($_POST['hostname']); |
17 | 17 |
|
18 | 18 |
$domainid = (int) $_POST['domain']; |
19 |
+ $domainname = NULL; |
|
19 | 20 |
if ($domainid != -1) { |
20 | 21 |
$domain = new Domain( (int) $_POST['domain'] ); |
21 | 22 |
$domain->ensure_userdomain(); |
22 | 23 |
$domainid = $domain->id; |
24 |
+ $domainname = $domain->fqdn; |
|
23 | 25 |
} |
24 | 26 |
|
25 | 27 |
if (! is_array($_POST['options'])) |
... | ... |
@@ -85,7 +87,7 @@ if ($_POST['target'] == 'new') |
85 | 87 |
$vhost['errorlog'] = $errorlog; |
86 | 88 |
$vhost['options'] = $options; |
87 | 89 |
|
88 |
- $domain = $domain->fqdn; |
|
90 |
+ $domain = $domainname; |
|
89 | 91 |
if ($domainid == -1) |
90 | 92 |
{ |
91 | 93 |
$domain = $_SESSION['userinfo']['username'].'.'.config('masterdomain'); |
92 | 94 |