📄 bbr_qiugou_add.asp
字号:
<!--#include file="top_Cnbbr.asp"-->
<!--#include file="chksession.asp"-->
<!--#include file="Cnbbr_UserCenter_Left.asp" -->
<%
if Request.Form("title")="" and Request.Form("qgAct")<>"Y" then
Response.Write Cnbbr_Head
%>
<script language="javascript">
function check()
{
if(document.form1.title.value=="")
{
alert("求购信息标题不能为空,且不能包含非法字符");
return false;
}
if(document.form1.author.value=="")
{
alert("发布人名称不能为空,且不能包含非法字符");
return false;
}
if(document.form1.content.value=="")
{
alert("求购信息内容不能为空,且不能包含非法字符");
return false;
}
}
</script>
<table border=0 cellpadding=0 cellspacing=0 width=<%=Sys_BodyCenterWidth%> align="center" class="td">
<tbody>
<tr>
<td align=left valign=top width=150>
<%=Disp_CnbbrCenterLeft%>
</td>
<td align=center valign="top">
<%
Dim SiteMenu_Width,SiteMenu_Left,SiteMenu_Right
SiteMenu_Width="98%"
SiteMenu_Left="BBRhome.asp|[menu]|个人面板||[menu]||BBRhome.asp|[menu]|我是买家||[menu]||BBR_QiuGou_Add.asp|[menu]|发布商品求购信息"
SiteMenu_Right="BBR_QiuGou_Edit.asp|[menu]|管理求购信息"
Response.Write CnbbrSiteMenu(SiteMenu_Width,SiteMenu_Left,SiteMenu_Right)
%>
<table cellpading=0 cellspacing=0 border=0 width=560 align=center>
<tr>
<td width=100% align=center>
<table cellpading=0 cellspacing=1 border=0 width=100% height=206 align=center class=tablebg>
<form action="BBR_QiuGou_Add.asp" method="post" name="form1" onsubmit="javascript:return check();"
<tr>
<td width=30% align=center class=titletd colspan=2 height=20>------->添 加 求 购 信 息<-------</td>
</tr>
<tr>
<td width=30% align=right class=td>信息标题:</td><td align=left class=td><input name=title type=text size=50 maxlength=30></td>
</tr>
<tr>
<td width=30% align=right class=td>发 布 人:</td><td align=left class=td><input name=author type=text size=50 value="<%=Request.Cookies(super_user)("uname")%>" maxlength=20 readonly></td>
</tr>
<tr>
<td width=30% align=right class=td>信息类别:</td><td align=left class=td>
<select name=type>
<%=InfoClass(0,1)%>
</select>
</td>
</tr>
<tr>
<td width=30% align=right class=td>信息颜色:</td><td align=left class=td>
<select name=color>
<option value="red">红色</option>
<option value="blue">蓝色</option>
<option value="black">黑色</option>
</select>
</td>
</tr>
<tr>
<td width=30% align=right class=td>信息内容:</td><td align=left class=td>
<textarea name="content" cols="50" rows="7"></textarea></td>
</tr>
<tr>
<td width=30% align=center colspan=2 class=td><input name=qgAct type=hidden value="Y"><input name=submit type=submit value=添加求购信息> <input name=reset type=reset value=重写></td>
</tr>
<%
Randomize
rndbbrcnbbr=chr(int(26*rnd)+65)
Session("rndbbrcnbbr2")=rndbbrcnbbr
Response.Write "<input type=""hidden"" name=""qgrndbbrcnbbr"" value=""qgcnbbrrnd"&rndbbrcnbbr&""">"
%>
</form>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%
Response.Write Cnbbr_Bottom
else
if Request.Form("qgAct")="Y" and rst("author")<>"" then
Call Cnbbr_CheckPost(0)
Dim rndbbrcnbbr
rndbbrcnbbr=CheckStr(Trim(Request.Form("qgrndbbrcnbbr")))
if "qgcnbbrrnd"&Session("rndbbrcnbbr2")<>rndbbrcnbbr then
Session("rndbbrcnbbr2")=""
Call AlertInfo("表单参数有误或者重复提交,请返回!","BBR_QiuGou_Add.asp",1)
else
Session("rndbbrcnbbr2")=""
end if
Function payfor_qiugou(sellerid)
set rs_payforsell=server.createobject("ADODB.recordset")
sql="select bbrmoney from users where regid="& Request.Cookies(Super_User)("Uid")
rs_payforsell.open sql,conn,1,3
CnbbrConnTimes
if Not rs_payforsell.eof then
pay_for_qiugou=clng(pay_for_qiugou)
if rs_payforsell("bbrmoney")>=pay_for_qiugou then
rs_payforsell("bbrmoney")=rs_payforsell("bbrmoney")-pay_for_qiugou
rs_payforsell.update
else
response.write "<script language=javascript>alert('出错了,你没有足够的预存款,请先冲值!');this.location.href='CnbbrPay.asp';</script>"
response.end
end if
end if
rs_payforsell.close
set rs_payforsell=nothing
End Function
set rs=server.createobject("adodb.recordset")
sql="select * from qiugou where qgid is NULL"
rs.open sql,conn,1,3
CnbbrConnTimes
rs.addnew
rs("qgtitle")=CheckStr(HTMLEncode(trim(Request.Form("title"))))
rs("qgownerid")=Request.Cookies(Super_User)("Uid")
rs("qginfo")=CheckStr(HTMLEncode(trim(Request.Form("Content"))))
rs("qgInfoClass")=CheckStr(Trim(Request.Form("type")))
rs("qgcolor")=CheckStr(Trim(rst("color")))
rs("qgupdatetime")=now()
rs.update
session("add")="success"
Rs.Close
Set Rs=nothing
Call AlertInfo("求购信息发布成功,正在返回信息列表...","BBR_QiuGou_Edit.asp",1)
else
Call AlertInfo("求购信息发布失败,请重新提交,正在返回...","",0)
end if
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -