<?php
session_start();
include "../header.php";
include "../config.php";
include "../style.php";

if( session_is_registered("alogin") ) {
?>
<table>
<tr>
<td width="15%" valign=top><br>

<? include("adminnavigation.php"); ?>
</td>
<td valign="top" align="center" width="5%">
<td valign="top" align="center" ><br><br> <?

echo "<font size=2 face='$fonttype' color='$fontcolour'>";

if ($action=="save") {

$update=mysql_query("update jse_settings set amail='$amailp', exchangename = '$exchangenamep' where id=1");


echo "<p><b>Your JSE settings have been saved.</b></p>";
echo '<head>
<META HTTP-EQUIV="Refresh"CONTENT="1; URL=jseadminsettings.php">
</head>';
}
else {
?>
<H2><? echo $sitename; ?> JSE Settings</H2>

<form action="jseadminsettings.php" method="POST">
<!--form method="POST" action="jseadminsettings.php"-->
<input type="hidden" name="action" value="save">
<center>
<hr>

Admin Email<br>
<input type="text" name="amailp" value="<? echo $amail; ?>">
<br><br>
Site Name<br>
<input type="text" name="exchangenamep" value="<? echo $exchangename; ?>">
<br><br>


<input type="submit" value=" Save JSE Settings ">
<!--input type="submit" name="jse_settings" value=" Save JSE Settings "-->
</form>
</center>

<? 
}
echo "</td><td valign=top align=center width=5%></tr></table>";
}
else  {
echo "Unauthorised Access!";
}
include "../footer.php";
mysql_close($dblink);
?>