hey its justin again. i tried adding your code to my own site and got some problems this is my code
I did add the .dat file, please tell me what i forgot to do, i have t add this to a few sites.
this is the link
http://www.jrbgraphicdesign.com
<!--To put this html into an existing HTML document, you must copy the JavaScript and-->
<!--paste it in a specific location within the destination HTML document. You must then copy-->
<!--and paste the table in a different location.-->
<head>
<title>Justin Blayney Graphic Design</title>
<meta name="keywords" content="design,toronto,jrbgraphicdesign,jbgraphicdesign,flash,web,print production,images,justin blayney">
<meta name="description" content"Multimedia design in the Toronto ON area">
<!-- Fireworks 3.0 Generic target.
Created Sat Jun 16 18:20:58 GMT-0400 2001 -->
<!-------------------- BEGIN COPYING THE JAVASCRIPT SECTION HERE ------------------->
<script language="JavaScript">
<!-- hide this script from non-javascript-enabled browsers
function MM_findObj(n, d) { //v3.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document); return x;
}
/ Functions that swaps down images. /
function MM_nbGroup(event, grpName) { //v3.0
var i,img,nbArr,args=MM_nbGroup.arguments;
if (event == "init" && args.length > 2) {
if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
nbArr[nbArr.length] = img;
for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args)) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = args[i+1];
nbArr[nbArr.length] = img;
} }
} else if (event == "over") {
document.MM_nbOver = nbArr = new Array();
for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args)) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = (img.MM_dn && args[i+2]) ? args[i+2] : args[i+1];
nbArr[nbArr.length] = img;
}
} else if (event == "out" ) {
for (i=0; i < document.MM_nbOver.length; i++) {
img = document.MM_nbOver; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
} else if (event == "down") {
if ((nbArr = document[grpName]) != null)
for (i=0; i < nbArr.length; i++) { img=nbArr; img.src = img.MM_up; img.MM_dn = 0; }
document[grpName] = nbArr = new Array();
for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args)) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = args[i+1];
nbArr[nbArr.length] = img;
} }
}
// stop hiding -->
</script>
<!-------------------------- STOP COPYING THE JAVASCRIPT HERE -------------------------->
</head>
<body bgcolor="#000000" onload=""><center>
<!--The following section is an image or HTML table which reassembles the sliced image in a browser.-->
<!--Copy the table section including the opening and closing table tags, and paste the data where-->
<!--you want the reassembled image to appear in the destination document. -->
<!-------------------------- BEGIN COPYING THE HTML ---------------------------->
<table border="0" cellpadding="0" cellspacing="0" width="550">
<!-- fwtable fwsrc="index.png" fwbase="index.gif" -->
<script language="JavaScript">
<!-- hide
if (document.images) {
index_r2_c6_f2 = new Image(61 ,35); index_r2_c6_f2.src = "images/index_r2_c6_f2.gif";
index_r2_c6_f2 = new Image(61 ,35); index_r2_c6_f2.src = "images/index_r2_c6_f3.gif";
index_r2_c6_f1 = new Image(61 ,35); index_r2_c6_f1.src = "images/index_r2_c6.gif";
index_r3_c2_f2 = new Image(64 ,21); index_r3_c2_f2.src = "images/index_r3_c2_f2.gif";
index_r3_c2_f2 = new Image(64 ,21); index_r3_c2_f2.src = "images/index_r3_c2_f3.gif";
index_r3_c2_f1 = new Image(64 ,21); index_r3_c2_f1.src = "images/index_r3_c2.gif";
index_r4_c4_f2 = new Image(64 ,20); index_r4_c4_f2.src = "images/index_r4_c4_f2.gif";
index_r4_c4_f2 = new Image(64 ,20); index_r4_c4_f2.src = "images/index_r4_c4_f3.gif";
index_r4_c4_f1 = new Image(64 ,20); index_r4_c4_f1.src = "images/index_r4_c4.gif";
}
// stop hiding -->
</script>
<tr>
<!-- Shim row, height 1. -->
<td><img src="images/shim.gif" width="27" height="1" border="0"></td>
<td><img src="images/shim.gif" width="64" height="1" border="0"></td>
<td><img src="images/shim.gif" width="35" height="1" border="0"></td>
<td><img src="images/shim.gif" width="64" height="1" border="0"></td>
<td><img src="images/shim.gif" width="44" height="1" border="0"></td>
<td><img src="images/shim.gif" width="61" height="1" border="0"></td>
<td><img src="images/shim.gif" width="255" height="1" border="0"></td>
<td><img src="images/shim.gif" width="1" height="1" border="0"></td>
</tr>
<tr valign="top"><!-- row 1 -->
<td colspan="7"><img name="index_r1_c1" src="images/index_r1_c1.gif" width="550" height="262" border="0"></td>
<td><img src="images/shim.gif" width="1" height="262" border="0"></td>
</tr>
<tr valign="top"><!-- row 2 -->
<td colspan="5"><img name="index_r2_c1" src="images/index_r2_c1.gif" width="234" height="13" border="0"></td>
<td rowspan="4"><a href="http://www.macromedia.com/downloads" target="_blank" onMouseOut="MM_nbGroup('out');" onMouseOver="MM_nbGroup('over','index_r2_c6','images/index_r2_c6_f2.gif','images/index_r2_c6_f3.gif',1);" onClick="MM_nbGroup('down','navbar1','index_r2_c6','images/index_r2_c6_f3.gif',1);" ><img name="index_r2_c6" src="images/index_r2_c6.gif" width="61" height="35" border="0" alt="macromedia"></a></td>
<td rowspan="5"><img name="index_r2_c7" src="images/index_r2_c7.gif" width="255" height="138" border="0"></td>
<td><img src="images/shim.gif" width="1" height="13" border="0"></td>
</tr>
<tr valign="top"><!-- row 3 -->
<td rowspan="4"><img name="index_r3_c1" src="images/index_r3_c1.gif" width="27" height="125" border="0"></td>
<td rowspan="2"><a href="moockfpi.htm" onMouseOut="MM_nbGroup('out');" onMouseOver="MM_nbGroup('over','index_r3_c2','images/index_r3_c2_f2.gif','images/index_r3_c2_f3.gif',1);" onClick="MM_nbGroup('down','navbar1','index_r3_c2','images/index_r3_c2_f3.gif',1);" ><img name="index_r3_c2" src="images/index_r3_c2.gif" width="64" height="21" border="0" alt="go to flash site"></a></td>
<td colspan="3"><img name="index_r3_c3" src="images/index_r3_c3.gif" width="143" height="2" border="0"></td>
<td><img src="images/shim.gif" width="1" height="2" border="0"></td>
</tr>
<tr valign="top"><!-- row 4 -->
<td rowspan="3"><img name="index_r4_c3" src="images/index_r4_c3.gif" width="35" height="123" border="0"></td>
<td rowspan="2"><a href="homeweb.htm" onMouseOut="MM_nbGroup('out');" onMouseOver="MM_nbGroup('over','index_r4_c4','images/index_r4_c4_f2.gif','images/index_r4_c4_f3.gif',1);" onClick="MM_nbGroup('down','navbar1','index_r4_c4','images/index_r4_c4_f3.gif',1);" ><img name="index_r4_c4" src="images/index_r4_c4.gif" width="64" height="20" border="0" alt="html site"></a></td>
<td rowspan="3"><img name="index_r4_c5" src="images/index_r4_c5.gif" width="44" height="123" border="0"></td>
<td><img src="images/shim.gif" width="1" height="19" border="0"></td>
</tr>
<tr valign="top"><!-- row 5 -->
<td rowspan="2"><img name="index_r5_c2" src="images/index_r5_c2.gif" width="64" height="104" border="0"></td>
<td><img src="images/shim.gif" width="1" height="1" border="0"></td>
</tr>
<tr valign="top"><!-- row 6 -->
<td><img name="index_r6_c4" src="images/index_r6_c4.gif" width="64" height="103" border="0"></td>
<td><img name="index_r6_c6" src="images/index_r6_c6.gif" width="61" height="103" border="0"></td>
<td><img src="images/shim.gif" width="1" height="103" border="0"></td>
</tr><br><br>
<font face="arial,helvetiva,sans serif" size="3" color="#ffffff">
<p>Hits -
<?
$fileName="counter.dat";//this is the filename where the counter value is stored
//First, we must check if the file exists
//If the file does exist we want to read it
//If not then we must create the file
if( file_exists($fileName)){ //if file exists...
$file_pointer = fopen($fileName, "r"); //open it
$count = fread($file_pointer, filesize($fileName)); //import data as $count
fclose($file_pointer); //close the file
$count = $count + 1; //add 1 to the current value
//we now need to write to the file again with the new value
$file_pointer = fopen($fileName,"w","false"); // open file for writing
fwrite($file_pointer, $count); //write the value to the file
$lock = flock($file_pointer, LOCK_EX); //flock stops multiple writin and avoids corruption
fclose($file_pointer); //close the file
echo $count; //print the count number to the page
}
else { //if the file does not exist create it
$count = 1;
$file_pointer = fopen($fileName,"w","false");
fwrite($file_pointer, $count);
$lock = flock($file_pointer, LOCK_EX);
fclose($file_pointer);
echo $count;
}
?>
<br>
</p>
</font>
<!-- This HTML was automatically created with Macromedia Fireworks 3.0 -->
<!-- http://www.macromedia.com -->
</table>
<!--------------------------- STOP COPYING THE HTML HERE --------------------------->
</center>
</body>