<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>your gallery</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
<tr align="left" valign="top" bordercolor="#FFFFFF">
<td height="110" colspan="2"><img src="extras/your_logo.jpg" width="500" height="130"></td>
<td width="160" height="110" valign="middle">
<div align="center"><font size="2">Recent Additions:</font><br>
<?php
//connect to mysql database
$conn = mysql_connect("localhost", "user", "password") OR DIE (mysql_error());
//usually leave localhost and guest login is blank user and password. If you use the admin user and password to test, don't forget to remove it!
@mysql_select_db ("your_db", $conn) OR DIE (mysql_error());
//this query selects a random image added to the database during the past 30 days
$query = "SELECT id,name FROM your_table WHERE TO_DAYS(NOW()) - TO_DAYS(date) <= 30 ORDER BY RAND()";
$result=mysql_query($query);
$row=mysql_fetch_array($result);
//this displays the image
echo "<img src=\"image.php?id={$row["id"]}\"><br>";
echo "<font size=\"1\">{$row["name"]}</font>";
?></div></td>
</tr>
<tr align="left" valign="top" bordercolor="#FFFFFF">
<td width="50%" height="30" valign="top">
<h1>your gallery</h1></td>
<td width="30%" height="30" valign="top">
<h3 align="right">last updated:
<!-- #BeginDate format:En1 -->11-jun-04<!-- #EndDate -->
</h3></td>
<td width="160" height="30"> </td>
</tr>
<tr align="left" valign="top">
<td colspan="2" rowspan="2">
<?php
//this line includes the main engine driving the gallery
include 'engine.php';
?>
</td>
<td width="160" height="73">
<div align="right">
<p><em><font size="2">click on thumbnails to display full-sized image.</font></em><font size="2"></font></p>
</div></td>
</tr>
<tr align="left" valign="top">
<td width="160" height="300">
<table width="100%" border="1" align="right" cellpadding="1" cellspacing="0" bordercolor="#000066">
<tr>
<td width="20%">
<p align="left"><font size="2"><strong>blurb about your gallery
and a contact link perhaps?</strong></font></p>
</td>
</tr>
</table></td>
</tr>
<tr align="left" valign="top" bordercolor="#FFFFFF">
<td colspan="3">
<?php
//connect to mysql database
$conn = mysql_connect("localhost", "user", "password") OR DIE (mysql_error());
@mysql_select_db ("your_db", $conn) OR DIE (mysql_error());
// this query counts the total number of entries in the table
$sql = "SELECT * FROM your_table";
$result=mysql_query($sql);
$number=mysql_num_rows($result);
print"<p align=\"center\"><font size=\"2\">Note: If you do not select any search criteria (not recommended!) then the whole gallery will be displayed.
<br>There are currently $number exhibits stored in the gallery's database.</font></p>";
?></td>
</tr>
<tr align="left" valign="top" bordercolor="#FFFFFF">
<td colspan="3"> <div align="center">
<h3><a href="mailto:hide@address.com">wwdgallery</a> <font color="#000033" size="1" face="Times New Roman, Times, serif">©</font>
2004</h3>
</div></td>
</tr>
</table>
</body>
</html>