<%@language=vbscript codepage=936 %>
<%
option explicit
response.buffer=true	
Const PurviewLevel=1


%>
<!--#include file="inc/conn1.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="Admin_ChkPurview.asp"-->
<!--#include file="inc/function.asp"-->
<%
dim ObjInstalled,Action,FoundErr,ErrMsg
ObjInstalled=IsObjInstalled("Scripting.FileSystemObject")
Action=trim(request("Action"))
if Action="" then
	Action="ShowInfo"
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>欢迎使用芜湖播客家园 Wo916 v4.5-后台管理 Powered By ASBLOG</title>
<link href="Common/ASBox.css" rel="stylesheet" type="text/css">
<link href="Common/Style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="Common/Manage.js"></script>


</head>
<body>

<div id="All">

<link href="../Include/ASCalendar/syscalendar.css" title="blue" rel="stylesheet" type="text/css" media="all" />




  <%
if Action="SaveConfig" then
	call SaveConfig()
else
	call ShowConfig()
end if
if FoundErr=True then
	call WriteErrMsg()
end if
call CloseConn()

sub ShowConfig()
%>

<div id="ShowMain">
  <div class="TitleBar">通过丰富的配置,您可以建立一个属于您自己的播客家园.</div>
<form method="POST" action="Admin_SiteConfig.asp" id="form1" name="form1">
  <ul id="Tabs">
    <li id="Basic"><a href="javascript:void(0)" onclick="SelectTab('TabContent1','Basic');">网站信息配置</a></li>
    <li id="SEO"><a href="javascript:void(0)" onclick="SelectTab('TabContent2','SEO');">网站选项配置</a></li>
    <li id="Function"><a href="javascript:void(0)" onclick="SelectTab('TabContent3','Function');">用户选项设置</a></li>
    <li id="Member"><a href="javascript:void(0)" onclick="SelectTab('TabContent4','Member');">邮件服务器选项</a></li>
    <li id="Safety"><a href="javascript:void(0)" onclick="SelectTab('TabContent5','Safety');">上传文件选项</a></li>
    <li id="View"><a href="javascript:void(0)" onclick="SelectTab('TabContent6','View');">前台显示模式</a></li>
  </ul>
  <div id="TabContent">
    <!--Page1:网站信息配置-->
    <div id="TabContent1" class="ShowTabCon">
      <p><span class="left">网站名称:</span><input type="text" name="SiteName" maxlength="50" value="<%=SiteName%>" class="text normaltext" /></p>
      <p><span class="left">网站标题:</span><input type="text" name="SiteTitle" maxlength="200" value="<%=SiteTitle%>" class="text normaltext" /></p>
      <p><span class="left">网站地址:</span><input type="text" name="SiteUrl" maxlength="200" value="<%=SiteUrl%>" class="text normaltext" /></p>
      <p><span class="left">LOGO地址:</span><input type="text" name="LogoUrl" maxlength="50" value="<%=LogoUrl%>" class="text normaltext" /></p>
      <p><span class="left">站长姓名:</span><input type="text" name="WebmasterName" id="BlogEstablish" value="<%=WebmasterName%>" class="text shorttext" readonly /></p>
      <p><span class="left">站长信箱:</span><input type="text" name="WebmasterEmail" maxlength="50" value="<%=WebmasterEmail%>" class="text normaltext" /></p>
      
      <p><span class="left">版权信息:</span><textarea name="Copyright" class="text middletextarea" /><%=Copyright%></textarea></p>
    </div>




    <!--Page2:网站选项配置-->
    <div id="TabContent2" class="ShowTabCon">
     
      <p><span class="left">是否开放文件上传功能:</span>         <input type="radio" name="EnableUploadFile" value="Yes" <%if EnableUploadFile="Yes" then response.write "checked"%>>
        是 &nbsp;&nbsp;&nbsp;&nbsp; 
        <input type="radio" name="EnableUploadFile" value="No" <%if EnableUploadFile="No" then response.write "checked"%>>
      否<input type="hidden" name="ShowClassTreeGuide" value="Yes" ><input type="hidden" name="ShowPopMenu" value="No">
	    <input type="hidden" name="ShowSiteChannel" value="Yes">
		<input type="hidden" name="ShowMyStyle" value="Yes">
		<input type="hidden" name="EnableArticleCheck" value="no">
		<input type="hidden" name="EnableGuestCheck" value="No">
		<input name="PopAnnounce" type="hidden" value="No">
		<input name="CommentPurview" type="hidden" value="999"></p>
      <p><span class="left">是否保存远程图片到本地:</span><input type="radio" name="EnableSaveRemote" value="Yes" <%if EnableSaveRemote="Yes" then response.write "checked"%>>
        是 &nbsp;&nbsp;&nbsp;&nbsp; 
        <input type="radio" name="EnableSaveRemote" value="No" <%if EnableSaveRemote="No" then response.write "checked"%>>
      否</p>
      <p><span class="left">是否开放友情链接申请:</span><input type="radio" name="EnableLinkReg" value="Yes" <%if EnableLinkReg="Yes" then response.write "checked"%>>
        是 &nbsp;&nbsp;&nbsp;&nbsp; 
        <input type="radio" name="EnableLinkReg" value="No" <%if EnableLinkReg="No" then response.write "checked"%>>
      否</p>
 <p><span class="left">Session会话的保持时间:</span> <input name="SessionTimeout" type="text" id="SessionTimeout" value="<%=SessionTimeout%>" size="6" maxlength="5">&nbsp; 分钟  &nbsp; 主要用于后台管理员登录，为了安全，请不要将时间设得太长。建议设为10分钟。</p>
 <p><span class="left">热点文章的点击数:</span> <input name="HitsOfHot" type="text" id="SessionTimeout" value="<%=HitsOfHot%>" size="6" maxlength="5">&nbsp; 文章点击数达到此数时就会被设为热点文章</p>
    </div>


    <!--Page3:用户选项设置-->
    <div id="TabContent3" class="ShowTabCon">

      <p><span class="left">是否允许新用户注册:</span><input type="radio" name="EnableUserReg" value="Yes" <%if EnableUserReg="Yes" then response.write "checked"%>>
        是 &nbsp;&nbsp;&nbsp;&nbsp; 
        <input type="radio" name="EnableUserReg" value="No" <%if EnableUserReg="No" then response.write "checked"%>>
      否</p>
    
      <p><span class="left">注册是否需要邮件验证:</span><input type="radio" name="EmailCheckReg" value="Yes" <%if EmailCheckReg="Yes" then response.write "checked"%>>
        是 &nbsp;&nbsp;&nbsp;&nbsp; 
        <input type="radio" name="EmailCheckReg" value="No" <%if EmailCheckReg="No" then response.write "checked"%>>
      否  &nbsp;&nbsp;若选择“是”，则用户必须在通过邮件验证后才能真正成为正式注册用户</p>
      <p><span class="left">注册是否需要管理员认证:</span> <input type="radio" name="AdminCheckReg" value="Yes" <%if AdminCheckReg="Yes" then response.write "checked"%>>
        是 &nbsp;&nbsp;&nbsp;&nbsp; 
        <input type="radio" name="AdminCheckReg" value="No" <%if AdminCheckReg="No" then response.write "checked"%>>
      否 &nbsp;&nbsp;若选择是，则用户必须在通过管理员认证后才能真正成功正式注册用户。</p>
      <p><span class="left">注册用户的默认计费方式:</span><input name="ChargeType_999" type="radio" value="1" <%if ChargeType_999=1 then response.write " checked"%>>
        扣点数<font color="#0000FF">（推荐）</font>
        <input type="radio" name="ChargeType_999" value="2" <%if ChargeType_999=2 then response.write " checked"%>>不扣点数</p>
      <p><span class="left">注册用户的默认可用点数:</span><input name="UserPoint_999" type="text" id="UserPoint_999" value="<%=UserPoint_999%>" size="6" maxlength="5">
      点</p>
      <p><span class="left">注册用户的默认有效期:</span><input name="ValidDays_999" type="text" id="ValidDays_999" value="<%=ValidDays_999%>" size="6" maxlength="5">
      天</p>

      <p><span class="left">高级用户的默认计费方式:</span><input name="ChargeType_99" type="radio" value="1" <%if ChargeType_99=1 then response.write " checked"%>>
        扣点数<font color="#0000FF">（推荐）</font>扣除相应点数。
        <input type="radio" name="ChargeType_99" value="2" <%if ChargeType_99=2 then response.write " checked"%>>
      不扣点数</p>

      <p><span class="left">高级用户的默认可用点数:</span><input name="UserPoint_99" type="text" id="UserPoint_99" value="<%=UserPoint_99%>" size="6" maxlength="5">
      点</p>
      <p><span class="left">高级用户的默认有效期:</span><input name="ValidDays_99" type="text" id="ValidDays_99" value="<%=ValidDays_99%>" size="6" maxlength="5">
      天</p>


      <p><span class="left">VIP用户的默认计费方式:</span><input name="ChargeType_9" type="radio" value="1" <%if ChargeType_99=1 then response.write " checked"%>>
        扣点数<font color="#0000FF">（推荐）</font>扣除相应点数。
        <input type="radio" name="ChargeType_9" value="2" <%if ChargeType_99=2 then response.write " checked"%>>
      不扣点数</p>

      <p><span class="left">VIP用户的默认可用点数:</span><input name="UserPoint_9" type="text" id="UserPoint_9" value="<%=UserPoint_9%>" size="6" maxlength="5">
      点</p>
      <p><span class="left">VIP用户的默认有效期:</span><input name="ValidDays_9" type="text" id="ValidDays_9" value="<%=ValidDays_9%>" size="6" maxlength="5">
      天</p>


    </div>
    <!--Page4:邮件服务器选项-->
    <div id="TabContent4" class="ShowTabCon">
   
      <p><span class="left">邮件发送组件:</span> <select name="MailObject" id="MailObject">
          <option value="Jmail" selected>Jmail</option>
        </select>  请一定要选择服务器上已安装的组件</p>
      <p><span class="left">SMTP服务器地址:</span><input name="MailServer" type="text" id="MailServer" value="<%=MailServer%>" size="40"> 如果你不清楚此参数含义，请联系你的空间商</p>
      <p><span class="left">SMTP登录用户名:</span><input name="MailServerUserName" type="text" id="MailServerUserName" value="<%=MailServerUserName%>" size="40"> 当你的服务器需要SMTP身份验证时还需设置此参数</p>
      <p><span class="left">SMTP登录密码:</span><input name="MailServerPassWord" type="text" id="MailServerPassWord" value="<%=MailServerPassWord%>" size="40"> 当你的服务器需要SMTP身份验证时还需设置此参数</p>
      <p><span class="left">SMTP域名:</span><input name="MailDomain" type="text" id="MailDomain" value="<%=MailDomain%>" size="40"> 如果用“name@domain.com”这样的用户名登录时，请指明domain.com</p>
    </div>
    <!--Page5:上传文件选项-->
    <div id="TabContent5" class="ShowTabCon">
      <p><span class="left">上传文件大小限制:</span><input name="MaxFileSize" type="text" id="MaxFileSize" value="<%=MaxFileSize%>" size="6" maxlength="5"> 建议不要超过1024K，以免影响服务器性能</p>
      <p><span class="left">存放上传文件的目录:</span><input name="SaveUpFilesPath" type="text" id="SaveUpFilesPath" value="<%=SaveUpFilesPath%>" size="30" maxlength="100"> 请输入相对于首页（Default.asp）的相对路径</p>
      <p><span class="left">允许的上传文件类型:</span><input name="UpFileType" type="text" id="UpFileType" value="<%=UpFileType%>" size="50" maxlength="255"></p>
      <p><span class="left">删除是否删除上传文件:</span> <input type="radio" name="DelUpFiles" value="Yes" <%if DelUpFiles="Yes" then response.write "checked"%>>
        是 &nbsp;&nbsp;&nbsp;&nbsp; 
        <input type="radio" name="DelUpFiles" value="No" <%if DelUpFiles="No" then response.write "checked"%>>
      否</p>
    </div>
    <!--Page6:前台显示模式-->
    <div id="TabContent6" class="ShowTabCon">

    </div>
  </div>
  <div>




<input name="Action" type="hidden" id="Action" value="SaveConfig">
<input type="submit" value="保存编辑" class="ActionBtn Pointer" <% If ObjInstalled=false Then response.write "disabled" %>>





    <%
If ObjInstalled=false Then
	Response.Write "<tr class='tdbg'><td height='40' colspan='3'><b><font color=red>你的服务器不支持 FSO(Scripting.FileSystemObject)! 不能使用本功能。<br>请直接修改“../Inc/config.asp”文件中的内容。</font></b></td></tr>"
End If
%></form>
  </table>
<%
end sub
%>




&nbsp;</div>


</div>

<script type="text/javascript">SelectTab('TabContent1','Basic');</script>

<div class="FooterDiv">
  <p class="Text"><span>Copyright &copy; 2006-2007 <a href="Http://Www.AllSheng.Net/" target="_blank">AllSheng Studio</a> 版权所有. 并保留一切权利.</p>
  <p><span class="Space">页面执行时间:46.875毫秒</span></p>
</div>
</div>
</body>
</html>





<%
sub SaveConfig()
	If ObjInstalled=false Then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>你的服务器不支持 FSO(Scripting.FileSystemObject)! </li>"
		exit sub
	end if
	dim fso,hf
	set fso=Server.CreateObject("Scripting.FileSystemObject")
	set hf=fso.CreateTextFile(Server.mappath("../inc/config.asp"),true)
	hf.write "<" & "%" & vbcrlf
	hf.write "Const SiteName=" & chr(34) & trim(request("SiteName")) & chr(34) & "        '网站名称" & vbcrlf
	hf.write "Const SiteTitle=" & chr(34) & trim(request("SiteTitle")) & chr(34) & "        '网站标题" & vbcrlf
	hf.write "Const SiteUrl=" & chr(34) & trim(request("SiteUrl")) & chr(34) & "        '网站地址" & vbcrlf
	hf.write "Const LogoUrl=" & chr(34) & trim(request("LogoUrl")) & chr(34) & "        'Logo地址" & vbcrlf
	hf.write "Const BannerUrl=" & chr(34) & trim(request("BannerUrl")) & chr(34) & "        'Banner地址" & vbcrlf
	hf.write "Const WebmasterName=" & chr(34) & trim(request("WebmasterName")) & chr(34) & "        '站长姓名" & vbcrlf
	hf.write "Const WebmasterEmail=" & chr(34) & trim(request("WebmasterEmail")) & chr(34) & "        '站长信箱" & vbcrlf
	hf.write "Const Copyright=" & chr(34) & trim(request("Copyright")) & chr(34) & "        '版权信息" & vbcrlf
	hf.write "Const ShowPopMenu=" & chr(34) & trim(request("ShowPopMenu")) & chr(34) & "        '后台是否显示右键菜单" & vbcrlf
	hf.write "Const ShowSiteChannel=" & chr(34) & trim(request("ShowSiteChannel")) & chr(34) & "        '是否显示网站频道" & vbcrlf
	hf.write "Const ShowMyStyle=" & chr(34) & trim(request("ShowMyStyle")) & chr(34) & "        '是否显示自选风格" & vbcrlf  
	hf.write "Const ShowClassTreeGuide=" & chr(34) & trim(request("ShowClassTreeGuide")) & chr(34) & "        '是否使用树状导航菜单" & vbcrlf  
	hf.write "Const EnableArticleCheck=" & chr(34) & trim(request("EnableArticleCheck")) & chr(34) & "        '是否启用文章审核功能" & vbcrlf
	hf.write "Const EnableGuestCheck=" & chr(34) & trim(request("EnableGuestCheck")) & chr(34) & "        '是否启用留言审核功能" & vbcrlf
	hf.write "Const EnableUploadFile=" & chr(34) & trim(request("EnableUploadFile")) & chr(34) & "        '是否开放文件上传" & vbcrlf
	hf.write "Const EnableSaveRemote=" & chr(34) & trim(request("EnableSaveRemote")) & chr(34) & "        '是否保存远程图片到本地" & vbcrlf
	hf.write "Const EnableUserReg=" & chr(34) & trim(request("EnableUserReg")) & chr(34) & "        '是否允许新用户注册" & vbcrlf
	hf.write "Const EmailCheckReg=" & chr(34) & trim(request("EmailCheckReg")) & chr(34) & "        '新用户注册是否需要邮件验证" & vbcrlf
	hf.write "Const AdminCheckReg=" & chr(34) & trim(request("AdminCheckReg")) & chr(34) & "        '新用户注册是否需要管理员认证" & vbcrlf
	hf.write "Const EnableLinkReg=" & chr(34) & trim(request("EnableLinkReg")) & chr(34) & "        '是否开放友情链接申请" & vbcrlf
	hf.write "Const PopAnnounce=" & chr(34) & trim(request("PopAnnounce")) & chr(34) & "        '是否弹出公告窗口" & vbcrlf
	hf.write "Const HitsOfHot=" & trim(request("HitsOfHot")) & "        '热门文章点击数" & vbcrlf
	hf.write "Const SessionTimeout=" & trim(request("SessionTimeout")) & "        'Session会话的保持时间" & vbcrlf
	hf.write "Const CommentPurview=" & trim(request("CommentPurview")) & "        '发表评论的权限" & vbcrlf
	hf.write "Const MailObject=" & chr(34) & trim(request("MailObject")) & chr(34) & "        '邮件发送组件" & vbcrlf
	hf.write "Const MailServer=" & chr(34) & trim(request("MailServer")) & chr(34) & "        '用来发送邮件的SMTP服务器" & vbcrlf
	hf.write "Const MailServerUserName=" & chr(34) & trim(request("MailServerUserName")) & chr(34) & "        '登录用户名" & vbcrlf
	hf.write "Const MailServerPassWord=" & chr(34) & trim(request("MailServerPassWord")) & chr(34) & "        '登录密码" & vbcrlf
	hf.write "Const MailDomain=" & chr(34) & trim(request("MailDomain")) & chr(34) & "        '域名" & vbcrlf
	hf.write "Const MaxFileSize=" & trim(request("MaxFileSize")) & "        '上传文件大小限制" & vbcrlf
	hf.write "Const SaveUpFilesPath=" & chr(34) & trim(request("SaveUpFilesPath")) & chr(34) & "        '存放上传文件的目录" & vbcrlf
	hf.write "Const UpFileType=" & chr(34) & trim(request("UpFileType")) & chr(34) & "        '允许的上传文件类型" & vbcrlf
	hf.write "Const DelUpFiles=" & chr(34) & trim(request("DelUpFiles")) & chr(34) & "        '删除文章时是否同时删除文章中的上传文件" & vbcrlf
	hf.write "Const ChargeType_999=" & trim(request("ChargeType_999")) & "        '注册用户的默认计费方式" & vbcrlf
	hf.write "Const UserPoint_999=" & trim(request("UserPoint_999")) & "        '注册用户的默认可用点数" & vbcrlf
	hf.write "Const ValidDays_999=" & trim(request("ValidDays_999")) & "        '注册用户的默认有效期" & vbcrlf
	hf.write "Const ChargeType_99=" & trim(request("ChargeType_99")) & "        '收费用户的默认计费方式" & vbcrlf
	hf.write "Const UserPoint_99=" & trim(request("UserPoint_99")) & "        '收费用户的默认可用点数" & vbcrlf
	hf.write "Const ValidDays_99=" & trim(request("ValidDays_99")) & "        '收费用户的默认有效期" & vbcrlf
	hf.write "Const ChargeType_9=" & trim(request("ChargeType_9")) & "        'VIP用户的默认计费方式" & vbcrlf
	hf.write "Const UserPoint_9=" & trim(request("UserPoint_9")) & "        'VIP用户的默认可用点数" & vbcrlf
	hf.write "Const ValidDays_9=" & trim(request("ValidDays_9")) & "        'VIP用户的默认有效期" & vbcrlf
	hf.write "%" & ">"
	hf.close
	set hf=nothing
	set fso=nothing
	call WriteSuccessMsg("网站配置保存成功！")
end sub
%>    </div>