|
session_start(); if(!$_SESSION['visitor']) { session_register('visitor'); $_SESSION['visitor'] = true; } include("functions.inc.php"); /*if(AFROL_MAP_URL) { $variables = explode('/',$_SERVER['PATH_INFO']); $country_name=strtolower($variables[1]); $subpage=strtolower($variables[2]); } else { $country_name= $_GET['countryID']; }*/ $country_name= $_GET['country']; $subpage = $_GET['subpage']; if(!$country_name) { require "country_pages.php"; exit(); } $country_list=$db->get_results("SELECT id, name_en, name_es FROM countries"); foreach($country_list as $country) { if(naming_file($country->name_en)==$country_name || naming_file($country->name_es)==$country_name) { $idcountry=$country->id; break; } } if($subpage=="news"||$subpage=="noticias") { require("country_news.php"); exit(); } if($subpage=="archivo" ||$subpage=="archivos"|| $subpage=="archive" ||$subpage=="archives") { require("country_archive.php"); exit(); } $article=new article($db,$idcountry,$groupby='country'); $country_name=$article->country_name; $folders=array(array("countries","countries"),naming_file($country_name)); $title=$article->country_name; // Parse Countries & Categories for OpenX $ads_variables['countries']=naming_file($country_name); if (substr($_SERVER['REQUEST_URI'],0,3)=='/es') { $ads_variables['language']="es"; } else { $ads_variables['language']="en"; } site_header($db,$title=$article->country_name,$folders); if(!$article->results) not_found(); //$ads=get_ads($db,$size="250",$source="countries",$idcountry); ?>