<!--#include file="../conn2.asp"-->
<!--#include file="set.asp"-->
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<% menu=request.querystring("menu")
select case menu
case ""
Set rs = Server.CreateObject("ADODB.Recordset")
sql = "SELECT *  FROM bbsinfo"
rs.open sql, conn, 1,1

case "save"
advshow=request("advshow")
Set rs1 = Server.CreateObject("ADODB.Recordset")
sql = "SELECT  *  FROM bbsinfo "
rs1.open sql, conn, 3,3
RS1("bbsname")=request.form("bbsname")
RS1("logo")=request.form("logo")
RS1("logourl")=request.form("logourl")
RS1("ll")=request.form("ll")
RS1("tp")=request.form("tp")
RS1("online")=request.form("online")
if advshow=1 then
rs1("advshow")=advshow
rs1("smtp")=request.form("smtp")
rs1("MailServerUserName")=request.form("MailServerUserName")
rs1("MailServerPassword")=request.form("MailServerPassword")
else
rs1("advshow")=0
end if
RS1("upload")=request.form("upload")
RS1("uploadlx")=request.form("uploadlx")
rs1.update
rs1.Close
set rs1=nothing
response.write"<script language='javascript'>alert('修改成功')</script>"
response.write "<script language='javascript'>window.location='bbsinfo.asp'</script>"
end select
%>
<style type="text/css">
<!--
.style1 {color: #000000}
.STYLE3 {color: #000000; font-weight: bold; }
-->
</style>
<head>

<LINK href="css.css" type=text/css rel=stylesheet>
</head>
<script>
function showadv(){
if (document.snsn.advshow.checked == true) {
adv.style.display = "";
}else{
adv.style.display = "none";
}
}

function title_color(color){document.snsn.topic.style.color = color;}
</script>
<div align="center"> <center> <form method="post" action="?menu=save" name="snsn"> <br>
<table width="90%" border="0" align="center" cellpadding="2" cellspacing="1" bordercolordark="#FFFFFF" bgcolor="#CCCCCC">
  <tr bgcolor="f1f1f1" class=a1> 
    <td height="25" colspan="2" align="center" bgcolor="f1f1f1" class="norightbuttonborder2"><span class="STYLE3">社区基本设置</span></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td width="24%" height="25"> <p align="center">论坛名称</td>
    <td width="76%" height="25"><font color="#336699"> 
      <input name="bbsname" type="text" class="wenbenkuang" value="<%=rs("bbsname")%>" size="50">
    </font></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td width="24%" height="25"> <p align="center">论坛广告</td>
    <td width="76%" height="12"><font color="#336699"> 
      <input name="logo" type="text" class="wenbenkuang" size="50" value="<%=rs("logo")%>" >
      <a href=# onclick="window.open('/upload.asp?formname=snsn&editname=logo&infoname=bbs&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=25')">上传图片</a></font></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="25">&nbsp;</td>
    <td height="12"><font color="#336699">(注：上传时需在网站总后台登陆最高权限的管理员，并在登录状态下，来操作此处。<br />
      上传图片以后，需要在自动生成的图片链接的代码的最前面加 \ 符号，以保证路径正确。
    )</font></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="25"><div align="center">广告连接</div></td>
    <td width="76%" height="12"><font color="#336699">
      <input name="logourl" type="text" class="wenbenkuang"  id="logourl" value="<%=rs("logourl")%>" size="50">
    </font></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td width="24%" height="25"> <p align="center">帖子浏览</td>
    <td width="76%" height="-1">
      <input name="ll" type="radio" value="0" <%if rs("ll")=0 then%>checked<%end if%>>
    允许所有用户浏览（包括游客） 
    <input type="radio" name="ll" value="1" <%if rs("ll")=1 then%>checked<%end if%>>
    只允许会员以上级浏览</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="25"><div align="center">图片上传</div></td>
    <td width="76%" height="-1"><input name="tp" type="radio" value="0" <%if rs("tp")=0 then%>checked<%end if%>>
允许所有用户上传  <input type="radio" name="tp" value="1" <%if rs("tp")=1 then%>checked<%end if%>>
只允许版主以上上传  
<input type="radio" name="tp" value="2" <%if rs("tp")=2 then%>checked<%end if%>>
只允许管理员上传</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="25"><div align="center">首页用户在线</div></td>
    <td width="76%" height="-2"><input name="online" type="radio" value="0" <%if rs("online")=0 then%>checked<%end if%>>
显示
  <input type="radio" name="online" value="1" <%if rs("online")=1 then%>checked<%end if%>>
不显示</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="25"><div align="center">论坛状态</div></td>
    <td width="76%" height="0"><span class="Forumrow">
      <select name="Upload" class="wenbenkuang" id="Upload">
        <option value="0" <%if rs("upload")=0 then%>selected<%end if%>>关闭
        <option value="1" <%if rs("upload")=1 then%>selected<%end if%>>开启</option>
      </select></span></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td height="25"><div align="center">关闭状态说明</div></td>
    <td width="76%" height="25"><input name="uploadlx" class="wenbenkuang" type="text" id="uploadlx" size="26" value="<%=rs("uploadlx")%>"></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td height="25"> <%if rs("advshow")=1 then 
    aa="checked"
    end if%>
    <p align="center">是否开启发送注册资料</td>
    <td height="25"> <INPUT id=advcheck name=advshow type=checkbox value=1 onclick=showadv() <%=aa%> ><label for=advcheck>  
    开启 </label>(必须支持jmail组件)</td>
  </tr>
  <tr bgcolor="#FFFFFF" id=adv style=DISPLAY:none> 
    <td height="25" colspan="2">  
      <table border="0" width="100%" cellpadding="2" cellspacing="1" bordercolordark="#FFFFFF" >
        <tr>
          <td width="26%">
            <p align="center">邮件服务器地址</td>
          <td width="74%"><font color="#336699"> 
      <input name="smtp" type="text" class="wenbenkuang" value="<%=rs("smtp")%>" size="33">
      </font></td>
        </tr>
        <tr>
          <td width="26%">
            <p align="center">你的信箱</td>
          <td width="74%"><font color="#336699"><input name="MailServerUserName" type="text" class="wenbenkuang" value="<%=rs("MailServerUserName")%>" size="33">
      </font></td>
        </tr>
        <tr>
          <td width="26%">
            <p align="center">信箱密码</td>
          <td width="74%"><font color="#336699"><input name="MailServerPassword" type="text" class="wenbenkuang" value="<%=rs("MailServerPassword")%>" size="33">
      </font></td>
        </tr>
    </table>    </td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td height="25" colspan="2"> <p align="center"> 
        <input name="send" type="submit" class="go-wenbenkuang" value=" 提 交" >　
        <input name="send2" type="reset" class="go-wenbenkuang" value=" 重 置">
    </p></td>
  </tr>
</table>
