PK

ADDRLIN : /home/anibklip/aaravpest.in/gujarat25/
FLL :
Current File : /home/anibklip/aaravpest.in/gujarat25/view_masters.php

<?php 
	include "templatic/head.php"; 
	include "templatic/header.php";
?>

<div class="dataGrid">

	<div class="dataGridControl">
		<div class="dataGridControlButtons">
			<div class="dataGridControlButtons">
				<select id="typ" name="typ" required onchange="window.location.href='view_masters.php?typ='+this.value">
					<option value="">Select Type</option>
					<option <?php echo ($_GET[typ]=="chemical"?"selected":"")?> value="chemical">Chemical (Fumigant)</option>
					<option <?php echo ($_GET[typ]=="duration"?"selected":"")?> value="duration">Duration of Exposure</option>
					<option <?php echo ($_GET[typ]=="dosage"?"selected":"")?> value="dosage">Dosage</option>
				</select>&nbsp;&nbsp;

				<img src="./img/add.png" alt="New" /> <a href="add_masters.php">New record</a> 
				<!-- <img src="./img/page_excel.png" alt="CSV export" /> <a href="#">CSV export</a> 
				<img src="./img/printer.png" alt="Print" /> <a href="#">Print</a> 
				<img src="./img/delete.png" alt="Remove" /> <a href="#">Remove selected</a> -->
			</div>

			<!--<img src="./img/add.png" alt="New" /> <a href="#">New record</a> <img src="./img/page_excel.png" alt="CSV export" /> <a href="#">CSV export</a> <img src="./img/printer.png" alt="Print" /> <a href="#">Print</a> <img src="./img/delete.png" alt="Remove" /> <a href="#">Remove selected</a>-->
		</div>

		<div class="dataGridPages">
			Page: <img src="./img/resultset_first.png" alt="First" /> <img src="./img/resultset_previous.png" alt="Previous" /> <select name="pageTop"><option value="1">1</option><option value="2">2</option><option value="3">3</option></select> <img src="./img/resultset_next.png" alt="Next" /> <img src="./img/resultset_last.png" alt="Last" />&nbsp; Items per page: <select name="perPageTop"><option value="25">25</option><option value="50">50</option><option value="100">100</option></select>
		</div>

		<div class="clear"></div>
	</div>

<table>
	<thead>
		<tr>
			<th>Name</th>
			<th>Type</th>
			<th>&nbsp;</th>			
		</tr>
	</thead>
		
	<tbody>

<?php
$sql="SELECT * FROM master where typ='$_GET[typ]' order by val ";
$result=mysql_query($sql) or die(mysql_error());
if (mysql_num_rows($result) == 0){
	echo "<tr><td colspan='5' align=center><font color=red><strong><br>No Records Found.</strong></font><br><br></td></tr>";
}

while($row=mysql_fetch_array($result)){
	if($row['typ']=="chemical"){
		$typ="Chemical";
	}elseif($row['typ']=="dosage"){
		$typ="Dosage";
	}elseif($row['typ']=="durationexp"){
		$typ="Duration of Exposure";
	}

	echo "
		<tr>
		  <td>{$row['val']}</td>       
		  <td>{$typ}</td>     
			  <td><a href='add_masters.php?master_id={$row[master_id]}'><img src='./img/pencil.png' alt='Edit' /></a></td>
		  <td></td>
		</tr>";

}
?>

	</tbody>

</table>

	<div class="dataGridControl">
		<div class="dataGridPages">
			Page: <img src="./img/resultset_first.png" alt="First" /> <img src="./img/resultset_previous.png" alt="Previous" /> <select name="pageBottom"><option value="1">1</option><option value="2">2</option><option value="3">3</option></select> <img src="./img/resultset_next.png" alt="Next" /> <img src="./img/resultset_last.png" alt="Last" />&nbsp; Items per page: <select name="perPageBottom"><option value="25">25</option><option value="50">50</option><option value="100">100</option></select>
		</div>

		<div class="clear"></div>
	</div>

</div>

<?php include "templatic/footer.php"; ?>


PK 99