<? include("si_confi.php"); ?>
<? include("ad_head.php");?>  <div class="container">
  <? include("mn_option.php");?>
<?
if(isset($_REQUEST['submit_emp']))
{
	$news=base64_encode($_REQUEST['news']);
    $circulars=base64_encode($_REQUEST['circulars']);
	$events=base64_encode($_REQUEST['events']);

	$insert_employeee_details=mysql_query("update `news_mng` set `news`='$news',`circulars`='$circulars',`events`='$events' where `id`='1'");
	?>
	<script>window.location="neweven.php?ed=suc";</script><? } 
	$selec_news=mysql_query("select * from `news_mng` where `id`='1'");
	$fetch_new_eve=mysql_fetch_array($selec_news);
	?>
 
 
 
 <? if($_REQUEST['ed']=='suc'){ ?>
  <div class="success" style="width:92%;margin:0 auto;margin-top:9px;">Changes saved successfully.</div><? } ?>
  
  

   <div style="border:groove;margin-top:10px;border-width:thin;padding:20px;border-radius:4px;border-color:#cccccc;box-shadow: 10px 9px 90px #000;">
   <h2>News/Events/Circulars</h2>
  <form method="post" enctype="multipart/form-data" name="form" id="add_employee" onSubmit="return validate();" autocomplete="off" action="<?php echo $_SERVER['PHP_SELF']; ?>">
  
  <script src="normal_editor.js" type="text/javascript"></script>
<script type="text/javascript">
bkLib.onDomLoaded(function() {	
	new nicEditor({maxHeight : 200}).panelInstance('description');
});
bkLib.onDomLoaded(function() {	
	new nicEditor({maxHeight : 200}).panelInstance('description1');
});
bkLib.onDomLoaded(function() {	
	new nicEditor({maxHeight : 200}).panelInstance('description2');
});
</script>


  <input type="hidden" value="<? echo $get_emp_id ?>" name="emp_row_id">
        <script type="text/javascript" src="prototype.js"></script>
        <script type="text/javascript" src="validation.js"></script>
       <table cellpadding="9" id="add_employee">
        <tr>
        <td valign="top">News</td>
        <td>
        <textarea name="news" id="description"><? echo base64_decode($fetch_new_eve['news']); ?></textarea>
        </td>
        </tr>
         <tr>
        <td valign="top">Events</td>
        <td><textarea name="events" id="description1"><? echo base64_decode($fetch_new_eve['events']); ?></textarea></td>
        </tr>
         <tr>
        <td valign="top">Circulars</td>
        <td><textarea name="circulars" id="description2"><? echo base64_decode($fetch_new_eve['circulars']); ?></textarea></td>
        </tr>
        <td valign="top">&nbsp;</td>
        <td><input type="submit" name="submit_emp" value="Update" onClick="return confirm('Are you sure you want to confirm Update Details ?');"></td>
        </tr>
        </table>
		</form>
         <script type="text/javascript">
						function formCallback(result, form) 
						{window.status = "valiation callback for form '" + form.id + "': result = " + result;}
						var valid = new Validation('add_employee', {immediate : true, onFormValidate : formCallback});
					</script>
  </div>
</div><!-- container -->
  </body>
</html>