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 "
"; - print "".__("Username")." | "; - print ""; - print "".__("Type")." | "; - print ""; - print "".__("Status")." | "; - print ""; - print "".__("Real Name")." | "; - print ""; - print "".__("IRC Nick")." | "; - print ""; - print "".__("PGP Key Fingerprint")." | "; - print ""; - print "".__("Last Voted")." | "; - print ""; - print "".__("Edit Account")." | "; - print "
---|---|---|---|---|---|---|---|
"; - print "".$row["Username"]." | "; - print ""; - print "".$row["AccountType"]; - print " | "; - print ""; - if ($row["Suspended"]) { - print __("Suspended"); - } else { - print __("Active"); - } - print " | "; - print ""; - $row["RealName"] ? print htmlspecialchars($row["RealName"],ENT_QUOTES) : print " "; - print " | "; - print ""; - $row["IRCNick"] ? print htmlspecialchars($row["IRCNick"],ENT_QUOTES) : print " "; - print " | "; - print ""; - $row["PGPKey"] ? print html_format_pgp_fingerprint($row["PGPKey"]) : print " "; - print " | "; - print ""; - $row["LastVoted"] - ? print date("Y-m-d", $row["LastVoted"]) - : print __("Never"); - print " | "; - print ""; - if ($UTYPE == "Trusted User" && $row["AccountType"] == "Developer") { - # TUs can't edit devs - # - print " | "; - } else { - $edit_url = "account.php?Action=DisplayAccount&ID=".$row["ID"]; - print ""; - print "Edit"; - } - print "
"; - print "\n"; - print " | "; - print ""; - print "\n"; - print " | "; - print "
\n"; - print __("No more results to display."); - print "
\n"; - } - } + include("account_search_results.php"); return; } diff --git a/web/template/account_search_results.php b/web/template/account_search_results.php new file mode 100644 index 00000000..88d6bb68 --- /dev/null +++ b/web/template/account_search_results.php @@ -0,0 +1,103 @@ + ++ | + | + | + | + | + | + | + |
---|---|---|---|---|---|---|---|
"> | ++ | + + | ++ | + | + | + | + + "> + + | +
+ + | ++ + | +
+ +
+ +