MMCT TEAM
Server IP : 2a02:4780:3:1378:0:3736:a38e:10  /  Your IP : 18.221.201.67
Web Server : LiteSpeed
System : Linux sg-nme-web1278.main-hosting.eu 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : u926327694 ( 926327694)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /home/u926327694/domains/smsoft.in/public_html/demo/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u926327694/domains/smsoft.in/public_html/demo/pages
<?php
session_start();


?>


<?php 

     
    // Everything below this point in the file is secured by the login system 
     
    // We can display the user's username to them by reading it from the session array.  Remember that because 
    // a username is user submitted content we must use htmlentities on it before displaying it to the user. 
?>






<?php
include "config/config.php";






?>


<?php


$res1=mysqli_query($con,"select Class from master where `Class` IS NOT NULL");
$res13=mysqli_query($con,"select Division from master where `Division` IS NOT NULL");


?>
<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    

    <!-- Bootstrap Core CSS -->
    <title>Student Attendance List</title>

    <!-- Bootstrap Core CSS -->
    <link href="../vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- MetisMenu CSS -->
    <link href="../vendor/metisMenu/metisMenu.min.css" rel="stylesheet">

    <!-- DataTables CSS -->
    <link href="../vendor/datatables-plugins/dataTables.bootstrap.css" rel="stylesheet">

    <!-- DataTables Responsive CSS -->
    <link href="../vendor/datatables-responsive/dataTables.responsive.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="../dist/css/sb-admin-2.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="../vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
<style>
.others {
    color:green
}
.others1 {
    color:red
}
</style>
</head>

<body>

    <div id="wrapper">

        <!-- Navigation -->
        <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
				
						                <a class="navbar-brand" href="dashboard.php">Student Attendence System</a>
            </div>
            <!-- /.navbar-header -->

            
            <!-- /.navbar-top-links -->

            <?php
			include "header.php";
			?>
            <!-- /.navbar-static-side -->
        </nav>

         <div id="page-wrapper">
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">Attendance Report</h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            Attendance Report
                        </div>
                        <div class="panel-body">
                            <div class="row">
							<form role="form" action="apreport.php" method="post">
                                   

								<div class="col-lg-6">
                                    
                                        <div class="form-group">
                                            <label>Date(From)</label>
											<?php
											
											date_default_timezone_set('Asia/Kolkata');

								$timestamp = time();
							 $date_time = date("Y-m-d", $timestamp);
							 
							 ?>
                                            <input type="date" name="date_from" class="form-control" value="<?php  echo $date_time; ?>" required />
                                        </div>
                                      
                                </div><div class="col-lg-6">
                                    
                                        <div class="form-group">
                                            <label>Date(To)</label>
                                            <input type="date" name="date_to" class="form-control" value="<?php  echo $date_time; ?>" required />
                                        </div>
                                      
                                </div>
								
								
								
								
								
								
							
								
								
								
								
								
								
								
								
								
								
								
								
								
								
								
								
								
								
								
								
								
								
								
								
								
								
								
								
								<center>
								<button type="submit" class="btn btn-default">Submit Button</button>
                                        <button type="reset" class="btn btn-default">Reset Button</button></center></form>
                                <!-- /.col-lg-6 (nested) -->
                           
                                <!-- /.col-lg-6 (nested) -->
                            </div>
                            <!-- /.row (nested) -->
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>


 <form class="form" style="max-width: none; width: 1005px;"  method="post">
			
			<?php  
			
			if($_SERVER['REQUEST_METHOD'] == 'POST')
			{
				
			
				 $subject=$_POST['subject'];
				  $date_from=$_POST['date_from'];
				$date_to=$_POST['date_to'];

				  
						

					
				?>
				 
				
					<div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            All Student information <b>(<?php 
							echo $subject;
								echo ",&nbsp;"; 
							echo "From:".$date_from;  
							echo ",&nbsp;";
							
							echo "To:".$date_to;  
						
							
							   ?>)</b>
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <table width="100%" class="table table-striped table-bordered table-hover" id="example">
                                <thead>
                                    <tr>
                                       <tr>
								  <th>Student Name</th>
								  <th>USN</th>
								  <?php
								
								  		 if(!$class_res=mysqli_query($con,"SELECT DISTINCT(`date`) FROM `$subject` where `date` >= '$date_from' AND `date` <= '$date_to' "))
								{
									echo("Error description: " . mysqli_error($con));
								}
										
									while ($class=mysqli_fetch_array($class_res))
									{
									?>	
								  <th><?php echo "$class[0]"; 
								  
								 
								;
								  ?>
								  </th>
								 	<?php
								 	}
if(!$class_res11=mysqli_query($con,"SELECT DISTINCT(`date`) FROM `$subject` where `date` >= '$date_from' AND `date` <= '$date_to' "))
								{
									echo("Error description: " . mysqli_error($con));
								}
								
		if(!$heads_res1=mysqli_query($con,"SELECT DISTINCT(`student_id`) FROM `$subject` where `date` >= '$date_from' AND `date` <= '$date_to'"))
								{
									echo("Error description: " . mysqli_error($con));
								}
									$count=0;
									while ($heads1=mysqli_fetch_array($heads_res1))
									{						
								
while($class1=mysqli_fetch_array($class_res11))
{

if(!$class_res111=mysqli_query($con,"SELECT count(`student_id`) FROM `$subject` where `date`='$class1[0]' and `student_id`='$heads1[0]'  "))
								{
									echo("Error description: " . mysqli_error($con));
								}
								
								$class1111=mysqli_fetch_array($class_res111);
								?>
								 <?php 
$count=$count+$class1111[0];

}
									}
?>								 <th><?php echo "$count";
?>


</th>
<th>% age</th>

								 	

							  </tr>  
										
										
										
                                    </tr>
                                </thead>
                                <?php
						  if(!$heads_res=mysqli_query($con,"SELECT DISTINCT(`student_id`) FROM `$subject` where `date` >= '$date_from' AND `date` <= '$date_to'"))
								{
									echo("Error description: " . mysqli_error($con));
								}
									
									while ($heads=mysqli_fetch_array($heads_res))
									{
										
										$heads_res3=mysqli_query($con,"SELECT * FROM `student` where `stud_id`='$heads[0]'  ");
								$heads3=mysqli_fetch_array($heads_res3);
									?>
								<tr  class="odd gradeX">
								
								<td class="center"><?php 
								echo "$heads3[Name]";  ?> </td>
								<td class="center"><?php 
								echo "$heads3[USN]";?> </td>
								<?php
								$class_res=mysqli_query($con,"SELECT DISTINCT(`date`) FROM `$subject` where `date` >= '$date_from' AND `date` <= '$date_to'");
									while ($class=mysqli_fetch_array($class_res))
									{
									 	
$count_res=mysqli_query($con,"SELECT  count(`status`) FROM `$subject` where `student_id`='$heads[0]'  and `status`='1' and `date`='$class[0]'");
									 $cnt=mysqli_fetch_array($count_res);	
									?>
									<td> <?php echo "$cnt[0]";  ?> </td>
									<?php
									}
								?><?php $count_res1=mysqli_query($con,"SELECT  count(`status`) FROM `$subject` where `student_id`='$heads[0]'  and `status`='1' and `date` >= '$date_from' AND `date` <= '$date_to' ");
									 $cnt1=mysqli_fetch_array($count_res1); ?>
								
								
								<td class="center"><?php echo "$cnt1[0]";?> </td>
								
								<td class="center"><?php $p=$cnt1[0]*100; 
$p1=$p/$count;
echo (round($p1))."%";		
						
								
								
								?> </td>
								
							</tr>
							<?php  
								} 
								?>

						  </tbody>
                            </table>
                            <!-- /.table-responsive -->
                            <center>
								     
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
				
				<?PHP
			}
			?>
			</form>
			 </div>
        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->


	
	
	
	
    <!-- jQuery -->
    <script src="../vendor/jquery/jquery.min.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="../vendor/bootstrap/js/bootstrap.min.js"></script>

    <!-- Metis Menu Plugin JavaScript -->
    <script src="../vendor/metisMenu/metisMenu.min.js"></script>

    <!-- DataTables JavaScript -->
    
    <!-- Custom Theme JavaScript -->
    <script src="../dist/js/sb-admin-2.js"></script>

    <!-- Page-Level Demo Scripts - Tables - Use for reference -->
 <script src="report_js/jquery.dataTables.min.js"></script>
 <script src="report_js/dataTables.bootstrap.min.js"></script>
 <script src="report_js/dataTables.buttons.min.js"></script>
 <script src="report_js/buttons.bootstrap.min.js"></script>
 <script src="report_js/jszip.min.js"></script>
 <script src="report_js/pdfmake.min.js"></script>
 <script src="report_js/vfs_fonts.js"></script>
 <script src="report_js/buttons.html5.min.js"></script>
 <script src="report_js/buttons.print.min.js"></script>
 <script src="report_js/buttons.colVis.min.js"></script>
<script>
$(document).ready(function() {
    var table = $('#example').DataTable( {
        lengthChange: false,
        buttons: [ 'copy', 'excel', 'pdf', 'colvis' ]
    } );
 
    table.buttons().container()
        .appendTo( '#example_wrapper .col-sm-6:eq(0)' );
} );
</script>
</body>

</html>

MMCT - 2023