<!--#include file="../Include/conig.asp"-->
<!--#include file="Admin_check.asp"-->
<%
response.expires = 0 
response.expiresabsolute = now() - 1 
response.addHeader "pragma","no-cache" 
response.addHeader "cache-control","private" 
Response.cachecontrol = "no-cache"
if Instr(session("AdminPurview"),"|118,")=0 then 
  response.write ("<font color='red')>你不具有该管理模块的操作权限，请返回！</font>")
  response.end
end if
'========判断是否具有管理权限 
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/Admin_css.css" type=text/css rel=stylesheet>
<script language="javascript" src="images/Admin.js"></script>
<script charset="utf-8" src="../WinEditor/kindeditor.js"></script>
<script charset="utf-8" src="../WinEditor/lang/zh_CN.js"></script>
<script charset="utf-8" src="../WinEditor/plugins/code/prettify.js"></script>
<script>
		KindEditor.ready(function(K) {
			var editor = K.create('textarea[name="content"]', {
				cssPath : '../WinEditor/plugins/code/prettify.css',
				uploadJson : '../WinEditor/upload_json.asp',
				allowFileManager : true,
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
				}
			});
			prettyPrint();
		});
</script>
<title>关于我们</title></head>
<body>
<% 
dim Result
Result=request.QueryString("Result")
dim ID,AboutName,Content
ID=request.QueryString("ID")
call AboutEdit() 
%>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#6298E1">
  <tr>
    <td height="24" nowrap background="images/skin/th_bg.gif"><font color="#FFFFFF">&nbsp;<strong>关于我们：添加，修改介绍相关的内容</strong></font></td>
  </tr>
  <tr>
    <td height="24" align="center" nowrap  bgcolor="#EBF2F9"><a href="Admin_Abedit.asp?Result=Add" onClick='changeAdminFlag("添加关于我们")'>关于我们</a><font color="#0000FF">&nbsp;|&nbsp;</font><a href="Admin_AbList.asp" onClick='changeAdminFlag("关于我们")'>查看关于我们</a></td>
  </tr>
</table>
<br>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#6298E1">
  <form name="editAboutForm" method="post" action="Admin_Abedit.asp?Action=SaveEdit&Result=<%=Result%>&ID=<%=ID%>">
  <tr>
    <td height="24" nowrap bgcolor="#EBF2F9"><table width="100%" border="0" cellpadding="0" cellspacing="0" id=editProduct idth="100%">

      <tr>
        <td width="120" height="20" align="right">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="20" align="right">名称：</td>
        <td><input name="AboutName" type="text" class="textfield" id="AboutName" style="WIDTH: 240;" value="<%=AboutName%>" maxlength="100">
&nbsp;*&nbsp;不少于3个字符</td>
      </tr>
      <tr>
        <td height="24" align="right" valign="top">内容：<br>
        <td><textarea name="content" style="width:700px;height:300px;visibility:hidden;"><%=content%></textarea>
	</td>
      </tr>
      <tr>
        <td height="30" align="right">&nbsp;</td>
        <td valign="bottom"><input name="submitSaveEdit" type="submit" class="button"  id="submitSaveEdit" value="保存" style="WIDTH: 80;" ></td>
      </tr>
      <tr>
        <td height="20" align="right">&nbsp;</td>
        <td valign="bottom">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  </form>
</table>
</BODY>
</HTML>
<%
sub AboutEdit()
  dim Action,rsCheckAdd,rs,sql
  Action=request.QueryString("Action")
  if Action="SaveEdit" then '保存编辑管理员
    set rs = server.createobject("adodb.recordset")
    if len(trim(request.Form("AboutName")))<3 then
      response.write ("<script language=javascript> alert('名称为必填项目！');history.back(-1);</script>")
      response.end
    end if
    if Result="Add" then '创建网站管理员
	  sql="select * from Web_rui_v_About"
      rs.open sql,conn,1,3
      rs.addnew
      rs("AboutName")=trim(Request.Form("AboutName"))
	  rs("Content")=Request.Form("Content")
	  rs("Sequence")=999
	  rs("AddTime")=now()
	end if  
	if Result="Modify" then '修改网站管理员
      sql="select * from Web_rui_v_About where ID="&ID
      rs.open sql,conn,1,3
      rs("AboutName")=trim(Request.Form("AboutName"))
	  rs("Content")=Request.Form("Content")
	end if
	rs.update
	rs.close
    set rs=nothing 
    response.write "<script language=javascript> alert('成功编辑关于我们！');location.replace('Admin_AbList.asp');</script>"
  else '提取管理员
	if Result="Modify" then
      set rs = server.createobject("adodb.recordset")
      sql="select * from Web_rui_v_About where ID="& ID
      rs.open sql,conn,1,1
	  AboutName=rs("AboutName")
      Content=rs("Content")
	  ChildFlag=rs("ChildFlag")
	  rs.close
      set rs=nothing 
	end if
  end if
end sub
%>
