ini_set('max_execution_time', 6000); $minlat=0; $minlong=0; $maxlat=0; $maxlong=0; $cstuff=''; $delim=''; $valafters=''; $evn=1; $opcss=''; $tenthousand=10000; $ccdd=''; if ((isset($_GET['geojson']) && isset($_GET['ccode'])) || (isset($_POST['geojson']) && isset($_POST['ccode']))) { if (isset($_GET['justthat']) || isset($_POST['justthat'])) { $opcss="opacity:0.3;"; $tenthousand=120000; } $extras=''; $extra=''; $bigxy=file_get_contents('../../HTMLCSS/countries.html'); //$smallxy=file_get_contents('./image_chart.php'); $within=',' . str_replace('+',' ',urldecode($_GET['ccode'])) . ','; if (isset($_GET['ccode'])) { $ccdd=str_replace('+',' ',urldecode($_GET['ccode'])); $thelist=explode(',', str_replace('CjunkN','CH',str_replace('+',' ',urldecode($_GET['ccode'])))); } else { $ccdd=str_replace('+',' ',urldecode($_POST['ccode'])); $thelist=explode(',', str_replace('CjunkN','CH',str_replace('+',' ',urldecode($_POST['ccode'])))); } if (1 == 1) { for ($iii=0; $iii 1) { // && sizeof($records) > 1) { for ($ii=1; $ii')[0].split(' coords=')[0].split(' shape=')[0].split(' title=')[0].split(' onclick=')[0] + ' '; xars[xij].innerHTML=xars[xij].innerHTML.replace(/lime/g, 'orange').replace(/rgb\(50\,\ 205\,\ 50\)/g, 'orange').replace(/rgb\(50\,205\,50\)/g, 'orange'); if (justthat) { if (areacon != '' && 1 == 7) { justthatbih+=xars[xij].outerHTML.replace('
')[0].split(' coords=')[0].split(' shape=')[0].split(' title=')[0].replace(' data-cname=', ' title=').replace(\"this.getAttribute('data-cname')\", \"this.title\") + ' '; xars[xij].innerHTML=xars[xij].innerHTML.replace(/lime/g, 'orange').replace(/rgb\(50\,\ 205\,\ 50\)/g, 'orange').replace(/rgb\(50\,205\,50\)/g, 'orange'); if (justthat) { if (areacon != '') { justthatbih+=xars[xij].outerHTML.replace('
')[0].split(' coords=')[0].split(' shape=')[0].split(' title=')[0].split(' onclick=')[0] + ' '; xars[xij].innerHTML=xars[xij].innerHTML.replace(/lime/g, 'orange').replace(/rgb\(50\,\ 205\,\ 50\)/g, 'orange').replace(/rgb\(50\,205\,50\)/g, 'orange'); if (justthat) { if (areacon != '' && 1 == 7) { justthatbih+=xars[xij].outerHTML.replace('
')[0].split(' coords=')[0].split(' shape=')[0].split(' title=')[0].replace(' data-cname=', ' title=').replace(\"this.getAttribute('data-cname')\", \"this.title\") + ' '; xars[xij].innerHTML=xars[xij].innerHTML.replace(/lime/g, 'orange').replace(/rgb\(50\,\ 205\,\ 50\)/g, 'orange').replace(/rgb\(50\,205\,50\)/g, 'orange'); if (justthat) { if (areacon != '') { justthatbih+=xars[xij].outerHTML.replace('
GeoJson World Countries via Google Chart Image Chart Map Chart - RJM Programming - November, 2023
'; } else if (isset($_GET['ccode'])) { $bigxy=file_get_contents('./countries.html'); $smallxy=file_get_contents('./image_chart.php'); $recs=explode(' data-iso2="' . $_GET['ccode'] . '"', $bigxy); $records=explode(',' . $_GET['ccode'] . ',', $smallxy); if (sizeof($recs) > 1 && sizeof($records) > 1) { $valafters=explode(' value=', $records[0])[-1 + sizeof(explode(' value=', $records[0]))]; for ($ii=1; $ii 1) { $minlat=$ccs[1]; $minlong=$ccs[0]; $maxlat=$ccs[1]; $maxlong=$ccs[0]; for ($ij=2; $ij $ccs[1 + $ij]) { $minlat=$ccs[1 + $ij]; } if ($maxlat < $ccs[1 + $ij]) { $maxlat=$ccs[1 + $ij]; } if ($minlong > $ccs[0 + $ij]) { $minlong=$ccs[0 + $ij]; } if ($maxlong < $ccs[0 + $ij]) { $maxlong=$ccs[0 + $ij]; } } $from=$valafters . ',' . $_GET['ccode'] . ','; if (strpos($from, ' title=') === false && strpos($from, ' data-geo=') !== false) { $to=str_replace(' data-geo=', ' title=' . "\\\"" . str_replace(' ','',('' . $minlat . ',' . $minlong . ',' . $maxlat . ',' . $maxlong)) . "\\\" data-geo=", $from); // ... ' . $valafters; file_put_contents('./image_chart.php', str_replace($from, $to, $smallxy)); echo $to; } } } } exit; ?>