One Hat Cyber Team
Your IP :
172.69.130.198
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
/
View File Name :
add_sheet_images.php
<?php session_start(); ?> <?php include('../../connections.php'); ?> <?php // upload.php if ($_SERVER['REQUEST_METHOD'] === 'POST') { $uploadDir = 'images/uploads/'; // Directory to store the uploaded images // Handle multiple file uploads if (!empty($_FILES['images']['name'])) { $images = $_FILES['images']; for ($i = 0; $i < count($images['name']); $i++) { $imageName = $images['name'][$i]; $imageTmpName = $images['tmp_name'][$i]; $targetPath = $uploadDir . $imageName; // Move uploaded file to the target directory move_uploaded_file($imageTmpName, $targetPath); } echo 'Images uploaded successfully.'; } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <link rel="apple-touch-icon" sizes="76x76" href="g"> <link rel="icon" type="image/png" href="assets/img/favicon.png"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <title>Thuru</title> <meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no' name='viewport' /> <!-- Fonts and icons --> <link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,200" rel="stylesheet" /> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" /> <!-- CSS Files --> <link href="assets/css/bootstrap.min.css" rel="stylesheet" /> <link href="assets/css/light-bootstrap-dashboard.css?v=2.0.1" rel="stylesheet" /> <link href="https://cdn.jsdelivr.net/npm/select2@4.0.12/dist/css/select2.min.css" rel="stylesheet" /> <link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css" rel="stylesheet" /> <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"></script> <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" /> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" /> <link href="assets/css/demo.css" rel="stylesheet" /> <style> .inline{ display: inline-block; float: right; margin: 20px 0px; } input,button{ height: 34px; } </style> </head> <body> <?php include('header.php');?> <div class="main-panel"> <?php include('side_bar.php');?> <div class="content"> <div class="container-fluid"> <!-- End Navbar --> <div class="container-fluid"> <div class="content pl-0 pr-0"> <div class="container-fluid"> <div class="row"> <div class="row"> <div class="col-md-12"> <?php if($upload_status=="success"){ echo '<div class="alert alert-success"> <strong>Success!</strong> Successfully Uploaded </div>'; }else if( $upload_status=="fail"){ echo '<div class="alert alert-danger"> <strong>False!</strong>Try Again Later</div>'; }/**/ $upload_status=""; ?> <form id="RegisterValidation" enctype="multipart/form-data" method="post"> <div class="card "> <div class="card-header "> <h4 class="card-title">Add images</h4> </div> <div class="card-body "> <div class="form-group has-label col-md-6"> <label class="pb-1"> image <star class="star">*</star> </label> <input type="file" class="form-control" name="images[]" name="name" placeholder="Name" multiple required/> <div id="validationMessage"></div> </div> <div class="card-category form-category"> <star class="star">*</star> Required fields</div> </div> <div class="card-footer text-right"> <button type="submit" name="submit" class="btn btn-info btn-fill pull-right" id="button">SUBMIT</button> <div class="form-group pull-left"> <div class="form-check"> </div> </div> <div class="clearfix"></div> </div> </div> </form> </div> <div class="col-md-12"> <div class="card bootstrap-table"> <div class="card-body table-full-width"> <?php // get_images.php $imageDir = 'images/uploads/'; // Directory where the images are stored $images = scandir($imageDir); $imageList = array_diff($images, ['.', '..']); // Remove "." and ".." from the file list // Sort the image list in descending order based on file modification time usort($imageList, function ($a, $b) use ($imageDir) { $fileA = $imageDir . $a; $fileB = $imageDir . $b; return filemtime($fileB) - filemtime($fileA); }); // Generate the HTML table $table = '<table class="table table-striped"> <thead> <tr> <th>Image</th> <th>File Name</th> </tr> </thead> <tbody>'; foreach ($imageList as $image) { $imagePath = $imageDir . $image; $imageName = "https://thurukepakaru.com/App/New/admin/dashboard/images/uploads/".basename($image); $table .= '<tr> <td><img src="' . $imagePath . '" width="100"></td> <td><a href="'.$imageName.'">'.$imageName.'</a></td> </tr>'; } $table .= '</tbody></table>'; // Output the table echo $table; ?> <div class="toolbar"> <!-- Here you can write extra buttons/actions for the toolbar --> </div> </div> </div> </div> </div> </div> </div> </div> <!-- End Navbar --> <footer class="footer"> <div class="container"> <nav> <p class="copyright text-center"> © <script> document.write(new Date().getFullYear()) </script> <a href="https://inoxzasolutions.com/">Inoxza Solutions</a>Innovations Forever </p> </nav> </div> </footer> </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> <script> </script> </html>