From: <eri...@us...> - 2008-02-09 16:37:17
|
Revision: 780 http://planeshift.svn.sourceforge.net/planeshift/?rev=780&view=rev Author: eriroley Date: 2008-02-09 08:37:21 -0800 (Sat, 09 Feb 2008) Log Message: ----------- Changed listitems to use category_id instead of item_type - also set category to show as bold when selected Modified Paths: -------------- www/webconsole/items/listitems.php Modified: www/webconsole/items/listitems.php =================================================================== --- www/webconsole/items/listitems.php 2008-02-09 10:39:28 UTC (rev 779) +++ www/webconsole/items/listitems.php 2008-02-09 16:37:21 UTC (rev 780) @@ -6,12 +6,20 @@ echo '<TABLE>'; // Display Item Types. - $query = "SELECT DISTINCT item_type FROM item_stats"; + $query = "SELECT name, category_id FROM item_categories"; $result = mysql_query2($query); while ($row = mysql_fetch_array($result)) { - echo '<TR><TD><A HREF="index.php?page=listitems&item_type=' . $row['item_type'] . '">' . $row['item_type'] . '</A></TD></TR>'; + echo '<TR><TD><A HREF="index.php?page=listitems&category_id=' . $row['category_id'] . '">' ; + if ($_GET['category_id'] == $row['category_id']){ + echo '<B>'; + } + echo $row['name']; + if ($_GET['category_id'] == $row['category_id']){ + echo '</B>'; } + echo '</A></TD></TR>'; + } echo '</table></td><td valign="top">'; @@ -21,11 +29,11 @@ } else { echo '<TABLE>'; - $query = 'SELECT id, name FROM item_stats WHERE item_type = "' . $_GET['item_type'] . '"'; + $query = 'SELECT id, name FROM item_stats WHERE category_id = "' . $_GET['category_id'] . '"'; $result = mysql_query2($query); while($row = mysql_fetch_array($result)) { - echo '<TR><TD>' . $row['id'] . '</TD><TD><A HREF="index.php?page=listitems&item_type=' . $_GET['item_type'] . '&item=' . $row['id'] . '">' . $row['name'] . '</A></TD></TR>'; + echo '<TR><TD>' . $row['id'] . '</TD><TD><A HREF="index.php?page=listitems&category_id=' . $_GET['category_id'] . '&item=' . $row['id'] . '">' . $row['name'] . '</A></TD></TR>'; } echo '</TABLE></TD><TD VALIGN="top">'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |