<?php
require_once("../includes/config.php");
require_once("../includes/functions/func.global.php");
require_once("../includes/functions/loggincheck.php");
require_once('../includes/lang/admin/lang_'.$config['lang'].'.php');
require_once("class.menu.php");
// Connect to database
db_connect($config);
IF(isset($_POST))
{
IF(count($_POST) > 1)
{
mysql_query("INSERT INTO `".$config['db']['pre']."html` ( `html_id` , `html_title` , `html_content` ) VALUES ('" . addslashes($_POST['id']) . "', '" . addslashes($_POST['title']) . "', '" . addslashes($_POST['content']) . "');");
header("Location: content_edit.php");
exit;
}
}
$obj = new Menu();
$nav = $obj->get_js_menu(0,$config,$lang);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>PHPDug Admin</title>
<link rel="stylesheet" type="text/css" href="images/style.css">
<SCRIPT LANGUAGE="JavaScript" SRC="menu/JSCookMenu.js"></SCRIPT>
<LINK REL="stylesheet" HREF="menu/themes/Office/theme.css" TYPE="text/css">
<SCRIPT LANGUAGE="JavaScript" SRC="menu/themes/Office/theme.js"></SCRIPT>
<script language=JavaScript src='scripts/innovaeditor.js'></script>
<style type="text/css">
<!--
.style3 {font-size: 12}
.style5 {font-size: 11px}
-->
</style>
</head>
<body>
<!--Start top-->
<table width="850" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" height="42" align="left" background="images/bg_top.gif"><a href="index.php"><img src="images/logo.gif" width="127" height="37" hspace="10" border="0"></a></td>
</tr>
<tr>
<td><img src="images/dot.gif" width="1" height="1" alt=""></td>
</tr>
</table>
<!--End top-->
<!--Start topmenu-->
<table width="850" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#F0F0F0" height="25" style="padding-left:20px;" id="menu"><SCRIPT language="JavaScript" type="text/javascript">
var myMenu =
// Start the menu
[
<?php echo $nav; ?>
];
// Output the menu
cmDraw ('menu', myMenu, 'hbr', cmThemeOffice, 'ThemeOffice');
</SCRIPT></td>
</tr>
<tr>
<td bgcolor="#333333"><img src="images/dot.gif" width="1" height="1" alt=""></td>
</tr>
</table>
<br>
<!--End topmenu-->
<!--Start heading page-->
<table width="850" cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td class="heading"><img src="images/icons/icon_addrule.gif" width="21" height="22" alt="" align="absmiddle" hspace="5">Add Content</td>
</tr>
<tr>
<td bgcolor="#333333"><img src="images/dot.gif" width="1" height="1" alt=""></td>
</tr>
</table>
<!--End heading page-->
<!--Start form-->
<br>
<!--Start heading page-->
<br>
<!--Start form-->
<table width="850" border="0" align="center" cellpadding="0" cellspacing="0" style="border:1px solid #CCCCCC;">
<tr>
<td align="center" bgcolor="#F6F6F6" style="padding:15px;"> <form name="form1" method="post" action="">
<table width="90%" cellpadding="0" cellspacing="2" border="0">
<tr>
<td width="20%"><strong>Page ID </strong></td>
<td width="80%">:
<input name="id" type="Text" class="textbox" id="id" style="width:60%" value="<? if(isset($_POST['id'])){ echo $_POST['id']; } ?>" maxlength="8"></td>
</tr>
<tr>
<td><strong>Page Title</strong></td>
<td>:
<input name="title" type="Text" class="textbox" id="title" style="width:60%" value="<? if(isset($_POST['title'])){ echo $_POST['title']; } ?>"></td>
</tr>
<tr>
<td valign="top"><strong>Page Content </strong></td>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="7" valign="top">:</td>
<td><textarea name="content" id="content" style="width:316px;height:200px;"><? if(isset($_POST['content'])){ echo $_POST['content']; } ?></textarea>
<script>
var oEdit1 = new InnovaEditor("oEdit1");
oEdit1.REPLACE("content");
</script></td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td></td>
<td height="30" style="padding-left:6px;">
<input name="Submit" type="submit" class="button" value="<?php echo $lang['SUBMIT']; ?>">
<input name="Reset" type="reset" class="button" value="<?php echo $lang['RESET']; ?>">
</td>
</tr>
</table>
</form></td>
</tr>
</table>
<!--End form-->
<br><br>
<!--Start bottom-->
<table width="850" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#333333"><img src="images/dot.gif" width="1" height="1" alt=""></td>
</tr>
<tr>
<td style="padding:15px;" align="center"><span class="copyright">Copyright © 2008 <a href="http://www.kubelabs.com/phpdug/" class="copyright" target="_blank">Kubelabs.com</a> All Rights Reserved.</span></td>
</tr>
</table>
<!--End bottom-->
</body>
</html>