diff options
Diffstat (limited to 'web/lib/acctfuncs.inc.php')
-rw-r--r-- | web/lib/acctfuncs.inc.php | 116 |
1 files changed, 1 insertions, 115 deletions
diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php index 034bc480..9e50cfdb 100644 --- a/web/lib/acctfuncs.inc.php +++ b/web/lib/acctfuncs.inc.php @@ -323,121 +323,7 @@ function search_results_page($UTYPE,$O=0,$SB="",$U="",$T="", $dbh = db_connect(); $result = db_query($q, $dbh); - if (!$result) { - print __("No results matched your search criteria."); - } else { - $num_rows = mysql_num_rows($result); - if ($num_rows) { - print "<table class='results'>\n"; - print "<tr>"; - print "<th class='header'>"; - print "<span class='f2'>".__("Username")."</span></th>"; - print "<th class='header'>"; - print "<span class='f2'>".__("Type")."</span></th>"; - print "<th class='header'>"; - print "<span class='f2'>".__("Status")."</span></th>"; - print "<th class='header'>"; - print "<span class='f2'>".__("Real Name")."</span></th>"; - print "<th class='header'>"; - print "<span class='f2'>".__("IRC Nick")."</span></th>"; - print "<th class='header'>"; - print "<span class='f2'>".__("PGP Key Fingerprint")."</span></th>"; - print "<th class='header'>"; - print "<span class='f2'>".__("Last Voted")."</span></th>"; - print "<th class='header'>"; - print "<span class='f2'>".__("Edit Account")."</span></th>"; - print "</tr>\n"; - $i = 0; - while ($row = mysql_fetch_assoc($result)) { - if ($i % 2) { - $c = "data1"; - } else { - $c = "data2"; - } - print "<tr>"; - print "<td class='".$c."'>"; - print "<span class='f5'><a href='packages.php?SeB=m&K=".$row["Username"]."'>".$row["Username"]."</a></span></td>"; - print "<td class='".$c."'>"; - print "<span class='f5'>".$row["AccountType"]; - print "</span></td>"; - print "<td class='".$c."'><span class='f5'>"; - if ($row["Suspended"]) { - print __("Suspended"); - } else { - print __("Active"); - } - print "</span></td>"; - print "<td class='".$c."'><span class='f5'>"; - $row["RealName"] ? print htmlspecialchars($row["RealName"],ENT_QUOTES) : print " "; - print "</span></td>"; - print "<td class='".$c."'><span class='f5'>"; - $row["IRCNick"] ? print htmlspecialchars($row["IRCNick"],ENT_QUOTES) : print " "; - print "</span></td>"; - print "<td class='".$c."'><span class='f5'>"; - $row["PGPKey"] ? print html_format_pgp_fingerprint($row["PGPKey"]) : print " "; - print "</span></td>"; - print "<td class='".$c."'><span class='f5'>"; - $row["LastVoted"] - ? print date("Y-m-d", $row["LastVoted"]) - : print __("Never"); - print "</span></td>"; - print "<td class='".$c."'><span class='f5'>"; - if ($UTYPE == "Trusted User" && $row["AccountType"] == "Developer") { - # TUs can't edit devs - # - print " </span></td>"; - } else { - $edit_url = "account.php?Action=DisplayAccount&ID=".$row["ID"]; - print "<a href='".$edit_url . "'>"; - print "Edit</a></span></td>"; - } - print "</tr>\n"; - $i++; - } - print "</table>\n"; - - print "<table class='results'>\n"; - print "<tr>"; - print "<td align='left'>"; - print "<form action='account.php' method='post'>\n"; - print "<fieldset>"; - print "<input type='hidden' name='Action' value='SearchAccounts' />\n"; - print "<input type='hidden' name='O'"; - print " value='".($OFFSET-$HITS_PER_PAGE)."' />\n"; - reset($search_vars); - while (list($k, $ind) = each($search_vars)) { - print "<input type='hidden' name='".$ind."'"; - print " value='".${$ind}."' />\n"; - } - print "<input type='submit' class='button'"; - print " value='<-- ".__("Less")."' />"; - print "</fieldset>"; - print "</form>\n"; - print "</td>"; - print "<td align='right'>"; - print "<form action='account.php' method='post'>\n"; - print "<fieldset>"; - print "<input type='hidden' name='Action' value='SearchAccounts' />\n"; - print "<input type='hidden' name='O'"; - print " value='".($OFFSET+$HITS_PER_PAGE)."' />\n"; - reset($search_vars); - while (list($k, $ind) = each($search_vars)) { - print "<input type='hidden' name='".$ind."'"; - print " value='".${$ind}."' />\n"; - } - print "<input type='submit' class='button'"; - print " value='".__("More")." -->' />"; - print "</fieldset>"; - print "</form>\n"; - print "</td>"; - print "</tr>\n"; - print "</table>\n"; - } else { - print "<p style=\"text-align:center;\">\n"; - print __("No more results to display."); - print "</p>\n"; - } - } + include("account_search_results.php"); return; } |