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

$userid=$_SESSION["userid"];
include 'dbc.php';

$username=$_SESSION["username"];
$current_file_name = basename($_SERVER['PHP_SELF']);
$sql = "SELECT * FROM adduser where feedisc2 = '$current_file_name' and uname = '$username'";
$result=$conn->query($sql);
$row = $result->fetch_assoc();
$status=$row['feedisc3'] ;

if ($status =="")
{
echo "You are not Authorized This Page <a href='maindashboard.php'>Back </a> ";
}
else
{
date_default_timezone_set("Asia/Karachi");
$today=date("Y-m-d");
$month = date("m",strtotime($today));
		$year = date("Y",strtotime($today));
		 $month_name = date("F", mktime(0, 0, 0, $month, 10));
		 $my=$month_name . " " . $year;
$userid=$_SESSION["userid"];
include 'dbc.php';
$sql3="Select * from addclass where user_id='$userid'";
$result1 = $conn->query($sql3);
?>
<!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 -->

    <?php include("includes/menu.php") ?><!-- /#left-panel -->

    <!-- Left Panel -->

    <!-- Right Panel -->

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

        <!-- Header-->
        <header id="header" class="header">

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

        </header><!-- /header -->
        <!-- Header-->

        <div class="breadcrumbs">
            <div class="col-sm-6">
                <div class="page-header float-left">
                    <div class="page-title">
                        <h1><? echo "" . $_SESSION["userid"]; ?></h1>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="page-header float-right">
                    <div class="page-title">
                        <ol class="breadcrumb text-right">
                            <li class="active"><? echo "" . $_SESSION["username"]; ?></li>
                        </ol>
                    </div>
                </div>
            </div>
        </div>

        <div class="content mt-3">
            <div class="animated fadeIn">
                <div class="row">
<div class="col-lg-4">
                        <div class="card">
                            <div class="card-header"><strong>Open all Students </strong><small> Details Report</small></div>
                            <div class="card-body card-block">
							<form action="All_Student_Info_Reprot.php" method="post" enctype="multipart/form-data" class="form-group">
                                                    </div>
													<div class="card-footer">
                                                        <button type="submit" class="btn btn-primary btn-sm">
                                                            <i class="fa fa-dot-circle-o"></i>Show Report
                                                        </button>
                                                       
                                                    </div>
													
													</form>
                                                </div>
												</div>
	<div class="col-lg-4">											
												<div class="card">
                            <div class="card-header"><strong>Open all Active Students </strong><small> Details Report</small></div>
                            <div class="card-body card-block">
							<form action="All_Student_Active_Info_Reprot.php" method="post" enctype="multipart/form-data" class="form-group">
                                                    </div>
													<div class="card-footer">
                                                        <button type="submit" class="btn btn-primary btn-sm">
                                                            <i class="fa fa-dot-circle-o"></i>Show Report
                                                        </button>
                                                       
                                                    </div>
													
													</form>
                                                </div>
												</div>
	<div class="col-lg-4">
												<div class="card">
                            <div class="card-header"><strong>Open all InActive Students </strong><small> Details Report</small></div>
                            <div class="card-body card-block">
							<form action="All_Student_InActive_Info_Reprot.php" method="post" enctype="multipart/form-data" class="form-group">
                                                    </div>
													<div class="card-footer">
                                                        <button type="submit" class="btn btn-primary btn-sm">
                                                            <i class="fa fa-dot-circle-o"></i>Show Report
                                                        </button>
                                                       
                                                    </div>
													
													</form>
                                                </div>
												
                                            </div>
											
											<div class="col-lg-4">
												<div class="card">
                            <div class="card-header"><strong>Open all Concession Fee Students </strong><small> Details Report</small></div>
                            <div class="card-body card-block">
							<form action="All_Student_Conc_Info_Reprot.php" method="post" enctype="multipart/form-data" class="form-group">
                                                    </div>
													<div class="card-footer">
                                                        <button type="submit" class="btn btn-primary btn-sm">
                                                            <i class="fa fa-dot-circle-o"></i>Show Report
                                                        </button>
                                                       
                                                    </div>
													
													</form>
                                                </div>
												
                                            </div>
					
					<div class="col-lg-4">
												<div class="card">
                            <div class="card-header"><strong>Open all Withdraw Students </strong><small> Details Report</small></div>
                            <div class="card-body card-block">
							<form action="All_Student_Withdraw_Info_Reprot.php" method="post" enctype="multipart/form-data" class="form-group">
                                                    </div>
													<div class="card-footer">
                                                        <button type="submit" class="btn btn-primary btn-sm">
                                                            <i class="fa fa-dot-circle-o"></i>Show Report
                                                        </button>
                                                       
                                                    </div>
													
													</form>
                                                </div>
												
                                            </div>
					
					<div class="col-lg-4">
												<div class="card">
                            <div class="card-header"><strong>Open all Students With Picture </strong><small>Details Report</small></div>
                            <div class="card-body card-block">
							<form action="All_Student_Picture_Info_Reprot.php" method="post" enctype="multipart/form-data" class="form-group">
                                                    </div>
													<div class="card-footer">
                                                        <button type="submit" class="btn btn-primary btn-sm">
                                                            <i class="fa fa-dot-circle-o"></i>Show Report
                                                        </button>
                                                       
                                                    </div>
													
													</form>
                                                </div>
												
                                            </div>
					<div class="col-lg-4">
                        <div class="card">
                            <div class="card-header"><strong>Open all Students </strong><small> Summary Report</small></div>
                            <div class="card-body card-block">
							<form action="All_Student_Summary_Reprot.php" method="post" enctype="multipart/form-data" class="form-group">
                                                    </div>
													<div class="card-footer">
                                                        <button type="submit" class="btn btn-primary btn-sm">
                                                            <i class="fa fa-dot-circle-o"></i>Show Report
                                                        </button>
                                                       
                                                    </div>
													
													</form>
                                                </div>
												</div>
	<div class="col-lg-4">											
												<div class="card">
                            <div class="card-header"><strong>Open all Active Students </strong><small> Summary Report</small></div>
                            <div class="card-body card-block">
							<form action="All_Student_Active_Summary_Reprot.php" method="post" enctype="multipart/form-data" class="form-group">
                                                    </div>
													<div class="card-footer">
                                                        <button type="submit" class="btn btn-primary btn-sm">
                                                            <i class="fa fa-dot-circle-o"></i>Show Report
                                                        </button>
                                                       
                                                    </div>
													
													</form>
                                                </div>
												</div>
	<div class="col-lg-4">
												<div class="card">
                            <div class="card-header"><strong>Open all InActive Students </strong><small> Summary Report</small></div>
                            <div class="card-body card-block">
							<form action="All_Student_InActive_Summary_Reprot.php" method="post" enctype="multipart/form-data" class="form-group">
                                                    </div>
													<div class="card-footer">
                                                        <button type="submit" class="btn btn-primary btn-sm">
                                                            <i class="fa fa-dot-circle-o"></i>Show Report
                                                        </button>
                                                       
                                                    </div>
													
													</form>
                                                </div>
												
                                            </div>
											
											<div class="col-lg-4">
												<div class="card">
                            <div class="card-header"><strong>Open Students By Cell No </strong><small> Report</small></div>
                            <div class="card-body card-block">
							<form action="Cellno_Student_Report.php" method="post" enctype="multipart/form-data" class="form-group">
							<div class="form-group"><label for="feedisc1" class=" form-control-label">Cell No</label><input type="text" id="cell_1" name="cell_1" placeholder="Cell No" class="form-control" ></div>
                                                    </div>
													<div class="card-footer">
                                                        <button type="submit" class="btn btn-primary btn-sm">
                                                            <i class="fa fa-dot-circle-o"></i>Show Report
                                                        </button>
                                                       
                                                    </div>
													
													</form>
                                                </div>
												
                                            </div>
											
											
											
											
											<div class="col-lg-4">
												<div class="card">
                            <div class="card-header"><strong>Open Students By Monthly Fee </strong><small> Report</small></div>
                            <div class="card-body card-block">
							<form action="Feewise_Student_Report.php" method="post" enctype="multipart/form-data" class="form-group">
							<div class="form-group"><label for="feedisc1" class=" form-control-label">Monthly Fee</label><input type="text" id="mfee" name="mfee" placeholder="Monthly Fee" class="form-control" ></div>
                                                    </div>
													<div class="card-footer">
                                                        <button type="submit" class="btn btn-primary btn-sm">
                                                            <i class="fa fa-dot-circle-o"></i>Show Report
                                                        </button>
                                                       
                                                    </div>
													
													</form>
                                                </div>
												
                                            </div>
											
											<div class="col-lg-4">
												<div class="card">
                            <div class="card-header"><strong>This Month New Admission </strong><small> Report</small></div>
                            <div class="card-body card-block">
							<form action="New_Admission_Student_Report.php" method="post" enctype="multipart/form-data" class="form-group">
							<div class="form-group"><label for="feedisc1" class=" form-control-label">Month Name</label><input type="text" id="month" name="month" placeholder="Month Name" class="form-control" value="<? echo $my ?>"></div>
                                                    </div>
													<div class="card-footer">
                                                        <button type="submit" class="btn btn-primary btn-sm">
                                                            <i class="fa fa-dot-circle-o"></i>Show Report
                                                        </button>
                                                       
                                                    </div>
													
													</form>
                                                </div>
												
                                            </div>
											
											
											
											<div class="col-lg-4">
												<div class="card">
                            <div class="card-header"><strong>This Month Withdraw Students </strong><small> Report</small></div>
                            <div class="card-body card-block">
							<form action="Withdraw_Month_Student_Report.php" method="post" enctype="multipart/form-data" class="form-group">
							<div class="form-group"><label for="feedisc1" class=" form-control-label">Month Name</label><input type="text" id="month" name="month" placeholder="Month Name" class="form-control" value="<? echo $my ?>"></div>
                                                    </div>
													<div class="card-footer">
                                                        <button type="submit" class="btn btn-primary btn-sm">
                                                            <i class="fa fa-dot-circle-o"></i>Show Report
                                                        </button>
                                                       
                                                    </div>
													
													</form>
                                                </div>
												
                                            </div>
					
					
					
					<div class="col-lg-4">
												<div class="card">
                            <div class="card-header"><strong>Open Students By Nic No </strong><small> Report</small></div>
                            <div class="card-body card-block">
							<form action="Nicno_Student_Report.php" method="post" enctype="multipart/form-data" class="form-group">
							<div class="form-group"><label for="feedisc1" class=" form-control-label">Nic No</label><input type="text" id="nicno" name="nicno" placeholder="Nic No" class="form-control" ></div>
                                                    </div>
													<div class="card-footer">
                                                        <button type="submit" class="btn btn-primary btn-sm">
                                                            <i class="fa fa-dot-circle-o"></i>Show Report
                                                        </button>
                                                       
                                                    </div>
													
													</form>
                                                </div>
												
                                            </div>
											
											
											<div class="col-lg-4">
												<div class="card">
                            <div class="card-header"><strong>Open Students By Class Section </strong><small> Report</small></div>
                            <div class="card-body card-block">
							<form action="Class_Section_Student_Report.php" method="post" enctype="multipart/form-data" class="form-group">
							<div class="row form-group">
                                                                    <div class="col col-md-3"><label for="select" class=" form-control-label">Class</label></div>
                                                                    <div class="col-12 col-md-8">
                                                                        <select name="class_name" id="class_name" class="form-control">
                                                                            <?php
  while($user_data3=$result1->fetch_assoc())
  {
  ?>
              <option value="<? echo $user_data3['cname']; ?>"><? echo $user_data3["cname"]; ?></option>
              <?php
  }
  ?>
                                                                        </select>
                                                                    </div>
                                                                </div>
							<div class="form-group"><label for="feedisc1" class=" form-control-label"></label><input type="text" id="cls_sec" name="cls_sec" placeholder="Section" class="form-control" ></div>
                                                    </div>
													<div class="card-footer">
                                                        <button type="submit" class="btn btn-primary btn-sm">
                                                            <i class="fa fa-dot-circle-o"></i>Show Report
                                                        </button>
                                                       
                                                    </div>
													
													</form>
                                                </div>
												
                                            </div>
					
					
					
                    <div class="col-md-14">
                        <div class="card">
                            <div class="card-header">
                                <strong class="card-title"> Class wise Student Search Info Reports</strong>
                            </div>
                            <div class="card-body">
							<?php

include 'dbc.php';


$userid=$_SESSION["userid"];
$sql = "SELECT * FROM addclass where user_id='$userid'";
$result=$conn->query($sql);
?>
                                <table id="bootstrap-data-table-export" class="table table-striped table-bordered">
                                    <thead>
									<?php
                                       echo "<tr>";
echo "<th > Class Name </th>";



echo "</tr>";
?>
                                    </thead>
									
                                    <tbody>
									<?php
                                       while($row = $result->fetch_assoc())
 
  {
  $cname = $row['cname'];	
   echo "<tr>";
echo "<td>" .$row['cname'] . "</td>";



		 ?>
		 
		  
		 <?php
		  echo"<th> <a href ='Classwise_Report.php?cname=$cname'>"?><button type="button" class="btn btn-primary">  Open Class Report</button><?php "</a>";  
		   echo"<th> <a href ='Classwise_Report_Active.php?cname=$cname'>"?><button type="button" class="btn btn-primary">  Open Active Report</button><?php "</a>";
		  echo"<th> <a href ='Classwise_Report_InActive.php?cname=$cname'>"?><button type="button" class="btn btn-primary">  Open InActive Report</button><?php "</a>";
		  echo"<th> <a href ='Classwise_Report_Withdraw.php?cname=$cname'>"?><button type="button" class="btn btn-primary">  Open Widraw Report</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
}
}
?>