<?php 
$active = 'Buy Fuel';
$pageName = 'Buy Fuel';

require_once('config/config.php');
require_once(CLASS_DIR.'dbClass.php');
require_once(INCLUDES_DIR.'header.php');
require_once(INCLUDES_DIR.'script.php');

include('hitCounter.php');

$obj4 = new DBClass();
$obj1 = new DBClass();
?>

<!--workarea start------------------------->
<div class="workarea">
	<div class="workareatop">
		<img src="images/workareatopcorner_03.PNG" alt="" />
	</div>
	<!--workareamid start--------------------->
	<div class="workareamid">
		<div id="floatleft" style="width:100%; float:left;">
			<div class="welcomediv">		
			
					<h2>Buy Fuel</h2>

					<div class="err_msg"><?php ShowError($error); ShowInfo($info);?></div>

<table  class="main" width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
				<td width="30%" valign="top" class="bdr1">
						<table width="100%"  border="0" cellspacing="0" cellpadding="0">
								<tr  class="bg_td1">
										<td class="list_link" width="49%" align="center" valign="top" style="margin:5px;padding:5px;">
												<h2 style="background:none; text-align:center">Fuel as per Location</h2>
													Search Indian coal on the basis of mines names or availability of imported coal at the desired port.<br /><br />
													<input type="image" name="button" value="ENTER" src="images/enter.gif" height="20" width="80"  onclick="window.location.href='imported-coal-mine.php'" />
										</td>
								</tr>
						</table>
				</td>
				<td width="5" height="100" valign="top">&nbsp;</td>
				<td width="30%" height="100" valign="top" class="bdr1">
						<table width="100%"  border="0" cellspacing="0" cellpadding="0">
								<tr  class="bg_td1"  >
										<td class="list_link" width="49%" align="center" valign="top" style="margin:5px;padding:5px;">
												<h2 style="background:none; text-align:center">Fuel as per Specifications</h2>
													Search coal on the basis of specification as Guaranteed by the seller<br /><br /><br />
													<input type="image" name="button" value="ENTER" src="images/enter.gif" height="20" width="80"  onclick="window.location.href='imported-coal-spec.php'" />
										</td>
								</tr>
						</table>
				</td>
				<td width="5" height="100" valign="top">&nbsp;</td>
				<td width="30%" height="100" valign="top" class="bdr1">
						<table width="100%"  border="0" cellspacing="0" cellpadding="0">
								<tr  class="bg_td1"  >
										<td class="list_link" width="49%" align="center" valign="top" style="margin:5px;padding:5px;">
													<h2 style="background:none; text-align:center">Fuel as per our Experts</h2>
														If you need the help of our expert to procure.Just feel free to use it.<br /><br /><br />
														<input type="image" name="button" value="ENTER" src="images/enter.gif" height="20" width="80" onclick="window.location.href='expert.php'" />
										</td>
								</tr>
						</table>
				</td>
          </tr>
		<p>&nbsp;</p>
 </table>
 <p>&nbsp;</p>
<!--  Hot Offers-->
<h2><img src="images/new_animated.gif" alt="hot offer" width="60" height="30" style="border:none;"/>Hot Offers</h2>
<div style="width: 910px;overflow: hidden;">
	<marquee scrollamount="3" onMouseOver="this.scrollAmount=0" onMouseOut="this.scrollAmount=2"  behavior="alternate">
		<table  class="main" width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td class="bdr1">
					<table class="sub" width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
									<?php
									$sql1 = "SELECT * FROM ".TBL_LISTING." WHERE status = '0' AND popular = '1' order by id DESC";
									$rs1 = $obj1->executeQry($sql1,$link);
									while($row1 = $obj1->fetchrow()) { 
									
									$sql4 = "SELECT * FROM ".TBL_DIRECTORY." WHERE memberID = ".$row1['memberID'];
									$rs4 = $obj4->executeQry($sql4,$link);
									$row4 = $obj4->fetchrow();
									?>
									<td width="250" valign="top" style="border-right-style: solid;border-right-color: #ccc;border-right-width: 1px;">
											<table class="coal" width="230" border="0" cellspacing="0" cellpadding="0">
												   <tr>
													  <td colspan="2" class="form_head" style="padding-left:5px"><?php echo $row4['organisation_name'];?></td>
												   </tr>
												   <tr>
													<td width="40%" class="contain"><b>Commodity</b></td>
													<td width="60%" class="contain"><?php echo $row1['commodity'] ?></td>
												   </tr>
												  <tr>
													<td class="contain"><b>Origin</b></td>
													<td class="contain"><?php echo $row1['origin'] ?></td>
												 </tr>
												 <tr>
													<td class="contain"><b>Location</b></td>
													<td class="contain"><?php if($row1['commodity'] == 'Coal') { echo ($row1['origin']=='Indian')?$row1['area'].' ('.$row1['mines_name'].')':$row1['port']; } else { echo ($row1['origin']=='Indian')?$row1['noncoal_state']:$row1['noncoal_state'].' ('.$row1['noncoal_port'].')'; }?></td>
												 </tr>
												  <tr>
													<td class="contain"><b>Sub Location</b></td>
													<td class="contain"><div style="text-align: left;"><span style="font-size: x-small;"><span style="font-family: Tahoma;"><?php if($row1['commodity'] == 'Coal') {  if($row1['origin']=='Indian') { echo $row1['mines_name']; } } else { echo ($row1['origin']=='Indian')?$row1['noncoal_district']:$row1['noncoal_district']; }?></td>
												 </tr>
												 <tr>
													<td class="contain"><b>GCV(A.D.Basis)</b></td>
													<td class="contain"><?php echo $row1['actual_gcv'] ?></td>
												 </tr>
												 <tr>
													<td colspan="2" align="right" style="padding-right:5px;"><a href="viewlisting.php?id=<?php echo $row1['id'] ?>">More Details</a></td>
												 </tr>
											</table>
									</td>
									<?php 	}	?>
							</tr>
					</table>
				</td>
			</tr>
		</table>
	</marquee>
</div>
<br />
<!-- New Arrivals-->

<h2><img src="images/New.gif" alt="hot offer" width="60" height="30" style="border:none;"/>New Arrivals</h2>
<table  class="main" width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
				<td class="bdr1">
						<table class="sub" width="100%" border="0" cellspacing="0" cellpadding="0">
								<tr>
										<?php
										$sql1 = "SELECT * FROM ".TBL_LISTING." WHERE status = '0' order by id DESC limit 0,4";
										$rs1 = $obj1->executeQry($sql1,$link);
										while($row1 = $obj1->fetchrow()) { 
										
										$sql4 = "SELECT * FROM ".TBL_DIRECTORY." WHERE memberID = ".$row1['memberID'];
										$rs4 = $obj4->executeQry($sql4,$link);
										$row4 = $obj4->fetchrow();
										?>
										<td width="250" valign="top"  style="border-right-style: solid;border-right-color: #ccc;border-right-width: 1px;">
												<table class="coal" width="100%" border="0" cellspacing="0" cellpadding="0">
													   <tr>
														  <td colspan="2" class="form_head" style="padding-left:5px"><?php echo $row4['organisation_name'];?></td>
													   </tr>
													   <tr style="padding:2px;">
														<td width="40%" class="contain"><b>Commodity</b></td>
														<td width="60%" class="contain"><?php echo $row1['commodity'] ?></td>
													   </tr>
													  <tr style="padding:2px;">
														<td width="40%" class="contain"><b>Origin</b></td>
														<td width="60%" class="contain"><?php echo $row1['origin'] ?></td>
													 </tr>
													 <tr style="padding:2px;">
														<td width="40%" class="contain"><b>Location</b></td>
														<td width="60%" class="contain"><?php if($row1['commodity'] == 'Coal') { echo ($row1['origin']=='Indian')?$row1['area'].' ('.$row1['mines_name'].')':$row1['port']; } else { echo ($row1['origin']=='Indian')?$row1['noncoal_state']:$row1['noncoal_state'].' ('.$row1['noncoal_port'].')'; }?></td>
													 </tr>
													  <tr style="padding:2px;">
														<td width="40%" class="contain"><b>Sub Location</b></td>
														<td width="60%" class="contain"><div style="text-align: left;"><span style="font-size: x-small;"><span style="font-family: Tahoma;"><?php if($row1['commodity'] == 'Coal') {  if($row1['origin']=='Indian') { echo $row1['mines_name']; } } else { echo ($row1['origin']=='Indian')?$row1['noncoal_district']:$row1['noncoal_district']; }?></td>
													 </tr>
													 <tr style="padding:2px;">
														<td width="40%" class="contain"><b>GCV(A.D.Basis)</b></td>
														<td width="60%" class="contain"><?php echo $row1['actual_gcv'] ?></td>
													 </tr>
													 <tr>
														<td colspan="2" align="right" style="padding-right:5px;"><a href="viewlisting.php?id=<?php echo $row1['id'] ?>">More Details</a></td>
													 </tr>
												</table>
										</td>
										<?php 	}	?>
								</tr>
						</table>
				</td>
		</tr>
</table>
<br />

						</div>
				</div>
				
                <!--floatright close-------------------->
                <div style="clear:both;"></div>
            </div>
            <!--workareamid close--------------------->
            <div class="workareabottom">
                <img src="images/workareabottomcorner_03.PNG" alt="" />
            </div>
        </div>
    <!--workarea close------------------------->
<?php require_once(INCLUDES_DIR.'footer.php');?>