点击审核,出现Illegal Operation!(非法操作!)

huige728 2013-10-10 05:03:45
代码如下,主要是在审核这块有问题,要是大家还看出什么问题,提提意见
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../Data/conn.asp"-->
<!--#include file="../Include/function.asp"-->
<%
response.charset="utf-8"
if session("Admin")="" then
call ShowMsg("非法登录","login.asp")
end if


dim rs,sql
set rs=server.CreateObject("adodb.recordset")
sql="select * from fawen order by fatime desc"
rs.open sql,conn,1,1

'删除模块
'判断用户是否有权限删除发文
if request.querystring("del")<>"" then
dim delid,delsql
'验证接收过来的id不是非法操作等行为
delid =CheckNum(request.querystring("del"))
'执行删除命令
delsql = "delete from fawen where id="&delid
conn.execute(delsql)
call ShowMsg("删除成功","")
end if

'审核模块
'判断用户是否有权限进行审核
if request.querystring("check")<>"" then
dim checkid,checksql,checkrs
checkid =CheckNum(request.querystring("id"))
checksql = "select * from fawen where id="&checkid
checkrs.open checksql,conn,1,3
checkrs("check")=request("check")
checkrs("checker")=session("Admin")
checkrs.update
checkrs.close
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>批示管理</title>
<link href="../css/global.css" rel="stylesheet" type="text/css" />
<link href="../css/css.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/admin_index.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("table.tableStyle tr:nth-child(odd)").addClass('odd');
$(".tableStyle").find('tr').hover(function(){
$(this).addClass('highlight');
}, function(){
$(this).removeClass('highlight');
});
//点击着色
$(".tableStyle").find("tr").click(function(){
$(this).siblings().removeClass('selected');
$(this).addClass('selected');
});
});
</script>
</head>

<body>
<div class="iframeBody">
<div class="title"><h2>批示管理</h2></div>
<div id="scrollContent" style="overflow-x:hidden;">
<%
'分页模块
dim i,page
rs.pagesize=5
allpage=rs.pagecount
allcount=rs.recordcount
page=request.QueryString("page")
if allpage=0 then
response.write "No Information"
else
if page="" then page=1
if isnumeric(page) then
if clng(page)<1 then page=1
if clng(page)>allpage then page=allpage
else
page=1
end if
if not rs.eof then
rs.absolutepage=page
end if
%>
<table class="tableStyle">
<tr>
<th class="th">ID</th>
<th class="th">发文标题</th>
<th class="th">发文人</th>
<th class="th">发布日期</th>
<th class="th" colspan="3">管理</th>
</tr>
<%
for i=1 to rs.PageSize
if rs.EOF or rs.BOF then exit for

%>
<tr>
<td><% =rs("id")%></td>
<td><% =rs("title")%></td>
<td><% =rs("sender")%></td>
<td><% =rs("fatime")%></td>
<td><%if rs("check")=true then%>
已审核
<% End If %>
<%if rs("check")=false then%>
<a href="index.asp?check=true&id=<%=rs("id")%> onClick='return confirm("确定审核吗?")">请审核</a>
<% End If %>
</td>
<td><%if rs("check")=true then%>
修改
<% Else %>
<a href="update.asp?id=<%=rs("id")%>">修改</a>
<% End If %>
</td>

<td><a href="index.asp?del=<%=rs("id")%>&p=<%=page%>">删除</a></td>

</tr>
<%
rs.movenext
next
%>
<tr>
<td colspan="5">
<p style="text-align:center;text-indent:40px;">
<%if allpage > 0 then%>
当前页<%=page%>/<%=allpage%> | 每页<%=rs.pagesize%>条信息 | 共<%=allcount%>条信息 |
<%else%>
当前页0/0
<%end if%>
<a href="shou.asp?page=1>">首页</a> |
<%if page<>1 then%>
<a href="shou.asp?page=<%=page-1%>">上页</a> | <%end if%>
<%if page<>allpage then%>
<a href="shou.asp?page=<%=page+1%>">下页</a> | <%end if%>
<a href="shou.asp?page=<%=allpage%>">尾页</a> | 转到第
<select name="sel_page" onchange="javascript:location=this.options[this.selectedIndex].value;">
<%
for i = 1 to allpage
if i = page then%>
<option value="shou.asp?page=<%=i%>" selected><%=i%></option>
<%else%>
<option value="shou.asp?page=<%=i%>"><%=i%></option>
<%
end if
next
%></select>页</font>
</p>
</td>
</tr>
</table>
<%end if%>
</div>

</div>
</body>
</html>
<%
call close_rs
call close_conn
%>
...全文
425 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
huige728 2013-10-11
  • 打赏
  • 举报
回复
有知道的吗???

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧