<?php $PageSecurity = 4;
global  $db;
include('includes/session.inc');
include('includes/SQL_CommonFunctions.inc');
include('includes/function_lib.php');
?>
<link href="css/professional/default.css" rel="stylesheet" type="text/css" />
<?php 
if($_REQUEST['submit_tech']!='')
{


	$key = key($_REQUEST['submit_tech']);
	$sql1="Insert into trouble_ticket_creation_assignment set
			ttid='".$_REQUEST['ttid']."', 
			technician_id='".$_REQUEST['tech_id'][$key]."'";
		
	$result1=DB_query($sql1,$db);
?>
<script>
self.close();

</script>
<?php 
}
?>



<h2 align="center">Assignment Details </h2>
<form name="form1" action="" method="post">
  <table width="100%" border="0" cellspacing="3" cellpadding="2" align="center">
    <tr>
		<th width="5%"><strong>S.No.</strong></th>
      <th width="18%"><strong>Advice No</strong></th>
      <th width="34%">Project</th>
    </tr>
  <?php //echo "SELECT * FROM project_assign_contractor where vendor_id='".$_REQUEST['techaid']."'";
 	$sql=DB_query("SELECT * FROM project_assign_contractor where vendor_id='".$_REQUEST['techaid']."'",$db); 	
	?>  
      <?php		
	$i=0;
	$j = 1;
	if(DB_num_rows($sql)>0)
	{
		while($myrow=DB_fetch_array($sql))
	  	{ 
		$j = $j +$i;  ?>
      <tr bgcolor="#CCCCCC">
	  <td width="5%"><?php echo  $j;?></td>
          <td width="35%">
		<?php 
         $saleid=$s->GetFieldValue('boq_entry', 'id="'.$myrow['boq_id'].'"','salesorder_id');
		 echo $s->GetFieldValue('manufacturing_advice', 'id="'.$saleid.'"','advice_no');
		?>
		</td>
<td width="19%"><?php  echo $s->GetFieldValue('manufacturing_advice', 'id="'.$saleid.'"','project_name');?></td>
      </tr>
      <?php $i++;} }?>
</form>
<div style="text-align:center"><input type="button" name="back" value="Back" onclick="window.history.back()" class="search" /></div>
