D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
vitalityhealth
/
www
/
superadmin
/
Filename :
upload-images.php
back
Copy
<?php include("file-upload1.php"); include 'cn.php'; session_start(); $user=$_SESSION['username']; if(isset($_SESSION['username'])) { ?> <!doctype html><html class="fixed dark" data-style-switcher-options="{'backgroundColor': 'dark'}"> <head> <!-- Basic --> <meta charset="UTF-8"> <title>Done Mortgage</title> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"> <!-- Mobile Metas --> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <!-- Web Fonts --> <link href="css?family=Poppins:300,400,500,600,700,800|Shadows+Into+Light" rel="stylesheet" type="text/css"> <!-- Vendor CSS --> <link rel="stylesheet" href="vendor/bootstrap/css/bootstrap.css"> <link rel="stylesheet" href="vendor/animate/animate.compat.css"> <link rel="stylesheet" href="vendor/font-awesome/css/all.min.css"> <link rel="stylesheet" href="vendor/boxicons/css/boxicons.min.css"> <link rel="stylesheet" href="vendor/magnific-popup/magnific-popup.css"> <link rel="stylesheet" href="vendor/bootstrap-datepicker/css/bootstrap-datepicker3.css"> <!-- Specific Page Vendor CSS --> <!-- Theme CSS --> <link rel="stylesheet" href="css/theme.css"> <!-- Theme Custom CSS --> <link rel="stylesheet" href="css/custom.css"> <!-- Head Libs --> <script src="vendor/modernizr/modernizr.js"></script> <script src="master/style-switcher/style.switcher.localstorage.js"></script> <style> .container { max-width: 450px; } .imgGallery img { padding: 8px; max-width: 100px; } </style> </head> <body> <section class="body"> <!-- start: header --> <?php include("header.php"); ?> <!-- end: header --> <div class="inner-wrapper"> <!-- start: sidebar --> <?php include("leftnav.php"); ?> <!-- end: sidebar --> <section role="main" class="content-body card-margin"> <header class="page-header"> <h2>Add Image</h2> <div class="right-wrapper text-end"> <ol class="breadcrumbs"> <li> <a href="index.php"> <i class="bx bx-home-alt"></i> </a> </li> <li><span>Upload Images</span></li> </ol> <a class="sidebar-right-toggle" data-open="sidebar-right"><i class="fas fa-chevron-left"></i></a> </div> </header> <!-- start: page --> <div class="container mt-5"> <form action="" method="post" enctype="multipart/form-data" class="mb-3"> <h3 class="text-center mb-5">Upload Images</h3> <select name="name" class="form-control"> <option >Select Gallery Category</option> <?php $sqlp ="SELECT name FROM `portfoliocategory`"; $runp =mysqli_query($con,$sqlp); while($rowp = $runp->fetch_assoc()) { ?> <option value="<?php echo $rowp['name']; ?>"><?php echo $rowp['name']; ?></option> <?php } ?> </select><br><br> <div class="user-image mb-3 text-center"> <div class="imgGallery"> <!-- Image preview --> </div> </div> <div class="custom-file"> <input type="file" name="fileUpload[]" class="custom-file-input" id="chooseFile" multiple> <label class="custom-file-label" for="chooseFile">Select file</label> </div> <br><br> <button type="submit" name="submit" class="mb-1 mt-1 me-1 btn btn-success"> Upload Files </button> </form> <!-- Display response messages --> <?php if(!empty($response)) {?> <div class="alert <?php echo $response["status"]; ?>"> <?php echo $response["message"]; ?> </div> <?php }?> </div> <!-- jQuery --> <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script> <script> $(function() { // Multiple images preview with JavaScript var multiImgPreview = function(input, imgPreviewPlaceholder) { if (input.files) { var filesAmount = input.files.length; for (i = 0; i < filesAmount; i++) { var reader = new FileReader(); reader.onload = function(event) { $($.parseHTML('<img>')).attr('src', event.target.result).appendTo(imgPreviewPlaceholder); } reader.readAsDataURL(input.files[i]); } } }; $('#chooseFile').on('change', function() { multiImgPreview(this, 'div.imgGallery'); }); }); </script> <!-- end: page --> </section> </div> <?php include("rightnav.php"); ?> </section> <!-- Vendor --> <script src="vendor/jquery/jquery.js"></script> <script src="vendor/jquery-browser-mobile/jquery.browser.mobile.js"></script> <script src="vendor/jquery-cookie/jquery.cookie.js"></script> <script src="vendor/popper/umd/popper.min.js"></script> <script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script> <script src="vendor/bootstrap-datepicker/js/bootstrap-datepicker.js"></script> <script src="vendor/common/common.js"></script> <script src="vendor/nanoscroller/nanoscroller.js"></script> <script src="vendor/magnific-popup/jquery.magnific-popup.js"></script> <script src="vendor/jquery-placeholder/jquery.placeholder.js"></script> <!-- Specific Page Vendor --> <script src="vendor/jquery-ui/jquery-ui.js"></script> <script src="vendor/jqueryui-touch-punch/jquery.ui.touch-punch.js"></script> <script src="vendor/select2/js/select2.js"></script> <script src="vendor/bootstrap-multiselect/js/bootstrap-multiselect.js"></script> <script src="vendor/jquery-maskedinput/jquery.maskedinput.js"></script> <script src="vendor/bootstrap-tagsinput/bootstrap-tagsinput.js"></script> <script src="vendor/bootstrap-timepicker/js/bootstrap-timepicker.js"></script> <script src="vendor/fuelux/js/spinner.js"></script> <script src="vendor/dropzone/dropzone.js"></script> <script src="vendor/bootstrap-markdown/js/markdown.js"></script> <script src="vendor/bootstrap-markdown/js/to-markdown.js"></script> <script src="vendor/bootstrap-markdown/js/bootstrap-markdown.js"></script> <script src="vendor/summernote/summernote-bs4.js"></script> <script src="vendor/bootstrap-maxlength/bootstrap-maxlength.js"></script> <script src="vendor/ios7-switch/ios7-switch.js"></script> <!-- Specific Page Vendor --> <!-- Theme Base, Components and Settings --> <script src="js/theme.js"></script> <!-- Theme Custom --> <script src="js/custom.js"></script> <!-- Theme Initialization Files --> <script src="js/theme.init.js"></script> <!-- Analytics to Track Preview Website --> </body> </html> <?php } else { header("location:login.php"); } ?>