Forum Moderators: open
function onBoxClicked(frame, country){
if (document.getElementById(country).checked == true){
window.parent.document.getElementById('world_map').src=(country)+".php";
document.getElementById(country).checked = true;
}else if (document.getElementById(country).checked == false){
window.parent.document.getElementById('world_map').src=(country)+"_unload.php";
document.getElementById(country).checked = false;
}
}
var randomNumber = Math.floor(Math.random()*100000001);
document.getElementById('world_map').src = country + ".php";
var loadImage = document.getElementById('world_map').src;
document.getElementById('world_map').src = randomNumber + loadImage;
function onBoxClicked2(frame, country){
if (window.frames[frame].document.getElementById(country).checked == false){
document.getElementById('world_map').src = country+".php";
window.frames[frame].document.getElementById(country).checked = true;
}else if (window.frames[frame].document.getElementById(country).checked == true){
document.getElementById('world_map').src=country+"_unload.php";
window.frames[frame].document.getElementById(country).checked = false;
}
}
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="-1">
session_cache_limiter('nocache');
$cache_limiter = session_cache_limiter();
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");// Date in the past
Each user's world map is customized to include their IP at the beginning of the file name
?r=" + randomNumber; part of the file is preserved. Thanks.
<?php
session_cache_limiter('nocache');
$cache_limiter = session_cache_limiter();
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");// Date in the past
$ip=$_SERVER['REMOTE_ADDR'];
$oldImageName = 'world_map2_users_copy.png';
$newImageName = $ip.'.'.'world_map2_users_copy.png';
if (file_exists($newImageName)){
$im = imagecreatefrompng($newImageName);
}else{
copy($oldImageName, $newImageName);
$im = imagecreatefrompng($newImageName);
}
$guernsey_color = imagecolorallocate($im, 249, 221, 22);
imagefill($im, 631, 141, $guernsey_color);
ImagePNG($im, $newImageName);
ImagePNG($im);
ImageDestroy($im);
?>
I want to preserve the semi-real term coloring because other similar services provide the same kind of updating.
give the user the choice about what color to use with each country