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

📄 pinpailist.asp

📁 人民医院眼科全站
💻 ASP
字号:
<!-- #include file="../include/bkconn.asp "-->
<!--#include file="checkUser.asp"-->
<%
function selectTreeList(i,deep)
	dim sql
	dim rs
	dim tempi
	dim rsID
	set rs=server.createObject("adodb.recordset")
	sql="select * from productSort where fatherID="&i
	rs.open sql,conn,1,1
	if rs.eof then
		exit function
	else
		do while not rs.eof 
			rsID=rs("id")
			rsName=rs("name")
			response.write "<option value="&rsID
			if rsID=productSort then response.write " selected"
			response.write ">"
			for tempi=1 to deep
					response.write "&nbsp;"
			next
			response.write rsName&"</option>"
			call selectTreeList(rsID,deep+1)
			rs.movenext
		loop
	end if
end function

function getSort(i) '该函数获取类别下的所有子类,符合一般搜索习惯
	dim rs,sql
	set rs=server.createObject("adodb.recordset")
	sql="select * from productSort where fatherID="&i
	rs.open sql,conn,1,1
	do while not rs.eof 
		strSort=strSort&","&rs("id") '&rs("name")
		call getSort(rs("id"))
		rs.movenext
	loop
end function

dim productSortDic
'set productSortDic = Server.CreateObject("Scripting.Dictionary")
Set productSortDic = CreateObject("Scripting.Dictionary")
sql="select * from pinpai  where 1=1"
set productSortRs=conn.Execute (sql)
dim tempName
dim tempID
do while not (productSortRs.eof or err)
tempID=cstr(productSortRs("id"))
tempName=productSortRs("name")
	productSortDic.Add tempID,tempName
'	response.write " 字典:"&productSortDic.item(cstr(productSortRs("id")))
'	response.write " id:"&productSortRs("id")
'	response.write " name:"&productSortRs("name")
	productSortRs.moveNext
loop

dim rs,sql
dim strSort '保留所选的类的所有子类
dim page,maxPerPage
maxPerPage=10 '每页显示的记录数
myKeyword=trim(Request("myKeyword"))
itemno=trim(Request("itemno"))
productSort=cint(Request("productSort"))
strSort=productSort
CALL getSort(productSort)

page=Request("page")
if (page="" or isempty(page)) then page=1
thisUrl="pinpaiList.asp?productSort="&productSort&"&myKeyword="&myKeyword&"&itemno="&itemno
session("adminOldUrl")=thisUrl&"&page="&page
set rs=server.createobject("adodb.recordset")
sql="select * from pinpai where 1=1"
if not (myKeyword="" or isempty(myKeyword) ) then
	sql=sql&" and name like '%"&myKeyword&"%'"
end if
if not (itemno="" or isempty(itemno) ) then
	sql=sql&" and itemno like '%"&itemno&"%'"
end if
if productSort>0 then
	sql=sql&" and productSort in ("&strSort&")"
end if
sql=sql&" order by id desc"
'response.write sql
'response.End
rs.open sql,conn,1,1
rs.pagesize=MaxPerPage
%>
<html>
<head>
<title>后台管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../main.css" type="text/css">
<script language="JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function jumpTo(i){
if(i==1){
	this.document.location="<%=thisUrl%>";}
if(i==2){
	this.document.location="<%=thisUrl%>&page=<%=page-1%>";}
if(i==3){
	this.document.location="<%=thisUrl%>&page=<%=page+1%>";}
if(i==4){
	this.document.location="<%=thisUrl%>&page=<%=rs.pageCount%>";}
}

function recommend(i){
	if (confirm("确定 推荐/取消推荐 该商品("+i+"号商品)?")==1){
		window.location="recommend.asp?id="+i;
	}
}
// -->
</script>
<script language=Javascript src="../include/opennew.js"></script>
</head>

<body bgcolor="#9CC7EF" text="#000000" leftmargin="0" topmargin="4">
<div align="center"><br>
  品牌管理 </div>
<table width="98%" border="1" bordercolordark=#9CC7EF bordercolorlight=#145AA0 cellspacing="0" cellpadding="4" align="center">
  <tr bgcolor="#5EA5E6"> 
    <td width="10%" nowrap> <div align="center"><font color="#FFFFFF">编号</font></div></td>
    <td width="30%" nowrap><font color="#FFFFFF">网址</font></td>
    <td width="60%" nowrap> <div align="center"><font color="#FFFFFF">名称</font></div></td>
  </tr>
  <%
		dim rsID
		i=1
		if not (rs.eof or err) then rs.move (page-1)*maxPerPage
		do while not (rs.eof or err) 
		rsID=rs("id")
%>
  <tr> 
    <td><%=rsID%>&nbsp;</td>
    <td style="cursor:hand" title="点击查看具体信息" onClick="Javascript:window.location='pinpaiMod.asp?id=<%=rs("id")%>'" bgcolor="#63B2FF"><%=rs("url")%></td>
    <td style="cursor:hand" title="点击查看具体信息" onClick="Javascript:window.location='pinpaiMod.asp?id=<%=rs("id")%>'" bgcolor="#63B2FF"><%=rs("name")%>&nbsp;</td>
  </tr>
  <%
		i=i+1
		if i>maxPerPage then exit do
		rs.moveNext
		loop
%>
  <tr bgcolor="#4296E7"> 
    <td colspan="9"> <div align="right"><font color=#FFFFFF><%=rs.recordCount%> 
        项 第<%=page%>/<%=rs.pageCount%> 页 </font> 
        <%if page>1 then%>
        <input type="button" name="Submit3" value="首页" onClick="Javascript:jumpTo(1)">
        <input type="submit" name="Submit4" value="上页" onClick="Javascript:jumpTo(2)">
        <%else%>
        <input type="button" name="Submit3" value="首页" disabled>
        <input type="submit" name="Submit4" value="上页" disabled>
        <%end if
if rs.recordCount>page*maxPerPage then%>
        <input type="submit" name="Submit5" value="下页" onClick="Javascript:jumpTo(3)">
        <input type="submit" name="Submit6" value="末页" onClick="Javascript:jumpTo(4)">
        <%else%>
        <input type="submit" name="Submit5" value="下页" disabled>
        <input type="submit" name="Submit6" value="末页" disabled>
        <%end if%>
      </div></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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