Файловый менеджер - Редактировать - /home/umudio/public_html/addgallery.php
Назад
<?php session_start(); if (!isset($_SESSION["manager"])) { header("location: ./"); exit(); } ?> <!doctype html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9" lang=""> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> <?php include("includes/pages-header.php"); ?> <div class="header-height"></div> <div class="pager-header"> <div class="container"> <div class="page-content"> <h2>Gallery Pictures</h2> <p>One thing I ask of the Lord. This I long to dwell in the house of the Lord, <br> all the days of my life.</p> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="./">Home</a></li> <li class="breadcrumb-item active">Gallery Pictures</li> </ol> </div> </div> </div><!-- /Page Header --> <!-- /Page Header --> <div class="" style="background-color: #F2F2F2;padding: 47px;"> <div class="row"> <div class="col-lg-9"> <?php include("includes/config.php"); if (isset($_GET['sn'])) { $sn = $_GET['sn']; $delete = "delete from gallery where id='$sn'"; $run = mysqli_query($con, $delete); if ($delete) { echo "<div class='alert alert-danger'> Picture deleted successfully! </div>"; } } ?> <p><a href="mod-auth">Go back to Admin Dashboard</a></p> <?php include("includes/config.php"); if (isset($_FILES['file_array'])) { $picture = $_FILES['file_array']['name']; $picture_tmp = $_FILES['file_array']['tmp_name']; for ($i = 0; $i < count($picture_tmp); $i++) { if (move_uploaded_file($picture_tmp[$i], "repo/" . $picture[$i])) { global $con; $insert_picture = "insert into gallery (image) values ('$picture[$i]')"; $run_picture = mysqli_query($con, $insert_picture); } else { } if ($insert_picture) { echo "<div class='alert alert-success'> $picture[$i] Uploaded successfully! </div>"; } else { echo "<div class='alert alert-danger'> An error occured, please try again! </div>"; } } } ?> <h2>Upload Gallery Pictures</h2><br> <small> <a href="#"><i>Hint: You can select multiple files and upload all at once</i></a> </small><br> <form action="" method="post" enctype="multipart/form-data"> <div class="form-group"> <div class="col-sm-8" style="padding-left: 0px!important;"> <input type="file" name="file_array[]" class="form-control" required multiple> </div> </div> <div class="form-group row"> <div class="col-md-12"> <input type="submit" value="Upload" class="default-btn-two"> </div> </div> </form> <br><br> <div class="container"> <h3>Existing Gallery Pictures</h3> <?php include("includes/config.php"); $get_feedback = "select * from gallery order by id desc"; $run_feedback = mysqli_query($con, $get_feedback); while ($row_feedback = mysqli_fetch_array($run_feedback)) { $sn = $row_feedback['id']; $image = $row_feedback['image']; echo " <div class='row' style='margin-bottom: 10px;border-bottom: 1px solid #E6E6E6;padding: 10px;padding-left: 0px;'> <div class='col-lg-10'> <img src='repo/$image' height='70' width='70'/> </div> <div class='col-lg-1'> <a href='addgallery?sn=$sn' style='color: red;'>Delete</a> </div> </div> "; } ?> </div> </div> <?php include("includes/sidecontent.php") ?> </div> </div> <?php include("includes/footer.php"); ?> <a data-scroll href="#header" id="scroll-to-top"><i class="arrow_up"></i></a> <!-- jQuery Lib --> <script src="js/vendor/jquery-1.12.4.min.js"></script> <!-- Bootstrap JS --> <script src="js/vendor/bootstrap.min.js"></script> <!-- Tether JS --> <script src="js/vendor/tether.min.js"></script> <!-- Imagesloaded JS --> <script src="js/vendor/imagesloaded.pkgd.min.js"></script> <!-- OWL-Carousel JS --> <script src="js/vendor/owl.carousel.min.js"></script> <!-- isotope JS --> <script src="js/vendor/jquery.isotope.v3.0.2.js"></script> <!-- Smooth Scroll JS --> <script src="js/vendor/smooth-scroll.min.js"></script> <!-- venobox JS --> <script src="js/vendor/venobox.min.js"></script> <!-- ajaxchimp JS --> <script src="js/vendor/jquery.ajaxchimp.min.js"></script> <!-- Counterup JS --> <script src="js/vendor/jquery.counterup.min.js"></script> <!-- waypoints js --> <script src="js/vendor/jquery.waypoints.v2.0.3.min.js"></script> <!-- Slick Nav JS --> <script src="js/vendor/jquery.slicknav.min.js"></script> <!-- Nivo Slider JS --> <script src="js/vendor/jquery.nivo.slider.pack.js"></script> <!-- Letter Animation JS --> <script src="js/vendor/letteranimation.min.js"></script> <!-- Wow JS --> <script src="js/vendor/wow.min.js"></script> <!-- Contact JS --> <script src="js/contact.js"></script> <!-- Main JS --> <script src="js/main.js"></script> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 5.6.40 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка