summaryrefslogtreecommitdiffstats
path: root/web/template
diff options
context:
space:
mode:
Diffstat (limited to 'web/template')
-rw-r--r--web/template/account_details.php57
-rw-r--r--web/template/account_edit_form.php139
-rw-r--r--web/template/account_search_results.php102
-rw-r--r--web/template/actions_form.php93
-rw-r--r--web/template/footer.php16
-rw-r--r--web/template/header.php74
-rw-r--r--web/template/login_form.php38
-rw-r--r--web/template/pkg_comment_form.php80
-rw-r--r--web/template/pkg_comments.php79
-rw-r--r--web/template/pkg_details.php311
-rw-r--r--web/template/pkg_search_form.php244
-rw-r--r--web/template/pkg_search_results.php242
-rw-r--r--web/template/search_accounts_form.php68
-rw-r--r--web/template/stats/general_stats_table.php39
-rw-r--r--web/template/stats/updates_table.php46
-rw-r--r--web/template/stats/user_table.php44
-rw-r--r--web/template/tu_details.php141
-rw-r--r--web/template/tu_list.php116
18 files changed, 1043 insertions, 886 deletions
diff --git a/web/template/account_details.php b/web/template/account_details.php
new file mode 100644
index 0000000..f4c31c6
--- /dev/null
+++ b/web/template/account_details.php
@@ -0,0 +1,57 @@
+<table>
+ <tr>
+ <td colspan="2">&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td align="left"><?php echo __("Username") . ":" ?></td>
+ <td align="left"><?php echo $row["Username"] ?></td>
+ </tr>
+
+ <tr>
+ <td align="left"><?php echo __("Account Type") . ":" ?></td>
+ <td align="left">
+ <?php
+ if ($row["AccountType"] == "User") {
+ print __("User");
+ } elseif ($row["AccountType"] == "Trusted User") {
+ print __("Trusted User");
+ } elseif ($row["AccountType"] == "Developer") {
+ print __("Developer");
+ }
+ ?>
+ </td>
+ </tr>
+
+ <tr>
+ <td align="left"><?php echo __("Email Address") . ":" ?></td>
+ <td align="left"><a href="mailto:<?php echo htmlspecialchars($row["Email"], ENT_QUOTES) ?>"><?php echo htmlspecialchars($row["Email"], ENT_QUOTES) ?></a></td>
+ </tr>
+
+ <tr>
+ <td align="left"><?php echo __("Real Name") . ":" ?></td>
+ <td align="left"><?php echo htmlspecialchars($row["RealName"], ENT_QUOTES) ?></td>
+ </tr>
+
+ <tr>
+ <td align="left"><?php echo __("IRC Nick") . ":" ?></td>
+ <td align="left"><?php echo htmlspecialchars($row["IRCNick"], ENT_QUOTES) ?></td>
+ </tr>
+
+ <tr>
+ <td align="left"><?php echo __("PGP Key Fingerprint") . ":" ?></td>
+ <td align="left"><?php echo html_format_pgp_fingerprint($row["PGPKey"]) ?></td>
+ </tr>
+
+ <tr>
+ <td align="left"><?php echo __("Last Voted") . ":" ?></td>
+ <td align="left">
+ <?php print $row["LastVoted"] ? date("Y-m-d", $row["LastVoted"]) : __("Never"); ?>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2"><a href="packages.php?K=<?php echo $row['Username'] ?>&amp;SeB=m"><?php echo __("View this user's packages") ?></a></td>
+ </tr>
+
+</table>
diff --git a/web/template/account_edit_form.php b/web/template/account_edit_form.php
new file mode 100644
index 0000000..c32eb94
--- /dev/null
+++ b/web/template/account_edit_form.php
@@ -0,0 +1,139 @@
+<form action="account.php" method="post">
+ <fieldset>
+ <input type="hidden" name="Action" value="<?php echo $A ?>" />
+ <?php if ($UID): ?>
+ <input type="hidden" name="ID" value="<?php echo $UID ?>" />
+ <input type="hidden" name="token" value="<?php print htmlspecialchars($_COOKIE['AURSID']) ?>" /> </div>
+ <?php endif; ?>
+ </fieldset>
+ <table>
+ <tr>
+ <td colspan="2">&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td align="left"><?php echo __("Username") ?>:</td>
+ <td align="left"><input type="text" size="30" maxlength="64" name="U" value="<?php echo htmlspecialchars($U,ENT_QUOTES) ?>" /> (<?php echo __("required") ?>)</td>
+ </tr>
+ <?php
+ # Only TUs or Devs can promote/demote/suspend a user
+ if ($UTYPE == "Trusted User" || $UTYPE == "Developer"):
+ ?>
+ <tr>
+ <td align="left"><?php echo __("Account Type") ?>:</td>
+ <td align="left">
+ <select name=T>
+ <?php if ($T == "User"): ?>
+ <option value="1" selected><?php echo __("Normal user") ?>
+ <?php else: ?>
+ <option value="1"><?php echo __("Normal user") ?>
+ <?php endif; ?>
+ <?php if ($T == "Trusted User"): ?>
+ <option value="2" selected><?php echo __("Trusted user") ?>
+ <?php else: ?>
+ <option value="2"><?php echo __("Trusted user") ?>
+ <?php endif; ?>
+ <?php
+ # Only developers can make another account a developer
+ if ($UTYPE == "Developer"):
+ ?>
+ <option value="3"
+ <?php $T == "Developer" ? print " selected>" : print ">";
+ print __("Developer")."\n"; ?>
+ <?php endif; ?>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td align="left"><?php echo __("Account Suspended") ?>:</td>
+
+ <?php if ($S): ?>
+ <td align="left"><input type="checkbox" name="S" checked="checked" />
+ <?php else: ?>
+ <td align="left"><input type="checkbox" name="S" />
+ <?php endif; ?>
+ </tr>
+ <?php endif; ?>
+
+ <tr>
+ <td align="left"><?php echo __("Email Address") ?>:</td>
+ <td align="left"><input type="text" size="30" maxlength="64" name="E" value="<?php echo htmlspecialchars($E,ENT_QUOTES) ?>" /> (<?php echo __("required") ?>)</td>
+ </tr>
+
+ <tr>
+ <td align="left"><?php echo __("Password") ?>:</td>
+ <td align="left">
+ <input type="password" size="30" maxlength="32" name="P" value="<?php echo $P ?>" />
+ <?php if ($A != "UpdateAccount"):
+ print " (".__("required").")";
+ endif; ?>
+ </td>
+ </tr>
+
+ <tr>
+ <td align="left"><?php echo __("Re-type password") ?>:</td>
+ <td align="left">
+ <input type="password" size="30" maxlength="32" name="C" value="<?php echo $C ?>" />
+ <?php if ($A != "UpdateAccount"):
+ print " (".__("required").")";
+ endif; ?>
+ </td>
+ </tr>
+
+ <tr>
+ <td align="left"><?php echo __("Real Name") ?>:</td>
+ <td align="left">
+ <input type="text" size="30" maxlength="32" name="R" value="<?php echo htmlspecialchars($R,ENT_QUOTES) ?>" />
+ </td>
+ </tr>
+
+ <tr>
+ <td align="left"><?php echo __("IRC Nick") ?>:</td>
+ <td align="left">
+ <input type="text" size="30" maxlength="32" name="I" value="<?php echo htmlspecialchars($I,ENT_QUOTES) ?>" />
+ </td>
+ </tr>
+
+ <tr>
+ <td align="left"><?php echo __("PGP Key Fingerprint") ?>:</td>
+<td align="left">
+ <input type="text" size="30" maxlength="50" name="K" value="<?php echo html_format_pgp_fingerprint($K) ?>" />
+ </td>
+ </tr>
+
+ <tr>
+ <td align="left"><?php echo __("Language") ?>:</td>
+ <td align="left">
+ <select name=L>
+<?php
+ reset($SUPPORTED_LANGS);
+ while (list($code, $lang) = each($SUPPORTED_LANGS)) {
+ if ($L == $code) {
+ print "<option value=".$code." selected> ".$lang."\n";
+ } else {
+ print "<option value=".$code."> ".$lang."\n";
+ }
+ }
+?>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">&nbsp;</td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td align="left">
+ <?php if ($A == "UpdateAccount"): ?>
+ <input type="submit" class="button" value="<?php echo __("Update") ?>" /> &nbsp;
+ <?php else: ?>
+ <input type="submit" class="button" value="<?php echo __("Create") ?>" /> &nbsp;
+ <?php endif; ?>
+ <input type="reset" class="button" value="<?php echo __("Reset") ?>" />
+ </td>
+ </tr>
+
+ </table>
+</form>
diff --git a/web/template/account_search_results.php b/web/template/account_search_results.php
new file mode 100644
index 0000000..f2ed62e
--- /dev/null
+++ b/web/template/account_search_results.php
@@ -0,0 +1,102 @@
+<?php
+if (!$result):
+ print __("No results matched your search criteria.");
+else:
+ if ($num_rows):
+?>
+ <table class="results">
+ <thead>
+ <tr>
+ <th><?php echo __("Username") ?></th>
+ <th><?php echo __("Type") ?></th>
+ <th><?php echo __("Status") ?></th>
+ <th><?php echo __("Real Name") ?></th>
+ <th><?php echo __("IRC Nick") ?></th>
+ <th><?php echo __("PGP Key Fingerprint") ?></th>
+ <th><?php echo __("Last Voted") ?></th>
+ <th><?php echo __("Edit Account") ?></th>
+ </tr>
+ </thead>
+ <?php
+ $i = 0;
+ while (list($indx, $row) = each($userinfo)):
+ if ($i % 2):
+ $c = "even";
+ else:
+ $c = "odd";
+ endif;
+ ?>
+ <tbody>
+ <tr class ="<?php echo $c ?>">
+ <td><a href="packages.php?SeB=m&amp;K=<?php echo $row["Username"] ?>"><?php echo $row["Username"] ?></a></td>
+ <td><?php echo $row["AccountType"] ?></td>
+ <td>
+ <?php
+ if ($row["Suspended"]):
+ print __("Suspended");
+ else:
+ print __("Active");
+ endif;
+ ?>
+ </td>
+ <td><?php $row["RealName"] ? print htmlspecialchars($row["RealName"],ENT_QUOTES) : print "&nbsp;" ?></td>
+ <td><?php $row["IRCNick"] ? print htmlspecialchars($row["IRCNick"],ENT_QUOTES) : print "&nbsp;" ?></td>
+ <td><?php $row["PGPKey"] ? print html_format_pgp_fingerprint($row["PGPKey"]) : print "&nbsp;" ?></td>
+ <td><?php $row["LastVoted"] ? print date("Y-m-d", $row["LastVoted"]) : print __("Never") ?></td>
+ <td>
+ <?php
+ if ($UTYPE == "Trusted User" && $row["AccountType"] == "Developer"):
+ # TUs can't edit devs
+ print "&nbsp;";
+ else:
+ ?>
+ <a href="account.php?Action=DisplayAccount&amp;ID=<?php echo $row["ID"] ?>"><?php echo __("Edit") ?></a>
+ <?php endif; ?>
+ </td>
+ </tr>
+ <?php
+ $i++;
+ endwhile;
+ ?>
+ </table>
+
+ <table class="results">
+ <tr>
+ <td align="left">
+ <form action="account.php" method="post">
+ <fieldset>
+ <input type="hidden" name="Action" value="SearchAccounts" />
+ <input type="hidden" name="O" value="<?php echo ($OFFSET-$HITS_PER_PAGE) ?>" />
+ <?php
+ reset($search_vars);
+ while (list($k, $ind) = each($search_vars)):
+ ?>
+ <input type="hidden" name="<?php echo $ind ?>" value="<?php echo ${$ind} ?>" />
+ <?php endwhile; ?>
+ <input type="submit" class="button" value="&lt;-- <?php echo __("Less") ?>" />
+ </fieldset>
+ </form>
+ </td>
+ <td align="right">
+ <form action="account.php" method="post">
+ <fieldset>
+ <input type="hidden" name="Action" value="SearchAccounts" />
+ <input type="hidden" name="O" value="<?php echo ($OFFSET+$HITS_PER_PAGE) ?>" />
+ <?php
+ reset($search_vars);
+ while (list($k, $ind) = each($search_vars)):
+ ?>
+ <input type="hidden" name="<?php echo $ind ?>" value="<?php echo ${$ind} ?>" />
+ <?php endwhile; ?>
+ <input type="submit" class="button" value="<?php echo __("More") ?> --&gt;" />
+ </fieldset>
+ </form>
+ </td>
+ </tr>
+ </table>
+ <?php else: ?>
+ <p style="text-align:center;">
+ <?php print __("No more results to display."); ?>
+ </p>
+ <?php endif; ?>
+<?php endif; ?>
diff --git a/web/template/actions_form.php b/web/template/actions_form.php
index fa6ad72..ff0fd4e 100644
--- a/web/template/actions_form.php
+++ b/web/template/actions_form.php
@@ -1,66 +1,43 @@
-<div class="pgbox">
+<div class="box">
<form action="packages.php?ID=<?php echo $row['ID'] ?>" method="post">
<fieldset>
- <input type='hidden' name='IDs[<?php echo $row['ID'] ?>]' value='1' />
- <input type='hidden' name='ID' value="<?php echo $row['ID'] ?>" />
- <input type='hidden' name='token' value="<?php echo htmlspecialchars($_COOKIE['AURSID']) ?>" />
-<?php
- # Voting Button
- #
- $q = "SELECT * FROM PackageVotes WHERE UsersID = ". $uid;
- $q.= " AND PackageID = ".$row["ID"];
- $result = db_query($q, $dbh);
- if ($result) {
- if (!mysql_num_rows($result)) {
- echo " <input type='submit' class='button' name='do_Vote'";
- echo " value='".__("Vote")."' /> ";
- } else {
- echo "<input type='submit' class='button' name='do_UnVote'";
- echo " value='".__("UnVote")."' /> ";
- }
- }
+ <input type="hidden" name="IDs[<?php echo $row['ID'] ?>]" value="1" />
+ <input type="hidden" name="ID" value="<?php echo $row['ID'] ?>" />
+ <input type="hidden" name="token" value="<?php echo htmlspecialchars($_COOKIE['AURSID']) ?>" />
- # Comment Notify Button
- #
- $q = "SELECT * FROM CommentNotify WHERE UserID = ". $uid;
- $q.= " AND PkgID = ".$row["ID"];
- $result = db_query($q, $dbh);
- if ($result) {
- if (!mysql_num_rows($result)) {
- echo "<input type='submit' class='button' name='do_Notify'";
- echo " value='".__("Notify")."' title='".__("New Comment Notification")."' /> ";
- } else {
- echo "<input type='submit' class='button' name='do_UnNotify'";
- echo " value='".__("UnNotify")."' title='".__("No New Comment Notification")."' /> ";
- }
- }
+ <?php if (user_voted($uid, $row['ID'])): ?>
+ <input type="submit" class="button" name="do_UnVote" value="<?php echo __("UnVote") ?>" />
+ <?php else: ?>
+ <input type="submit" class="button" name="do_Vote" value="<?php echo __("Vote") ?>" />
+ <?php endif; ?>
- if ($row["OutOfDateTS"] === NULL) {
- echo "<input type='submit' class='button' name='do_Flag'";
- echo " value='".__("Flag Out-of-date")."' />\n";
- } else {
- echo "<input type='submit' class='button' name='do_UnFlag'";
- echo " value='".__("UnFlag Out-of-date")."' />\n";
- }
-
- if ($row["MaintainerUID"] === NULL) {
- echo "<input type='submit' class='button' name='do_Adopt'";
- echo " value='".__("Adopt Packages")."' />\n";
- } else if ($uid == $row["MaintainerUID"] ||
- $atype == "Trusted User" || $atype == "Developer") {
- echo "<input type='submit' class='button' name='do_Disown'";
- echo " value='".__("Disown Packages")."' />\n";
- }
+ <?php if (user_notify($uid, $row['ID'])): ?>
+ <input type="submit" class="button" name="do_UnNotify" value="<?php echo __("UnNotify") ?>" title="<?php echo __("No New Comment Notification") ?>" />
+ <?php else: ?>
+ <input type="submit" class="button" name="do_Notify" value="<?php echo __("Notify") ?>" title="<?php echo __("New Comment Notification") ?>" />
+ <?php endif; ?>
+
+ <?php if ($row["OutOfDateTS"] === NULL): ?>
+ <input type="submit" class="button" name="do_Flag" value="<?php echo __("Flag Out-of-date") ?>" />
+ <?php else: ?>
+ <input type="submit" class="button" name="do_UnFlag" value="<?php echo __("UnFlag Out-of-date") ?>" />
+ <?php endif; ?>
- if ($atype == "Trusted User" || $atype == "Developer") {
- echo "<input type='submit' class='button' name='do_Delete'";
- echo " value='".__("Delete Packages")."' />\n";
- echo "<label for='merge_Into'>".__("Merge into")."</label>\n";
- echo "<input type='text' id='merge_Into' name='merge_Into' /> ";
- echo "<input type='checkbox' name='confirm_Delete' value='1' /> ";
- echo __("Confirm")."\n";
- }
-?>
+ <?php if ($row["MaintainerUID"] === NULL): ?>
+ <input type="submit" class="button" name="do_Adopt" value="<?php echo __("Adopt Packages") ?>" />
+ <?php elseif ($uid == $row["MaintainerUID"] ||
+ $atype == "Trusted User" || $atype == "Developer"): ?>
+ <input type="submit" class="button" name="do_Disown" value="<?php echo __("Disown Packages") ?>" />
+ <?php endif; ?>
+
+ <?php if ($atype == "Trusted User" || $atype == "Developer"): ?>
+ <input type="submit" class="button" name="do_Delete" value="<?php echo __("Delete Packages") ?>" />
+ <label for="merge_Into" ><?php echo __("Merge into") ?></label>
+ <input type="text" id="merge_Into" name="merge_Into" />
+ <input type="checkbox" name="confirm_Delete" value="1" />
+ <?php echo __("Confirm") ?>
+ <?php endif; ?>
+
</fieldset>
</form>
</div>
diff --git a/web/template/footer.php b/web/template/footer.php
index 0948f68..1b1b1d2 100644
--- a/web/template/footer.php
+++ b/web/template/footer.php
@@ -1,9 +1,13 @@
- <!-- End of main content -->
-<?php
- if ($ver) {
- echo "<div class=\"pgbox version\">" . htmlspecialchars($ver) . "</div>";
- }
-?>
+ <!-- End of main content -->
+
+ <div id="footer">
+ <?php if ($ver): ?>
+ <p>AUR <?php echo htmlspecialchars($ver) ?></p>
+ <?php endif; ?>
+ <p>Copyright &copy; 2004-2012 AUR Development Team.</p>
+ <p><?php echo __('Unsupported packages are user produced content. Any use of the provided files is at your own risk.') ?></p>
+ </div>
+ </div>
</body>
</html>
diff --git a/web/template/header.php b/web/template/header.php
index 8749dae..6dd52f7 100644
--- a/web/template/header.php
+++ b/web/template/header.php
@@ -5,10 +5,8 @@
xml:lang="<?php print htmlspecialchars($LANG, ENT_QUOTES) ?>" lang="<?php print htmlspecialchars($LANG, ENT_QUOTES) ?>">
<head>
<title>AUR (<?php print htmlspecialchars($LANG); ?>)<?php if ($title != "") { print " - " . htmlspecialchars($title); } ?></title>
- <link rel='stylesheet' type='text/css' href='css/fonts.css' />
- <link rel='stylesheet' type='text/css' href='css/containers.css' />
- <link rel='stylesheet' type='text/css' href='css/arch.css' />
- <link rel='stylesheet' type='text/css' href='css/archnavbar/archnavbar.css' />
+ <link rel='stylesheet' type='text/css' href='css/archweb.css' />
+ <link rel='stylesheet' type='text/css' href='css/aur.css' />
<link rel='shortcut icon' href='images/favicon.ico' />
<link rel='alternate' type='application/rss+xml' title='Newest Packages RSS' href='rss.php' />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
@@ -23,40 +21,48 @@
<li id="anb-forums"><a href="https://bbs.archlinux.org/" title="Community forums">Forums</a></li>
<li id="anb-wiki"><a href="https://wiki.archlinux.org/" title="Community documentation">Wiki</a></li>
<li id="anb-bugs"><a href="https://bugs.archlinux.org/" title="Report and track bugs">Bugs</a></li>
- <li id="anb-aur"><a href="https://aur.archlinux.org/" title="Arch Linux User Repository">AUR</a></li>
+ <li id="anb-aur"><a href="/" title="Arch Linux User Repository">AUR</a></li>
<li id="anb-download"><a href="http://www.archlinux.org/download/" title="Get Arch Linux">Download</a></li>
</ul>
</div>
</div><!-- #archnavbar -->
- <div id="archdev-navbar">
- <ul>
- <li><a href="index.php">AUR <?php print __("Home"); ?></a></li>
- <li><a href="account.php"><?php print __("Accounts"); ?></a></li>
- <li><a href="packages.php"><?php print __("Packages"); ?></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>
- <?php if (isset($_COOKIE['AURSID'])): ?>
- <?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&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>
- <?php endif; ?>
- </ul>
- </div><!-- #archdev-navbar -->
-
- <?php include("login_form.php"); ?>
-
- <div id="lang_sub">
-<?php
-reset($SUPPORTED_LANGS);
-foreach ($SUPPORTED_LANGS as $lang => $lang_name) {
- print '<a href="'
- . htmlspecialchars($_SERVER["PHP_SELF"], ENT_QUOTES)
- ."?setlang=" . htmlspecialchars($lang, ENT_QUOTES) . "\" title=\"" . htmlspecialchars($lang_name, ENT_QUOTES) . "\">"
- . htmlspecialchars(strtolower($lang)) . "</a>\n";
-}
-?>
- </div>
- <!-- Start of main content -->
+ <div id="content">
+ <div id="lang_sub">
+ <form method="get" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"], ENT_QUOTES) ?>">
+ <fieldset>
+ <div>
+ <select name="setlang" id="id_setlang">
+ <?php
+ reset($SUPPORTED_LANGS);
+ foreach ($SUPPORTED_LANGS as $lang => $lang_name) {
+ print '<option value="' . strtolower($lang) . '"' .
+ ($lang == $LANG ? ' selected="selected"' : '') .
+ '>' . strtolower($lang) . "</option>\n";
+ }
+ ?>
+ </select>
+ <input type="submit" value="Go" />
+ </div>
+ </fieldset>
+ </form>
+ </div>
+ <div id="archdev-navbar">
+ <ul>
+ <li><a href="index.php">AUR <?php print __("Home"); ?></a></li>
+ <li><a href="packages.php"><?php print __("Packages"); ?></a></li>
+ <?php if (isset($_COOKIE['AURSID'])): ?>
+ <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="account.php"><?php print __("Accounts"); ?></a></li>
+ <?php if (check_user_privileges()): ?><li><a href="tu.php"><?php print __("Trusted User"); ?></a></li><?php endif; ?>
+ <li><a href="logout.php"><?php print __("Logout"); ?></a></li>
+ <?php else: ?>
+ <li><a href="account.php"><?php print __("Register"); ?></a></li>
+ <li><a href="login.php"><?php print __("Login"); ?></a></li>
+ <?php endif; ?>
+ </ul>
+ </div><!-- #archdev-navbar -->
+ <!-- Start of main content -->
diff --git a/web/template/login_form.php b/web/template/login_form.php
deleted file mode 100644
index c27e9ba..0000000
--- a/web/template/login_form.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<div id="login_bar" class="pgbox">
-<?php
-if (isset($_COOKIE["AURSID"])) {
- print __("Logged-in as: %s", '<b>' . username_from_sid($_COOKIE["AURSID"]) . '</b>');
-?>
- <a href="logout.php">[<?php print __("Logout"); ?>]</a>
-<?php
-}
-elseif (!$DISABLE_HTTP_LOGIN || (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'])) {
- if ($login_error) {
- print "<span class='error'>" . $login_error . "</span><br />\n";
- }
-?>
-<form method="post" action="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES) ?>">
- <div>
- <label for="user"><?php print __('Username') . ':'; ?></label>
- <input type="text" name="user" id="user" size="30" maxlength="<?php print USERNAME_MAX_LEN; ?>" value="<?php
- if (isset($_POST['user'])) {
- print htmlspecialchars($_POST['user'], ENT_QUOTES);
- } ?>" />
- <label for="passwd"><?php print __('Password') . ':'; ?></label>
- <input type="password" name="passwd" id="passwd" size="30" maxlength="<?php print PASSWD_MAX_LEN; ?>" />
- <input type="checkbox" name="remember_me" id="remember_me" />
- <label for="remember_me"><?php print __("Remember me"); ?></label>
- <input type="submit" class="button" value="<?php print __("Login"); ?>" />
- <a href="passreset.php">[<?php echo __('Forgot Password') ?>]</a>
- </div>
-</form>
-<?php
-}
-else {
-?>
-<span class='error'>
- <?php printf(__("HTTP login is disabled. Please %sswitch to HTTPs%s if you want to login."),
- '<a href="https://aur.archlinux.org' . htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES) . '">', '</a>'); ?>
-</span>
-<?php } ?>
-</div>
diff --git a/web/template/pkg_comment_form.php b/web/template/pkg_comment_form.php
index 6081643..95d2cb0 100644
--- a/web/template/pkg_comment_form.php
+++ b/web/template/pkg_comment_form.php
@@ -1,69 +1,25 @@
+<div id="generic-form" class="box">
+ <h2><?php echo __("Add Comment"); ?></h2>
+ <form call="general-form" action="<?php echo $_SERVER['REQUEST_URI'] ?>" method="post">
+ <fieldset>
<?php
-# Add a comment to this package
if (isset($_REQUEST['comment']) && check_token()) {
-
- # Insert the comment
- $dbh = db_connect();
- $q = 'INSERT INTO PackageComments ';
- $q.= '(PackageID, UsersID, Comments, CommentTS) VALUES (';
- $q.= intval($_REQUEST['ID']) . ', ' . uid_from_sid($_COOKIE['AURSID']) . ', ';
- $q.= "'" . db_escape_string($_REQUEST['comment']) . "', ";
- $q.= 'UNIX_TIMESTAMP())';
- db_query($q, $dbh);
-
- # Send email notifications
- $q = 'SELECT CommentNotify.*, Users.Email ';
- $q.= 'FROM CommentNotify, Users ';
- $q.= 'WHERE Users.ID = CommentNotify.UserID ';
- $q.= 'AND CommentNotify.UserID != ' . uid_from_sid($_COOKIE['AURSID']) . ' ';
- $q.= 'AND CommentNotify.PkgID = ' . intval($_REQUEST['ID']);
- $result = db_query($q, $dbh);
- $bcc = array();
-
- if (mysql_num_rows($result)) {
- while ($row = mysql_fetch_assoc($result)) {
- array_push($bcc, $row['Email']);
- }
-
- $q = 'SELECT Packages.* ';
- $q.= 'FROM Packages ';
- $q.= 'WHERE Packages.ID = ' . intval($_REQUEST['ID']);
- $result = db_query($q, $dbh);
- $row = mysql_fetch_assoc($result);
-
- # TODO: native language emails for users, based on their prefs
- # Simply making these strings translatable won't work, users would be
- # getting emails in the language that the user who posted the comment was in
- $body =
- 'from https://aur.archlinux.org/packages.php?ID='
- . $_REQUEST['ID'] . "\n"
- . username_from_sid($_COOKIE['AURSID']) . " wrote:\n\n"
- . $_POST['comment']
- . "\n\n---\nIf you no longer wish to receive notifications about this package, please go the the above package page and click the UnNotify button.";
- $body = wordwrap($body, 70);
- $bcc = implode(', ', $bcc);
- $headers = "Bcc: $bcc\nReply-to: nobody@archlinux.org\nFrom: aur-notify@archlinux.org\nX-Mailer: AUR\n";
- @mail(' ', "AUR Comment for " . $row['Name'], $body, $headers);
- }
-}
-
- # Prompt visitor for comment
-?>
-<div class="pgbox">
- <form action='<?php echo $_SERVER['REQUEST_URI'] ?>' method='post'>
- <div style="padding: 1%">
-<?php
-if (isset($_REQUEST['comment']) && check_token()) {
- echo '<b>' . __('Comment has been added.') . '</b>';
+ echo '<p>' . __('Comment has been added.') . '</p>';
}
?>
- <input type='hidden' name='ID' value="<?php echo intval($_REQUEST['ID']) ?>" />
- <?php echo __('Enter your comment below.') ?><br />
- <textarea name='comment' cols='80' rows='10' style="width: 100%"></textarea><br />
- <input type='hidden' name='token' value='<?php echo htmlspecialchars($_COOKIE['AURSID']) ?>' />
- <input type='submit' value="<?php echo __("Submit") ?>" />
- <input type='reset' value="<?php echo __("Reset") ?>" />
- </div>
+ <div>
+ <input type="hidden" name="ID" value="<?php echo intval($_REQUEST['ID']) ?>" />
+ <input type="hidden" name="token" value="<?php echo htmlspecialchars($_COOKIE['AURSID']) ?>" />
+ </div>
+ <p>
+ <label for="id_comment"><?php echo __("Comment") . ':' ?></label>
+ <textarea id="id_comment" name="comment" cols="80" rows="10"></textarea>
+ </p>
+ <p>
+ <label></label>
+ <input type="submit" value="<?php echo __("Add Comment") ?>" />
+ </p>
+ </fieldset>
</form>
</div>
diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php
index 9dd5004..02f4963 100644
--- a/web/template/pkg_comments.php
+++ b/web/template/pkg_comments.php
@@ -1,46 +1,43 @@
-<div class="pgbox">
<?php
$uid = uid_from_sid($SID);
-while (list($indx, $carr) = each($comments)) { ?>
- <div class="comment-header"><?php
-
- if ($SID) {
- $carr['UserName'] = "<a href=\"account.php?Action=AccountInfo&amp;ID={$carr['UsersID']}\">{$carr['UserName']}</a>";
- }
-
- $commentHeader = '<p style="display:inline;">' . __('Comment by: %s on %s', $carr['UserName'], gmdate('r', $carr['CommentTS'])) . '</p>';
-
- if (canDeleteCommentArray($carr, $atype, $uid)) {
- $durl = '<form method="post" action="packages.php?ID='.$row['ID'].'">';
- $durl.= '<fieldset style="display:inline;">';
- $durl.= '<input type="hidden" name="action" value="do_DeleteComment" />';
- $durl.= '<input type="hidden" name="comment_id" value="'.$carr['ID'].'" />';
- $durl.= '<input type="hidden" name="token" value="'.htmlspecialchars($_COOKIE['AURSID']).'" />';
- $durl.= '<input type="image" src="images/x.png" ';
- $durl.= ' alt="'.__("Delete comment").'" name="submit" value="1" ';
- $durl.= ' />&nbsp;';
- $durl.= '</fieldset>';
-
- $commentHeader = $durl.$commentHeader."</form>";
- }
-
- echo $commentHeader;
-?></div>
- <blockquote class="comment-body">
- <div>
-<?php echo parse_comment($carr['Comments']) ?>
- </div>
- </blockquote>
-<?php
-}
+$count = package_comments_count($_GET['ID']);
?>
+<div id="news">
+ <h3>
+ <a href="<?php echo htmlentities($_SERVER['REQUEST_URI'], ENT_QUOTES) ?>&amp;comments=all" title="<?php echo __('View all %s comments' , $count) ?>"><?php echo __('Latest Comments') ?></a>
+ <span class="arrow"></span>
+ </h3>
+
+ <?php while (list($indx, $row) = each($comments)): ?>
+ <?php if ($SID):
+ $row['UserName'] = "<a href=\"account.php?Action=AccountInfo&amp;ID={$row['UsersID']}\">{$row['UserName']}</a>";
+ endif; ?>
+ <h4>
+ <?php if (canDeleteCommentArray($row, $atype, $uid)): ?>
+ <form method="post" action="packages.php?ID=<?php echo $row['ID'] ?>">
+ <fieldset style="display:inline;">
+ <input type="hidden" name="action" value="do_DeleteComment" />
+ <input type="hidden" name="comment_id" value="<?php echo $row['ID'] ?>" />
+ <input type="hidden" name="token" value="<?php echo htmlspecialchars($_COOKIE['AURSID']) ?>" />
+ <input type="image" src="images/x.png" alt="<?php echo __('Delete comment') ?> name="submit" value="1" />
+ </fieldset>
+ </form>
+ <?php endif; ?>
+ <?php echo __('Comment by %s', $row['UserName']) ?>
+ </h4>
+ <p class="timestamp"><?php echo gmdate('Y-m-d H:i', $row['CommentTS']) ?></p>
+ <div class="article-content">
+ <p>
+ <?php echo parse_comment($row['Comments']) ?>
+ </p>
+ </div>
+ <?php endwhile; ?>
</div>
-<?php
-$count = package_comments_count($_GET['ID']);
-if ($count > 10 && !isset($_GET['comments'])) {
- echo '<div class="pgbox">';
- echo '<a href="'. $_SERVER['REQUEST_URI'] . '&comments=all">'. __('Show all %s comments', $count) . '</a>';
- echo '</div>';
-}
-?>
+<?php if ($count > 10 && !isset($_GET['comments'])): ?>
+<div id="news">
+ <h3>
+ <a href="<?php echo $_SERVER['REQUEST_URI'] ?>&amp;comments=all" title="<?php echo __('View all %s comments', $count) ?>"><?php echo __('All comments', $count) ?></a>
+ </h3>
+</div>
+<?php endif; ?>
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php
index 193af84..b41fded 100644
--- a/web/template/pkg_details.php
+++ b/web/template/pkg_details.php
@@ -3,177 +3,188 @@ $atype = account_from_sid($SID);
$uid = uid_from_sid($SID);
$pkgid = intval($_REQUEST['ID']);
-if ($uid == $row["MaintainerUID"] or
- ($atype == "Developer" or $atype == "Trusted User")) {
- $catarr = pkgCategories();
- $edit_cat = "<form method='post' action='packages.php?ID=".$pkgid."'>\n";
- $edit_cat.= "<p>";
- $edit_cat.= "<input type='hidden' name='action' value='do_ChangeCategory' />";
- if ($SID) {
- $edit_cat.= "<input type='hidden' name='token' value='".htmlspecialchars($_COOKIE['AURSID'])."' />";
- }
- $edit_cat.= "<span class='f3'>" . __("Category") . ":</span> ";
- $edit_cat.= "<select name='category_id'>\n";
- foreach ($catarr as $cid => $catname) {
- $edit_cat.= "<option value='$cid'";
- if ($cid == $row["CategoryID"]) {
- $edit_cat.=" selected='selected'";
- }
- $edit_cat.=">".$catname."</option>";
- }
- $edit_cat.= "</select>&nbsp;<input type='submit' value='" . __("Change category") . "' />";
- $edit_cat.= "</p>";
- $edit_cat.= "</form>";
+$catarr = pkgCategories();
-}
-else {
- $edit_cat = "<span class='f3'>" . __("Category") . ": " . $row['Category'] . "</span>";
-}
+$submitter = username_from_id($row["SubmitterUID"]);
+$maintainer = username_from_id($row["MaintainerUID"]);
-if ($row["SubmitterUID"]) {
- $submitter = username_from_id($row["SubmitterUID"]);
- if ($SID) {
- $submitter = '<a href="account.php?Action=AccountInfo&amp;ID=' . htmlspecialchars($row['SubmitterUID'], ENT_QUOTES) . '">' . htmlspecialchars($submitter) . '</a>';
- }
-
-} else {
- $submitter = "None";
-}
-
-if ($row["MaintainerUID"]) {
- $maintainer = username_from_id($row["MaintainerUID"]);
- if ($SID) {
- $maintainer = '<a href="account.php?Action=AccountInfo&amp;ID=' . htmlspecialchars($row['MaintainerUID'], ENT_QUOTES) . '">' . htmlspecialchars($maintainer) . '</a>';
- }
-
-} else {
- $maintainer = "None";
-}
-
-$votes = __('Votes') . ': ' . $row['NumVotes'];
-if ($atype == "Developer" or $atype == "Trusted User") {
- $votes = "<a href=\"voters.php?ID=$pkgid\">$votes</a>";
-}
+$votes = $row['NumVotes'];
# In case of wanting to put a custom message
$msg = __('unknown');
$license = empty($row['License']) ? $msg : $row['License'];
# Print the timestamps for last updates
-$updated_time = ($row["ModifiedTS"] == 0) ? $msg : gmdate("r", intval($row["ModifiedTS"]));
-$submitted_time = ($row["SubmittedTS"] == 0) ? $msg : gmdate("r", intval($row["SubmittedTS"]));
-$out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : gmdate("r", intval($row["OutOfDateTS"]));
+$updated_time = ($row["ModifiedTS"] == 0) ? $msg : gmdate("Y-m-d H:i", intval($row["ModifiedTS"]));
+$submitted_time = ($row["SubmittedTS"] == 0) ? $msg : gmdate("Y-m-d H:i", intval($row["SubmittedTS"]));
+$out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : gmdate("Y-m-d", intval($row["OutOfDateTS"]));
-?>
-<div class="pgbox">
- <div class="pgboxtitle"><span class="f3"><?php echo __("Package Details") ?></span></div>
- <div class="pgboxbody">
+$urlpath = URL_DIR . substr($row['Name'], 0, 2) . "/" . $row['Name'];
- <p>
- <span class='f2'><?php echo htmlspecialchars($row['Name']) . ' ' . htmlspecialchars($row['Version']) ?></span><br />
- <span class='f3'><a href="<?php echo htmlspecialchars($row['URL'], ENT_QUOTES) . '">' . htmlspecialchars($row['URL']) ?></a></span><br />
- <span class='f3'><?php echo htmlspecialchars($row['Description'], ENT_QUOTES); ?></span>
- </p>
+$deps = package_dependencies($row["ID"]);
+$requiredby = package_required($row["Name"]);
- <?php echo $edit_cat ?>
-
- <p>
- <span class='f3'><?php echo __('Submitter') .': ' . $submitter ?></span><br />
- <span class='f3'><?php echo __('Maintainer') .': ' . $maintainer ?></span><br />
- <span class='f3'><?php echo $votes ?></span>
- </p>
-
- <p><span class='f3'><?php echo __('License') . ': ' . htmlspecialchars($license) ?></span></p>
-
- <p>
- <span class='f3'>
- <?php echo __('Last Updated') . ': ' . $updated_time ?><br />
- <?php echo __('First Submitted') . ': '. $submitted_time ?>
- </span>
- </p>
+# $sources[0] = 'src';
+$sources = package_sources($row["ID"]);
+?>
+<div id="pkgdetails" class="box">
+ <h2><?php echo __('Package Details') . ': ' . htmlspecialchars($row['Name']) . ' ' . htmlspecialchars($row['Version']) ?></h2>
+ <div id="detailslinks" class="listing">
+ <div id="actionlist">
+ <h4>Package Actions</h4>
+ <ul class="small">
+ <li><a href="<?php echo $urlpath ?>/PKGBUILD"><?php echo __('View PKGBUILD') ?></a></li>
+ <li><a href="<?php echo $urlpath . '/' . $row['Name'] ?>.tar.gz"><?php echo __('Download tarball') ?></a></li>
+ <li><span class="flagged"><?php if ($row["OutOfDateTS"] !== NULL) { echo __('Flagged out-of-date')." (${out_of_date_time})"; } ?></span></li>
+ </ul>
+ </div>
+ </div>
- <p><span class='f3'>
+ <table id="pkginfo">
+ <tr>
+ <th><?php echo __('Description') . ': ' ?></th>
+ <td class="wrap"><?php echo htmlspecialchars($row['Description']); ?></td>
+ </tr>
+ <tr>
+ <th>Upstream URL:</th>
+ <td><a href="<?php echo htmlspecialchars($row['URL'], ENT_QUOTES) ?>" title="<?php echo __('Visit the website for') . ' ' . htmlspecialchars( $row['Name'])?>"><?php echo htmlspecialchars($row['URL'], ENT_QUOTES) ?></a></td>
+ </tr>
+ <tr>
+ <th><?php echo __('Category') . ': ' ?></th>
<?php
- $urlpath = URL_DIR . substr($row['Name'], 0, 2) . "/" . $row['Name'];
- print "<a href='$urlpath/" . $row['Name'] . ".tar.gz'>".__("Tarball")."</a> :: ";
- print "<a href='$urlpath/PKGBUILD'>".__("PKGBUILD")."</a></span>";
-
- if ($row["OutOfDateTS"] !== NULL) {
- echo "<br /><span class='f6'>".__("This package has been flagged out of date.")." (${out_of_date_time})</span>";
- }
+if ($SID && ($uid == $row["MaintainerUID"] ||
+ ($atype == "Developer" || $atype == "Trusted User"))):
?>
- </p>
+ <td>
+ <form method="post" action="packages.php?ID=<?php echo $pkgid ?>">
+ <div>
+ <input type="hidden" name="action" value="do_ChangeCategory" />
+ <?php if ($SID): ?>
+ <input type="hidden" name="token" value="<?php echo htmlspecialchars($_COOKIE['AURSID']) ?>" />
+ <?php endif; ?>
+ <select name="category_id">
<?php
-
- $deps = package_dependencies($row["ID"]);
- $requiredby = package_required($row["Name"]);
-
- if (count($deps) > 0 || count($requiredby) > 0) {
- echo '<p>';
- }
-
- if (count($deps) > 0) {
- echo "<span class='boxSoftTitle'><span class='f3'>". __("Dependencies")."</span></span>";
-
- while (list($k, $darr) = each($deps)) {
- # darr: (DepName, DepCondition, PackageID), where ID is NULL if it didn't exist
- if (!is_null($darr[2])) {
- echo " <a href='packages.php?ID=".$darr[2]."'>".$darr[0].$darr[1]."</a>";
- } else {
- echo " <a href='http://www.archlinux.org/packages/?q=".urlencode($darr[0])."'>".$darr[0].$darr[1]."</a>";
- }
- }
-
- if (count($requiredby) > 0) {
- echo '<br />';
- }
- }
-
- if (count($requiredby) > 0) {
- echo "<span class='boxSoftTitle'><span class='f3'>". __("Required by")."</span></span>";
-
- while (list($k, $darr) = each($requiredby)) {
- # darr: (PackageName, PackageID)
- echo " <a href='packages.php?ID=".$darr[1]."'>".$darr[0]."</a>";
- }
- }
-
- if (count($deps) > 0 || count($requiredby) > 0) {
- echo '</p>';
- }
-
-
- # $sources[0] = 'src';
- $sources = package_sources($row["ID"]);
-
- if (count($sources) > 0) {
-
+ foreach ($catarr as $cid => $catname):
?>
- <div class='boxSoftTitle'><span class='f3'><?php echo __('Sources') ?></span></div>
- <div>
+ <option value="<?php echo $cid ?>"<?php if ($cid == $row["CategoryID"]) { ?> selected="selected" <?php } ?>><?php echo $catname ?></option>
+ <?php endforeach; ?>
+ </select>
+ <input type="submit" value="<?php echo __('Change category') ?>"/>
+ </div>
+ </form>
+<?php else: ?>
+ <td>
+ <a href="packages.php?C=<?php echo $row['CategoryID'] ?>"><?php print $row['Category'] ?></a>
+<?php endif; ?>
+ </td>
+ <tr>
+ <th><?php echo __('License') . ': ' ?></th>
+ <td><?php echo htmlspecialchars($license) ?></td>
+ </tr>
+ <tr>
+ <th><?php echo __('Submitter') .': ' ?></th>
<?php
- while (list($k, $src) = each($sources)) {
- $src = explode('::', $src);
- $parsed_url = parse_url($src[0]);
-
- if (isset($parsed_url['scheme']) || isset($src[1])) {
- # It is an external source
- echo "<a href=\"" . htmlspecialchars((isset($src[1]) ? $src[1] : $src[0]), ENT_QUOTES) . "\">" . htmlspecialchars($src[0]) . "</a><br />\n";
- }
- else {
- $src = $src[0];
- # It is presumably an internal source
- echo "<span class='f8'>" . htmlspecialchars($src) . "</span>";
- echo "<br />\n";
- }
- }
+if ($row["SubmitterUID"]):
+ if ($SID):
?>
- </div>
+ <td><a href="account.php?Action=AccountInfo&amp;ID=<?php echo htmlspecialchars($row['SubmitterUID'], ENT_QUOTES) ?>" title="<?php echo __('View account information for')?> <?php echo htmlspecialchars($submitter) ?>"><?php echo htmlspecialchars($submitter) ?></a></td>
+<?php else: ?>
+ <td><?php echo htmlspecialchars($submitter) ?></td>
+ <?php endif; ?>
+<?php else: ?>
+ <td>None</td>
+<?php endif; ?>
+ <tr>
+ <th><?php echo __('Maintainer') .': ' ?></th>
<?php
- }
-
+if ($row["MaintainerUID"]):
+ if ($SID):
+?>
+ <td><a href="account.php?Action=AccountInfo&amp;ID=<?php echo htmlspecialchars($row['MaintainerUID'], ENT_QUOTES) ?>" title="<?php echo __('View account information for')?> <?php echo htmlspecialchars($maintainer) ?>"><?php echo htmlspecialchars($maintainer) ?></a></td>
+ <?php else: ?>
+ <td><?php echo htmlspecialchars($maintainer) ?></td>
+ <?php endif; ?>
+<?php else: ?>
+ <td>None</td>
+<?php endif; ?>
+ </tr>
+ <tr>
+ <th><?php echo __('Votes') . ': ' ?></th>
+<?php
+if ($atype == "Developer" || $atype == "Trusted User"):
+?>
+ <td><a href="voters.php?ID=<?php echo$pkgid ?>"><?php echo $votes ?></a>
+<?php else: ?>
+ <td><?php echo $votes ?></td>
+<?php endif; ?>
+ </tr>
+ <tr>
+ <th><?php echo __('First Submitted') . ': ' ?></th>
+ <td><?php echo $submitted_time ?></td>
+ </tr>
+ <tr>
+ <th><?php echo __('Last Updated') . ': ' ?></th>
+ <td><?php echo $updated_time ?></td>
+ </tr>
+ </table>
+
+ <div id="metadata">
+ <div id="pkgdeps" class="listing">
+ <h3><?php echo __('Dependencies') . " (" . count($deps) . ")"?></h3>
+<?php if (count($deps) > 0): ?>
+ <ul>
+<?php
+ while (list($k, $darr) = each($deps)):
+ # darr: (DepName, DepCondition, PackageID), where ID is NULL if it didn't exist
+ if (!is_null($darr[2])):
+?>
+ <li><a href="packages.php?ID=<?php echo $darr[2]?>" title="<?php echo __('View packages details for').' '.$darr[0].$darr[1]?>"><?php echo $darr[0].$darr[1]?></a></li>
+ <?php else: ?>
+ <li><a href="http://www.archlinux.org/packages/?q=<?php echo urlencode($darr[0])?>" title="<?php echo __('View packages details for').' '.$darr[0].$darr[1] ?>"><?php echo $darr[0].$darr[1] ?></a></li>
+ <?php endif; ?>
+ <?php endwhile; ?>
+ </ul>
+ </div>
+<?php endif; ?>
+ <div id="pkgreqs" class="listing">
+ <h3><?php echo __('Required by') . " (" . count($requiredby) . ")"?></h3>
+<?php if (count($requiredby) > 0): ?>
+ <ul>
+<?php
+ # darr: (PackageName, PackageID)
+ while (list($k, $darr) = each($requiredby)):
?>
+ <li><a href="packages.php?ID=<?php echo $darr[1] ?>" title="<?php echo __('View packages details for').' '.$darr[0]?>"><?php echo $darr[0] ?></a></li>
+ <?php endwhile; ?>
+ </ul>
+<?php endif; ?>
+ </div>
+ <div id="pkgfiles" class="listing">
+ <h3><?php echo __('Sources') ?></h3>
+ </div>
+<?php if (count($sources) > 0): ?>
+ <div>
+ <ul>
+<?php
+ while (list($k, $src) = each($sources)):
+ $src = explode('::', $src);
+ $parsed_url = parse_url($src[0]);
+ # It is an external source
+ if (isset($parsed_url['scheme']) || isset($src[1])):
+?>
+ <li><a href="<?php echo htmlspecialchars((isset($src[1]) ? $src[1] : $src[0]), ENT_QUOTES) ?>"><?php echo htmlspecialchars($src[0]) ?> </a></li>
+<?php
+ else:
+ # It is presumably an internal source
+ $src = $src[0];
+?>
+ <li><?php echo htmlspecialchars($src) ?></li>
+ <?php endif; ?>
+ <?php endwhile; ?>
+ </ul>
+ </div>
+<?php endif; ?>
</div>
</div>
diff --git a/web/template/pkg_search_form.php b/web/template/pkg_search_form.php
index 53d34fe..7997bb1 100644
--- a/web/template/pkg_search_form.php
+++ b/web/template/pkg_search_form.php
@@ -1,126 +1,128 @@
-<?php include_once('pkgfuncs.inc.php') ?>
+<?php
+include_once('pkgfuncs.inc.php');
+
+$searchby = array(
+ 'nd' => __('Name, Description'),
+ 'n' => __('Name Only'),
+ 'x' => __('Exact name'),
+ 'm' => __('Maintainer'),
+ 's' => __('Submitter')
+);
+
+$outdated_flags = array(
+ '' => __('All'),
+ 'on' => __('Flagged'),
+ 'off' => __('Not Flagged')
+);
+
+$sortby = array(
+ 'n' => __('Name'),
+ 'c' => __('Category'),
+ 'v' => __('Votes'),
+ 'w' => __('Voted'),
+ 'o' => __('Notify'),
+ 'm' => __('Maintainer'),
+ 'a' => __('Age')
+);
+
+$orderby = array(
+ 'a' => __('Ascending'),
+ 'd' => __('Descending')
+);
+
+$pages = array(50, 100, 250);
+?>
+
+<div id="pkglist-search" class="box filter-criteria">
+<h2><?php print __("Search Criteria"); ?></h2>
-<div class='pgbox'>
<form action='packages.php' method='get'>
-<div class='pgboxtitle'>
- <span class='f3'><?php print __("Search Criteria"); ?></span>
- <input type='hidden' name='O' value='0' />
- <input type='text' name='K' size='30' value="<?php if (isset($_REQUEST["K"])) { print stripslashes(trim(htmlspecialchars($_REQUEST["K"], ENT_QUOTES))); } ?>" maxlength='35' />
- <input type='submit' style='min-width:80px' class='button' name='do_Search' value='<?php print __("Go"); ?>' />
- <?php if (!empty($_GET['detail'])): ?>
- <input type='submit' style='min-width:80px' class='button' name='do_Orphans' value='<?php print __("Orphans"); ?>' />
- <?php endif; ?>
- <a href="?<?php print mkurl('detail=' . ((!empty($_GET['detail'])) ? 0 : 1) ) ?>"><?php print __("Advanced"); ?></a>
-</div>
+ <p><input type='hidden' name='O' value='0' /></p>
- <?php if (!empty($_GET['detail'])): ?>
- <div id="advanced-search" class="blue">
- <input type="hidden" name="detail" value="1" />
- <ul>
- <li>
- <label><?php print __("Category"); ?></label>
- <select name='C'>
- <option value='0'><?php print __("Any"); ?></option>
- <?php
- foreach (pkgCategories() as $id => $cat):
- if (isset($_REQUEST['C']) && $_REQUEST['C'] == $id):
- ?>
- <option value="<?php print $id ?>" selected="selected"><?php print $cat; ?></option>
- <?php else: ?>
- <option value="<?php print $id ?>"><?php print $cat; ?></option>
- <?php
- endif;
- endforeach;
- ?>
- </select>
- </li>
- <li>
- <label><?php print __("Search by"); ?></label>
- <select name='SeB'>
- <?php
- $searchby = array('nd' => __('Name, Description'), 'n' => __('Name Only'), 'x' => __('Exact name'), 'm' => __('Maintainer'), 's' => __('Submitter'));
- foreach ($searchby as $k => $v):
- if (isset($_REQUEST['SeB']) && $_REQUEST['SeB'] == $k):
- ?>
- <option value="<?php print $k; ?>" selected="selected"><?php print $v; ?></option>
- <?php else: ?>
- <option value="<?php print $k; ?>"><?php print $v; ?></option>
- <?php
- endif;
- endforeach;
- ?>
- </select>
- </li>
- <li>
- <label><?php print __("Sort by"); ?></label>
- <select name='SB'>
- <?php
- $sortby = array('n' => __('Name'), 'c' => __('Category'), 'v' => __('Votes'), 'w' => __('Voted'), 'o' => __('Notify'), 'm' => __('Maintainer'), 'a' => __('Age'));
- foreach ($sortby as $k => $v):
- if (isset($_REQUEST['SB']) && $_REQUEST['SB'] == $k):
- ?>
- <option value='<?php print $k; ?>' selected="selected"><?php print $v; ?></option>
- <?php else: ?>
- <option value='<?php print $k; ?>'><?php print $v; ?></option>
- <?php
- endif;
- endforeach;
- ?>
- </select>
- </li>
- <li>
- <label><?php print __("Sort order"); ?></label>
- <select name='SO'>
- <?php
- $orderby = array('a' => __('Ascending'), 'd' => __('Descending'));
- foreach ($orderby as $k => $v):
- if (isset($_REQUEST['SO']) && $_REQUEST['SO'] == $k):
- ?>
- <option value='<?php print $k; ?>' selected="selected"><?php print $v; ?></option>
- <?php else: ?>
- <option value='<?php print $k; ?>'><?php print $v; ?></option>
- <?php
- endif;
- endforeach;
- ?>
- </select>
- </li>
- <li>
- <label><?php print __("Per page"); ?></label>
- <select name='PP'>
- <?php
- $pages = array(50, 100, 250);
- foreach ($pages as $i):
- if (isset($_REQUEST['PP']) && $_REQUEST['PP'] == $i):
- ?>
- <option value="<?php print $i; ?>" selected="selected"><?php print $i; ?></option>
- <?php else: ?>
- <option value="<?php print $i; ?>"><?php print $i; ?></option>
- <?php
- endif;
- endforeach;
- ?>
- </select>
- </li>
- <li>
- <label><?php echo __('Out of Date'); ?></label>
- <select name='outdated'>
- <?php
- $outdated_flags = array('' => __('All'), 'on' => __('Flagged'), 'off' => __('Not Flagged'));
- foreach ($outdated_flags as $k => $v):
- if (isset($_REQUEST['outdated']) && $_REQUEST['outdated'] == $k):
- ?>
- <option value='<?php print $k; ?>' selected="selected"><?php print $v; ?></option>
- <?php else: ?>
- <option value='<?php print $k; ?>'><?php print $v; ?></option>
- <?php
- endif;
- endforeach;
- ?>
- </select>
- </li>
- </ul>
- </div>
- <?php endif; ?>
+ <fieldset>
+ <legend><?php echo __('Enter search criteria') ?></legend>
+ <div>
+ <label for="id_category"><?php print __("Category"); ?></label>
+ <select name='C' id="id_category">
+ <option value='0'><?php print __("Any"); ?></option>
+ <?php foreach (pkgCategories() as $id => $cat): ?>
+ <?php if (isset($_REQUEST['C']) && $_REQUEST['C'] == $id): ?>
+ <option value="<?php print $id ?>" selected="selected"><?php print $cat; ?></option>
+ <?php else: ?>
+ <option value="<?php print $id ?>"><?php print $cat; ?></option>
+ <?php endif; ?>
+ <?php endforeach; ?>
+ </select>
+ </div>
+ <div>
+ <label for="id_method"><?php print __("Search by"); ?></label>
+ <select name='SeB'>
+ <?php foreach ($searchby as $k => $v): ?>
+ <?php if (isset($_REQUEST['SeB']) && $_REQUEST['SeB'] == $k): ?>
+ <option value="<?php print $k; ?>" selected="selected"><?php print $v; ?></option>
+ <?php else: ?>
+ <option value="<?php print $k; ?>"><?php print $v; ?></option>
+ <?php endif; ?>
+ <?php endforeach; ?>
+ </select>
+ </div>
+ <div>
+ <label for="id_q"><?php print __("Keywords"); ?></label>
+ <input type='text' name='K' size='30' value="<?php if (isset($_REQUEST["K"])) { print stripslashes(trim(htmlspecialchars($_REQUEST["K"], ENT_QUOTES))); } ?>" maxlength='35' />
+ </div>
+ <div>
+ <label for="id_out_of_date"><?php echo __('Out of Date'); ?></label>
+ <select name='outdated'>
+ <?php foreach ($outdated_flags as $k => $v): ?>
+ <?php if (isset($_REQUEST['outdated']) && $_REQUEST['outdated'] == $k): ?>
+ <option value='<?php print $k; ?>' selected="selected"><?php print $v; ?></option>
+ <?php else: ?>
+ <option value='<?php print $k; ?>'><?php print $v; ?></option>
+ <?php endif; ?>
+ <?php endforeach; ?>
+ </select>
+ </div>
+ <div>
+ <label for="id_sort_by"><?php print __("Sort by"); ?></label>
+ <select name='SB'>
+ <?php foreach ($sortby as $k => $v): ?>
+ <?php if (isset($_REQUEST['SB']) && $_REQUEST['SB'] == $k): ?>
+ <option value='<?php print $k; ?>' selected="selected"><?php print $v; ?></option>
+ <?php else: ?>
+ <option value='<?php print $k; ?>'><?php print $v; ?></option>
+ <?php endif; ?>
+ <?php endforeach; ?>
+ </select>
+ </div>
+ <div>
+ <label for="id_order_by"><?php print __("Sort order"); ?></label>
+ <select name='SO'>
+ <?php foreach ($orderby as $k => $v): ?>
+ <?php if (isset($_REQUEST['SO']) && $_REQUEST['SO'] == $k): ?>
+ <option value='<?php print $k; ?>' selected="selected"><?php print $v; ?></option>
+ <?php else: ?>
+ <option value='<?php print $k; ?>'><?php print $v; ?></option>
+ <?php endif; ?>
+ <?php endforeach; ?>
+ </select>
+ </div>
+ <div>
+ <label for="id_per_page"><?php print __("Per page"); ?></label>
+ <select name='PP'>
+ <?php foreach ($pages as $i): ?>
+ <?php if (isset($_REQUEST['PP']) && $_REQUEST['PP'] == $i): ?>
+ <option value="<?php print $i; ?>" selected="selected"><?php print $i; ?></option>
+ <?php else: ?>
+ <option value="<?php print $i; ?>"><?php print $i; ?></option>
+ <?php endif; ?>
+ <?php endforeach; ?>
+ </select>
+ </div>
+ <div>
+ <label>&nbsp;</label>
+ <input type='submit' class='button' name='do_Search' value='<?php print __("Go"); ?>' />
+ <input type='submit' class='button' name='do_Orphans' value='<?php print __("Orphans"); ?>' />
+ </div>
+ </fieldset>
</form>
</div>
diff --git a/web/template/pkg_search_results.php b/web/template/pkg_search_results.php
index 609dc19..9076675 100644
--- a/web/template/pkg_search_results.php
+++ b/web/template/pkg_search_results.php
@@ -1,140 +1,124 @@
-<?php if (!$result) { ?>
- <div class='pgboxbody'><?php print __("Error retrieving package list.") ?></div>
-<?php } elseif ($total == 0) { ?>
- <div class='pgboxbody'><?php print __("No packages matched your search criteria.") ?></div>
-<?php } else { ?>
- <form action='packages.php?<?php echo htmlentities($_SERVER['QUERY_STRING']) ?>' method='post'>
- <div class="pgbox">
- <div class="pgboxtitle">
- <span class='f3'><?php print __("Package Listing") ?></span>
- </div>
-
-
-
-
-<table width='100%' cellspacing='0' cellpadding='2'>
-<tr>
- <?php if ($SID): ?>
- <th style='border-bottom: #666 1px solid; vertical-align: bottom'>&nbsp;</th>
- <?php endif; ?>
-
- <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'>
- <a href='?<?php print mkurl('SB=c&SO=' . $SO_next) ?>'><?php print __("Category") ?></a>
- </span></th>
- <th style='border-bottom: #666 1px solid; vertical-align: bottom; text-align: center;'><span class='f2'>
- <a href='?<?php print mkurl('SB=n&SO=' . $SO_next) ?>'><?php print __("Name") ?></a>
- </span></th>
- <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'>
- <a href='?<?php print mkurl('SB=v&SO=' . $SO_next) ?>'><?php print __("Votes") ?></a>
- </span></th>
-
- <?php if ($SID): ?>
- <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'>
- <a href='?<?php print mkurl('SB=w&SO=' . $SO_next) ?>'><?php print __("Voted") ?></a>
- </span></th>
- <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'>
- <a href='?<?php print mkurl('SB=o&SO=' . $SO_next) ?>'><?php print __("Notify") ?></a>
- </span></th>
- <?php endif; ?>
- <th style='border-bottom: #666 1px solid; vertical-align: bottom; text-align: center;'><span class='f2'><?php print __("Description") ?></span></th>
- <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'>
- <a href='?<?php print mkurl('SB=m&SO=' . $SO_next) ?>'><?php print __("Maintainer") ?></a>
- </span></th>
-</tr>
-
<?php
if (isset($_COOKIE['AURSID'])) {
$atype = account_from_sid($_COOKIE['AURSID']);
} else {
$atype = "";
}
-for ($i = 0; $row = mysql_fetch_assoc($result); $i++) {
- (($i % 2) == 0) ? $c = "data1" : $c = "data2";
- if ($row["OutOfDateTS"] !== NULL): $c = "outofdate"; endif;
-?>
-<tr>
- <?php if ($SID): ?>
- <td class='<?php print $c ?>'><input type='checkbox' name='IDs[<?php print $row["ID"] ?>]' value='1' /></td>
- <?php endif; ?>
- <td class='<?php print $c ?>'><span class='f5'><span class='blue'><?php print htmlspecialchars($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 htmlspecialchars($row["Name"]) ?> <?php print htmlspecialchars($row["Version"]) ?></span></a></span></td>
- <td class='<?php print $c ?>' style="text-align: right"><span class='f5'><span class='blue'><?php print $row["NumVotes"] ?></span></span></td>
- <?php if ($SID): ?>
- <td class='<?php print $c ?>'><span class='f5'><span class='blue'>
- <?php if (isset($row["Voted"])): ?>
- <?php print __("Yes") ?></span></span></td>
- <?php else: ?>
- </span></span></td>
- <?php endif; ?>
- <td class='<?php print $c ?>'><span class='f5'><span class='blue'>
- <?php if (isset($row["Notify"])): ?>
- <?php print __("Yes") ?></span></span></td>
- <?php else: ?>
- </span></span></td>
- <?php endif; ?>
- <?php endif; ?>
- <td class='<?php print $c ?>'><span class='f4'><span class='blue'>
- <?php print htmlspecialchars($row['Description'], ENT_QUOTES); ?></span></span></td>
- <td class='<?php print $c ?>'><span class='f5'><span class='blue'>
- <?php if (isset($row["Maintainer"])): ?>
- <a href='packages.php?K=<?php print htmlspecialchars($row['Maintainer'], ENT_QUOTES) ?>&amp;SeB=m'><?php print htmlspecialchars($row['Maintainer']) ?></a>
- <?php else: ?>
- <span style='color: blue; font-style: italic;'><?php print __("orphan") ?></span>
- <?php endif; ?>
- </span></span></td>
-</tr>
-<?php } ?>
- </table>
-</div> <!-- .pgbox ??! -->
+if (!$result): ?>
+ <div class="box"><p><?php echo __("Error retrieving package list.") ?></p></div>
+<?php elseif ($total == 0): ?>
+ <div class="box"><p><?php echo __("No packages matched your search criteria.") ?></p></div>
+<?php else: ?>
+ <div id="pkglist-results" class="box">
+ <div id="pkglist-stats-top">
+ <p><?php echo __('%s Packages found. Showing %s - %s', $total, $first, $last) ?></p>
+ <p class="pkglist-nav">
+ <?php foreach ($templ_pages as $pagenr => $pagestart): ?>
+ <?php if ($pagestart === false): ?>
+ <span class="page"><?php echo $pagenr ?></span>
+ <?php elseif ($pagestart + 1 == $first): ?>
+ <span class="page"><?php echo $pagenr ?></span>
+ <?php else: ?>
+ <a class="page" href="packages.php?<?php echo mkurl('O=' . $pagestart) ?>"><?php echo $pagenr ?></a>
+ <?php endif; ?>
+ <?php endforeach; ?>
+ </p>
+ </div>
+
+ <form id="pkglist-results-form" method="post" action="packages.php?<?php echo htmlentities($_SERVER['QUERY_STRING']) ?>">
+ <table class="results">
+ <thead>
+ <tr>
+ <?php if ($SID): ?>
+ <th>&nbsp;</th>
+ <?php endif; ?>
+ <th><a href="?<?php echo mkurl('SB=c&SO=' . $SO_next) ?>"><?php echo __("Category") ?></a></th>
+ <th><a href="?<?php echo mkurl('SB=n&SO=' . $SO_next) ?>"><?php echo __("Name") ?></a></th>
+ <th><a href="?<?php echo mkurl('SB=v&SO=' . $SO_next) ?>"><?php echo __("Votes") ?></a></th>
+ <?php if ($SID): ?>
+ <th><a href="?<?php echo mkurl('SB=w&SO=' . $SO_next) ?>"><?php echo __("Voted") ?></a></th>
+ <th><a href="?<?php echo mkurl('SB=o&SO=' . $SO_next) ?>"><?php echo __("Notify") ?></a></th>
+ <?php endif; ?>
+ <th><?php echo __("Description") ?></th>
+ <th><a href="?<?php echo mkurl('SB=m&SO=' . $SO_next) ?>"><?php echo __("Maintainer") ?></a></th>
+ </tr>
+ </thead>
+ <tbody>
+
+ <?php while (list($indx, $row) = each($searchresults)): ?>
+ <tr class="<?php echo ($indx % 2 == 0) ? 'odd' : 'even' ?>">
+ <?php if ($SID): ?>
+ <td><input type="checkbox" name="IDs[<?php echo $row["ID"] ?>]" value="1" /></td>
+ <?php endif; ?>
+ <td><?php echo htmlspecialchars($row["Category"]) ?></td>
+ <td><a href="packages.php?ID=<?php echo $row["ID"] ?>"><?php echo htmlspecialchars($row["Name"]) . ' ' . htmlspecialchars($row["Version"]) ?></a></td>
+ <td><?php echo $row["NumVotes"] ?></td>
+ <?php if ($SID): ?>
+ <td>
+ <?php if (isset($row["Voted"])): ?>
+ <?php echo __("Yes") ?>
+ <?php endif; ?>
+ </td>
+ <td>
+ <?php if (isset($row["Notify"])): ?>
+ <?php echo __("Yes") ?>
+ <?php endif; ?>
+ </td>
+ <?php endif; ?>
+ <td><?php echo htmlspecialchars($row['Description'], ENT_QUOTES); ?></td>
+ <td>
+ <?php if (isset($row["Maintainer"])): ?>
+ <a href="packages.php?K=<?php echo htmlspecialchars($row['Maintainer'], ENT_QUOTES) ?>&amp;SeB=m"><?php echo htmlspecialchars($row['Maintainer']) ?></a>
+ <?php else: ?>
+ <span><?php echo __("orphan") ?></span>
+ <?php endif; ?>
+ </td>
+ </tr>
+ <?php endwhile; ?>
+
+ </tbody>
+ </table>
+ <div id="pkglist-stats-bottom">
+ <p><?php echo __('%s Packages found. Showing %s - %s', $total, $first, $last) ?></p>
+
+ <p class="pkglist-nav">
+ <?php foreach ($templ_pages as $pagenr => $pagestart): ?>
+ <?php if ($pagestart === false): ?>
+ <span class="page"><?php echo $pagenr ?></span>
+ <?php elseif ($pagestart + 1 == $first): ?>
+ <span class="page"><?php echo $pagenr ?></span>
+ <?php else: ?>
+ <a class="page" href="packages.php?<?php echo mkurl('O=' . $pagestart) ?>"><?php echo $pagenr ?></a>
+ <?php endif; ?>
+ <?php endforeach; ?>
+ </p>
+ </div>
- <div class="pgbox pkg_search_results_footer">
- <div class="legend_and_actions">
- <div class="legend">
- <span class='f3'><?php echo __('Legend') ?></span>
- <span class="outofdate"><?php print __('Out of Date') ?></span>
- </div>
- <?php if ($SID): ?>
- <div>
- <select name='action'>
- <option><?php print __("Actions") ?></option>
- <option value='do_Flag'><?php print __("Flag Out-of-date") ?></option>
- <option value='do_UnFlag'><?php print __("Unflag Out-of-date") ?></option>
- <option value='do_Adopt'><?php print __("Adopt Packages") ?></option>
- <option value='do_Disown'><?php print __("Disown Packages") ?></option>
- <?php if ($atype == "Trusted User" || $atype == "Developer"): ?>
- <option value='do_Delete'><?php print __("Delete Packages") ?></option>
- <?php endif; ?>
- <option value='do_Notify'><?php print __("Notify") ?></option>
- <option value='do_UnNotify'><?php print __("UnNotify") ?></option>
- </select>
+ <?php if ($SID): ?>
+ <p>
+ <select name="action">
+ <option><?php echo __("Actions") ?></option>
+ <option value="do_Flag"><?php echo __("Flag Out-of-date") ?></option>
+ <option value="do_UnFlag"><?php echo __("Unflag Out-of-date") ?></option>
+ <option value="do_Adopt"><?php echo __("Adopt Packages") ?></option>
+ <option value="do_Disown"><?php echo __("Disown Packages") ?></option>
<?php if ($atype == "Trusted User" || $atype == "Developer"): ?>
- <label for='merge_Into'><?php print __("Merge into") ?></label>
- <input type='text' id='merge_Into' name='merge_Into' />
- <input type='checkbox' name='confirm_Delete' value='1' /> <?php print __("Confirm") ?>
+ <option value="do_Delete"><?php echo __("Delete Packages") ?></option>
<?php endif; ?>
- <input type='hidden' name='token' value='<?php print htmlspecialchars($_COOKIE['AURSID']) ?>' />
- <input type='submit' class='button' style='width: 80px' value='<?php print __("Go") ?>' />
- </div>
- <?php endif; # if ($SID) ?>
- </div> <!-- .legend_and_actions -->
- <div class="page_links">
- <div class="f4 blue">
- <?php print __("Showing results %s - %s of %s", $first, $last, $total) ?>
- </div>
- <div class="page_nav">
- <?php foreach($templ_pages as $pagenr => $pagestart) { ?>
- <?php if ($pagestart === false) { ?>
- <?php echo $pagenr ?>
- <?php } else if ($pagestart + 1 == $first) { ?>
- <span class="page_sel"><?php echo $pagenr ?></span>
- <?php } else { ?>
- <a class="page_num" href="packages.php?<?php print mkurl('O=' . ( $pagestart)) ?>"><?php echo $pagenr ?></a>
- <?php } ?>
- <?php } ?>
- </div>
- </div> <!-- .page_links -->
- </div> <!-- .pgbox .pkg_search_results_footer -->
- </form>
-<?php } # search was successful and returned multiple results ?>
+ <option value="do_Notify"><?php echo __("Notify") ?></option>
+ <option value="do_UnNotify"><?php echo __("UnNotify") ?></option>
+ </select>
+ <?php if ($atype == "Trusted User" || $atype == "Developer"): ?>
+ <label for="merge_Into"><?php echo __("Merge into") ?></label>
+ <input type="text" id="merge_Into" name="merge_Into" />
+ <input type="checkbox" name="confirm_Delete" value="1" /> <?php echo __("Confirm") ?>
+ <?php endif; ?>
+ <input type="hidden" name="token" value="<?php echo htmlspecialchars($_COOKIE['AURSID']) ?>" />
+ <input type="submit" class="button" style="width: 80px" value="<?php echo __("Go") ?>" />
+ </p>
+ <?php endif; # if ($SID) ?>
+ </form>
+ </div>
+<?php endif; # search was successful and returned multiple results ?>
diff --git a/web/template/search_accounts_form.php b/web/template/search_accounts_form.php
index 9d6c40d..9e8c241 100644
--- a/web/template/search_accounts_form.php
+++ b/web/template/search_accounts_form.php
@@ -1,74 +1,74 @@
<br />
-<form action='account.php' method='post'>
- <table border='0' cellpadding='0' cellspacing='0' width='80%' style="margin:0 auto;">
+<form action="account.php" method="post">
+ <table>
<tr>
- <td align='left'><?php print __("Username"); ?>:</td>
- <td align='left'>
- <input type='text' size='30' maxlength='64' name='U' />
+ <td align="left"><?php print __("Username"); ?>:</td>
+ <td align="left">
+ <input type="text" size="30" maxlength="64" name="U" />
</td>
</tr>
<tr>
- <td align='left'><?php print __("Account Type"); ?>:</td>
- <td align='left'>
+ <td align="left"><?php print __("Account Type"); ?>:</td>
+ <td align="left">
<select name="T">
- <option value=''><?php print __("Any type"); ?></option>
- <option value='u'><?php print __("Normal user"); ?></option>
- <option value='t'><?php print __("Trusted user"); ?></option>
- <option value='d'><?php print __("Developer"); ?></option>
+ <option value=""><?php print __("Any type"); ?></option>
+ <option value="u"><?php print __("Normal user"); ?></option>
+ <option value="t"><?php print __("Trusted user"); ?></option>
+ <option value="d"><?php print __("Developer"); ?></option>
</select>
</td>
</tr>
<tr>
- <td align='left'><?php print __("Account Suspended"); ?>:</td>
- <td align='left'>
- <input type='checkbox' name='S' />
+ <td align="left"><?php print __("Account Suspended"); ?>:</td>
+ <td align="left">
+ <input type="checkbox" name="S" />
</td>
</tr>
<tr>
- <td align='left'><?php print __("Email Address"); ?>:</td>
- <td align='left'>
- <input type='text' size='30' maxlength='64' name='E' />
+ <td align="left"><?php print __("Email Address"); ?>:</td>
+ <td align="left">
+ <input type="text" size="30" maxlength="64" name="E" />
</td>
</tr>
<tr>
- <td align='left'><?php print __("Real Name"); ?>:</td>
- <td align='left'>
- <input type='text' size='30' maxlength='32' name='R' />
+ <td align="left"><?php print __("Real Name"); ?>:</td>
+ <td align="left">
+ <input type="text" size="30" maxlength="32" name="R" />
</td>
</tr>
<tr>
- <td align='left'><?php print __("IRC Nick"); ?>:</td>
- <td align='left'>
- <input type='text' size='30' maxlength='32' name='I' />
+ <td align="left"><?php print __("IRC Nick"); ?>:</td>
+ <td align="left">
+ <input type="text" size="30" maxlength="32" name="I" />
</td>
</tr>
<tr>
- <td align='left'><?php print __("Sort by"); ?>:</td>
- <td align='left'>
+ <td align="left"><?php print __("Sort by"); ?>:</td>
+ <td align="left">
<select name="SB">
- <option value='u'><?php print __("Username"); ?></option>
- <option value='t'><?php print __("Account Type"); ?></option>
- <option value='r'><?php print __("Real Name"); ?></option>
- <option value='i'><?php print __("IRC Nick"); ?></option>
- <option value='v'><?php print __("Last vote"); ?></option>
+ <option value="u"><?php print __("Username"); ?></option>
+ <option value="t"><?php print __("Account Type"); ?></option>
+ <option value="r"><?php print __("Real Name"); ?></option>
+ <option value="i"><?php print __("IRC Nick"); ?></option>
+ <option value="v"><?php print __("Last vote"); ?></option>
</select>
</td>
</tr>
<tr>
<td>&nbsp;</td>
- <td align='left'>
+ <td align="left">
<br />
- <input type='hidden' name='Action' value='SearchAccounts' />
- <input type='submit' class='button' value="<?php print __("Search"); ?>" />
- <input type='reset' class='button' value="<?php print __("Reset"); ?>" />
+ <input type="hidden" name="Action" value="SearchAccounts" />
+ <input type="submit" class="button" value="<?php print __("Search"); ?>" />
+ <input type="reset" class="button" value="<?php print __("Reset"); ?>" />
</td>
</tr>
diff --git a/web/template/stats/general_stats_table.php b/web/template/stats/general_stats_table.php
index a100dfe..e2b12c7 100644
--- a/web/template/stats/general_stats_table.php
+++ b/web/template/stats/general_stats_table.php
@@ -1,37 +1,36 @@
-<table class='boxSoft'>
+<h3><?php echo __("Statistics") ?></h3>
+
+<table>
<tr>
- <th colspan='2' class='boxSoftTitle'><span class='f3'><?php print __("Statistics") ?></span></th>
+ <td><?php print __("Packages"); ?></td>
+ <td><?php print $unsupported_count; ?></td>
</tr>
<tr>
- <td class='boxSoft'><span class='f4'><?php print __("Packages"); ?></span></td>
- <td class='boxSoft'><span class='f4'><?php print $unsupported_count; ?></span></td>
+ <td><?php print __("Orphan Packages"); ?></td>
+ <td><?php print $orphan_count; ?></td>
</tr>
<tr>
- <td class='boxSoft'><span class='f4'><?php print __("Orphan Packages"); ?></span></td>
- <td class='boxSoft'><span class='f4'><?php print $orphan_count; ?></span></td>
+ <td><?php print __("Packages added in the past 7 days"); ?></td>
+ <td><?php print $add_count; ?></td>
</tr>
<tr>
- <td class='boxSoft'><span class='f4'><?php print __("Packages added in the past 7 days"); ?></span></td>
- <td class='boxSoft'><span class='f4'><?php print $add_count; ?></span></td>
+ <td><?php print __("Packages updated in the past 7 days"); ?></td>
+ <td><?php print $update_count; ?></td>
</tr>
<tr>
- <td class='boxSoft'><span class='f4'><?php print __("Packages updated in the past 7 days"); ?></span></td>
- <td class='boxSoft'><span class='f4'><?php print $update_count; ?></span></td>
+ <td><?php print __("Packages updated in the past year"); ?></td>
+ <td><?php print $update_year_count; ?></td>
</tr>
<tr>
- <td class='boxSoft'><span class='f4'><?php print __("Packages updated in the past year"); ?></span></td>
- <td class='boxSoft'><span class='f4'><?php print $update_year_count; ?></span></td>
+ <td><?php print __("Packages never updated"); ?></td>
+ <td><?php print $never_update_count; ?></td>
</tr>
<tr>
- <td class='boxSoft'><span class='f4'><?php print __("Packages never updated"); ?></span></td>
- <td class='boxSoft'><span class='f4'><?php print $never_update_count; ?></span></td>
+ <td><?php print __("Registered Users"); ?></td>
+ <td><?php print $user_count; ?></td>
</tr>
<tr>
- <td class='boxSoft'><span class='f4'><?php print __("Registered Users"); ?></span></td>
- <td class='boxSoft'><span class='f4'><?php print $user_count; ?></span></td>
- </tr>
- <tr>
- <td class='boxSoft'><span class='f4'><?php print __("Trusted Users"); ?></span></td>
- <td class='boxSoft'><span class='f4'><?php print $tu_count; ?></span></td>
+ <td><?php print __("Trusted Users"); ?></td>
+ <td><?php print $tu_count; ?></td>
</tr>
</table>
diff --git a/web/template/stats/updates_table.php b/web/template/stats/updates_table.php
index 8da6732..b942dbc 100644
--- a/web/template/stats/updates_table.php
+++ b/web/template/stats/updates_table.php
@@ -1,36 +1,16 @@
-<table class="boxSoft">
-<tr>
-<th colspan="2" class="boxSoftTitle" style="text-align: right">
-<span class="f3"><?php print __("Recent Updates") ?><span class="f5"></span></span>
-<a href="rss.php"><img src="images/feed-icon-14x14.png" alt="RSS Feed" /></a>
-</th>
-</tr>
+<h3><?php echo __("Recent Updates") ?></h3>
-<?php foreach ($newest_packages->getIterator() as $row): ?>
-<tr>
-<td class="boxSoft">
-<span class="f4"><span class="blue">
-<a href="packages.php?ID=<?php print intval($row["ID"]); ?>">
-<?php print htmlspecialchars($row["Name"]) . ' ' . htmlspecialchars($row["Version"]); ?>
-</a></span></span>
-</td>
-<td class="boxSoft">
-
-<?php
-$mod_int = intval($row["ModifiedTS"]);
-$sub_int = intval($row["SubmittedTS"]);
-
-if ($mod_int == $sub_int):
- $modstring = '<img src="images/new.gif" alt="New!" /> ' . gmdate("r", $sub_int);
-else:
- $modstring = gmdate("r", $mod_int);
-endif;
-?>
-
-<span class="f4"><?php print $modstring; ?></span>
-</td>
-</tr>
-
-<?php endforeach; ?>
+<a href="rss.php" title="Arch Package Updates RSS Feed" class="rss-icon"><img src="images/feed-icon-14x14.png" alt="RSS Feed" /></a>
+<table>
+ <?php foreach ($newest_packages->getIterator() as $row): ?>
+ <tr>
+ <td>
+ <a href="packages.php?ID=<?php print intval($row["ID"]); ?>"><?php print htmlspecialchars($row["Name"]) . ' ' . htmlspecialchars($row["Version"]); ?></a>
+ </td>
+ <td>
+ <span><?php print gmdate("Y-m-d H:i", intval($row["ModifiedTS"])); ?></span>
+ </td>
+ </tr>
+ <?php endforeach; ?>
</table>
diff --git a/web/template/stats/user_table.php b/web/template/stats/user_table.php
index 36a6b10..0882119 100644
--- a/web/template/stats/user_table.php
+++ b/web/template/stats/user_table.php
@@ -1,31 +1,21 @@
<?php
- $username = username_from_sid($_COOKIE["AURSID"]);
+$username = username_from_sid($_COOKIE["AURSID"]);
?>
-<table class='boxSoft'>
-<tr>
-<th colspan='2' class='boxSoftTitle'>
-<span class='f3'><?php print __("My Statistics"); ?></span>
-</th>
-</tr>
-<tr>
-<td class='boxSoft'>
-<span class='f4'><a href="packages.php?SeB=m&amp;L=2&amp;K=<?php echo $username; ?>">
-<?php print __("Packages in unsupported"); ?></a></span>
-</td>
-<td class='boxSoft'>
-<span class='f4'><?php print $maintainer_unsupported_count; ?></span>
-</td>
-</tr>
-<tr>
-<td class='boxSoft'>
-<span class='f4'><a href="packages.php?SeB=m&amp;outdated=on&amp;K=<?php echo $username; ?>">
-<?php print __("Out of Date"); ?></a></span>
-</td>
-<td class='boxSoft'>
-<span class='f4'>
-<?php echo $flagged_outdated ?></span>
-</td>
-</tr>
-</table>
+<h3><?php echo __("My Statistics"); ?></h3>
+<table>
+ <tr>
+ <td>
+ <a href="packages.php?SeB=m&amp;L=2&amp;K=<?php echo $username; ?>">
+<?php print __("Packages in unsupported"); ?></a>
+ </td>
+ <td><?php print $maintainer_unsupported_count; ?></td>
+ </tr>
+ <tr>
+ <td>
+ <a href="packages.php?SeB=m&amp;outdated=on&amp;K=<?php echo $username; ?>"><?php print __("Out of Date"); ?></a>
+ </td>
+ <td><?php echo $flagged_outdated ?></td>
+ </tr>
+</table>
diff --git a/web/template/tu_details.php b/web/template/tu_details.php
index dde53a8..38015e1 100644
--- a/web/template/tu_details.php
+++ b/web/template/tu_details.php
@@ -1,79 +1,76 @@
-<div class="pgbox">
-<div class="pgboxtitle"><span class="f3"><?php print __("Proposal Details") ?></span></div>
-<div class="pgboxbody">
-<?php
-if ($isrunning == 1) { ?>
-<p style='font-weight: bold; color: red'>
-<?php print __("This vote is still running.") ?>
-</p>
-<?php
-} ?>
+<div class="box">
+ <h2><?php print __("Proposal Details") ?></h2>
-<p>
-<?php echo __('User') ?>: <b>
-<?php if (!empty($row['User'])) { ?>
-<a href='packages.php?K=<?php print $row['User'] ?>&amp;SeB=m'><?php print $row['User'] ?></a>
-<?php } else { ?>
-N/A
-<?php } ?>
-</b><br />
-<?php print __("Submitted: %s by %s", "<b>" . gmdate("r", $row['Submitted']) . "</b>", "<b>" . username_from_id($row['SubmitterID']) . "</b>") ?><br />
-<?php print __('End') ?>: <b><?php print gmdate("r", $row['End']) ?></b></p>
+ <?php if ($isrunning == 1): ?>
+ <p style="font-weight: bold; color: red">
+ <?php print __("This vote is still running.") ?>
+ </p>
+ <?php endif; ?>
-<p>
-<?php print str_replace("\n", "<br />\n", htmlspecialchars($row['Agenda'])) ?>
-</p>
+ <p>
+ <?php echo __("User") ?>:
+ <b>
+ <?php if (!empty($row['User'])): ?>
+ <a href="packages.php?K=<?php print $row['User'] ?>&amp;SeB=m"><?php print $row['User'] ?></a>
+ <?php else: ?>
+ N/A
+ <?php endif; ?>
+ </b>
+ <br />
+ <?php print __("Submitted: %s by %s", "<b>" . gmdate("Y-m-d H:i", $row['Submitted']) . "</b>", "<b>" . username_from_id($row['SubmitterID']) . "</b>") ?>
+ <br />
+ <?php print __("End") ?>:
+ <b><?php print gmdate("Y-m-d H:i", $row['End']) ?></b>
+ </p>
-<table class="boxSoft" width='100%' cellspacing='0' cellpadding='2'>
-<tr>
-<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("Yes") ?></span></th>
-<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("No") ?></span></th>
-<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("Abstain") ?></span></th>
-<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("Total") ?></span></th>
-<th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __('Voted') ?></span></th>
-</tr>
-<tr>
-<td class='data1'><span class='f5'><span class='blue'><?php print $row['Yes'] ?></span></span></td>
-<td class='data1'><span class='f5'><span class='blue'><?php print $row['No'] ?></span></span></td>
-<td class='data1'><span class='f5'><span class='blue'><?php print $row['Abstain'] ?></span></span></td>
-<td class='data1'><span class='f5'><span class='blue'><?php print ($row['Yes'] + $row['No'] + $row['Abstain']) ?></span></span></td>
-<td class='data1'><span class='f5'><span class='blue'>
-<?php if ($hasvoted == 0) { ?>
-<span style='color: red; font-weight: bold'><?php print __("No") ?></span>
-<?php } else { ?>
-<span style='color: green; font-weight: bold'><?php print __("Yes") ?></span>
-<?php } ?>
-</span></span></td>
-</tr>
-</table>
-</div></div>
+ <p>
+ <?php print str_replace("\n", "<br />\n", htmlspecialchars($row['Agenda'])) ?>
+ </p>
-<?php
-if (!$isrunning) { ?>
-<div class="pgbox">
- <div class="pgboxtitle">
- <span class="f3"><?php echo __('Voters'); ?></span>
- </div>
- <div class="pgboxbody">
+ <table>
+ <tr>
+ <th><?php print __("Yes") ?></th>
+ <th><?php print __("No") ?></th>
+ <th><?php print __("Abstain") ?></th>
+ <th><?php print __("Total") ?></th>
+ <th><?php print __('Voted') ?></th>
+ </tr>
+ <tr>
+ <td><?php print $row['Yes'] ?></td>
+ <td><?php print $row['No'] ?></td>
+ <td><?php print $row['Abstain'] ?></td>
+ <td><?php print ($row['Yes'] + $row['No'] + $row['Abstain']) ?></td>
+ <td>
+ <?php if ($hasvoted == 0): ?>
+ <span style="color: red; font-weight: bold"><?php print __("No") ?></span>
+ <?php else: ?>
+ <span style="color: green; font-weight: bold"><?php print __("Yes") ?></span>
+ <?php endif; ?>
+ </td>
+ </tr>
+ </table>
+</div>
+
+<?php if (!$isrunning): ?>
+<div class="box">
+ <h2><?php echo __("Voters"); ?></h2>
<?php echo $whovoted; ?>
- </div>
</div>
-<?php
-} ?>
+<?php endif; ?>
-<div class='pgbox'>
-<div class='pgboxbody'>
-<?php if ($canvote == 1) { ?>
-<form action='tu.php?id=<?php print $row['ID'] ?>' method='post'>
-<fieldset>
-<input type='submit' class='button' name='voteYes' value='<?php print __("Yes") ?>' />
-<input type='submit' class='button' name='voteNo' value='<?php print __("No") ?>' />
-<input type='submit' class='button' name='voteAbstain' value='<?php print __("Abstain") ?>' />
-<input type='hidden' name='doVote' value='1' />
-<input type='hidden' name='token' value='<?php print htmlspecialchars($_COOKIE['AURSID']) ?>' />
-</fieldset>
-</form>
-<?php } else { ?>
-<?php print $errorvote ?>
-<?php } ?>
-</div></div>
+<div class="box">
+
+<?php if ($canvote == 1): ?>
+ <form action="tu.php?id=<?php print $row['ID'] ?>" method="post">
+ <fieldset>
+ <input type="submit" class="button" name="voteYes" value="<?php print __("Yes") ?>" />
+ <input type="submit" class="button" name="voteNo" value="<?php print __("No") ?>" />
+ <input type="submit" class="button" name="voteAbstain" value="<?php print __("Abstain") ?>" />
+ <input type="hidden" name="doVote" value="1" />
+ <input type="hidden" name="token" value="<?php echo htmlspecialchars($_COOKIE['AURSID']) ?>" />
+ </fieldset>
+ </form>
+<?php else:
+ print $errorvote ?>
+<?php endif; ?>
+</div>
diff --git a/web/template/tu_list.php b/web/template/tu_list.php
index 75d9414..ce19da3 100644
--- a/web/template/tu_list.php
+++ b/web/template/tu_list.php
@@ -1,62 +1,56 @@
-<div class="pgbox">
- <div class="pgboxtitle" style="text-align:right;">
- <span class='f3'><?php print $type ?></span>
- </div>
- <table width='100%' cellspacing='0' cellpadding='2'>
- <tr>
- <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("Proposal") ?></span></th>
- <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'>
- <a href='?off=<?php print $off ?>&amp;by=<?php print $by_next ?>'><?php print __("Start") ?></a>
- </span></th>
- <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("End") ?></span></th>
- <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("User") ?></span></th>
- <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("Yes") ?></span></th>
- <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("No") ?></span></th>
- <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __('Voted') ?></span></th>
- </tr>
- <?php if (mysql_num_rows($result) == 0) { ?>
- <tr><td align='center' colspan='0'><?php print __("No results found.") ?></td></tr>
- <?php } else { for ($i = 0; $row = mysql_fetch_assoc($result); $i++) { (($i % 2) == 0) ? $c = "data1" : $c = "data2"; ?>
- <tr>
- <td class='<?php print $c ?>'><span class='f4'><span class='blue'>
- <?php
- $row["Agenda"] = htmlspecialchars(substr($row["Agenda"], 0, $prev_Len));
- ?>
- <a href='tu.php?id=<?php print $row['ID'] ?>'><?php print $row["Agenda"] ?></a></span></span>
- </td>
- <td class='<?php print $c ?>'><span class='f5'><span class='blue'><?php print gmdate("j M y", $row["Submitted"]) ?></span></span></td>
- <td class='<?php print $c ?>'><span class='f5'><span class='blue'><?php print gmdate("j M y", $row["End"]) ?></span></span></td>
- <td class='<?php print $c ?>'><span class='f6'><span class='blue'>
- <?php
- if (!empty($row['User'])) {
- print "<a href='packages.php?K=" . $row['User'] . "&amp;SeB=m'>" . $row['User'] . "</a>";
- } else {
- print "N/A";
- }
- ?>
- </span></span></td>
- <td class='<?php print $c ?>'><span class='f5'><span class='blue'><?php print $row['Yes'] ?></span></span></td>
- <td class='<?php print $c ?>'><span class='f5'><span class='blue'><?php print $row['No'] ?></span></span></td>
- <td class='<?php print $c ?>'>
- <?php
- $q = "SELECT * FROM TU_Votes WHERE VoteID = " . $row['ID'] . " AND UserID = " . uid_from_sid($_COOKIE["AURSID"]);
- $result_tulist = db_query($q, $dbh);
- if ($result_tulist) {
- $hasvoted = mysql_num_rows($result_tulist);
- }
- else {
- $hasvoted = 0;
- }
- ?>
- <span class='f5'><span class='blue'>
- <?php if ($hasvoted == 0) { ?>
- <span style='color: red; font-weight: bold'><?php print __("No") ?></span>
- <?php } else { ?>
- <span style='color: green; font-weight: bold'><?php print __("Yes") ?></span>
- <?php } ?>
- </span></span>
- </td>
- </tr>
- <?php } } ?>
- </table>
+<div class="box">
+ <h2><?php print $type ?></h2>
+ <table class="results">
+ <thead>
+ <tr>
+ <th><?php print __("Proposal") ?></th>
+ <th><a href="?off=<?php print $off ?>&amp;by=<?php print $by_next ?>"><?php print __("Start") ?></a></th>
+ <th><?php print __("End") ?></th>
+ <th><?php print __("User") ?></th>
+ <th><?php print __("Yes") ?></th>
+ <th><?php print __("No") ?></th>
+ <th><?php print __('Voted') ?></th>
+ </tr>
+ </thead>
+
+ <tbody>
+ <?php if (empty($result)): ?>
+ <tr><td align="center" colspan="0"><?php print __("No results found.") ?></td></tr>
+ <?php else: while (list($indx, $row) = each($result)):
+ if ($indx % 2):
+ $c = "even";
+ else:
+ $c = "odd";
+ endif;
+ ?>
+ <tr class="<?php print $c ?>">
+ <td><?php $row["Agenda"] = htmlspecialchars(substr($row["Agenda"], 0, $prev_Len)); ?>
+ <a href="tu.php?id=<?php print $row['ID'] ?>"><?php print $row["Agenda"] ?></a></span></span>
+ </td>
+ <td><?php print gmdate("Y-m-d", $row["Submitted"]) ?></td>
+ <td><?php print gmdate("Y-m-d", $row["End"]) ?></td>
+ <td>
+ <?php if (!empty($row['User'])): ?>
+ <a href="packages.php?K=<?php echo $row['User'] ?>&amp;SeB=m"><?php echo $row['User'] ?></a>
+ <?php else:
+ print "N/A";
+ endif;
+ ?>
+ </td>
+ <td><?php print $row['Yes'] ?></td>
+ <td><?php print $row['No'] ?></td>
+ <td>
+ <?php if (tu_voted($row['ID'], uid_from_sid($_COOKIE["AURSID"]))): ?>
+ <span style="color: green; font-weight: bold"><?php print __("Yes") ?></span>
+ <?php else: ?>
+ <span style="color: red; font-weight: bold"><?php print __("No") ?></span>
+ <?php endif; ?>
+ </td>
+ </tr>
+ <?php
+ endwhile;
+ endif;
+ ?>
+ </tbody>
+ </table>
</div>