<?php
session_start();
if($_SESSION["username"]=="")
{
 	echo "You are not Logged in Please <a href='index.html'>Sign in </a> First ";
}
else
{


?>
<!doctype html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9" lang=""> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en">
<!--<![endif]-->

<head>
   <?php include("includes/header.php") ?>
</head>

<body>


    <!-- Left Panel -->

   <!-- /#left-panel -->

    <!-- Left Panel -->

    <!-- Right Panel -->

    <div id="right-panel" class="right-panel">

        <!-- Header-->
        
        <!-- Header-->

        

        <div class="content mt-3">
            <div class="animated fadeIn">
                <div class="row">

                    <div class="col-md-14">
                        <div class="card">
						<div class="page-title">
                        <h2><center><? echo "" . $_SESSION["userid"]; ?></center></h2>
                    </div>
                            <div class="card-header">
							
                                <strong class="card-title"><center>Students Applications Report</center> </strong>
                            </div>
                            <div class="card-body">
							<?php

include 'dbc.php';
$std_rollno=$_POST["std_rollno"];
$userid=$_SESSION["userid"];
$sqlin = "SELECT * FROM application where std_rollno = '$std_rollno' and user_id='$userid' order by id desc";
$resultin=$conn->query($sqlin);
?>
                                <table id="bootstrap-data-table-export" class="table table-striped table-bordered">
                                    <thead>
									<?php
                                       echo "<tr>";
echo "<th > App.No </th>";
echo "<th > Date</th>";
echo "<th > Rollno</th>";
echo "<th > Name</th>";
echo "<th > Father Name</th>";
echo "<th > Qabeela </th>";
echo "<th > Job </th>";
echo "<th > Income </th>";
echo "<th > Nic No</th>";
echo "<th > Mobile</th>";
echo "<th > Class</th>";
echo "<th > Fee</th>";



echo "</tr>";
?>
                                    </thead>
									
                                    <tbody>
									<?php
                                       while($rowin = $resultin->fetch_assoc())
 
  {
  $id = $rowin['id'];	
   echo "<tr>";
  echo "<td>" .$rowin['id'] . "</td>";
  
   echo "<td>" .$rowin['date'] .  "</td>";
    echo "<td>" .$rowin['std_rollno'] .  "</td>";
  echo "<td>" .$rowin['std_name'] .  "</td>";
  echo "<td>" .$rowin['fname'] .  "</td>";
 echo "<td>" .$rowin['qabeela'] . "</td>";
 echo "<td>" .$rowin['job'] .  "</td>";
 echo "<td>" .$rowin['income'] .  "</td>";
 echo "<td>" .$rowin['fnic'] .  "</td>";
 
 echo "<td>" .$rowin['cell_1'] .  "</td>";
 echo "<td>" .$rowin['class_name'] .  "</td>";
 echo "<td>" .$rowin['mfee'] .  "</td>";
 
		   echo"<th> <a href ='Application_Print.php?id=$id'>"?><button type="button" class="btn btn-primary">  Print </button><?php "</a>";
		    echo"<th> <a href ='Del_Application.php?id=$id'>"?><button type="button" class="btn btn-primary">  Del </button><?php "</a>";
	
  echo "</tr>";


  }
  ?>
                                       
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>


                </div>
            </div><!-- .animated -->
        </div> <!-- .content -->
    </div><!-- /#right-panel -->

    <!-- Right Panel -->

   <?php include("includes/footermenu.php") ?>

</body>

</html>
<?php
}
?>