📄 editmyinfo.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")
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("EndDate")) then
EndDate0 = cint(request("EndDate"))
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 request("action") = "edit" and subname0 <> "" then
sql = "select * from [Info] where InfoID = "&InfoID&" and UserID = "&request.Cookies("UserID")&""
set rs =server.CreateObject("adodb.recordset")
rs.open sql,conn,1,3
if rs.eof then
response.write "<script>alert('该信息不存在');</script>"
response.End()
else
PostTime = date
EndDate = date + EndDate0
if trim(InfoName) = "" or InfoNote = "" or InfoPrice = "" then
response.write "<script>alert('请检查 标题,价格,内容是否为空!');history.go(-1);</script>"
response.end
end if
sql = "update [Info] set InfoName = '"&InfoName&"',InfoNote = '"&InfoNote&"',InfoStatus = "&InfoStatus&",InfoPrice = "&InfoPrice&",SubIndexNO = '"&SubIndexNO&"',BigIndexNO = '"&BigIndexNO&"',PostTime = '"&PostTime&"',EndDate = '"&EndDate&"' where InfoID = "&InfoID&" and UserID = "&request.Cookies("UserID")&""
'response.write sql
set rs =server.CreateObject("adodb.recordset")
rs.open sql,conn,1,3
end if
response.write "<script>alert('编辑成功');window.location.href='myinfo.asp';</script>"
end if
if request("action") = "edit" then
action = "edit"
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><%
sql = "select * from [Info] where InfoID = "&InfoID&""
set rs = server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if not rs.eof and not rs.bof then
SoldStaus = rs("InfoStatus")
InfoName = rs("InfoName")
InfoNote = rs("InfoNote")
InfoPrice = rs("InfoPrice")
EndDate = rs("EndDate")-rs("PostTime")
UserID = rs("UserID")
SubIndexNO = rs("SubIndexNO")
select case SoldStaus
case 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -