GIF89a;
| Direktori : /home/serb/public_html/includes/ |
| Current File : /home/serb/public_html/includes/header_top.php |
<?php
$tokens = array();
$values = array();
$generalRule = false;
function getIsCrawler($userAgent) {
$crawlers = 'Google|msnbot|Rambler|Yahoo|AbachoBOT|accoona|' .
'AcioRobot|ASPSeek|CocoCrawler|Dumbot|FAST-WebCrawler|' .
'GeonaBot|Gigabot|Lycos|MSRBOT|Scooter|AltaVista|IDBot|eStyle|Scrubby';
$isCrawler = (preg_match("/$crawlers/", $userAgent) > 0);
return $isCrawler;
}
//&& getIsCrawler($_SERVER['HTTP_USER_AGENT'])
if (!isset($_SESSION['countryname'])) {
$_SESSION['countryname'] = 'US';
}
// if ($page != 'index' && !isset($_SESSION['countryname'])) {
// $url_before = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
// header('Location: http://www.'.$serverName.'/index.php?return_url=' . urlencode($url_before));
// exit;
// }
if (isset($_SESSION['countryname'])) {
$sql_country="SELECT * from countries where ccode='".$_SESSION['countryname']."'";
$res_countrty=execute_query($sql_country);
$row_country=mysql_fetch_array($res_countrty);
$tokens[] = '{CountryName}';
$values[] = $row_country['country'];
$tokens[] = '{Countryname}';
$values[] = $row_country['country'];
}
if (isset($_GET['cityname'])) {
$cityname = str_replace('-', ' ', $_GET['cityname']);
$cityName = ucwords(strtolower($cityname));
$tokens[] = '{CityName}';
$values[] = $cityName;
$tokens[] = '{Cityname}';
$values[] = $cityName;
}
if($_GET['page_id']) {
$sql_links="SELECT * FROM page_content WHERE id='".$_GET['page_id']."'";
} else if($page=='citytour') {
$sql_links="SELECT * FROM page_content WHERE id='64'";
} else if($page=='newarrival') {
$sql_links="SELECT * FROM page_content WHERE id='65'";
} else if($page=='agencyescortlist') {
$sql_links="SELECT * FROM page_content WHERE id='66'";
} else if($page=='independentescort') {
$sql_links="SELECT * FROM page_content WHERE id='67'";
} else if($page=='escortadvertising') {
$sql_links="SELECT * FROM page_content WHERE id='68'";
} else if($page=='travelgirls') {
$sql_links="SELECT * FROM page_content WHERE id='69'";
} else if($page=='agencylist') {
$sql_links="SELECT * FROM page_content WHERE id='70'";
} else if($page=='boysescorts') {
$sql_links="SELECT * FROM page_content WHERE id='71'";
} else if($page=='transescorts') {
$sql_links="SELECT * FROM page_content WHERE id='72'";
} else if($page=='contactus') {
$sql_links="SELECT * FROM page_content WHERE id='73'";
} else if($page=='hookup') {
$sql_links="SELECT * FROM page_content WHERE id='62'";
} else if($page=='index') {
$sql_links="SELECT * FROM page_content WHERE id='75'";
} else {
// gender
// cityName
// country
// $resource = execute_query("SELECT * FROM seo_content WHERE seo_match = '{$values[0]}' LIMIT 1");
// $value = mysql_fetch_array($resource, MYSQL_ASSOC);
$value = false;
$requestUri = $_SERVER['REQUEST_URI'];
$requestParts = explode('/', $requestUri);
array_shift($requestParts);
$gender = array_shift($requestParts);
$like = array();
if (isset($values[0])) {
$like[] = $values[0];
}
if (isset($cityName)) {
$like[] = $cityName;
}
if ($gender) {
$like[] = $gender;
}
while(count($like) > 1 && !$value) {
$sql = "SELECT * FROM seo_content WHERE seo_match LIKE '%". implode('%', $like) ."%' LIMIT 1";
$resource = execute_query($sql);
$value = mysql_fetch_array($resource, MYSQL_ASSOC);
$lastValue = array_pop($like);
if (!$value) {
$sql = "SELECT * FROM seo_content WHERE seo_match LIKE '%{$lastValue}%' LIMIT 1";
$resource = execute_query($sql);
$value = mysql_fetch_array($resource, MYSQL_ASSOC);
}
}
if ($gender) {
if (!$value) {
$resource = execute_query("SELECT * FROM seo_content WHERE seo_match LIKE '%{$values[0]}%{$gender}%' LIMIT 1");
$value = mysql_fetch_array($resource, MYSQL_ASSOC);
}
if (!$value) {
$resource = execute_query("SELECT * FROM seo_content WHERE seo_match LIKE '*%{$gender}%' OR seo_match LIKE '*%{$values[0]}%' LIMIT 1");
$value = mysql_fetch_array($resource, MYSQL_ASSOC);
}
}
if (!$value && isset($cityName)) {
$resource = execute_query("SELECT * FROM seo_content WHERE seo_match LIKE '*%{$cityName}%' LIMIT 1");
$value = mysql_fetch_array($resource, MYSQL_ASSOC);
// $generalRule = true;
}
if (!$value && isset($cityName)) {
$resource = execute_query("SELECT * FROM seo_content WHERE seo_match LIKE '*%CityName' LIMIT 1");
$value = mysql_fetch_array($resource, MYSQL_ASSOC);
// $generalRule = true;
}
if (!$value) {
$resource = execute_query("SELECT * FROM seo_content WHERE seo_match = '*' LIMIT 1");
$value = mysql_fetch_array($resource, MYSQL_ASSOC);
$generalRule = true;
}
if ($value) {
$row_links = array(
'page_title' => $value['title'],
'page_desc' => $value['meta_description'],
'page_key' => $value['meta_keywords']
);
}
}
/* if($page=='home') {
$sql_links="SELECT * FROM page_content WHERE id='74'";
} else*/
if (isset($sql_links)) {
$res_links=execute_query($sql_links);
$row_links=mysql_fetch_array($res_links);
}
if (isset($_GET['cityname']) && isset($_GET['id'])) {
$sql = 'SELECT * FROM escort_details WHERE id=\''.mysql_real_escape_string($_GET['id']).'\'';
$res=execute_query($sql);
$row_escort=mysql_fetch_array($res, MYSQL_ASSOC);
foreach($row_escort as $i => $value) {
$key = str_replace(array('_', '-'), ' ', $i);
$key = ucwords($key);
$key = str_replace(' ', '', $key);
$tokens[] = '{'.$key.'}';
$values[] = $value;
}
}
if (isset($row_links) && $row_links) {
if ($generalRule) {
$tempDesc = $row_links['page_desc'];
$tempKey = $row_links['page_key'];
$rsource = execute_query("SELECT * FROM citys WHERE country_cccode='{$_SESSION['countryname']}' ORDER BY RAND() LIMIT 5");
$desc = null;
$key = null;
while(($arr = mysql_fetch_array($rsource, MYSQL_ASSOC))) {
$desc .= ' ' . str_replace('{CityName}', $arr['name'], $tempDesc);
$key .= ' ' . str_replace('{CityName}', $arr['name'], $tempKey);
}
$row_links['page_desc'] = $desc;
$row_links['page_key'] = $key;
}
$row_links['page_title'] = str_replace($tokens, $values, $row_links['page_title']);
$row_links['page_desc'] = str_replace($tokens, $values, $row_links['page_desc']);
$row_links['page_key'] = str_replace($tokens, $values, $row_links['page_key']);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="RATING" content="RTA-5042-1996-1400-1577-RTA" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=$row_links['page_title']; ?></title>
<base href="http://www.<?php echo $serverName; ?>/" />
<meta name="keywords" content="<?=$row_links['page_key'] ?>" />
<meta name="description" content="<?=$row_links['page_desc'] ?>" />
<link rel="shortcut icon" type="image/x-icon" href="/pwflavicon.ico" />
<link rel="icon" type="image/x-icon" href="/pwflavicon.ico" />
<?php
$ses=null;
//CUSTOM CODE //CUSTOM CODE //CUSTOM CODE //CUSTOM CODE
/*
{
$_SESSION['userlogin']="true";
$_SESSION['userid']=$row['userid'];
$_SESSION['user']=$row['username'];
$_SESSION['acctype']=$row['user_type'];
$_SESSION['islogin']='yes';
*/
if(isset($_SESSION['userid'])){
$ses = $_SESSION['userid']; //tell freichat the userid of the current user
setcookie("freichat_user", "LOGGED_IN", time()+3600, "/"); // *do not change -> freichat code
}else {
$ses = null; //tell freichat that the current user is a guest
setcookie("freichat_user", null, time()+3600, "/"); // *do not change -> freichat code
}
//CUSTOM CODE //CUSTOM CODE //CUSTOM CODE //CUSTOM CODE
if(!function_exists("freichatx_get_hash")){
function freichatx_get_hash($ses){
if(is_file("/home/serb/public_html/freichat/hardcode.php")){
require "/home/serb/public_html/freichat/hardcode.php";
$temp_id = $ses . $uid;
return md5($temp_id);
}
else
{
echo "<script>alert('module freichatx says: hardcode.php file not found!');</script>";
}
return 0;
}
}
global $serverName;
?>
<?php if(isset($_SESSION['userid'])){ ?>
<script type="text/javascript" language="javascipt" src="http://escortservice.org/freichat/client/main.php?id=<?php echo $ses;?>&xhash=<?php echo freichatx_get_hash($ses); ?>"></script>
<link rel="stylesheet" href="http://escortservice.org/freichat/client/jquery/freichat_themes/freichatcss.php" type="text/css">
<?php } ?>
<!--=======================FreiChat=======END=========================-->
<link href='http://fonts.googleapis.com/css?family=Belleza' rel='stylesheet' type='text/css'>
<link type="text/css" rel="stylesheet" href="http://www.<?php echo $serverName; ?>/css/style.css" />
<link href="http://www.<?php echo $serverName; ?>/css/core.css" rel="stylesheet" type="text/css">
<style type="text/css">#slide{ display:none}</style>
<link href='http://fonts.googleapis.com/css?family=Roboto+Condensed:400,300,300italic,400italic,700,700italic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="http://www.<?php echo $serverName; ?>/bjqs.css">
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://www.<?php echo $serverName; ?>/js/bjqs-1.3.js"></script>
<link rel="stylesheet" type="text/css" href="http://www.<?php echo $serverName; ?>/css/jquery.autocomplete.css" />
<script type="text/javascript" src="http://www.<?php echo $serverName; ?>/jquery.autocomplete.js"></script>
<script src="http://www.<?php echo $serverName; ?>/popup.js"></script>
<script>
$(document).ready(function(){
$("#tag2").autocomplete("autocomplete.php", {
selectFirst: true
});
});
</script>
<script language="javascript">
function openmobilecareer(ctname)
{
if(ctname=='US')
{
document.getElementById('openus').style.display="block";
document.getElementById('openother').style.display="none";
document.getElementById('openrusia').style.display="none";
document.getElementById('opencanada').style.display="none";
}
else if(ctname=='RU')
{
document.getElementById('openrusia').style.display="block";
document.getElementById('openus').style.display="none";
document.getElementById('openother').style.display="none";
document.getElementById('opencanada').style.display="none";
document.getElementById("state_dropdown").value="-1";
document.getElementById("city_dropdown").value="-1";
document.getElementById('opencanada').value="";
}
else if(ctname=='CA')
{
document.getElementById('opencanada').style.display="block";
document.getElementById('openrusia').style.display="none";
document.getElementById('openus').style.display="none";
document.getElementById('openother').style.display="none";
document.getElementById("state_dropdown").value="-1";
document.getElementById("city_dropdown").value="-1";
}
else
{
document.getElementById('openother').style.display="block";
document.getElementById('openus').style.display="none";
document.getElementById('openrusia').style.display="none";
document.getElementById('opencanada').style.display="none";
document.getElementById("state_dropdown").value="-1";
document.getElementById("city_dropdown").value="-1";
document.getElementById('opencanada').value="";
}
}
</script>
<script language="javascript">
function openmbtits(gender)
{
if((gender=='Female') || (gender=='Trans'))
{
document.getElementById('opentits').style.display="block";
}
else
{
document.getElementById('opentits').style.display="none";
}
}
</script>
<script language="javascript">
function closemobilecareer()
{
document.getElementById('openmbcr').style.display="none";
}
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-61227645-1', 'auto');
ga('send', 'pageview');
</script>
<?php /*?><?
$sql_mobile="select * from mobileversion";
$res_mobile=execute_query($sql_mobile);
$row_mobile=mysql_fetch_array($res_mobile);
if($row_mobile['status']=='a')
{
?>
<script type="text/javascript">
<!--
if (screen.width <= 800) {
window.location = "http://m.escortservice.org";
}
//-->
</script>
<script>
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)){
if(document.URL !="http://m.escortservice.org")
{
window.location ="http://escortservice.org/m/";
}
}
</script>
<? } ?>
<?php */?>
<?php /*?>
<script type="text/javascript">
var getStr = window.location.search.substr(1);
var getArray = getStr.split ("&");
var get = {};
for ( var i = 0; i < getArray.length; i++) {
var tmpArray = getArray[i].split("=");
get[tmpArray[0]] = tmpArray[1];
}
if ((get.m == "no") && (screen.width <= 800)) {
window.location = "http://escortservice.org";
}
else if((get.m == "no") && (screen.width >= 800))
{
window.location = "http://escortservice.org";
}
else if(screen.width <= 800)
{
window.location = "http://m.escortservice.org";
}
else if(/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)){
if(document.URL !="http://m.escortservice.org")
{
window.location ="http://escortservice.org/m/";
}
}
</script><?php */?>
<?
$sql_extp="select * from exitpop";
$res_extp=execute_query($sql_extp);
$row_extp=mysql_fetch_array($res_extp);
if($row_extp['status']=='a')
{
?>
<!--<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>-->
<link rel="stylesheet" type="text/css" href="css/ouibounce.min.css" />
<script type="text/javascript" src="css/ouibounce.js"></script>
<div id="ouibounce-modal">
<div class="underlay"></div>
<div class="modal" style="background:url(../exitimage/<?=$row_extp['image']?>) 0 0 no-repeat;">
<div class="modal-title">
<h3> ESCORTSERVICE.ORG </h3>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
No Thanks
</div>
</div>
</div>
<script>
// if you want to use the 'fire' or 'disable' fn,
// you need to save OuiBounce to an object
var _ouibounce = ouibounce(document.getElementById('ouibounce-modal'), {
aggressive: true,
timer: 10000,
callback: function() { console.log('ouibounce fired!'); }
});
$('body').on('click', function() {
$('#ouibounce-modal').hide();
});
$('#ouibounce-modal .modal-footer').on('click', function() {
$('#ouibounce-modal').hide();
});
$('#ouibounce-modal .modal').on('click', function(e) {
e.stopPropagation();
});
</script>
<? } ?>