summaryrefslogtreecommitdiffstats
path: root/web/template/pkg_details.php
diff options
context:
space:
mode:
authorDan Vratil <vratil@progdansoft.com>2010-11-21 02:59:07 -0500
committerLoui Chang <louipc.ist@gmail.com>2010-11-21 03:37:17 -0500
commit57a5cbfd88b2b91722ce0bf6911b416d051dde65 (patch)
treec7a8175ec8c90ef6610aabce02af4d291ea74d14 /web/template/pkg_details.php
parent01fc2024cb48a68710065ceaae070f35aa69825d (diff)
downloadaurweb-57a5cbfd88b2b91722ce0bf6911b416d051dde65.tar.xz
Auto redirect from confirmation screens.
Finally move comment deletion and category editing into functions and remove pkgedit.php Signed-off-by: Loui Chang <louipc.ist@gmail.com> -Fix indentation -Fix variable naming conflict $id vs $cid
Diffstat (limited to 'web/template/pkg_details.php')
-rw-r--r--web/template/pkg_details.php23
1 files changed, 17 insertions, 6 deletions
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php
index a4b8f95..7c6356d 100644
--- a/web/template/pkg_details.php
+++ b/web/template/pkg_details.php
@@ -4,13 +4,24 @@ $pkgid = intval($_REQUEST['ID']);
if ($row["Location"] == "unsupported" and ($uid == $row["MaintainerUID"] or
($atype == "Developer" or $atype == "Trusted User"))) {
- $edit_cat = "<a href='pkgedit.php?change_Category=1&amp;ID=";
- $edit_cat .= $pkgid ."'>".$row["Category"]."</a>";
- $edit_cat .= " &nbsp;<span class='fix'>(";
- $edit_cat .= __("change category").")</span>";
+ $catarr = pkgCategories();
+ $edit_cat = "<form method='POST' action='packages.php?ID=".$pkgid."'>\n";
+ $edit_cat.= "<input type='hidden' name='action' value='do_ChangeCategory'>";
+ $edit_cat.= $row['Location']." :: ";
+ $edit_cat.= "<select name='category_id'>\n";
+ foreach ($catarr as $cid => $catname) {
+ $edit_cat.= "<option value='$cid'";
+ if ($cid == $row["CategoryID"]) {
+ $edit_cat.="selected";
+ }
+ $edit_cat.=">".$catname."</option>";
+ }
+ $edit_cat.= "</select>&nbsp;<input type='submit' value='Change category'>";
+ $edit_cat.= "</form>";
+
}
else {
- $edit_cat = $row['Category'];
+ $edit_cat = $row['Location']." :: ".$row['Category'];
}
if ($row["MaintainerUID"]) {
@@ -49,7 +60,7 @@ $out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : gmdate("r", intval($row[
</p>
<p>
- <span class='f3'><?php echo $row['Location'] . ' :: ' . $edit_cat ?></span><br />
+ <span class='f3'><?php echo $edit_cat ?></span><br />
<span class='f3'><?php echo __('Maintainer') .': ' . $maintainer ?></span><br />
<span class='f3'><?php echo $votes ?></span>
</p>