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

📄 productclass.asp

📁 实验室设备管理系统目标:通过对多种一维条码的编码进行分析和算法设计在系统中能实现对多种一维条码的显示。 基础要求:非常熟悉C或C++或JAVA语言、熟悉SQL SERVER的相关知识、VB或Delp
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="include/const.asp"-->
<%
	dim rs,sql
	dim classid, classname, nclassid, Nclassname
   	dim totalPut   
   	dim CurrentPage, TotalPages
   	if request("classid")<>"" then
		classid=request("classid")
   	else
		classid=0
   	end if
   	if not isempty(request("page")) then
      		currentPage=cint(request("page"))
   	else
      		currentPage=1
   	end if
  	set rs = server.createobject("adodb.recordset")
 	'set rs1=server.createobject("adodb.recordset")
   	if trim(request.querystring("nclassid"))<>"" then
		nclassid=int(request.querystring("nclassid"))
  		sql="select * from ANclass where NclassID="&cstr(nclassid)
 		rs.open sql,conn,1,1
 		if not rs.eof then
			Nclassname=rs("Nclass")
 		end if
		rs.close
   	else
		Nclassid=0
		Nclassname="全部"
   	end if
  	sql="select * from Aclass where classID="&cstr(classid)
 	rs.open sql,conn,1,1
 	if not rs.eof then
		classname=rs("class")
 	end if
	rs.close
%>
<html>
<head>
<meta NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
<meta HTTP-EQUIV="Content-Type" content="text/html; charset=gb2312">
<LINK href="include/STYLE.CSS" rel=stylesheet>
<title><%=classname%></title>
<style type="text/css">
<!--
.bor {
	border: 1px solid #009900;
}
-->
</style>
<style type="text/css">
<!--
.lb {
	border-top-width: 1px;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-left-width: 1px;
	border-top-style: none;
	border-right-style: none;
	border-bottom-style: none;
	border-left-style: solid;
	border-top-color: #009900;
	border-right-color: #009900;
	border-bottom-color: #009900;
	border-left-color: #009900;
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
<style type="text/css">
<!--
.14 {
	font-family: "宋体";
	font-size: 14px;
	line-height: 25px;
}
-->
</style>
</head>

<body bgcolor="#d9d9ff">
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td> </td>
  </tr>
  <tr> 
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td valign="top"><TABLE width="100%" border=0 align="center" cellPadding=0 cellSpacing=0>
              <TR>              </TR>
              <TR> 
                <TD> <font style=line-height:150%>&nbsp; </font>
                  <table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#000000" class="bor">
                    <tr> 
                      <td width="25"> <div align="center"><img src="images/computer.gif" width="20" height="20"></div></td>
                      <td width="141" class="lb"><div align="center" class="14">设备编号</div></td>
                      <td width="128" class="lb"><div align="center" class="14"><font style=line-height:150%>设备名称</font></div></td>
                      <td width="128" class="lb"><div align="center" class="14">设备型号</div></td>
                      <td width="249" class="lb"><div align="center" class="14">设备信息</div></td>
                      <td width="87" height="30" class="lb"><font color=green>&nbsp;&nbsp;</font></td>
                    </tr>
                  </table>
                  <font style=line-height:150%>
                  <% 
if Nclassid<>0 then
	sql="select * from product where Nclassid="+cstr(Nclassid)+" and classid="+cstr(classid)+"  order by productid desc" 
elseif classid<>0 then
	sql="select * from product where classid="+cstr(classid)+" order by productid desc" 
else
	sql="select * from product order by productid desc"
end if
	rs.open sql,conn,1,1 
  	if rs.eof and rs.bof then 
       		response.write "<p align='center'>没有或没有找到任何信息</p>" 
   	else 
      		totalPut=rs.recordcount 
      		if currentpage<1 then 
          		currentpage=1 
      		end if 

      		if (currentpage-1)*MaxPerPage>totalput then 
	   		if (totalPut mod MaxPerPage)=0 then 
	     			currentpage= totalPut \ MaxPerPage 
	   		else 
	      			currentpage= totalPut \ MaxPerPage + 1 
	   		end if 
      		end if 
       		if currentPage=1 then 
            		showContent 
            		showpage totalput,MaxPerPage,"productclass.asp" 
       		else 
          		if (currentPage-1)*MaxPerPage<totalPut then 
            			rs.move  (currentPage-1)*MaxPerPage 
            			showContent 
             			showpage totalput,MaxPerPage,"productclass.asp" 
        		else 
	        		currentPage=1 
           			showContent 
           			showpage totalput,MaxPerPage,"productclass.asp" 
	      		end if 
	   	end if 
   	rs.close 
   	end if 
	         
sub showContent 
       	dim i 
	   	i=0 
	do while not rs.eof
%>
                  </font> 
                  <table width="100%" border="0" cellspacing="0" cellpadding="0" >
                    <tr> </tr>
                    <tr> </tr>
                    <tr> 
                      <td  class="bor"><table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#000000">
                          <tr> 
                            <td width="25"> <div align="center"><img src="images/computer.gif" width="20" height="20"></div></td>
                            <td width="141" class="lb"><div align="center"><font style=line-height:150%><font style=line-height:150%><%=rs("sbbh")%></font></font></div></td>
                            <td width="128" class="lb"><div align="center"><font style=line-height:150%><font style=line-height:150%><%=rs("sbmc")%> 
                                </font> </font></div></td>
                            <td width="128" class="lb"><div align="center"><font style=line-height:150%><font style=line-height:150%><%=rs("xh")%></font></font></div></td>
                            <td width="249" class="lb"><div align="center"><font style=line-height:150%><font style=line-height:150%><%=rs("bz")%></font></font></div></td>
                            <td width="87" height="30" class="lb"><font color=green><a href=# onclick="MM_openBrWindow('<%if request("nclassid")=14 or request("nclassid")=12  or request("nclassid")=10  or request("nclassid")=11 then %> haocaiview.asp?id=<%=rs("productid")%>     <%else%>   productview.asp?id=<%=rs("productid")%><%end if%> ','','width=600,height=400')"><img src="images/1.gif" width="78" height="18" border="0"></a>&nbsp;</font></td>
                          </tr>
                        </table></td>
                    </tr>
                  </table>
                  <% 
	i=i+1
	if i>=MaxPerPage then exit do
	rs.movenext 
	loop 
end sub
%>
                  <div align="center"> 
                    <%
function showpage(totalnumber,maxperpage,filename)
  	dim n, i
  	if totalnumber mod maxperpage=0 then
     		n= totalnumber \ maxperpage
  	else
     		n= totalnumber \ maxperpage+1
  	end if
  	response.write "<form method=Post action="&filename&"?classid="&request("classid")&"&Nclassid="&request("Nclassid")&">"
  	response.write "<font color='red'>"&Nclassname&"</font>"

  	if CurrentPage<2 then
    		response.write "共"&totalnumber&"篇&nbsp;首页 上一页&nbsp;"
  	else
    		response.write "共"&totalnumber&"篇&nbsp;<a href="&filename&"?page=1&classid="&request("classid")&"&Nclassid="&request("Nclassid")&">首页</a>&nbsp;"
    		response.write "<a href="&filename&"?page="&CurrentPage-1&"&classid="&request("classid")&"&Nclassid="&request("Nclassid")&">上一页</a>&nbsp;"
  	end if

  	if n-currentpage<1 then
    		response.write "下一页 尾页"
  	else
    		response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&classid="&request("classid")&"&Nclassid="&request("Nclassid")&">"
    		response.write "下一页</a> <a href="&filename&"?page="&n&"&classid="&request("classid")&"&Nclassid="&request("Nclassid")&">尾页</a>"
  	end if
   	response.write "&nbsp;页次:<strong><font color=red>"&CurrentPage&"</font>/"&n&"</strong>页 "
    	response.write "&nbsp;<b>"&maxperpage&"</b>篇产品/页 "
%>
                    转: 
                    <select name='page' size='1' onchange='javascript:submit()' class="smallinput" >
                      <%for i = 1 to n%>
                      <option value='<%=i%>' <%if cint(CurrentPage)=cint(i) then%> selected <%end if%>>第<%=i%>页</option>
                      <%next%>
                    </select>
                    <%     
end function

   	set rs=nothing   
	conn.close
	set conn=nothing
%>
                  </div></TD>
              </TR>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
<br>
<div align="center"> <center><%If nclassid=6 then response.Write "加工实验室" end if%>
<%If nclassid=7 then response.Write "材料工艺实验室" end if%> 
<%If nclassid=8 then response.Write "测试实验室" end if%> 
<%If nclassid=9 then response.Write "洁净实验室" end if%> 



 </div>

</body>                              
</html>                              

⌨️ 快捷键说明

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