View file File name : all_properties.php Content :<div id=""> <!-- Services start --> <div class="services content-area"> <div class="container-fluid"> <!-- Main title --> <div class="main-title"> <h1><?=$type?> Projects</h1> <p>Top <?=$type?> projects for you.</p> </div> <div class="row"> <div class="row col-md-10"> <div class="col-lg-3 filter-area "> <button class="btn btn-primary filter-btn " onclick="filter()" type="button" style="width:100%;color:white;font-weight:700;">Filter</button> <div class="card border-0 radius-10" id="filter_data"> <div id="collapseFilter" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion"> <div class="card-body p-0"> <script> function filter(){ var as=document.getElementById('filter_data').style.display; if(as!='none' && as!='block'){ as='none'; } if(as=='none'){ document.getElementById('filter_data').style.display='block'; }else{ document.getElementById('filter_data').style.display='none'; } } </script> <div class="filter_type px-4"> <h5 class="fw-700 mb-3">Price Range</h5> <ul> <li> <input onchange="filter_demand();range.value=this.value;" name="price" id="r" style="width:100%" type="range" min="100000" step="500000" max="100000000" value="<?php if($budget){ echo $budget; }else{ echo "100000000"; } ?>"> 0 to <input style="border:none;width:50%;" id="range" value="<?php if($budget){ echo $budget; }else{ echo "100000000"; } ?>"></p> </li> </ul> </div> <hr> <div class="filter_type px-4 pt-4"> <h5 class="fw-700 mb-4">Types</h5> <ul> <?php foreach($types as $tp){ ?> <li class=""> <div class="text-15px fw-700 d-flex"> <input type="radio" onclick="filter_demand()" class="type" value="<?=$tp->type?>" name="type" style="height:20px;width:20px;margin-right:20px;"> <label for="category_all"><?=$tp->type?></label> </div> </li> <?php } ?> </ul> </div> <hr> <div class="filter_type px-4 pt-4"> <h5 class="fw-700 mb-4">Locations</h5> <ul> <?php foreach($locations as $lc){ ?> <li class=""> <div class="text-15px fw-700 d-flex"> <input type="radio" onclick="filter_demand()" class="location" value="<?=$lc->name?>" name="location" style="height:20px;width:20px;margin-right:20px;"> <label for="category_all"><?=$lc->name?></label> </div> </li> <?php } ?> </ul> </div> <hr> </div> </div> </div> </div> <div class="col-md-9" id="table"> <?php foreach($props as $prop){ ?> <div class="row" style="box-shadow: 2px;border: 2px solid gray;border-radius: 24px;margin-top:4px;padding:10px;"> <div class="col-lg-4 col-md-4"> <div class="inside-properties mb-50"> <!--<h3 class="heading-2"> Property Video </h3>--> <img src="<?=$prop->property_image?>" style="max-width: -webkit-fill-available;" /> <h4 class="text-center"> <span style="text-decoration: line-through;">₹ <?php if(($prop->price/100000)>1){ echo $prop->price/100000; echo " Lacs"; } else if(($prop->price/10000000)>1){ echo $prop->price/10000000; echo " Cr "; }else{ echo $prop->price; } ?></span> ₹ <span><?php if(($prop->selling_price/100000)>1){ echo $prop->selling_price/100000; echo " Lacs"; } else if(($prop->selling_price/10000000)>1){ echo $prop->selling_price/10000000; echo " Cr "; }else{ echo $prop->selling_price; } ?></span> </h4> <h6 class="text-center"><?=$prop->per_sq_ft_price?> per sqft</h6> </div> </div> <div class="col-lg-7 col-md-7 text-center"> <?=$prop->project_code?> (<?=$prop->lacality?> , <?=$prop->station?>) <div class="row"> <div class="mb-srp__card__summary open" id="propertiesAction64358237"><div class="mb-srp__card__summary__list"><div class="mb-srp__card__summary__list--item" data-summary="carpet-area"> <div class="mb-srp__card__summary--label">Carpet Area</div><div class="mb-srp__card__summary--value"><?=$prop->area?></div></div> <div class="mb-srp__card__summary__list--item" data-summary="status"><div class="mb-srp__card__summary--label">Status</div> <div class="mb-srp__card__summary--value"><?=$prop->status?></div></div> <div class="mb-srp__card__summary__list--item" data-summary="floor"> <div class="mb-srp__card__summary--label">Floor</div><div class="mb-srp__card__summary--value"><?=$prop->floor?></div></div> <div class="mb-srp__card__summary__list--item" data-summary="transaction"><div class="mb-srp__card__summary--label">Transaction</div> <div class="mb-srp__card__summary--value">New</div></div> <div class="mb-srp__card__summary__list--item" data-summary="furnishing"><div class="mb-srp__card__summary--label">Furnishing</div> <div class="mb-srp__card__summary--value"><?=$prop->furnishing?></div></div><div class="mb-srp__card__summary__list--item" data-summary="facing"> <div class="mb-srp__card__summary--label">Type</div><div class="mb-srp__card__summary--value"><?=$prop->property_type?></div></div> </div><div class="mb-srp__card__summary__action"></div></div> <div class="col-md-12"><button onclick="window.location.href='<?=base_url()?>properties/details/<?=$prop->id?>'" style="width:100%;border-radius:20px;" class="btn btn-primary">View Property</button></div> </div> </div> </div> <?php } ?> </div> <script> function filter_demand(){ // location=[] try{ var locations = document.querySelector('input[name="location"]:checked') ; var location =locations.value; }catch(e){ location=''; } // type=[] try{ var types = document.querySelector('input[name="type"]:checked'); var type =types.value; }catch(e){ type=''; } // alert(type); // // alert(checkboxes[0].value); // for (var checkbox of checkboxess) { // type.push(checkbox.value); // } var price = document.querySelector('input[name="price"]').value; var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200){ // alert(this.response); document.getElementById("table").innerHTML=this.response; } }; xhttp.open("GET", "<?=base_url()?>properties/get_filter?location="+location+"&type="+type+"&price="+price); xhttp.send(); } </script> <!--ending--> </div> <div class=" col-md-2"> <form action="<?=base_url()?>properties/add_enquiry" method="post" enctype="multipart/form-data"> <div class="row"> <div class="form-group name col-md-6"> <input type="text" name="name" class="form-control" placeholder="Name"> </div> <div class="form-group email col-md-6"> <input type="email" name="email" class="form-control" placeholder="Email"> </div> <div class="form-group number col-md-12"> <input type="text" name="phone" class="form-control" placeholder="Number"> </div> <div class="form-group message col-md-12"> <textarea class="form-control" name="message" rows="5" placeholder="Write message"></textarea> </div> <div class="send-btn col-md-12"> <button type="submit" class="btn btn-md button-theme">Send Message</button> </div> </div> </form> <div class="sidebar-right"> <!-- Recent properties start --> <div class="widget recent-properties"> <div class="media mb-3"> <div class="media-body align-self-center"> <h5> <a href="">Palghar Branch</a> </h5> <div class="listing-post-meta"> Flat No.04, 2<sup>nd</sup> Floor, Rajeshwari, Shopping Center, Above Bholanath Sweet Mart, Near Viva Hotel, Mahim Road,Palghar (West)-401404. </div> </div> </div> <div class="media"> <div class="media-body align-self-center"> <h5> <a href="">Umbergaon Branch</a> </h5> <div class="listing-post-meta"> Shivam Vihar, Adarsh Nagar, Solsumba, Umbergaon (East) 396171. </div> </div> </div><br> <div class="media "> <div class="media-body align-self-center"> <h5> <a href="">Email Id</a>: dhcloanmart@gmail.com </h5> </div> </div> <div class="media "> <div class="media-body align-self-center"> <h5> <a href="">Contact No</a>: +91 8412007333 </h5> </div> </div> </div> </div> </div> </div> </div> </div> </div>