| Current Path : /var/www/cesa.co.za/members/saaceadmin/ |
| Current File : /var/www/cesa.co.za/members/saaceadmin/editAdvisory-listing.php4 |
<html>
<head>
<title>SAACE: Administration page: Manage the Advisory Notes</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
a { font-family: "Comic Sans MS"; font-size: 10px; font-weight: bold; color: #FFFFFF; text-decoration: none}
-->
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<?php
// All the database constants
$scriptname = "editAdvisory-listing.php4";
include("../inc/conf.inc");
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<h3><font face="Comic Sans MS" size="2">SAACE Administration Page :EDIT</font></h3>
</td>
</tr>
<tr>
<td align="left" valign="top">
<table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolor="#000000">
<tr>
<td bgcolor="#0000FF" align="left" valign="top" width="80%"><font face="Comic Sans MS" size="2"><b>Manage
the Advisory Notes</b></font></td>
<td bgcolor="#0000FF" align="left" valign="top" width="20%"><a href="manageAdvisory-listing.php4">LIST</a>
| <a href="addAdvisory-listing.php4">ADD</a> |<a href="index2.php4">
Main Menu</a></td>
</tr>
<tr>
<td align="left" valign="top" colspan="2">
<div align="center"><font size="2"> <b>
<?php
if ($action == "update")
{
// Connect to the databse and update the date
echo "The UPDATE was done as follows. ID: ", $form[noteid]," TITLE: ", $form[title]," DESCRIPTION: ", $form[description]," FILENAME: ", $form[filename]," ARCHIVE: ", $form[archive];
$dbc = mysql_connect($server,$user,$pass);
mysql_select_db($db,$dbc);
$sql = "UPDATE advisory SET Title = '$form[title]', Description = '$form[description]' ,Filename = '$form[filename]' ,Archive = '$form[archive]' WHERE NoteId = '$form[noteid]'";
$result = mysql_query($sql);
?>
</b></font>
<?php
}
else
{
// Connect to the databse and show the data
$dbc = mysql_connect($server,$user,$pass);
mysql_select_db($db,$dbc);
$sql = "SELECT NoteId,Title,Description,Filename,Archive FROM advisory WHERE NoteId = $form[noteid]";
$result = mysql_query($sql);
$result_rows = mysql_num_rows($result);
$row = mysql_fetch_array($result);
?>
</div>
<FORM ACTION="<?php echo $scriptname; ?>?action=update" METHOD="POST">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="15%"><b><font face="Comic Sans MS" size="2">ID</font></b></td>
<td width="85%"><font face="Comic Sans MS" size="2"><b>
<?php echo $row["NoteId"] ; $form[noteid] = $row["NoteId"];?>
</b></font></td>
</tr>
<tr>
<td width="15%"><b><font face="Comic Sans MS" size="2">Title</font></b></td>
<td width="85%"> <font face="Comic Sans MS" size="2">
<textarea name="form[title]" cols="50" rows="2" wrap="PHYSICAL"><?php echo $row["Title"]; ?></textarea>
</font></td>
</tr>
<tr>
<td width="15%"><b><font face="Comic Sans MS" size="2">Description</font></b></td>
<td width="85%"> <font face="Comic Sans MS" size="2">
<textarea name="form[description]" cols="50" rows="4" wrap="PHYSICAL"><?php echo $row["Description"]; ?></textarea>
</font></td>
</tr>
<tr>
<td width="15%"><b><font face="Comic Sans MS" size="2">Filename</font></b></td>
<td width="85%"> <font face="Comic Sans MS" size="2">
<input type="text" name="form[filename]" value="<?php echo $row["Filename"]; ?>">
</font></td>
</tr>
<tr>
<td width="15%"><b><font face="Comic Sans MS" size="2">Archive</font></b></td>
<td width="85%"> <font face="Comic Sans MS" size="2">
<input type="text" name="form[archive]" value="<?php echo $row["Archive"]; ?>">
(Should be <b>NEW</b>)</font></td>
</tr>
<tr>
<td width="15%"> </td>
<td width="85%">
<input type="submit" name="Submit" value="Update">
<input type="reset" name="Submit2" value="Clear">
</td>
</tr>
</table>
<INPUT TYPE="HIDDEN" NAME="form[noteid]" VALUE="<?php echo $form[noteid] ;?>">
</form>
<?php }
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>