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

📄 goods.asp

📁 本源代码为大学生购物网的源代码,欢迎大家的下载,学习与交流
💻 ASP
字号:
<TABLE cellSpacing=0 cellPadding=0 width=760 align=center border=0 class=page>
  <TBODY>
    <TR> <td><!--#include file="top.asp"-->
<%
if session("user_id")="" then
response.write "<script language='javascript'>" & VbCRlf
response.write "alert('非法操作!');" & VbCrlf
response.write "history.go(-1);" & vbCrlf
response.write "</script>" & VbCRLF
else
%>
<TABLE width=760 border=0 align=center cellSpacing=0 cellPadding=0 >
  <TBODY>
    <TR> 
      <td width=176 valign=top>
           
               <!--#include file="center.asp"--></td><td bgcolor="#dfdfdf" width="1"></td>
      <TD align="center" vAlign=top bgcolor="#FFFFFF"> 
<%
dim strsql,rs
set rs=server.CreateObject("adodb.recordset")
strsql="select * from goods_info where user_id="&session("user_id")&" order by goods_id desc"
rs.open strsql,conn,1,3
%>
<SCRIPT LANGUAGE="JavaScript">
<!--
function GoPage() {
window.location.href="?page_no="+ page.value;
}
//-->
</SCRIPT>


        <TABLE cellSpacing=1 cellPadding=0 width="570" border=0 bgcolor="#C0C0C0">
          <TBODY>
            <TR> 
              <TD bgColor=#EFEFEF height=21> <TABLE width="100%" border=0>
                  <TBODY>
                    <TR> 
                      <TD align=middle width=25>
						<img border="0" src="images/news.gif" width="15" height="15"></TD>
                      <TD>商品管理</TD>
                      <TD align="right"><a href="goods_add.asp">发布商品</a> </TD>
                    </TR>
                  </TBODY>
                </TABLE></TD>
            </TR>
            <TR> 
              <TD align="center" bgcolor="#FFFFFF">
<table width="98%" border="0">
                  <tr align="center"> 
                    <td width="15%"><font color="#FF00FF">商品名称</font></td>
                    <td><font color="#FF00FF">商品描述</font></td>
                    <td width="12%"><font color="#FF00FF">商品价格</font></td>
                    <td width="12%"><font color="#FF00FF">商品数量</font></td>
                    <td width="10%"><font color="#FF00FF">有效期</font></td>
                    <td width="15%"><font color="#FF00FF">上架时间</font></td>
                    <td width="8%"><font color="#FF00FF">修改</font></td>
                    <td width="8%"><font color="#FF00FF">删除</font></td>
                  </tr>
      <%
	  IF not rs.eof and not rs.bof then
	  dim page_size
	  dim page_no
	  dim page_total
	  page_size=8
	  if request.QueryString("page_no")="" then
	  page_no=1
	  else
	  page_no=cint(request.QueryString("page_no"))
	  end if
	  rs.pagesize=page_size
	  page_total=rs.pagecount
	  rs.absolutepage=page_no
	  dim I,J
	  I=0
	  J=page_size
	  do while not rs.eof and J>0
	  J=J-1
	  I=I+1
      %>
            
                  <tr> 
                    <td align="center"><a href="goods_info.asp?goods_id=<%=rs("goods_id")%>" target="_blank"><%=rs("goods_name")%></a></td>
                    <td align="center"><%=left(rs("goods_content"),100)%></td>
                    <td align="center"><%=rs("goods_price")%>元</td>
                    <td align="center"><%=rs("goods_amount")%>个</td>
                    <td align="center"><%=rs("goods_long")%>天</td>
                    <td align="center"><%=rs("goods_date")%></td>
                    <td align="center"><a href="goods_edit.asp?goods_id=<%=rs("goods_id")%>">修改</a></td>
                    <td align="center"><a href="goods_del.asp?goods_id=<%=rs("goods_id")%>">删除</a></td>
                  </tr>
  <%
	      Rs.MoveNext
		Loop      
	  End IF
	  %>
                </table>
              </TD>
            </TR>
          </TBODY>
        </TABLE>
      

<table  width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="page" >
              <tr>
                <td><div align="center">[本页是<%=int(page_no)%>/<%=int(page_total)%>] [<a href="?page_no=1">第一页</a>]
              <%if int(page_no)>1 then%>
              [<a href="?page_no=<%=cstr(int(page_no-1))%>">前一页</a>]
              <%elseif int(page_no)<=1 then%>
              [<a href="?page_no=1">前一页</a>]
              <%end if%>
              <%if int(page_no)<int(page_total) then%>
              [<a href="?page_no=<%=cstr(int(page_no+1))%>">后一页</a>]
              <%elseif int(page_no)>=int(page_total) then%>
              [<a href="?page_no=<%=cstr(int(page_total))%>">后一页</a>]
              <%end if%>
              [<a href="?page_no=<%=page_total%>">最后一页</a>] 转到
              <input name="page" type="text" value="<%=page_no%>" size="5">页
			<input type="button" class=input name="Submit" value="转到" onclick="GoPage()"></div></td>
              </tr>
</table>
      </TD>
    </TR>
  </TBODY>
</TABLE><%end if%>

<!--#include file="bottom.asp"--></TD>
    </TR>
  </TBODY>
</TABLE><%
conn.Close
Set conn=Nothing
%>

⌨️ 快捷键说明

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