<?
require 'include/configurations.php'; // ITECHBIDS Configuration File
require 'include/header.php';
?>
<table align="center" width="100%" height="35">
  <tr><td align="center" colspan="3" height="35" class="ft" heught=25"><font size=+1>
  Edit Categories</font></td></tr>
  </table>
  <table align="center" width="50%">
 <tr>
<td height="49"  class="ct" height="25" align="center">
Parent Categories
</td>
<td height="49"  class="ct" height="25" align="center">Category Name</td>
<td height="49"  class="ct" height="25" align="center">Priority</td>
</tr>
<?
		$category_sql="select * from site_categories where category_head_id=0";
		$category_result=mysql_query($category_sql);
		while($category_row=mysql_fetch_array($category_result))
		 {
		 ?>
		 <tr><td >&nbsp;</td>
		 <td> <a href="change_itechitems_11.php?cat_id=<?= $category_row[category_id]; ?>"><b><?= $category_row[category_name]; ?></b></a></td>
         <td> <?= $category_row[priority]; ?></td>
         </tr>
		<?
		$categoryname= $category_row['category_name'];
	    $subcategory_sql="select * from site_categories where category_head_id=".$category_row['category_id'];
		$subcategory_result=mysql_query($subcategory_sql);
		while($subcategory_row=mysql_fetch_array($subcategory_result))
		{
		  ?>
        <tr>
        <td align="right">&nbsp;&nbsp;&nbsp;&nbsp;
        <?=$categoryname ?>  &nbsp; > &nbsp; </td>
		
  <td> <a href="change_itechitems_11.php?cat_id=<?= $subcategory_row[category_id]; ?>"><?= $subcategory_row[category_name]; ?></a></td>
  <td> <?= $subcategory_row[priority]; ?></td>
  </tr>
 <?
 }
 }
 ?>
<? require'include/footer.php'; ?>