<?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 email";

if(!($result = @mysql_query($listQuery,$connection)))
	showerror();

mysql_close($connection);

include 'header.php';

echo "\n<span class=Head0>Admin - All Email Addresses</span><p>";

echo "\n<table border=0 width=100% cellpadding=3 cellspacing=0 class=blue>";
echo "\n<tr><td align=center width=130>Email Name</td><td align=center width=235>Email Address</td><td width=45></td></tr>";

while($row=mysql_fetch_array($result))
	{

	echo"\n<tr>";

	echo"\n<td align=left>".$row["email_name"]."</td>";
	echo"\n<td align=left>".$row["email_value"]."</td>";
	echo"\n<td align=left><a href=\"email_mod.php?emailID=".$row["email_id"]."\">Modify</a>";
	echo"\n</td>";

	echo"\n</tr>";

	}

echo"</table>";

include 'footer.php';

?>