<?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>Class Student Information Report</center> </strong>
                            </div>
                            <div class="card-body">
							<?php

include 'dbc.php';


$userid=$_SESSION["userid"];
$class_name=$_REQUEST["cname"];
$cls_sec=$_POST["cls_sec"];
$sql = "SELECT * FROM admission where  class_name='$class_name' and status='Active' and user_id='$userid' order by std_rollno";
$result=$conn->query($sql);
?>
                                <table id="bootstrap-data-table-export" class="table table-striped table-bordered">
                                    <thead>
									<?php
                                       echo "<tr>";
echo "<th > Adm# </th>";
echo "<th > Roll No </th>";
echo "<th > B-Form </th>";
echo "<th > Student Name </th>";
echo "<th > Father Name </th>";
echo "<th > Class Name </th>";
echo "<th > Sec </th>";



echo "</tr>";
?>
                                    </thead>
									
                                    <tbody>
									<?php
                                       while($row = $result->fetch_assoc())
 
  {
  $cell_1 = $row['cell_1'];	
  $std_name = $row['std_name'];
  $bal = $row['bal'];	
   echo "<tr>";
echo "<td>" .$row['adm_no'] . "</td>";
echo "<td>" .$row['std_rollno'] . "</td>";
 echo "<td>" .$row['portal_id'] .  "</td>";
  echo "<td>" .$row['std_name'] .  "</td>";
 echo "<td>" .$row['fname'] . "</td>";
 echo "<td>" .$row['class_name'] .  "</td>";
 echo "<td>" .$row['cls_sec'] .  "</td>";
  echo"<th> <a href ='https://web.whatsapp.com/send?phone=$cell_1?text=$std_name:' target=_blank>"?><button type="button" class="btn btn-primary">  Open Whatsapp </button><?php "</a>";
  echo"<th> <a href ='https://wa.me/$cell_1?text=$std_name:' target=_blank>"?><button type="button" class="btn btn-primary">  Open Whatsapp Withname </button><?php "</a>";
  
  echo "</tr>";

$trecord=$trecord + 1;
$tmfee=$tmfee + $row['mfee'];
$tconsfee=$tconsfee + $row['consfee'];
  }
  
  ?>
                                       
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>


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

    <!-- Right Panel -->

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

</body>

</html>
<?php
}
?>