ok
Direktori : /home/ngwcolle/public_html/ |
Current File : //home/ngwcolle/public_html/reports.php |
<?php include "header.php"; date_default_timezone_set('Asia/Kolkata'); include "admin/includes/config.php"; ?> <section class="inner-banner"></section> <section class="breadcrumb-sec"> <div class="container"> <div class="row"> <div class="col-md-12"> <nav aria-label="breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="index.html">Home</a></li> <li><i class="fa fa-caret-right" aria-hidden="true"></i></li> <li class="breadcrumb-item">Reports</li> </ol> </nav> </div> </div> </div> </section> <section class="section-15 about-section"> <div class="container"> <div class="row"> <div class="col-md-9"> <div class="title"> <h1><span>Reports</span></h1> </div> <form class="form-inline p-1" action="" method="post"> <div class="form-group"> <label for="email" class="text-primary" style="width:180px">Department</label> <select name="ptype" id="ptype" class="form-control" required style="width:220px"> <option value="">--Select Department--</option> <!-- <option value="Principal">Principal</option> <option value="Admin">Admin</option> <option value="Committee">Committee</option> <option value="Department">Department</option> <option value="Library">Library</option> --> <?php $query=mysqli_query($con,"select * from tbl_dept where status=1 "); while ($category = mysqli_fetch_array($query)){ ?> <option value="<?php echo $category["id"];?>"><?php echo $category["dept_name"];?></option> <?php }?> </select> </div> <div class="form-group"> <label for="pwd" class="text-primary col-sm-3" >Year</label> <select name="ryear" id="" class="form-control" required style="width:150px"> <option value="">--Select Year--</option> <?php for($i = date("Y")-5; $i <=date("Y"); $i++){ echo '<option value="' . $i . '">' . $i . '</option>' . PHP_EOL; } ?> </select> </div> <button type="submit" name="submit" class="btn btn-success" style="width:120px;padding: 4px;border-radius: 5%;background-image: linear-gradient(to right top, #051937, #004d7a, #008793, #00bf72, #a8eb12);">View</button> </form> <hr class="bg-primary"> <div class="title"> <h1><span>Summary</span></h1> </div> <table class="table table-responsive" id="tt" width="100%" border="1" align="center" cellpadding="3" cellspacing="1" bordercolor="#ecf1f5" style="border-collapse:collapse;"> <thead> <tr> <th width="30" align="center" bgcolor="#053d6a" class="white" style="line-height:120%; color:#FFF;">S.N.</th> <th width="125" align="center" bgcolor="#053d6a" class="white" style="line-height:120%; color:#FFF;">Year</th> <th width="906" align="left" bgcolor="#053d6a" class="white" style="color:#FFF;">Purpose</th> <th width="60" align="center" bgcolor="#053d6a" class="white" style="color:#FFF;">Browse</th> </tr> </thead> <tbody> <?php if(isset($_POST['submit'])) { $deptid=$_POST['ptype']; $year=$_POST['ryear']; } $query=mysqli_query($con,"select * from tbl_report where deptid='$deptid' and reportyear='$year' order by id desc"); $cnt=1; while($row=mysqli_fetch_array($query)){ ?> <tr> <td><?php echo $cnt;?></td> <td class="small"><?php echo date("d-M-Y",strtotime($row['reportyear']));?></td> <td><?php echo $row['subject'];?></td> <td align="center" valign="top"><a href="upload/doc/<?php echo $row['docpath'];?>" target="_blank"><img src="assets/images/link.png" style="width:20px;"></a></td> </tr> <?php $cnt++; } ?> </tbody> </table> </div> <?php include"sidebar.php";?> </div> </section> <?php include "footer.php"; ?> <script> // $('#example').dataTable( { // // "dom": '<"top"i>rt<"bottom"flp><"clear">' // } ) $(document).ready(function () { // $('#tt').DataTable(); $('#tt').dataTable( { "pageLength": 50 } ); }); </script>