<!--#include file="../../Conn.asp" -->
<!--#include file="../../Comm/Site_Class.asp" -->
<%
PagePath = "../../"

Set Qsite = New Site_Class

Qsite.SiteConfig_Master()
%>
<!--#include file="../Check_Login.asp" -->
<%
Qsite.Check_AdminFlag(arrAdminFlag(4 , 2))

Dim Rs,Sql,i
Dim Id,custom_title,custom_content,NewsTypeId,AddDate,custom_order,custom_keywords,custom_Description
Dim strTitle,strPage,custom_url




If Request.Form <> "" Then
	Id = Qsite.chgStr(Trim(Request.Form("Id")))
	custom_title = Qsite.chgStr(Trim(Request.Form("custom_title")))
	custom_content = Qsite.chgStrHtml(Trim(Request.Form("custom_content")))
	custom_order = Qsite.chgStr(Trim(request.Form("custom_order")))
	custom_keywords = Qsite.chgStr(Trim(request.Form("custom_keywords")))
	custom_Description = Qsite.chgStr(Trim(request.Form("custom_Description")))
	custom_Url = Qsite.chgStr(Trim(request.Form("custom_Url")))
	strTitle = Qsite.chgStr(Trim(Request.Form("strTitle")))
	strPage = Qsite.chgStr(Trim(Request.Form("strPage")))
	
	If Id = "" Or IsNull(Id) Or Not IsNumeric(Id) Then
		Qsite.ShowMsg "非法参数" , ""
	End If
	If custom_title = "" Or IsNull(custom_title) Then
		Qsite.ShowMsg "请输入单页标题" , ""
	End If

	If strPage = "" Or IsNull(strPage) Or Not IsNumeric(strPage) Then strPage = 1
	
	Set rs = server.CreateObject("adodb.recordset")
    rs.Open "select * from custom where id="&id, conn, 1, 3
    	rs("custom_title") = custom_title
   		rs("custom_keywords") = custom_keywords
		rs("custom_Description") = custom_Description
		rs("custom_order") = custom_order
		rs("custom_content") = custom_content
		rs("custom_Url") = custom_url
	  rs.update
	rs.close
	set rs = nothing
	
	Qsite.ShowMsg "单页修改成功" , "about_list.asp?custom_title="& strTitle&"&page="& strPage
End If

Id = Qsite.chgStr(Trim(Request.QueryString("Id")))
strTitle = Qsite.chgStr(Trim(Request.QueryString("strTitle")))
strPage = Qsite.chgStr(Trim(Request.QueryString("strPage")))

If Id = "" Or IsNull(Id) Or Not IsNumeric(Id) Then Id = 0
If strPage = "" Or IsNull(strPage) Or Not IsNumeric(strPage) Then strPage = 1
Set Rs = server.createobject("ADODB.Recordset")
Rs.Open "select * from custom where Id = "& id , Conn , 1 , 1
If Rs.Eof Then
	Qsite.ShowMsg "非法参数" , ""
Else
	custom_title = Rs("custom_title")
	custom_content = Rs("custom_content")
	custom_order = rs("custom_order")
	custom_keywords = rs("custom_keywords")
	custom_Description = rs("custom_Description")
	AddDate = Rs("AddDate")
	custom_url = rs("custom_url")
End If
Rs.Close
set rs = nothing
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>新闻管理</title>
<link href="../style.css" rel="stylesheet" type="text/css">
<!--文本编辑器部分start-->
<link href="../news/kindeditor/themes/default/default.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="../news/kindeditor/plugins/code/prettify.css" />
<script charset="utf-8" src="../news/kindeditor/kindeditor.js"></script>
<script charset="utf-8" src="../news/kindeditor/lang/zh_CN.js"></script>
<script charset="utf-8" src="../news/kindeditor/plugins/code/prettify.js"></script>
	<script>
		KindEditor.ready(function(K) {
			var editor1 = K.create('textarea[name="custom_content"]', {
				cssPath : '../news/kindeditor/plugins/code/prettify.css',
				uploadJson : '../news/kindeditor/upload_json.asp',
				fileManagerJson : '../news/kindeditor/file_manager_json.asp',
				allowFileManager : true,
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						K('form[name=PosForm]')[0].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						K('form[name=PosForm]')[0].submit();
					});
				}
			});
			prettyPrint();
		});
	</script>
      
<!--文本编辑器部分end-->
</head>

<body>
<form name="PosForm" method="post" action="about_Edit.asp" style="margin:0">
	<table width="100%" border="0" cellspacing="1" cellpadding="5">
		<tr>
			<td height="25" colspan="2" class="td_title">单页修改
			<input name="id" type="hidden" id="id" value="<%=Id%>">
			<input name="strTitle" type="hidden" id="strTitle" value="<%=strTitle%>">
			<input name="strPage" type="hidden" id="strPage" value="<%=strPage%>"></td>
		</tr>
		
		<tr>
			<td height="23" class="td_content">单页标题：</td>
			<td height="23" class="td_content"><input name="custom_title" type="text" class="input_1" id="custom_title" size="60" value="<%=custom_title%>"></td>
		</tr>
        <tr>
			<td height="23" class="td_content">单页关键字：</td>
			<td height="23" class="td_content"><input name="custom_keywords" type="text" class="input_1" id="custom_keywords" size="60" value="<%=custom_keywords%>"></td>
		</tr>
        <tr>
			<td height="23" class="td_content">单页描述：</td>
			<td height="23" class="td_content"><input name="custom_Description" type="text" class="input_1" id="custom_Description" size="60" value="<%=custom_Description%>"></td>
		</tr>
        <tr>
			<td height="23" class="td_content">链接地址：</td>
			<td height="23" class="td_content"><input name="custom_url" type="text" class="input_1" id="custom_url" size="60" value="<%=custom_url%>"></td>
		</tr>
        <tr>
			<td height="23" class="td_content">单页排序：</td>
			<td height="23" class="td_content"><input name="custom_order" type="text" class="input_1" id="custom_order" size="60" value="<%=custom_order%>"></td>
		</tr>
		<tr>
			<td height="23" class="td_content">发布时间：</td>
			<td height="23" class="td_content"><%=AddDate%></td>
		</tr>
		<tr>
			<td height="23" class="td_content">资讯内容：</td>
			<td height="23" class="td_content"><textarea name="custom_content" class="input_1" id="custom_content" style="width:750px;height:350px;visibility:hidden;"><%=custom_content%></textarea>
			</td>
		</tr>
		<tr>
			<td height="23" class="td_content">&nbsp;</td>
			<td height="23" class="td_content"><input name="Submit" type="submit" class="input_1" value=" 修  改 "> 
			&nbsp;
			<input name="Submit" type="reset" class="input_1" value=" 重  置 ">
			&nbsp;
			<input name="Submit" type="button" class="input_1" value=" 返  回 " onClick="javascript:history.back();"></td>
		</tr>
	</table>
</form>

<%
Set Rs = Nothing
%>

</body>
</html>
