<?php


include 'db.php';
include 'error.php';
include 'auth.php';


if(!($connection=@mysql_connect($hostName, $dbUsername, $dbPassword)))
	die("Could not connect to DB");

if(!(mysql_select_db ($databaseName, $connection)))
	showerror();


$listQuery="SELECT * FROM background";

if(!($result = @mysql_query($listQuery,$connection)))
	showerror();

//print_r($result);


mysql_close($connection);


include 'header.php';

echo "\n<span class=Head0>Admin - All Backgrounds</span><p>";

echo "\n<table border=0 width=100% cellpadding=3 cellspacing=0 class=blue>";
echo "\n<tr><td align=center>Header</td><td align=center>Details</td><td></td></tr>";

while($row=mysql_fetch_array($result))
	{

	echo"\n<tr>";

	echo"\n<td align=left>".$row["background_header"]."</td>";
	echo"\n<td align=left>".substr($row["background_detail"],0,100)."...</td>";
	echo"\n<td align=left><a href=\"background_mod.php?backgroundID=".$row["background_id"]."\">Modify</a>";
	//echo"\n<br><a href=\"event_del.php?eventID=".$row["events_id"]."\">Delete</a></td>";
	echo"\n</td>";

	echo"\n</tr>";

	}

echo"</table>";

include 'footer.php';

?>