forcedshow.asp
来自「1. 硬件环境:MS WINDOWS NT PACK 4 OR LATER /W」· ASP 代码 · 共 236 行
ASP
236 行
<!-- #include file="setup.asp" -->
<!-- #include file="inc/function.asp" -->
<%if Request.ServerVariables("request_method")="POST" then
validate "Login.asp",1
Select Case Request.Form("Button")
Case "重新发布"
ID=Replace(Replace(request.form("id")," ",""),"'","")
if Conn.Execute("Select Forced_SendUs From Forced_sale where Forced_ID="&id)(0) <> Request.Cookies("UserName") then Error 1,"参数非法传递!\n您的IP已被记录!",""
Conn.Execute("Delete From BuyUser where ForcedID="&ID)
Conn.Execute("Delete From [Message] where ForcedID="&id)
Session("Edit")=","&id&","
Response.Redirect "AddForced.asp?Menu=Edit"
Case "删除信息"
ID=Replace(Replace(request.form("id")," ",""),"'","")
Set R = Conn.Execute("Select Forced_SendUs,Forced_Bimg,Forced_Simg From Forced_sale where Forced_ID="&id)
if R("Forced_SendUs") <> Request.Cookies("UserName") then Error 1,"参数非法传递!\n您的IP已被记录!",""
DelFile "UpProductimg/S/",R("Forced_Simg")
DelFile "UpProductimg/B/",R("Forced_Bimg")
R.Close
Set R = Nothing
Conn.Execute("Delete From [Message] where ForcedID="&id)
Conn.Execute("Delete From Forced_sale where Forced_ID="&ID)
Response.Redirect "ForcedList.asp?Menu=My"
End Select
Response.End
End if
on error resume next
ShowID=Request.QueryString("ShowID")
if ShowID = "" Then Error 2,"参数非法传递!",""
if isnumeric(ShowID)=False Then Error 1,"参数非法传递,您的IP已被记录!",""
Conn.Execute("Update Forced_sale Set Forced_See = Forced_See+1 where Forced_ID="&ShowID)
Sql="Select Forced_ID,Forced_SendUs,Forced_SendUsID,Forced_Proid,Forced_NO,Forced_Nums,Forced_ProName,Forced_GX,Forced_BZ,Forced_Bimg,Forced_Simg,Forced_Title,Forced_Stat,Forced_OK,Forced_Now,Forced_info,Forced_Buy,Forced_StTime,Forced_OvTime,Forced_DiQu,Forced_QU,Forced_New,Forced_User,Forced_UserID From Forced_sale where Forced_ID="&ShowID
Set Rs = Conn.Execute(Sql)
if Rs.Eof or Rs.Bof Then Error 2,"无此产品信息!",""
Call Top
Call table
if Rs("Forced_Bimg")="" Then
img1="缺"
else
img1="<a href=UpProductimg/B/"&Rs("Forced_Bimg")&" target=_blank><img src=UpProductimg/B/"&Rs("Forced_Bimg")&" border=0 onload='javascript:if(this.width>165){this.width=165};if(this.height>165){this.height=165};'></a>"
end if
Response.Write("<style><!--TABLE{BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:1px}TD{BORDER-RIGHT:0px;BORDER-TOP:0px}--></style><br>")
if DateDiff("d",Rs("Forced_OvTime"),Now()) > 0 Then MM = "<font color=#ff0000>[过期信息]</font>"
if Trim(Rs("Forced_Conceal"))>1 Then DD = "<font color=#ff0000>[交易完成]</font>"
%>
<script language=javascript>function checkclick(msg){if(confirm(msg)){event.returnValue=true;}else{event.returnValue=false;}}</script>
<TABLE borderColor="#a4b6d7" cellSpacing="0" cellPadding="3" width="100%" border="1" style="BORDER-COLLAPSE: collapse"
ID="Table1">
<TR>
<TD height="25" width="90%" valign="middle" background="images/title_sub.gif" align="left">
■
<%=Rs("Forced_Title")%> <%=MM%> <%=DD%>
</TD>
<TD height="25" width="10%" valign="middle" background="images/title_sub.gif" align="center"><a href="javascript:window.print()">[打印]</a>
</TD>
</TR>
</TABLE>
<TABLE borderColor="#a4b6d7" cellSpacing="0" cellPadding="3" width="100%" border="1" style="BORDER-COLLAPSE: collapse"
ID="Table2">
<TR>
<TD height="226" width="75%">
<table border="0" cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE: collapse" bordercolor="#111111"
width="100%" height="349" ID="Table3">
<tr>
<td width="30%" rowspan="5" height="162" bgcolor="#e8f4ff"><p align="center">
<%=img1%>
</p>
</td>
<td width="12%" height="20" bgcolor="#e8f4ff"><div align="right">商品名称:</div>
</td>
<td width="11%" bgcolor="#e8f4ff"> <%=Rs("Forced_ProName")%></td>
<td width="11%" height="20" bgcolor="#e8f4ff"><div align="right">可购数量:</div>
</td>
<td width="14%" bgcolor="#e8f4ff"> <%=Rs("Forced_Nums")%></td>
<td width="22%" rowspan="5" valign="top">
<table width="166" height="100%" border="0" cellpadding="0" cellspacing="0" ID="Table4">
<%
UserOK=Conn.Execute("Select UserOK FRom UserInfo where UserName_2='"&Rs("Forced_SendUs")&"'")(0)
Userall=Conn.Execute("Select UserForced FRom UserInfo where UserName_2='"&Rs("Forced_SendUs")&"'")(0)
if Conn.Execute("Select count(UsName) From [Online] where UsName='"&Rs("Forced_SendUs")&"'")(0) = 0 Then
onl="<img src=images/offline.gif title=该卖家当前不在线!>"
else
onl="<img src=images/online1.gif title=该卖家当前在线!>"
end if
%>
<tr><td height="21"> <strong>卖家信息</strong></td></tr>
<tr><td height="21" width=55%> 卖家:</td><td height="21"> <%=Rs("Forced_SendUs")%></td></tr>
<tr><td height="21"> 成交率:</td><td height="21"> <%=(UserOK/Userall)*100%>%</td></tr>
<tr><td height="21"> 成交笔数:</td><td height="21"> <%=Conn.Execute("Select UserOK FRom UserInfo where UserName_2='"&Rs("Forced_SendUs")&"'")(0)%></td></tr>
<tr><td height="21"> 注册时间:</td><td height="21"> <%=Conn.Execute("Select UserAddtime FRom UserInfo where UserName_2='"&Rs("Forced_SendUs")&"'")(0)%></td></tr>
<tr><td height="21"> 在线状况:</td><td height="21"> <%=onl%></td></tr>
<tr><td height="21"> 商品总数:</td><td height="21"> <font title="点击查看该用户其他产品。"><%=Userall%></font></td></tr>
<tr><td height="21">
<INPUT type="button" value="我要出价" onclick="javascript:open('BuyUser.asp?menu=post&inceptID=<%=Rs("Forced_SendUsID")%>&Forcedid=<%=ShowID%>','','width=320,height=170')" NAME="Button1"></td><td height="21"> <INPUT type="button" value="我要留言" onclick="javascript:open('friend.asp?menu=post&inceptID=<%=Rs("Forced_SendUsID")%>&Forcedid=<%=ShowID%>','','width=320,height=170')" ID="Button1" NAME="Button1">
</td></tr>
<%if Rs("Forced_SendUs") = Request.Cookies("UserName") Then%>
<tr><form name=fm action=ForCedShow.asp method=post><td height="21"><input type=hidden name="ID" value=<%=ShowID%>> <INPUT type="submit" value="重新发布" NAME="Button" onclick="checkclick('重新发布产品将会重新初始化该产品信息和删除所有留言和竞价!\n您确定吗?')"></td><td height="21"> <INPUT type="submit" value="删除信息" NAME="Button"></td></form></tr>
<%End if%>
</table>
</td>
</tr>
<tr>
<td height="20"><div align="right">现价:</div>
</td>
<td height="20"> <%=Rs("Forced_Now")%></td>
<td height="20"><div align="right">所在地:</div>
</td>
<td height="20"> <%=Rs("Forced_DiQu")%></td>
</tr>
<tr>
<td width="12%" height="20" bgcolor="#e8f4ff">
<div align="right">一口价:</div>
</td>
<td width="11%" height="20" bgcolor="#e8f4ff"> <%=Rs("Forced_OK")%></td>
<td width="11%" height="20" bgcolor="#e8f4ff"><div align="right">商品规格:</div>
</td>
<td width="14%" height="20" bgcolor="#e8f4ff"> <%=Rs("Forced_GX")%></td>
</tr>
<tr>
<td width="12%" height="20">
<div align="right">起始价:</div>
</td>
<td width="11%" height="20"> <%=Rs("Forced_Stat")%></td>
<td width="11%" height="20"><div align="right">商品包装:</div>
</td>
<td width="14%" height="20"> <%=Rs("Forced_BZ")%></td>
</tr>
<tr>
<td height="20" bgcolor="#e8f4ff"><div align="right">新旧程度:</div>
</td>
<td height="20" bgcolor="#e8f4ff"> <%=Rs("Forced_New")%></td>
<td height="20" bgcolor="#e8f4ff"><div align="right">结束日期:</div>
</td>
<td height="20" bgcolor="#e8f4ff"> <%=Rs("Forced_OvTime")%></td>
</tr>
<tr >
<td height="32" colspan="6" background="images/bgimg.gif"><img src="images/2.gif" width="60" height="9"><b>商品描述</b></td>
</tr>
<tr>
<td height="18" colspan="6" valign="top" bgcolor="#e8f4ff"><%=Rs("Forced_info")%>
</td>
</tr>
<tr>
<td height="32" colspan="6" background="images/bgimg.gif"><img src="images/2.gif" width="60" height="9"><b>买家竞拍</b></td>
</tr>
<tr>
<td height="13" colspan="6" valign="top" bgcolor="#e8f4ff"> <table width="100%" border="0" cellspacing="0" cellpadding="0" ID="Table6">
<tr><td width=18% height=22 align="center">买方</td>
<td width=20% align="center">出价</td>
<td width=24% align="center">需求数量</td>
<td width=23% align="center">出价时间</td>
<td width=15% align="center">状态</td>
</tr>
<%Sql="Select BuyID,BuyName,BuyUserID,BuyMoney,BuyNums,BuyTime From BuyUser where ForcedID="&ShowID&" Order by BuyMoney Desc,BuyTime Desc"
Set R = Conn.Execute(Sql)
i=1
do while not R.eof
if i = 1 or mmoney = R("BuyMoney") Then
if i = 1 then mmoney = R("BuyMoney")
zt="领先"
else
zt="出局"
end if
if i mod 2 = 0 Then
bg="#F3F9FF"
else
bg="#ffffff"
end if
Response.Write "<tr ><td width=18% height=22 align=center bgcolor="&bg&">"&R("BuyName")&"</td><td width=20% align=center bgcolor="&bg&">"&R("BuyMoney")&" <a style='cursor:hand;' onclick=javascript:open('BuyUser.asp?menu=BuyOK&inceptID="&Rs("Forced_SendUsID")&"&BuyID="&R("BuyID")&"&Forcedid="&ShowID&"','','width=320,height=170') ><font color=#F399FF>[成交]</font></a></td><td width=24% align=center bgcolor="&bg&">"&R("BuyNums")&"</td><td width=23% align=center bgcolor="&bg&">"&R("BuyTime")&"</td><td width=15% align=center bgcolor="&bg&">"&zt&"</td></tr>"
i=i+1
R.movenext
loop
%>
</table></td>
</tr>
<tr>
<td height="32" colspan="6" background="images/bgimg.gif"><img src="images/2.gif" width="60" height="9"><b>留言列表</b></td>
</tr>
<tr>
<td height="18" colspan="6" valign="top" bgcolor="#e8f4ff">
<table width="100%" border="0" cellspacing="0" cellpadding="0" ID="Table5">
<%Sql="Select MsgId,Content,[Time],ISRe,PostName,PostID From [Message] where ForcedID="&ShowID&" and Reid = 0 Order by [Time] Desc"
Set R = Conn.Execute(Sql)
i=1
Do while not R.Eof
if i mod 2 = 1 Then
bg="#F3F9FF"
else
bg="#ffffff"
end if
Response.Write "<tr><td width=65% height=22 bgcolor="&bg&"> "&i&" . "&R("Content")&"</td><td width=15% bgcolor="&bg&" style='cursor:hand;' onclick=javascript:open('friend.asp?menu=post&Reid="&R("MsgId")&"&inceptID="&R("PostID")&"&Forcedid="&ShowID&"','','width=320,height=170') title='回复该条留言'> ["&R("PostName")&"]</td><td width=20% bgcolor="&bg&"> "&R("Time")&"</td></tr>"
if R("ISRe") = 1 Then
Sql="Select Content,[Time],PostName From [Message] where Reid="&R("MsgId")
Set RR = Conn.Execute(Sql)
Response.Write "<tr><td width=65% height=22 bgcolor="&bg&"> 回复 . "&RR("Content")&"</td><td width=15% bgcolor="&bg&" > ["&RR("PostName")&"]</td><td width=20% bgcolor="&bg&"> "&RR("Time")&"</td></tr>"
end if
R.Movenext
i=i+1
loop
R.Close
Set R = Nothing
%>
</table>
</td>
</tr>
</table></TD>
</TR>
</TABLE>
<%htmlend%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?