<link href="css/tender_project.css" rel="stylesheet" type="text/css" />
<?php   $targetpage="index.php?route=PMS/Transcations/ViewPBSCreation".$rurl;
$action=$_REQUEST['action'];
?>

<?php 
//************************Delete*********************************************** 
if( $action=='del')
{
 	$condition1="pid='".$_REQUEST['id']."'";
	$s->DeleteRecord('boq_entry_details',$condition1);
 
	 	 $condition="id='".$_REQUEST['pid']."'";
	      $s->DeleteRecord('boq_entry',$condition);
	      $s->pageLocation($targetpage.'daction=Deleted');
 }
 
?>
<div class="tender_main_page">
<h1>PBS Creation For Project</h1>
 <div><a href="<?php echo   "index.php?route=PMS/Transcations/psb_creation_project&action=Addnew".$rurl;?>"> Add new</a></div>
<br />

<table width="100%" border="1" cellspacing="0" cellpadding="3">
  <tr class="row1">
  	<td class="tabledata">Sno.</td>
	<td class="tabledata">PBS Group</td>
 	<td class="tabledata">PBS Name</td>
 	<td class="tabledata">View</td>
  </tr>
 <?php     
 $i=1; 
// echo "Select * from   psm_psb_project  where  parent_id!=0";
   	$sql1=DB_query("Select * from  psm_psb_project  where  parent_id!=0 ",$db); 	
	 while( $myrow=DB_fetch_array($sql1)){
    ?>
  <tr bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#fffeb3'; this.style.color='#00f';" onMouseOut="this.style.backgroundColor='#FFF'; this.style.color='#000000';" >
  <td class="tabledata1"><?php echo $i++; ?></td>
  <td class="tabledata1"><?php   echo  $s->GetFieldValue('psm_psb_project',"id='".$myrow['parent_id']."'" ,'pbse_description');;?></td>
     <td class="tabledata1" width="40%">
 <?php  echo $myrow['pbse_description'];?>	<?php 
 	//echo  $s->GetFieldValue('master_boq',"id='".$myrow1['boqid']."'" ,'group_title');
 	// echo $myrow1['id'];?></td>
    <td class="tabledata1">
 <a href="index.php?route=PMS/Transcations/psb_creation_project&action=View&id=<?php echo $myrow['id']."&pid=".$myrow['parent_id'].$rurl?>" class="link">View</a></td> 
</tr>  
  <?php    
  }
   ?>
</table>
 
</div>