Fix HTML errors and warnings
Hanno Böck

Hanno Böck commited on 2024-01-27 16:45:13
Zeige 4 geänderte Dateien mit 30 Einfügungen und 30 Löschungen.

... ...
@@ -256,10 +256,10 @@ function are_you_sure($query_string, $question)
256 256
     <div class=\"confirmation\">
257 257
       <div class=\"question\">{$question}</div>
258 258
       <p class=\"buttons\">
259
-        <input type=\"hidden\" name=\"random_token\" value=\"{$token}\" />
260
-        <input type=\"submit\" name=\"really\" value=\"Ja\" />
259
+        <input type=\"hidden\" name=\"random_token\" value=\"{$token}\">
260
+        <input type=\"submit\" name=\"really\" value=\"Ja\">
261 261
         &#160; &#160;
262
-        <input type=\"submit\" name=\"not_really\" value=\"Nein\" />
262
+        <input type=\"submit\" name=\"not_really\" value=\"Nein\">
263 263
       </p>
264 264
     </div>");
265 265
     output("</form>\n");
... ...
@@ -344,7 +344,7 @@ function use_module($modname)
344 344
     ini_set('include_path', ini_get('include_path') . ':./modules/' . $modname . '/include:');
345 345
     $style = 'modules/' . $modname . '/style.css';
346 346
     if (file_exists($style)) {
347
-        html_header('<link rel="stylesheet" href="' . $prefix . $style . '" type="text/css" />' . "\n");
347
+        html_header('<link rel="stylesheet" href="' . $prefix . $style . '" type="text/css">' . "\n");
348 348
     }
349 349
 }
350 350
 
... ...
@@ -403,7 +403,7 @@ function html_form($form_id, $scriptname, $querystring, $content)
403 403
     $querystring = encode_querystring($querystring);
404 404
     $ret = '';
405 405
     $ret .= '<form id="' . $form_id . '" action="' . $scriptname . $querystring . '" method="post">' . "\n";
406
-    $ret .= '<p style="display: none;"><input type="hidden" name="formtoken" value="' . generate_form_token($form_id) . '" /></p>' . "\n";
406
+    $ret .= '<p style="display: none;"><input type="hidden" name="formtoken" value="' . generate_form_token($form_id) . '"></p>' . "\n";
407 407
     $ret .= $content;
408 408
     $ret .= '</form>';
409 409
     return $ret;
... ...
@@ -16,25 +16,25 @@ require_once('inc/base.php');
16 16
 function icon_warning($title = '')
17 17
 {
18 18
     global $prefix;
19
-    return "<img src=\"{$prefix}images/warning.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\" />";
19
+    return "<img src=\"{$prefix}images/warning.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\">";
20 20
 }
21 21
 
22 22
 function icon_enabled_phpxx($title, $major, $minor)
23 23
 {
24 24
     global $prefix;
25
-    return "<img src=\"{$prefix}images/ok-php$major$minor.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\" />";
25
+    return "<img src=\"{$prefix}images/ok-php$major$minor.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\">";
26 26
 }
27 27
 
28 28
 function icon_enabled_warning($title = '')
29 29
 {
30 30
     global $prefix;
31
-    return "<img src=\"{$prefix}images/ok-warning.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\" />";
31
+    return "<img src=\"{$prefix}images/ok-warning.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\">";
32 32
 }
33 33
 
34 34
 function icon_enabled($title = '')
35 35
 {
36 36
     global $prefix;
37
-    return "<img src=\"{$prefix}images/ok.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\" />";
37
+    return "<img src=\"{$prefix}images/ok.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\">";
38 38
 }
39 39
 
40 40
 
... ...
@@ -42,14 +42,14 @@ function icon_disabled($title = '')
42 42
 {
43 43
     global $prefix;
44 44
     //return "";
45
-    return "<img src=\"{$prefix}images/disabled.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\" />";
45
+    return "<img src=\"{$prefix}images/disabled.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\">";
46 46
 }
47 47
 
48 48
 
49 49
 function icon_ok($title = '')
50 50
 {
51 51
     global $prefix;
52
-    return "<img src=\"{$prefix}images/ok.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\" />";
52
+    return "<img src=\"{$prefix}images/ok.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\">";
53 53
 }
54 54
 
55 55
 
... ...
@@ -57,26 +57,26 @@ function icon_ok($title = '')
57 57
 function icon_error($title = '')
58 58
 {
59 59
     global $prefix;
60
-    return "<img src=\"{$prefix}images/error.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\" />";
60
+    return "<img src=\"{$prefix}images/error.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\">";
61 61
 }
62 62
 
63 63
 function icon_edit($title = '')
64 64
 {
65 65
     global $prefix;
66
-    return "<img src=\"{$prefix}images/edit.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\" />";
66
+    return "<img src=\"{$prefix}images/edit.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\">";
67 67
 }
68 68
 
69 69
 function icon_pwchange($title = '')
70 70
 {
71 71
     global $prefix;
72
-    return "<img src=\"{$prefix}images/pwchange.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\" />";
72
+    return "<img src=\"{$prefix}images/pwchange.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\">";
73 73
 }
74 74
 
75 75
 
76 76
 function icon_add($title = '')
77 77
 {
78 78
     global $prefix;
79
-    return "<img src=\"{$prefix}images/add.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\" />";
79
+    return "<img src=\"{$prefix}images/add.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\">";
80 80
 }
81 81
 
82 82
 
... ...
@@ -84,7 +84,7 @@ function icon_add($title = '')
84 84
 function icon_delete($title = '')
85 85
 {
86 86
     global $prefix;
87
-    return "<img src=\"{$prefix}images/delete.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\" />";
87
+    return "<img src=\"{$prefix}images/delete.png\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\">";
88 88
 }
89 89
 
90 90
 
... ...
@@ -92,5 +92,5 @@ function icon_delete($title = '')
92 92
 function other_icon($filename, $title = '')
93 93
 {
94 94
     global $prefix;
95
-    return "<img src=\"{$prefix}images/{$filename}\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\" />";
95
+    return "<img src=\"{$prefix}images/{$filename}\" style=\"height: 16px; width: 16px;\" alt=\"{$title}\" title=\"{$title}\">";
96 96
 }
... ...
@@ -138,19 +138,19 @@ if (!defined("TOP_INCLUDED")) {
138 138
 
139 139
     $role = $_SESSION['role'];
140 140
     if ($role != ROLE_ANONYMOUS) {
141
-        $userinfo .= '<p class="userinfo">Angemeldet als:<br />';
141
+        $userinfo .= '<p class="userinfo">Angemeldet als:<br>';
142 142
         if ($role & ROLE_SYSTEMUSER && isset($_SESSION['subuser'])) {
143 143
             $userinfo .= '<strong>' . $_SESSION['subuser'] . '</strong>';
144
-            $userinfo .= '<br />Mitbenutzer von ' . $_SESSION['userinfo']['username'];
144
+            $userinfo .= '<br>Mitbenutzer von ' . $_SESSION['userinfo']['username'];
145 145
         } elseif ($role & ROLE_SYSTEMUSER) {
146 146
             $userinfo .= '<strong>' . $_SESSION['userinfo']['username'] . '</strong>';
147
-            $userinfo .= '<br />' . $_SESSION['userinfo']['name'];
148
-            $userinfo .= '<br />(UID ' . $_SESSION['userinfo']['uid'] . (($role & ROLE_CUSTOMER) ? ', Kunde ' . $_SESSION['customerinfo']['customerno'] : '') . ')';
147
+            $userinfo .= '<br>' . $_SESSION['userinfo']['name'];
148
+            $userinfo .= '<br>(UID ' . $_SESSION['userinfo']['uid'] . (($role & ROLE_CUSTOMER) ? ', Kunde ' . $_SESSION['customerinfo']['customerno'] : '') . ')';
149 149
         } elseif ($role & ROLE_CUSTOMER) {
150 150
             $userinfo .= '<strong>' . $_SESSION['customerinfo']['name'] . '</strong>';
151
-            $userinfo .= '<br />(Kunde ' . $_SESSION['customerinfo']['customerno'] . ')';
151
+            $userinfo .= '<br>(Kunde ' . $_SESSION['customerinfo']['customerno'] . ')';
152 152
         } elseif ($role & (ROLE_MAILACCOUNT | ROLE_VMAIL_ACCOUNT)) {
153
-            $userinfo .= '<strong>' . $_SESSION['mailaccount'] . '</strong><br />(Postfach von Benutzer <em>' . $_SESSION['userinfo']['username'] . '</em>)';
153
+            $userinfo .= '<strong>' . $_SESSION['mailaccount'] . '</strong><br>(Postfach von Benutzer <em>' . $_SESSION['userinfo']['username'] . '</em>)';
154 154
         }
155 155
         $userinfo .= '</p>';
156 156
     }
... ...
@@ -58,7 +58,7 @@ if (count($dbs) > 0 || count($users) > 0) {
58 58
 
59 59
     output('
60 60
   <table>
61
-  <tr><th>&#160;</th><th style="background-color: #729bb3; color: #fff;padding: 0.2em;" colspan="' . (count($users) + 1) . '">Benutzerkonten</th></tr>
61
+  <tr><th>&#160;</th><th style="background-color: #729bb3; color: #fff;padding: 0.2em;" colspan="' . count($users) . '">Benutzerkonten</th></tr>
62 62
   <tr><th style="background-color: #729bb3; color: #fff;padding: 0.2em; text-align: left;">Datenbanken</th>');
63 63
 
64 64
     foreach ($users as $user) {
... ...
@@ -66,10 +66,10 @@ if (count($dbs) > 0 || count($users) > 0) {
66 66
         //$username = str_replace('_', '_ ', $user['username']);
67 67
         $desc = '';
68 68
         if ($user['description']) {
69
-            $desc = '<br /><span style="font-weight: normal; font-size: 80%; font-style: italic;">' . filter_output_html($user['description']) . '</span>';
69
+            $desc = '<br><span style="font-weight: normal; font-size: 80%; font-style: italic;">' . filter_output_html($user['description']) . '</span>';
70 70
         }
71 71
         output("<th><span title=\"Erstellt: {$user['created']}\">{$username}</span>" . $desc);
72
-        output("<br />" . internal_link('description', other_icon("comment.png", 'Beschreibung ändern'), "username={$username}") . "&#160;");
72
+        output("<br>" . internal_link('description', other_icon("comment.png", 'Beschreibung ändern'), "username={$username}") . "&#160;");
73 73
         output(internal_link("save", icon_delete("Benutzer »{$user['username']}« löschen"), "action=delete_user&user={$user['username']}") . "</th>");
74 74
     }
75 75
 
... ...
@@ -80,9 +80,9 @@ if (count($dbs) > 0 || count($users) > 0) {
80 80
         $phpmyadmin = "https://mysql-{$servers[$db['name']]}/";
81 81
         $desc = '';
82 82
         if ($db['description']) {
83
-            $desc = '<br /><span style="font-weight: normal; font-size: 80%; font-style: italic;">' . filter_output_html($db['description']) . '</span>';
83
+            $desc = '<br><span style="font-weight: normal; font-size: 80%; font-style: italic;">' . filter_output_html($db['description']) . '</span>';
84 84
         }
85
-        output("<tr><td style=\"border: 0px; font-weight: bold; text-align: right;\"><span title=\"Erstellt: {$db['created']}\">{$db['name']}</span>" . $desc . "<br />");
85
+        output("<tr><td style=\"border: 0px; font-weight: bold; text-align: right;\"><span title=\"Erstellt: {$db['created']}\">{$db['name']}</span>" . $desc . "<br>");
86 86
         output(internal_link('description', other_icon("comment.png", 'Datenbank-Beschreibung ändern'), "db={$db['name']}") . "&#160;");
87 87
         output(internal_link("save", icon_delete("Datenbank »{$db['name']}« löschen"), "action=delete_db&db={$db['name']}") . "&#160;");
88 88
         output("<a href=\"" . $phpmyadmin . "\">" . other_icon("database_go.png", "Datenbank-Verwaltung über phpMyAdmin") . "</a>");
... ...
@@ -134,7 +134,7 @@ if (count($users) > 0) {
134 134
     $form = '<div>
135 135
   <p><label for="mysql_username">Benutzername:</label>&#160;' . html_select('mysql_username', $my_users) . '</p>
136 136
   <p><label for="newpass">Passwort:</label>&#160;<input onchange="document.getElementById(\'newpass_display\').parentNode.style.display=\'none\'" type="password" name="newpass" id="newpass" value="" autocomplete="new-password"> <button type="button" onclick="setRandomPassword()">Passwort erzeugen</button></p>
137
-<p style="display: none;">Automatisch erzeugtes Passwort: <input id="newpass_display" type="text" readonly="readonly" /></p>
137
+<p style="display: none;">Automatisch erzeugtes Passwort: <input id="newpass_display" type="text" readonly="readonly"></p>
138 138
   <p><input type="submit" value="Setzen"></p>
139 139
 </div>';
140 140
 
... ...
@@ -142,5 +142,5 @@ if (count($users) > 0) {
142 142
     output('<h4>Passwort ändern</h4>
143 143
   <p>Hier können Sie das Passwort eines MySQL-Benutzeraccounts ändern bzw. neu setzen</p>
144 144
 
145
-  ' . html_form('mysql_databases', 'save', 'action=change_pw', $form) . '<br />');
145
+  ' . html_form('mysql_databases', 'save', 'action=change_pw', $form) . '<br>');
146 146
 }
147 147