diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-03-04 12:06:13 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-03-04 12:06:13 +0000 |
commit | d684b1f10aecc3403a8ec97d45118f67883480e5 (patch) | |
tree | bdb99956e7675f968bb496ec80f492e39be4e084 /modules | |
parent | 167594dc09919f6437ddcf6958bf42b4036012ec (diff) | |
download | brdo-d684b1f10aecc3403a8ec97d45118f67883480e5.tar.gz brdo-d684b1f10aecc3403a8ec97d45118f67883480e5.tar.bz2 |
- various smaller updates before I start watching Formula 1 with [a] a
0.5 liter box of Haagen-Dhaz (Belgian Choclate) and [b] my laptop on
my lap for drupal hacking. Life hardly can get any better than this.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/ban.module | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/modules/ban.module b/modules/ban.module index b370e2da7..a6586ab4d 100644 --- a/modules/ban.module +++ b/modules/ban.module @@ -37,13 +37,10 @@ function ban_admin_new($mask, $category, $reason) { function ban_display($category = "") { global $type2index; - // initialize variable: $category = $category ? $category : 1; - // Perform query: $result = db_query("SELECT * FROM bans WHERE type = $category ORDER BY mask"); - // Generate output: $output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n"; $output .= " <TR>\n"; $output .= " <TH COLSPAN=\"3\">\n"; @@ -57,11 +54,7 @@ function ban_display($category = "") { $output .= " </FORM>\n"; $output .= " </TH>\n"; $output .= " </TR>\n"; - $output .= " <TR>\n"; - $output .= " <TH>mask</TH>\n"; - $output .= " <TH>reason</TH>\n"; - $output .= " <TH>operations</TH>\n"; - $output .= " </TR>\n"; + $output .= " <TR><TH>mask</TH><TH>reason</TH><TH>operations</TH></TR>\n"; while ($ban = db_fetch_object($result)) { $output .= " <TR><TD>$ban->mask</TD><TD>$ban->reason</TD><TD ALIGN=\"center\"><A HREF=\"admin.php?mod=ban&op=delete&category=$category&id=$ban->id\">delete</A></TD></TR>\n"; } @@ -76,16 +69,17 @@ function ban_admin_add() { $output .= "<H3>Add new ban:</H3>\n"; $output .= "<FORM ACTION=\"admin.php?mod=ban\" METHOD=\"post\">\n"; + $output .= "<B>Banmask:</B><BR>\n"; $output .= "<INPUT TYPE=\"text\" NAME=\"mask\" SIZE=\"35\"><P>\n"; + $output .= "<B>Type:</B><BR>\n"; - $output .= "<SELECT NAME=\"category\"\">\n"; - for (reset($type2index); $cur = current($type2index); next($type2index)) { - $output .= "<OPTION VALUE=\"$cur\"". ($cur == $category ? " SELECTED" : "") .">". key($type2index) ."</OPTION>\n"; - } - $output .= "</SELECT><P>\n"; + for (reset($type2index); $cur = current($type2index); next($type2index)) $options .= "<OPTION VALUE=\"$cur\"". ($cur == $category ? " SELECTED" : "") .">". key($type2index) ."</OPTION>\n"; + $output .= "<SELECT NAME=\"category\"\">$options</SELECT><P>\n"; + $output .= "<B>Reason:</B><BR>\n"; $output .= "<TEXTAREA NAME=\"reason\" COLS=\"50\" ROWS=\"5\"></TEXTAREA><P>\n"; + $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Add ban\"><BR>\n"; $output .= "</FORM>\n"; @@ -103,14 +97,14 @@ function ban_admin_check() { $output .= "<H3>Ban check:</H3>\n"; $output .= "<FORM ACTION=\"admin.php?mod=ban\" METHOD=\"post\">\n"; + $output .= "<B>Banmask:</B><BR>\n"; $output .= "<INPUT TYPE=\"text\" NAME=\"mask\" SIZE=\"35\"><P>\n"; + $output .= "<B>Type:</B><BR>\n"; - $output .= "<SELECT NAME=\"category\"\">\n"; - for (reset($type2index); $cur = current($type2index); next($type2index)) { - $output .= "<OPTION VALUE=\"$cur\"". ($cur == $category ? " SELECTED" : "") .">". key($type2index) ."</OPTION>\n"; - } - $output .= "</SELECT><P>\n"; + for (reset($type2index); $cur = current($type2index); next($type2index)) $options .= "<OPTION VALUE=\"$cur\"". ($cur == $category ? " SELECTED" : "") .">". key($type2index) ."</OPTION>\n"; + $output .= "<SELECT NAME=\"category\"\">$options</SELECT><P>\n"; + $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Check ban\"><BR>\n"; $output .= "</FORM>\n"; |