<script>
var status=1;
function changeObjectVisibility(objectId, newVisibility) {
// first get a reference to the cross-browser style object
// and make sure the object exists
var styleObject = getStyleObject(objectId);
if(styleObject) {
styleObject.visibility = newVisibility;
return true;
} else {
// we couldn't find the object, so we can't change its visibility
return false;
}
}
function getStyleObject(objectId) {
// checkW3C DOM, then MSIE 4, then NN 4.
//
if(document.getElementById && document.getElementById(objectId)) {
return document.getElementById(objectId).style;
}
else if (document.all && document.all(objectId)) {
return document.all(objectId).style;
}
else if (document.layers && document.layers[objectId]) {
return document.layers[objectId];
} else {
return false;
}
}
function toggle() {
if (status==1) {
status=0;
changeObjectVisibility('container','visible');
} else {
status = 1;
changeObjectVisibility('container','hidden');
}
}
</script>
<?php
//tutorial for text-file based counter
$counthandle=fopen("visits2.txt","r");
//opens file for reading and writing
$getcurrent=fread($counthandle,filesize("visits2.txt"));
//reads in current value
$getcurrent=$getcurrent+1;
//increment count by 1
fclose($counthandle);
$counthandle1=fopen("visits2.txt","w");
fputs($counthandle1,$getcurrent);
//input new value
fclose($counthandle1);
$counthandle2=fopen("visits2.txt","r");
$getrecent=fread($counthandle2,filesize("visits2.txt"));
//gets new value
//print "$getrecent";
//print counter value
fclose($counthandle2);
?>