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

📄 zaitu.asp

📁 1.多种查询方式
💻 ASP
字号:
<%@language=vbscript%>
<% 
response.buffer=true
Response.Expires = 0
Response.CacheControl = "Private"
 %>
<%'On Error Resume Next%>
<%const title="在途信息"%>
<!-- #include file=../data/username.inc-->
<!-- #include file=../data/connect.asp-->
<!--#include file=../data/myPrg.asp-->
<!--#include file=../data/flag.inc-->
<html>
<head>
<%
id = request("id")
id = replace(id,"'","")
if not isnumeric(id) then
	call closedatabase
	Response.Write "<script language=javascript>"
	Response.Write "alert(""id必须为整数!"");history.go(-1);"
	Response.Write "</script>"
	Response.End
end if
%>
<meta http-equiv="Content-Type"content="text/html; charset=gb_2312-80">
<script language=javascript>
function init()
{
	document.onkeydown=keydown;
}
function keydown()
{
	key = event.keyCode;

	 var myTime = new Date(); 
   var timeNow = myTime.getTime(); 
   switch (key) 
    {
	case 13: 
		window.location.href="zaitu.asp?id=<%=id%>&companyid=<%=newcompanyid%>&pagesize=" + pagesize.value;
		break;
	case 27:	
		window.location.href="zaitu.asp?id=<%=id%>&companyid=<%=newcompanyid%>&pagesize=" + pagesize.value;
		break;
	}
}
</script>
<title><%=title%></title>
<link rel=stylesheet type=text/css href=../data/forum.css>
</head>
<body topmargin="0" onload="init()">
<%
showtitle(title)
dim MaxPerPage
MaxPerPage=15 '分页显示的纪录个数
   dim totalPut   
   dim CurrentPage
   dim TotalPages
   dim i,j
   dim detail
   if not isempty(request("page")) then
      currentPage=clng(request("page"))
   else
      currentPage=1
   end if
   
   	pagesize = trim(request("pagesize"))
	ruku_cookies = Request.Cookies("ruku_cookies")
	if isNumeric(pagesize) then
		if cint(pagesize) > 0 then
			ruku_cookies = Request.Cookies("ruku_cookies")
				MaxPerPage = clng(pagesize)
				Response.Cookies("ruku_cookies") = cint(pagesize)
				ruku_cookies = cint(pagesize)	
		else
			MaxPerPage = 15
		end if
	elseif ruku_cookies <> "" then
		MaxPerPage = clng(ruku_cookies)
	else
		MaxPerPage = 15
	end if
 
   
   set rs = server.CreateObject("adodb.recordset")
'response.write "currentpage="&currentpage
%>
<table align=center border='1' width=100% cellspacing='0' bordercolordark='#FFFFFF' bordercolorlight='#DADBFC' bordercolor='#00000'>
    <%ShowContent%>
</table>
</form>
     <%ShowPages%>

<!--#include file=../data/copyright.asp-->
<%
rs.Close
set rs = nothing
call closedatabase
%>
</body>
</html>
<%
sub ShowContent()
Response.Write "<hr size=1>"
sql = "select * from inventory where inve_id = "&id&" "
set rs_inve = conn.execute(sql)
if not rs_inve.eof then
	dc_id = rs_inve("inve_dc_id")
	prod_id = rs_inve("inve_prod_id")
end if 
rs_inve.close
set rs_inve = nothing
Response.Write "转到: <a href=ruku.asp?companyid="&newcompanyid&"&id="&id&">[ 该物品入库情况 ]</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=typeview.asp?dc_id="&dc_id&"&companyid="&newcompanyid&">返回</a>"
if flag < 4 then
	sql="select * from inward,dc,inward_detail where inward.inwa_dc_id = dc.dc_id and inward.inwa_id = inward_detail.idetail_inwa_id and inward.inwa_dc_id = "&dc_id&" and inward_detail.idetail_prod_id = "&prod_id&" and (inward_detail.idetail_flag <> 1 or inward_detail.idetail_rec_no = 0) and inwa_disabled=0 and inwa_companyid = "&newcompanyid&" order by inwa_id asc"
elseif flag = 4 then
	sql="select * from inward,dc,inward_detail where inward.inwa_dc_id = dc.dc_id and inward.inwa_id = inward_detail.idetail_inwa_id and inward.inwa_dc_id = "&dc_id&" and inward_detail.idetail_prod_id = "&prod_id&" and (inward_detail.idetail_flag <> 1 or inward_detail.idetail_rec_no = 0) and inwa_disabled=0 and inwa_companyid = "&newcompanyid&" and inwa_dc_id in ("&dcservice&") order by inwa_id asc"
else
	call closedatabase
	Response.End 
end if
'Response.Write sql
'Response.End 

rs.open sql,conn,3,2
if err.number <> 0 then
	rs.Close
	set rs = nothing
	call closedatabase
    Response.wrte err.description
    Response.End 
else
i=0
if not rs.eof then
response.write "  <tr bgcolor='#0000A0'>"
response.write "    <td nowrap align=center ><font color=white>编号</td>"
response.write "    <td nowrap align=center ><font color=white>

⌨️ 快捷键说明

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