| Server IP : 208.122.213.31 / Your IP : 216.73.216.45 Web Server : Apache System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64 User : WHMCS_MIA_382 ( 1001) PHP Version : 7.4.33 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/httpd/html/sportyone.com/public_html/code/ |
Upload File : |
<?php
$query = " select niche_name from niche
where niche_id = '{$_SESSION['kink']}'
limit 1 ";
$niche_name = $connection->query($query);
$page_title .= ' - Kink Finder - ';
$section_title = "Kink Finder";
$section_title_single = 'section_title_single';
$page_title .= $niche_name[0]['niche_name'];
$section_title = 'Kink Finder';
$join = "";
if(!empty($_SESSION['kink'])) {
$join = "join niche2asset as n2a on n2a.asset_id = a.asset_id and n2a.niche_id = '{$_SESSION['kink']}'";
}
$new_result = array();
$cond = null;
$site_desig_cond = null;
if(!empty($_SESSION['site_desig']))
{
$site_desig_cond = " and a.site_desig = '{$_SESSION['site_desig']}'";
}
if(!empty($_POST['media_filter'])){$media_filter = $_POST['media_filter'];}
elseif(!empty($_GET['media_filter'])){$media_filter = $_GET['media_filter'];}
if($media_filter == 'a')
{
$cond = " and (a.media = 'P' or a.media = 'V') ";
}
elseif($media_filter == 'V')
{
$cond = " and a.media = 'V'";
}
elseif($media_filter == 'P')
{
$cond = " and a.media = 'P'";
}
$query = "
select SQL_CALC_FOUND_ROWS a.asset_id, a.media, a.asset_title, a.asset_text, a.p_date, a.site_id, a.hosted_url, a.site_desig
from mod2asset as m2v, asset as a
$join
where m2v.asset_id = a.asset_id and a.live = 'y' and n2a.niche_id = '{$_SESSION['kink']}'
and a.p_date <= '".date('Y-m-d')."' $cond $site_desig_cond
group by a.asset_id
order by a.p_date desc
limit $pg, " . ITEMS_PER_PAGE."";
$assets = $connection->query($query);
$count = $connection->query("SELECT FOUND_ROWS() AS `count`");
$new_result = array();
foreach($assets as $key => $element) {
$new_result[$key] = $element;
if(is_numeric($new_result[$key]['site_id']) && $new_result[$key]['site_id'] != 0) {
$studio = $connection->query("SELECT * from sites where site_id = {$new_result[$key]['site_id']}");
if(!empty($studio)) {
$new_result[$key]['site_name'] = $studio[0]['site_name'];
$new_result[$key]['site_link'] = $studio[0]['site_link'];
} else {
$new_result[$key]['site_name'] = 'Not Set';
$new_result[$key]['site_link'] = '#';
}
} else {
$new_result[$key]['studio'] = 'Not Set';
$new_result[$key]['studio_link'] = '#';
}
}
$assets = $new_result;
if($count[0]['count'] > ITEMS_PER_PAGE) {
$pagination['pages'] = ceil($count[0]['count'] / ITEMS_PER_PAGE);
$pagination['page'] = $page;
$pagination['links'] = 4;
$pagination['link'] = "?content=kink&kink=".$_SESSION['kink']."&media_filter=$media_filter&page=";
}
?>