<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Conn.asp"-->
<!--#include file="Ex_Cls/Ex_SkinCls.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script src="inc/main.js"></script>
</head>
<link rel="stylesheet" href="Admin_Style.css">
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0" class="bgcolor">
<%
Dim ExComm
Set ExComm=new Ex_CommonCls
ExComm.IsAdLogin 
ExComm.IsIpAllow
dim action
action=request.QueryString("action")
if action="change" then
call change()'修改数据
else
call show()
end if
sub show()
dim strsql,rs
dim ArrOrder,ListOrderType,Order1,Order2,Order3,Order4
strsql="select * from Ex_Config"
set rs=Conn.execute(strsql)
ListOrderType=Rs("ListOrderType")
if Trim(ListOrderType)<>"" then
	ArrOrder=Split(ListOrderType,"desc")
	Order1=ArrOrder(0)
	Order2=ArrOrder(1)
	Order3=ArrOrder(2)
	Order4=ArrOrder(3)
end if
%>
<center>
<script>
function Check()
{	var siteUrl=g("siteurl").value;
	var cmtPageSize=g("cmtpagesize").value;
	var blogNum=g("blognum").value;
	var logDefaultNum=g("logdefaultnum").value;
	var newBlog=g("newblog").value;
	var newMsg=g("newmsg").value;
	var newCmt=g("newcmt").value;
	var linkMode=g("linkmode").value;
	var visitecount=g("visitecount").value;
	var order=g("order1").value+","+g("order2").value+","+g("order3").value+","+g("order4").value;
	if (document.getElementById("ad_name").value=="")
	{
		alert("账号不能为空");
		document.getElementById("ad_name").focus();
		return false;
	}
	if (document.getElementById("ad_pass").value!=document.getElementById("ad_pass1").value)
	{
		alert("两次输入的密码不一致");
		document.getElementById("ad_pass").focus();
		return false;
	}
	if (document.getElementById("sitename").value=="")
	{
		alert("站点名称不能为空");
		document.getElementById("sitename").focus();
		return false;
	}
	if (siteUrl=="")
	{
		return msg("站点名称不能为空","siteurl");
	}
	if (document.getElementById("logourl").value=="")
	{
		alert("logo地址不能为空");
		document.getElementById("logourl").focus();
		return false;
	}
	if (visitecount=="" || isNumber(visitecount)==false)
	{
		return msg("博客访问量不能为空,并且为数字","visitecount");
	}
	if (cmtPageSize=="" || isNumber(cmtPageSize)==false)
	{
		return msg("日志评论分页条数不能为空,并且为数字","cmtpagesize");
	}
	if (blogNum=="" || isNumber(blogNum)==false)
	{
		return msg("每页显示日志篇数不能为空,并且不能为数字","blognum");
	}
	if (logDefaultNum=="" || isNumber(logDefaultNum)==false)
	{
		return msg("日志摘要显示字数,并且为数字","logdefaultnum");
	}
	if (order.indexOf("submittime desc")==-1 || order.indexOf("recommend desc")==-1 || order.indexOf("bits desc")==-1 || order.indexOf("cmt desc")==-1)
	{
		return msg("首页列表排序四个选项相互不能重复","order1");
	}
	if (newBlog=="" || isNumber(newBlog)==false)
	{
		return msg("显示最新日志篇数不能为空,并且为数字","newblog");
	}
	if (newMsg=="" || isNumber(newMsg)==false)
	{
		return msg("显示最新留言条数不能为空,并且为数字");
	}
	if (newCmt=="" || isNumber(newCmt)==false)
	{
		return msg("显示最新评论条数不能为空,并且为数字","newcmt");
	}
	if (linkMode=="" || isNumber(linkMode)==false)
	{
		return msg("友情连接显示模式不能为空,并且为数字","linkmode");
	}
}
</script>
<form name="form1" method="post" action="?action=change" onSubmit="return Check()">
  <table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="border tablebg">
    <tr>
      <th class="topbg" colspan="2"><a href="#u"></a>站长</th>
      </tr>
    <tr>
      <td class="tdbg"><div align="center">账号（最多50个字节,用于后台登陆）:

</div></td>
      <td class="tdbg"><input name="ad_name" type="text" id="ad_name" value="<%=rs("AdName")%>"></td>
    </tr>
	<tr>
      <td class="tdbg"><div align="center">前台显示名（最多50个字节,用于前台显示,表明日志作者）:

</div></td>
      <td class="tdbg"><input name="showname" type="text" id="showname" value="<%=rs("ShowName")%>"></td>
    </tr>
    <tr>
      <td class="tdbg"><div align="center">密码（最多50个字节 如果不修改请留空）

：</div></td>
      <td class="tdbg"><input name="ad_pass" type="password" id="ad_pass" value=""></td>
    </tr>
	<tr>
      <td class="tdbg"><div align="center">密码确认（最多50个字节 如果不修改请留空）

：</div></td>
      <td class="tdbg"><input name="ad_pass1" type="password" id="ad_pass1" value=""></td>
    </tr>
    <tr>
      <th class="topbg" colspan="2"><a href="#s"></a>站点</th>
      </tr>
    <tr>
      <td class="tdbg" width="351"><div align="center">站点名称（最多50个字节)：</div></td>
      <td class="tdbg" width="358"><input name="sitename" type="text" id="sitename" value="<%=rs("BlogName")%>"></td>
    </tr>
    <tr>
      <td class="tdbg"><div align="left">站点地址(请添写完整URL如:http://www.ex123.net/ 必须以/结尾。):</div></td>
      <td class="tdbg"><input name="siteurl" type="text" id="siteurl" value="<%=Replace(ExComm.GetDomain()&request.servervariables("script_name"),"Admin_Config.asp","")%>" readonly>        &nbsp;<font color="red">[系统已经自动检测并填写]</font>        </td>
    </tr>
    <tr>
      <td class="tdbg"><div align="center">logo地址（最多50个字节）：</div></td>
      <td class="tdbg"><input name="logourl" type="text" id="logourl" value="<%=rs("LogoUrl")%>"></td>
    </tr>
	<tr>
      <td class="tdbg"><div align="center">站点备案信息（没有请留空 最多50个字节）：</div></td>
      <td class="tdbg"><input name="beian" type="text" id="beian" value="<%=rs("beian")%>"></td>
    </tr>
	<tr>
      <td class="tdbg"><div align="center">站点访问量：</div></td>
      <td class="tdbg"><input name="visitecount" type="text" id="visitecount" value="<%=rs("VisiteCount")%>"></td>
    </tr>
	<tr>
	  <td class="tdbg"><div align="center">启用泛域名转向：</div></td>
	  <td class="tdbg">是&nbsp;
	    <input type="radio" name="Domain" value="是" <% if rs("Domain")="是" then response.Write("checked")%>>
	    否
	    <input type="radio" name="Domain" value="否" <% if rs("Domain")="否" then response.Write("checked")%>></td>
	  </tr>
	<tr>
	  <td class="tdbg"><div align="center">运行模式：</div></td>
	  <td class="tdbg">动态
	    <input type="radio" name="RunMode" value="动态" <% if rs("RunMode")="动态" then response.Write("checked")%>>
	    &nbsp;静态
	    <input type="radio" name="RunMode" value="静态" <% if rs("RunMode")="静态" then response.Write("checked")%>></td>
	  </tr>
	  <tr>
      <td class="tdbg"><div align="center">开启验证码验证：</div></td>
      <td class="tdbg">是
        <input name="ischeckcode" type="radio" value="是" <%if Rs("ischeckcode")="是" then response.Write("checked")%>>
        &nbsp;否
        <input type="radio" name="ischeckcode" value="否" <%if Rs("ischeckcode")="否" then response.Write("checked")%>></td>
    </tr>
	<tr>
      <td class="tdbg"><div align="center">默认日志预览模式：</div></td>
      <td class="tdbg">摘要
        <input name="viewtype" type="radio" value="abstract" <%if Rs("viewtype")="abstract" then response.Write("checked")%>>
        &nbsp;列表
        <input type="radio" name="viewtype" value="list" <%if Rs("viewtype")="list" then response.Write("checked")%>></td>
    </tr>
	<tr>
      <td class="tdbg"><div align="center">站点默认首页模式：</div></td>
      <td class="tdbg">
	  <select onchange="document.getElementById('musictype').value=this.value">
	  	<option value="">自定义站点首页</option>
		<option value="index.asp" <%If rs("musictype")="index.asp" Then response.Write("selected")%>>默认站点首页</option>
		<option value="MusicFrame.asp?h=30" <%If rs("musictype")="MusicFrame.asp?h=30" Then response.Write("selected")%>>显示音乐框架</option>
		<option value="MusicFrame.asp" <%If rs("musictype")="MusicFrame.asp" Then response.Write("selected")%>>隐藏音乐框架</option>
	  </select>
	  <input name="musictype" id="musictype" value="<%=rs("musictype")%>">
	  </td>
    </tr>
	<tr>
      <th class="topbg" colspan="2"><a name="#seo"></a>搜索引擎优化</th>
      </tr>
    <tr>
      <td class="tdbg" width="351"><div align="center">站点描述</div></td>
      <td class="tdbg" width="358"><input name="blogdescription" type="text" id="blogdescription" value="<%=rs("BlogDescription")%>"></td>
    </tr>
    <tr>
      <td class="tdbg"><div align="center">站点关键字:</div></td>
      <td class="tdbg"><input name="blogkeyword" type="text" id="blogkeyword" value="<%=Rs("blogkeyword")%>">        &nbsp;</td>
    </tr>
    <tr>
      <td class="tdbg"><div align="center">首页标题附加词</div></td>
      <td class="tdbg"><input name="indexaddword" type="text" id="indexaddword" value="<%=rs("indexaddword")%>"></td>
    </tr>
	<tr>
      <td class="tdbg"><div align="center">内容页标题附加词</div></td>
      <td class="tdbg"><input name="titleaddword" type="text" id="titleaddword" value="<%=rs("titleaddword")%>"></td>
    </tr>
    <tr>
      <th class="topbg" colspan="2"><div align="center"><a name="log" id="log"></a>日志</div></th>
    </tr>
    <tr>
      <td class="tdbg"><div align="center">每页显示日志篇数：</div></td>
      <td class="tdbg"><input name="blognum" type="text" id="blognum" value="<%=rs("lognum")%>"></td>
    </tr>
    <tr>
      <td class="tdbg"><div align="center">显示最新日志篇数：</div></td>
      <td class="tdbg"><input name="newblog" type="text" id="newblog" value="<%=rs("newlog")%>"></td>
    </tr>
    <tr>
      <td class="tdbg"><div align="center">热门tags是否开启</div></td>
      <td class="tdbg">
        是
          <input type="radio"name="hottags" value="true" <% if rs("hottags")=true then response.Write("checked")%>>        
          &nbsp;&nbsp;否
          <input type="radio" name="hottags" value="false" <% if rs("hottags")=false then response.Write("checked")%>></td>
    </tr>
    <tr>
      <td class="tdbg"><div align="center">日志摘要默认字数:</div></td>
      <td class="tdbg"><input name="logdefaultnum" type="text" id="logdefaultnum" value="<%=Rs("logdefaultnum")%>"></td>
    </tr>
    <tr>
      <td class="tdbg"><div align="center">首页列表排序（当前一标准相同时,按下一标准排序）</div></td>
      <td class="tdbg"><select name="order1" id="order1">
          <option value="submittime desc" <% if instr(Order1,"submittime")<>0 then response.Write("selected")%>>发布时间</option>
          <option value="recommend desc" <% if instr(Order1,"recommend")<>0 then response.Write("selected")%>>推荐等级</option>
          <option value="bits desc" <% if instr(Order1,"bits")<>0 then response.Write("selected")%>>查看次数</option>
          <option value="cmt desc" <% if instr(Order1,"cmt")<>0 then response.Write("selected")%>>评论数量</option>
        </select>
        <select name="order2" id="order2">
          <option value="submittime desc" <% if instr(Order2,"submittime")<>0 then response.Write("selected")%>>发布时间</option>
          <option value="recommend desc" <% if instr(Order2,"recommend")<>0 then response.Write("selected")%>>推荐等级</option>
          <option value="bits desc" <% if instr(Order2,"bits")<>0 then response.Write("selected")%>>查看次数</option>
          <option value="cmt desc" <% if instr(Order2,"cmt")<>0 then response.Write("selected")%>>评论数量</option>
        </select>
        <select name="order3" id="order3">
          <option value="submittime desc" <% if instr(Order3,"submittime")<>0 then response.Write("selected")%>>发布时间</option>
          <option value="recommend desc" <% if instr(Order3,"recommend")<>0 then response.Write("selected")%>>推荐等级</option>
          <option value="bits desc" <% if instr(Order3,"bits")<>0 then response.Write("selected")%>>查看次数</option>
          <option value="cmt desc" <% if instr(Order3,"cmt")<>0 then response.Write("selected")%>>评论数量</option>
        </select>
        <select name="order4" id="order4">
          <option value="submittime desc" <% if instr(Order4,"submittime")<>0 then response.Write("selected")%>>发布时间</option>
          <option value="recommend desc" <% if instr(Order4,"recommend")<>0 then response.Write("selected")%>>推荐等级</option>
          <option value="bits desc" <% if instr(Order4,"bits")<>0 then response.Write("selected")%>>查看次数</option>
          <option value="cmt desc" <% if instr(Order4,"cmt")<>0 then response.Write("selected")%>>评论数量</option>
        </select></td>
    </tr>
    <tr>
      <th class="topbg" colspan="2"><div align="center">留言评论</div></th>
    </tr>
    <tr>
      <td class="tdbg"><div align="center">显示最新留言条数：
        
      </div></td>
      <td class="tdbg"><input name="newmsg" type="text" id="newmsg" value="<%=rs("newmsg")%>"></td>
    </tr>
    <tr>
      <td class="tdbg"><div align="center">显示最新评论条数：</div></td>
      <td class="tdbg"><input name="newcmt" type="text" id="newcmt" value="<%=rs("newcmt")%>"></td>
    </tr>
    <tr>
      <td class="tdbg"><div align="center">日志评论分页条数：</div></td>
      <td class="tdbg"><input name="cmtpagesize" type="text" id="cmtpagesize" value="<%=rs("CmtPageSize")%>"></td>
    </tr>
    <tr>
      <td class="tdbg"><div align="center">是否开启评论留言审核:</div></td>
      <td class="tdbg">是
        <input type="radio" name="iscmtmsgcheck" value="是" <%If Rs("iscmtmsgcheck")="是" Then Response.Write "checked"%> onClick="document.getElementById('cmtmsg').style.display=''">
        否
        <input type="radio" name="iscmtmsgcheck" value="否" <%If Rs("iscmtmsgcheck")="否" Then Response.Write "checked"%> onClick="document.getElementById('cmtmsg').style.display='none'"></td>
    </tr>
    <tr <%If Rs("iscmtmsgcheck")="否" Then%>style="display:none;"<%End If%> id="cmtmsg">
      <td colspan="2" class="tdbg">需要审核所需要的条件:全部需审核
        <input name="cmtmsgcheckall" type="checkbox" id="cmtmsgcheckall" value="."<%Dim cmtRe
		cmtRe=Rs("cmtmsgcheckre")
		If cmtRe="." Then response.write("checked")%>>
        &nbsp;含有以下词(词之间用%分割,支持正则表达式)
        <input name="cmtmsgcheckre" type="text" id="cmtmsgcheckre" size="50" value="<%=cmtRe%>"></td>
      </tr>
    
	<tr>
      <th class="topbg" colspan="2">友情连接</th>
    </tr>
    <tr>
      <td class="tdbg"><div align="center">显示模式  0图文混和 1先图片 2先文字：</div></td>
      <td class="tdbg">
		<SELECT NAME="linkmode" id="linkmode">
		<OPTION VALUE="0" <%Dim LinkMode:LinkMode=Rs("LinkMode"):If CInt(LinkMode)=0 Then Response.Write("selected")%>>图文混合</option>
		<OPTION VALUE="1" <%If CInt(LinkMode)=1 Then Response.Write("Selected")%>>先图后文</option>
		<OPTION VALUE="2" <%If CInt(LinkMode)=2 Then Response.Write("Selected")%>>先文后图</option>
		</SELECT>	  </td>
    </tr>
    <tr>
      <td class="tdbg" colspan="2"><div align="center">
        <input type="submit" name="Submit" value="提交">
      </div></td>
      </tr>
  </table>
</form></center>
<a href="http://www.ex123.net/bbs" target="_blank"><font color="red">如果您博客站点设置还有什么疑问,点此查看易心博客使用教程</font></a>
<%end sub%>
<%
sub change()
dim ad_name,showname,ad_pass,siteurl,sitename,logourl,wordnum,blognum,newblog,newmsg,newcmt,beian,linkmode,hottags,runmode,domain
Dim ExFso,strsql,bottom,cmtpagesize,ischeckcode,blogdescription,blogkeyword,indexaddword,titleaddword,musictype,VisiteCount
Dim iscmtmsgcheck,cmtmsgcheckall,cmtmsgcheckre,logdefaultnum,ListOrderType,viewtype
Set ExFso=new Ex_FsoCls
ad_name=ExComm.G(request.Form("ad_name"))
showname=ExComm.G(request.Form("showname"))
ad_pass=ExComm.G(request.Form("ad_pass"))
siteurl=ExComm.G(request.Form("siteurl"))
sitename=ExComm.G(request.Form("sitename"))
logourl=ExComm.G(request.Form("logourl"))
blognum=ExComm.G(request.Form("blognum"))
newblog=ExComm.G(request.Form("newblog"))
newmsg=ExComm.G(request.Form("newmsg"))
newcmt=ExComm.G(request.Form("newcmt"))
beian=ExComm.G(request.Form("beian"))
linkmode=ExComm.G(request.Form("linkmode"))
hottags=ExComm.G(request.Form("hottags"))
runmode=ExComm.G(request.Form("runmode"))
domain=ExComm.G(request.Form("domain"))
cmtpagesize=ExComm.G(request.Form("cmtpagesize"))
ischeckcode=ExComm.G(request.Form("ischeckcode"))
blogdescription=ExComm.G(request.Form("blogdescription"))
blogkeyword=ExComm.G(request.Form("blogkeyword"))
Indexaddword=ExComm.G(request.Form("Indexaddword"))
TitleAddWord=ExComm.G(request.Form("TitleAddWord"))
iscmtmsgcheck=ExComm.G(request.Form("iscmtmsgcheck"))
cmtmsgcheckall=ExComm.G(request.Form("cmtmsgcheckall"))
cmtmsgcheckre=ExComm.G(request.Form("cmtmsgcheckre"))
logdefaultnum=EXComm.G(request("logdefaultnum"))
musictype=EXComm.G(request("musictype"))
viewtype=EXComm.G(request("viewtype"))
VisiteCount=EXComm.G(request("VisiteCount"))
ListOrderType=ExComm.G(Request.Form("order1"))&","&ExComm.G(Request.Form("order2"))&","&ExComm.G(Request.Form("order3"))&","&ExComm.G(Request.Form("order4"))

If ViewType="list" Then 
	Response.Cookies(Md5(Sn))("viewtype")="list"
Else 
	Response.Cookies(Md5(Sn))("viewtype")="abstract"
End If

If cmtmsgcheckall<>"" Then 
	cmtmsgcheckre=cmtmsgcheckall
End If 
strsql="update Ex_Config set AdName='"&ad_name&"',showname='"&showname&"',BLogName='"&sitename&"',blogurl='"&siteurl&"',logourl='"&logourl&"',lognum="&blognum&",newlog="&newblog&",newmsg="&newmsg&",newcmt="&newcmt&",hottags="&hottags&",linkmode="&linkmode&",runmode='"&runmode&"',domain='"&domain&"',cmtpagesize="&cmtpagesize&",ischeckcode='"&ischeckcode&"',blogdescription='"&blogdescription&"',blogkeyword='"&blogkeyword&"',indexaddword='"&indexaddword&"',titleaddword='"&titleaddword&"',iscmtmsgcheck='"&iscmtmsgcheck&"',cmtmsgcheckre='"&cmtmsgcheckre&"',logdefaultnum='"&logdefaultnum&"',musictype='"&MusicType&"',viewtype='"&viewtype&"',visitecount="&visitecount&",listordertype='"&ListOrderType&"'"
if ad_pass<>"" Then
ad_pass=md5(ad_pass)
strsql=strsql&",AdPwd='"&ad_pass&"'"
End If
if beian<>"" Then
strsql=strsql&",beian='"&beian&"'"
Else
strsql=strsql&",beian='暂无备案'"
End if
Conn.execute(strsql)
'重建配置信息缓存
ExComm.ClearCaches(sn)
Dim ExSkin
Set ExSkin=new Ex_SkinCls
ExSkin.RefreshSkinCache
Set ExSkin=Nothing 
ExComm.ShowMsg "操作成功",""
end sub
%>
</body>
</html>
