Your IP : 216.73.217.79


Current Path : /var/www/cesa.co.za/Mailer/
Upload File :
Current File : /var/www/cesa.co.za/Mailer/addSection_old.php

<?php
	require_once ('includes/globals.php');

	if (isset($_SESSION['database'])) {
		$db = $_SESSION['database'];		
	} 
	
	if (isset($_SESSION['userid'])) {
		$userid = $_SESSION['userid'];
	} else {
		echo "<script>document.location.href='index.php';</script>\n";
	}
	
	$s_title = '';
	
	$UpdateMode = False;
	if (isset($_GET['id'])) {
		$s_id = intval($_GET['id']);
		$UpdateMode = True;
		$rsS = $db->Execute("SELECT sTitle FROM Sections\n where idSection = " . $s_id);
		if(!$rsS->EOF) { 
			$s_title = $rsS->fields[0];
		}		
	}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<title>Email template control panel</title>
	<link rel="stylesheet" type="text/css" href="stylesheet/default_styles.css">
	<script language="JavaScript" type="text/javascript">
		function validate() {
			if (document.formOne.title != "") {
				return true;
			} else {
				return false;
			}
		}
	</script>
</head>

<body bgcolor="#D0ECF8" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" onLoad="javascript:document.getElementById('title').focus();">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
	<tr>
		<td height="110" bgcolor="#016694"><img src="images/spacer.gif" width="1" height="110"></td>
	</tr>
	<tr>
		<td height="2" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="2"></td>
	</tr>
	<tr>
		<td height="2" bgcolor="#016694"><img src="images/spacer.gif" width="1" height="2"></td>
	</tr>
	<tr>
		<td height="30"><img src="images/spacer.gif" width="1" height="30"></td>
	</tr>
	<tr>
		<td class="paddingLeft20">
			<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
				<tr>
					<td valign="top" align="middle">
						<table border="0" cellpadding="0" cellspacing="0">
						<?php
							if ($UpdateMode) {
						?>
						<form name="formOne" method="post" action="doUpdateSection.php" onsubmit="return validate();">
							<input type="hidden" name="sectionid" value="<?php echo $_GET['t']; ?>">
							<input type="hidden" name="updateid" value="<?php echo $s_id; ?>">
						<?php
							} else {
						?>
						<form name="formOne" method="post" action="doAddSection.php" onSubmit="return validate();">
							<input type="hidden" name="sectionid" value="<?php echo $_GET['t']; ?>">
							<input type="hidden" name="parentid" value="<?php echo $_GET['pid']; ?>">
						<?php
							}
						?>
							<tr>
								<td colspan="2" height="20"></td>
							</tr>
							<tr>
								<td class="blackTypeBold">Title for section:&nbsp;</td>
								<td><input class="textBox2" type="text" size="50" name="title" id="title" <?php if ($UpdateMode) { ?>value="<?php echo $s_title; ?>"<?php } ?>></td>
							</tr>
							<tr>
								<td height="20"></td>
							</tr>
							<tr>
								<td colspan="2" align="middle"><input type="submit" <?php if ($UpdateMode) { ?>value="Update"<?php }else{ ?>value="Submit"<?php } ?> class="button"></td>
							</tr>
						</form>
						</table>
					</td>
				</tr>
				<tr>
					<td height="100%"></td>
				</tr>
			</table>
		</td>
	</tr>
</table>
</body>
</html>