<?php
include ('session.php');
include('connection.php');

$i=1;
			mysqli_query($GLOBALS["___mysqli_ston"], "SET NAMES utf8");			
			$Comp_id="SELECT *  FROM `officers`";
			
$res=mysqli_query($GLOBALS["___mysqli_ston"], $Comp_id) or die('Query Failed: 4' . mysqli_error($GLOBALS["___mysqli_ston"]));
		
echo 
"<font size='2'><table border='1' bgcolor='white' style='border-style: solid; border-width: 1px;width:100%;height:50%;'>";

echo '<tr>
					<th scope="col" align="center">SrNo</th>                     
	    	<th scope="col" align="center">Name</th>                     
	    	<th scope="col" align="center">Name in marathi</th> 
	    	<th scope="col" align="center">Designation</th>                     
	    	<th scope="col" align="center">Designation in marathi</th>                    
	    	<th scope="col" align="center">Type</th>                     
 			   <th scope="col" align="center">Update</th> 
			      ';

echo '</tr>';

	while($rw2 = mysqli_fetch_assoc($res))
			{
$srno=$rw2['id'];
$name=$rw2['name'];
$name_marathi=$rw2['name_marathi'];
$des=$rw2['des'];
$des_marathi=$rw2['des_marathi'];
$type = $rw2['type'];
if($type == 1)
{
			$type1 = "Z.P. Officials";
}
else 
{
			$type1 = "Officers";
}
				
echo ' <tr>
    <td onclick="update_company('.$i.')" style="cursor:pointer" title="Click here for edit">'.$srno.' </td>
    <td onclick="update_company('.$i.')" style="cursor:pointer" title="Click here for edit">'.$name.' </td>
    <td onclick="update_company('.$i.')" style="cursor:pointer" title="Click here for edit">'.$name_marathi.' </td>  
    <td onclick="update_company('.$i.')" style="cursor:pointer" title="Click here for edit">'.$des.' </td>
    <td onclick="update_company('.$i.')" style="cursor:pointer" title="Click here for edit">'.$des_marathi.' </td>
    <td onclick="update_company('.$i.')" style="cursor:pointer" title="Click here for edit">'.$type1.' </td>  
    ';
  $i++;
echo "<td><button type='button' style='margin-left:0px;width:6em;' value='update' class='submit' onclick='update_company(".$srno .")'/>Update</button></td>";

echo '</tr>';
  //		break;
								}

Echo "

</table></font>



";		
		
	

?>