<!--#include file="../common/conn.asp"-->
<%
call checkuser("流量控制")
  if GetVariable("action")="save" then
	  strSQL="Update web_counter set counter=" & GetFormVariable("txtcount")
  	  if request.Form("chkprevent")<>"" then
	  	  strSQL=strSQL & ", prevent=" & GetFormVariable("chkprevent")
	  else
	  	  strSQL=strSQL & ", prevent=False"
	  end if
	  conn.execute strSQL& " Where m_id=" & WebUserID,0,1
  end if
  
 sql="select * from web_counter where m_id=" & WebUserID
 rs.open sql,conn,1,1
 counts=rs("counter")
 prevent=rs("prevent")
 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" BodyBegin>
<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="#336600" class=table1>
        <tr class=tr> 
          <td height="26" bgcolor="#669900"><strong><font color="#FFFFFF">网站流量设置</font></strong></td>
        </tr>
        <tr> 
          <td height=100% align="center" bgcolor="#FFFFFF"> <form name="form1" method="post" action="?action=save" onSubmit="return checkform(this);">
              <table width="353" height="64" border="0" cellpadding="0" cellspacing="0">
                <tr> 
                  <td width="353" height="21">&nbsp;</td>
                </tr>
                <tr> 
                  <td height="22"><fieldset>
                    <legend><strong>网站流量</strong></legend>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td colspan="2">&nbsp;</td>
                      </tr>
                      <tr> 
                        <td width="30%" height="35" align="right">网站当前流量：</td>
                        <td width="70%" height="35"><strong><font color="#FF0000"> 
                          <%=counts%> </font> </strong> </td>
                      </tr>
                      <tr> 
                        <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="30" align="center">&nbsp; </td>
                        <td height="30"> 
                          <% 
						if prevent=true 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="50" colspan="2" align="center"> <input type="submit" name="Submit" value="设　置">
                          　 
                          <input type="reset" name="Submit2" value="重　置"></td>
                      </tr>
                    </table>
</fieldset>&nbsp;</td>
                </tr>
                <tr> 
                  <td height="21">&nbsp;</td>
                </tr>
              </table>
            </form></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
