<? require("config.php"); ?>
<title>- site name - admin menu - edit site -</title>
<table width="393" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="394"> </td>
</tr>
<tr>
<td><div align="center">
<?
if (isset($_POST["edit_news_done"]))
{
edit_news($_POST['edit_news_title'],$_POST['edit_news_autor'],$_POST['category'],$_POST['edit_news_context'],$_POST['news_id']);}
if (isset($_POST["delete_news"]))
{
delete_news($_POST['news_id']);}
if (isset($_POST["add_new_news"]))
{
add_new_news($_POST['news_title'],$_POST['news_autor'],$_POST['category'],$_POST['news_context']);}
?>
</div></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<table width="200" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center">
<?php
if (isset($_POST["edit_news"]))
{
$news_id = stripslashes($_POST['news_id']);
$get_edit_news = $db->Execute("Select news_title,news_autor,news_category,news_context from MuWeb_news where news_id='$news_id'");
$get_edit_news_ = $get_edit_news->fetchrow();
echo ('<table width="393" border="0" align="center" cellpadding="0" cellspacing="4">
<tr>
<td><div align="center">
<fieldset>
<legend>Edit News</legend>
<table width="474" border="0" cellspacing="0" cellpadding="0">
<tr>
<th class="sort-table" scope="row"> Edit News </th>
</tr>
</table>
<table width="457" border="1" cellspacing="0" cellpadding="0">
<tr>
<th scope="row"><form action="" method="post" name="edit_news_form" id="edit_news_form">
<div align="center">
<p>
</p>
<table width="468" border="0" cellpadding="0" cellspacing="4">
<tr>
<td width="63" scope="row"><div align="right" class="text_administrator">News Title </div></td>
<td width="393" scope="row"><input name="edit_news_title" type="text" id="edit_news_title" size="40" maxlength="100" value="'.$get_edit_news_[0].'"></td>
</tr>
<tr>
<td width="63" scope="row"><div align="right" class="text_administrator">Author</div></td>
<td scope="row"><input name="edit_news_autor" type="text" id="edit_news_" size="20" maxlength="20" value="'.$get_edit_news_[1].'">
<input name="edit_news_done" type="hidden" id="edit_news_done" value="edit_news_done">
<input name="news_id" type="hidden" id="news_id" value="'.$news_id.'"></td>
</tr>
<tr>
<td width="63" scope="row"><div align="right" class="text_administrator">Category</div></td>
<td scope="row"><select name="category" id="category">
<option value="NEWS">NEWS</option>
<option value="ANNOUNCEMENT">ANNOUNCEMENT</option>
<option value="PATCH">PATCH</option>
<option value="RELEASE">RELEASE</option>
<option value="RULES">RULES</option>
<option value="EVENT">EVENT</option>
</select><span class="text_administrator">Curent('.$get_edit_news_[2].')</span></td>
</tr>
</table>
<table width="200" border="0" align="center">
<tr>
<td><div align="center">');
$oFCKeditor = new FCKeditor('edit_news_context');
$oFCKeditor->BasePath = 'includes/news/';
$oFCKeditor->Value = stripslashes($get_edit_news_[3]);
$oFCKeditor->Width = '465';
$oFCKeditor->Height = '500';
$oFCKeditor->ToolbarSet = 'Default';
$oFCKeditor->Create();
echo (' </div></td>
</tr>
</table>
<table width="200" border="0" align="center" cellpadding="0" cellspacing="4">
<tr>
<td width="111" scope="row"><div align="right">
<input type="submit" name="Submit" value="Edit News" class="button">
</div></td>
<td width="77" scope="row"><div align="left">
<input type="reset" name="Reset" value="Reset" class="button">
</div></td>
</tr>
</table>
</div>
</form></th>
</tr>
</table>
</fieldset>
</div></td>
</tr>
</table>');
;}
else {
echo ('<table width="393" border="0" align="center" cellpadding="0" cellspacing="4">
<tr>
<td><div align="center">
<fieldset>
<legend>Add New News </legend>
<table width="474" border="0" cellspacing="0" cellpadding="0">
<tr>
<th class="sort-table" scope="row"> New News </th>
</tr>
</table>
<table width="457" border="1" cellspacing="0" cellpadding="0">
<tr>
<th scope="row"><form action="" method="post" name="new_news_form" id="new_news_form">
<div align="center">
<p>
</p>
<table width="468" border="0" cellpadding="0" cellspacing="4">
<tr>
<td width="63" scope="row"><div align="right" class="text_administrator">News Title </div></td>
<td width="393" scope="row"><input name="news_title" type="text" id="news_title" size="40" maxlength="100"></td>
</tr>
<tr>
<td width="63" scope="row"><div align="right" class="text_administrator">Author</div></td>
<td scope="row"><input name="news_autor" type="text" id="news_autor" size="20" maxlength="20"><input name="add_new_news" type="hidden" id="add_new_news" value="add_new_news"></td>
</tr>
<tr>
<td width="63" scope="row"><div align="right" class="text_administrator">Category</div></td>
<td scope="row"><select name="category" id="category">
<option value="NEWS">NEWS</option>
<option value="ANNOUNCEMENT">ANNOUNCEMENT</option>
<option value="PATCH">PATCH</option>
<option value="RELEASE">RELEASE</option>
<option value="RULES">RULES</option>
<option value="EVENT">EVENT</option>
</select></td>
</tr>
</table>
<table width="200" border="0" align="center">
<tr>
<td><div align="center">');
$oFCKeditor = new FCKeditor('news_context');
$oFCKeditor->BasePath = 'includes/news/';
$oFCKeditor->Value = '';
$oFCKeditor->Width = '465';
$oFCKeditor->Height = '500';
$oFCKeditor->Create();
echo (' </div></td>
</tr>
</table>
<table width="200" border="0" align="center" cellpadding="0" cellspacing="4">
<tr>
<td width="111" scope="row"><div align="right">
<input type="submit" name="Submit" value="Add News" class="button">
</div></td>
<td width="77" scope="row"><div align="left">
<input type="reset" name="Reset" value="Reset" class="button">
</div></td>
</tr>
</table>
</div>
</form></th>
</tr>
</table>
</fieldset>
</div></td>
</tr>
</table>');
;}
?>
</div></td>
</tr>
</table>
<table width="200" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td scope="row"><div align="center">
<? include_once("includes/news_list.php"); ?>
</div></td>
</tr>
</table>