'; if (isset($_GET['jigsaw'])) { //$mapstyle = ''; $mapstyle = 'usemap="#sh80879"'; $rhs = 'background-color:red;'; $two='opacity:0.1;z-index:20;'; //$bodystuff = ' onclick="fomc(event);" onmousemove="fomm(event);" onmousedown="fomd(event);"'; $bodystuff = ' ontouchdown="fomd(event);" onmousedown="fomd(event);"'; $astyle = "\n" . '' . "\n"; $downbot = str_replace('', "\n" . '', $downbot); $mapstuff = ' onclick="ffoc(this.id);" '; } if (isset($_GET['ajaxindiaplusstate'])) { if (file_exists(dirname(__FILE__) . "/" . str_replace(" ", "+", strtolower(urldecode($_GET['ajaxindiaplusstate']))) . ".smalltalk")) { echo "

Thanks to Wikipedia ...

" . file_get_contents(dirname(__FILE__) . "/" . str_replace(" ", "+", strtolower(urldecode($_GET['ajaxindiaplusstate']))) . ".smalltalk"); exit; } } else if (isset($_GET['indiaplusstate'])) { if (file_exists(dirname(__FILE__) . "/" . str_replace(" ", "+", strtolower(urldecode($_GET['indiaplusstate']))) . ".smalltalk")) { $divinfo = "

Thanks to Wikipedia ...

" . file_get_contents(dirname(__FILE__) . "/" . str_replace(" ", "+", strtolower(urldecode($_GET['indiaplusstate']))) . ".smalltalk"); } } $bubblechart = ""; $numstates = 0; $wording = array(); $coordstring = array(); $urls = array(); $blurbs = array(); $literacy = array(); $population = array(); $density = array(); $cols = array("#afeeee", "#ffe4b5", "#d3d3d3", "#ffdead", "#eee8aa", "#ffebcd", "#fff8dc", "#ffa500", "#faebd7", "#f8f8ff", "#f0fff0", "#fffafa", "#ffffe0", "#e0ffff", "#fff0f5", "#e6e6fa", "#f5f5f5", "#fffacd", "#f0ffff", "#fffff0", "#f5fffa", "#ffefd5", "#f0e68c", "#ffe4c4", "#fdf5e6", "#fffaf0"); // $mobilefishstring = ' click map  . idize("Tamil Nadu") .  . idize("Kerala") .  . idize("Goa") .  . idize("Jammu and Kashmir") .  . idize("Himachal Pradesh") .  . idize("Punjab") .  . idize("Uttarakhand") .  . idize("National Capital Territory of New Delhi") .  . idize("Haryana") .  . idize("Uttar Pradesh") .  . idize("Bihar") .  . idize("Jharkhand") .  . idize("West Bengal") .  . idize("Sikkim") .  . idize("Arunachal Pradesh") .  . idize("Tripura") .  . idize("Meghalaya") .  . idize("Assam") .  . idize("Odisha") .  . idize("Chhattisgarh") .  . idize("Telangana") .  . idize("Andhra Pradesh") .  . idize("Karnataka") .  . idize("Maharashtra") .  . idize("Madhya Pradesh") .  . idize("Gujarat") .  . idize("Rajasthan") .  . idize("Mizoram") .  . idize("Manipur") .  . idize("Nagaland") . '; function hrefize($t) { if (isset($_GET['jigsaw'])) return ''; return str_replace('""','"',str_replace('href=h', 'href="h', ($t . '"'))); } function idize($t) { return '"' . $t . '" id="sR' . str_replace("Jammu_and_Kashmir", "JAK", str_replace("National_Capital_Territory_of_New_Delhi", "NCTND", str_replace(" ", "_", str_replace("+", "_", $t)))) . '"'; } function randomize($midtoend) { $retval = $midtoend; $newmidbit = '" points="'; $newlastbit = str_replace($newmidbit, '', $midtoend); $newmidbit = '" class="draggable" onclick="oc(event);" onmousedown="omd(event);" onmousemove="omm(event);" ondragstart="drag(event)" draggable="true" points="'; $xoff = rand(0, 300); $yoff = rand(0, 800); $newstartbit = "_" . $xoff . "_" . $yoff; $xylist = explode(",", $newlastbit); $retval = $newstartbit . $newmidbit . ($xylist[0] + $xoff); for ($ip=1; $ip 1) { for ($ii=(sizeof($huhs) - 1); $ii>=1; $ii--) { if (strtolower(str_replace("file", "http", strtolower(substr($huhs[$ii], 0, 4)))) == "http") { $outth = $outth; } else if (substr($huhs[$ii], 0, 1) != "/" && substr($huhs[$ii], 0, 1) != "'" && substr($huhs[$ii], 0, 1) != '"') { $outth = str_replace($huhs[$ii], $udirname . $huhs[$ii], $outth); } else if (substr($huhs[$ii], 1, 1) != "/" && substr($huhs[$ii], 0, 1) != "'" && substr($huhs[$ii], 0, 1) != '"') { $outth = str_replace($huhs[$ii], substr($udirname, 0, (strlen($udirname) - 1)) . $huhs[$ii], $outth); } } } } } return $outth; } function nextnumber($inst) { $startfound = false; $endfound = false; $cn = "00"; $jh = 0; while (!$endfound && $jh < strlen($inst)) { if (!$startfound && (substr($inst, $jh, 1) == ">" || substr($inst, $jh, 1) == ">") && substr($inst, ($jh + 1), 1) >= "0" && substr($inst, ($jh + 1), 1) <= "9") { $startfound = true; //file_put_contents(dirname(__FILE__) . "/xxx.zz", file_get_contents(dirname(__FILE__) . "/xxx.zz") . "yes" . $cn . "\n"); $cn = ""; } else if ($startfound && ((substr($inst, $jh, 1) >= "0" && substr($inst, $jh, 1) <= "9") || substr($inst, $jh, 1) == ".")) { $cn .= substr($inst, $jh, 1); //file_put_contents(dirname(__FILE__) . "/xxx.zz", file_get_contents(dirname(__FILE__) . "/xxx.zz") . $cn . "\n"); } else if ($startfound && substr($inst, $jh, 1) == "/") { $endfound = true; } else if ($startfound && substr($inst, $jh, 1) == "%") { $endfound = true; } else if ($startfound && substr($inst, $jh, 1) == "&") { $endfound = true; } else if ($startfound && (substr($inst, $jh, 1) >= "A" && substr($inst, $jh, 1) <= "Z")) { $endfound = true; } else if ($startfound && (substr($inst, $jh, 1) >= "a" && substr($inst, $jh, 1) <= "z")) { $endfound = true; } else if ($startfound && substr($inst, $jh, 1) == " ") { $endfound = true; } else if ($startfound && substr($inst, $jh, 1) == "<") { $endfound = true; } $jh++; } //file_put_contents(dirname(__FILE__) . "/xxx.zz", file_get_contents(dirname(__FILE__) . "/xxx.zz") . $cn . "\n"); return $cn; } function processmap($inmap) { global $numstates, $wording, $coordstring, $urls, $blurbs, $bubblechart, $downbot, $cols, $two, $literacy, $population, $density; $suffix = "
"; $atitle = explode(' title="', $inmap); for ($i=1; $iPopulation", $blurbs[sizeof($urls) - 1]); if (sizeof($prepops) > 1) { $pops = explode(">Urban", $prepops[1]); if (sizeof($pops) == 1) { $pops = explode("Total", $prepops[1]); } else { $ptwo = 2; $apops = explode("Total", $prepops[1]); if (sizeof($apops) > 1) { if (strlen($apops[0]) < strlen($pops[0])) { $ptwo = 1; $pops = explode("Total", $prepops[1]); } } if ($ptwo == 2) $popsrural = explode(">Rural", $prepops[1]); } } else { $pops = explode("Total", "ngfdhgfdg"); } if (sizeof($dens) == 1 && sizeof($pops) >= 2) { $prepops = explode(">Area", $blurbs[sizeof($urls) - 1]); if (sizeof($prepops) > 1) { $dtwo = 2; $dens = explode("Total", $prepops[1]); // calculate density as population / area } } //file_put_contents(dirname(__FILE__) . "/x.z", file_get_contents(dirname(__FILE__) . "/x.z") . $wording[sizeof($urls) - 1] . " " . sizeof($lits) . " " . sizeof($dens) . " " . sizeof($pops) . "\n"); if (sizeof($lits) >= 2 && sizeof($dens) >= 2 && sizeof($pops) >= 2) { $population[sizeof($urls) - 1] = nextnumber($pops[1]); if ($ptwo == 2) $population[sizeof($urls) - 1] += nextnumber($popsrural[1]); //file_put_contents(dirname(__FILE__) . "/xx.zz", file_get_contents(dirname(__FILE__) . "/xx.zz") . $wording[sizeof($urls) - 1] . " pop " . $literacy[sizeof($urls) - 1] . " " . $density[sizeof($urls) - 1] . " " . $population[sizeof($urls) - 1] . "\n"); $density[sizeof($urls) - 1] = nextnumber($dens[1]); if ($dtwo == 2 && 2 == 2) { $dd = $density[sizeof($urls) - 1]; $density[sizeof($urls) - 1] = ((0.01 + $population[sizeof($urls) - 1]) / $dd); } //file_put_contents(dirname(__FILE__) . "/xx.zz", file_get_contents(dirname(__FILE__) . "/xx.zz") . $wording[sizeof($urls) - 1] . " dens " . $literacy[sizeof($urls) - 1] . " " . $density[sizeof($urls) - 1] . " " . $population[sizeof($urls) - 1] . "\n"); $literacy[sizeof($urls) - 1] = nextnumber($lits[1]); if ($bubblechart == "") { $bubblechart = "
"; } //$bubblechart = str_replace("' />", ",%20[~~," . $literacy[sizeof($urls) - 1] . "," . $density[sizeof($urls) - 1] . ",%27" . str_replace(" ", "%20", $wording[sizeof($urls) - 1]) . "%27," . $population[sizeof($urls) - 1] . "]%20' />", $bubblechart); $bubblechart = str_replace("\" />", ", [~~," . $literacy[sizeof($urls) - 1] . "," . $density[sizeof($urls) - 1] . ",'" . $wording[sizeof($urls) - 1] . "'," . $population[sizeof($urls) - 1] . "] \" />", $bubblechart); //file_put_contents(dirname(__FILE__) . "/xx.zz", file_get_contents(dirname(__FILE__) . "/xx.zz") . $wording[sizeof($urls) - 1] . " " . $literacy[sizeof($urls) - 1] . " " . $density[sizeof($urls) - 1] . " " . $population[sizeof($urls) - 1] . "\n"); } if (1 == 2) { try { $doc = new DOMDocument(); $doc->preserveWhiteSpace = FALSE; $before = libxml_use_internal_errors(true); $doc->loadHTML($blurbs[sizeof($urls) - 1]); libxml_use_internal_errors($before); $docb = true; foreach ($doc->getElementsByClassName("infobox") as $link) { file_put_contents(dirname(__FILE__) . "/" . str_replace(" ", "+", strtolower($wording[sizeof($urls) - 1])) . ".smalltalk", $link->C14N()); } } catch (Exception $e) { throw new Exception( 'Something really wrong', 0, $e); } } else if (!file_exists(dirname(__FILE__) . "/" . str_replace(" ", "+", strtolower($wording[sizeof($urls) - 1])) . ".smalltalk")) { $idiv = explode("infobox", relative_to_absolute($blurbs[sizeof($urls) - 1])); if (sizeof($idiv) > 1) { $aprefix = '
", $idiv[1]); $jdiv = explode("", $idiv[1]); $jdivs = explode("
strlen($jdiv[0]) && strlen($jdivt[0]) > strlen($jdivs[0])) { file_put_contents(dirname(__FILE__) . "/" . str_replace(" ", "+", strtolower($wording[sizeof($urls) - 1])) . ".smalltalk", $aprefix . $jdivt[0] . "
"); } else if (strlen($jdivs[0]) < strlen($jdiv[0])) { file_put_contents(dirname(__FILE__) . "/" . str_replace(" ", "+", strtolower($wording[sizeof($urls) - 1])) . ".smalltalk", $aprefix . $jdiv[0] . ""); } else { file_put_contents(dirname(__FILE__) . "/" . str_replace(" ", "+", strtolower($wording[sizeof($urls) - 1])) . ".smalltalk", $aprefix . $jdivs[0] . ""); } } } } $acoords = explode(' coords="', $inmap); for ($i=1; $i', "\n" . '', $downbot); } else { $downbot = str_replace('', "\n" . '', $downbot); } $coords = explode(',', $coordstring[sizeof($coordstring) - 1]); $x = $coords[0]; $rjj = 1.0; for ($ii=2; $ii<(sizeof($coords) - 2); $ii+=2) { $x = ($rjj * $x + $coords[$ii]) / (1.0 + $rjj); $rjj = $rjj + 1.0; } $y = $coords[1]; $rjj = 1.0; for ($ii=3; $ii<(sizeof($coords) - 2); $ii+=2) { $y = ($rjj * $y + $coords[$ii]) / (1.0 + $rjj); $rjj = $rjj + 1.0; } $presuffix = " onmouseout='yehbut();' onmouseover='zok=1; url=\"" . str_replace("=%22", "=%22Famous+People+from+", $urls[sizeof($coordstring) - 1]) . "\"; parseurl(); setTimeout(xget, 4000); ' "; $aid = "id=aR" . str_replace("Jammu_and_Kashmir", "JAK", str_replace("National_Capital_Territory_of_New_Delhi", "NCTND", str_replace(" ", "_", str_replace("+", "_", $wording[sizeof($coordstring) - 1])))); $ss=""; if (isset($_GET['jigsaw'])) $ss="border:5px solid green;font-weight:bold;padding: 4 4 4 4;"; $suffix = str_replace("", "" . str_replace("National Capital Territory of New Delhi", "NCTND", $wording[sizeof($coordstring) - 1]) . "", $suffix); } return str_replace('img src', 'img style="' . $two . ';" src', $inmap) . $suffix; } ?> Political Map of India - Thanks to http://www.mapsofindia.com/free-download/free-download-india-political-maps.html > \n"; } else { echo "
  • Hover over Indian map states for Famous People and/or Wikipedia information to right (thanks)
  • Click/touch Indian map state for Web information on new webpage
\n"; } ?>

India

  • Click/touch on Indian state at right for today's jigsaw
  • Click/touch Indian map for where that state is positioned ... get to 30