Your IP : 216.73.217.117


Current Path : /var/www/cesa.co.za/members/saaceadmin/
Upload File :
Current File : /var/www/cesa.co.za/members/saaceadmin/editLinks.php4

<html>
<head>
<title>SAACE: Administration page: Manage the LINKS Page</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 = "editLinks.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="77%"><font face="Comic Sans MS" size="2"><b>Manage 
            the LINKS Page</b></font></td>
          <td bgcolor="#0000FF" align="left" valign="top" width="23%"><a href="manageLinksListing.php4">LIST</a> 
            | <a href="addLinks.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
		  $dbc = mysql_connect($server,$user,$pass);
		  mysql_select_db($db,$dbc);
		  $sql = "UPDATE links SET ActiveText = '$form[activetext]', Description = '$form[description]' ,URL = '$form[url]' ,Archive = '$form[archive]' WHERE LinkId = '$form[noteid]'";
		  $result = mysql_query($sql);
		  echo "The update was completed";
             ?>
              </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 LinkId,ActiveText,Description,URL,Archive FROM links WHERE LinkId = $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["LinkId"] ; $form[noteid] = $row["LinkId"];?>
                    </b></font></td>
                </tr>
                <tr> 
                  <td width="15%"><b><font face="Comic Sans MS" size="2">Active 
                    Text </font></b></td>
                  <td width="85%"> <font face="Comic Sans MS" size="2"> 
                    <input type="text" name="form[activetext]" size="100" value="<?php echo $row["ActiveText"]; ?>">
                    </font></td>
                </tr>
                <tr> 
                  <td width="15%" height="28"><b><font face="Comic Sans MS" size="2">URL</font></b></td>
                  <td width="85%" height="28"> <font face="Comic Sans MS" size="2"> 
                    <input type="text" name="form[url]" size="100" value="<?php echo $row["URL"]; ?>">
                    </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"><?php echo $row["Description"]; ?></textarea>
                    </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%">&nbsp;</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>