BahamasNassau ... thanks //$capbits=@file_get_contents("https://www.countries-ofthe-world.com/capitals-of-the-world.html"); $capbits=" CountryCapital city A AfghanistanKabul AlbaniaTirana AlgeriaAlgiers AndorraAndorra la Vella AngolaLuanda Antigua and BarbudaSaint John's ArgentinaBuenos Aires ArmeniaYerevan AustraliaCanberra AustriaVienna AzerbaijanBaku B BahamasNassau BahrainManama BangladeshDhaka BarbadosBridgetown BelarusMinsk BelgiumBrussels BelizeBelmopan BeninPorto-Novo BhutanThimphu BoliviaLa Paz (administrative), Sucre (judicial) Bosnia and HerzegovinaSarajevo BotswanaGaborone BrazilBrasilia BruneiBandar Seri Begawan BulgariaSofia Burkina FasoOuagadougou BurundiBujumbura C Cabo VerdePraia CambodiaPhnom Penh CameroonYaounde CanadaOttawa Central African RepublicBangui ChadN'Djamena ChileSantiago ChinaBeijing ColombiaBogotá ComorosMoroni Democratic Republic of the CongoKinshasa Republic of the CongoBrazzaville Costa RicaSan Jose Cote d'IvoireYamoussoukro CroatiaZagreb CubaHavana CyprusNicosia Czech RepublicPrague D DenmarkCopenhagen DjiboutiDjibouti (city) DominicaRoseau Dominican RepublicSanto Domingo E EcuadorQuito EgyptCairo El SalvadorSan Salvador Equatorial GuineaMalabo EritreaAsmara EstoniaTallinn EthiopiaAddis Ababa F FijiSuva FinlandHelsinki FranceParis G GabonLibreville GambiaBanjul GeorgiaTbilisi GermanyBerlin GhanaAccra GreeceAthens GrenadaSaint George's GuatemalaGuatemala City GuineaConakry Guinea-BissauBissau GuyanaGeorgetown H HaitiPort-au-Prince HondurasTegucigalpa HungaryBudapest I IcelandReykjavik IndiaNew Delhi IndonesiaJakarta IranTehran IraqBaghdad IrelandDublin IsraelJerusalem ItalyRome J JamaicaKingston JapanTokyo JordanAmman K KazakhstanAstana KenyaNairobi KiribatiSouth Tarawa KosovoPristina KuwaitKuwait City KyrgyzstanBishkek L LaosVientiane LatviaRiga LebanonBeirut LesothoMaseru LiberiaMonrovia LibyaTripoli LiechtensteinVaduz LithuaniaVilnius LuxembourgLuxembourg "; function yourflag($incn) { global $iso_country_codes, $foundcc; for ($jk=1; $jk 1) { $ctryiss=explode("'", $ctrys[1]); $huhbits=explode($ctryiss[0] . "", str_replace("
CountryCapital city
M
MacedoniaSkopje
MadagascarAntananarivo
MalawiLilongwe
MalaysiaKuala Lumpur
MaldivesMale
MaliBamako
MaltaValletta
Marshall IslandsMajuro
MauritaniaNouakchott
MauritiusPort Louis
MexicoMexico City
MicronesiaPalikir
MoldovaChisinau
MonacoMonaco
MongoliaUlaanbaatar
MontenegroPodgorica
MoroccoRabat
MozambiqueMaputo
Myanmar (Burma)Naypyidaw
N
NamibiaWindhoek
NauruYaren District
NepalKathmandu
NetherlandsAmsterdam
New ZealandWellington
NicaraguaManagua
NigerNiamey
NigeriaAbuja
North KoreaPyongyang
NorwayOslo
O
OmanMuscat
P
PakistanIslamabad
PalauNgerulmud
PalestineRamallah
PanamaPanama City
Papua New GuineaPort Moresby
ParaguayAsunción
PeruLima
PhilippinesManila
PolandWarsaw
PortugalLisbon
Q
QatarDoha
R
RomaniaBucharest
RussiaMoscow
RwandaKigali
S
Saint Kitts and NevisBasseterre
Saint LuciaCastries
Saint Vincent and the GrenadinesKingstown
SamoaApia
San MarinoSan Marino
Sao Tome and PrincipeSão Tomé
Saudi ArabiaRiyadh
SenegalDakar
SerbiaBelgrade
SeychellesVictoria
Sierra LeoneFreetown
SingaporeSingapore
SlovakiaBratislava
SloveniaLjubljana
Solomon IslandsHoniara
SomaliaMogadishu
South AfricaPretoria (administrative), Cape Town (legislative), Bloemfontein (judicial)
South KoreaSeoul
South OssetiaTskhinvali
South SudanJuba
SpainMadrid
Sri LankaSri Jayawardenepura Kotte
SudanKhartoum
SurinameParamaribo
SwazilandMbabane
SwedenStockholm
SwitzerlandBern
SyriaDamascus
T
TaiwanTaipei
TajikistanDushanbe
TanzaniaDodoma
ThailandBangkok
Timor-LesteDili
TogoLomé
TongaNukuʻalofa
Trinidad and TobagoPort of Spain
TunisiaTunis
TurkeyAnkara
TurkmenistanAshgabat
TuvaluFunafuti
U
UgandaKampala
UkraineKyiv
United Arab EmiratesAbu Dhabi
United KingdomLondon
United States of AmericaWashington, D.C.
UruguayMontevideo
UzbekistanTashkent
V
VanuatuPort Vila
Vatican City (Holy See)Vatican City
VenezuelaCaracas
VietnamHanoi
Y
YemenSana'a
Z
ZambiaLusaka
ZimbabweHarare
","",$curbits)); if (sizeof($huhbits) == 1) $huhbits=explode("(" . $ctryiss[0], str_replace("","",$curbits)); if (sizeof($huhbits) == 1) $huhbits=explode($ctryiss[0] . "/", str_replace("","",$curbits)); if (sizeof($huhbits) > 1) { $ids=explode(' id="', $huhbits[0]); if (sizeof($ids) > 1) { $thiscode=explode('"', $ids[-1 + sizeof($ids)])[0]; } $posthuhbits=explode("", $huhbits[1]); if (sizeof($posthuhbits) > 1) { $bposthuhbits=explode("", $bposthuhbits); $thiscur=str_replace('.', '_', str_replace(' ', '_', str_replace('"', '_', str_replace("'", "_", str_replace("'", "`", $preposthuhbits[0] . " (" . str_replace("\n","",str_replace("","",explode("<",$posthuhbits[2])[0])) . ")"))))); $retcap=str_replace("title='" . $ctryiss[0] . "", "title='" . str_replace("'", "`", $preposthuhbits[0] . " (" . str_replace("\n","",str_replace("","",explode("<",$posthuhbits[2])[0])) . ")") . "", $cincountry); } } } return $retcap; } $num=0; $countries=[]; $currencys=[]; $countryids=[]; $countryccs=[]; $countrycodes=[]; $htmlis="

Country Currency Quiz

Score: 0 Goes: 0

RJM Programming

November, 2016

Country?
"; $scriptis="Country Currency Quiz \n \n \n var choice=-1, score=0, goes=0, num=0, currencys=[], countries=[], countryids=[], countrycodes=[]; function why(owhy) { if (1 == 1) { return owhy; } else { return owhy.split('(')[0].split('-')[0].replace(/_/g,' ').replace(/-/g,' '); } } function ourcomp(c1,c2) { var xc1=c1.replace(/_/g,' ').replace(/`/g,' '); var xc2=c2.split('-')[1].replace(/_/g,' ').replace(/`/g,' '); if (xc2.toLowerCase().indexOf(xc1.toLowerCase()) != -1 && xc1.toLowerCase().length > 2) { return true; } return false; } \n function precheck() { if (document.getElementById('countrylist')) { if (document.getElementById('country').value != '') { check(document.getElementById('country')); } } } \n function check(inv) { if (inv.value != '') { var suffix=''; goes++; if (ourcomp(inv.value,document.getElementById('country').value)) { score++; } else { suffix=' The country ' + document.getElementById(countryids[choice]).id.replace(/_/g,' ') + ' (' + countrycodes[choice] + ') represented by has the currency ' + document.getElementById(countryids[choice]).title; } document.getElementById('score').innerHTML='Score: ' + score + ' Goes: ' + goes + suffix; choose(); } } \n function choose() { choice = Math.floor(Math.random() * num); document.getElementById('country').value=why(countryids[choice] + '-' + currencys[choice]); document.getElementById('icurrency').value=''; setTimeout(fit, 1500); } function fit() { if (!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) || 8 == 8) { document.getElementById('icurrency').focus(); } } \n"; $scriptis="Country Currency Quiz \n \n \n var choice=-1, score=0, goes=0, num=0, currencys=[], countries=[], countryids=[], countryccs=[], countrycodes=[]; function why(owhy) { if (1 == 1) { return owhy; } else { return owhy.split('(')[0].split('-')[0].replace(/_/g,' ').replace(/-/g,' '); } } function ourcomp(c1,c2) { var xc1=c1.replace(/_/g,' ').replace(/`/g,' '); var xc2=c2.split('-')[1].replace(/_/g,' ').replace(/`/g,' '); if (xc2.toLowerCase().indexOf(xc1.toLowerCase()) != -1 && xc1.toLowerCase().length > 2) { return true; } return false; } \n function precheck() { if (document.getElementById('countrylist')) { if (document.getElementById('country').value != '') { check(document.getElementById('country')); } } } \n function check(inv) { if (inv.value != '') { var suffix=''; goes++; if (ourcomp(inv.value,document.getElementById('country').value)) { score++; } else { suffix=' The country ' + document.getElementById(countryids[choice]).id.replace(/_/g,' ') + ' (' + countrycodes[choice] + ') represented by ' + document.getElementById(countryids[choice]).innerHTML + ' has the currency ' + document.getElementById(countryids[choice]).title; } document.getElementById('score').innerHTML='Score: ' + score + ' Goes: ' + goes + suffix; choose(); } } \n function choose() { choice = Math.floor(Math.random() * num); document.getElementById('country').value=why(countryids[choice] + '-' + currencys[choice]); document.getElementById('icurrency').value=''; setTimeout(fit, 1500); } function fit() { if (!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) || 8 == 8) { document.getElementById('icurrency').focus(); } } \n"; if ($isSafari) { $seloneis=""; } else { $seloneis=""; } $divis="
"; $ctysarr=explode("
", $capbits); if (sizeof($ctysarr) > 1) { for ($ihj=1; $ihj','',str_replace('','',$ctysarr[$ihj]))); if (yourflag($postbits[0]) != '') { $idis=countryid($postbits[0]); $outcurrency=mapcurrency(""); if ($outcurrency != "") { $countries[$num]=$postbits[0]; $scriptis=str_replace("", " countries.push(\"" . str_replace("_", " ", $postbits[0]) . "\"); countryids.push(\"" . $idis . "\"); countryccs.push(\"" . $foundcc . "\"); countrycodes.push(\"" . $thiscode . "\"); currencys.push(\"" . $thiscur . "\"); num++; \n", $scriptis); $countryids[$num]=$idis; if ($isSafari) { $seloneis=str_replace("", "", $seloneis); } else { $seloneis=str_replace("", "", $seloneis); } $divis=str_replace("", $outcurrency . "", $divis); $num++; } } } } else { foreach (glob("../tikiwiki/img/flags/*.gif") as $filename) { $bits=explode("/", $filename); $postbits=explode(".", $bits[-1 + sizeof($bits)]); $idis=countryid($postbits[0]); $outcurrency=mapcurrency(""); if ($outcurrency != "") { $countries[$num]=$postbits[0]; $scriptis=str_replace("", " countries.push(\"" . str_replace("_", " ", $postbits[0]) . "\"); countryids.push(\"" . $idis . "\"); countrycodes.push(\"" . $thiscode . "\"); currencys.push(\"" . $thiscur . "\"); num++; \n", $scriptis); $countryids[$num]=$idis; if ($isSafari) { $seloneis=str_replace("", "", $seloneis); } else { $seloneis=str_replace("", "", $seloneis); } $divis=str_replace("", $outcurrency . "", $divis); $num++; } } } echo str_replace("", $divis . "", str_replace("", "" . $scriptis . "", str_replace("