0byt3m1n1
Path:
/
var
/
www
/
listcrawler.app
/
public_html
/
[
Home
]
File: listing.php
<?php require 'db.php'; $sql_mode = "SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')) "; mysqli_query($conn, $sql_mode); $location_name = ''; $get_location_id = 0; $get_region_id = 0; $search_term = ''; $cityname = ''; if( isset( $_GET['location_name'] ) && !empty($_GET['location_name'])) { $location_name = trim($_GET['location_name']); $get_location_id = get_location_id($location_name); $get_region_id = get_region_id($get_location_id); } if (isset($_GET['pageno'])) { $pageno = $_GET['pageno']; } else { $pageno = 1; } $no_of_records_per_page = mt_rand(80,100); $offset = ($pageno-1) * $no_of_records_per_page; $location_name_general = ucwords(str_replace('_', ' ', $location_name)); $search = array('LOCATION_NAME'); $replace = array($location_name_general); $page_title = !empty(get_location_info('title_city', $get_location_id)) ? get_location_info('title_city', $get_location_id) : get_seo('title_ad_list'); $meta_description = !empty(get_location_info('meta_desc_city', $get_location_id)) ? get_location_info('meta_desc_city', $get_location_id) : get_seo('title_ad_list'); $meta_keywords = !empty(get_location_info('meta_key_city', $get_location_id)) ? get_location_info('meta_key_city', $get_location_id) : get_seo('title_ad_list'); $page_title = str_replace($search, $replace, $page_title); ?> <!DOCTYPE html> <html lang="en"> <head> <?php if ( $pageno > 1 ) { ?> <meta name="robots" content="noindex, nofollow"> <?php } else { ?> <?php if ( $meta_description ) { ?> <meta name="description" content="<?php echo str_replace($search, $replace, $meta_description);?>"> <?php } ?> <?php if ( $meta_keywords ) { ?> <meta name="keywords" content="<?php echo str_replace($search, $replace, $meta_keywords);?>"> <?php } ?> <?php } ?> <?php include_once 'includes/head.php'; ?> </head> <body class="gradient-6" data-spy="scroll" data-target="#navbar-nav"> <div class="main"> <?php include_once 'includes/header.php'; ?> <!-- =========== Start of Hero ============ --> <section class="hero hero--dark hidden"> <div class="container"> <div class="col-12 device-margin-top"> <?php if ($get_location_id != 0) { $search_query = ""; if( isset( $_REQUEST['search-term'] ) && !empty($_REQUEST['search-term'])) { $search_term = filter_var($_REQUEST['search-term'], FILTER_SANITIZE_STRING); $search_query = " AND `list_title` LIKE '%" .$search_term."%' "; } $total_pages_sql = "SELECT lists.id from lists LEFT JOIN lists_locations ON lists_locations.list_id = lists.id WHERE lists_locations.location_id = $get_location_id $search_query GROUP BY lists.`list_title`"; $result = mysqli_query($conn, $total_pages_sql); $total_rows = mysqli_num_rows($result); $total_pages = ceil($total_rows / $no_of_records_per_page); $chkListLocation = "SELECT lists.id, lists.list_title, lists.age, lists_locations.location_id, lists_locations.subarea_id from lists LEFT JOIN lists_locations ON lists_locations.list_id = lists.id WHERE lists_locations.location_id = $get_location_id $search_query GROUP BY lists.`list_title` ORDER BY lists.id LIMIT $offset, $no_of_records_per_page "; $chkListLocationResult = mysqli_query($conn, $chkListLocation); $countListLocation = mysqli_num_rows($chkListLocationResult); ?> <div class="row mt-4"> <div class="col-md-6"> <nav aria-label="breadcrumb" > <ol class="breadcrumb trans"> <li class="breadcrumb-item"><a href="/city/<?php echo $location_name; ?>"><?php echo ucwords(str_replace('_', ' ', $location_name)); ?> </a> </li> <li class="breadcrumb-item active" aria-current="page">Escorts</li> </ol> </nav> </div> <div class="col-md-6"> <form class="form-inline ml-auto search-form" method="POST" action=""> <input name="search-term" type="text" class="form-control search-input" placeholder="search term" value=""> <button type="submit" class="btn btn-light search-btn" style="">go</button> </form> </div> </div> <?php if ($countListLocation > 0) { ?> <div class="row mt-0 text-secondary"> <?php if ($search_query) { ?> <div class="col-12 mb-3" style="padding-right:15px;"> <div class="search-info-bar">Here are the search results for "<strong><i><?php echo $search_term;?></i></strong>": </div> </div> <?php } ?> <div class="col-12" style="padding-right:15px;"> <div class="date-bar"><?php echo date('m/d/y - l'); ?></div> </div> <div class="col-12"> <?php // get random sponsor ad $chkSponsorAd = "SELECT `id`, `ad_title`, `ad_url` from `sponsors` ORDER BY RAND() LIMIT 1 " ; $chkSponsorAdResult = mysqli_query($conn, $chkSponsorAd); $count_sponsor_ad = mysqli_num_rows($chkSponsorAdResult); if ($count_sponsor_ad > 0) { $rowSponsorAdResult = mysqli_fetch_assoc($chkSponsorAdResult); $mobile_id = $rowSponsorAdResult['id']; ?> <p class="sponsor-bar"> <a href="/sponsors/<?php echo $rowSponsorAdResult['id']; ?>" rel="nofollow" target="_blank" style="color: #343a40;"> <?php echo $rowSponsorAdResult['ad_title']; ?> </a> <span class="list-cityname"> <span class="sponsor-text"> Sponsored</span></span> <?php $chkPic = "SELECT * FROM `sponsor_photos` WHERE `sponsor_id` = " . $rowSponsorAdResult['id'] . " ORDER BY `id` ASC LIMIT 3" ; $chkPicResult = mysqli_query($conn, $chkPic); $PicCount = mysqli_num_rows($chkPicResult); if ($PicCount > 0){ $chkPicResult = mysqli_query($conn, $chkPic); $i = 1; while ($rowPic = mysqli_fetch_assoc($chkPicResult)){ ?> <img class="sponsor-photo" src="/sponsor_pics/<?php echo $rowPic["photo_name"];?>"> <?php $i++; } } ?> </p> <?php } ?> <?php $number = 0; while ($rowListLocation = mysqli_fetch_assoc($chkListLocationResult)){ $page_title = str_replace(' ', '-', ($rowListLocation['list_title'])); $page_title = preg_replace('/[\W]/', '-', $page_title); $subarea_name = get_subarea_name($rowListLocation['subarea_id']); $subarea_name = str_replace("(", "", $subarea_name); $subarea_name = str_replace(")", "", $subarea_name); $expSubarea_name = explode(",", $subarea_name); $subarea_name = $expSubarea_name[0]; $photo_count = get_photo_count($rowListLocation['id']); $number++; ?> <p class="pb-3" style="padding-left: 1rem;"> <a href="/city/<?php echo $location_name;?>/<?php echo $rowListLocation['id']."-".$page_title;?>"> <?php echo $rowListLocation['list_title']; ?> </a> <!--<span class="list-cityname"> <?php if ($subarea_name) { echo "(".strtolower($subarea_name).")"; } ?> </span>--> <span class="list-has-photo"> <?php echo $rowListLocation['age']; ?> </span> <?php if($photo_count) { ?> <span class="list-has-photo">pic</span> <?php } ?> </p> <?php } ?> </div> </div> <?php //echo "total page=".$total_pages; //echo "<br>page=".$pageno; /*if( ($pageno <= 1) && ($pageno < $total_pages)){ ?> <div class="row"> <div class="col-12 mt-5 mb-4 text-center"> <a href="/city/<?php echo $location_name;?>/pageno/2" rel="nofollow"><button type="button" class="btn btn-list-page purplebutton pr-5 pl-5" style="font-size:16px !important;">Next Page</button></a> </div> </div> <?php } */ ?> <?php if( $pageno == 1 ) { include_once 'includes/location-info.php'; } ?> <?php } else if ($search_query) { ?> <div class="row mt-0 text-secondary text-center" style="height:200px;"> <div class="col-12 mb-3" style="padding-right:15px;"> <div class="search-info-bar" style="margin-top:100px;color: #343a40;font-weight: 600;">No results found.</div> </div> </div> <?php } } ?> </div> </div> <!-- /.container --> <!-- end of hero svg shape --> </section> <!-- =========== End of Hero ============ --> </div> <?php //include_once 'includes/modal.php'; include_once 'includes/footer.php'; ?> </body> </html>