我想加个审核功能,但总是出错,请大家看看错在那里?

cchendong cchendong 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
提交后显现“HTTP 500 - 内部服务器错误”,如果不2ssh.asp中不定义IP的条件就会把所有的记录都审核通过,加上IP条后又出错,大家救救我呀,我是菜鸟啊,现在都急死了。
我把代码贴在下面,请大家帮忙分析一下。
<table width="100%" border="1" cellpadding="1" cellspacing="1">
<tr>
<th width="6%" scope="col">序号</th>
<th width="37%" scope="col">品牌车型</th>
<th width="11%" scope="col">行驶路程</th>
<th width="11%" scope="col">出售价</th>
<th width="15%" scope="col">发布时间</th>
<th width="6%" scope="col">详情</th>
<th width="7%" scope="col">审核</th>
</tr>

<%
dim exec,conn
set conn=server.createobject("adodb.connection")
conn.open "driver={SQL Server};server=127.0.0.1;UID=useruser1982;PWd=user19821982;Database=comcq"
set rs = server.createobject("adodb.recordset")
rs.Open "SELECT * FROM escar where re=0 order by id desc", conn,1,1
if rs.eof then
response.write"<tr><td bgcolor=#eeeeee><font color=red size=+1>对不起,暂无记录</font></td></tr>"
else
pages = request.querystring("pages")

if pages = "" then
pages = 1
end if
if pages <> "" and cint(pages) < 1 then
pages = 1
end if
pagesize = 20
rs.PageSize = pagesize
rs.CacheSize = pagesize
pagecount = rs.PageCount
if cint(pages) > pagecount then
pages = pagecount
end if
rs.AbsolutePage = pages
dim i
i=(pages-1)*pagesize
while not rs.eof and i < pagesize+(pages-1)*pagesize
i=i + 1
%>
<form name="form1" method="post" action="2ssh.asp">
<tr>
<td scope="col"><div align="center">
<input name="esid" type="text" style="border:0" value="<%=rs("id")%>" size="6"

maxlength="6" readonly="true">
</div></td>
<td scope="col"><div align="center"><a href=2scarshow.asp?id=<%=rs("id")%>

target="_blank"><%=rs("t1")%></a></div></td>
<td scope="col"><div align="center"><% if rs("t3")<>"" then %><%=rs("t3")%><% else

response.write"此项未填" end if%></div></td>
<td scope="col"><div align="center"><% if rs("t7")<>"" then %><%=rs("t7")%><% else

response.write"此项未填" end if%></div></td>
<td scope="col"><div align="center"><% if rs("sj")<>"" then %><%=rs("sj")%><% else

response.write"此项未填" end if%></div></td>
<td scope="col"><div align="center"><a href=2scarshow.asp?id=<%=rs("id")%>

target="_blank">详情</a></div></td>
<td scope="col"><div align="center">
<input name="key1" type="checkbox" style="border:0" value=1<%if key1=1 then%>

checked<%end if%>>审核</div></td>
<td scope="col"><div align="center"><a href=2sdel.asp?id=<%=rs("id")%>

target="_blank">删除</a></div></td>
</tr>
<%
rs.movenext
wend
response.Write("<table><tr><td align=center>")
if (pages-1)*pagesize<>0 then
response.write "<a href=2scar.asp?pages="&pages-1&"><</a> "
end if

for iiii=1 to pagecount

response.write "<a href=2scar.asp?pages="&iiii&">"&iiii&"</a> "
next
%>
</table>
<input type="submit" name="Submit" value=" 提 交 ">
</form>

<%
if rs.RecordCount>(pages)*pagesize then
response.write " <a href=2scar.asp?pages="&pages+1&">></a>"
end if
response.Write("</td></tr></table>")
end if
%>
</table>
<%rs.close
set rs=nothing%>





2ssh.asp中的代码如下:
<%
dim cn,rs
dim ree,id
set cn = server.createobject("adodb.connection")
set rs = server.createobject("adodb.recordset")
cn.open "driver={SQL Server};server=127.0.0.1;UID=useruser1982;PWd=user19821982;Database=comcq"
ree = request.form("key1")
id = request.form("esid")
rs.Open "update escar set re=1 where re='" & ree & "'-1 and id='" & id & "'", cn
%>
...全文

相关推荐

评论 4
收藏 已收藏
分享
返回顶部
cchendong
ASP 28,401 成员 356,940 内容