- XHTML-ified the HTML code: it passes the ./scipts/code-style.pl test

now
4.0.x
Dries Buytaert 2001-11-11 23:24:26 +00:00
parent b29af16bf5
commit f5a9ecccb1
2 changed files with 26 additions and 26 deletions

View File

@ -36,14 +36,14 @@ function watchdog_overview($type) {
$result = db_query("SELECT w.*, u.name, u.uid FROM watchdog w LEFT JOIN users u ON w.uid = u.uid ". ($type ? $query[$type] : "") ." ORDER BY timestamp DESC LIMIT 1000"); $result = db_query("SELECT w.*, u.name, u.uid FROM watchdog w LEFT JOIN users u ON w.uid = u.uid ". ($type ? $query[$type] : "") ." ORDER BY timestamp DESC LIMIT 1000");
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n"; $output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">";
$output .= " <TR><TH>date</TH><TH>message</TH><TH>user</TH><TH>operations</TH></TR>\n"; $output .= " <tr><th>date</th><th>message</th><th>user</th><th>operations</th></tr>";
while ($watchdog = db_fetch_object($result)) { while ($watchdog = db_fetch_object($result)) {
if ($background = $color[$watchdog->type]) { if ($background = $color[$watchdog->type]) {
$output .= " <TR BGCOLOR=\"$background\"><TD>". format_date($watchdog->timestamp, "small") ."</TD><TD>". substr(check_output($watchdog->message), 0, 64) ."</TD><TD ALIGN=\"center\">". format_name($watchdog) ."</A></TD><TD ALIGN=\"center\"><A HREF=\"admin.php?mod=watchdog&op=view&id=$watchdog->wid\">details</A></TD></TR>\n"; $output .= " <tr bgcolor=\"$background\"><td>". format_date($watchdog->timestamp, "small") ."</td><td>". substr(check_output($watchdog->message), 0, 64) ."</td><td align=\"center\">". format_name($watchdog) ."</a></td><td align=\"center\"><a href=\"admin.php?mod=watchdog&op=view&id=$watchdog->wid\">details</a></td></tr>";
} }
} }
$output .= "</TABLE>\n"; $output .= "</table>";
return $output; return $output;
} }
@ -52,14 +52,14 @@ function watchdog_view($id) {
$result = db_query("SELECT w.*, u.name, u.uid FROM watchdog w LEFT JOIN users u ON w.uid = u.uid WHERE w.wid = '$id'"); $result = db_query("SELECT w.*, u.name, u.uid FROM watchdog w LEFT JOIN users u ON w.uid = u.uid WHERE w.wid = '$id'");
if ($watchdog = db_fetch_object($result)) { if ($watchdog = db_fetch_object($result)) {
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\">\n"; $output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">";
$output .= " <TR><TH>Type:</TH><TD>". check_output($watchdog->type) ."</TD></TR>\n"; $output .= " <tr><th>Type:</th><td>". check_output($watchdog->type) ."</td></tr>";
$output .= " <TR><TH>Date:</TH><TD>". format_date($watchdog->timestamp, "large") ."</TD></TR>\n"; $output .= " <tr><th>Date:</th><td>". format_date($watchdog->timestamp, "large") ."</td></tr>";
$output .= " <TR><TH>User:</TH><TD>". format_name($watchdog) ."</TD></TR>\n"; $output .= " <tr><th>User:</th><td>". format_name($watchdog) ."</td></tr>";
$output .= " <TR><TH>Location:</TH><TD>". check_output($watchdog->location). "</TD></TR>\n"; $output .= " <tr><th>Location:</th><td>". check_output($watchdog->location) ."</td></tr>";
$output .= " <TR><TH>Message:</TH><TD>". check_output($watchdog->message) ."</TD></TR>\n"; $output .= " <tr><th>Message:</th><td>". check_output($watchdog->message) ."</td></tr>";
$output .= " <TR><TH>Hostname:</TH><TD>". check_output($watchdog->hostname) ."</TD></TR>\n"; $output .= " <tr><th>Hostname:</th><td>". check_output($watchdog->hostname) ."</td></tr>";
$output .= "</TABLE>\n"; $output .= "</table>";
return $output; return $output;
} }
@ -70,7 +70,7 @@ function watchdog_admin() {
if (user_access("administer watchdog")) { if (user_access("administer watchdog")) {
print "<SMALL><A HREF=\"admin.php?mod=watchdog&type=user\">user messages</A> | <A HREF=\"admin.php?mod=watchdog&type=regular\">regular messages</A> | <A HREF=\"admin.php?mod=watchdog&type=special\">special messages</A> | <A HREF=\"admin.php?mod=watchdog&type=warning\">warning messages</A> | <A HREF=\"admin.php?mod=watchdog&type=error\">error messages</A> | <A HREF=\"admin.php?mod=watchdog&type=httpd\">httpd messages</A> | <A HREF=\"admin.php?mod=watchdog\">overview</A> | <A HREF=\"admin.php?mod=watchdog&op=help\">help</A></SMALL><HR>\n"; print "<small><a href=\"admin.php?mod=watchdog&type=user\">user messages</a> | <a href=\"admin.php?mod=watchdog&type=regular\">regular messages</a> | <a href=\"admin.php?mod=watchdog&type=special\">special messages</a> | <a href=\"admin.php?mod=watchdog&type=warning\">warning messages</a> | <a href=\"admin.php?mod=watchdog&type=error\">error messages</a> | <a href=\"admin.php?mod=watchdog&type=httpd\">httpd messages</a> | <a href=\"admin.php?mod=watchdog\">overview</a> | <a href=\"admin.php?mod=watchdog&op=help\">help</a></small><hr />";
switch ($op) { switch ($op) {
case "help": case "help":

View File

@ -36,14 +36,14 @@ function watchdog_overview($type) {
$result = db_query("SELECT w.*, u.name, u.uid FROM watchdog w LEFT JOIN users u ON w.uid = u.uid ". ($type ? $query[$type] : "") ." ORDER BY timestamp DESC LIMIT 1000"); $result = db_query("SELECT w.*, u.name, u.uid FROM watchdog w LEFT JOIN users u ON w.uid = u.uid ". ($type ? $query[$type] : "") ." ORDER BY timestamp DESC LIMIT 1000");
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n"; $output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">";
$output .= " <TR><TH>date</TH><TH>message</TH><TH>user</TH><TH>operations</TH></TR>\n"; $output .= " <tr><th>date</th><th>message</th><th>user</th><th>operations</th></tr>";
while ($watchdog = db_fetch_object($result)) { while ($watchdog = db_fetch_object($result)) {
if ($background = $color[$watchdog->type]) { if ($background = $color[$watchdog->type]) {
$output .= " <TR BGCOLOR=\"$background\"><TD>". format_date($watchdog->timestamp, "small") ."</TD><TD>". substr(check_output($watchdog->message), 0, 64) ."</TD><TD ALIGN=\"center\">". format_name($watchdog) ."</A></TD><TD ALIGN=\"center\"><A HREF=\"admin.php?mod=watchdog&op=view&id=$watchdog->wid\">details</A></TD></TR>\n"; $output .= " <tr bgcolor=\"$background\"><td>". format_date($watchdog->timestamp, "small") ."</td><td>". substr(check_output($watchdog->message), 0, 64) ."</td><td align=\"center\">". format_name($watchdog) ."</a></td><td align=\"center\"><a href=\"admin.php?mod=watchdog&op=view&id=$watchdog->wid\">details</a></td></tr>";
} }
} }
$output .= "</TABLE>\n"; $output .= "</table>";
return $output; return $output;
} }
@ -52,14 +52,14 @@ function watchdog_view($id) {
$result = db_query("SELECT w.*, u.name, u.uid FROM watchdog w LEFT JOIN users u ON w.uid = u.uid WHERE w.wid = '$id'"); $result = db_query("SELECT w.*, u.name, u.uid FROM watchdog w LEFT JOIN users u ON w.uid = u.uid WHERE w.wid = '$id'");
if ($watchdog = db_fetch_object($result)) { if ($watchdog = db_fetch_object($result)) {
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\">\n"; $output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">";
$output .= " <TR><TH>Type:</TH><TD>". check_output($watchdog->type) ."</TD></TR>\n"; $output .= " <tr><th>Type:</th><td>". check_output($watchdog->type) ."</td></tr>";
$output .= " <TR><TH>Date:</TH><TD>". format_date($watchdog->timestamp, "large") ."</TD></TR>\n"; $output .= " <tr><th>Date:</th><td>". format_date($watchdog->timestamp, "large") ."</td></tr>";
$output .= " <TR><TH>User:</TH><TD>". format_name($watchdog) ."</TD></TR>\n"; $output .= " <tr><th>User:</th><td>". format_name($watchdog) ."</td></tr>";
$output .= " <TR><TH>Location:</TH><TD>". check_output($watchdog->location). "</TD></TR>\n"; $output .= " <tr><th>Location:</th><td>". check_output($watchdog->location) ."</td></tr>";
$output .= " <TR><TH>Message:</TH><TD>". check_output($watchdog->message) ."</TD></TR>\n"; $output .= " <tr><th>Message:</th><td>". check_output($watchdog->message) ."</td></tr>";
$output .= " <TR><TH>Hostname:</TH><TD>". check_output($watchdog->hostname) ."</TD></TR>\n"; $output .= " <tr><th>Hostname:</th><td>". check_output($watchdog->hostname) ."</td></tr>";
$output .= "</TABLE>\n"; $output .= "</table>";
return $output; return $output;
} }
@ -70,7 +70,7 @@ function watchdog_admin() {
if (user_access("administer watchdog")) { if (user_access("administer watchdog")) {
print "<SMALL><A HREF=\"admin.php?mod=watchdog&type=user\">user messages</A> | <A HREF=\"admin.php?mod=watchdog&type=regular\">regular messages</A> | <A HREF=\"admin.php?mod=watchdog&type=special\">special messages</A> | <A HREF=\"admin.php?mod=watchdog&type=warning\">warning messages</A> | <A HREF=\"admin.php?mod=watchdog&type=error\">error messages</A> | <A HREF=\"admin.php?mod=watchdog&type=httpd\">httpd messages</A> | <A HREF=\"admin.php?mod=watchdog\">overview</A> | <A HREF=\"admin.php?mod=watchdog&op=help\">help</A></SMALL><HR>\n"; print "<small><a href=\"admin.php?mod=watchdog&type=user\">user messages</a> | <a href=\"admin.php?mod=watchdog&type=regular\">regular messages</a> | <a href=\"admin.php?mod=watchdog&type=special\">special messages</a> | <a href=\"admin.php?mod=watchdog&type=warning\">warning messages</a> | <a href=\"admin.php?mod=watchdog&type=error\">error messages</a> | <a href=\"admin.php?mod=watchdog&type=httpd\">httpd messages</a> | <a href=\"admin.php?mod=watchdog\">overview</a> | <a href=\"admin.php?mod=watchdog&op=help\">help</a></small><hr />";
switch ($op) { switch ($op) {
case "help": case "help":