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 <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2011-03-11 18:54:44 +01:00
parent c34bebf428
commit 7f9e498e48
14 changed files with 170 additions and 154 deletions

View file

@ -73,18 +73,22 @@ if ($atype == "Trusted User" OR $atype == "Developer") {
<div class="pgboxtitle"><?php print __("Submit a proposal to vote on.") ?></div> <div class="pgboxtitle"><?php print __("Submit a proposal to vote on.") ?></div>
<div class="pgboxbody"> <div class="pgboxbody">
<form action='addvote.php' method='post'> <form action='addvote.php' method='post'>
<p>
<b><?php print __('Applicant/TU') ?></b> <b><?php print __('Applicant/TU') ?></b>
<input type='text' name='user' value='<?php if (!empty($_POST['user'])) { print htmlentities($_POST['user'], ENT_QUOTES); } ?>'> <input type='text' name='user' value='<?php if (!empty($_POST['user'])) { print htmlentities($_POST['user'], ENT_QUOTES); } ?>' />
<?php print __("(empty if not applicable)") ?> <?php print __("(empty if not applicable)") ?>
<br /> </p>
<p>
<b><?php print __('Length in days') ?></b> <b><?php print __('Length in days') ?></b>
<input type='text' name='length' value='<?php if (!empty($_POST['length'])) { print htmlentities($_POST['length'], ENT_QUOTES); } ?>'> <input type='text' name='length' value='<?php if (!empty($_POST['length'])) { print htmlentities($_POST['length'], ENT_QUOTES); } ?>' />
<?php print __("(defaults to 7 if empty)") ?> <?php print __("(defaults to 7 if empty)") ?>
<br /> </p>
<p>
<b><?php print __('Proposal') ?></b><br /> <b><?php print __('Proposal') ?></b><br />
<textarea name='agenda' rows='25' cols='80'><?php if (!empty($_POST['agenda'])) { print htmlentities($_POST['agenda']); } ?></textarea><br /> <textarea name='agenda' rows='25' cols='80'><?php if (!empty($_POST['agenda'])) { print htmlentities($_POST['agenda']); } ?></textarea><br />
<input type='hidden' name='addVote' value='1'> <input type='hidden' name='addVote' value='1' />
<input type='submit' class='button' value='<?php print __('Submit'); ?>'> <input type='submit' class='button' value='<?php print __('Submit'); ?>' />
</p>
</form> </form>
</div> </div>
</div> </div>

View file

@ -161,6 +161,9 @@ th.header {
border-bottom: #666 1px solid; border-bottom: #666 1px solid;
vertical-align: bottom; vertical-align: bottom;
} }
fieldset {
border: none;
}
input, input,
textarea, textarea,
select { select {

View file

@ -47,7 +47,7 @@ if ($atype == "Trusted User" OR $atype == "Developer") {
$result = db_query($qwhoVoted,$dbh); $result = db_query($qwhoVoted,$dbh);
if (mysql_num_rows($result) > 0) { if (mysql_num_rows($result) > 0) {
while ($who = mysql_fetch_assoc($result)) { while ($who = mysql_fetch_assoc($result)) {
$whovoted.= '<a href="account.php?Action=AccountInfo&ID='.$who['UserID'].'">'.$who['Username'].'</a> '; $whovoted.= '<a href="account.php?Action=AccountInfo&amp;ID='.$who['UserID'].'">'.$who['Username'].'</a> ';
} }
} }

View file

@ -28,7 +28,7 @@ if ($account == 'Trusted User' || $account == 'Developer') {
$uid = $row['UsersID']; $uid = $row['UsersID'];
$username = $row['Username']; $username = $row['Username'];
?> ?>
<a href="account.php?Action=AccountInfo&ID=<?php echo $uid ?>"> <a href="account.php?Action=AccountInfo&amp;ID=<?php echo $uid ?>">
<?php echo $username ?></a><br /> <?php echo $username ?></a><br />
<?php <?php
} }

View file

@ -29,18 +29,19 @@ function display_account_form($UTYPE,$A,$U="",$T="",$S="",
global $SUPPORTED_LANGS; global $SUPPORTED_LANGS;
print "<form action='account.php' method='post'>\n"; print "<form action='account.php' method='post'>\n";
print "<input type='hidden' name='Action' value='".$A."'>\n"; print "<fieldset>";
print "<input type='hidden' name='Action' value='".$A."' />\n";
if ($UID) { if ($UID) {
print "<input type='hidden' name='ID' value='".$UID."'>\n"; print "<input type='hidden' name='ID' value='".$UID."' />\n";
} }
print "<center>\n"; print "</fieldset>";
print "<table border='0' cellpadding='0' cellspacing='0' width='80%'>\n"; print "<table border='0' cellpadding='0' cellspacing='0' width='80%' style=\"margin:0 auto;\">\n";
print "<tr><td colspan='2'>&nbsp;</td></tr>\n"; print "<tr><td colspan='2'>&nbsp;</td></tr>\n";
print "<tr>"; print "<tr>";
print "<td align='left'>".__("Username").":</td>"; print "<td align='left'>".__("Username").":</td>";
print "<td align='left'><input type='text' size='30' maxlength='64'"; print "<td align='left'><input type='text' size='30' maxlength='64'";
print " name='U' value='".htmlspecialchars($U,ENT_QUOTES)."'> (".__("required").")</td>"; print " name='U' value='".htmlspecialchars($U,ENT_QUOTES)."' /> (".__("required").")</td>";
print "</tr>\n"; print "</tr>\n";
# Only TUs or Devs can promote/demote/suspend a user # Only TUs or Devs can promote/demote/suspend a user
@ -68,9 +69,9 @@ function display_account_form($UTYPE,$A,$U="",$T="",$S="",
print "<td align='left'>".__("Account Suspended").":</td>"; print "<td align='left'>".__("Account Suspended").":</td>";
print "<td align='left'><input type='checkbox' name='S'"; print "<td align='left'><input type='checkbox' name='S'";
if ($S) { if ($S) {
print " checked>"; print " checked=\"checked\" />";
} else { } else {
print ">"; print " />";
} }
print "</tr>\n"; print "</tr>\n";
} }
@ -78,13 +79,13 @@ function display_account_form($UTYPE,$A,$U="",$T="",$S="",
print "<tr>"; print "<tr>";
print "<td align='left'>".__("Email Address").":</td>"; print "<td align='left'>".__("Email Address").":</td>";
print "<td align='left'><input type='text' size='30' maxlength='64'"; print "<td align='left'><input type='text' size='30' maxlength='64'";
print " name='E' value='".htmlspecialchars($E,ENT_QUOTES)."'> (".__("required").")</td>"; print " name='E' value='".htmlspecialchars($E,ENT_QUOTES)."' /> (".__("required").")</td>";
print "</tr>\n"; print "</tr>\n";
print "<tr>"; print "<tr>";
print "<td align='left'>".__("Password").":</td>"; print "<td align='left'>".__("Password").":</td>";
print "<td align='left'><input type='password' size='30' maxlength='32'"; print "<td align='left'><input type='password' size='30' maxlength='32'";
print " name='P' value='".$P."'>"; print " name='P' value='".$P."' />";
if ($A != "UpdateAccount") { if ($A != "UpdateAccount") {
print " (".__("required").")"; print " (".__("required").")";
} }
@ -93,7 +94,7 @@ function display_account_form($UTYPE,$A,$U="",$T="",$S="",
print "<tr>"; print "<tr>";
print "<td align='left'>".__("Re-type password").":</td>"; print "<td align='left'>".__("Re-type password").":</td>";
print "<td align='left'><input type='password' size='30' maxlength='32'"; print "<td align='left'><input type='password' size='30' maxlength='32'";
print " name='C' value='".$C."'>"; print " name='C' value='".$C."' />";
if ($A != "UpdateAccount") { if ($A != "UpdateAccount") {
print " (".__("required").")"; print " (".__("required").")";
} }
@ -102,13 +103,13 @@ function display_account_form($UTYPE,$A,$U="",$T="",$S="",
print "<tr>"; print "<tr>";
print "<td align='left'>".__("Real Name").":</td>"; print "<td align='left'>".__("Real Name").":</td>";
print "<td align='left'><input type='text' size='30' maxlength='32'"; print "<td align='left'><input type='text' size='30' maxlength='32'";
print " name='R' value='".htmlspecialchars($R,ENT_QUOTES)."'></td>"; print " name='R' value='".htmlspecialchars($R,ENT_QUOTES)."' /></td>";
print "</tr>\n"; print "</tr>\n";
print "<tr>"; print "<tr>";
print "<td align='left'>".__("IRC Nick").":</td>"; print "<td align='left'>".__("IRC Nick").":</td>";
print "<td align='left'><input type='text' size='30' maxlength='32'"; print "<td align='left'><input type='text' size='30' maxlength='32'";
print " name='I' value='".htmlspecialchars($I,ENT_QUOTES)."'></td>"; print " name='I' value='".htmlspecialchars($I,ENT_QUOTES)."' /></td>";
print "</tr>\n"; print "</tr>\n";
print "<tr>"; print "<tr>";
@ -130,9 +131,9 @@ function display_account_form($UTYPE,$A,$U="",$T="",$S="",
print "<td align='left'>".__("New Package Notify").":</td>"; print "<td align='left'>".__("New Package Notify").":</td>";
print "<td align='left'><input type='checkbox' name='N'"; print "<td align='left'><input type='checkbox' name='N'";
if ($N) { if ($N) {
print " checked>"; print " checked=\"checked\" />";
} else { } else {
print ">"; print " />";
} }
print "</tr>\n"; print "</tr>\n";
@ -143,17 +144,16 @@ function display_account_form($UTYPE,$A,$U="",$T="",$S="",
if ($A == "UpdateAccount") { if ($A == "UpdateAccount") {
print "<input type='submit' class='button'"; print "<input type='submit' class='button'";
print " value='".__("Update")."'> &nbsp; "; print " value='".__("Update")."' /> &nbsp; ";
} else { } else {
print "<input type='submit' class='button'"; print "<input type='submit' class='button'";
print " value='".__("Create")."'> &nbsp; "; print " value='".__("Create")."' /> &nbsp; ";
} }
print "<input type='reset' class='button' value='".__("Reset")."'>"; print "<input type='reset' class='button' value='".__("Reset")."' />";
print "</td>"; print "</td>";
print "</tr>\n"; print "</tr>\n";
print "</table>\n"; print "</table>\n";
print "</center>\n";
print "</form>\n"; print "</form>\n";
return; return;
} # function display_account_form() } # function display_account_form()
@ -436,13 +436,14 @@ function search_results_page($UTYPE,$O=0,$SB="",$U="",$T="",
} else { } else {
$num_rows = mysql_num_rows($result); $num_rows = mysql_num_rows($result);
if ($num_rows) { if ($num_rows) {
print "<center>\n";
print "<table border='0' cellpadding='0'"; print "<table border='0' cellpadding='0'";
print " cellspacing='0' width='90%'>\n"; print " cellspacing='0' width='90%'";
print " style=\"margin:0 auto\">\n";
print "<tr>"; print "<tr>";
print "<td colspan='2'>"; print "<td colspan='2'>";
print "<table border='0' cellpadding='0'"; print "<table border='0' cellpadding='0'";
print " cellspacing='0' width='100%'>\n"; print " cellspacing='0' width='100%'>\n";
print "<tr>";
print "<th class='header'>"; print "<th class='header'>";
print "<span class='f2'>".__("Username")."</span></th>"; print "<span class='f2'>".__("Username")."</span></th>";
print "<th class='header'>"; print "<th class='header'>";
@ -467,7 +468,7 @@ function search_results_page($UTYPE,$O=0,$SB="",$U="",$T="",
} }
print "<tr>"; print "<tr>";
print "<td class='".$c."'>"; print "<td class='".$c."'>";
print "<span class='f5'><a href='packages.php?SeB=m&K=".$row["Username"]."'>".$row["Username"]."</a></span></td>"; print "<span class='f5'><a href='packages.php?SeB=m&amp;K=".$row["Username"]."'>".$row["Username"]."</a></span></td>";
print "<td class='".$c."'>"; print "<td class='".$c."'>";
print "<span class='f5'>".$row["AccountType"]; print "<span class='f5'>".$row["AccountType"];
print "</span></td>"; print "</span></td>";
@ -495,7 +496,7 @@ function search_results_page($UTYPE,$O=0,$SB="",$U="",$T="",
# #
print "&nbsp;</span></td>"; print "&nbsp;</span></td>";
} else { } else {
$edit_url = "account.php?Action=DisplayAccount&ID=".$row["ID"]; $edit_url = "account.php?Action=DisplayAccount&amp;ID=".$row["ID"];
print "<a href='".$edit_url . "'>"; print "<a href='".$edit_url . "'>";
print "Edit</a></span></td>"; print "Edit</a></span></td>";
} }
@ -508,39 +509,42 @@ function search_results_page($UTYPE,$O=0,$SB="",$U="",$T="",
print "<tr>"; print "<tr>";
print "<td align='left'>"; print "<td align='left'>";
print "<form action='account.php' method='post'>\n"; print "<form action='account.php' method='post'>\n";
print "<input type='hidden' name='Action' value='SearchAccounts'>\n"; print "<fieldset>";
print "<input type='hidden' name='Action' value='SearchAccounts' />\n";
print "<input type='hidden' name='O'"; print "<input type='hidden' name='O'";
print " value='".($OFFSET-$HITS_PER_PAGE)."'>\n"; print " value='".($OFFSET-$HITS_PER_PAGE)."' />\n";
reset($search_vars); reset($search_vars);
while (list($k, $ind) = each($search_vars)) { while (list($k, $ind) = each($search_vars)) {
print "<input type='hidden' name='".$ind."'"; print "<input type='hidden' name='".$ind."'";
print " value='".${$ind}."'>\n"; print " value='".${$ind}."' />\n";
} }
print "<input type='submit' class='button'"; print "<input type='submit' class='button'";
print " value='&lt;-- ".__("Less")."'>"; print " value='&lt;-- ".__("Less")."' />";
print "</fieldset>";
print "</form>\n"; print "</form>\n";
print "</td>"; print "</td>";
print "<td align='right'>"; print "<td align='right'>";
print "<form action='account.php' method='post'>\n"; print "<form action='account.php' method='post'>\n";
print "<input type='hidden' name='Action' value='SearchAccounts'>\n"; print "<fieldset>";
print "<input type='hidden' name='Action' value='SearchAccounts' />\n";
print "<input type='hidden' name='O'"; print "<input type='hidden' name='O'";
print " value='".($OFFSET+$HITS_PER_PAGE)."'>\n"; print " value='".($OFFSET+$HITS_PER_PAGE)."' />\n";
reset($search_vars); reset($search_vars);
while (list($k, $ind) = each($search_vars)) { while (list($k, $ind) = each($search_vars)) {
print "<input type='hidden' name='".$ind."'"; print "<input type='hidden' name='".$ind."'";
print " value='".${$ind}."'>\n"; print " value='".${$ind}."' />\n";
} }
print "<input type='submit' class='button'"; print "<input type='submit' class='button'";
print " value='".__("More")." --&gt;'>"; print " value='".__("More")." --&gt;' />";
print "</fieldset>";
print "</form>\n"; print "</form>\n";
print "</td>"; print "</td>";
print "</tr>\n"; print "</tr>\n";
print "</table>\n"; print "</table>\n";
print "</center>\n";
} else { } else {
print "<center>\n"; print "<p style=\"text-align:center;\">\n";
print __("No more results to display."); print __("No more results to display.");
print "</center>\n"; print "</p>\n";
} }
} }
return; return;
@ -557,8 +561,7 @@ function display_account_info($U="", $T="", $E="", $R="", $I="") {
global $SUPPORTED_LANGS; global $SUPPORTED_LANGS;
print "<center>\n"; print "<table border='0' cellpadding='0' cellspacing='0' width='33%' style=\"margin:0 auto;\">\n";
print "<table border='0' cellpadding='0' cellspacing='0' width='33%'>\n";
print " <tr>\n"; print " <tr>\n";
print " <td colspan='2'>&nbsp;</td>\n"; print " <td colspan='2'>&nbsp;</td>\n";
print " </tr>\n"; print " </tr>\n";
@ -578,7 +581,8 @@ function display_account_info($U="", $T="", $E="", $R="", $I="") {
} elseif ($T == "Developer") { } elseif ($T == "Developer") {
print __("Developer"); print __("Developer");
} }
print "</td>\n"; print " </td>\n";
print " </tr>\n";
print " <tr>\n"; print " <tr>\n";
print " <td align='left'>".__("Email Address").":</td>\n"; print " <td align='left'>".__("Email Address").":</td>\n";
@ -596,11 +600,10 @@ function display_account_info($U="", $T="", $E="", $R="", $I="") {
print " </tr>\n"; print " </tr>\n";
print " <tr>\n"; print " <tr>\n";
print " <td colspan='2'><a href='packages.php?K=".$U."&SeB=m'>".__("View this user's packages")."</a></td>\n"; print " <td colspan='2'><a href='packages.php?K=".$U."&amp;SeB=m'>".__("View this user's packages")."</a></td>\n";
print " </tr>\n"; print " </tr>\n";
print "</table>\n"; print "</table>\n";
print "</center>\n";
return; return;
} }

View file

@ -1,7 +1,8 @@
<div class="pgbox"> <div class="pgbox">
<form action="packages.php?ID=<?php echo $row['ID'] ?>" method="post"> <form action="packages.php?ID=<?php echo $row['ID'] ?>" method="post">
<input type='hidden' name='IDs[<?php echo $row['ID'] ?>]' value='1'> <fieldset>
<input type='hidden' name='ID' value="<?php echo $row['ID'] ?>"> <input type='hidden' name='IDs[<?php echo $row['ID'] ?>]' value='1' />
<input type='hidden' name='ID' value="<?php echo $row['ID'] ?>" />
<?php <?php
# Voting Button # Voting Button
# #
@ -9,10 +10,10 @@
$q.= " AND PackageID = ".$row["ID"]; $q.= " AND PackageID = ".$row["ID"];
if (!mysql_num_rows(db_query($q, $dbh))) { if (!mysql_num_rows(db_query($q, $dbh))) {
echo " <input type='submit' class='button' name='do_Vote'"; echo " <input type='submit' class='button' name='do_Vote'";
echo " value='".__("Vote")."'> "; echo " value='".__("Vote")."' /> ";
} else { } else {
echo "<input type='submit' class='button' name='do_UnVote'"; echo "<input type='submit' class='button' name='do_UnVote'";
echo " value='".__("UnVote")."'> "; echo " value='".__("UnVote")."' /> ";
} }
# Comment Notify Button # Comment Notify Button
@ -21,36 +22,36 @@
$q.= " AND PkgID = ".$row["ID"]; $q.= " AND PkgID = ".$row["ID"];
if (!mysql_num_rows(db_query($q, $dbh))) { if (!mysql_num_rows(db_query($q, $dbh))) {
echo "<input type='submit' class='button' name='do_Notify'"; echo "<input type='submit' class='button' name='do_Notify'";
echo " value='".__("Notify")."' title='".__("New Comment Notification")."'> "; echo " value='".__("Notify")."' title='".__("New Comment Notification")."' /> ";
} else { } else {
echo "<input type='submit' class='button' name='do_UnNotify'"; echo "<input type='submit' class='button' name='do_UnNotify'";
echo " value='".__("UnNotify")."' title='".__("No New Comment Notification")."'> "; echo " value='".__("UnNotify")."' title='".__("No New Comment Notification")."' /> ";
} }
if ($row["OutOfDateTS"] === NULL) { if ($row["OutOfDateTS"] === NULL) {
echo "<input type='submit' class='button' name='do_Flag'"; echo "<input type='submit' class='button' name='do_Flag'";
echo " value='".__("Flag Out-of-date")."'>\n"; echo " value='".__("Flag Out-of-date")."' />\n";
} else { } else {
echo "<input type='submit' class='button' name='do_UnFlag'"; echo "<input type='submit' class='button' name='do_UnFlag'";
echo " value='".__("UnFlag Out-of-date")."'>\n"; echo " value='".__("UnFlag Out-of-date")."' />\n";
} }
if ($row["MaintainerUID"] === NULL) { if ($row["MaintainerUID"] === NULL) {
echo "<input type='submit' class='button' name='do_Adopt'"; echo "<input type='submit' class='button' name='do_Adopt'";
echo " value='".__("Adopt Packages")."'>\n"; echo " value='".__("Adopt Packages")."' />\n";
} else if ($uid == $row["MaintainerUID"] || } else if ($uid == $row["MaintainerUID"] ||
$atype == "Trusted User" || $atype == "Developer") { $atype == "Trusted User" || $atype == "Developer") {
echo "<input type='submit' class='button' name='do_Disown'"; echo "<input type='submit' class='button' name='do_Disown'";
echo " value='".__("Disown Packages")."'>\n"; echo " value='".__("Disown Packages")."' />\n";
} }
if ($atype == "Trusted User" || $atype == "Developer") { if ($atype == "Trusted User" || $atype == "Developer") {
echo "<input type='submit' class='button' name='do_Delete'"; echo "<input type='submit' class='button' name='do_Delete'";
echo " value='".__("Delete Packages")."'>\n"; echo " value='".__("Delete Packages")."' />\n";
echo "<input type='checkbox' name='confirm_Delete' value='1' /> "; echo "<input type='checkbox' name='confirm_Delete' value='1' /> ";
echo __("Confirm")."\n"; echo __("Confirm")."\n";
} }
?> ?>
</fieldset>
</form> </form>
</div> </div>

View file

@ -37,8 +37,8 @@
<li><a href="http://bugs.archlinux.org/index.php?tasks=all&amp;project=2"><?php print __("Bugs"); ?></a></li> <li><a href="http://bugs.archlinux.org/index.php?tasks=all&amp;project=2"><?php print __("Bugs"); ?></a></li>
<li><a href="http://archlinux.org/mailman/listinfo/aur-general"><?php print __("Discussion"); ?></a></li> <li><a href="http://archlinux.org/mailman/listinfo/aur-general"><?php print __("Discussion"); ?></a></li>
<?php if (isset($_COOKIE['AURSID'])): ?> <?php if (isset($_COOKIE['AURSID'])): ?>
<?php if (check_user_privileges()): ?><li><a href="tu.php"><?php print __("Trusted User"); ?></a><?php endif; ?> <?php if (check_user_privileges()): ?><li><a href="tu.php"><?php print __("Trusted User"); ?></a></li><?php endif; ?>
<li><a href="packages.php?SeB=m&K=<?php print username_from_sid($_COOKIE["AURSID"]); ?>"><?php print __("My Packages"); ?></a></li> <li><a href="packages.php?SeB=m&amp;K=<?php print username_from_sid($_COOKIE["AURSID"]); ?>"><?php print __("My Packages"); ?></a></li>
<li><a href="pkgsubmit.php"><?php print __("Submit"); ?></a></li> <li><a href="pkgsubmit.php"><?php print __("Submit"); ?></a></li>
<?php endif; ?> <?php endif; ?>
</ul> </ul>

View file

@ -57,11 +57,11 @@ if (isset($_REQUEST['comment'])) {
echo '<b>' . __('Comment has been added.') . '</b>'; echo '<b>' . __('Comment has been added.') . '</b>';
} }
?> ?>
<input type='hidden' name='ID' value="<?php echo $_REQUEST['ID'] ?>"> <input type='hidden' name='ID' value="<?php echo $_REQUEST['ID'] ?>" />
<?php echo __('Enter your comment below.') ?><br /> <?php echo __('Enter your comment below.') ?><br />
<textarea name='comment' rows='10' style="width: 100%"></textarea><br /> <textarea name='comment' cols='80' rows='10' style="width: 100%"></textarea><br />
<input type='submit' value="<?php echo __("Submit") ?>"> <input type='submit' value="<?php echo __("Submit") ?>" />
<input type='reset' value="<?php echo __("Reset") ?>"> <input type='reset' value="<?php echo __("Reset") ?>" />
</div> </div>
</form> </form>
</div> </div>

View file

@ -8,15 +8,17 @@ while (list($indx, $carr) = each($comments)) { ?>
$carr['UserName'] = "<a href=\"account.php?Action=AccountInfo&amp;ID={$carr['UsersID']}\">{$carr['UserName']}</a>"; $carr['UserName'] = "<a href=\"account.php?Action=AccountInfo&amp;ID={$carr['UsersID']}\">{$carr['UserName']}</a>";
} }
$commentHeader =__('Comment by: %s on %s', $carr['UserName'], gmdate('r', $carr['CommentTS'])); $commentHeader = '<p style="display:inline;">' . __('Comment by: %s on %s', $carr['UserName'], gmdate('r', $carr['CommentTS'])) . '</p>';
if (canDeleteCommentArray($carr, $atype, $uid)) { if (canDeleteCommentArray($carr, $atype, $uid)) {
$durl = '<form method="POST" action="packages.php?ID='.$row['ID'].'">'; $durl = '<form method="post" action="packages.php?ID='.$row['ID'].'">';
$durl.= '<input type="hidden" name="action" value="do_DeleteComment">'; $durl.= '<fieldset style="display:inline;">';
$durl.= '<input type="hidden" name="comment_id" value="'.$carr['ID'].'">'; $durl.= '<input type="hidden" name="action" value="do_DeleteComment" />';
$durl.= '<input type="image" src="images/x.png" border="0" '; $durl.= '<input type="hidden" name="comment_id" value="'.$carr['ID'].'" />';
$durl.= '<input type="image" src="images/x.png" ';
$durl.= ' alt="'.__("Delete comment").'" name="submit" value="1" '; $durl.= ' alt="'.__("Delete comment").'" name="submit" value="1" ';
$durl.= ' width="19" height="18">&nbsp;'; $durl.= ' />&nbsp;';
$durl.= '</fieldset>';
$commentHeader = $durl.$commentHeader."</form>"; $commentHeader = $durl.$commentHeader."</form>";
} }

View file

@ -5,23 +5,25 @@ if ($uid == $row["MaintainerUID"] or
($atype == "Developer" or $atype == "Trusted User")) { ($atype == "Developer" or $atype == "Trusted User")) {
$catarr = pkgCategories(); $catarr = pkgCategories();
$edit_cat = "<form method='POST' action='packages.php?ID=".$pkgid."'>\n"; $edit_cat = "<form method='post' action='packages.php?ID=".$pkgid."'>\n";
$edit_cat.= "<input type='hidden' name='action' value='do_ChangeCategory'>"; $edit_cat.= "<p>";
$edit_cat.= "Category: "; $edit_cat.= "<input type='hidden' name='action' value='do_ChangeCategory' />";
$edit_cat.= "<span class='f3'>Category:</span> ";
$edit_cat.= "<select name='category_id'>\n"; $edit_cat.= "<select name='category_id'>\n";
foreach ($catarr as $cid => $catname) { foreach ($catarr as $cid => $catname) {
$edit_cat.= "<option value='$cid'"; $edit_cat.= "<option value='$cid'";
if ($cid == $row["CategoryID"]) { if ($cid == $row["CategoryID"]) {
$edit_cat.="selected"; $edit_cat.=" selected='selected'";
} }
$edit_cat.=">".$catname."</option>"; $edit_cat.=">".$catname."</option>";
} }
$edit_cat.= "</select>&nbsp;<input type='submit' value='Change category'>"; $edit_cat.= "</select>&nbsp;<input type='submit' value='Change category' />";
$edit_cat.= "</p>";
$edit_cat.= "</form>"; $edit_cat.= "</form>";
} }
else { else {
$edit_cat = "Category: ".$row['Category']; $edit_cat = "<span class='f3'>Category: " . $row['Category'] . "</span>";
} }
if ($row["SubmitterUID"]) { if ($row["SubmitterUID"]) {
@ -69,8 +71,9 @@ $out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : gmdate("r", intval($row[
<span class='f3'><?php echo htmlspecialchars($row['Description'], ENT_QUOTES); ?></span> <span class='f3'><?php echo htmlspecialchars($row['Description'], ENT_QUOTES); ?></span>
</p> </p>
<?php echo $edit_cat ?>
<p> <p>
<span class='f3'><?php echo $edit_cat ?></span><br />
<span class='f3'><?php echo __('Submitter') .': ' . $submitter ?></span><br /> <span class='f3'><?php echo __('Submitter') .': ' . $submitter ?></span><br />
<span class='f3'><?php echo __('Maintainer') .': ' . $maintainer ?></span><br /> <span class='f3'><?php echo __('Maintainer') .': ' . $maintainer ?></span><br />
<span class='f3'><?php echo $votes ?></span> <span class='f3'><?php echo $votes ?></span>

View file

@ -54,7 +54,7 @@ for ($i = 0; $row = mysql_fetch_assoc($result); $i++) {
?> ?>
<tr> <tr>
<?php if ($SID): ?> <?php if ($SID): ?>
<td class='<?php print $c ?>'><input type='checkbox' name='IDs[<?php print $row["ID"] ?>]' value='1'></td> <td class='<?php print $c ?>'><input type='checkbox' name='IDs[<?php print $row["ID"] ?>]' value='1' /></td>
<?php endif; ?> <?php endif; ?>
<td class='<?php print $c ?>'><span class='f5'><span class='blue'><?php print $row["Category"] ?></span></span></td> <td class='<?php print $c ?>'><span class='f5'><span class='blue'><?php print $row["Category"] ?></span></span></td>
<td class='<?php print $c ?>'><span class='f4'><a href='packages.php?ID=<?php print $row["ID"] ?>'><span class='black'><?php print $row["Name"] ?> <?php print $row["Version"] ?></span></a></span></td> <td class='<?php print $c ?>'><span class='f4'><a href='packages.php?ID=<?php print $row["ID"] ?>'><span class='black'><?php print $row["Name"] ?> <?php print $row["Version"] ?></span></a></span></td>
@ -62,15 +62,15 @@ for ($i = 0; $row = mysql_fetch_assoc($result); $i++) {
<?php if ($SID): ?> <?php if ($SID): ?>
<td class='<?php print $c ?>'><span class='f5'><span class='blue'> <td class='<?php print $c ?>'><span class='f5'><span class='blue'>
<?php if (isset($row["Voted"])): ?> <?php if (isset($row["Voted"])): ?>
<?php print __("Yes") ?></span></td> <?php print __("Yes") ?></span></span></td>
<?php else: ?> <?php else: ?>
</span></td> </span></span></td>
<?php endif; ?> <?php endif; ?>
<td class='<?php print $c ?>'><span class='f5'><span class='blue'> <td class='<?php print $c ?>'><span class='f5'><span class='blue'>
<?php if (isset($row["Notify"])): ?> <?php if (isset($row["Notify"])): ?>
<?php print __("Yes") ?></span></td> <?php print __("Yes") ?></span></span></td>
<?php else: ?> <?php else: ?>
</span></td> </span></span></td>
<?php endif; ?> <?php endif; ?>
<?php endif; ?> <?php endif; ?>
<td class='<?php print $c ?>'><span class='f4'><span class='blue'> <td class='<?php print $c ?>'><span class='f4'><span class='blue'>

View file

@ -1,78 +1,76 @@
<br /> <br />
<form action='account.php' method='post'> <form action='account.php' method='post'>
<input type='hidden' name='Action' value='SearchAccounts' /> <table border='0' cellpadding='0' cellspacing='0' width='80%' style="margin:0 auto;">
<center>
<table border='0' cellpadding='0' cellspacing='0' width='80%'>
<tr> <tr>
<td align='left'><?php print __("Username"); ?>:</td> <td align='left'><?php print __("Username"); ?>:</td>
<td align='left'> <td align='left'>
<input type='text' size='30' maxlength='64' name='U' /> <input type='text' size='30' maxlength='64' name='U' />
</td> </td>
</tr> </tr>
<tr> <tr>
<td align='left'><?php print __("Account Type"); ?>:</td> <td align='left'><?php print __("Account Type"); ?>:</td>
<td align='left'> <td align='left'>
<select name=T> <select name="T">
<option value=''><?php print __("Any type"); ?></option> <option value=''><?php print __("Any type"); ?></option>
<option value='u'><?php print __("Normal user"); ?></option> <option value='u'><?php print __("Normal user"); ?></option>
<option value='t'><?php print __("Trusted user"); ?></option> <option value='t'><?php print __("Trusted user"); ?></option>
<option value='d'><?php print __("Developer"); ?></option> <option value='d'><?php print __("Developer"); ?></option>
</select> </select>
</td> </td>
</tr> </tr>
<tr> <tr>
<td align='left'><?php print __("Account Suspended"); ?>:</td> <td align='left'><?php print __("Account Suspended"); ?>:</td>
<td align='left'> <td align='left'>
<input type='checkbox' name='S' /> <input type='checkbox' name='S' />
</td> </td>
</tr> </tr>
<tr> <tr>
<td align='left'><?php print __("Email Address"); ?>:</td> <td align='left'><?php print __("Email Address"); ?>:</td>
<td align='left'> <td align='left'>
<input type='text' size='30' maxlength='64'name='E' /> <input type='text' size='30' maxlength='64' name='E' />
</td> </td>
</tr> </tr>
<tr> <tr>
<td align='left'><?php print __("Real Name"); ?>:</td> <td align='left'><?php print __("Real Name"); ?>:</td>
<td align='left'> <td align='left'>
<input type='text' size='30' maxlength='32' name='R' /> <input type='text' size='30' maxlength='32' name='R' />
</td> </td>
</tr> </tr>
<tr> <tr>
<td align='left'><?php print __("IRC Nick"); ?>:</td> <td align='left'><?php print __("IRC Nick"); ?>:</td>
<td align='left'> <td align='left'>
<input type='text' size='30' maxlength='32' name='I' /> <input type='text' size='30' maxlength='32' name='I' />
</td> </td>
</tr> </tr>
<tr> <tr>
<td align='left'><?php print __("Sort by"); ?>:</td> <td align='left'><?php print __("Sort by"); ?>:</td>
<td align='left'> <td align='left'>
<select name=SB> <select name="SB">
<option value='u'><?php print __("Username"); ?></option> <option value='u'><?php print __("Username"); ?></option>
<option value='t'><?php print __("Account Type"); ?></option> <option value='t'><?php print __("Account Type"); ?></option>
<option value='r'><?php print __("Real Name"); ?></option> <option value='r'><?php print __("Real Name"); ?></option>
<option value='i'><?php print __("IRC Nick"); ?></option> <option value='i'><?php print __("IRC Nick"); ?></option>
<option value='v'><?php print __("Last vote"); ?></option> <option value='v'><?php print __("Last vote"); ?></option>
</select> </select>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<td align='left'> <td align='left'>
<br /> <br />
<input type='submit' class='button' value="<?php print __("Search"); ?>" /> <input type='hidden' name='Action' value='SearchAccounts' />
<input type='reset' class='button' value="<?php print __("Reset"); ?>" /> <input type='submit' class='button' value="<?php print __("Search"); ?>" />
</td> <input type='reset' class='button' value="<?php print __("Reset"); ?>" />
</tr> </td>
</tr>
</table> </table>
</center>
</form> </form>

View file

@ -65,10 +65,12 @@ if (!$isrunning) { ?>
<div class='pgboxbody'> <div class='pgboxbody'>
<?php if ($canvote == 1) { ?> <?php if ($canvote == 1) { ?>
<form action='tu.php?id=<?php print $row['ID'] ?>' method='post'> <form action='tu.php?id=<?php print $row['ID'] ?>' method='post'>
<input type='submit' class='button' name='voteYes' value='<?php print __("Yes") ?>'> <fieldset>
<input type='submit' class='button' name='voteNo' value='<?php print __("No") ?>'> <input type='submit' class='button' name='voteYes' value='<?php print __("Yes") ?>' />
<input type='submit' class='button' name='voteAbstain' value='<?php print __("Abstain") ?>'> <input type='submit' class='button' name='voteNo' value='<?php print __("No") ?>' />
<input type='hidden' name='doVote' value='1'> <input type='submit' class='button' name='voteAbstain' value='<?php print __("Abstain") ?>' />
<input type='hidden' name='doVote' value='1' />
</fieldset>
</form> </form>
<?php } else { ?> <?php } else { ?>
<?php print $errorvote ?> <?php print $errorvote ?>

View file

@ -1,5 +1,5 @@
<div class="pgbox"> <div class="pgbox">
<div class="pgboxtitle" align="right"> <div class="pgboxtitle" style="text-align:right;">
<span class='f3'><?php print $type ?></span> <span class='f3'><?php print $type ?></span>
</div> </div>
<table width='100%' cellspacing='0' cellpadding='2'> <table width='100%' cellspacing='0' cellpadding='2'>
@ -29,7 +29,7 @@
<td class='<?php print $c ?>'><span class='f6'><span class='blue'> <td class='<?php print $c ?>'><span class='f6'><span class='blue'>
<?php <?php
if (!empty($row['User'])) { if (!empty($row['User'])) {
print "<a href='packages.php?K=" . $row['User'] . "&SeB=m'>" . $row['User'] . "</a>"; print "<a href='packages.php?K=" . $row['User'] . "&amp;SeB=m'>" . $row['User'] . "</a>";
} else { } else {
print "N/A"; print "N/A";
} }