<%
'乘风多用户计数器 Sql版
'作者QQ：178575
'作者EMail：yliangcf@163.com
'作者网站：http://www.qqcf.com
'详细简介：http://www.qqcf.com/cfcount.htm
'上面有程序在线演示，安装演示，使用疑难解答，最新版本下载等内容
'因为这些内容可能时常更新，就没有放在程序里，请自己上网站上查看
'有完整版本的演示
%>
<%
If Session("CFCountUser_View")<>"" Then'为独立查看者时
 Call AlertBack("独立查看者无法对此操作",1)
End If
%>
<%
Session("Url")=Tmp&"User_Manage.asp?"&Request.QueryString&"&"&Request.Form

 If ChkStr(Request("Page"),2) = "" Then
  Page = 1
 Else 
  Page = CInt(ChkStr(Request("Page"),2))
 End If

MyPageSize=10
MyPageSize2=10

If RsSet("StyleTotal") Mod MyPageSize=0 Then
 TotalPage=RsSet("StyleTotal")/MyPageSize
Else
 TotalPage=Int(RsSet("StyleTotal")/MyPageSize)+1
 If Page=TotalPage Then
 MyPageSize2=RsSet("StyleTotal") Mod MyPageSize
 End If
End If
I=1
%>
<%
Set Rs=Server.CreateObject("Adodb.RecordSet")
Sql="Select * From CFCount_User Where UserName='"&UserName&"'"
Rs.Open Sql,Conn,1,1%>

<table class="tb_1">
<tr class="tr_1">
            <td>样式代码</td>
            <td>选择你喜欢的计数器样式</td>
  </tr>
          <form name="form4" method="post" action="User.aspx?Action=stylemodifysave">
            <%While I<=MyPageSize2%>
            <tr> 
              <td class="td_1"> 
                  <%K=(Page-1)*MyPageSize+I%>
                  <input name="style" type="radio" value="<%=k%>"<%If Rs("Style")=K Then Response.Write " Checked"%>>编号:<%=K%>
              </td>
              <td>
<div><%For J=0 to 9%><img src="CounterPic/<%=K%>/<%=J%>.gif"><%Next%></td>
            </tr>
            <%
I=I+1
Wend%>
            <tr>
              <td width="10%">确认使用：</td>
              <td>
                  <input type="checkbox" name="CounterShow" value="-1"<%If Rs("CounterShow")=-1 Then Response.Write " checked"%>>是
              </td>
            </tr>
            <tr> 
              <td>&nbsp; </td>
              <td> <div> 
                  <input type="submit" name="Submit3" value="确定">
              </td>
            </tr>
          </form>
          <tr> 
            <td colspan="2"><table class="tb_3">
                <tr> 
                  <td><a href="?action=<%=action%>&page=1">第一页</a> 
                      <%
if page>1 then%>
                      <a href='?action=<%=action%>&page=<%=page-1%>'>上一页</a> 
                      <%
end if
%>
                      <%
if page<totalpage   then%>
                      <a href='?action=<%=action%>&page=<%=page+1%>'>下一页</a> 
                      <%
end if
%>
                      <a href="?action=<%=action%>&page=<%=totalpage%>">最后一页</a> 
                      页次：<font color="#ff0000"><%=page%></font>/<%=totalpage%>页
                            
<%
Response.write "&nbsp;&nbsp;转到第<select id='page' onChange=""window.location=document.getElementById('page').options[document.getElementById('page').selectedIndex].value"">"
For I=1 To TotalPage
    Response.Write "<option value=?Action="&Action&"&Page="&i     
 If Page=I Then Response.Write " selected"
 Response.Write ">"& I &"</option>"
Next
Response.write "</select>页"
%>
</td>
              </tr>
                    </table></td>
  </tr>
</table>
          <table class="tb_1">
          <tr> 
            <td colspan="2" class="td_1">你的计数器效果 
            </td>
          </tr>
          <tr> 
            <td colspan="2" class="td_1">Script调用： 
            </td>
          </tr>
          <tr> 
            <td colspan="2" class="td_1"><script src="<%=Tmp%>cf.aspx?username=<%=Rs("UserName")%>"></script></td>
          </tr>
        </table>