  <?
  if ($pubtype=="1") {
    echo "<b>BUDGETED MATERIAL</b>";
  } else if ($pubtype=="2") {
    echo "<b>BUDGETED MATERIAL EXCEEDED</b>";
  } else if ($pubtype=="3") {
    echo "<b>NON BUDGETED MATERIAL - VO</b>";
  } else if ($pubtype=="4") {
    echo "<b>NON BUDGETED MATERIAL - Subcon</b>";
  }
  ?>
  <hr size=1>
  <table border=1 cellspacing=1 cellpadding=2 width=928 style="border: 1px inset;">

  <tr valign=top>
  <td valign=top width=48 class=listheader>No.</td>
  <td valign=top width=100 class=listheader>MRO No</td>
  <td valign=top width=180 class=listheader>Sub-con PO/Ref</td>
  <td valign=top width=180 class=listheader>Client MRO No</td>
  <td valign=top width=120 class=listheader>Request Date</td>
  <td valign=top width=120 class=listheader>Delivery Date</td>
  <td valign=top width=100 class=listheader>Status</td>
  <td valign=top width=80 class=listheader>Options</td>
  </tr>

  <? foreach ($mro_list as $mymro) { ?>

    <tr valign=top>
    <td valign=top width=48 class=listnumber><?=$mymro['recordno'];?></td>
    <td valign=top width=100 class=listcontent><?=mroidstr($mymro['mro_id']);?>&nbsp;</td>
    <td valign=top width=180 class=listcontent><?=$mymro['mro_subconref'];?>&nbsp;</td>
    <td valign=top width=180 class=listcontent><?=$mymro['mro_clientref'];?>&nbsp;</td>
    <td valign=top width=120 class=listcontent><?=unconverttounixslash($mymro['mro_requestdate']);?>&nbsp;</td>
    <td valign=top width=120 class=listcontent><?=unconverttounixslash($mymro['mro_deliverydate']);?>&nbsp;</td>
    <td valign=top width=100 class=listcontent>
    <?
    if ($mymro['mro_status']=="0") {
      echo "New";  
    } else if ($mymro['mro_status']=="1") {
      echo "Submitted";
    } else if ($mymro['mro_status']=="2") {
      echo "Recommended";
    } else if ($mymro['mro_status']=="3") {
      echo "Approved";
    } else if ($mymro['mro_status']=="4") {
      echo "Cancelled";
    }
    ?>
    </td>
    <td valign=top width=80 class=listcontent>
    <? if ($mymro['mro_status']==4) { ?>
      
	  <!---->
	  <a href="sispms/views/rpt_mro.php?itemid=<?=$mymro['mro_pkey'];?>"><img src="gfx/options/b_view.png" border=0 title="View" alt="View"></a>
	  <a href="index.php?module=mro&task=view&itemid=<?=$mymro['mro_pkey'];?>"><img src="gfx/options/b_edit.png" border=0 title="edit" alt="edit"></a>
    <? } else { ?>
      <a href="sispms/views/rpt_mro.php?itemid=<?=$mymro['mro_pkey'];?>"><img src="gfx/options/b_view.png" border=0 title="View" alt="View"></a>
	  <a href="index.php?module=mro&task=view&itemid=<?=$mymro['mro_pkey'];?>"><img src="gfx/options/b_edit.png" border=0 title="edit" alt="edit"></a>
      <? if (($pubuseraccess['access_mro_edit']==1)||($pubuserrole>=2)) { ?>
        <? if ($mymro['mro_status']=="0") { ?>
		 
          <a href="index.php?module=mro&task=edit&itemid=<?=$mymro['mro_pkey'];?>"><img src="gfx/options/b_edit.png" border=0 title="Edit" alt="Edit"></a>
          <a href="index.php?module=mro&task=delete&itemid=<?=$mymro['mro_pkey'];?>"><img src="gfx/options/b_drop.png" border=0 title="Delete" alt="Delete"></a>
        <? } ?>
      <? } ?>
    <? } ?>
    </td>
    </tr>

  <? } ?>

  </table>
