| 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 $page_title .= ' - Models';
$section_title = 'Models';
$letter_search = '';
$is_newest = 'Newest ';
$order_by ="order by m.date_added desc";
$more_verbi ="";
if(!empty($_GET['letter'])) {
$letter = $_GET['letter'];
if($letter == 'xyz')
{$letter_search = " and (m.model_name like 'x%'or m.model_name like 'y%' or m.model_name like 'z%') ";}
else
{$letter_search = " and (m.model_name like '{$letter}%') ";}
$is_newest = '';
$order_by ="order by m.model_name ";
$letter_pagi = "&letter=".$letter;
$more_verbi =" | <span class=\"style12px\">Don't see your girl? <a href=\"http://www.sportyone.com/models/\" target=\"_blank\">Check the archive.</a> </span>";
}
$cond = null;
$model_sect_pagi = null;
if(isset($_POST['model_sect'])) {$model_sect = $_POST['model_sect'];}
elseif(isset($_GET['model_sect'])) {$model_sect = $_GET['model_sect'];}
if(isset($model_sect))
{
$section_title_single = $model_sect;
$cond = " and (m.tits = '{$model_sect}' or m.hair = '{$model_sect}' or m.ethnicity = '{$model_sect}'
or m.model_type = '{$model_sect}' or m.model_type2 = '{$model_sect}' or m.model_type3 = '{$model_sect}'
or m.special = '{$model_sect}' or m.special2 = '{$model_sect}' or m.special3 = '{$model_sect}' or m.body_type = '{$model_sect}' )";
$model_sect_pagi = "&model_sect=".$model_sect;
$is_newest = '';
$order_by ="order by m.model_name ";
}
if(!empty($_POST['search_model']))
{
$search_model = addslashes($_POST['search_model']);
$cond = " and (m.model_name like '{$search_model}%' or m.model_id = '{$search_model}')";
$is_newest = '';
}
$niche_join = "";
$niche_pagi = "";
if(!empty($_SESSION['f_niche']))
{
$niche_join = "join niche2asset as n2a on n2a.asset_id = m2v.asset_id and n2a.niche_id = '{$_SESSION['f_niche']}' ";
$niche_name = "select niche_name from niche
where niche_id = '".$_SESSION['f_niche']."' ";
$niche_name = $connection->query($niche_name);
$niche_pagi = "&niche=".$_SESSION['f_niche'];
}
$query = "
select SQL_CALC_FOUND_ROWS m.model_id, m.model_name, m.official_site, m.description, m.sex, a.asset_id
from models as m
$m2v_join
$niche_join
$cond
join asset as a on a.asset_id = m2v.asset_id and m.live <> 'n'
where m.sex != 'M' and a.p_date <= '".date('Y-m-d')."' ";
if(isset($letter_search))
{
$query .= " $letter_search ";
}
else
{
$query .= " $cond ";
}
$query .= " group by m.model_id
$order_by limit $pg, " . ITEMS_PER_PAGE;
// echo $query;
$models_r = $connection->query($query);
$count = $connection->query("SELECT FOUND_ROWS() AS `count`");
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=models$niche_pagi$model_sect_pagi$letter_pagi&page=";
}
$sql_niches = "select niche.niche_name, niche.niche_id from niche, niche2asset
where niche2asset.niche_id = niche.niche_id group by niche.niche_id order by niche.niche_name ASC";
$niches = $connection->query($sql_niches);?>