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/html/addvote.php | 16 +++-- web/html/css/containers.css | 3 + web/html/tu.php | 2 +- web/html/voters.php | 2 +- web/lib/acctfuncs.inc | 79 +++++++++++---------- web/template/actions_form.php | 25 +++---- web/template/header.php | 4 +- web/template/pkg_comment_form.php | 8 +-- web/template/pkg_comments.php | 14 ++-- web/template/pkg_details.php | 17 +++-- web/template/pkg_search_results.php | 10 +-- web/template/search_accounts_form.php | 130 +++++++++++++++++----------------- web/template/tu_details.php | 10 +-- web/template/tu_list.php | 4 +- 14 files changed, 170 insertions(+), 154 deletions(-) diff --git a/web/html/addvote.php b/web/html/addvote.php index 192b396b..5936d563 100644 --- a/web/html/addvote.php +++ b/web/html/addvote.php @@ -73,18 +73,22 @@ if ($atype == "Trusted User" OR $atype == "Developer") {
+

-'> +' /> -
+

+

-'> +' /> -
+

+



- -'> + +' /> +

diff --git a/web/html/css/containers.css b/web/html/css/containers.css index db5bd0a1..237950f5 100644 --- a/web/html/css/containers.css +++ b/web/html/css/containers.css @@ -161,6 +161,9 @@ th.header { border-bottom: #666 1px solid; vertical-align: bottom; } +fieldset { + border: none; +} input, textarea, select { diff --git a/web/html/tu.php b/web/html/tu.php index 65f00c0b..941e6eda 100644 --- a/web/html/tu.php +++ b/web/html/tu.php @@ -47,7 +47,7 @@ if ($atype == "Trusted User" OR $atype == "Developer") { $result = db_query($qwhoVoted,$dbh); if (mysql_num_rows($result) > 0) { while ($who = mysql_fetch_assoc($result)) { - $whovoted.= ''.$who['Username'].' '; + $whovoted.= ''.$who['Username'].' '; } } diff --git a/web/html/voters.php b/web/html/voters.php index a3b24690..f4d72f40 100644 --- a/web/html/voters.php +++ b/web/html/voters.php @@ -28,7 +28,7 @@ if ($account == 'Trusted User' || $account == 'Developer') { $uid = $row['UsersID']; $username = $row['Username']; ?> - +
\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 " - + @@ -62,15 +62,15 @@ for ($i = 0; $row = mysql_fetch_assoc($result); $i++) { + - + + - +
"; 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; } diff --git a/web/template/actions_form.php b/web/template/actions_form.php index 5eab2340..45bc09bc 100644 --- a/web/template/actions_form.php +++ b/web/template/actions_form.php @@ -1,7 +1,8 @@
- ]' value='1'> - +
+ ]' value='1' /> + "; + echo " value='".__("Vote")."' /> "; } else { echo " "; + echo " value='".__("UnVote")."' /> "; } # Comment Notify Button @@ -21,36 +22,36 @@ $q.= " AND PkgID = ".$row["ID"]; if (!mysql_num_rows(db_query($q, $dbh))) { echo " "; + echo " value='".__("Notify")."' title='".__("New Comment Notification")."' /> "; } else { echo " "; + echo " value='".__("UnNotify")."' title='".__("No New Comment Notification")."' /> "; } if ($row["OutOfDateTS"] === NULL) { echo "\n"; + echo " value='".__("Flag Out-of-date")."' />\n"; } else { echo "\n"; + echo " value='".__("UnFlag Out-of-date")."' />\n"; } if ($row["MaintainerUID"] === NULL) { echo "\n"; + echo " value='".__("Adopt Packages")."' />\n"; } else if ($uid == $row["MaintainerUID"] || $atype == "Trusted User" || $atype == "Developer") { echo "\n"; + echo " value='".__("Disown Packages")."' />\n"; } if ($atype == "Trusted User" || $atype == "Developer") { echo "\n"; + echo " value='".__("Delete Packages")."' />\n"; echo " "; echo __("Confirm")."\n"; } ?> - +
diff --git a/web/template/header.php b/web/template/header.php index 8169df17..4939b574 100644 --- a/web/template/header.php +++ b/web/template/header.php @@ -37,8 +37,8 @@
  • -
  • -
  • ">
  • +
  • +
  • ">
  • diff --git a/web/template/pkg_comment_form.php b/web/template/pkg_comment_form.php index 368d49bf..346fb6a8 100644 --- a/web/template/pkg_comment_form.php +++ b/web/template/pkg_comment_form.php @@ -57,11 +57,11 @@ if (isset($_REQUEST['comment'])) { echo '' . __('Comment has been added.') . ''; } ?> - +
    -
    - "> - "> +
    + " /> + " /> diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php index dce3a171..8e64e11a 100644 --- a/web/template/pkg_comments.php +++ b/web/template/pkg_comments.php @@ -8,15 +8,17 @@ while (list($indx, $carr) = each($comments)) { ?> $carr['UserName'] = "{$carr['UserName']}"; } - $commentHeader =__('Comment by: %s on %s', $carr['UserName'], gmdate('r', $carr['CommentTS'])); + $commentHeader = '

    ' . __('Comment by: %s on %s', $carr['UserName'], gmdate('r', $carr['CommentTS'])) . '

    '; if (canDeleteCommentArray($carr, $atype, $uid)) { - $durl = '
    '; - $durl.= ''; - $durl.= ''; - $durl.= ''; + $durl.= '
    '; + $durl.= ''; + $durl.= ''; + $durl.= '"; } diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index 6a624e9c..3b96791f 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -5,23 +5,25 @@ if ($uid == $row["MaintainerUID"] or ($atype == "Developer" or $atype == "Trusted User")) { $catarr = pkgCategories(); - $edit_cat = "\n"; - $edit_cat.= ""; - $edit_cat.= "Category: "; + $edit_cat = "\n"; + $edit_cat.= "

    "; + $edit_cat.= ""; + $edit_cat.= "Category: "; $edit_cat.= " "; + $edit_cat.= " "; + $edit_cat.= "

    "; $edit_cat.= ""; } else { - $edit_cat = "Category: ".$row['Category']; + $edit_cat = "Category: " . $row['Category'] . ""; } if ($row["SubmitterUID"]) { @@ -69,8 +71,9 @@ $out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : gmdate("r", intval($row[

    + +

    -


    diff --git a/web/template/pkg_search_results.php b/web/template/pkg_search_results.php index c8c29f2c..40ad029f 100644 --- a/web/template/pkg_search_results.php +++ b/web/template/pkg_search_results.php @@ -54,7 +54,7 @@ for ($i = 0; $row = mysql_fetch_assoc($result); $i++) { ?>

    - - diff --git a/web/template/search_accounts_form.php b/web/template/search_accounts_form.php index 17be75ee..9d6c40d0 100644 --- a/web/template/search_accounts_form.php +++ b/web/template/search_accounts_form.php @@ -1,78 +1,76 @@
    - -
    - +
    - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + -
    : - -
    : + +
    : - -
    : + +
    : - -
    : + +
    : - -
    : + +
    : - -
    : + +
    : - -
    : + +
    : - -
    : + +
      -
    - " /> - " /> -
      +
    + + " /> + " /> +
    -
    +
    diff --git a/web/template/tu_details.php b/web/template/tu_details.php index 315e1b90..7d6c305d 100644 --- a/web/template/tu_details.php +++ b/web/template/tu_details.php @@ -65,10 +65,12 @@ if (!$isrunning) { ?>
    ' method='post'> - - - - +
    + + + + +
    diff --git a/web/template/tu_list.php b/web/template/tu_list.php index f64d3834..3a927d9a 100644 --- a/web/template/tu_list.php +++ b/web/template/tu_list.php @@ -1,5 +1,5 @@
    -
    +
    @@ -29,7 +29,7 @@
    " . $row['User'] . ""; + print "" . $row['User'] . ""; } else { print "N/A"; } -- cgit v1.2.3-24-g4f1b