Location: PHPKode > projects > Gsys > calendar/edit_event.php
<?PHP
//Filename : edit_event.php
//Description : edit event on the calendar
//Author :  darc
//Last modified :  2006.12.20

    include '../includes/db.php';
    include '../includes/auth_ec.php';

    $event_id = $_POST['event_id'];
    $sql = "SELECT * FROM calendar WHERE event_id = $event_id LIMIT 1";
    $result = mysql_query($sql,$connection) or die(mysql_error());
    $row = mysql_fetch_array($result);
    
    $date_time = $row['date_time'];
    $title = $row['title'];
    $description = $row['description'];
	$mandatory = $row['mandatory'];
?>
<html>
<head>
<link href="../includes/index.css" rel="stylesheet" type="text/css">
<title>Gsys :: Edit Event</title>
</head>

<body class="body">
<br />
<table width="810" height="626" border="0" align="center" cellpadding="15">
  <tr> 
    <td height="128" colspan="2"><img src="../images/eg_banner.gif" width="810" height="172"></td>
  </tr>
  <tr> 
    <td width="27%" height="488" valign="top"> <?php include '../includes/nav.inc'; ?></td>
    <td width="53%" align="center">
<center><strong>Edit Event</strong></center>
<br /><br />

<form method="post" action="calendar_functions.php?cat=edit_event">
<input type="hidden" name="posted_by" value="<?php session_start(); echo $_SESSION[current_user]; ?>">

<strong>Event Name:</strong>
<INPUT TYPE="text" NAME="title" SIZE="20" value="<?php echo $title;?>"><br /><br />
<strong>Description:</strong><br />
<textarea cols="40" rows="5" name="description" value="<?php echo $description;?>"></textarea>
<br />
YOU HAVE TO RE-ENTER THE CORRECT DATE (I WILL FIX THIS SOON)
<br />
<strong>Month:</strong>
<SELECT NAME="month">
<OPTION VALUE="01">January
<OPTION VALUE="02">February
<OPTION VALUE="03">March
<OPTION VALUE="04">April
<OPTION VALUE="05">May
<OPTION VALUE="06">June
<OPTION VALUE="07">July
<OPTION VALUE="08">August
<OPTION VALUE="09">September
<OPTION VALUE="10">October
<OPTION VALUE="11">November
<OPTION VALUE="12">December
</select>

<strong>  Day:</strong>
<SELECT NAME="day">
<OPTION VALUE="01">01
<OPTION VALUE="02">02
<OPTION VALUE="03">03
<OPTION VALUE="04">04
<OPTION VALUE="05">05
<OPTION VALUE="06">06
<OPTION VALUE="07">07
<OPTION VALUE="08">08
<OPTION VALUE="09">09
<OPTION VALUE="10">10
<OPTION VALUE="11">11
<OPTION VALUE="12">12
<OPTION VALUE="13">13
<OPTION VALUE="14">14
<OPTION VALUE="15">15
<OPTION VALUE="16">16
<OPTION VALUE="17">17
<OPTION VALUE="18">18
<OPTION VALUE="19">19
<OPTION VALUE="20">20
<OPTION VALUE="21">21
<OPTION VALUE="22">22
<OPTION VALUE="23">23
<OPTION VALUE="24">24
<OPTION VALUE="25">25
<OPTION VALUE="26">26
<OPTION VALUE="27">27
<OPTION VALUE="28">28
<OPTION VALUE="29">29
<OPTION VALUE="30">30
<OPTION VALUE="31">
</select>

<strong>  Year:</strong>
<SELECT NAME="year">
<OPTION VALUE="2006">2006
<OPTION VALUE="2007">2007
<OPTION VALUE="2008">2008
<OPTION VALUE="2009">2009
<OPTION VALUE="2010">2010
</select>
<br />

<input type="checkbox" name="mandatory" value="<?php echo $mandatory;?>">  Mandatory Attendence? <br />


<INPUT TYPE="SUBMIT" NAME="submit" VALUE="Edit Event">
</form>
   </td>
  </tr>
</table>
Return current item: Gsys