/*-----------------------------------------------------------------
AUTHOR: Randy Schmieder, mcart
DATE: 06-Jul-06 17:40:59
PURPOSE: I display country profiles
------------------------------------------------------------------*/
/*---- Set defaults -----------------------*/
$region=any_value('region','');
$maptemp="onMouseover=\"mp.src='images/finder_{::::region::::}.gif'\" onMouseout=\"mp.src='images/finder_{::::region::::}.gif'\" href=\"index.php?what=country®ion={::::region::::}\" ";
function _fill($str,$val) {/*if(!$val) $val='index'; */return ' '.preg_replace('/{::::(.*?)::::}/is',$val,$str);} // patch in regions
/*---- Build sidebar ----------------------*/
ob_start();
?>
=isset($_GET['region'])? '{t}Region{/t}':'{t}The World Wide Volunteer{/t}';?>
{t}Click to change region{/t}
/*---- Sidebar list of Countries ----------*/
if(!$region):?>
$curr) {
$coubyreg[$curr]=sql2array("SELECT iso3,".favlan('name','tbl_countries',1)." FROM tbl_countries WHERE region LIKE '%".left($curr,4)."%' AND wb_class IS NOT NULL ORDER BY iso_name"); extract($coubyreg[$curr]);$coubyreg[$curr]=array_combine($iso3,str_replace('-',' ',$name));}
$tmp=array(); foreach($coubyreg[$region] as $iso3=>$country) $tmp[]="".quiknav("what=country®ion={$region}&country={$iso3}",$country);
echo '
';
endif;
echo "
";
define('SIDEBAR',ob_get_clean());
/*---- Country Profile --------------------*/
if(isset($_GET['country'])):
$country=$_GET['country'];
$r=fetch_query("SELECT ".favlan('name,languages,religions,ethnicity','tbl_countries',1).",population,capital,CONCAT(currency,' (',currency_code,')') AS currency,web_domains,phone_codes,iso2,iso3,iso_name AS country FROM tbl_countries WHERE iso3=".quote_smart($country));
extract($r);
define('COUNTRY_NAME',$country); // for layout
echo
""
."
{t}Volunteerism & ICTs{/t}: $country
"
."
"
."
$country {t}at a Glance{/t}
".preg_replace('/bgcolor=".*?"/','',row2table($r,'name,country,iso2,iso3','',1)).""
."
"
."
{t}Documents{/t}:
Coming soon!"
."
{t}Get Involved with ICVolunteers' Projects in{/t} {$name}
ICVolunteers-Switzerland is the Swiss branch of ICVolunteers. Historically, the Swiss office is the cradle of the whole organization. ICVolunteers has local presence in a growing number of countries, including {$name}.
We invite you to look over what we are doing in the area.
"
."
{t}ICVolunteers Projects in{/t} $name:
".quiklatest(left($country,5),'tbl_projects',3,'htm').""
."
{t}Related News{/t}:
".strip_tags(preg_replace('/"http.*?url=(.*?)&(amp;)?cid=[^"]+"/si','"javaScript:cLeave(\'$1\')" class="external"',rss2html("http://news.google.com/news?hl=".LAN_SITE."&ned={$iso2}_{$iso2}&q=".urlencode("$name+volunteer|icvolunteers|ict")."&ie=ISO-8859-1&output=rss",3,0)),'
,,')."
"
."
"
."
";
else:
$table="tbl_pages_wwv";
if($r=fetch_query("SELECT id FROM $table WHERE code LIKE ".quote_smart("%$region%"))) extract($r);
if(!$region) $id=9;
include PAR_DIR.'pag.cus';
endif;
?>