<!--#include file="conn.asp"-->
<%
  WebUserID=Trim(Session("UserID"))
  
  strType=GetVariable("type")
  if strType="" then
	strType=GetKey("Type",WebUserID,"counter")
	if strType="Null" then
		strType="0"
	end if
  end if
  
  if GetVariable("action")="save" then
	  call	SetKey("Type",strType,WebUserID,"counter")
	  Response.Write("<script language='javascript'>" & chr(13))
	  response.Write("function window.onload(){alert('计数器设置成功！　');}" & chr(13))
	  response.Write("</script>" & chr(13))
  end if
 
 sql="select w_counter from website where m_id=" & WebUserID
 rs.open sql,conn,1,1
 counts=rs("w_counter")
 rs.close
 set rs=nothing

  
%>


<HTML>
<HEAD>
<TITLE>网站流量选项</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<style>
td{font-size:9pt;line-height:180%}
</style>
<script language="JavaScript" src="common/JS_CheckForm.js"></script>

<script language="JavaScript">
function CheckForm(theform){
	if(!CheckEmpty(theform.txtcount, "流量初始化")) return false;
	if(!CheckReal(theform.txtcount, "流量初始化")) return false;
	return true;
}
</script>
</HEAD>

<body leftmargin="0" topmargin="0">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="100%" align="center" valign="top"> 
      <table width=100% height="100%" align=center cellpadding=3 cellspacing=1 bgcolor="#547AB4" class=table1>
        <tr class=tr> 
          <td height="26" bgcolor="#A4B9D7"><strong><font color="#FFFFFF">网站流量选项</font></strong></td>
        </tr>
        <tr> 
          <td align="center" bgcolor="#FFFFFF"> 
            <form name="form1" method="post" action="?action=save" onSubmit="return CheckForm(this)">
              <table width="400" height="64" border="0" cellpadding="0" cellspacing="0">
                <tr> 
                  <td width="353" height="10">&nbsp;</td>
                </tr>
                <tr> 
                  <td height="22"><fieldset>
                    <legend><strong>网站流量选项</strong></legend>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr style="display:none"> 
                        <td width="23%" height="35" align="right">网站当前流量：</td>
                        <td width="77%" height="35"> <%
						 NewHits = CStr(counts)
						 L=Len(NewHits)
							For i = 1 to L
								num = Mid(NewHits,i,1)
								Display = Display & "<img src=Templet/pic/counter/" & strType & "/" & num & ".gif>"
							Next
							Response.Write Display
						  %> </td>
                      </tr>
                      <tr style="display:none"> 
                        <td height="35" align="right">流量初始化：</td>
                        <td height="35"> <input name="txtcount" type="text" id="txtcount2" value="<%=counts%>" size="10"></td>
                      </tr>
                      <tr> 
                        <td height="35" align="right">计数器样式：</td>
                        <td height="35"> <select name="type" id="type" onChange="location='Admin_Counter.asp?type='+this.value">
                            <option value="<%=strType%>" selected>样式<%=strType%></option>
                            <option value="0">样式0</option>
                            <option value="1">样式1</option>
                            <option value="2">样式2</option>
                            <option value="3">样式3</option>
                            <option value="4">样式4</option>
                            <option value="5">样式5</option>
                            <option value="6">样式6</option>
                            <option value="7">样式7</option>
                            <option value="8">样式8</option>
                            <option value="9">样式9</option>
                            <option value="10">样式10</option>
                            <option value="11">样式11</option>
                            <option value="12">样式12</option>
                            <option value="13">样式13</option>
                            <option value="14">样式14</option>
                            <option value="15">样式15</option>
                            <option value="16">样式16</option>
                            <option value="17">样式17</option>
                            <option value="18">样式18</option>
                            <option value="19">样式19</option>
                            <option value="20">样式20</option>
                            <option value="21">样式21</option>
                            <option value="22">样式22</option>
                            <option value="23">样式23</option>
                            <option value="24">样式24</option>
                            <option value="25">样式25</option>
                            <option value="26">样式26</option>
                            <option value="27">样式27</option>
                            <option value="28">样式28</option>
                            <option value="29">样式29</option>
                          </select> </td>
                      </tr>
                      <tr style="display:none"> 
                        <td height="30" align="center">&nbsp; </td>
                        <td height="30">
                          <%
						prevent=GetKey("Prevent",WebUserID,"counter" )
						if prevent<>"none" then
							strChecked="checked"
						end if
						%> <input name="chkprevent" type="checkbox" id="chkprevent" value="True" <%=strChecked%>>
                          启用准确计数　 <a href="javascript:;" title="防止有恶意的浏览者不断刷新页面，使计数器不断累加，最终使计数变得不真实！">帮助？</a></td>
                      </tr>
                      <tr> 
                        <td height="18" colspan="2" align="center"><img src="Templet/pic/counter/<%=strtype%>/0.gif"><img src="Templet/pic/counter/<%=strtype%>/1.gif"><img src="Templet/pic/counter/<%=strtype%>/2.gif"><img src="Templet/pic/counter/<%=strtype%>/3.gif"><img src="Templet/pic/counter/<%=strtype%>/4.gif"><img src="Templet/pic/counter/<%=strtype%>/5.gif"><img src="Templet/pic/counter/<%=strtype%>/6.gif"><img src="Templet/pic/counter/<%=strtype%>/7.gif"><img src="Templet/pic/counter/<%=strtype%>/8.gif"><img src="Templet/pic/counter/<%=strtype%>/9.gif"></td>
                      </tr>
                      <tr> 
                        <td height="50" colspan="2" align="center"> <input type="submit" name="Submit" value="设　置">
                          <input type="button" name="Submit2" value=" 关 闭 " onClick="window.close()"></td>
                      </tr>
                    </table>
                    </fieldset></td>
                </tr>
                <tr> 
                  <td height="21">&nbsp;</td>
                </tr>
              </table>
            </form></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
