/
/
home
/
u917864144
/
domains
/
humsafarholiday.com
/
public_html
/
admin
EDITOR
/home/u917864144/domains/humsafarholiday.com/public_html/admin/index_add.php
SAVE
CLOSE
<?php include 'header.php'; if (isset($_POST['submit'])) { $dom_id = $_POST[2]; $int_id = $_POST[2]; $farm_id = $_POST[2]; $category_id = $_POST['category_name']; $home_id = $_POST['home_id']; $offer_text = $_POST['offer_text']; $related_name = $_POST['related_name']; $product_name = $_POST['product_name']; $trip_day = $_POST['trip_day']; $price = $_POST['price']; $itinerary = $_POST['itinerary']; $inclusions = $_POST['inclusions']; $exclusions = $_POST['exclusions']; $video = $_FILES['video']['name']; $tmp_vid = $_FILES['video']['tmp_name']; $targetvid = '../image/video/'.$video; $cover_img = $_FILES['cover_img']['name']; $tmp_file1 = $_FILES['cover_img']['tmp_name']; $targetPath1 = '../image/product/'.$cover_img; $image = $_FILES["image"]; $file_name = $_FILES["image"]["name"]; $location = "../image/product/"; $image_name = implode("-,-", $file_name); $offer_img = $_FILES['offer_img']['name']; $tmp_file_offer = $_FILES['offer_img']['tmp_name']; $targetPath_offer = '../image/offer_image/'.$offer_img; if (!empty($image_name)) { foreach ($file_name as $key => $val) { $targetPath = $location . $val; move_uploaded_file($_FILES['image']['tmp_name'][$key], $targetPath); } } $query = "INSERT INTO `packages`(`dom_id`,`int_id`,`farm_id`,`product_name`, `video`, `offer_img`, `offer_text`, `related_name`, `cover_img`, `image`, `trip_day`, `price`, `itinerary`, `inclusions`, `exclusions`, `home_id`) VALUES ('$dom_id','$int_id','$farm_id','$product_name','$video','$offer_img','$offer_text','$related_name','$cover_img','$image_name','$trip_day','$price','$itinerary','$inclusions','$exclusions', '$category_id', '$home_id')"; $query_run = mysqli_query($con, $query); if (move_uploaded_file($tmp_file1, $targetPath1)) { echo " <script> alert('Successfully Data Send'); document.location.href='index.php?s_id=1'; </script>"; } else { echo "<p style='text-align:center'>Cover image does not send successfully</p>"; } if (move_uploaded_file($tmp_file_offer, $targetPath_offer)) { echo " <script> alert('Successfully Data Send'); document.location.href='index.php?s_id=1'; </script>"; } else { echo "<p style='text-align:center'>Offer image does not send successfully</p>"; } if (move_uploaded_file($tmp_vid, $targetvid)) { echo " <script> alert('Successfully Data Send'); document.location.href='index.php?s_id=1'; </script>"; } else { echo "<p style='text-align:center'>Video does not send successfully</p>"; } } ?> <!-- Search Modal --> <div class="modal fade" id="searchModal" tabindex="-1" aria-labelledby="searchModalLabel" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content bg-transparent"> <div class="card mb-1"> <div class="px-3 py-2 d-flex flex-row align-items-center" id="top-search"> <i class="ti ti-search fs-22"></i> <input type="search" class="form-control border-0" id="search-modal-input" placeholder="Search for actions, people,"> <button type="button" class="btn p-0" data-bs-dismiss="modal" aria-label="Close">[esc]</button> </div> </div> </div> </div> </div> <!-- ============================================================== --> <!-- Start Page Content here --> <!-- ============================================================== --> <div class="page-content"> <!-- Start Content--> <div class="page-container"> <div class="page-title-head d-flex align-items-sm-center flex-sm-row flex-column gap-2"> <div class="flex-grow-1"> <h4 class="fs-18 fw-semibold mb-0">Add Products</h4> </div> <div class="text-end"> <ol class="breadcrumb m-0 py-0"> <!-- <li class="breadcrumb-item"><a href="index.php?s_id=1">Dashboard</a></li> --> <li class="breadcrumb-item"><a href="index.php?s_id=1">Products</a></li> <li class="breadcrumb-item active">Add Products</li> </ol> </div> </div> <form action="" method="POST" enctype="multipart/form-data"> <div class="row"> <div class="col-lg-7"> <div class="card"> <div class="card-header border-bottom border-dashed"> <h4 class="card-title mb-0">Product Details</h4> </div> <div class="card-body"> <div class="row"> <div class="col-lg-6"> <div class="mb-3"> <label for="gender" class="form-label">Category</label> <select class="form-select my-1 my-md-0 me-sm-3" name="category_name" data-toggle="select2" id="gender"> <option value="0">Select Category</option> <option value="1">Domestic</option> <option value="2">International</option> <option value="3">Customize Packages</option> <option value="4">Bus Tour</option> <option value="5">Car Rental Services</option> <option value="6">Visa Services</option> <option value="7">Farmhouse / Villa Rental</option> <option value="8">Membership Card</option> <option value="9">Royal Caribbean</option> <option value="10">Norway Cruises</option> <option value="11">Honeymoon Special</option> </select> </div> </div> <div class="col-lg-6"> <div class="mb-3"> <label for="department" class="form-label">Popural Tour</label> <select class="form-select my-1 my-md-0 me-sm-3" name="home_id" data-toggle="select2" id="department"> <option value="0">Select Popural Tour Line</option> <option value="1">Line 1</option> <option value="2">Line 2</option> <option value="3">Line 3</option> <option value="4">Line 4</option> <option value="5">Domestic</option> <option value="6">International</option> <option value="7">Honeymoon</option> <option value="8">Cruise</option> <option value="9">Bus Tour</option> <option value="10">Car Rental Services</option> <option value="11">Visa Services</option> <option value="12">Farmhouse/Villa</option> <option value="13">Honeymoon Special</option> <option value="14">Customize</option> </select> </div> </div> <div class="col-lg-12"> <div class="mb-3"> <label for="product_name" class="form-label">Product Name</label> <input type="text" class="form-control" id="product_name" name="product_name" placeholder="Enter Product Name"> </div> </div> <div class="col-lg-6"> <div class="mb-3"> <label for="offer_text" class="form-label">Offer Text</label> <input type="text" class="form-control" name="offer_text" id="offer_text" placeholder="Enter Offer Text"> </div> </div> <div class="col-lg-6"> <div class="mb-3"> <label for="related_name" class="form-label">Related Name</label> <input type="text" class="form-control" name="related_name" id="related_name" placeholder="Enter Related Name"> </div> </div> <div class="col-lg-6"> <div class="mb-3"> <label for="trip_day" class="form-label">Tour Days</label> <input type="text" class="form-control" name="trip_day" id="trip_day" placeholder="Enter Tour Days"> </div> </div> <div class="col-lg-6"> <div class="mb-3"> <label for="price" class="form-label">Price</label> <input type="text" class="form-control" name="price" id="price" placeholder="Enter Price"> </div> </div> <div class="col-lg-12"> <div class="mb-3"> <label for="itinerary" class="form-label">Itinerary</label> <textarea class="form-control" id="itinerary" name="itinerary" rows="15" placeholder="Day wise itinerary"></textarea> </div> </div> <div class="col-lg-12"> <div class="mb-3"> <label for="inclusions" class="form-label">Inclusions</label> <textarea class="form-control" id="inclusions" name="inclusions" rows="8" placeholder="Enter inclusions"></textarea> </div> </div> <div class="col-lg-12"> <div class="mb-3"> <label for="exclusions" class="form-label">Exclusions</label> <textarea class="form-control" id="exclusions" name="exclusions" rows="8" placeholder="Enter exclusions"></textarea> </div> </div> </div> </div> </div> </div> <div class="col-lg-5"> <div class="card"> <div class="card-header border-bottom border-dashed"> <h4 class="card-title mb-0">Upload Cover Photo</h4> </div> <div class="card-body"> <div class="col-12"> <div class="dropzone" id="myAwesomeDropzone" data-plugin="dropzone" data-previews-container="#file-previews" data-upload-preview-template="#uploadPreviewTemplate"> <div class="fallback"> <input type="file" name="cover_img" class="form-control" id="cover_img"> </div> <div class="dz-message needsclick"> <i class="h1 ti ti-cloud-upload mb-4"></i> <h4>Drop files here or click to upload.</h4> <span class="text-muted fs-13">(This is just a demo dropzone. Selected files are <strong>not</strong> actually uploaded.)</span> </div> </div> <!-- Preview --> <div class="dropzone-previews mt-3" id="file-previews"></div> <!-- file preview template --> <div class="d-none" id="uploadPreviewTemplate"> <div class="card mt-1 mb-0 shadow-none border"> <div class="p-2"> <div class="row align-items-center"> <div class="col-auto"> <img data-dz-thumbnail src="#" class="avatar-sm rounded bg-light" alt=""> </div> <div class="col ps-0"> <a href="javascript:void(0);" class="text-muted fw-bold" data-dz-name></a> <p class="mb-0" data-dz-size></p> </div> <div class="col-auto"> <!-- Button --> <a href="#" class="btn btn-link btn-lg text-muted" data-dz-remove> <i class="ti ti-x"></i> </a> </div> </div> </div> </div> </div> <!-- end file preview template --> </div> </div> </div> <div class="card"> <div class="card-header border-bottom border-dashed"> <h4 class="card-title mb-0">Upload Images</h4> </div> <div class="card-body"> <div class="col-12"> <div class="dropzone" id="myAwesomeDropzone1" data-plugin="dropzone" data-previews-container="#file-previews1" data-upload-preview-template="#uploadPreviewTemplate1"> <div class="fallback"> <input type="file" name="image[]" class="form-control" id="image" multiple=""> </div> <div class="dz-message needsclick uploadlabel" for="upload"> <i class="h1 ti ti-cloud-upload mb-4"></i> <h4>Drop files here or click to upload.</h4> <span class="text-muted fs-13">(This is just a demo dropzone. Selected files are <strong>not</strong> actually uploaded.)</span> </div> </div> <!-- Preview --> <div class="dropzone-previews mt-3" id="file-previews1"></div> <!-- file preview template --> <div class="d-none" id="uploadPreviewTemplate1"> <div class="card mt-1 mb-0 shadow-none border"> <div class="p-2"> <div class="row align-items-center"> <div class="col-auto"> <img data-dz-thumbnail src="#" class="avatar-sm rounded bg-light" alt=""> </div> <div class="col ps-0"> <a href="javascript:void(0);" class="text-muted fw-bold" data-dz-name></a> <p class="mb-0" data-dz-size></p> </div> <div class="col-auto"> <!-- Button --> <a href="#" class="btn btn-link btn-lg text-muted" data-dz-remove> <i class="ti ti-x"></i> </a> </div> </div> </div> </div> </div> <!-- end file preview template --> </div> </div> </div> <div class="card"> <div class="card-header border-bottom border-dashed"> <h4 class="card-title mb-0">Upload Offer Image</h4> </div> <div class="card-body"> <div class="col-12"> <div class="dropzone" id="myAwesomeDropzone" data-plugin="dropzone" data-previews-container="#file-previews" data-upload-preview-template="#uploadPreviewTemplate"> <div class="fallback"> <input type="file" name="offer_img" class="form-control" id="offer_img"> </div> <div class="dz-message needsclick"> <i class="h1 ti ti-cloud-upload mb-4"></i> <h4>Drop files here or click to upload.</h4> <span class="text-muted fs-13">(This is just a demo dropzone. Selected files are <strong>not</strong> actually uploaded.)</span> </div> </div> <!-- Preview --> <div class="dropzone-previews mt-3" id="file-previews"></div> <!-- file preview template --> <div class="d-none" id="uploadPreviewTemplate"> <div class="card mt-1 mb-0 shadow-none border"> <div class="p-2"> <div class="row align-items-center"> <div class="col-auto"> <img data-dz-thumbnail src="#" class="avatar-sm rounded bg-light" alt=""> </div> <div class="col ps-0"> <a href="javascript:void(0);" class="text-muted fw-bold" data-dz-name></a> <p class="mb-0" data-dz-size></p> </div> <div class="col-auto"> <!-- Button --> <a href="#" class="btn btn-link btn-lg text-muted" data-dz-remove> <i class="ti ti-x"></i> </a> </div> </div> </div> </div> </div> <!-- end file preview template --> </div> </div> </div> <div class="card"> <div class="card-header border-bottom border-dashed"> <h4 class="card-title mb-0">Upload Video</h4> </div> <div class="card-body"> <div class="col-12"> <div class="dropzone" id="myAwesomeDropzone2" data-plugin="dropzone" data-previews-container="#file-previews2" data-upload-preview-template="#uploadPreviewTemplate2"> <div class="fallback"> <input type="file" name="video" class="form-control" id="video"> </div> <div class="dz-message needsclick"> <i class="h1 ti ti-cloud-upload mb-4"></i> <h4>Drop files here or click to upload.</h4> <span class="text-muted fs-13">(This is just a demo dropzone. Selected files are <strong>not</strong> actually uploaded.)</span> </div> </div> <!-- Preview --> <div class="dropzone-previews mt-3" id="file-previews2"></div> <!-- file preview template --> <div class="d-none" id="uploadPreviewTemplate2"> <div class="card mt-1 mb-0 shadow-none border"> <div class="p-2"> <div class="row align-items-center"> <div class="col-auto"> <img data-dz-thumbnail src="#" class="avatar-sm rounded bg-light" alt=""> </div> <div class="col ps-0"> <a href="javascript:void(0);" class="text-muted fw-bold" data-dz-name></a> <p class="mb-0" data-dz-size></p> </div> <div class="col-auto"> <!-- Button --> <a href="#" class="btn btn-link btn-lg text-muted" data-dz-remove> <i class="ti ti-x"></i> </a> </div> </div> </div> </div> </div> <!-- end file preview template --> </div> </div> </div> <div class="text-end mb-3"> <button type="submit" name="submit" class="btn btn-primary">Add Details</button> <a href="index.php?s_id=1" class="btn btn-danger">Cancel</a> </div> </div> </div> </form> </div> <!-- container --> <?php include 'footer.php'; ?>
Ln 1, Col 1
FORMAT
WRAP
SAVE FILE
ONLINE
admin
31 items
09:50:12
TERMINAL FM
×
NAVIGATION
Root
Parent Dir
Refresh
ACTIONS
New Folder
New File
Upload Files
New Symlink
SELECTION
Select All
Deselect
Delete Selected
NEW FOLDER
FOLDER NAME
NEW FILE
FILE NAME
UPLOAD FILES
Click to browse or drag & drop files
No files selected
RENAME
CURRENT NAME
NEW NAME
COPY FILE
SOURCE
DESTINATION NAME
CHMOD
FILE / FOLDER
CURRENT PERMISSIONS
NEW MODE (octal)
755 (rwxr-xr-x)
644 (rw-r--r--)
777 (rwxrwxrwx)
600 (rw-------)
444 (r--r--r--)
CONFIRM DELETE
You are about to delete:
This action is irreversible. All contents will be permanently removed.
NEW SYMLINK
LINK TARGET (path)
LINK NAME
Edit
Preview
Download
Rename
Copy
Chmod
Delete