<%@language=VBScript.Encode codepage=936 %>
<!--#include file="conn.asp"-->
<!--#include file="application.asp"-->
<!--#include file="admin.asp"-->
<!-- #include file="Inc/Head.asp" -->
<!--#include file="inc/function.asp"-->
<%
Set rs=server.CreateObject("Adodb.recordset")
if trim(request("Action"))="Save" then
   con=3
else
   con=1
end if      
rs.open"select * from SiteConfig where SiteID=1",conn,1,con
if not rs.eof then
   If con=3 then
   Rs("SiteName")  =trim(request.Form("SiteName"))
   Rs("SiteTitle") =trim(request.Form("SiteTitle"))
   Rs("SiteUrl")   =trim(request.Form("SiteUrl"))
   Rs("SiteKey")   =trim(request.Form("SiteKey"))
   Rs("SiteDesc")  =trim(request.Form("SiteDesc"))
   Rs("SiteBottom")=trim(request.Form("SiteBottom"))
   Rs.update
   rs.close:set rs=nothing
   response.Write("<script langauge='javascript'>alert('站点基本信息保存成功！');location.href='SiteConfig.asp';</script>")
   response.End() 
   else
   SiteName   =Rs("SiteName")
   SiteTitle  =Rs("SiteTitle")
   SiteUrl    =Rs("SiteUrl")
   SiteKey    =Rs("SiteKey")
   SiteDesc   =Rs("SiteDesc")
   SiteBottom =Rs("SiteBottom")
   end if
end if
rs.close:set rs=nothing
%>
<script language="javascript">
function check(){
  if (document.myform.SiteName.value==""){
    alert("请输入网站名称！");
	document.myform.SiteName.focus();
	return false;
  }
  return true;
  	if (editor.EditMode.checked==true)
	  document.myform.SiteBottom.value=editor.HtmlEdit.document.body.innerText;
    else
	  document.myform.SiteBottom.value=editor.HtmlEdit.document.body.innerHTML; 
}
</script>
<form method="POST" action="SiteConfig.asp?Action=Save" id="myform" name="myform" onSubmit="return check();">
  <table width="90%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#000000" >
    <tr> 
      <td height="24" colspan="4" class="back_southidc"> <div align="center"><strong>网 站 配 置</strong></div></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td colspan="4" class="topbg"> <strong>网站信息配置</strong></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="190" class="tdbg"><strong>网站名称：</strong></td>
      <td width="474" colspan="3" class="tdbg"> <input name="SiteName" type="text" id="SiteName" value="<%=SiteName%>" size="40" maxlength="100">      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="190" class="tdbg"><strong>网站标题：</strong></td>
      <td colspan="3" class="tdbg"> <input name="SiteTitle" type="text" id="SiteTitle" value="<%=SiteTitle%>" size="40" maxlength="100">      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="190" class="tdbg"><strong>网站地址：</strong><br>
        请添写完整URL地址(用于网站统计)</td>
      <td colspan="3" class="tdbg"> <input name="SiteUrl" type="text" id="SiteUrl" value="<%=SiteUrl%>" size="40" maxlength="255">      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="23" class="tdbg" style="font-weight: bold">网站关键字：</td>
      <td colspan="3" class="tdbg"><input name="SiteKey" type="text" id="SiteKey" value="<%=SiteKey%>" size="40" maxlength="255"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="190" class="tdbg" style="font-weight: bold">网站描述：</td>
      <td colspan="3" class="tdbg"><textarea name="SiteDesc" rows="5" cols="40"><%=SiteDesc%></textarea></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td class="tdbg"><strong>版权信息：</strong><br>
        支持HTML标记，不能使用双引号</td>
      <td colspan="3" class="tdbg">
	  <textarea name="SiteBottom" cols="50" rows="8" id="SiteBottom" style="display:none"><%=SiteBottom%></textarea>
	  <iframe id="eWebEditor1" src="Southidceditor/ewebeditor.asp?id=SiteBottom&style=southidc" frameborder="0" scrolling="no" width="90%" height="450"></iframe>
	  </td>
    </tr>
	<tr bgcolor="#FFFFFF"> 
      <td height="26" colspan="4" align="center" class="tdbg">
	  <input type="submit" name="Submit" value="提交">&nbsp;
      <input type="reset" name="button" value="重置"></td>
    </tr>
  </table>
</form>
</body>
</html>