[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: fetch_data.php
<?php include 'settings/settings.php'; $connect = new PDO("mysql:host=localhost;dbname=itsweb_abc_cart","itsweb_abc_cart","hackit_321"); if(isset($_POST["action"])) { $query = " SELECT distinct product.product_id,product.title,product.category,product.type,product.sub_category,product.fabric,product.color,product.price,product.gender,product.discount,product.discounted_price FROM product JOIN product_size ON product.product_id = product_size.product_id where "; if(($_POST['category'])!=NULL){ $query .=" category ='".$_POST['category']."' "; } if(($_POST['sub_category'])!=NULL){ // $storage_filter = implode("','", $_POST["category"]); $query .=" AND sub_category='".$_POST['sub_category']."'"; } if(isset($_POST["minimum_price"], $_POST["maximum_price"]) && !empty($_POST["minimum_price"]) && !empty($_POST["maximum_price"])) { $query .= " AND price BETWEEN ".$_POST["minimum_price"]." AND ".$_POST["maximum_price"]." "; } if(($_POST['type'])!=NULL){ // $storage_filter = implode("','", $_POST["category"]); $query .=" AND type='".$_POST['type']."'"; } if(($_POST['fabric'])!=NULL){ // $storage_filter = implode("','", $_POST["category"]); $query .=" AND fabric='".$_POST['fabric']."'"; } if(($_POST['gender'])!=NULL){ // $storage_filter = implode("','", $_POST["category"]); $query .=" AND gender='".$_POST['gender']."'"; } if(($_POST['color'])!=NULL){ $storage_filter = implode("','", $_POST["color"]); $query .=" AND color IN ('".$storage_filter."')"; } if(($_POST['size'])!=NULL){ $storage_filter = implode("','", $_POST["size"]); $query .=" AND product_size.size IN ('".$storage_filter."')"; } if(($_POST['discount'])!=NULL){ $storage_filter = explode("-", $_POST['discount']); $query .=" AND discount between '".$storage_filter[0]."' and '".$storage_filter[1]."'"; } if(($_POST['price'])!=NULL){ $storage_filter = explode("-", $_POST['price']); $query .=" AND discounted_price between '".$storage_filter[0]."' and '".$storage_filter[1]."'"; } $query .=" order by product.product_id desc"; //echo $query; $p1=$price[0]; $p2=$price[1]; $statement = $connect->prepare($query); $statement->execute(); $result = $statement->fetchAll(); $total_row = $statement->rowCount(); $output = ''; //echo $query; if($total_row > 0) { foreach($result as $key=>$value) { // echo $p1; echo $p2; $sq=$show->readwithdata('product_img','product_id',$result[$key]['product_id']); while ($row1 = $sq->fetch(PDO::FETCH_ASSOC)){ $img=$row1['img']; } $output .= ' <div class="hover14 column"> <div class="agile_top_brand_left_grid"> <div class="agile_top_brand_left_grid1"> <figure> <div class="snipcart-item block"> <div class="snipcart-thumb"> <a href="single.php?pid='.base64_encode($result[$key]['product_id']).'"><img title=" Mens Topwear" alt=" " src="product_img/'.$img.'"></a> <p>'.$result[$key]['title'].'</p> <h4><b>₹</b> '.$result[$key]['discounted_price'].' <span><b>₹</b> '.$result[$key]['price'].'</span></h4> <li><img src="images/4.png"></li> </div> </div> </figure> </div> </div> </div> '; } }else { $output = '<h3>No Data Found</h3>'; } echo $output; } ?>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 677.97 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:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: 1619