⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sendproduct_list.asp

📁 网上商城~~ 手机类型的网站源码Asp
💻 ASP
字号:
<!--#include file="conn.asp" -->
<%
if  session("username")="" then
   response.write "<table><tr><td>你还未登陆,或登陆已超时,请重新登陆!</td></tr>"
   response.write "<tr><td><a href='login.htm' target=_parent>返回</a></td></tr></table>"
   response.end
end if
%>
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../style.css" type="text/css">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<table cellspacing=0 cellpadding=0 width=100% align=center border=0>
  <tbody> 
  <tr> 
    <td valign="TOP"> 
      <div align=center> 
        <table cellspacing=0 cellpadding=5 width="100%" border=0>
          <tbody> 
          <tr> 
            <td align="center" class="headbold">送货方式列表</td>
          </tr>
          </tbody> 
        </table>
          <table width="100%" 
            border=0 cellpadding=1 cellspacing=1 class="table1">
            <tbody>
            <form method="post" action="sendproduct_del.asp">
              <tr class="th1"> 
                <td width=60 height=21 align="center">编号</td>
                <td align="center">送货方式名称</td>
                <td width=60 align="center">价格</td>
                <td width=80 align="center">关闭否</td>
                <td width=80 align="center">更新日期</td>
                <td width=50 align="center">修改</td>
                <td width=50 align="center"><b> 
                  <input type="submit" name="Submit" value="删除" class="input_cccccc">
                  </b></td>
              </tr>
              <%
sql="select * from Net008_sendproduct order by adddate"
set rs=server.createobject("adodb.recordset")
rs.open sql ,conn,1,2
if rs.recordcount<1 then
response.write"暂无信息!"
'response.end
end if
const maxperpage=30 '定义每一页显示的数据记录的常量                                   
dim currentpage '定义当前页的变量                                   
rs.pagesize=maxperpage                                   
currentpage=request.querystring("pageid")                                   
if currentpage="" then                                   
currentpage=1                                   
elseif currentpage<1 then                                   
currentpage=1                                   
else                                   
currentpage=clng(currentpage)                                   
	if currentpage > rs.pagecount then                                   
	currentpage=rs.pagecount                                   
	end if                                   
end if                                   
'如果变量currentpage的数据类型不是数值型                                   
'就1赋给变量currentpage                                   
if not isnumeric(currentpage) then                                   
currentpage=1                                   
end if                                   
dim totalput,n '定义变量                                   
totalput=rs.recordcount-1
if totalput mod maxperpage=0 then                                   
n=totalput\maxperpage                                   
else                                   
n=totalput\maxperpage+1                                   
end if                                   
if n=0 then                                   
n=1                                   
end if                                   
rs.move(currentpage-1)*maxperpage                                   
i=0                                   
rs.movenext
do while i< maxperpage and not rs.eof
%>
              <tr class="th2"> 
                <td height=21 align="center"> <%response.write rs("sendproductid")
%> </td>
                <td align="left"> <%response.write rs("sendproductname")
%> </td>
                <td align="center"> <%=rs("sendproductprice")%> </td>
                <td align="center">
<%
if rs("dispyn")=1 then
	response.write "<font color=ff0000>已关闭</font>"
else
	response.write "使用中"
end if
%>
</td>
                <td align="center"> <%=FormatDateTime(rs("adddate"),2)%> </td>
                <td align="center"><a href="sendproduct_modi.asp?id=<%=rs("id")%>" class="LeftTypeLinkU">修改</a></td>
                <td align="center"> <input type="checkbox" name="deleteid" value="<%=rs("id")%>" class="input_no"> 
                </td>
              </tr>
              <%
    i=i+1                                  
    rs.movenext                                  
    loop       
%>
            </form>
          </table>
        <br>
          <table class=table1 cellspacing=1 cellpadding=0 width="100%" border=0>
            <tbody> 
          <tr> 
                <td 
                  height=22 colspan=3 align=middle class="th1">页数:<%=currentpage%>/ 
              <% =n%>
              <%k=currentpage                                                                              
   	if k<>1 then%>
              [<a href="sendproduct_list.asp?pageid=1" class="LeftTypeLinkU">首页</a>] 
              [<a href="sendproduct_list.asp?pageid=<%=k-1%>" class="LeftTypeLinkU">上一页</a>] 
              <%else%>
              [首页]&nbsp;[上一页] 
              <%end if%>
              <%if k<>n then%>
              [<a href="sendproduct_list.asp?pageid=<%=k+1%>" class="LeftTypeLinkU">下一页</a>] 
              [<a href="sendproduct_list.asp?pageid=<%=n%>" class="LeftTypeLinkU">尾页</a>] 
              <%else%>
              [下一页]&nbsp;[尾页] 
              <%end if%>
              共有<font color="red"><%=totalput%></font>条信息</td>
          </tr>
          </tbody> 
        </table>
          <table width="100%" border="0" cellspacing="0" cellpadding="3">
            <tr>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td align="center">
<input name="Submit2" type="button" class="sinput" onclick="javascript:window.location.href='sendproduct_add.asp'" value="添 加">
              </td>
            </tr>
          </table>
          <br>
      </div>
    </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -