One Hat Cyber Team
Your IP :
172.70.80.191
Server IP :
188.114.97.4
Server :
Linux thuru 6.5.11-4-pve #1 SMP PREEMPT_DYNAMIC PMX 6.5.11-4 (2023-11-20T10:19Z) x86_64
Server Software :
Apache/2.4.51 (Unix) OpenSSL/1.0.2k-fips
PHP Version :
7.3.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
thuruk
/
public_html
/
App
/
New
/
admin
/
dashboard
/
Edit File:
tree_reports.php
<?php include('../../connections.php'); ?> <!DOCTYPE html> <html lang="en"> <?php include('header.php');?> <body> <div class="wrapper"> <?php include('side_bar.php');?> <div class="main-panel"> <!-- Navbar --> <nav class="navbar navbar-expand-lg "> <div class="container-fluid"> <div class="navbar-wrapper"> <div class="navbar-minimize"> <button id="minimizeSidebar" class="btn btn-warning btn-fill btn-round btn-icon d-none d-lg-block"> <i class="fa fa-ellipsis-v visible-on-sidebar-regular"></i> <i class="fa fa-navicon visible-on-sidebar-mini"></i> </button> </div> <a class="navbar-brand" href="./dashboard.html"> Dashboard</a> </div> <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" aria-controls="navigation-index" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-bar burger-lines"></span> <span class="navbar-toggler-bar burger-lines"></span> <span class="navbar-toggler-bar burger-lines"></span> </button> </div> </nav> <!-- End Navbar --> <div class="content pl-0 pr-0"> <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <form id="RegisterValidation"> <div class="card "> <div class="card-header "> <h4 class="card-title">Search</h4> </div> <div class="card-body"> <div class="row"> <div class="form-group has-label col-md-4"> <label class="pb-1"> Plant Name <star class="star">*</star> </label> <div class="form-group"> <select class="form-control" name="plant_name" onchange="showOtherNmae(this.value)"> <option>Select Tile</option> <?php $query ="SELECT * FROM `tree_name`"; $result = mysqli_query($connect,$query); echo ' <option>All</option>'; while($row = mysqli_fetch_assoc($result)){ echo ' <option>'.$row['name'].'</option>'; } ?> </select> </div> </div> <div class="form-group has-label col-md-4"> <label class="pb-1"> From Date <star class="star">*</star> </label> <div class="form-group"> <input type="date" class="form-control " name="from_date" placeholder="Day" required/> </div> </div> <div class="form-group has-label col-md-4"> <label class="pb-1"> To Date <star class="star">*</star> </label> <div class="form-group"> <input type="date" class="form-control " name="to_date" placeholder="Day" required/> </div> </div> </div> <div class="card-category form-category"> <star class="star">*</star> Required fields</div> <div class="card-footer text-right"> <button type="submit" class="btn btn-info btn-fill pull-right">SEARCH NOW</button> <div class="form-group pull-left"> <div class="form-check"> </div> </div> <div class="clearfix"></div> </div> </div> </div> </form> </div> </div> <div class="row"> <div class="col-md-12"> <div class="card data-tables px-3"> <div class="card-body table-striped table-no-bordered table-hover dataTable dtr-inline table-full-width"> <div class="card-header "> <h5 class="card-title mb-2">Report</h5> </div> <div class="toolbar"> <!-- Here you can write extra buttons/actions for the toolbar --> </div> <div class="fresh-datatables"> <table id="datatables" class="table table-striped table-no-bordered table-hover" cellspacing="0" width="100%" style="width:100%"> <thead> <tr> <th>No</th> <th>Contact</th> <th>Owner Name</th> <th>Plant Name</th> <th>Latitude</th> <th>Longitude</th> <th>Location</th> <th>Created By</th> <th>Created Date</th> </tr> </thead> <tfoot> <tr> <th>No</th> <th>Contact</th> <th>Owner Name</th> <th>Plant Name</th> <th>Latitude</th> <th>Longitude</th> <th>Location</th> <th>Created By</th> <th>Created Date</th> </tr> </tfoot> <tbody> <?php if(isset($_GET['from_date'])){ $plant_name = $_GET['plant_name']; $from_date = $_GET['from_date']; $to_date = $_GET['to_date']; $query=""; if($plant_name=="All"){ $query="SELECT * FROM `users` inner join `newuser_plants` WHERE newuser_plants.created_date > '$from_date' AND newuser_plants.created_date < '$to_date' AND users.user_id=newuser_plants.user_id AND newuser_plants.status='activate' ORDER BY newuser_plants.created_time DESC "; }else{ $query="SELECT * FROM `users` inner join `newuser_plants` WHERE newuser_plants.plant_name LIKE '$plant_name' AND newuser_plants.created_date > '$from_date' AND newuser_plants.created_date < '$to_date' AND users.user_id=newuser_plants.user_id AND newuser_plants.status='activate' ORDER BY newuser_plants.created_time DESC "; } $result = mysqli_query($connect,$query) or die(mysqli_error($connect)); $i; while($row=mysqli_fetch_assoc($result)){ $id = $row['user_plant_id']; $i++; echo ' <tr> <td>'.$i.'</td> <td>'.$row['user_id'].'</td> <td>'.$row['name'].'</td> <td>'.$row['plant_name'].'</td> <td>'.$row['lat'].'</td> <td>'.$row['lng'].'</td> <td>'.$row['location'].'</td> <td>'.$row['created_type'].'</td> <td>'.$row['created_date'].'</td> </tr> '; } } ?> </tbody> </table> </div> </div> </div> </div> </div> </div> </div> </div> </div> </body> <!-- Core JS Files --> <script src="assets/js/core/jquery.3.2.1.min.js" type="text/javascript"></script> <script src="assets/js/core/popper.min.js" type="text/javascript"></script> <script src="assets/js/core/bootstrap.min.js" type="text/javascript"></script> <!-- Plugin for Switches, full documentation here: http://www.jque.re/plugins/version3/bootstrap.switch/ --> <script src="assets/js/plugins/bootstrap-switch.js"></script> <!-- Google Maps Plugin --> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?YOUR_KEY_HERE"></script> <!-- Chartist Plugin --> <script src="assets/js/plugins/chartist.min.js"></script> <!-- Notifications Plugin --> <script src="assets/js/plugins/bootstrap-notify.js"></script> <!-- jVector Map --> <script src="assets/js/plugins/jquery-jvectormap.js" type="text/javascript"></script> <!-- Plugin for Date Time Picker and Full Calendar Plugin--> <script src="assets/js/plugins/moment.min.js"></script> <!-- DatetimePicker --> <script src="assets/js/plugins/bootstrap-datetimepicker.js"></script> <!-- Sweet Alert --> <script src="assets/js/plugins/sweetalert2.min.js" type="text/javascript"></script> <!-- Tags Input --> <script src="assets/js/plugins/bootstrap-tagsinput.js" type="text/javascript"></script> <!-- Sliders --> <script src="assets/js/plugins/nouislider.js" type="text/javascript"></script> <!-- Bootstrap Select --> <script src="assets/js/plugins/bootstrap-selectpicker.js" type="text/javascript"></script> <!-- jQueryValidate --> <script src="assets/js/plugins/jquery.validate.min.js" type="text/javascript"></script> <!-- Plugin for the Wizard, full documentation here: https://github.com/VinceG/twitter-bootstrap-wizard --> <script src="assets/js/plugins/jquery.bootstrap-wizard.js"></script> <!-- Bootstrap Table Plugin --> <script src="assets/js/plugins/bootstrap-table.js"></script> <!-- DataTable Plugin --> <script src="assets/js/plugins/jquery.dataTables.min.js"></script> <!-- Full Calendar --> <script src="assets/js/plugins/fullcalendar.min.js"></script> <!-- Control Center for Now Ui Dashboard: parallax effects, scripts for the example pages etc --> <script src="assets/js/light-bootstrap-dashboard.js?v=2.0.1" type="text/javascript"></script> <!-- Light Dashboard DEMO methods, don't include it in your project! --> <script src="assets/js/demo.js"></script> <!-- Library for adding dinamically elements --> <!--<script src="assets/js/plugins/arrive.min.js"></script>--> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> <script type="text/javascript"> function setFormValidation(id) { $(id).validate({ highlight: function(element) { $(element).closest('.form-group').removeClass('has-success').addClass('has-error'); $(element).closest('.form-check').removeClass('has-success').addClass('has-error'); }, success: function(element) { $(element).closest('.form-group').removeClass('has-error').addClass('has-success'); $(element).closest('.form-check').removeClass('has-error').addClass('has-success'); }, errorPlacement: function(error, element) { $(element).closest('.form-group').append(error).addClass('has-error'); }, }); } $(document).ready(function() { setFormValidation('#RegisterValidation'); }); </script> <script> $('.datepicker').datetimepicker({ format: 'YYYY-MM-DD', icons: { time: "fa fa-clock-o", date: "fa fa-calendar", up: "fa fa-chevron-up", down: "fa fa-chevron-down", previous: 'fa fa-chevron-left', next: 'fa fa-chevron-right', today: 'fa fa-screenshot', clear: 'fa fa-trash', close: 'fa fa-remove' } }); </script> <script> $(document).ready(function() { $('#datatables').DataTable({ "pagingType": "full_numbers", "lengthMenu": [ [10, 25, 50, -1], [10, 25, 50, "All"] ], responsive: true, dom: "Bfrtip", buttons: [ { extend: 'print', footer: true, className:'btn btn-info btn-fill', title: $('h5').html(), messageTop: "Attendance of Selected Value Range", customize: function ( win ) { $(win.document.body.title) .addClass('text-center') $(win.document.body) .addClass('text-center') .css( 'font-size', '12pt' ) $(win.document.body).find( 'table' ) .addClass( 'text-center' ) .css( 'font-size', 'inherit' ); } }, { extend: 'pdfHtml5', footer: true, className:'btn btn-info btn-fill ml-2', pageSize:'A4', pageSize:'A4', }, { extend: 'excelHtml5', footer: true,className:'btn btn-info btn-fill ml-2' } ], language: { search: "_INPUT_", searchPlaceholder: "Search records", } }); }); </script> </html>
Simpan