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

📄 disp.asp

📁 Lirong网络办公系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
					
				
					'遍历每一个字段
					For i = 0 to mFieldCount-1 
						if FieldsInfo(1,i+1)<>"0" then  
						   mFieldType = Rs.Fields(i).Type
				
						   If Len(mFieldType) < 3 Then
								mFieldType = mFieldType & "XX"
						   End If
				
						   If InStr(mExcludeFieldTypes, mFieldType) = 0 Then
				
								mFieldContent = Rs.Fields(i)
				
								IF TRIM(mFieldContent)= "" or mFieldContent = Null then
									mFieldContent="&nbsp;"
								End if
								Response.Write("<TD  width='" & FieldsInfo(1,i+1) &"'")
								if FieldsInfo(1,i+1)="" then Response.write" align=left " else Response.write " align=center "
								Response.write(" >" & mFieldContent & " </TD>")
								
						   End If
						END IF
					Next
					Response.write("</tr>")
					Rs.MoveNext
					j=j-1
				Loop
				Response.write("</table>")
				Response.write("<p align=center>第" & pn & "页/共" & rs.PageCount & "页</p>")
				if pn< rs.PageCount then Response.write("<br style='page-break-after: always ' >")
			next 
			Rs.Close
			Set Rs = Nothing
			Response.write("<script language='Javascript'>window.print()</script></body>")
			Response.end
	'//////////////////////打印操作结束////////////////////////////////////////
		end Select

	IF mPageCount > 1 Then
		if Request("PageNo")<>"" then mPageNo =cint(Request("PageNo"))
	Else                               
		mPageNo = 1
	End If
	
	if mPageNo<1 then mPageNo=1
	if mPageNo>mPageCount then  mPageNo=mPageCount 
	'当前页
	
	if not Rs.eof then Rs.AbsolutePage = mPageNo

%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!-- #include file="../inc/css.asp" -->
</head>


<body language=javascript   leftmargin="0" topmargin="0"  onLoad="this.focus();" >

<!-- #include file="../inc/title.asp" -->
<table bgcolor=<%=Session("vtablebordercolor")%> cellspacing=1 cellpadding=1 width=95% border=0 class=vtext align=center>
    <tr  bgcolor="<%=Session("vtabletitlebackcolor")%>" > 
        <td height="20" bgcolor="#49A7F4" > 
            <div valign=top> <b>>>导航:</b> 
                <%  
			shownav 1
			%>
                页次:<b><%=mPageNo%></b>/<b><%=Rs.PageCount%></b>页 <b><%=Rs.PageSize%></b>条/页   
                共<b><%=Rs.RecordCount%></b>条 </div>
        </td>
        <%if addnew="yes" then%>
        <td height="20"  class=coolBarflat  onClick="window.location.href='<%=EditFile%>?opFlag=cmdAddNew'"  onMouseOver="this.className='coolbar'" onMouseOut="this.className='coolBarflat'" onMouseDown="this.className='coolBardown'" width="25" align="center" valign="middle" bgcolor="#49A7F4"> 
            <img src="images/new.gif" width="16" height="16"align="absmiddle"  onClick="window.location.href='<%=EditFile%>?opFlag=cmdAddNew'"    alt="增加" > 
        </td>
        <%else%>
        <td height="20"  class=coolBarflat  width="25" align="center" valign="middle" bgcolor="#49A7F4"> 
            <img src="images/new.gif" width="16" height="16"align="absmiddle"   style='FILTER: Alpha(Opacity=30);' alt="增加" > 
        </td>
        <%end if%>
        <%if not rs.eof then%>
        <td height="20"  class=coolBarflat   onMouseOver="this.className='coolbar'" onMouseOut="this.className='coolBarflat'" onMouseDown="this.className='coolBardown'" width="25" align="center" valign="middle" bgcolor="#49A7F4"> 
            <img src="images/print.GIF" width="16" height="16"align="absmiddle"  onClick="window.open('<%=href%>?opFlag=cmdPrint','print','menubar=yes,toolbar=none,statusbar=no,scrollbars=yes,resizable=yes')"  alt="打印"> 
        </td>
        <td height="20"  class=coolBarflat onClick="window.location.href='<%=href%>?opFlag=cmdExportExcel'" onMouseOver="this.className='coolbar'" onMouseOut="this.className='coolBarflat'" alt="数据导出" onMouseDown="this.className='coolBardown'" width="25" align="center" valign="middle" bgcolor="#49A7F4"> 
            <img src="images/save.GIF" width="16" height="16"  align="absmiddle"  onClick="window.location.href='<%=href%>?opFlag=cmdExportExcel'"  alt="数据导出"> 
        </td>
        <%else%>
        <td height="20"  class=coolBarflat width="25" align="center" valign="middle" bgcolor="#49A7F4"> 
            <img src="images/print.GIF" width="16" height="16"align="absmiddle"   style='FILTER: Alpha(Opacity=30);'  alt="打印"> 
        </td>
        <td height="20"  class=coolBarflat width="25" align="center" valign="middle" bgcolor="#49A7F4"> 
            <img src="images/save.GIF" width="16" height="16"  align="absmiddle"    style='FILTER: Alpha(Opacity=30);'   alt="数据导出"> 
        </td>
        <%end if%>
        <%if EnableDelAll="yes" then %>
        <td height="20"  class=coolBarflat onClick="if(!confirm('严正警告:本操作将清空所有记录数据,并且不可恢复,您确认删除所有数据记录?'))return false;if(!confirm('请再次确认您的危险操作!?'))return false;window.location.href='<%=href%>?opFlag=cmdDelAll'" onMouseOut="this.className='coolBarflat'" alt="清空" onMouseDown="this.className='coolBardown'" width="25" align="center" valign="middle" onMouseOver="this.className='coolbar'" bgcolor="#49A7F4"> 
            <img src="images/delall.GIF" width="16" height="16" alt="清空" align="absmiddle"  > 
        </td>
        <%else%>
        <td height="20"  class=coolBarflat  alt="清空"  width="25" align="center" valign="middle" bgcolor="#49A7F4"> 
            <img src="images/delall.GIF"  style='FILTER: Alpha(Opacity=30);' width="16" height="16" alt="清空" align="absmiddle"  > 
        </td>
        <%end if%>
    </tr>
</table>
<table height=4 cellspacing="0" border="0" cellpadding="0">
    <tr> 
        <td></td>
</table>
<%  
Response.Write("<TABLE CELLPADDING=0 CELLSPACING=1 BORDER=0 WIDTH=95% bgcolor=" & Session("vtablebordercolor") & " align=center class=vtext >")
Response.Write("<TR bgcolor=" & Session("vtabletitlebackcolor") & " height=24 align=center class=coolBar>")

    '输出列标题
	For i=1 to  mFiledsCount
		if FieldsInfo(1,i)<>"0" then  
			tSort=replace(FieldsInfo(2,i)," ","%20")
			if instr(FieldsInfo(2,i)," ")<>0 or instr(FieldsInfo(2,i),",")<>0 then tSort=""
			Response.write("<a href=" & href & "?mSortBy=" & tSort & ">")
			Response.write("<TD class=coolBarflat title=""按『" & FieldsInfo(3,i) & "』排序""  onMouseOver=this.className='coolbar'  onMouseOut=this.className='coolBarflat'  onMouseDown=this.className='coolBardown' ")
			if FieldsInfo(1,i)<>"" then Response.write("width=" & abs(FieldsInfo(1,i)))
			
			Response.Write("><b>" & FieldsInfo(3,i) & "</b>")
			
			if instr(SortBy,FieldsInfo(2,i))<>0 then
				Response.write(" <a href=" & href & "?mSortBy=" & tSort & ">")

				if Session("Forward")="ASC" then  
					Response.write("<img src=images/up.gif border=0></a>") 
				else
					Response.write("<img src=images/down.gif  border=0></a>")
				end if
				
			end if
			Response.Write("</TD></a>")
		end if
	Next

    For i=1 to len(LinkFlag)
	   if mid(LinkFlag,i,1)="1" then
	   	Response.write("<TD width=45><b>" &  LinkItem(i) & "</b></TD>")
	   End if
	Next


	Response.write("</TR>")

   '///////////////////遍历数据记录集,输出数据表/////////////////////////  
    j = mPageSize
    Do While Not Rs.EOF And j > 0
		 '///////////////////////行开输出始///////////////////////////
		Response.write("<TR  bgcolor=#ffffff  height=24 onmouseover=ov(this) onmouseout=mo(this)>")
		

		'遍历每一个字段
		For i = 0 to mFieldCount-1 
			if FieldsInfo(1,i+1)<>"0" then 
			
               mFieldType = Rs.Fields(i).Type
               If Len(mFieldType) < 3 Then  mFieldType = mFieldType & "XX"
			   
               If InStr(mExcludeFieldTypes, mFieldType) = 0 Then
                    mFieldContent = Rs.Fields(i)

                    IF TRIM(mFieldContent)= "" or mFieldContent = Null then mFieldContent="&nbsp;"

					Response.Write("<TD width='" & FieldsInfo(1,i+1) &"'")
					if instr(SortBy,FieldsInfo(2,i+1))<>0 then Response.write(" bgcolor=#f6f6f6 ") 'EFF9E8
					if FieldsInfo(1,i+1)="" then t="0" else t=FieldsInfo(1,i+1)
					select case sgn(int(t))
						case 0
							Response.write" align='left'  "
						case 1
							Response.write" align='center' "
						case -1
							Response.write" align='right' "
					end select	
					Response.write(" >" & mFieldContent & " </TD>")
               End If
			 end if
        Next
		
		'输出操作列
       For i=4 to len(LinkFlag)
		   if mid(LinkFlag,i,1)="1" then
		   Response.write("<TD align=center><a href=" & LinkItemlink(i) & "&Number=" & mPageSize*(mPageNo-1)+(mPageSize-j) & "&id=" & rs("tempID") )
		   select case i
				case 7
					Response.write(" onClick=return(confirm('您确认已经归还?'))")
				case 6
					Response.write(" onClick=return(confirm('警告!该操作将无法恢复,您确认从数据库中删除此条信息!'))")
			end select
			Response.write(" ><img src=images/"& LinkImage(i) & ".gif border=0></a></TD>")
			End if
		Next
		Response.write("</TR>")
		 '///////////////////////行输出结束,转向下一行///////////////////////////
		 j = j - 1
        Rs.MoveNext
    Loop
	
	Response.Write("</TABLE>")
	IF Rs.RecordCount=0 then   '如果没有找到任何记录,自动清除查询条件
	Session("mCond")=""
%>
<table bgcolor=<%=Session("vtablebordercolor")%> cellspacing=1 cellpadding=0 width=95% border=0 class=vtext align=center >
    <tr bgcolor=ffffff align=right> 
        <td height="20"  align="left" ><b><font color=red>对不起,没有所要的记录!</font></b> 
        </td>
    </tr>
</table>
<%end if%>
<table height=4 cellspacing="0" border="0" cellpadding="0">
    <tr> 
        <td></td>
</table>

<table  bgcolor=<%=Session("vtablebordercolor")%>  cellspacing=1 cellpadding=0 width=95% border=0 class=vtext align=center>
    <tr  bgcolor=<%=Session("vtabletitlebackcolor")%> align=center valign="middle"> 
        <form action=disp.asp method=post name=form1>
            <td height="20" align="left" valign="middle" bgcolor="#49A7F4"> 查询:   
                <select name="key" style="height:18;font-size:12px" >
                    <%  For i= 1 to mFieldCount
				tSort=replace(FieldsInfo(2,i)," ","%20")
				if instr(FieldsInfo(2,i)," ")<>0 or instr(FieldsInfo(2,i),",")<>0 then tSort=""		
				if tSort<>"" then response.write("<option value=" & FieldsInfo(2,i) & ">" & FieldsInfo(3,i) & "</option>")
				Next
			%>
                </select>
                <input        class=p9   size=10        style="height:18;BORDER: #808080 1px groove;" name=keyword >  
                <img class=coolbarflat src="images/search.GIF" width="16" height="16" align="absmiddle" alt="开始搜索"    
				onMouseOver="this.className='coolbar'"  onClick=document.form1.submit()  onMouseOut="this.className='coolBarflat'" 
				 onMouseDown="this.className='coolBardown'"> </td><!-- <td>  <a href="search.asp"><font color=blue>高级查询</font></a></td> -->
           
            <td height="20" align="right" valign="middle" bgcolor="#49A7F4"><b>>>分页</b>:   
                <%  shownav 2 %>
			
                 </td>
        </form>
    </tr>
</table>


<p align="center"> 
    <%if mBack="self" then%>
    <button style="height=24" onClick="javascript:history.go(-1);" class=vinputbutton><img src="../images/back.gif"  align="absmiddle">返回</button> 
    <%else%>
    <button style="height=24" onClick="javascript:window.location.href='../../desk.asp'" class=vinputbutton><img src="../images/back.gif"  align="absmiddle">返回首页</button> 
    <%end if%>
</p>
</body>
</html>
<%
    Rs.Close
    Set Rs = Nothing
	
			sub shownav(n)      '输出导航按忸
			  if mPageNo>1 then  
					response.write("<button  class=coolBarflat style='height=19;background:" & Session("vtabletitlebackcolor") & "'  onMouseOver=this.className='coolbar' onMouseOut=this.className='coolBarflat' onMouseDown=this.className='coolBardown' title='首页' onclick=window.location='" & href & "?PageNo=1'><img src='images/ff.gif' align=absmiddle></button>") 
					response.write("<button  class=coolBarflat style='height=19;background:" & Session("vtabletitlebackcolor") & "'  onMouseOver=this.className='coolbar' onMouseOut=this.className='coolBarflat' onMouseDown=this.className='coolBardown' title='上一页' onclick=window.location='" & href & "?PageNo=" &  mPageNo-1 & "'><img src='images/f.gif' align=absmiddle></button>") 
				else 
					response.write("<button  disabled class=coolBarflat style='height=19;background:" & Session("vtabletitlebackcolor") & "'  onMouseOver=this.className='coolbar' onMouseOut=this.className='coolBarflat' onMouseDown=this.className='coolBardown' title='首页' onclick=window.location='" & href & "?PageNo=1'><img src='images/ff.gif' style='FILTER: Alpha(Opacity=30);'  align=absmiddle></button>") 
					response.write("<button  disabled  class=coolBarflat style='height=19;background:" & Session("vtabletitlebackcolor") & "'  onMouseOver=this.className='coolbar' onMouseOut=this.className='coolBarflat' onMouseDown=this.className='coolBardown' title='上一页' onclick=window.location='" & href & "?PageNo=" &  mPageNo-1 & "'><img src='images/f.gif'  style='FILTER: Alpha(Opacity=30);'  align=absmiddle></button>") 
				end if
				 
				if mPageNo<Rs.PageCount then  
					response.write("<button  class=coolBarflat style='height=19;background:" & Session("vtabletitlebackcolor") & "'  onMouseOver=this.className='coolbar' onMouseOut=this.className='coolBarflat' onMouseDown=this.className='coolBardown' title='下一页' onclick=window.location='" & href & "?PageNo=" & mPageNo+1 & "'><img src='images/b.gif' align=absmiddle></button>") 
					response.write("<button  class=coolBarflat style='height=19;background:" & Session("vtabletitlebackcolor") & "'  onMouseOver=this.className='coolbar' onMouseOut=this.className='coolBarflat' onMouseDown=this.className='coolBardown' title='最后一页' onclick=window.location='" & href & "?PageNo=" &  Rs.PageCount & "'><img src='images/bb.gif' align=absmiddle></button>") 
				else 
					response.write("<button disabled class=coolBarflat style='height=19;background:" & Session("vtabletitlebackcolor") & "'   title='下一页' onclick=window.location='" & href & "?PageNo=" & mPageNo+1 & "'><img src='images/b.gif' style='FILTER: Alpha(Opacity=30);' align=absmiddle></button>") 
					response.write("<button disabled class=coolBarflat style='height=19;background:" & Session("vtabletitlebackcolor") & "'   title='最后一页' onclick=window.location='" & href & "?PageNo=" &  Rs.PageCount & "'><img src='images/bb.gif' style='FILTER: Alpha(Opacity=30);' align=absmiddle></button>") 
				end if 
				
				 response.write("转到:<input   class=p9 style=""height:17;BORDER: #808080 1px groove;""  size=3 name=page" & n & " id=转向页码 onKeyPress=""checkkey()""  oncontextmenu=""self.event.returnValue=false"">")
				 response.write("<img class=coolBarflat src=""images/go.GIF"" width=16 height=16 align=absmiddle onClick=""if(!MM_validateForm('page" & n & "','','RisNum')){return false};window.location.href='" & href & "?PageNo=' + document.all.page" & n & ".value"" alt=""转向""  onMouseOver=""this.className='coolbar'"" onMouseOut=""this.className='coolBarflat'""  onMouseDown=""this.className='coolBardown'""> ")
			end sub
%>

⌨️ 快捷键说明

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