1) { $ctryiss=explode("'", $ctrys[1]); $huhbits=explode($ctryiss[0] . "", str_replace("","",$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=[]; $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 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 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=countryids[choice] + '-' + currencys[choice]; document.getElementById('icurrency').value=''; setTimeout(fit, 1500); } function fit() { document.getElementById('icurrency').focus(); } \n"; $seloneis=""; $divis="
"; 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; $seloneis=str_replace("", "", $seloneis); $divis=str_replace("", $outcurrency . "", $divis); $num++; } } echo str_replace("", $divis . "", str_replace("", "" . $scriptis . "", str_replace("