Location: PHPKode > projects > Employee Scheduling System > essv1-2/editNotes.php
<?php require_once('common.php'); 
// $Id: editNotes.php,v 1.8 2005/02/04 07:54:31 atrommer Exp $
checkUser($_SESSION['USERTYPE'], 2);
// check for postback
if ($_POST['isPostback']){
	updateNotes($_POST['hdEvent'], sanitizeInput(($_POST['taComments'])));
	redirect('editSched.php?area='.$_POST['area']);
}

if (isset($_REQUEST['event'])){ 
	$oEvent = getEventDetails($_REQUEST['event']);
	// if we don't have a month set, pull it from area
	if (strlen($oEvent->event_comments)){
		$sNotes = $oEvent->event_comments;	
	} else {
		$sNotes = getAreaTempl($_REQUEST['area']);
	}
} else {
	accessDenied("Please choose an event to edit first using Manage Schedules");
}
doHeader("Editing notes for ".$oEvent->event_name, 'taComments');
?>

		<b><?=$oEvent->event_name?></b>
		<br>
		  <span class="contactInfo"><?= date("l, F jS, Y", strtotime($oEvent->event_date))?> 
		  (<?= date("g:i a", strtotime($oEvent->event_start)) ?> 
		  - 
		  <?= date("g:i a", strtotime($oEvent->event_end))?>)</span>
		<p>
		<form name="frmEditNotes" action="editNotes.php" method="post">
       		<input type="hidden" name="hdEvent" value="<?=$_REQUEST['event']?>">
       		<input type="hidden" name="area" value="<?=$_REQUEST['area'] ?>">
			<input type="hidden" name="isPostback" value="1">
			<textarea id="taComments" name="taComments" cols="100" rows="25"><?
			print $sNotes;
			?></textarea> 
			<p align="center"><input type="submit" name="btSubmit" value="Save Changes?"></p>
		</form>  
<? doFooter(); ?>
Return current item: Employee Scheduling System