asp拍卖系统前台

ppmm.asp文件:


<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>



<!--#include file="conn/conn.asp"-->
<%If request.cookies("UserName")="" or Session("UserName")="" then
response.write "<script>alert('登录超时或未登录,请重新登录!');location.href='index.asp';</script>"
response.End()
'else
'request.Form("selfqqid")=session("username")
End if
%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<head >
<script type="text/javascript" language="javascript" src="js/jquery-1.4.1.min.js"></script>
<meta http-equiv="Content-Type" content ="text/html; charset=gb2312">
<title>龙势卡盟拍卖-<%=settitle%></title>


<style type="text/css">
form{ padding:0px; margin:0px}
body {
background-image: url(images/bg.png);
}
.cj td {
padding: 10px;
margin: 0px;
}
hr {
color: #FFDD00;
height: 2px;
}
.cjs {
border: 10px solid #641300;
}
.sm {
font-family: Georgia, "Times New Roman", Times, serif, "宋体";
font-size: 36px;
font-weight: bold;
color: #FFFFFF;
}
.jx {
font-family: Georgia, "Times New Roman", Times, serif, "宋体";
font-size: 18px;
color: #FFFFFF;
line-height: 150%;
}
.jx a {
font-family: Georgia, "Times New Roman", Times, serif, "宋体";
font-size: 18px;
color: #FECE00;
}
.reds {
font-family: Georgia, "Times New Roman", Times, serif, "宋体";
font-size: 18px;
color: #FF0000;
}
.zm {
font-family: Georgia, "Times New Roman", Times, serif, "宋体";
font-size: 14px;
font-weight: normal;
color: #FFFFFF;
line-height: 120%;
}
.foot {
font-family: Georgia, "Times New Roman", Times, serif, "宋体";
color: #FECE00;
font-size: 12px;
}
.nrr {
font-family: Georgia, "Times New Roman", Times, serif, "宋体";
font-size: 12px;
line-height: 150%;
color: #FFFFFF;
font-weight: normal;
}
.mainbg {
POSITION: relative; MARGIN: auto; WIDTH: 990px; BACKGROUND: url(images/pmbg.jpg) no-repeat center top
}

.hovera
{
color:white;
TEXT-DECORATION:none;
}
.asdf
{
color:white;
}
</style>
<script type="text/javascript">
var sh;
$(document).ready(function(){
$("#id11").hover(
function () {
$(this).addClass("asdf");
},
function () {
$(this).removeClass("asdf");
}
);
startRequest();


});
sh = setInterval("startRequest()",2500);
function stop()
{
clearInterval(sh);
}
function startRequest()
{
$.get("user/pmback.asp?action=display", function (data) {
var args = data.toString().split("|||");
if (args.length == 0)
{
alert("length=0");
return;
}
else
{
var id = args[0].split("=")[1];
var title = args[1].split("=")[1];
var qq = args[2].split("=")[1];
var price = args[3].split("=")[1];
var description = args[4].split("=")[1];
var charge = args[5].split("=")[1];
//var useryue = args[6].split("=")[1];
var xm = args[7].split("=")[1];
$("#itemid").val(id);
$("#charge").val(charge);
$("#itemtitle").html(title);
$("#qqid").val(qq);
$("#price").html(price);
$("#desc").html(description);
//$("#useryue").html(useryue);
$("#xm").html(xm);
}
});
}


function addprice(p)
{
if($("#qqid").val() == $("#selfqqid").val())
{
alert("不能重复报价!");
return;
}
$.get("user/pmback.asp?action="+p+"&ID="+$("#itemid").val()+"&QQ="+$("#qqid").val()+"&charge="+$("#charge").val()+"&price="+$("#price").html(), function (data) {
var args = data.toString().split("|||");

if (args.length == 0)
{
alert("length=0" +data);
return;
}
else
{
var id = args[0].split("=")[1];
var title = args[1].split("=")[1];
var qq = args[2].split("=")[1];
var price = args[3].split("=")[1];
var description = args[4].split("=")[1];
var charge = args[5].split("=")[1];
var useryue = args[6].split("=")[1];
var xm = args[7].split("=")[1];
$("#itemid").val(id);
$("#charge").val(charge);
$("#itemtitle").html(title);
$("#qqid").val(qq);
$("#price").html(price);
$("#desc").html(description);
$("#useryue").html(useryue);
$("#xm").html(xm);
//alert(data);
}
});

}
</script>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--<DIV class=mainbg>-->
<table width="750" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="10"></td>
</tr>
<tr>
<td height="30" class="foot"><strong>快捷通道:<a href="index.asp" style="color:#FF0">会员中心</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="/user/cwlog.asp" style="color:#FF0">财务记录</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="/user/lvup.asp" style="color:#FF0">会员升级</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="/user/tixian.asp" style="color:#FF0">提现</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="/user/logout.asp" style="color:#FF0">退出登录</a></strong></td>
</tr>
</table>
<table width="804" border="0" align="center" cellpadding="0" cellspacing="0" background="images/index_02.png">
<tr >
<td height="46" align="left" class="jx">
<strong>&nbsp;&nbsp;欢迎您:<%=Session("UserName")%>
</td>
<td style="margin-right:50;color:white;" align="right">您的余额:<span id="useryue"><%=useryue(session("username"))%></span>元</strong>
<a href="/user/chongzhi.asp" style="font-size:12px"><strong>充值>></strong></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td>
</table>


<table width="804" height="130" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="10" style="background:url(images/banner-l.jpg);"></td>
<td width="784" height="130" align="center" style="background:url(images/banner-m.jpg) repeat-x; color:white;"><strong></strong><font size="36">龙势卡盟拍卖系统</font></strong></td>
<td width="10" align="center" style="background:url(images/banner-r.jpg);"></td>
</tr>
</table>
<!--</div>-->
<table width="804"border="0" align="center" cellpadding="0" cellspacing="0">
<tr class="sm" height="30" bgcolor="#AA2202" >
<td colspan="2" align="left" style="margin-top:30px; color:white;" width="100%" valign="top"><strong>&nbsp;&nbsp;拍卖:</strong></td>
</tr>
<tr class="sm" height="40" bgcolor="#AA2202" valign="top">
<td colspan="2" align="center" style="color:white;border-bottom: 2px solid white; width:100%; margin:20px" valign="top"><font size="24"><strong><span id="itemtitle">拍卖商品标题</span></strong></font></td>
</tr>
<tr class="jx" height="150px">
<td align="left" width="70%" bgcolor="#AA2202">
<strong>&nbsp;&nbsp;&nbsp;&nbsp;最高出价人:<span id="xm"></span></strong><br><br>
<strong>&nbsp;&nbsp;&nbsp;&nbsp;最高出价:&nbsp;&nbsp;&nbsp;&nbsp;<span id="price"></span>元</strong><br>
</td>
<td align="right" width="30%" bgcolor="#AA2202" >
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><a style="color:white;TEXT-DECORATION:none;" href="javascript:void(0)" οnclick="addprice('1')">加一元</a></td>
</tr>
<tr>
<td><a style="color:white;TEXT-DECORATION:none;" href="javascript:void(0)" οnclick="addprice('5')">加五元</a></td>
</tr>
<tr>
<td><a style="color:white;TEXT-DECORATION:none;" href="javascript:void(0)" οnclick="addprice('10')">加十元</a></td>
</tr>
<tr>
<td><a style="color:white;TEXT-DECORATION:none;" href="javascript:void(0)" οnclick="addprice('50')">加五十元</a></td>
</tr>
</table>
</td>
</tr>
</table>
<table width="804" height="300" border="0" align="center" cellpadding="0" cellspacing="0">
<tr class="sm">
<td align="left" valign="top" height="46" bgcolor="#c82c06"><strong>&nbsp;&nbsp;拍卖商品描述:</strong></td>
</tr>
<tr>
<td align="center" bgcolor="#AA2202" style=" color:white;padding-top:20; " valign="top"><font size="24"><span id="desc">拍卖商品描述</span></font></td>
</tr>
</table>
<table width="804"border="0" align="center" cellpadding="0" cellspacing="0">
<tr class="sm">
<td align="left" bgcolor="#c82c06" style="margin-left:20; color:white;"><strong>&nbsp;&nbsp;注意事项:</strong></td>
</tr>
<tr class="sm" height="200" >
<td align="left" bgcolor="#AA2202" style="margin-left:20; color:white;"></td>
</tr>
</table>
<table width="804" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="80" align="center" class="foot"><%=settitle%></td>
</tr>
</table>
<input id="itemid" name="itemid" type="hidden" value="" />
<input id="charge" name="charge" type="hidden" value="" />
<input id="qqid" name="qqid" type="hidden" value="" />
<input id="selfqqid" name="selfqqid" type="hidden" value="<%=session("username")%>" />
</body>

</html>

ppmm.asp文件的处理文件:

<!--#include file="../conn/conn.asp"-->
<!--#include file="../conn/md5.asp"-->
<%

response.CharSet="gb2312" '这里可以防止response返回的数据乱码(局部乱码)
dim retvalue, sql, operation, qqid, itemid, cfee, chargefee,yue, cprice, newyue, maxprice


operation=trim(request.QueryString("action"))
qqid=trim(request.QueryString("QQ"))
itemid =trim(request.QueryString("ID"))
chargefee = trim(request.QueryString("charge"))
maxprice = trim(request.QueryString("price"))
yue =useryue(session("username"))
cprice = getcurprice(itemid)
if conn.State= 0 then
conn.Open()
end if
bret = StrComp(qqid,session("username"),1)
'先退费后扣费
if bret<>0 then
if operation = "1" or operation = "5" or operation = "10" or operation = "50" then
sqlupdate="update [pm] set QQ='"&session("username")& "', [price]=[price]+"& operation &",[curprice]="&CInt(operation)+CInt(maxprice)&" where ID=" &itemid & " and isonsale=True"
cfee = CInt(chargefee) +CInt(operation)+CInt(maxprice)
sql1="update [user] set yue= yue-"& cfee &" where [name]='"&session("username")&"'" '当前拍卖人的账户扣费
sql2="update [user] set yue= yue+"& cprice &" where [name]='"&qqid&"'" '前一拍卖人的账户退费
newyue = yue-cfee
on error resume next
conn.BeginTrans()
if yue>=cfee then
if conn.State= 0 then
conn.Open()
end if
conn.Execute sql1
conn.Execute sql2
conn.Execute sqlupdate
end if
If Err.Number <> 0 Then
conn.RollbackTrans()
newyue = yue
else
conn.CommitTrans()
end if
conn.close
end if
end if


'if operation = "display" then
set rs=server.CreateObject("ADODB.Recordset")
sql="select top 1 [pm].*, xm from [pm] left outer join[user] on [pm].QQ=[user].name where isonsale=True"
if conn.State= 0 then
conn.Open()
end if
rs.open sql,conn
if not(rs.bof and rs.eof) then
rs.MoveFirst()
retvalue = "ID=" & rs("ID") & "|||title="& rs("title") & "|||QQ="& rs("QQ") & "|||price="&rs("price") & "|||description="& rs("description") &"|||charge="&rs("charge")&"|||useryue="&newyue&"|||xm="&rs("xm") '&"|||bret="&bret&"|||qqid="&qqid&"|||cprice="&cprice
response.Write retvalue
else
response.write "<script>alert('no goods by display!');</script>"
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
Response.CacheControl = "no-cache"
Response.Cache.SetNoStore()

response.End()
%>


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值