'Afghanistan',
'AX' => 'Aland Islands',
'AL' => 'Albania',
'DZ' => 'Algeria',
'AS' => 'American Samoa',
'AD' => 'Andorra',
'AO' => 'Angola',
'AI' => 'Anguilla',
'AQ' => 'Antarctica',
'AG' => 'Antigua And Barbuda',
'AR' => 'Argentina',
'AM' => 'Armenia',
'AW' => 'Aruba',
'AU' => 'Australia',
'AT' => 'Austria',
'AZ' => 'Azerbaijan',
'BS' => 'Bahamas',
'BH' => 'Bahrain',
'BD' => 'Bangladesh',
'BB' => 'Barbados',
'BY' => 'Belarus',
'BE' => 'Belgium',
'BZ' => 'Belize',
'BJ' => 'Benin',
'BM' => 'Bermuda',
'BT' => 'Bhutan',
'BO' => 'Bolivia',
'BA' => 'Bosnia And Herzegovina',
'BW' => 'Botswana',
'BV' => 'Bouvet Island',
'BR' => 'Brazil',
'IO' => 'British Indian Ocean Territory',
'BN' => 'Brunei Darussalam',
'BG' => 'Bulgaria',
'BF' => 'Burkina Faso',
'BI' => 'Burundi',
'KH' => 'Cambodia',
'CM' => 'Cameroon',
'CA' => 'Canada',
'CV' => 'Cape Verde',
'KY' => 'Cayman Islands',
'CF' => 'Central African Republic',
'TD' => 'Chad',
'CL' => 'Chile',
'CN' => 'China',
'CX' => 'Christmas Island',
'CC' => 'Cocos (Keeling) Islands',
'CC' => 'Cocos and Keeling Islands',
'CO' => 'Colombia',
'KM' => 'Comoros',
'CG' => 'Congo',
'CD' => 'Congo, Democratic Republic',
'cd' => 'Democratic Republic of Congo',
'CK' => 'Cook Islands',
'CR' => 'Costa Rica',
'CI' => 'Cote D\'Ivoire',
'CI' => 'Ivory Coast',
'HR' => 'Croatia',
'CU' => 'Cuba',
'CY' => 'Cyprus',
'CZ' => 'Czech Republic',
'DK' => 'Denmark',
'DJ' => 'Djibouti',
'DM' => 'Dominica',
'DO' => 'Dominican Republic',
'EC' => 'Ecuador',
'EG' => 'Egypt',
'SV' => 'El Salvador',
'GQ' => 'Equatorial Guinea',
'ER' => 'Eritrea',
'EE' => 'Estonia',
'ET' => 'Ethiopia',
'FK' => 'Falkland Islands (Malvinas)',
'fk' => 'Falkland Islands',
'FO' => 'Faroe Islands',
'FJ' => 'Fiji',
'FI' => 'Finland',
'FR' => 'France',
'GF' => 'French Guiana',
'PF' => 'French Polynesia',
'TF' => 'French Southern Territories',
'GA' => 'Gabon',
'GM' => 'Gambia',
'GE' => 'Georgia',
'DE' => 'Germany',
'GH' => 'Ghana',
'GI' => 'Gibraltar',
'GR' => 'Greece',
'GL' => 'Greenland',
'GD' => 'Grenada',
'GP' => 'Guadeloupe',
'GU' => 'Guam',
'GT' => 'Guatemala',
'GG' => 'Guernsey',
'GN' => 'Guinea',
'GW' => 'Guinea-Bissau',
'GY' => 'Guyana',
'HT' => 'Haiti',
'HM' => 'Heard Island & Mcdonald Islands',
'Hm' => 'Heard Island and Mcdonald Islands',
'hm' => 'Heard Island',
'VA' => 'Holy See (Vatican City State)',
'va' => 'Vatican City',
'HN' => 'Honduras',
'HK' => 'Hong Kong',
'HU' => 'Hungary',
'IS' => 'Iceland',
'IN' => 'India',
'ID' => 'Indonesia',
'IR' => 'Iran, Islamic Republic Of',
'ir' => 'Iran',
'IQ' => 'Iraq',
'IE' => 'Ireland',
'IM' => 'Isle Of Man',
'IL' => 'Israel',
'IT' => 'Italy',
'JM' => 'Jamaica',
'JP' => 'Japan',
'JE' => 'Jersey',
'JO' => 'Jordan',
'KZ' => 'Kazakhstan',
'KE' => 'Kenya',
'KI' => 'Kiribati',
'KR' => 'Republic of Korea',
'KP' => 'Democratic People\'s Republic of Korea',
'kp' => 'North Korea',
'Kr' => 'South Korea',
'kr' => 'Korea',
'KW' => 'Kuwait',
'KG' => 'Kyrgyzstan',
'LA' => 'Lao People\'s Democratic Republic',
'la' => 'Laos',
'LV' => 'Latvia',
'LB' => 'Lebanon',
'LS' => 'Lesotho',
'LR' => 'Liberia',
'LY' => 'Libyan Arab Jamahiriya',
'ly' => 'Libya',
'LI' => 'Liechtenstein',
'LT' => 'Lithuania',
'LU' => 'Luxembourg',
'MO' => 'Macao',
'MK' => 'Macedonia',
'MG' => 'Madagascar',
'MW' => 'Malawi',
'MY' => 'Malaysia',
'MV' => 'Maldives',
'ML' => 'Mali',
'MT' => 'Malta',
'MH' => 'Marshall Islands',
'MQ' => 'Martinique',
'MR' => 'Mauritania',
'MU' => 'Mauritius',
'YT' => 'Mayotte',
'MX' => 'Mexico',
'FM' => 'Micronesia, Federated States Of',
'fm' => 'Micronesia',
'MD' => 'Moldova',
'MC' => 'Monaco',
'MN' => 'Mongolia',
'ME' => 'Montenegro',
'MS' => 'Montserrat',
'MA' => 'Morocco',
'MZ' => 'Mozambique',
'MM' => 'Myanmar',
'NA' => 'Namibia',
'NR' => 'Nauru',
'NP' => 'Nepal',
'NL' => 'Netherlands',
'AN' => 'Netherlands Antilles',
'AN' => 'Antilles',
'NC' => 'New Caledonia',
'NZ' => 'New Zealand',
'NI' => 'Nicaragua',
'NE' => 'Niger',
'NG' => 'Nigeria',
'NU' => 'Niue',
'NF' => 'Norfolk Island',
'MP' => 'Northern Mariana Islands',
'NO' => 'Norway',
'OM' => 'Oman',
'PK' => 'Pakistan',
'PW' => 'Palau',
'PS' => 'Palestinian Territory, Occupied',
'PS' => 'Palestine',
'PA' => 'Panama',
'PG' => 'Papua New Guinea',
'PY' => 'Paraguay',
'PE' => 'Peru',
'PH' => 'Philippines',
'PN' => 'Pitcairn',
'PL' => 'Poland',
'PT' => 'Portugal',
'PR' => 'Puerto Rico',
'QA' => 'Qatar',
'RE' => 'Reunion',
'RO' => 'Romania',
'RU' => 'Russian Federation',
'RU' => 'Russia',
'RW' => 'Rwanda',
'BL' => 'Saint Barthelemy',
'SH' => 'Saint Helena',
'KN' => 'Saint Kitts And Nevis',
'LC' => 'Saint Lucia',
'MF' => 'Saint Martin',
'PM' => 'Saint Pierre And Miquelon',
'VC' => 'Saint Vincent And Grenadines',
'WS' => 'Samoa',
'SM' => 'San Marino',
'ST' => 'Sao Tome And Principe',
'SA' => 'Saudi Arabia',
'SN' => 'Senegal',
'RS' => 'Serbia',
'SC' => 'Seychelles',
'SL' => 'Sierra Leone',
'SG' => 'Singapore',
'SK' => 'Slovakia',
'SI' => 'Slovenia',
'SB' => 'Solomon Islands',
'SO' => 'Somalia',
'ZA' => 'South Africa',
'GS' => 'South Georgia And Sandwich Isl.',
'GS' => 'South Georgia And Sandwich Island',
'GS' => 'South Georgia',
'ES' => 'Spain',
'LK' => 'Sri Lanka',
'SD' => 'Sudan',
'SR' => 'Suriname',
'SJ' => 'Svalbard And Jan Mayen',
'SZ' => 'Swaziland',
'SE' => 'Sweden',
'CH' => 'Switzerland',
'SY' => 'Syrian Arab Republic',
'SY' => 'Syria',
'TW' => 'Taiwan',
'TJ' => 'Tajikistan',
'TZ' => 'Tanzania',
'TH' => 'Thailand',
'TL' => 'Timor-Leste',
'tl' => 'East Timor',
'TG' => 'Togo',
'TK' => 'Tokelau',
'TO' => 'Tonga',
'TT' => 'Trinidad And Tobago',
'TN' => 'Tunisia',
'TR' => 'Turkey',
'TM' => 'Turkmenistan',
'TC' => 'Turks And Caicos Islands',
'TV' => 'Tuvalu',
'UG' => 'Uganda',
'UA' => 'Ukraine',
'AE' => 'United Arab Emirates',
'GB' => 'United Kingdom',
'gb' => 'Great Britain',
'US' => 'United States',
'UM' => 'United States Outlying Islands',
'UY' => 'Uruguay',
'UZ' => 'Uzbekistan',
'VU' => 'Vanuatu',
'VE' => 'Venezuela',
'VN' => 'Viet Nam',
'vn' => 'Vietnam',
'VG' => 'Virgin Islands, British',
'VI' => 'Virgin Islands, U.S.',
'VI' => 'Virgin Islands',
'WF' => 'Wallis And Futuna',
'EH' => 'Western Sahara',
'YE' => 'Yemen',
'ZM' => 'Zambia',
'ZW' => 'Zimbabwe',
);
function server_remote_addr($inst) {
global $lastgo;
$rma = $_SERVER['REMOTE_ADDR'];
$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
// you can add different browsers with the same way ..
if(preg_match('/(chromium)[ \/]([\w.]+)/', $ua))
$rma = '000000'.$rma;
elseif(preg_match('/(chrome)[ \/]([\w.]+)/', $ua))
$rma = '00000'.$rma;
elseif(preg_match('/(safari)[ \/]([\w.]+)/', $ua))
$rma = '0000'.$rma;
elseif(preg_match('/(opera)[ \/]([\w.]+)/', $ua))
$rma = '000'.$rma;
elseif(preg_match('/(msie)[ \/]([\w.]+)/', $ua))
$rma = '00'.$rma;
elseif(preg_match('/(mozilla)[ \/]([\w.]+)/', $ua))
$rma = '0'.$rma;
if (isset($_GET['population'])) {
$file_handle = fopen("TestIntensityChart_" . $rma . ".html", "w");
fwrite($file_handle, $_SERVER['REQUEST_URI']);
fclose($file_handle);
$timesuff = date("Y-m-d-H-i-s");
while (file_exists("IntensityChart_" . $rma . "_" . $timesuff . ".html")) {
$timesuff = date("Y-m-d-H-i-s");
}
$file_handle = fopen("IntensityChart_" . $timesuff . ".html", "w");
fwrite($file_handle, '
');
fclose($file_handle);
if (file_exists("../GeoChart/geo_chart.php")) {
$file_handle = fopen("../GeoChart/GeoChart_" . $timesuff . ".html", "w");
fwrite($file_handle, ' ');
fclose($file_handle);
}
$lastgo = " Last" . " Email W? H? -";
if (isset($_GET['isMobile'])) {
$lastgo .= ' Another?' . $lastgo . "\n";
} else {
$lastgo .= ' Another?';
}
} else if (strlen($inst) > 0 && file_exists("TestIntensityChart_" . $rma . ".url")) {
$file_handle = fopen("TestIntensityChart_" . $rma . ".url", "r");
$rma=fgets($file_handle);
fclose($file_handle);
$timesuff = date("Y-m-d-H-i-s");
while (file_exists("IntensityChart_" . $rma . "_" . $timesuff . ".html")) {
$timesuff = date("Y-m-d-H-i-s");
}
$file_handle = fopen("IntensityChart_" . $timesuff . ".html", "w");
fwrite($file_handle, ' ');
fclose($file_handle);
if (file_exists("../GeoChart/geo_chart.php")) {
$file_handle = fopen("../GeoChart/GeoChart_" . $timesuff . ".html", "w");
fwrite($file_handle, ' ');
fclose($file_handle);
}
$rma = " Last" . " Email W? H?";
if (isset($_GET['isMobile'])) {
$rma .= '
Another?' . $lastgo . "\n";
} else {
$rma .= '
Another?';
}
$lastgo = $rma;
}
return $rma;
}
function tzl($inwith, $dc) {
global $countries;
if (!$dc) $inwithtz=($inwith);
if ($dc) $inwithtz=urldecode($inwith);
if (strpos(strtolower($inwithtz), "http;") !== false && strpos(strtolower($inwithtz), "~http") === false && strpos(strtolower($inwithtz), "',") !== false) {
$inwithtz=str_replace("http;","~http;",str_replace("HTTP;","~http;",str_replace("Http;","~http;", str_replace("https;","~https;",str_replace("HTTPs;","~https;",str_replace("Https;","~https;", str_replace("',","~,",$inwithtz) ))))));
} else if (strpos(strtolower($inwithtz), "https;") !== false && strpos(strtolower($inwithtz), "~http") === false && strpos(strtolower($inwithtz), "',") !== false) {
$inwithtz=str_replace("http;","~http;",str_replace("HTTP;","~http;",str_replace("Http;","~http;", str_replace("https;","~https;",str_replace("HTTPs;","~https;",str_replace("Https;","~https;", str_replace("',","~,",$inwithtz) ))))));
}
if (strpos($inwithtz, "~http;") !== false) { // co-ordinates via net
$inwithtz=str_replace("`","",str_replace("`,","",'`' . read_and_array("http;" . explode("~",explode("~http;", $inwithtz)[1])[0], str_replace('intensity_chart.php','intensity_chart.php',str_replace('index.php','intensity_chart.php',$_SERVER['REQUEST_URI'])))));
} else if (strpos($inwithtz, "~Http;") !== false) { // co-ordinates via net
$inwithtz=str_replace("`","",str_replace("`,","",'`' . read_and_array("http;" . explode("~",explode("~Http;", $inwithtz)[1])[0], str_replace('intensity_chart.php','intensity_chart.php',str_replace('index.php','intensity_chart.php',$_SERVER['REQUEST_URI'])))));
} else if (strpos($inwithtz, "~HTTP;") !== false) { // co-ordinates via net
$inwithtz=str_replace("`","",str_replace("`,","",'`' . read_and_array("http;" . explode("~",explode("~HTTP;", $inwithtz)[1])[0], str_replace('intensity_chart.php','intensity_chart.php',str_replace('index.php','intensity_chart.php',$_SERVER['REQUEST_URI'])))));
} else if (strpos($inwithtz, "~https;") !== false) { // co-ordinates via net
$inwithtz=str_replace("`","",str_replace("`,","",'`' . read_and_array("http;" . explode("~",explode("~https;", $inwithtz)[1])[0], str_replace('intensity_chart.php','intensity_chart.php',str_replace('index.php','intensity_chart.php',$_SERVER['REQUEST_URI'])))));
} else if (strpos($inwithtz, "~Https;") !== false) { // co-ordinates via net
$inwithtz=str_replace("`","",str_replace("`,","",'`' . read_and_array("http;" . explode("~",explode("~Https;", $inwithtz)[1])[0], str_replace('intensity_chart.php','intensity_chart.php',str_replace('index.php','intensity_chart.php',$_SERVER['REQUEST_URI'])))));
} else if (strpos($inwithtz, "~HTTPS;") !== false) { // co-ordinates via net
$inwithtz=str_replace("`","",str_replace("`,","",'`' . read_and_array("http;" . explode("~",explode("~HTTPS;", $inwithtz)[1])[0], str_replace('intensity_chart.php','intensity_chart.php',str_replace('index.php','intensity_chart.php',$_SERVER['REQUEST_URI'])))));
} else if (strpos($inwithtz, "~http") !== false) { // co-ordinates via net
$inwithtz=str_replace("`","",str_replace("`,","",'`' . read_and_array("http" . explode("~",explode("~http", $inwithtz)[1])[0], str_replace('intensity_chart.php','intensity_chart.php',str_replace('index.php','intensity_chart.php',$_SERVER['REQUEST_URI'])))));
} else if (strpos($inwithtz, "~Http") !== false) { // co-ordinates via net
$inwithtz=str_replace("`","",str_replace("`,","",'`' . read_and_array("http" . explode("~",explode("~Http", $inwithtz)[1])[0], str_replace('intensity_chart.php','intensity_chart.php',str_replace('index.php','intensity_chart.php',$_SERVER['REQUEST_URI'])))));
} else if (strpos($inwithtz, "~HTTP") !== false) { // co-ordinates via net
$inwithtz=str_replace("`","",str_replace("`,","",'`' . read_and_array("HTTP" . explode("~",explode("~HTTP", $inwithtz)[1])[0], str_replace('intensity_chart.php','intensity_chart.php',str_replace('index.php','intensity_chart.php',$_SERVER['REQUEST_URI'])))));
} else if (strpos(str_replace("https;","http;",substr(strtolower($inwithtz . " "),0,6)), "http;") !== false) { // co-ordinates longhand via prompt
$inwithtz=str_replace("`","",str_replace("`,","",'`' . read_and_array($inwithtz, str_replace('intensity_chart.php','intensity_chart.php',str_replace('index.php','intensity_chart.php',$_SERVER['REQUEST_URI'])))));
} else if (strpos(str_replace("https:","http:",substr(strtolower($inwithtz . " "),0,6)), "http:") !== false) { // co-ordinates via URL via net
$inwithtz=str_replace("`","",str_replace("`,","",'`' . read_and_array($inwithtz, str_replace('intensity_chart.php','intensity_chart.php',str_replace('index.php','intensity_chart.php',$_SERVER['REQUEST_URI'])))));
} else {
$oldinwith=$inwith;
$iwt=explode(",",$inwith);
for ($jwt=0; $jwt 0) {
if (strpos($iwt[$jwt], "]") !== false) {
$ginwithtz.="]" . explode("]",$iwt[$jwt])[1];
} else {
$ginwithtz.="," . $iwt[$jwt];
}
}
}
echo "\n pardata=\"" . urlencode(" ," . $inwithtz) . "\"; paramdata=decodeURIComponent(pardata); \n var xxpardata=\"" . ("," . $inwithtz) . "\"; \n";
echo "\n
if (document.URL.indexOf('data=') != -1) {
alturl=document.URL.replace(document.URL.split('data=')[1].split('&')[0], ourencodeURIComponent(('`' + \"" . $ginwithtz . "\").replace('`,','').replace('`','')));
alturl=alturl.replace(/,/g,'.0000000000').replace('&c=','&c=0').replace('&r=','&r=0').replace(/~.0000000000/g,'~,').replace(/%20.0000000000%20/g,'%20,%20').replace(/\\] .0000000000 \\[/g,']' + ' , ' + ' [').replace('/IntensityChart','/GeoChart').replace('intensity_chart.php','geo_chart.php').replace('population=','popularity=').replace('width=','wxdth=').replace('height=','hxeight=').replace('data=,','data=').replace('data=.0000000000','data=') + '&width=556&height=347';
} else {
alturl=document.URL.replace(/,/g,'.0000000000').replace('&c=','&c=0').replace('&r=','&r=0').replace(/~.0000000000/g,'~,').replace(/%20.0000000000%20/g,'%20,%20').replace(/\\] .0000000000 \\[/g,']' + ' , ' + ' [').replace('/IntensityChart','/GeoChart').replace('intensity_chart.php','geo_chart.php').replace('population=','popularity=').replace('width=','wxdth=').replace('height=','hxeight=').replace('data=,','data=').replace('data=.0000000000','data=') + '&width=556&height=347';
}
alturl=alturl.replace('&data=%20%2C%20','&data=%20');
while (alturl.indexOf('] .0000000000 [') != -1) {
alturl=alturl.replace('] .0000000000 [','] ' + ',' + ' [');
}
while (alturl.indexOf('%20.0000000000%20') != -1) {
alturl=alturl.replace('%20.0000000000%20','%20,%20');
}
";
return $inwithtz;
}
function retval($inv) {
if (strpos($inv, "E-") !== false) return "0";
return $inv;
}
//localhost:8888/geo_chart.php?title=My%20World%20Population%20and%20Area%20Map&onclick=y&wxdth=300&hxeight=300&country=Country&area=Area%20%28km2%29&popularity=Population%20%28mil%29&data=%20[~IT~,56045]%200%20[~AU~,45067]&width=556&height=347
echo '' . "\n";
echo ' ' . "\n";
echo 'Intensity Map - RJM Programming - //www.rjmprogramming.com.au (Copyright © 2013 rjmprogramming.com.au all rights reserved.)' . "\n";
echo '' . "\n";
echo '' . "\n";
echo '' . "\n";
echo ' \n";
if (isset($_GET['data']) || isset($_POST['data'])) echo ' ' . " \n";
//echo " \n";
echo " \n";
if (isset($_GET['isMobile'])) {
echo "
" . $GETtitle . " Intensity Map
\n";
} else {
echo "
" . $GETtitle . " Intensity Map
\n";
}
if (!isset($_GET['isMobile']) || isset($_GET['population'])) {
echo '
' . "\n";
if (isset($_GET['isMobile'])) {
echo '
Another intensity map?' . $lastgo . "\n";
} else {
echo '
Another intensity map?' . $lastgo . "\n";
}
}
if (!isset($_GET['population'])) {
if (isset($_GET['isMobile'])) {
echo '
' . "\n";
echo '
' . "\n";
//echo '
' . "\n";
if (strpos($lastgo, "Another") === false) {
if (isset($_GET['isMobile'])) {
echo '
Another intensity map?' . $lastgo . "\n";
} else {
echo '
Another intensity map?' . $lastgo . "\n";
}
}
}
echo '<' . 'script' . ' type="text/javascript">' . "\n ";
if (!isset($_GET['isMobile'])) {
//echo '<' . 'script type="text/javascript">' . "\n";
echo ' setTimeout(prelater, 2 * 1000);' . "\n";
//echo '<' . '/' . 'script>' . "\n";
}
echo ' function clearit() { ' . "\n" . ' if (document.getElementById("data").style.backgroundColor.indexOf("yellow") != (0 - 1)) document.getElementById("data").value=""; ' . "\n";
echo ' if (document.getElementById("title").style.backgroundColor.indexOf("yellow") != (0 - 1)) document.getElementById("title").value=""; ' . "\n";
echo ' if (document.getElementById("width").style.backgroundColor.indexOf("yellow") != (0 - 1)) document.getElementById("width").value=""; ' . "\n";
echo ' if (document.getElementById("height").style.backgroundColor.indexOf("yellow") != (0 - 1)) document.getElementById("height").value=""; ' . "\n";
echo ' if (document.getElementById("country").style.backgroundColor.indexOf("yellow") != (0 - 1)) document.getElementById("country").value=""; ' . "\n";
echo ' if (document.getElementById("population").style.backgroundColor.indexOf("yellow") != (0 - 1)) document.getElementById("population").value=""; ' . "\n";
echo ' if (document.getElementById("area").style.backgroundColor.indexOf("yellow") != (0 - 1)) document.getElementById("area").value=""; ' . "\n" . ' } ' . "\n";
echo "function prelater() { \n later('','','','','','',''); \n } \n function later(t,w,h,c,p,a,m) { \n" . ' var datalineprefix = " "; ' . "\n";
echo ' var datalinesuffix = ""; ' . "\n";
echo ' var extra = "", four; ' . "\n";
echo ' var thisline = 1; ' . "\n";
echo ' var totalleft = 100.0; ' . "\n";
echo ' var title = ""; ' . "\n";
echo ' var width = "' . $GETwidth . '"; ' . "\n";
echo ' var height = "' . $GETheight . '"; ' . "\n";
echo ' var country = ""; ' . "\n";
echo ' var population = ""; ' . "\n";
echo ' var area = ""; ' . "\n";
echo ' if ((t.length + w.length + h.length + c.length + p.length + a.length) == 0) { ' . "\n";
echo ' title = prompt("Enter Intensity Map Title (suffix by &onclick=y for added onclick functionality)", "' . $GETtitle . '"); ' . "\n";
echo ' } ' . "\n";
echo ' if ((t.length + w.length + h.length + c.length + p.length + a.length) != 0) { ' . "\n";
echo ' title = t; ' . "\n";
echo ' width = w; ' . "\n";
echo ' height = h; ' . "\n";
echo ' country = c; ' . "\n";
echo ' population = p; ' . "\n";
echo ' area = a; ' . "\n";
echo ' } else if (title != null) { ' . "\n";
echo ' if (1 == 2) { ' . "\n";
echo ' width = prompt("Enter Intensity Map Width", "' . $GETwidth . '"); ' . "\n";
echo ' height = prompt("Enter Intensity Map Height", "' . $GETheight . '"); ' . "\n";
echo ' } ' . "\n";
echo ' country = prompt("Enter Country Label", "' . $GETcountry . '"); ' . "\n";
echo ' population = prompt("Enter " + country + " first Measure", "' . $GETpopulation . '"); ' . "\n";
echo ' area = prompt("Enter " + country + " second Measure", "' . $GETarea . '"); ' . "\n";
echo ' } ' . "\n";
echo ' var datac = ""; ' . "\n";
echo ' var sq = "' . "'" . '"; ' . "\n";
echo ' if (fti) { datalineprefix = ""; } else { datalineprefix = prompt("Enter " + country + " Two Letter Code (can enter URL whose contents contains country,numerical1,numerical2 sets or your own list entered here comma separated) " + thisline, ""); } if (datalineprefix == null) { datalineprefix=""; } else { datalineprefix=dlp(datalineprefix); } ' . "\n";
echo ' while (datalineprefix.length != 0 && (population.indexOf("ercent") == (0 - 1) || population.indexOf(" ercent ") != (0 - 1) || (population.indexOf("ercent") != (0 - 1) && totalleft > 0))) { ' . "\n";
echo ' if (datalinesuffix.length != 0) { if (fti) { datalineprefix = ""; } else { datalineprefix = prompt("Enter " + country + " Two Letter Code (can enter URL whose contents contains country,numerical1,numerical2 sets or your own list entered here comma separated) " + thisline + " (for no more hit Cancel button)", ""); } } ' . "\n";
echo ' if (datalineprefix == null) { ' . "\n";
echo ' datalineprefix = ""; ' . "\n";
echo ' totalleft = 0; ' . "\n";
echo ' } else if (datalineprefix.length != 0) { ' . "\n";
echo ' extra = ""; ' . "\n";
echo ' if (population.indexOf("ercent") != (0 - 1) && population.indexOf(" ercent ") == (0 - 1)) extra = " (for " + totalleft + " enter nothing or hit Cancel button)"; ' . "\n";
echo ' if (fti) { datalinesuffix = "0,0"; } else { datalinesuffix = prompt("Enter " + population.replace(" ercent ", "") + "," + area.replace(" ercent ", "") + " " + thisline + extra, "0,0"); } ' . "\n";
echo ' if (datalinesuffix == null && population.indexOf("ercent") != (0 - 1) && population.indexOf(" ercent ") == (0 - 1)) datalinesuffix = totalleft; ' . "\n";
echo ' if (datalinesuffix == null) datalinesuffix = "0,0"; ' . "\n";
/*
echo ' if (datalinesuffix.length == 0) { ' . "\n";
echo ' datalinesuffix = eval(totalleft); ' . "\n";
echo ' totalleft = 0; ' . "\n";
echo ' } else if (eval(totalleft) == eval(datalinesuffix) && population.indexOf("ercent") != (0 - 1) && population.indexOf(" ercent ") == (0 - 1)) { ' . "\n";
echo ' totalleft = 0; ' . "\n";
echo ' } else if (eval(datalinesuffix) > eval(totalleft) && population.indexOf("ercent") != (0 - 1) && population.indexOf(" ercent ") == (0 - 1)) { ' . "\n";
echo ' datalinesuffix = eval(totalleft); ' . "\n";
echo ' totalleft = 0; ' . "\n";
echo ' } else if (eval(datalinesuffix) > eval(totalleft) && population.indexOf("ercent") == (0 - 1) && population.indexOf(" ercent ") == (0 - 1)) { ' . "\n";
echo ' population = population + " ercent "; ' . "\n";
echo ' } else { ' . "\n";
echo ' totalleft = eval(totalleft) - eval(datalinesuffix); ' . "\n";
echo ' } ' . "\n";
*/
//echo ' datac = datac + ",[~" + datalineprefix + "~," + datalinesuffix + "]"; ' . "\n";
echo ' if (datalineprefix.indexOf("' . "'" . '") == -1) { four=("" + datalinesuffix).split(","); if (exra != "") { exra=String.fromCharCode(39) + "Regarding " + popularity + four[0] + String.fromCharCode(39) + ","; } datac = datac + comma + " [~" + datalineprefix + "~," + exra + datalinesuffix + "] "; } ' . "\n";
echo ' if (datalineprefix.indexOf("' . "'" . '") != -1) { four=("" + datalinesuffix).split(","); exra=String.fromCharCode(39) + "Regarding " + popularity + four[0] + String.fromCharCode(39) + ","; datac = datac + comma + " [~" + datalineprefix.replace(",", "~,") + "," + datalinesuffix + "] "; } ' . "\n";
echo ' thisline++; comma=","; ' . "\n";
echo ' } ' . "\n";
echo ' } ' . "\n";
if (!isset($_GET['isMobile'])) {
echo ' if (allowed) window.location = "./intensity_chart.php?title=" + title + m + nojwinextra + "&width=" + width + "&height=" + height + "&country=" + country + "&area=" + area.replace(" ercent ", "") + "&population=" + population.replace(" ercent ", "") + "&data=" + datac; ' . "\n";
} else {
echo ' if (allowed) window.location = "./intensity_chart.php?isMobile=y&title=" + title + m + nojwinextra + "&width=" + width + "&height=" + height + "&country=" + country + "&area=" + area.replace(" ercent ", "") + "&population=" + population.replace(" ercent ", "") + "&data=" + datac; ' . "\n";
}
echo "} \n"; // . "} \n";
echo '' . 'script' . '>' . "\n";
}
echo '
Menu' . "\n";
//if (!isset($_GET['isMobile'])) {
// echo '<' . 'script type="text/javascript">' . "\n";
// echo 'setTimeout(prelater, 2 * 1000);' . "\n";
// echo '<' . '/' . 'script>' . "\n";
//}
?>