<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<%

if session("admin")="" then
  response.redirect "admin_login.asp"
end if

'12 网站配置
if not checkflag("12") then
  call mb("对不起，您没有修改网站配置的权限！","",0)
end if

if request("action")="save" then

  sitename=checkstr(trim(request.form("sitename")))
  siteurl=checkstr(trim(request.form("siteurl")))
  SiteTitle=checkstr(trim(request.form("SiteTitle")))
  logourl=checkstr(trim(request.form("logourl")))
  bannerurl=checkstr(trim(request.form("bannerurl")))
  siteemail=checkstr(trim(request.form("siteemail")))
  adminname=checkstr(trim(request.form("adminname")))
  EmailSuport=request("EmailSuport")
  SMTPServer=checkstr(trim(request.form("SMTPServer")))
  
  if sitename="" or strlength(sitename)>90  then
    call mb("网站名称不能为空或大于45个汉字！","",0) 
  end if
  if siteurl="" then
    call mb("请输入网站网址！","",0)
  end if
  if SiteTitle="" then
    call mb("请输入网站Title显示文字！","",0)
  end if
  if logourl="" then
    call mb("请输入Logo地址！","",0)
  end if
  if bannerurl="" then
    call mb("请输入网站Banner地址！","",0)
  end if
  if not isemail(siteemail) then
    call mb("请正确输入管理员Email！","",0)
  end if
  if adminname="" then
    call mb("请输入管理员名称！","",0)
  end if
  
  if EmailSuport="" then
    call mb("请选择服务器邮件支持组件！\n\n如果不支持请选择不支持！","",0)
  end if
  
  
  
set rs=server.createobject("adodb.recordset")
sql="select * from config"
rs.open sql,conn,1,3

rs("sitename")=sitename
rs("siteurl")=siteurl
rs("SiteTitle")=SiteTitle
rs("logourl")=logourl
rs("bannerurl")=bannerurl
rs("siteemail")=siteemail
rs("adminname")=adminname
rs("EmailSuport")=EmailSuport
rs("SMTPServer")=SMTPServer
rs.update

rs.close
set rs=nothing

call mb("保存网站配置信息成功！","admin_config.asp",1)

end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Flash系统-网站参数配置</title>
<script language=javascript src="../mouse_up.js"></script>
<link href="admin.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin="5" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="0" bgcolor="#000000" vspace="0" hspace="0">
  <tr bgcolor="#EFEBEF"> 
    <td height="27"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="86%"><font color="#FF3000">.:: 您可以在这里进行[网站信息配置]相关操作</font></td>
          <td width="14%" height="20" align="center"><a href="javascript:this.location.reload()"><img src="../images/refresh.gif" alt="刷新" width="40" height="12" border="0"></a></td>
        </tr>
      </table></td>
  </tr>
  <tr > 
    <td height="1" bgcolor="#000000"></td>
  </tr>
</table>
<br>
<br>
<br>
<%

response.expires=0

%>
<form action="?action=save" method="post" name="config" id="config">
  <table width="80%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
    <tr align="center" bgcolor="#EFEBEF" > 
      <td height="22" colspan="2"><font color="#000000">网 站 信 息 配 置</font></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="194" height="23" align="right">网站名称：</td>
      <td width="602" height="23">&nbsp; <input name="sitename" type="text" class="input" id="sitename" value="<%=sitename%>" size="40"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="23" align="right">网站网址：</td>
      <td height="23">&nbsp; <input name="siteurl" type="text" class="input" id="siteurl" value="<%=siteurl%>" size="40"></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td height="23" align="right">网站Title显示：</td>
      <td height="23">&nbsp; <input name="sitetitle" type="text" class="input" id="sitetitle" value="<%=SiteTitle%>" size="40"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="23" align="right">Logo地址：</td>
      <td height="23">&nbsp; <input name="logourl" type="text" class="input" id="logourl" value="<%=logourl%>" size="40"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="23" align="right">Banner地址：</td>
      <td height="23">&nbsp; <input name="bannerurl" type="text" class="input" id="bannerurl" value="<%=bannerurl%>" size="40"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="23" align="right">管理员Email:</td>
      <td height="23">&nbsp; <input name="siteemail" type="text" class="input" id="siteemail" value="<%=siteemail%>" size="40"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="23" align="right">管理员姓名：</td>
      <td height="23">&nbsp; <input name="adminname" type="text" class="input" id="adminname" value="<%=adminname%>" size="40"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="23" align="right">发送邮件组件：</td>
      <td height="23">&nbsp; <select name="EmailSuport" size="1" class="input" id="EmailSuport">
          <option value="0" <%if EmailSuport=0 then response.write " selected"%>>不支持</option>
          <option value="1" <%if EmailSuport=1 then response.write " selected"%>>JMAIL</option>
          <option value="2" <%if EmailSuport=2 then response.write " selected"%>>CDONTS</option>
          <option value="3" <%if EmailSuport=3 then response.write " selected"%>>ASPEMAIL</option>
        </select>
        如果您的服务器不支持下列组件，请选择不支持 </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="23" align="right">SMTP Server地址：</td>
      <td height="23">&nbsp; <input name="SMTPserver" type="text" class="input" id="SMTPserver" value="<%=SMTPserver%>" size="40">
        如果选择JMAIL，则此栏不用填写</td>
    </tr>
    <tr align="center" bgcolor="#FFFFFF"> 
      <td height="30" colspan="2"> <input name="Submit" type="submit" class="button" value=" 确定保存 "> 
      </td>
    </tr>
  </table>
</form>
<%

call closeconn()
%>

</body>
</html>
