/home/mip/public_html_/old_mip/admin/edit_announcement.php
<?
session_start();
require_once("func_proc.php");
require_once("func_select.php");
require_once("func_select_codes.php");

do_html_header("Announcement");

$formname="thisonly";
$inputname= array("title","announcement");
$displayname= array("Title","Announcement");
JS_CheckRequired($formname,$inputname,$displayname,"","");

if($event_id){   
   $job = getdata_one("*","announcement","event_id",$event_id);
	 $event_id= $job[event_id];
	 echo mysql_error();
	 echo "<form method=post action='sqlupdate.php?what=announcement&event_id=$event_id' name='$formname' onsubmit='return CheckRequired()'>";
}
else{
	 echo "<form method=post action='sqladd.php?what=announcement&event_id=$event_id' name='$formname' onsubmit='return CheckRequired()'>";
}
?>
<tr><td height="100%" align=center valign="top">
<table align=center cellpadding='2' cellspacing='2' border=0 width=70%>
 	 <tr class=white height=30><td><br><a href='manage_announcement.php'><b><font color="#3399FF">All Announcement</font></b></a> | <a href='edit_announcement.php?Action=add'><b><font color="#3399FF">Add Announcement</font></b></a></td></tr>
	 <tr><td bgcolor="#dbdee3">
	 		<table width=100% align=center>
   			<tr><td class="box"><b>Title<font color=red>*</font></b></td>
     				<td class="box" valign=top><input name=title type=text id="title" value='<?=$job["title"]?>' size=50></td></tr>
   			<tr><td class="box"><b>Announcement</b></td>
     <td class="box" valign="top">
	 <textarea name=announcement cols="50" rows=10 id="announcement"><?=$job["announcement"]?></textarea></td></tr>
   			<tr>
   			  <td class="box"><b>Posting Date</b></td>
   			  <td class="box"><?if ($job[posting_date]==0000-00-00){
								     $today=getdate();$month=$today[mon];$day=$today[mday];$year=$today[year];
								  }
									else{
									   list ($year, $month, $day) = @split ('[-]', $job[posting_date]);
									}	  								
						  	echo dateselect("post_month","month",$month,0,0); 
						    echo dateselect("post_day","day",$day,0,0);
								echo dateselect("post_year","year",$year,1,3);?>              </td>
 			  </tr>
   			<tr>
   			  <td class="box"><b>Closing Date</b></td>
   			  <td class="box"><? list ($year, $month, $day) = @split ('[-]', $job[closing_date]); ?>
                  <?echo dateselect("close_month","month",$month,0,0);?> <?echo dateselect("close_day","day",$day,0,0);?> <?echo dateselect("close_year","year",$year,1,3);?></td>
 			  </tr>	 										 
   			
   			<tr>
   			  <td class="box" colspan=2 align=center>&nbsp;</td>
 			  </tr>
   			<tr>
   			  <td class="box" colspan=2 align=center>&nbsp;</td>
 			  </tr>
   			<tr>
     				<td class="box" colspan=2 align=center><input type=submit value="  Save  " name="job" class="button"></td></tr>
			</table>
	 		<br>
		</td></tr>
 </table>
 </tr></td>
 </form>
<?
 do_html_footer();
?>