From 7f9e498e48c4e5d056ee988a23dedb8ca98b11cd Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Fri, 11 Mar 2011 18:54:44 +0100 Subject: Fix broken XHTML. Fix a lot of invalid XHTML in the templates and actions. There might still be some legacy code left, but this should cover most of it. Signed-off-by: Lukas Fleischer --- web/lib/acctfuncs.inc | 79 ++++++++++++++++++++++++++------------------------- 1 file changed, 41 insertions(+), 38 deletions(-) (limited to 'web/lib') diff --git a/web/lib/acctfuncs.inc b/web/lib/acctfuncs.inc index 0cd5d0ed..c3a6c069 100644 --- a/web/lib/acctfuncs.inc +++ b/web/lib/acctfuncs.inc @@ -29,18 +29,19 @@ function display_account_form($UTYPE,$A,$U="",$T="",$S="", global $SUPPORTED_LANGS; print "
\n"; - print "\n"; + print "
"; + print "\n"; if ($UID) { - print "\n"; + print "\n"; } - print "
\n"; - print "\n"; + print ""; + print "
\n"; print "\n"; print ""; print ""; print ""; + print " name='U' value='".htmlspecialchars($U,ENT_QUOTES)."' /> (".__("required").")"; print "\n"; # Only TUs or Devs can promote/demote/suspend a user @@ -68,9 +69,9 @@ function display_account_form($UTYPE,$A,$U="",$T="",$S="", print ""; print "\n"; } @@ -78,13 +79,13 @@ function display_account_form($UTYPE,$A,$U="",$T="",$S="", print ""; print ""; print ""; + print " name='E' value='".htmlspecialchars($E,ENT_QUOTES)."' /> (".__("required").")"; print "\n"; print ""; print ""; print ""; print ""; print ""; print ""; print ""; + print " name='R' value='".htmlspecialchars($R,ENT_QUOTES)."' />"; print "\n"; print ""; print ""; print ""; + print " name='I' value='".htmlspecialchars($I,ENT_QUOTES)."' />"; print "\n"; print ""; @@ -130,9 +131,9 @@ function display_account_form($UTYPE,$A,$U="",$T="",$S="", print ""; print "\n"; @@ -143,17 +144,16 @@ function display_account_form($UTYPE,$A,$U="",$T="",$S="", if ($A == "UpdateAccount") { print "   "; + print " value='".__("Update")."' />   "; } else { print "   "; + print " value='".__("Create")."' />   "; } - print ""; + print ""; print ""; print "\n"; print "
 
".__("Username").": (".__("required").")
".__("Account Suspended").":"; + print " checked=\"checked\" />"; } else { - print ">"; + print " />"; } print "
".__("Email Address").": (".__("required").")
".__("Password").":"; + print " name='P' value='".$P."' />"; if ($A != "UpdateAccount") { print " (".__("required").")"; } @@ -93,7 +94,7 @@ function display_account_form($UTYPE,$A,$U="",$T="",$S="", print "
".__("Re-type password").":"; + print " name='C' value='".$C."' />"; if ($A != "UpdateAccount") { print " (".__("required").")"; } @@ -102,13 +103,13 @@ function display_account_form($UTYPE,$A,$U="",$T="",$S="", print "
".__("Real Name").":
".__("IRC Nick").":
".__("New Package Notify").":"; + print " checked=\"checked\" />"; } else { - print ">"; + print " />"; } print "
\n"; - print "
\n"; print "\n"; return; } # function display_account_form() @@ -436,13 +436,14 @@ function search_results_page($UTYPE,$O=0,$SB="",$U="",$T="", } else { $num_rows = mysql_num_rows($result); if ($num_rows) { - print "
\n"; print "\n"; + print " cellspacing='0' width='90%'"; + print " style=\"margin:0 auto\">\n"; print ""; print "
"; print "\n"; + print ""; print ""; print ""; print ""; + print "".$row["Username"].""; print ""; @@ -495,7 +496,7 @@ function search_results_page($UTYPE,$O=0,$SB="",$U="",$T="", # print " "; } else { - $edit_url = "account.php?Action=DisplayAccount&ID=".$row["ID"]; + $edit_url = "account.php?Action=DisplayAccount&ID=".$row["ID"]; print ""; print "Edit"; } @@ -508,39 +509,42 @@ function search_results_page($UTYPE,$O=0,$SB="",$U="",$T="", print ""; print ""; print ""; print "\n"; print "
"; print "".__("Username").""; @@ -467,7 +468,7 @@ function search_results_page($UTYPE,$O=0,$SB="",$U="",$T="", } print "
"; - print "".$row["Username"].""; print "".$row["AccountType"]; print "
"; print "
\n"; - print "\n"; + print "
"; + print "\n"; print "\n"; + print " value='".($OFFSET-$HITS_PER_PAGE)."' />\n"; reset($search_vars); while (list($k, $ind) = each($search_vars)) { print "\n"; + print " value='".${$ind}."' />\n"; } print ""; + print " value='<-- ".__("Less")."' />"; + print "
"; print "
\n"; print "
"; print "
\n"; - print "\n"; + print "
"; + print "\n"; print "\n"; + print " value='".($OFFSET+$HITS_PER_PAGE)."' />\n"; reset($search_vars); while (list($k, $ind) = each($search_vars)) { print "\n"; + print " value='".${$ind}."' />\n"; } print ""; + print " value='".__("More")." -->' />"; + print "
"; print "
\n"; print "
\n"; - print "\n"; } else { - print "
\n"; + print "

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

\n"; + print "

\n"; } } return; @@ -557,8 +561,7 @@ function display_account_info($U="", $T="", $E="", $R="", $I="") { global $SUPPORTED_LANGS; - print "
\n"; - print "\n"; + print "
\n"; print " \n"; print " \n"; print " \n"; @@ -578,7 +581,8 @@ function display_account_info($U="", $T="", $E="", $R="", $I="") { } elseif ($T == "Developer") { print __("Developer"); } - print "\n"; + print " \n"; + print " \n"; print " \n"; print " \n"; @@ -596,11 +600,10 @@ function display_account_info($U="", $T="", $E="", $R="", $I="") { print " \n"; print " \n"; - print " \n"; + print " \n"; print " \n"; print "
 
".__("Email Address").":
".__("View this user's packages")."".__("View this user's packages")."
\n"; - print "
\n"; return; } -- cgit v1.2.3-24-g4f1b