[
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_blooshine","itsweb_blooshine","hackit_321"); if(isset($_POST["action"])) { $query = " SELECT * FROM product 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(($_POST['popularity'])!=NULL){ // $storage_filter = implode("','", $_POST["category"]); $query .=" AND ".$_POST['popularity']."='Yes'"; } 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 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="col-md-3 col-sm-3 col-xs-12"> <a href="single-product.php?pid='.base64_encode($result[$key]['product_id']).'"> <div class="jewellery-box"> <div class="image-product"> <img src="product_img/'.$img.'"> </div> <img src="images/4.png" class="reting"> <div class="price"> <h4>'.$result[$key]['title'].'</h4> <h3><b>₹</b> '.$result[$key]['discounted_price'].' <del>₹ '.$result[$key]['price'].'</del><span>'.$result[$key]['discount'].'% Discount</span></h3> <!-- <h6>'.$result[$key]['discount'].'% Discount</h6>--> <a href="single-product.php?pid='.base64_encode($result[$key]['product_id']).'" class="buy-btn">Buy Now</a> </div> </div> </a> </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.54 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