asearch.asp

来自「国内第一数字点卡销售程序。功能强大。 完整无错!数据文件经MD5加密!经严格测」· ASP 代码 · 共 172 行

ASP
172
字号
<%@ CODEPAGE = "936" %>
<!--#include file="conn.asp"--><%
set rs=server.createobject("adodb.recordset")
set rs1=server.createobject("adodb.recordset")
%>
<%
if session("admin_rank")<>1 and session("admin_rank")<>4 then
response.write("<script>alert('您无权查看本页,SORRY!');window.location=('login.asp')</script>")
response.end
end if
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="css.css">
</head>

<%
if request("action")="del" then
    sql="select * from hw where hw_id="&int(request("hw_id"))
    rs.open sql,conn,3,3
    if rs.eof then
        response.redirect "delhw.asp"
    else
    rs.delete
    rs.update
    end if
    rs.close
    response.write "<script language=javascript>alert('删除成功!');</script>"
end if
%>
<body style="background-color: #F0FBF1">

<div align="center">
<b><font color="#FF0000" size="2">注:</font></b>点击商品名称可以查看该商品下的所有卡号和密码<br>
<br>
<table border="1" width="100%" cellspacing="0" height="112" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" cellpadding="0">
               <tr> 
                <form method="POST" action="asearch.asp">
<td style="padding-left: 10px" colspan="12" height="35"> 商品查询:
        <input type="text" name="keyword" size="12" class=ipt>&nbsp;
        <input type="image" border="0" name="b12" src="../IMAGES/search.jpg" width="81" height="20"> 
<br>
      </td>
                </form>
              </tr>
<%
  		keyword=srequest(trim(request("keyword")),0)
        response.write "<font color=red>"
        response.write keyword
        response.write "</font>"
 
  sql="select * from hw where hw_name like '%"&keyword&"%' order by hw_buys DESC"
  rs.open sql,conn,3,3
  if rs.eof then
    response.write "暂且没有任何订单"
    response.end
  end if
      rs.pagesize=15
      page = cint(request("page"))
      if page = "" then page = 1
      if page < 1 then page=1
      if page >= rs.pagecount then page = rs.pagecount
      rs.absolutepage = page
  %>
  <tr>
    <td width="174" align="center" height="35" bgcolor="#FF9933">
      商品名称</td>
    <td width="70" align="center" height="35" bgcolor="#FF9933">
      当前库存</td>
    <td width="85" align="center" height="35" bgcolor="#FF9933">
      上一天销售量</td>
    <td width="54" align="center" height="35" bgcolor="#FF9933">
      进价</td>
    <td width="51" align="center" height="35" bgcolor="#FF9933">
      零售价</td>
    <td width="97" align="center" height="35" bgcolor="#FF9933">
      当前库存金额</td>
    <td width="102" align="center" height="35" bgcolor="#FF9933">
      库存导入</td>
    <td width="68" align="center" height="35" bgcolor="#FF9933">
      编辑库存</td>
    <td width="70" align="center" height="35" bgcolor="#FF9933">
      库存警告</td>
    <td width="61" align="center" height="35" bgcolor="#FF9933">
      在线卡</td>
    <td width="79" align="center" height="35" bgcolor="#FF9933">
      是否删除</td>
    <td width="46" align="center" height="35" bgcolor="#FF9933">
      编辑</td>
  </tr>
<%
for i=1 to rs.pagesize
%>  <tr>
    <td width="174" align="center" height="35">
      <p align="left"> <a href="cardsearch.asp?keywords=<%=rs("hw_id")%>&soutype=1"><%=rs("hw_name")%></a></td>
    <td width="70" align="center" height="35"> 
    <%sql1="select * from tingcardnum  where hw_id = "&rs("hw_id")&" and hw_ok=true"
      rs1.open sql1,conn,3,3
      kucun=rs.recordcount
      rs1.close
      %><%=kucun%>
       </td>
    <td width="85" align="center" height="35">
        <% sql1="select * from sub  where hw_id ="&rs("hw_id")&" and sub_payok=true"
            rs1.open sql1,conn,3,3
            salesl=0
            do while not rs1.eof
            if  datediff("d",datevalue(rs1("sub_date")),now())=1 then
               salesl=salesl+rs1("hw_count") 
            end if
            rs1.movenext
            loop
            rs1.close
      %><%=salesl%></td>
    <td width="54" align="center" height="35">
     <%=formatcurrency(rs("hw_jj"))%>  </td>
    <td width="51" align="center" height="35">
     <%=formatcurrency(rs("hw_cash"))%></td>
    <td width="97" align="center" height="35">
    <%=formatcurrency(rs("hw_jj")*kucun)%></td>
    <td width="102" align="center" height="35">
    <%
      if rs("hw_cz")="0" then
      %>
<a href="admin_cardsadd2.asp?hw_id=<%=rs("hw_id")%>">库存导入</a><%else%>在线充值<%end if%></td>
    <td width="68" align="center" height="35">
   <a href="cardsearch.asp?keywords=<%=rs("hw_id")%>&soutype=1">编辑库存</a></td>
    <td width="70" align="center" height="35">
    <b>  
    <font color="#FF0000"> <%aa=kucun-salesl
      if rs("hw_cz")="0" then
         if kucun=0 then%>缺货 
         <%elseif aa<0 then%> 紧张
                  <%else%></font><font color="#0000FF">充足</font><font color="#FF0000">
      <%end if%><%end if%></font></b></td>
    <td width="61" align="center" height="35">
        <% if rs("hw_cz")="0"  then
      %>否
      <%else%> 是<%end if%></td>
    <td width="79" align="center" height="35">
      <a href="delhw.asp?hw_id=<%=rs("hw_id")%>&action=del" onClick="return confirm('您确定进行删除操作吗?')"><font color="#FF0000">删除此商品</font></a></td>
    <td width="46" align="center" height="35">
		<a href="edithw.asp?hw_id=<%=rs("hw_id")%>">
		<font color="#FF0000">编辑</font></a></td>
  </tr>
<%
rs.movenext
if rs.eof then exit for
next
%>
                  <tr>         
                    <td width="97%" style="padding-left: 10px" colspan="12" height="35">        
                    <p align="center">共有记录<%=rs.recordcount%>条&nbsp;                   
                    <%=page%>/<%=rs.pagecount%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <A href="<%request.servervariables("document_name")%>?page=<%=page-1%>&keyword=<%=keyword%>">上一页</A> <A href="<%request.servervariables("document_name")%>?page=<%=page+1%>&keyword=<%=keyword%>">下一页</A>&nbsp;&nbsp;&nbsp; 转到第 <SELECT onchange="window.location='?keyword=<%=keyword%>&page='+this.value" name=gopage>              
                    <%for x=1 to rs.pagecount%>
                    <OPTION <%if x=page then%>selected<%end if%> value=<%=x%>><%=x%></OPTION>
                    <%next%>      
                    </SELECT> 页        
                    </div>
                    <%rs.close%>      
                    </td>     
                  </tr>  
  
</table>
</div>

<%
set rs=nothing
conn.close
set conn=nothing
%>

⌨️ 快捷键说明

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