<%
'乘风多用户计数器
'作者QQ：178575
'作者EMail：yliangcf@163.com
'作者网站：http://www.qqcf.com
'详细简介：http://www.qqcf.com/cfcount.htm
'上面有程序在线演示，安装演示，使用疑难解答，最新版本下载等内容
'因为这些内容可能时常更新，没有放在程序里，请自己上网站上查看
%>
<%If SysCode="" Then Response.End%>
<%
Set Rs=Server.CreateObject("Adodb.RecordSet")
Sql="Select * From CFCount_Admin"
Rs.Open Sql,Conn,1,1
%>
<script>
$(function(){	
	$("input[name='CodeHeadType'][value='1']").click(function(){
		CodeHeadType_1();
	});
	
	$("input[name='CodeHeadType'][value='2']").click(function(){
		CodeHeadType_2();
	});
	
	$("input[name='CodeHeadType'][value='3']").click(function(){
		CodeHeadType_3();
	});
	
	function CodeHeadType_1(){
		 $("#t_CodeHeadSelf").hide();
	}
	
	function CodeHeadType_2(){
		 $("#t_CodeHeadSelf").hide();
	}
	
	function CodeHeadType_3(){
		 $("#t_CodeHeadSelf").show();
	}

	CodeHeadType_<%=Rs("CodeHeadType")%>();
	
	
	$("input[name='emailsendtype'][value='0']").click(function(){
		emailsendtype_0();
	});

	$("input[name='emailsendtype'][value='1'],input[name='emailsendtype'][value='2']").click(function(){
		emailsendtype_1();
	});



	function emailsendtype_0(){
		 $("#t_EmailSendPort,#t_SmtpAddress,#t_SmtpUser,#t_SmtpPassword").hide();
	}

	function emailsendtype_1(){
		 $("#t_EmailSendPort,#t_SmtpAddress,#t_SmtpUser,#t_SmtpPassword").show();
	}
	
	emailsendtype_<%=rs("emailsendtype")%>();
	
});


var chars = ['0','1','2','3','4','5','6','7','8','9','a','b','d','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','D','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];

function generateMixed(n) {
     var res = "";
     for(var i = 0; i < n ; i ++) {
         var id = Math.ceil(Math.random()*61);
         res += chars[id];
     }
     return res;
}
</script>




<form name="form2" method="post" action="?action=sysmodifysave">
<table class="tb_1">
<tr class="tr_1"> 
<td colspan="2">系统设置</td>
</tr>

<tr>
<td style="width:200px;" class="td_r">系统随机安全字符：</td>
<td><input name="SysCode" type="password" id="SysCode" value="<%=Rs("SysCode")%>" readonly style="background-color:white">

<script>
window.onload=function(){
	var SysCodeBtn=document.getElementById("SysCodeDo");
	var SysCodeInput=document.getElementById("SysCode")
	SysCodeBtn.onmousedown=function(){
		if(SysCodeInput.type=="password"){SysCodeInput.type="text";SysCodeInput.removeAttribute('readonly')}else{SysCodeInput.type="password";SysCodeInput.setAttribute('readOnly','true')}
	};
}
</script> 
<input type="button" name="SysCodeDo" id="SysCodeDo" value="显示/隐藏安全字符" />

<input type="button" name="SysCodeShow" id="SysCodeShow" value="安全字符取随机值" onclick="$(function () { confirm('确认要使用随机值吗，生成随机值后需再提交表单才生效?', '', function (isConfirm) {if (isConfirm) {document.getElementById('SysCode').value=generateMixed(16);document.getElementById('SysCode').type='text';document.getElementById('SysCode').readOnly=false;}}, {confirmButtonText: '确定', cancelButtonText: '取消', width: 400});});" />

<br />
(建议填写任意8位以上字母，数字组合，保证系统参数加密传送<%If Rs("SysCode")="12345678" Then Response.write "，<font color='#ff0000'>建议你不要使用默认简单的""12345678""字符</font>"%>)

</td>
</tr>

<tr> 
<td class="td_r">计数器系统名称：</td>
<td><input name="SysTitle" type="text" id="mc" value="<%=Rs("SysTitle")%>" size="30"></td>
</tr>
<tr> 
<td class="td_r">计数器简称：</td>
<td><input name="TjTextName" type="text" id="mc" value="<%=Rs("TjTextName")%>" size="30">
(8个字以内)</td>
</tr>
<tr> 
<td class="td_r">网友是否能申请计数器：</td>
<td> <input type="radio" name="RegState" value="-1"<%If Rs("RegState")=-1 Then Response.write " checked"%>>
是 　　 
<input name="RegState" type="radio" value="0"<%If Rs("RegState")=0 Then Response.write " checked"%>>
否<br> &nbsp;注：如果计数器只想自己用，请注册用户后把申请功能关闭。<br> <%If Rs("RegState")=0 Then%> <font color="#FF0000">提示：</font>目前已经禁止申请计数器！ 
<%End If%> </td>
</tr>

<tr>
<td class="td_r">同一IP每天最多注册数量:</td>
<td><input name="SameIpRegTotal" type="text" id="SameIpRegTotal" value="<%=rs("SameIpRegTotal")%>" size="5">个</td>
</tr>
<tr>
<td class="td_r">注册页面开启验证码:</td>
<td>
<input type="radio" name="RegCheckCodeOpen" value="-1"<%If Rs("RegCheckCodeOpen")=-1 Then Response.Write " checked"%>>
是 　　 
<input name="RegCheckCodeOpen" type="radio" value="0"<%If Rs("RegCheckCodeOpen")=0 Then Response.Write " checked"%>>
否 (默认：是)
</td>
</tr>
    
   
<tr>
<td class="td_r">获取统计代码的协议支持：</td>
<td>
<input name="CodeHeadType" type="radio" value="1"<%If Rs("CodeHeadType")=1 Then Response.Write " checked"%>>
//开头的自适应协议
<input name="CodeHeadType" type="radio" value="2"<%If Rs("CodeHeadType")=2 Then Response.Write " checked"%>>
https://开头的协议
<input name="CodeHeadType" type="radio" value="3"<%If Rs("CodeHeadType")=3 Then Response.Write " checked"%>>
自定义头(适用开启了nginx,cdn的环境)
<br />
</td>
</tr>
<tr id="t_CodeHeadSelf"> 
<td class="td_r">获取统计代码的协议自定义：</td>
<td> <input name="CodeHeadSelf" type="text" id="CodeHeadSelf" value="<%=rs("CodeHeadSelf")%>" size="40"><br />(填写如//a.com/或http://a.com/或https://a.com/格式的程序路径)        </td>
</tr>
    
    
<tr> 
<td class="td_r">是否记录来源页面,IP信息：</td>
<td><input type="radio" name="LyKeep" value="-1"<%If Rs("LyKeep")=-1 Then Response.write " checked"%>>
是 　　 
<input name="LyKeep" type="radio" value="0"<%If Rs("LyKeep")=0 Then Response.write " checked"%>>
否<br> <%if rs("LyKeep")=0 then%> <font color="#FF0000">提示：</font>目前已经禁止记录IP，来源信息！ 
<%end if%> </td>
</tr>
<tr> 
<td class="td_r">是否记录在线人数：</td>
<td><input type="radio" name="OnlineKeep" value="-1"<%if rs("OnlineKeep")=-1 then Response.write " checked"%>>
是 　　 
<input name="OnlineKeep" type="radio" value="0"<%if rs("OnlineKeep")=0 then Response.write " checked"%>>
否<br> <%if rs("OnlineKeep")=0 then%> <font color="#FF0000">提示：</font>目前已经禁止记录在线人数信息！ 
<%end if%> </td>
</tr>
<tr> 
<td class="td_r">是否记录网站页面浏览次数：</td>
<td><input type="radio" name="WebKeep" value="-1"<%if rs("WebKeep")=-1 then Response.write " checked"%>>
是 　　 
<input name="WebKeep" type="radio" value="0"<%if rs("WebKeep")=0 then Response.write " checked"%>>
否<br> <%if rs("WebKeep")=0 then%> <font color="#FF0000">提示：</font>目前已经禁止记录网站页面浏览次数！ 
<%end if%> </td>
</tr>
<tr> 
<td class="td_r">计数图片样式数量：</td>
<td> <input name="StyleTotal" type="text" id="stylenum" value="<%=rs("StyleTotal")%>" size="30">
个</td>
</tr>
<tr> 
<td class="td_r">显示IP地址的IP地域：</td>
<td class="td_1"><input type="radio" name="IpArea" value="-1"<%if rs("IpArea")=-1 then Response.write " checked"%>>
是 
<input type="radio" name="IpArea" value="0"<%if rs("IpArea")=0 then Response.write " checked"%>>
否<br>
注：由于IP数据库较大,默认为空,需要显示具体IP地区位置的话请上www.qqcf.com上下载IP数据库后,再选择此选项为&quot;是&quot;</td>
</tr>
<tr>
<td class="td_r">系统皮肤：</td>
<td><input type="radio" name="skintype" value="1"<%if rs("skintype")=1 then Response.write " checked"%> onclick="document.getElementById('skincolor').value='#025DA6|#BFDEF8|#333333|#02418a|#FF0000';">
蓝色样式 
<input type="radio" name="skintype" value="2"<%if rs("skintype")=2 then Response.write " checked"%> onclick="document.getElementById('skincolor').value='#6DC818|#BFF190|#339900|#336600|#FF0000';">
绿色样式
<input type="radio" name="skintype" value="3"<%if rs("skintype")=3 then Response.write " checked"%> onclick="document.getElementById('skincolor').value='#E82626|#FAD8D8|#FF3333|#FF0033|#000000';">
红色样式
<input type="radio" name="skintype" value="4"<%if rs("skintype")=4 then Response.write " checked"%> onclick="document.getElementById('skincolor').value='#7A7A7A|#CDC7C7|#4D4D4D|#333333|#FF0000';">
黑白样式
<input type="radio" name="skintype" value="5"<%if rs("skintype")=5 then Response.write " checked"%>  onclick="document.getElementById('skincolor').value='#FF8100|#F9C48E|#CA6B0A|#333333|#FF0000';">
桔黄样式
<input type="radio" name="skintype" value="6"<%if rs("skintype")=6 then Response.write " checked"%>  onclick="document.getElementById('skincolor').value='#C00068|#C870A0|#8E2D62|#333333|#FF0000';">
暗粉样式</td>
</tr>
<tr id="a_1"> 
<td class="td_r">自定义皮肤颜色：</td>
<td><input name="skincolor" type="text" id="skincolor" value="<%=rs("SkinColor")%>" size="30">
(输入颜色代码，默认值为：BFE7F1)</td>
</tr>
<tr class="tr_1"> 
<td colspan="2">邮件设置</td>
</tr>
<tr> 
<td class="td_r">发送邮件组件：</td>
<td>
<input type="radio" name="emailsendtype" value="0"<%if rs("emailsendtype")=0 then Response.write " checked"%>>
不发送邮件
<input type="radio" name="emailsendtype" value="1"<%if rs("emailsendtype")=1 then Response.write " checked"%>>
AspEmail组件
        <%
on error resume next
set TestObj=server.CreateObject ("Persits.MailSender")
If -2147221005 <> Err then
 Response.write "(已安装,版本:"&TestObj.version&")"
Else
  Response.write "(未安装)"
End If
%></td>
</tr>
<tr id="t_EmailSendPort"> 
<td class="td_r">发送邮件的服务器的端口：</td>
<td><input name="EmailSendPort" id="EmailSendPort" type="text" value="<%=rs("EmailSendPort")%>">(普通发送使用25固定端口，加密发送一般使用465或587端口)</td>
</tr>
<tr id="t_SmtpAddress"> 
<td class="td_r">服务器地址：</td>
<td><input name="SmtpAddress" type="text" value="<%=rs("SmtpAddress")%>" size="30">
</td>
</tr>
<tr id="t_SmtpUser"> 
<td class="td_r">发送邮件帐号名称：</td>
<td><input name="SmtpUser" type="text" value="<%=rs("SmtpUser")%>" size="30">
</td>
</tr>
<tr id="t_SmtpPassword"> 
<td class="td_r">发送邮件帐号的密码：</td>
<td><input name="SmtpPassword" type="password" value="<%=rs("SmtpPassword")%>" size="30">
<br>
如:你有一个qq邮件名为a@qq.com,邮箱的授权码或密码为b <br>
则发信服务器地址填写:smtp.qq.com 发送邮件帐号名称填写a@qq.com,发送邮件帐号的密码填写b,其它邮件类似</td>
</tr>
<tr class="tr_1"> 
<td colspan="2">数据保留</td>
</tr>
<tr> 
<td class="td_r">小时统计保留天数：</td>
<td><input name="HourCountKeepDay" type="text" id="HourCountKeepDay" value="<%=Rs("HourCountKeepDay")%>" size="25">
*默认2天</td>
</tr>
<tr> 
<td class="td_r">网页浏览记录保留天数：</td>
<td><input name="WebKeepDay" type="text" id="WebKeepDay" value="<%=Rs("WebKeepDay")%>" size="25">
*默认2天</td>
</tr>	
<tr> 
<td class="td_r">来源记录保留天数：</td>
<td><input name="LyKeepDay" type="text" id="LyKeepDay" value="<%=Rs("LyKeepDay")%>" size="25">
*默认2天</td>
</tr>
<tr> 
<td class="td_r">搜索引擎记录保留天数：</td>
<td><input name="SearchKeepDay" type="text" id="SearchKeepDay" value="<%=Rs("SearchKeepDay")%>" size="25">
*默认7天</td>
</tr>
<tr> 
<td class="td_r">搜索关键字记录保留天数：</td>
<td><input name="KeywordKeepDay" type="text" id="KeywordKeepDay" value="<%=Rs("KeywordKeepDay")%>" size="25">
*默认2天</td>
</tr>
<tr> 
<td class="td_r">天数记录保留天数：</td>
<td><input name="CountKeepDay" type="text" id="CountKeepDay" value="<%=Rs("CountKeepDay")%>" size="25">
*默认60天</td>
</tr>
    
<tr> 
<td></td><td>  
<input type="submit" name="Submit32" value="修改">
　　 
<input type="reset" name="Submit5232" value="取消">
</td>
</tr>
</table>
</form>
<%Rs.Close()%>
