ok
Direktori : /home/ngwcolle/www/mis/admin/ |
Current File : /home/ngwcolle/www/mis/admin/sch_report.php |
<?php include('includes/checklogin.php'); check_login(); error_reporting(E_ALL); ?> <!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, shrink-to-fit=no"> <meta name="description" content=""> <meta name="author" content=""> <link href="img/logo/logo.png" rel="icon"> <title>Scholarship Report</title> <link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css"> <link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"> <link href="css/ruang-admin.min.css" rel="stylesheet"> <link href="vendor/datatables/dataTables.bootstrap4.min.css" rel="stylesheet"> </head> <body id="page-top"> <div id="wrapper"> <!-- Sidebar --> <?php include('includes/sidebar.php'); ?> <!-- Sidebar --> <div id="content-wrapper" class="d-flex flex-column"> <div id="content"> <!-- TopBar --> <?php include('includes/header.php'); ?> <!-- Topbar --> <!-- Container Fluid--> <div class="container-fluid" id="container-wrapper"> <div class="d-sm-flex align-items-center justify-content-between mb-4"> <h1 class="h3 mb-0 text-gray-800">Scholarship</h1> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="dashboard.php">Home</a></li> <li class="breadcrumb-item active" aria-current="page">Scholarship</li> </ol> </div> <!-- Row --> <div class="row"> <!-- Datatables --> <!-- DataTable with Hover --> <div class="col-lg-12"> <div class="card mb-4"> <div class="card-header py-3 d-flex flex-row align-items-center justify-content-between"> <h6 class="m-0 font-weight-bold text-primary">No. of Scholarship beneficiary</h6> <h6><a href="manage_Scholarship.php" class="btn btn-dark btn-sm">Back to Dashboard </a> <a href="sch_report.php" class="btn btn-info btn-sm">Reports </a> </h6> </div> <!-- search area --> <form class="form-group" action="" method="post"> <h5 class="p-0 text-center">Search</h5> <div class="row p-3"> <div class="col-md-3 pt-3"> <div class="form-group "> <select id="inputState" name="schyear" class="form-control" required> <option selected required value="">Year</option> <?php // get current year $curYear = date('Y'); // create range of required years and iterate over them foreach (range($curYear - 10, $curYear) as $year) { echo "<option value='$year'>$year</option>"; } ?> </select> </div> </div> <div class="col-md-3 pt-3"> <div class="form-group"> <select id="inputState" name="course" class="form-control" required> <option selected value="">Course Name</option> <?php $smt = $dbh->prepare("SELECT DISTINCT coursename from tbl_subject order by coursename"); $smt->execute(); $data = $smt->fetchAll(PDO::FETCH_OBJ); foreach ($data as $row) { ?> <option value="<?php echo $row->coursename; ?>"><?php echo strtoupper($row->coursename); ?></option> <?php } ?> </select> </div> </div> <div class="col-md-3 pt-3"> <div class="form-group"> <select id="inputState" name="schname" class="form-control" required> <option selected value="">Scholarship Name</option> <?php $smt = $dbh->prepare(" select * from tbl_scholarship order by id desc"); $smt->execute(); $data = $smt->fetchAll(PDO::FETCH_OBJ); foreach ($data as $row) { ?> <option value="<?php echo $row->schname; ?>"><?php echo strtoupper($row->schname); ?></option> <?php } ?> </select> </div> </div> <div class="col-md-2 p-3"> <button type="submit" class="btn btn-primary btn-block" name="search">Search</button> </div> <!-- <div class="col-md-4"><button type="submit" class="btn btn-dark" name="search">Search</button> <button type="button" onClick="window.location.href = 'manage_dcr.php'" class="btn btn-danger" name="search">Reset</button> </div> --> </div> </form> <!-- search area --> <!-- --> <!-- start modal --> <!-- end modal --> <div class="table-responsive p-2"> <table class="table table-hover table-sm"> <tbody> <tr> <th rowspan="2">Year</th> <th rowspan="2">Scholarship Name</th> <th rowspan="2">Course</th> <th colspan="2">SC</th> <th colspan="2">ST</th> <th colspan="2">PWD</th> <th colspan="2">OBC</th> <th colspan="2">GEN</th> <th colspan="2">Minority</th> </tr> <tr> <th>Boys</th> <th>Girls</th> <th>Boys</th> <th>Girls</th> <th>Boys</th> <th>Girls</th> <th>Boys</th> <th>Girls</th> <th>Boys</th> <th>Girls</th> <th>Boys</th> <th>Girls</th> </tr> <tr> <?php if (isset($_POST['search'])) { $schname = $_POST['schname']; $course = $_POST['course']; $schyear = $_POST['schyear']; $sql="SELECT * from tblschstudents where coursename='$course' and year='$schyear' and schname='$schname'"; // echo '<h6 class="text-danger pl-3"> You are submitting details for the year' . $schyear . " in " . $course . " course of " . $schname . ' scheme.</h6>'; $smt = $dbh->prepare($sql); $smt->execute(); $data = $smt->fetchAll(PDO::FETCH_OBJ); foreach ($data as $row) { // $total = $row->total; // } // echo '<h6 class="text-danger pl-3">Total no of students admitted in this year is ' . $total . '</h6>'; ?> <th><?php echo htmlentities($row->year);?></th> <th><?php echo htmlentities($row->schname);?></th> <th><?php echo htmlentities($row->coursename);?></th> <th><?php echo htmlentities($row->scb);?></th> <th><?php echo htmlentities($row->scg);?></th> <th><?php echo htmlentities($row->stb);?></th> <th><?php echo htmlentities($row->stb);?></th> <th><?php echo htmlentities($row->pwdb);?></th> <th><?php echo htmlentities($row->pwdg);?></th> <th><?php echo htmlentities($row->obcb);?></th> <th><?php echo htmlentities($row->obcg);?></th> <th><?php echo htmlentities($row->genb);?></th> <th><?php echo htmlentities($row->geng);?></th> <th><?php echo htmlentities($row->minb);?></th> <th><?php echo htmlentities($row->ming);?></th> </tr> <?php }}?> </tbody> </table> </div> <form method="post" action="export.php"> <input type="hidden" name="hdncourse" id="hdncourse" value="<?php echo $course;?>"> <input type="hidden" name="hdnyear" id="hdnyear" value="<?php echo $schyear;?>"> <input type="hidden" name="hdnschname" id="hdnschname" value="<?php echo $schname;?>"> <center><input type="submit" name="export" class="btn btn-success mb-2 ml-2 mt-4 text-center" value="Export to Excel" /></center> </form> </div> </div> </div> <!--Row--> <!-- Modal Logout --> </div> <!---Container Fluid--> </div> <!-- Footer --> <?php include('includes/footer.php'); ?> <!-- Footer --> </div> </div> <!-- Scroll to top --> <a class="scroll-to-top rounded" href="#page-top"> <i class="fas fa-angle-up"></i> </a> <script src="vendor/jquery/jquery.min.js"></script> <script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script> <script src="vendor/jquery-easing/jquery.easing.min.js"></script> <script src="js/ruang-admin.min.js"></script> <!-- Page level plugins --> <script src="vendor/datatables/jquery.dataTables.min.js"></script> <script src="vendor/datatables/dataTables.bootstrap4.min.js"></script> <!-- Page level custom scripts --> <script> $(document).ready(function() { $('#dataTable').DataTable(); // ID From dataTable $('#dataTableHover').DataTable(); // ID From dataTable with Hover }); </script> <!-- <script type="text/javascript"> $(document).ready(function() { $(document).on('click', '.edit_data4', function() { var edit_id4 = $(this).attr('id'); $.ajax({ url: "edit_ticket.php", type: "post", data: { edit_id4: edit_id4 }, success: function(data) { $("#info_update4").html(data); $("#editData4").modal('show'); } }); }); }); </script> --> <script> function sum() { var txtscb = document.getElementById('scb').value; // if (txtscb.length == 0) { // txtscb.value=0; // } var txtscg = document.getElementById('scg').value; var result = parseInt(txtscb) + parseInt(txtscg); if (!isNaN(result)) { document.getElementById('sctot').value = result; } } function sum1() { var txtscb = document.getElementById('stb').value; var txtscg = document.getElementById('stg').value; var result = parseInt(txtscb) + parseInt(txtscg); if (!isNaN(result)) { document.getElementById('sttot').value = result; } } function sum2() { var txtscb = document.getElementById('obcb').value; var txtscg = document.getElementById('obcg').value; var result = parseInt(txtscb) + parseInt(txtscg); if (!isNaN(result)) { document.getElementById('obctot').value = result; } } function sum3() { var txtscb = document.getElementById('pwdb').value; var txtscg = document.getElementById('pwdg').value; var result = parseInt(txtscb) + parseInt(txtscg); if (!isNaN(result)) { document.getElementById('pwdtot').value = result; } } function sum4() { var txtscb = document.getElementById('genb').value; var txtscg = document.getElementById('geng').value; var result = parseInt(txtscb) + parseInt(txtscg); if (!isNaN(result)) { document.getElementById('gentot').value = result; } } function sum5() { var txtscb = document.getElementById('minorityb').value; var txtscg = document.getElementById('minorityg').value; var result = parseInt(txtscb) + parseInt(txtscg); if (!isNaN(result)) { document.getElementById('minoritytot').value = result; } } </script> <script> $(document).ready(function() { //iterate through each textboxes and add keyup //handler to trigger sum event $(".boy").each(function() { $(this).keyup(function() { calculateSum(); }); }); $(".girl").each(function() { $(this).keyup(function() { calculateSum(); }); }); }); function calculateSum() { var sum = 0; var sum1 = 0; //iterate through each textboxes and add the values $(".boy").each(function() { //add only if the value is number if (!isNaN(this.value) && this.value.length != 0) { sum += parseInt(this.value); } }); $(".girl").each(function() { //add only if the value is number if (!isNaN(this.value) && this.value.length != 0) { sum1 += parseInt(this.value); } }); //.toFixed() method will roundoff the final sum to 2 decimal places $("#totalb").val(sum); $("#totalg").val(sum1); $("#totaltot").val(parseInt($("#totalb").val()) + parseInt($("#totalg").val())); } </script> <script> $(document).ready(function() { $('#submit').on("click", function(e) { //clean divmessage // name="hdnyear" value=" // <input type="text" name="hdnschname" var course=$("#hdncourse").val(); var year=$("#hdnyear").val(); var scheme=$("#hdnschname").val(); //or use $("#div_main form input") to check all inputs if(!course){ alert("Select Course Name"); return false; } if(!year){ alert("Select Scholarship Year"); return false; } if(!scheme){ alert("Select Scholarship Scheme"); return false; } // e.preventDefault(); }); }); </script> </body> </html>