<!--#include file="conn.asp"-->
<!--#include file="saveimage.asp"-->
<%
if not session("check")="checked" then
response.Redirect "login.asp"
end if
id=request("newsid")
title=request("title")
sSaveFileSelect=request("sSaveFileSelect")
content=request("content")
		If sSaveFileSelect="True" Then
      		Content=ReplaceRemoteUrl(Content,"/UploadFiles",sFileExt)
     	Else
      		Content=Content
		End If
set rs=server.createobject("adodb.recordset")
if request("no")="modi" then
sql="select * from about where id="&id
rs.open sql,conn,1,3
rs("title")=title
rs("content")=content
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write "<script language='javascript'>" & chr(13)
		response.write "alert('修改成功！');" & Chr(13)
		response.write "window.document.location.href='editabout.asp';"&Chr(13)
		response.write "</script>" & Chr(13)
Response.End
elseif request("no")="add" then
sql="select * from about where (id is null)"
rs.open sql,conn,1,3
rs.addnew
rs("title")=title
rs("content")=content
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write "<script language='javascript'>" & chr(13)
		response.write "alert('添加成功！');" & Chr(13)
		response.write "window.document.location.href='editabout.asp';"&Chr(13)
		response.write "</script>" & Chr(13)
Response.End
end if
%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/private.css" rel="stylesheet" type="text/css" />
<script language='javascript' src='images/private.js'></SCRIPT>
<title>关于企业</title>
</head>

<body>
<% 
newsid=request.querystring("id")
Set rso=Server.CreateObject("ADODB.RecordSet") 
sql="select * from about where id="&newsid
rso.Open sql,conn,1,1
if newsid="" then
bt="添加"
else
bt="修改"
end if
%>
<div align="center">

	<table border=0 cellspacing=1 align=center class=navi>
	<tr>
	  <th>当前位置：关于企业 &gt;&gt; 栏目<%=bt%></th>
	</tr>
	</table><br>
<table width="57%" border="0"  class="list" cellspacing="1" >
  <form name="addNEWS" method="post" <% if newsid<>"" then %> action="about.asp?no=modi"<%else%>action="about.asp?no=add" <%end if%> onSubmit="return CheckForm();">
    <tr align="center" > 
      <th height="30" bgcolor="#FF0000" colspan="2"><font color="#FFFFFF"><strong><%=bt%>栏目</strong></th>
    </tr>
    <tr> 
      <td width="12%" height="24" align="right" >
		标题：</td>
      <td width="86%" height="24" align="right" >
		<p align="left"><input name="title" type="text" class="input" value="<%=rso("title")%>" size="30"></td>
    </tr>
    <tr>
      <td height="25" width="14%" align="right">
      保存图片：</td>
      <td height="25" valign="top" width="85%">
      <input name="sSaveFileSelect" type="checkbox" class="noborder" id="sSaveFileSelect" value="True">
    保存内容中的图片到本地</td>
    </tr>
    <tr> 
      <td align="center" > 
        <p align="right">内容：</td>
      <td align="center" valign="top" > 
        <input type="hidden" name="content" value="<%=Server.HTMLEncode(rso("Content"))%>">
		<p align="left">
		<iframe ID="eWebEditor1" src="../../../../../../../../../../bjq/ewebeditor.htm?id=content&style=blue" frameborder="0" scrolling="no" width="650" HEIGHT="350"></iframe></td>
    </tr>
    <tr align="center"> 
      <td height="31" colspan="2" > 
        <input type="submit" name="Submit" value="提交" class="input">
        <input type="hidden" name="newsId" value="<%=newsId%>">　 
        <input type="reset" name="Submit2" value="重置" class="input"> 
      </td>
    </tr>
  </form>
</table>
</div>
<%
rso.close
set rso=nothing
 %>
</body>
</html>