<?php 
$url_cancel= "index.php?route=SubContractors/Masters/contractor_category_index".$rurl;
$url_add= "index.php?route=SubContractors/Masters/contractor_category".$rurl;


//echo $url_cancel;
?>
<?php

	if($_REQUEST['action']=='delete' && !empty($_REQUEST['isid']))
	{
		if($s->DeleteRecord('tbl_subcontractor_contractor_category',"id=".$_REQUEST['isid']))
		{
			
			
			$_SESSION['success_msg']="Delete Successfully";
		
		}
	}


?>

<table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr>
    <td style="padding:5px"><!-- General details -->
      <table width="100%" cellspacing="0" cellpadding="0" border="0" class="small">
        <tr>
          <td style="padding:5px; text-align:right;" colspan="4" align="center">
	<div align="center">
		
		<a href="<?php echo $url_add;?>">Add New</a></div>
        </tr>
        <tr>
          <td class="detailedViewHeader"  style="text-align:center;" colspan="4"><b>Contractor Category Details</b></td>
        </tr>
       
   <tr>
	<td><table width="60%" border="1" cellspacing="1" cellpadding="5" align="center">
  	<tr>
  		<th><strong>Sr. No.</strong></th>
	  	<th><strong>Contractor Category Name</strong></th>
	  	<th><strong>Status</strong></th>
	   <th colspan="2"><strong>Action</strong></th>
   </tr>
              <tr>
              	<?php 
              	$record=$s->GetRecordById('tbl_subcontractor_contractor_category',1);
              	// $record=DB_query("select * from tpl_asset_transfer_issue",$db);
  					$i=0;
					while($row=DB_fetch_array($record))
					{
						$i++;
						extract($row);
					//echo $transfer_reqno;

				//print_r($transfer_reqno);
              	?>
	           	<td><?php  echo "<b>". $i." : </b>";?></td>
	            <td><?php  echo $Contractor_category_name;?> </td>
	            <td><?php  if($status=='false') {echo "Inactive"; }else { echo "Active";} ?> </td>
	                      
                 <td><a href="<?php echo $url_add;?>&action=edit&isid=<?php echo $id;?>"><img src="images/icon-edit.png" width="10" height="10"></a> </td><td>
				<a href="<?php echo $url_cancel;?>&action=delete&isid=<?php echo $id;?>"><img src="images/Icon_Delete.png" width="10" height="10" onClick="return confirm('Are you sure you wish to delete this Record?')"></a></td>
              </tr><?php 
				} 
              ?>
            
            </table></td>
        </tr>
        <tr>
          <td style="padding:5px; text-align:right;" colspan="4" align="right"></td>
        </tr>
      </table></td>
  </tr>
</table>
<?php if(isset($_SESSION['success_msg']))
{ ?>
	<script> alert("<?php echo ($_SESSION['success_msg']);?>");</script>
<?php 
}	unset($_SESSION['success_msg']);
?>
