<%@language=VBScript.Encode codepage=936 %>
<!--#include file="conn.asp"-->
<!--#include file="application.asp"-->
<!--#include file="admin.asp"-->
<!--#include file="Inc/Function.asp"-->
<%
IF Trim(Request("action"))="Edit" then
   ID     =repens(Trim(Request("ID")))
   Title  =repens(Trim(Request("Title")))
   ArtKeyWord=repens(Trim(Request("ArtKeyWord")))
   ArtDesc=repens(Trim(Request("ArtDesc")))
   Content=repens(Trim(Request("Content")))
   HtmlFile  =repens(Trim(Request("HtmlFile")))
   UpdateTime=now()
   set rs=server.CreateObject("adodb.recordset")
   rs.open"select * from Article where ArtID="&ID,conn,1,3
   If not rs.eof then
      Rs("ArtTitle")=Title
	  Rs("ArtKeyWord")=ArtKeyWord
	  Rs("ArtDesc")=ArtDesc
	  Rs("ArtClass")="业务范围"
	  Rs("ArtContent")=Content
	  Rs("UpdateTime")=UpdateTime
	  Rs("HtmlFile")=HtmlFile
   Rs.update
   Rs.close:set Rs=nothing
   Response.Redirect("BusinessEdit.asp?ID="&ID)
   End if
End If

dim rs,ID
dim sql
ID=Trim(Request("ID"))
set rs=server.createobject("adodb.recordset")
sql = "select * from Article where ArtID="&ID
rs.open sql,conn,1,1
%>
<script language = "JavaScript">
function CheckForm()
{
	if (document.myform.title.value.length == 0) {
		alert("单页标题没有填写.");
		document.myform.title.focus();
		return false;
	}
	return true;    
	if (editor.EditMode.checked==true)
	  document.myform.Content.value=editor.HtmlEdit.document.body.innerText;
    else
	  document.myform.Content.value=editor.HtmlEdit.document.body.innerHTML; 

}
</script>
<!-- #include file="Inc/Head.asp" -->

<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
   
    <td align="center" valign="top">
	<table width="95%" border="0" cellpadding="2" cellspacing="1" class="table_southidc">
        <form method="POST" name="myform" onSubmit="return CheckForm();" action="BusinessEdit.asp?action=Edit" target="_self">
		<input type="hidden" value="<%=ID%>" name="ID">
          <tr> 
            <td class="back_southidc" height="30" colspan="2" align="center">编辑<%=rs("ArtTitle")%></td>
          </tr>
          <tr bgcolor="#ECF5FF"> 
            <td width="20%" height="25" align="right"><font color="#FF0000">*</font>文章标题：</td>
            <td width="80%">&nbsp;<input name="title" value="<%=rs("ArtTitle")%>" type="text" class="input" size="30" maxlength="50"></td>
          </tr>
		  <tr bgcolor="#ECF5FF"> 
            <td width="20%" height="25" align="right"><font color="#FF0000">*</font>文章关键字：</td>
            <td width="80%">&nbsp;<input name="ArtKeyword" value="<%=rs("ArtKeyWord")%>" type="text" class="input" size="30" maxlength="50"></td>
          </tr>
		  <tr bgcolor="#ECF5FF"> 
            <td width="20%" height="25" align="right"><font color="#FF0000">*</font>文章描述：</td>
            <td width="80%">&nbsp;<textarea name="ArtDesc" cols="50" rows="4"><%=rs("ArtDesc")%></textarea>
            **控制在150字以内</td>
          </tr>
          <tr bgcolor="#ECF5FF"> 
            <td height="25" align="right" valign="top"><font color="#FF0000">*</font>文章内容：</td>
            <td valign="top"> <textarea name="Content" style="display:none"><%=Rs("ArtContent")%></textarea>
            <iframe ID="eWebEditor1" src="Southidceditor/ewebeditor.asp?id=content&style=southidc" frameborder="0" scrolling="no" width="85%" HEIGHT="450"></iframe></td>
          </tr>
         
          <tr bgcolor="#ECF5FF"> 
            <td height="25" align="right"><font color="#FF0000">*</font>Html文件：</td>
            <td> <input name="HtmlFile" type="text" class="input" value="<%=Rs("HtmlFile")%>" size="30"></td>
          </tr>
          <tr> 
            <td height="30" colspan="2" align="center" bgcolor="#ECF5FF"> <input type="submit" name="Submit" value="提交" class="input">
              　 
              <input type="reset" name="Submit" value="重置" class="input"> </td>
          </tr>
        </form>
      </table></td>
  </tr>
</table>
<!-- #include file="Inc/Foot.asp" -->