nogoods.asp

来自「非常有商业价值的软件」· ASP 代码 · 共 114 行

ASP
114
字号
<!--#include file="chk.asp"-->
<!--#include file="db_conn.asp"-->
<!--#include file="../my_lib/my_request.asp"-->
<!--#include file="../my_lib/pages.asp"-->
<html>
<head>
<title>缺货商品</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="style.css" rel=stylesheet type=text/css>
</head>
<body  text="#000000">
<div align="center">
    
<table width="760" cellspacing="1">
  <tr> 
    <td height="20" colspan="6" align="center" nowrap>
	缺货物报表(当存货数量<font color="#FF0000">小于或等于8</font>时)</td>
  </tr>
  <tr valign="middle"> 
    <td width="31" height="25" align="center" nowrap bgcolor="#EFEFEF">ID</td>
    <td width="132" height="25" align="center" nowrap bgcolor="#EFEFEF">商品名称</td>
    <td width="130" height="25" align="center" nowrap bgcolor="#EFEFEF">所属大类别</td>
    <td height="25" align="center" nowrap bgcolor="#EFEFEF" width="146">所属小类别</td>
    <td height="25" align="center" nowrap bgcolor="#EFEFEF" width="81">
	<font color="#FF0000">库存数量</font></td>
    <td height="25" align="center" nowrap bgcolor="#EFEFEF" width="124">加入时间</td>
  </tr>
<%
set rs=server.createobject("adodb.recordset")
sqltext="select * from yqj_product where p_nums<=8 order by addtime desc" 
rs.open sqltext,conn,1,1
if (rs.eof and rs.bof) then
	response.write "<tr>"
    response.write "<td width=500 colspan=4><font color=#FF0000>没有相应的数据</font></td>"
    response.write "</tr>"
    else
    rs.PageSize =20 '每页记录条数
			iCount=rs.RecordCount '记录总数
			iPageSize=rs.PageSize
    		maxpage=rs.PageCount 
    		page=request("page")
    
    if Not IsNumeric(page) or page="" then
        page=1
    else
        page=cint(page)
    end if
    
    if page<1 then
        page=1
    elseif  page>maxpage then
        page=maxpage
    end if
    
    rs.AbsolutePage=Page

	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if

end if
						  ii=1
						  while not rs.eof and ii<=rs.pagesize
						  set id=rs("id")
						  set bid=rs("bid")
						  set sid=rs("sid")
						  set p_name=rs("p_name")
						  set paymode=rs("paymode")
						  set p_nums=rs("p_nums")
						  set addtime=rs("addtime")
						  
						  sql1="select txt_big_class from big_class where id="&bid
						  set rs1=conn.execute (sql1)
						  txt_big_class=rs1("txt_big_class")
						  rs1.close
						  set rs1=nothing
						  
						  sql2="select txt_small_class from small_class where id="&sid
						  set rs2=conn.execute (sql2)
						  txt_small_class=rs2("txt_small_class")
						  rs2.close
						  set rs2=nothing

%>
  <tr valign="middle"> 
    <td width="31" height="25" align="center" bgcolor="#FFFFFF"><%=(page-1)*19+ii%></td>
    <td width="132" height="25" align="left" bgcolor="#FFFFFF"><a href=edit_product.asp?id=<%=id%>><%=p_name%></a></td>
    <td width="130" height="25" bgcolor="#FFFFFF">&nbsp;<%=txt_big_class%></td>
    <td height="25" align="center" bgcolor="#FFFFFF" width="146">
	<p align="left"><%=txt_small_class%></td>
    <td height="25" align="center" bgcolor="#FFFFFF" width="81"><font color="#FF0000"><%=p_nums%></font></td>
    <td height="25" align="center" bgcolor="#FFFFFF" width="124"><%=addtime%></td>
  </tr>
<%
rs.movenext
ii=ii+1
wend
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</table>
    </div>
<div align="center">
<table width="760" height="25" cellPadding="0" cellSpacing="0" bgColor="#EFEFEF"><tr>
<td align="center"  bgcolor="#EFEFEF"><%call PageControl(iCount,maxpage,page,"border=0 align=left","<p align=center>")%></td>  
</tr>
  </table>
</div>
</body>
</html>

⌨️ 快捷键说明

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