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

$i=1;
			mysqli_query($GLOBALS["___mysqli_ston"], "SET NAMES utf8");			
			$Comp_id="SELECT s.*,dp.dept_name as deptname  FROM success_stories s join main_dept_category dp on s.dept_name = dp.dept_id order by s.Sr_No";
			
$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">description</th>                     
	    	<th scope="col" align="center">Department Name</th>                     
	    	<th scope="col" align="center">url1</th>                     
	    	<th scope="col" align="center">photo_path</th>
	    	<th scope="col" align="center">file_path</th>
	    		<th scope="col" align="center">Status</th>
					<th scope="col" align="center">Date</th>
			   <th scope="col" align="center">Update</th> 
			  <th scope="col" align="center">Disable</th> 
     ';

echo '</tr>';

	while($rw2 = mysqli_fetch_assoc($res))
			{
$srno=$rw2['Sr_No'];
$rank=$rw2['description'];
$rank1=$rw2['deptname'];
$head=$rw2['url1'];
$head1=$rw2['photo_path'];
$info=$rw2['file_path'];
$info1=$rw2['Status'];
$dp1=$rw2['Sys_Date'];

		
				
echo ' <tr>
    <td onclick="update_company('.$srno.')" style="cursor:pointer" title="Click here for edit">'.$i.' </td>
    <td onclick="update_company('.$srno.')" style="cursor:pointer" title="Click here for edit">'.$rank.' </td>
    <td onclick="update_company('.$srno.')" style="cursor:pointer" title="Click here for edit">'.$rank1.' </td>
    <td onclick="update_company('.$srno.')" style="cursor:pointer" title="Click here for edit">'.$head.' </td>
    <td onclick="update_company('.$srno.')" style="cursor:pointer" title="Click here for edit">'.$head1.' </td>
    <td onclick="update_company('.$srno.')" style="cursor:pointer" title="Click here for edit">'.$info.' </td>
    <td onclick="update_company('.$srno.')" style="cursor:pointer" title="Click here for edit">'.$info1.' </td>
    <td onclick="update_company('.$srno.')" style="cursor:pointer" title="Click here for edit">'.$dp1.'</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 "<td><button type='button' style='margin-left:0px;width:6em;' onclick='view5(".$srno.")'/>Disable</button></td>";
echo '</tr>';
  //		break;
								}

Echo "

</table></font>



";		
		
	

?>