📄 admin_addinfo.asp
字号:
-->
<!--#include file="include/conn.asp"-->
<!--#include file="include/function.asp"-->
<!--#include file="include/access.asp"-->
<%
subname0 = request("subname0")
action = request("action")
IndexNO = request("SubIndexNO")
InfoName = request("InfoName")
InfoNote = request("InfoNote")
InfoPrice = request("InfoPrice")
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"
sql = "insert into [Info] (InfoName,InfoNote,InfoStatus,InfoPrice,SubIndexNO,BigIndexNO) values ('"&InfoName&"','"&InfoNote&"',"&InfoStatus&","&InfoPrice&",'"&SubIndexNO&"','"&BigIndexNO&"')"
set rs =server.CreateObject("adodb.recordset")
rs.open sql,conn,1,3
response.write "<script>alert('添加信息成功');</script>"
end if
if request("action") = "add" then
action = "add"
submittext = "添加"
else
action = "add"
submittext = "添加"
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>后台管理</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META http-equiv=MSThemeCompatible content=Yes>
<LINK href="images/css.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.3790.0" name=GENERATOR>
</HEAD>
<BODY leftMargin=0 topMargin=0>
<form method="post" action="?action=<%=action%>">
<table width="570" border="0" align="center" cellpadding="0" cellspacing="2" bordercolor="#999999">
<tbody>
<tr class="line_1">
<td width="79" height="25" align="right"> </td>
<td colspan="2"> </td>
</tr>
<tr class="line_1">
<td 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 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 class="line_1">
<td height="25" align="right">标题: </td>
<td colspan="2">
<input name="InfoName" id="InfoName" maxlength="20" type="text">
*请直接描述产品,请勿使用不雅字眼,亦不用写求或供</td>
</tr>
<tr 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" class="line_1">
<td height="135" align="right">内容: </td>
<td width="372">
<textarea name="InfoNote" id="InfoNote" cols="70" rows="10"></textarea>
</td>
<td width="119" valign="middle">*内容请详细描述您的物品,诸如几成新等等。请注明交易方式、时间、联系方法</td>
</tr>
<tr class="line_1">
<td align="right">商品图片: </td>
<td colspan="2">
<input name="pic" id="pic" type="text" >
*上传图片后该项系统自动填写</td>
</tr>
<tr>
<td colspan="3" class="line_2">
<iframe src="writeInfo_files/upfile.htm" frameborder="0" height="30" scrolling="no" width="100%"></iframe></td>
</tr>
<tr class="line_1">
<td height="25" align="right">有效期: </td>
<td colspan="2"> 10 天</td>
</tr>
<tr class="line_1">
<td height="25" align="right">手机/电话: </td>
<td colspan="2">
<input name="phone" id="phone" maxlength="20" type="text">
*在内容中注明了其他联系方式,此项可以不填</td>
</tr>
<tr class="line_1">
<td align="right">信息推送: </td>
<td colspan="2">
<input name="ifpush" id="ifpush" value="push" type="checkbox">
*若选择该项系统将会发送小纸条提示与你这条信息相关的信息(详情请参阅帮助)</td>
</tr>
<tr class="line_1">
<td align="right"> </td>
<td colspan="2"> </td>
</tr>
<tr class="line_1">
<td></td>
<td height="25" colspan="2" align="left">
<input name="subname0" type="submit" id="subname0" value="添加信息">
</td>
</tr>
<tr class="line_1">
<td align="right"> </td>
<td colspan="2"> </td>
</tr>
<tr class="line_1">
<td height="25" align="right">提示:</td>
<td colspan="2"> </td>
</tr>
<tr class="line_1">
<td height="25" align="right">1.</td>
<td colspan="2"> 请在发布信息前先搜索</td>
</tr>
<tr class="line_1">
<td height="25" align="right">2.</td>
<td colspan="2"> 如您发布信息成功后发现信息有误,请到用户面板中修改信息</td>
</tr>
<tr class="line_1">
<td height="25" align="right">3.</td>
<td colspan="2"> 如果该信息已成交,请到用户面板中修改信息状态,防止别人打扰</td>
</tr>
<tr class="line_1">
<td height="25" align="right"></td>
<td colspan="2"> </td>
</tr>
</tbody>
</table>
</form>
<BR>
<BR>
<BR>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -