<?php include "header.php"; ?>
<table width="1000" border=0 align="center" cellpadding=0 cellspacing=0>
<tr>
<td width=150 background="images/grid1.gif" style="border-left: 1px solid
#423837;"> </td>
<td width=20 bgcolor=
#CCCCCC> </td>
<td width=600 bgcolor=
#CCCCCC> <br><H2>View Image Clicks</H2>
<HR class=c> <p>Here you can see just how many clicks each image has received:</p>
<P>
<?php
// if id is set then get the file with the id from database
$cn = @mysql_connect('localhost','centhome_user,'yes');
$database = @mysql_select_db('centhome_db',$cn);
$id = $_GET['id'];
$query = "SELECT id, url, title, img_name, img_type, img_filesize, img_content, clicks FROM area";
$result = mysql_query($query) or die('Error, query failed');
$arr = array();
echo "<table width='100%'><tr><td width='60%'>Title</td><td width='20%'>Image name</td><td width='20%'>Clicks</td></tr>";
while($r = mysql_fetch_assoc($result)){
echo "<tr>";
echo "<td width='60%'><a href=".$r['url']." target=\"_blank\">".$r['title']."</a></td><td width='20%'><a href=showimage.php?s=".$r['id']." target=\"_blank\">".$r['img_name']."</a></td><td width='20%'>".$r['clicks']."</td>";
echo "</tr>";
}
echo "</table>";
?>
<br>
<br>
<br>
<br> <br>
<br>
<br> <br>
<br> <br>
<br> <br>
<br> <br>
<br> <br>
<br><br> <br>
<br> <br>
<br> <br>
<br> <br>
<br>
<HR class=c> <DIV id=grey>This page last updated: 30th Sept 2005</DIV></td>
<td width="150" background="images/grid1.gif" style="border-right: 1px solid
#423837;"> </td>
</tr>
</table>
<?php include "footer.php"; ?>