主题:  实在分不清这代码里面的<%=cc%>从何而来?

计算器

职务:普通成员
等级:1
金币:0.0
发贴:74
#12004/2/12 16:42:09
<!--#include file="admin_conn.asp" -->
<%
dim loginid
loginid=session("loginid")
if not loginid="true" then
   session("err_mes")="对不起,您还没有正确登录或是未操作的时间过长!"
   response.redirect "login.asp"
end if
%>
<%
dim conn,rs
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From sppnews Order By id DESC", conn, 3, 2
%>
<%if rs.eof and rs.bof then%>
<title>发现错误!</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../images/spp.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="40%" border="0" cellspacing="10" cellpadding="0" align="center" class="table">
  <tr> 
    <td> 
            <table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF" bordercolorlight="#000000">
              <tr> 
                <td>&nbsp;</td>
              </tr>
              <tr> 
                
          <td align="center"><b><font color="#FF0000">没有任何记录!!!</font></b></td>
              </tr>
              <tr>
                <td align="center">&nbsp;</td>
              </tr>
              <tr> 
                
          <td align="center"><a href="add.asp">点击这里添加新记录</a></td>
              </tr>
              <tr> 
                <td>&nbsp;</td>
              </tr>
            </table>
    </td>
  </tr>
</table>
<!--#include file="../include/copyright.asp"-->
<%else%>
<%
order=0
count=rs.RecordCount
pagesize=5
pagecount=count\(pagesize+1)+1
page=request.QueryString("page")
if page="" then
	page=1
end if
%>

<html>
<head>
<title>更新编辑</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../images/spp.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="del" method="post" action="del.asp">
  <table width="95%" cellspacing="10" cellpadding="0">
  <tr>
    <td>
      <table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF" bordercolorlight="#000000">
        <tr> 
            <td align="center"><font size="2"><a href="add.asp">添加新记录</a> | <a href="edit.asp">管理更新记录</a></font></td>
        </tr>
        <tr> 
            <td align="right"><a href="loginout.asp">管理员退出</a></td>
        </tr>
        <tr> 
          <td>
              <table width="100%" cellspacing="0" cellpadding="0" align="center" bordercolordark="#FFFFFF" bordercolorlight="#000000" border="1">
                <tr align="center"> 
                  <td width="14%">ID</td>
                  <td width="14%">标题</td>
                  <td width="14%">点击计数</td>
                  <td width="14%">添加时间</td>
                  <td width="14%">查看</td>
                  <td width="14%">编辑</td>
                  <td width="14%">删除</td>
                </tr>
          <%
if not rs.eof then
	rs.Move (page-1)*pagesize
	cc=(page-1)*pagesize
	do while (not rs.eof) and (order<pagesize)
		cc=cc+1
		order=order+1
%>
                <tr align="center"> 
                  <td><%=cc%></td>
                  <td><%=rs("title")%></td>
                  <td><%=rs("counter")%></td>
                  <td><%=rs("time")%></td>
                  <td><a href=../display.asp?id=<%=rs("id")%> target="_blank">查看</a></td>
                  <td><a href=editnews.asp?id=<%=rs("id")%> target="_blank">编辑</a></td>
                  <td><input type="checkbox" name="sel<%=cc%>"><input type=hidden name=id<%=cc%> value=<%=rs("id")%>></td>
                </tr>
          <%
rs.movenext
	loop
end if
%>
                <tr align="center"> 
                  <td colspan="7">&nbsp; 
                    <%if page>1 then%>
                    <a href="edit.asp?page=1">第一页</a>&nbsp;&nbsp;<a href="edit.asp?page=<%=page-1%>">上 
                    页</a>&nbsp;&nbsp; 
                    <%end if%>
                    <%if (page-pagecount)<0 then%>
                    <a href="edit.asp?page=<%=(page+1)%>">下 页</a>&nbsp;&nbsp; 
                    <a href="edit.asp?page=<%=pagecount%>">最后页</a> 
                    <%end if%>
                  </td>
                <tr align="center"> 
                  <td colspan="7"> 
                    <input type=hidden name=coun value=<%=cc%>> 
                    <input type="submit" value="确定">
                    <input type="reset" value="重写">
                  </td>
                </tr>
              </table>
          </td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</form>
<!--#include file="../include/copyright.asp"-->
</body>
</html>
<%end if
rs.close
set rs=nothing%>



5D荣誉斑竹

职务:普通成员
等级:3
金币:10.0
发贴:1480
#22004/2/12 17:29:53
cc=(page-1)*pagesize