<form class="quick_search">
	<input type="text" value="Quick Search" onFocus="if(!this._haschanged){this.value=''};this._haschanged=true;">
</form>
		<!--h3>Data Lokasi (<?php echo $jml;?> Pos)</h3-->
              <table border="0" cellpadding="0" cellspacing="0" width="96%">
<?php
/*$sql="SELECT * FROM m_lokasi WHERE 1=1 AND id_tipe='PDA' AND id_bbws=".$_SESSION['id_bbws']." AND status_lokasi=1
		UNION
		SELECT * FROM m_lokasi WHERE 1=1 AND nama_lokasi IN ('Sawangan','PasarBaru','Manggarai') AND id_bbws=".$_SESSION['id_bbws']." AND status_lokasi=1 ORDER BY ReceivedDate Desc, ReceivedTime Desc ";
*/
$sql="SELECT nama_lokasi,nama_alat,id_merk,id_tipe,CURDATE(),ReceivedDate,DATEDIFF(current_date(),ReceivedDate) AS icon FROM m_lokasi WHERE 1=1 AND id_bbws=".$_SESSION['id_bbws']." AND status_lokasi=1 ORDER BY ReceivedDate Desc, ReceivedTime Desc ";
        $query = mysql_query($sql);
			  $i=0;
              while ($row_detdata=mysql_fetch_array($query)){
              $i++;
			  ?>
              <tr>
              	<td><?php if($row_detdata['icon']>0 || $row_detdata['icon']=="") { $sts='<img src="images/icon_offline.png">';} else { $sts= '<img src="images/icon_online.png">';	} ?><a href="home.php?page=datapos&pos=<?php echo $row_detdata['nama_lokasi']; ?>&tpos=<?php echo $row_detdata['id_tipe']; ?>">
			<strong><?php echo $sts." ".strtoupper($row_detdata['nama_alat']);?></strong></a></td>
            	<td align="right"><?php if($row_detdata['icon']>0 || $row_detdata['icon']=="") { echo "<em><font color='red' style='text-decoration:line-thdrough;'>".$row_detdata['icon'].".hari</font></em>"; } ?></td>
              </tr>
			<?php } ?>		
              </table>
		<!--h3>Admin</h3>
		<ul class="toggle">
			<li class="icn_settings"><a href="#">Options</a></li>
			<li class="icn_security"><a href="#">Security</a></li>
			<li class="icn_jump_back"><a href="#">Logout</a></li>
		</ul-->
		
		<!--footer>
			<hr />
			<p><strong>Copyright &copy; 2016 Bws Kaltim III</strong></p>
			<p>Theme by <a href="http://www.sdatelemetry.com">Konsultan</a></p>
		</footer-->
