📄 showing.asp
字号:
<%@ codepage ="936" %>
<%
if id=session("id") then
session("pageid")="spzs"
response.redirect "../../login/login1.asp"
else
id=session("id")
%>
<!--#include file="../../conn/dbconn2.asp"-->
<%
const MaxPerPage=3
dim totalPut
dim CurrentPage
dim TotalPages
dim i
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
dim sql
dim rs
dim gsrs
dim gssql
dim gsid,qymc
gsid=session("id")
gssql="select * from qyml where id="+cstr(gsid)+" order by ID desc"
Set gsrs= Server.CreateObject("ADODB.Recordset")
gsrs.open gssql,conn,1,1
qymc=gsrs("qymc")
gsrs.close
sql="select * from spzs where gsid="+cstr(gsid)+" order by ID desc"
set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<script language='javascript'>"
response.write "alert('您还没有发布产品信息,请发布!');"
response.write"this.location.href='add.asp';</SCRIPT>"
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,"showing.asp"
content
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,"showing.asp"
content
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"showing.asp"
content
end if
end if
end if
conn.close
set conn=nothing
sub showContent
%>
<head>
<STYLE type=text/css>
TD {
COLOR: #000; FONT-FAMILY: 宋体; FONT-SIZE: 12px
}
.GR {
COLOR: #666
}
</STYLE>
</head>
<a name="a"></a>
<BODY text=#000000 leftMargin=0 topMargin=0
marginheight="0" marginwidth="0" bgcolor="#F7F7FF">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber1">
<tr>
<td width="100%">
<center>
<table width="98%" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td align="center">
<div align="center">
<center>
<table border="0" cellspacing="0" cellpadding="0" width=100% height="22" style="border-collapse: collapse" bordercolor="#111111">
<tr align=center height=30 bgcolor=#ececec>
<td height="22" width="100%" bgcolor="#CEDBFF"><p><font class="f12" color="#ff6600"><span style="font-size: 10.5pt"><b><%=session("qymc")%>的产品管理</b></span></font></td></tr>
</table>
</center>
</div>
<div align="center">
<center>
<table border="0" cellspacing="0" width="100%" style="border-collapse: collapse" height="1">
<tr height=30><td width="180" height="12"></td></tr>
<%do while not rs.eof%>
<tr>
<td width="180" height="1" rowspan="3" bgcolor="#F7F7FF">
<p align="center">
<a target="_blank" href="../../spzs/Show_product.asp?id=<%=rs("id")%>">
<IMG
border=0
src="../../picture/<%=rs("picture")%>" width="125" height="108" alt="<%=rs("cpmc")%>" style="border: 1px solid #000000"></a></td>
<td width="428" height="22" colspan="4" bgcolor="#F7F7FF"> </tr>
<tr>
<td width="428" height="96" colspan="4" valign="bottom" bgcolor="#F7F7FF" >
<div align="left">
<table border="1" style="border-collapse: collapse" bordercolor="#111111" width="91%" id="AutoNumber4" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" cellspacing="0" cellpadding="3" height="80">
<tr>
<td width="56%" height="17" style="color: #000; font-family: 宋体; font-size: 10.5pt; line-height:100%" bgcolor="#F0F0FF"> <b><span style="font-size: 10.5pt">
<a target="_blank" href="../../spzs/Show_product.asp?id=<%=rs("id")%>"><%=rs("cpmc")%></a></span></td>
<td width="22%" height="17" style="color: #000; font-family: line-height:100%" bgcolor="#F0F0FF">
<p align="center"><%=rs("idate")%></td>
</tr>
<tr>
<td width="78%" height="17" style="color: #000; font-family: 宋体; font-size: 12px; line-height:100%" bgcolor="#F0F0FF" colspan="2" >
<%=mid(rs("jysm"),1,22)%>...</td>
</tr>
<tr>
<td width="78%" height="17" style="color: #000; font-family: 宋体; font-size: 12px; line-height:100%" bgcolor="#F0F0FF" colspan="2"> 交易价格:<font color="#FF6600"><%if rs("cpjg")="0" then response.write"价优" else response.write""&rs("cpjg")&"元" end if%></font></td>
</tr>
<tr>
<td width="78%" height="17" style="color: #000; font-family: 宋体; font-size: 12px; line-height:100%" bgcolor="#F0F0FF" colspan="2">
产品产地:<%=rs("cpcd")%></td>
</tr>
<tr>
<td width="78%" height="1" style="color: #000; font-family: 宋体; font-size: 12px; line-height:100%" bgcolor="#F0F0FF" colspan="2">
<a target="_blank" href="../../company/index.asp?id=<%=session("id")%>"><%=rs("sccj")%></a></td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td width="308" height="1" bgcolor="#F7F7FF"></td>
<td width="53" height="1" bgcolor="#F7F7FF">
<a href="edit.asp?id=<%=rs("id")%>">
<img border="0" src="Edit_2.gif"></a> </td>
<td width="52" height="1" bgcolor="#F7F7FF"><a href="zs_delv.asp?id=<%=rs("id")%>"><img border="0" src="../images/A_delete.gif"></a></td>
<td width="19" height="1" valign="middle" bgcolor="#F7F7FF">
<p align="center"></td>
</tr>
<tr>
<td width="100%" colspan="5" bgcolor="#FFFFFF">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber5">
<tr>
<TD height="1" width="100%" bgcolor="#F4FAFF" style="font-family: 宋体; font-size: 9pt; line-height: 14pt">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber7">
<tr>
<TD background=../../images/bg_b.gif style="color: #000; font-family: 宋体; font-size: 12px; line-height:100%" bgcolor="#EEF7FF"><IMG
height=1 src="" width=1></TD>
</tr>
</table>
</TD>
</tr>
</table>
</td>
</tr>
<% i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
rs.close
set rs=nothing
%>
</table>
</center>
</div>
<%
end sub
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write "<form method=Post action="&filename&"gsid="&gsid&">"
if CurrentPage<2 then
response.write "<table border=0 width=100% cellspacing=2 cellpadding=2>"
response.write "<tr height=0>"
response.write "<td align=left valign=top>"
response.write "<font color=red><b>共"&n&"页 第"&CurrentPage&"页 "
response.write "共查询到"&totalnumber&" 种产品</b></font>"
response.write "</td>"
response.write "<td VALIGN=middle align=right >"
response.write "【最前页】【上一页】"
else
response.write "<table border=0 width=100% cellspacing=2 cellpadding=2>"
response.write "<tr height=0>"
response.write "<td align=left VALIGN=top>"
response.write "<font color=red><b>共"&n&"页 第"&CurrentPage&"页 "
response.write "共查询到"&totalnumber&" 种产品</b></font>"
response.write "</td>"
response.write "<td VALIGN=center align=right >"
response.write "【<a href="&filename&"?page=1&gsid="&gsid&">最前页</a>】"
response.write "【<a href="&filename&"?page="&CurrentPage-1&"&gsid="&gsid&">上一页</a>】"
end if
if n-currentpage<1 then
response.write "【下一页】【最后页】</font>"
else
response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&gsid="&gsid&">"
response.write "【下一页</a>】【 <a href="&filename&"?page="&n&"&gsid="&gsid&">最后页</a>】"
end if
response.write "</form>"
response.write "</td>"
response.write "</tr>"
response.write "</table>"
end function
%>
</td>
<%sub content%>
</tr>
</table>
<%end sub%><%end if%>
</td>
</tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -