📄 addmyinfo.asp
字号:
<!--
版本:草原二手市场V1.1
本程序作者:mysql QQ:54016224 TEL:13036133798
-->
<!--#include file="include/conn.asp"-->
<!--#include file="include/function.asp"-->
<!--#include file="include/md5.asp"-->
<!--#include file="include/access.asp"-->
<%
subname0 = request("subname0")
action = request("action")
IndexNO = request("SubIndexNO")
InfoName = request("InfoName")
InfoNote = request("InfoNote")
InfoPrice = request("InfoPrice")
EndDate = request("EndDate")
action = request("action")
if instr(IndexNO,"||||") > 0 then
SBIndexNO = split(IndexNO,"||||")
SubIndexNO = SBIndexNO(0)
BigIndexNO = SBIndexNO(1)
end if
if instr(IndexNO,"||||") <= 0 and subname0 <> "" then
response.write "对不起,请选择小类"
response.end
end if
if isNum(request("InfoID")) then
InfoID = cint(request("InfoID"))
end if
if isNum(request("NInfoID")) then
NInfoID = cint(request("NInfoID"))
end if
if isNum(request("InfoPrice")) then
InfoPrice = clng(request("InfoPrice"))
end if
if isNum(request("InfoStatus")) then
InfoStatus = cint(request("InfoStatus"))
end if
if action = "add" and subname0 <> ""then
action = "add"
PostTime = date
if isNumeric(EndDate) then
else
EndDate = 7 '默认为7天
end if
EndDate = date+cint(EndDate)
if trim(InfoName) = "" or InfoNote = "" or InfoPrice = "" then
response.write "<script>alert('请检查 标题,价格,内容是否为空!');history.go(-1);</script>"
response.end
end if
sql = "insert into [Info] (InfoName,InfoNote,InfoStatus,InfoPrice,SubIndexNO,BigIndexNO,UserID,UserName,PostTime,EndDate) values ('"&InfoName&"','"&InfoNote&"',"&InfoStatus&","&InfoPrice&",'"&SubIndexNO&"','"&BigIndexNO&"',"&request.Cookies("UserID")&",'"&request.Cookies("UserName")&"','"&PostTime&"','"&EndDate&"')"
set rs =server.CreateObject("adodb.recordset")
rs.open sql,conn,1,3
response.write "<script>alert('添加信息成功');window.location.href='myinfo.asp';</script>"
end if
if request("action") = "add" then
action = "add"
submittext = "添加"
else
action = "add"
submittext = "添加"
end if
%>
<!--#include file = "head.asp" -->
<!--主体1-->
<table width="1000" border="0" cellpadding="0" cellspacing="2" bgcolor="#F0F9FB">
<tr>
<td width="785" height="883" valign="top" class="pgray12">
<!-- body1 left -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="225" align="center" valign="top"> <table width="218" border="0" cellpadding="0" cellspacing="1" bgcolor="#C5DCE2">
<tr>
<td bgcolor="#F0F9FB" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/e_title_userlogin1.gif" width="218" height="21"></td>
</tr>
<tr>
<td><iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="login.asp" width="100%" height=85></iframe> </td>
</tr>
<tr>
<td height="1" bgcolor="#C5DCE2"></td>
</tr>
<tr>
<td align="center" height="50"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" width="50%"><a href="sign_in.asp"><img src="images/button_user_reg.gif" width="87" height="24" border="0"></a></td>
<td align="center"><img src="images/button_user_getps.gif" width="87" height="24"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="1" bgcolor="#C5DCE2"></td>
</tr>
<tr>
<td height="150" valign="top" align="center">
<!-- notice -->
<marquee scrollAmount="2" width="200" height="140" direction="up" onmouseover='this.stop()' onmouseout='this.start()'>
<table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="font-12px120-000000"><img src='images/arrow_orange7.gif' width='13' height='11'>
<font color="#0066CC">二手市场二手市场二手市场二手市场二手市场二手市场!</font></td>
</tr>
<tr>
<td height="5" ></td>
</tr>
</table>
<table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="font-12px120-000000"><img src='images/arrow_orange7.gif' width='13' height='11'>
<font color="#0066CC">二手市场二手市场二手市场二手市场二手市场二手市场!</font></td>
</tr>
<tr>
<td height="5" ></td>
</tr>
</table>
<table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="font-12px120-000000"><img src='images/arrow_orange7.gif' width='13' height='11'>
<font color="#0066CC">二手市场二手市场二手市场二手市场二手市场二手市场!</font></td>
</tr>
<tr>
<td height="5" ></td>
</tr>
</table>
</marquee>
<!-- notice end -->
</td>
</tr>
</table> </td>
</tr>
</table>
<table width="218" border="0" cellpadding="1" cellspacing="1" bgcolor="#C5DCE2">
<tr>
<td bgcolor="#f0f9fb"><img src="images/infolist.gif" width="218" height="21"></td>
</tr>
<tr>
<td bgcolor="#f0f9fb"><table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td bgcolor="#f0f9fb"> <iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="html/Categories.html" width="100%" height=520 style="backgroud:#f0f9fb">
</iframe> </td>
</tr>
</table> </td>
</tr>
</table></td>
<td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><form method="post" action="?action=<%=action%>">
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#C5DCE2">
<tbody>
<tr bgcolor="#f0f9fb" class="line_1">
<td width="79" height="25" align="right">种类: </td>
<td colspan="2"> <select name="InfoStatus" id="InfoStatus">
<option value=0 selected>出 售</option>
<option value=1>求 购</option>
</select>
*务必选正确</td>
</tr>
<tr bgcolor="#f0f9fb" class="line_1">
<td height="25" align="right">分类: </td>
<td colspan="2"> <select name="SubIndexNO">
<%
sql = "select * from BigClass"
set rs = server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof and not rs.bof
%>
<option value=<%=rs("BigIndexNO")%>>+<%=rs("BigName")%></option>
<%
sql = "select * from SubClass where BigIndexNO = '"&rs("BigIndexNO")&"'"
set rs1 = server.CreateObject("adodb.recordset")
rs1.open sql,conn,1,1
do while not rs1.eof and not rs1.bof
%>
<option value=<%=rs1("SubIndexNO")&"||||"&rs("BigIndexNO")%>>--<%=rs1("SubName")%></option>
<%
rs1.movenext
loop
rs.movenext
loop
%>
</select> </td>
</tr>
<tr bgcolor="#f0f9fb" class="line_1">
<td height="25" align="right">标题: </td>
<td colspan="2"> <input name="InfoName" id="InfoName" maxlength="20" type="text">
*请直接描述产品,请勿使用不雅字眼,亦不用写求或供</td>
</tr>
<tr bgcolor="#f0f9fb" class="line_1">
<td height="25" align="right">价格: </td>
<td colspan="2"> <input name="InfoPrice" id="InfoPrice" maxlength="5" onkeyup="value=value.replace(/[^\d]/g,'') " onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" type="text">
元 *请使用整数,求购信息不能确定价格时请写0</td>
</tr>
<tr valign="top" bgcolor="#f0f9fb" class="line_1">
<td height="135" align="right">内容: </td>
<td width="372"> <textarea name="InfoNote" id="InfoNote" cols="50" rows="10"></textarea>
</td>
<td width="119" valign="middle">*内容请详细描述您的物品,诸如几成新等等。请注明交易方式、时间、联系方法</td>
</tr>
<tr bgcolor="#f0f9fb" class="line_1">
<td height="25" align="right">有效期: </td>
<td colspan="2"> <input name="EndDate" id="EndDate" maxlength="3" onkeyup="value=value.replace(/[^\d]/g,'') " onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" type="text">
天(填写数字,默认为7天)</td>
</tr>
<tr bgcolor="#f0f9fb" class="line_1">
<td></td>
<td height="25" colspan="2" align="left"> <input name="subname0" type="submit" id="subname0" value="添加信息">
</td>
</tr>
<tr bgcolor="#f0f9fb" class="line_1">
<td height="25" align="right">提示:</td>
<td colspan="2"> </td>
</tr>
<tr bgcolor="#f0f9fb" class="line_1">
<td height="25" align="right">1.</td>
<td colspan="2"> 请在发布信息前先搜索</td>
</tr>
<tr bgcolor="#f0f9fb" class="line_1">
<td height="25" align="right">2.</td>
<td colspan="2"> 如您发布信息成功后发现信息有误,请到用户面板中修改信息</td>
</tr>
<tr bgcolor="#f0f9fb" class="line_1">
<td height="25" align="right">3.</td>
<td colspan="2"> 如果该信息已成交,请到用户面板中修改信息状态,防止别人打扰</td>
</tr>
</tbody>
</table>
</form></td>
</tr>
</table></td>
</tr>
</table>
<!-- body1 left end-->
</td>
<td bgcolor="#F2F2F2" valign="top">
<!-- body1 right-->
<iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="updatelist.asp" width="100%" height="100%"></iframe>
<!-- body1 right end-->
</td>
</tr>
</table>
<!-- copyright -->
<table width="1002" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="3" bgcolor="#FFFFFF"></td>
<td bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr align="center" valign="top">
<td width="20" height="104"> </td>
<td width="950">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right"><a href="#"><img src="images/i_but_top.gif" width="43" height="37" border="0"></a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="74%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="121" rowspan="2"> </td>
<td width="10" rowspan="2"> </td>
<td width="492"><a href="http://www.vvcat.com" target="_blank"><img src="images/i_menu_about.gif" height="14" border="0" width="57"></a><a href="http://www.vvcat.com"><img src="images/i_menu_c.gif" width="63" height="14" border="0"></a><a href="http://www.vvcat.com" target="_blank"><img src="images/i_menu_wor.gif" width="63" height="14" border="0"></a><a href="http://www.vvcat.com" target="_blank"><img src="images/i_menu_ser.gif" width="63" height="14" border="0"></a><a href="http://www.vvcat.com" target="_blank"><img src="images/i_menu_declare.gif" width="63" height="14" border="0"></a><a href="http://www.vvcat.com" target="_blank"><img src="images/i_menu_s.gif" width="63" height="14" border="0"></a><a href="http://www.vvcat.com" target="_blank"><img src="images/i_menu_h.gif" width="31" height="14" border="0"></a>
</td>
</tr>
<tr>
<td height="5" width="492"></td>
</tr>
</table>
</td>
<td width="26%" valign="bottom"> </td>
</tr>
</table>
</td>
<td width="20"> </td>
</tr>
</table>
</td>
<td width="3" bgcolor="#FFFFFF"></td>
<td width="1"></td>
<td width="7"></td>
</tr>
</table>
<!-- copyright end -->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -