', print_r($_SESSION), ''; $lngModule = "INDEX_PAGE"; $lngFile = basename(__FILE__); $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://"; $_SESSION['protocol'] = $protocol; // GET THE IP if(!isset($_SESSION['visitor_ip'])) { // Get client's IP address if (isset($_SERVER['HTTP_CLIENT_IP']) && array_key_exists('HTTP_CLIENT_IP', $_SERVER)) { $visitor_ip = $_SERVER['HTTP_CLIENT_IP']; } elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER)) { $visitor_ips = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']); $visitor_ips = array_map('trim', $visitor_ips); $visitor_ip = $visitor_ips[0]; } else { $visitor_ip = $_SERVER['REMOTE_ADDR'] ? $_SERVER['REMOTE_ADDR'] : '0.0.0.0'; } $visitor_ip = filter_var($visitor_ip, FILTER_VALIDATE_IP); $visitor_ip = ($visitor_ip === false) ? '0.0.0.0' : $visitor_ip; $_SESSION['visitor_ip'] = $visitor_ip; } //$screenshot_url = 'https://images.thumbshots.com/image.aspx?cid=wAQzqmGmx3A%3d&v=1&'; $screenshot_url = 'https://cypruspics.com/thumbshot/?'; function gzip_PrintFourChars($Val) { for ($i = 0; $i < 4; $i ++) { echo chr($Val % 256); $Val = floor($Val / 256); } } function print_gzipped_page($ppp_contents, $params) { global $protocol, $line_domain, $ultra_domainname, $meta_og, $og_lang, $lang2iso, $_SID, $full_uri; if( headers_sent() ){ $encoding = false; }elseif( strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'x-gzip') !== false ){ $encoding = 'x-gzip'; }elseif( strpos($_SERVER['HTTP_ACCEPT_ENCODING'],'gzip') !== false ){ $encoding = 'gzip'; }else{ $encoding = false; } /**** Prepare contents ********/ $contents = $ppp_contents; $send404 = false; if(isset($params['send404']) && intval($params['send404']) == 1) { header("HTTP/1.0 404 Not Found"); // Empty the contents and refill with the 404 page $contents = null; $url = $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; $part = str_replace($full_uri, "", $url); $contents = file_get_contents(__DIR__ . "/modules/404/index.html"); $contents = str_replace("{{HOMEPAGE}}", $full_uri, $contents); $contents = str_replace("{{WEBSITE}}", $line_domain['domainname'], $contents); $contents = str_replace("{{WEBSITE_TITLE}}", stripslashes($line_domain['title_en']), $contents); $contents = str_replace("{{URL_PART}}", "/$part", $contents); $send404 = true; } //echo '
', print_r($params), ''; if(isset($params) && count($params)>0 && !$send404) { if(isset($params['stylesheet_file'])) { $contents = str_replace("@STYLESHEET_FILE@", $params['stylesheet_file'], $contents); } if(isset($params['javascript_file'])) { $contents = str_replace("@JAVASCRIPT_FILE@", $params['javascript_file'], $contents); } if(isset($params['api_load']) && count($params['api_load'])>0) { if(isset($params['api_load']['file']) && count($params['api_load']['file']) > 0) { $insert_js_file_load = ""; foreach ($params['api_load']['file'] as $i=>$js_file_load) { $insert_js_file_load .= '' . "\n"; } $contents = str_replace("", $insert_js_file_load, $contents); } if(isset($params['api_load']['static']) && count($params['api_load']['static']) > 0) { $insert_js_static_load = ''; $contents = str_replace("", $insert_js_static_load, $contents); } } // Update ROOT_URL $contents = str_replace("[/ROOT_URL/]", $params['root_url'], $contents); // Addition to Page Title $_webpagetitle = ''; if(isset($params['webpagetitle'])) $_webpagetitle = $params['webpagetitle']; $contents = str_replace("[/webpagetitle/]", $_webpagetitle, $contents); $_robots = ''; if(isset($params['robots'])) { $_robots = ''; $contents = str_replace("", $_robots, $contents); } $_metadescription = ''; if(isset($params['metadescription'])) $_metadescription = $params['metadescription']; $contents = str_replace("[/metadescription/]", $_metadescription, $contents); $_keywords = ''; if(isset($params['keywords'])) { $_keywords = $params['keywords']; $contents = str_replace("[/keywords/]", $_keywords, $contents); } $_openx_zone = ''; if(isset($params['openx_zone'])) { $_openx_zone = $params['openx_zone']; foreach ($_openx_zone as $ox_i => $ox_data) { $ox_z_id = $ox_data['openx_zone_id']; $ox_z_code = stripslashes($ox_data['openx_zone_code']); $contents = str_replace("[/$ox_z_id/]", $ox_z_code, $contents); } } $_canonical_link = ''; if(isset($params['canonical_link'])) { $_canonical_link = trim($params['canonical_link']); $contents = str_replace("", '', $contents); } $_prev_page = ''; if(isset($params['prev_page'])) { $_prev_page = trim($params['prev_page']); $contents = str_replace("", '', $contents); } $_next_page = ''; if(isset($params['next_page'])) { $_next_page = trim($params['next_page']); $contents = str_replace("", '', $contents); } // Open Graph Implementation $og_meta = ''; if (isset($meta_og['fb:admins']) && $meta_og['fb:admins'] != "") { $og_meta .= ''; } if (isset($meta_og['fb:app_id']) && $meta_og['fb:app_id'] != "") { $og_meta .= ''; } $og_url = ($_canonical_link != "") ? $_canonical_link : $protocol.$ultra_domainname . $_SERVER['REQUEST_URI']; $og_url = str_replace(array( 'remove_cache=all', 'clean_cache=1', 'yp_renew=1', 'bl_renew=1', ), '', $og_url); $og_url = rtrim($og_url, '?'); $og_meta .= ''; $og_meta .= ''; $og_meta .= ''; if (isset($meta_og['description'])) { $og_meta .= ''; } else { $og_meta .= ''; } if (isset($meta_og['type']) && trim($meta_og['type'] != "")) { $og_meta .= ''; } else { $og_meta .= ''; } if (isset($meta_og['image'])) { if (is_array($meta_og['image'])) { foreach ($meta_og['image'] as $og_image) { if ($og_image != "") $og_meta .= ''; } } else { if ($meta_og['image'] != "") { $og_meta .= ''; } else { $og_meta .= ''; } } } else { $og_meta .= ''; } $og_meta .= ''; $contents = str_replace("", $og_meta, $contents); } else { //echo '
|
" . $qmc . "
aaa "; $rmc = mysql_query($qmc) or die("$qmc".mysql_error()); if($rmc && mysql_num_rows($rmc)>0) { $rowmc = mysql_fetch_array($rmc); $mc_module_id = $rowmc['module_id']; $mc_module_params = $rowmc['module_params']; if($mc_module_params && !empty($mc_module_params) ) { $module_params = unserialize(base64_decode($mc_module_params)); //print_r($module_params); } } else { $send404 = true; } } if(is_dir( "$modules_path/$module_page")) { $include_page = "$modules_path/$module_page/".$module_page.".php"; if(isset($_REQUEST['action'])) { $action = $_REQUEST['action']; if(file_exists("$modules_path/$module_page/".$action.".php")) { $include_page = "$modules_path/$module_page/".$action.".php"; $have_middle_content = 1; } } } else { if(file_exists("$modules_path/".$module_page.".php")) { $include_page = "$modules_path/".$module_page.".php"; $have_middle_content = 1; } } } if($have_middle_content == 0) { $include_page = $general_path."middle_content.php"; } if(!isset($include_page) || !file_exists($include_page)){ $include_page = $general_path."middle_content.php"; } if(isset($_REQUEST['mreg']) || (isset($_SESSION[$_SID]['auth_id']) && intval($_SESSION[$_SID]['auth_id']) > 0 && isset($_SESSION[$_SID]['member_id'])) ) { if(isset($_SESSION[$_SID]['member_id']) && intval($_SESSION[$_SID]['member_id']) > 0) { $my_account_menu_path = $modules_path."/my_account/my_account_menu.php"; //echo $my_account_menu_path; if(file_exists($my_account_menu_path)) { include_once($my_account_menu_path); $user_menu_included = true; } } else { if(isset($_SESSION[$_SID]['auth_id']) && intval($_SESSION[$_SID]['auth_id']) > 0) { // } else { //$logmsg = ' ' . t_("Ooops! This page requires authentication!") . ' ';
//$logmsg = '' . t_("You are not logged in. Please login or signup in order to access this page.") . ' ' . t_("Ooops! This page requires authentication!") . ' ';
?>
', var_export($_SESSION, true), '';
}
}
}
if(!isset($send404) || !$send404) {
if(isset($logmsg) && trim($logmsg) != "") {
echo $logmsg;
}
else {
if(file_exists($include_page)) {
include($include_page);
}
}
if(isset($module_params)) {
unset($module_params);
}
}
else {
include("$modules_path/404/404.php");
}
?>
' . t_("Some errors occured. PLEASE TRY TO LOGIN AGAIN!.") . ' |
|