<?php
define('IN_SYS',TRUE);
define('IN_AdminMenu',TRUE);
require './admin_config.php';
require '../config.php';
require '../setup.php';
require("../lib/admin_chk.php");
?>
<?php
$pageTitle="新增单页信息";

$infoTable = "singlepage";
$Type = $_GET["Type"];
if($Type=="up"){
	if($_POST["title"]==""){
		OutErrorBack("标题不能够为空!");
	}
	mysql_query("insert into ".DB_TablePre.$infoTable." (title,content,Content_img,adate) values ('".$_POST["title"]."','".$_POST["d_content"]."','".RequestImg(stripslashes($_POST["d_content"]))."','".now()."')");
	OutErrorGo("添加成功!","diyPageList.php");
}
?><!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex,nofollow" />
<title><?php echo $pageTitle?><?php echo $sysTitle?></title>
<link href="templates/admin.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../lib/jquery/jquery.js"></script>
<script type="text/javascript" src="js/controlPanelMenu.js"></script>
<script type="text/javascript" src="js/commmonAdmin.js"></script>
<script type="text/javascript" src="../apps/_8816a37faf9597de8c595dbf8ff9d628$/ckeditor.js"></script>
<script type="text/javascript" src="../lib/validform/source.js"></script>
<link type="text/css" rel="stylesheet" href="../lib/validform/validform.css">
</head>
<body>
<?php
include("./admin_header.php")
?>
<div id="containerAdmin" class="wrapper_m">
<div id="sidebarAdmin">
<?php
include("./admin_controlPanelDir.php")
?>
</div>
<div id="contentbarAdmin">
<div class="tips_2"><?php echo adminPageLocation($pageTitle)?></div>

<form action="?Type=up" method="post" name="formAdmin" target="_parent" id="formAdmin">
<table cellspacing="1" class="adminTableV0">
<tr>
<td class="tw_1">名称：</td>
<td class="tw_2"><input name="title" type="text" class="moduleBorderA moduleInputA iW_400" id="title" datatype="*" nullmsg="请输入标题！" errormsg="标题不能为空！"></td>
</tr>
<tr>
<td class="tw_1">内容：</td>
<td class="tw_2"><textarea name="d_content" id="d_content"></textarea></td>
</tr>
<tr>
<td colspan="2" class="tw_3"><input name="Submit" type="submit" value="发布" class="btn_2"></td>
</tr>	
</table>
</form>

</div>
<div class="clearfix"></div>
</div>
<?php
include("./admin_footer.php")
?>
<script type="text/javascript" src="js/init.js"></script>
</body>
</html>