<?php 
require_once('config/config.php');
require_once(CLASS_DIR.'dbClass.php');

$obj1 = new DBClass();

mysql_query("insert into enq (name,phone,email,listingID,memberID) values ('".$_GET['name']."','".$_GET['phone']."','".$_GET['email']."','".$_GET['id']."','".$_GET['id']."')");

$sql2 = "SELECT * FROM coal_listing WHERE status = '0' and id = '".$_REQUEST['id']."'";

$rs2 = $obj1->executeQry($sql2,$link);

while($row = $obj1->fetchrow()){
?>
					
<table  class="main" width="90%" border="0" cellspacing="0" cellpadding="0">
   <tr>
     <td class="bdr1">
       <table width="100%" border="0" cellspacing="0" cellpadding="0">
       	 <tr>
           <td colspan="2" bgcolor="#990066" class="form_head" style="padding-left:5px"><div style="text-align: left;"><span style="font-size: small;"><span style="font-family: Tahoma;"><span style="color: rgb(0, 0, 0);"><b>Product Details:</b></span></span></span></div></td>
         </tr>
            <tr style="height:2px;">
  			 <td colspan="2">&nbsp;</td>
		   </tr>                   
			<tr>
	          <td width="20%" class="contain"><b>Commodity</b></td> 
	          <td width="65%" class="contain"><?php echo $row['commodity'] ?></td>
	       </tr>
	       <tr>
	          <td class="contain"><b>Origin</b></td> 
	          <td class="contain"><?php echo $row['origin'] ?></td>
	       </tr>
	       <tr>
	          <td class="contain"><b><?php if($row['origin']=='Indian') { ?>Area<?php } else { ?>Port<?php } ?></b></td> 
	          <td class="contain"><?php echo ($row['origin']=='Indian')?$row['area'].' ('.$row['mines_name'].')':$row['port']; ?></td>
	       </tr>
	       <tr>
	          <td class="contain"><b>Size</b></td> 
	          <td class="contain"><?php echo $row['size'] ?></td>
	       </tr>
	       <tr>
	          <td class="contain"><b>Gross Calorific Value</b></td> 
	          <td class="contain"><?php echo $row['actual_gcv'] ?></td>
	       </tr>
	       <tr>
	          <td class="contain"><b>Total Moisture</b></td> 
	          <td class="contain"><?php echo $row['actual_tm'] ?></td>
	       </tr>
	       <tr>
	          <td class="contain"><b>ASH</b></td> 
	          <td class="contain"><?php echo $row['actual_ash'] ?></td>
	       </tr>
	       <tr>
	          <td class="contain"><b>Sulphur</b></td> 
	          <td class="contain"><?php echo $row['actual_sulpher'] ?></td>
	       </tr>
	       <tr>
	          <td class="contain"><b>Base Rate(INR/Mt)</b></td> 
	          <td class="contain"><?php echo $row['base_rate'] ?></td>
	       </tr>
	       <tr style="height:2px;">
  			 <td colspan="2">&nbsp;</td>
		   </tr>       
	     <tr>
           <td colspan="2"><div style="text-align: left;"><span style="font-size: small;"><span style="font-family: Tahoma;"><span style="color: rgb(0, 0, 0);"><b>Contact Person : <?php echo $row['person_name'];?></b></span></span></span></div></td>
         </tr>
         <tr style="height:2px;">
  			 <td colspan="2">&nbsp;</td>
		   </tr>
		 <tr>
  			<td class="contain"><b>Address</b></td>
  			<td class="contain"><?php echo $row['address'];?>, <?php echo $row['city'];?>, <?php echo $row['state'];?> - <?php echo $row['pincode'];?></td>
		</tr>
		<tr>
			<td class="contain"><b>Phone</b></td>
			<td class="contain"><?php echo $row['phone'];?></td>
		</tr>
		<tr>
			<td class="contain"><b>Fax</b></td>
			<td class="contain"><?php echo $row['fax'];?></td>
		</tr>
		<tr>
			<td class="contain"><b>Mobile</b></td>
			<td class="contain"><?php echo $row['mobile1'];?>, <?php echo $row['mobile2'];?></td>
		</tr>
		<tr >
			<td class="contain"><b>Email</b></td>
			<td class="contain"><?php echo $row['email1'];?> , <?php echo $row['email2'];?></td>
		</tr>
		<tr >
			<td class="contain"><b>Website</b></td>
			<td class="contain"><?php echo $row['website'];?></td>
		</tr>
	</table>
  </td>
</tr>
<p>&nbsp;</p>
				</table>					
					
<?php } ?>

