From be0cf7f41f6939371c780a25732e88c1cbad4a3b Mon Sep 17 00:00:00 2001 From: canyonknight Date: Wed, 23 May 2012 13:56:15 -0400 Subject: acctfuncs.inc.php: Move XHTML to account_search_results.php template XHTML should be eliminated from lib/ as much as possible. This pulls the XHTML out of a function that simply echoes the code, and moves it into a more reasonable template file in account_search_results.php Signed-off-by: canyonknight Signed-off-by: Lukas Fleischer --- web/lib/acctfuncs.inc.php | 116 +--------------------------------------------- 1 file changed, 1 insertion(+), 115 deletions(-) (limited to 'web/lib') 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 "\n"; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print "\n"; - $i = 0; - while ($row = mysql_fetch_assoc($result)) { - if ($i % 2) { - $c = "data1"; - } else { - $c = "data2"; - } - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - } else { - $edit_url = "account.php?Action=DisplayAccount&ID=".$row["ID"]; - print ""; - print "Edit"; - } - print "\n"; - $i++; - } - print "
"; - print "".__("Username").""; - print "".__("Type").""; - print "".__("Status").""; - print "".__("Real Name").""; - print "".__("IRC Nick").""; - print "".__("PGP Key Fingerprint").""; - print "".__("Last Voted").""; - print "".__("Edit Account")."
"; - print "".$row["Username"].""; - print "".$row["AccountType"]; - print ""; - if ($row["Suspended"]) { - print __("Suspended"); - } else { - print __("Active"); - } - print ""; - $row["RealName"] ? print htmlspecialchars($row["RealName"],ENT_QUOTES) : print " "; - print ""; - $row["IRCNick"] ? print htmlspecialchars($row["IRCNick"],ENT_QUOTES) : print " "; - print ""; - $row["PGPKey"] ? print html_format_pgp_fingerprint($row["PGPKey"]) : print " "; - print ""; - $row["LastVoted"] - ? print date("Y-m-d", $row["LastVoted"]) - : print __("Never"); - print ""; - if ($UTYPE == "Trusted User" && $row["AccountType"] == "Developer") { - # TUs can't edit devs - # - print " 
\n"; - - print "\n"; - print ""; - print ""; - print ""; - print "\n"; - print "
"; - print "
\n"; - print "
"; - print "\n"; - print "\n"; - reset($search_vars); - while (list($k, $ind) = each($search_vars)) { - print "\n"; - } - print ""; - print "
"; - print "
\n"; - print "
"; - print "
\n"; - print "
"; - print "\n"; - print "\n"; - reset($search_vars); - while (list($k, $ind) = each($search_vars)) { - print "\n"; - } - print ""; - print "
"; - print "
\n"; - print "
\n"; - } else { - print "

\n"; - print __("No more results to display."); - print "

\n"; - } - } + include("account_search_results.php"); return; } -- cgit v1.2.3-24-g4f1b