📄 delete_all.asp
字号:
<%if session("password")<>"" then%>
<!--#include file="conn.asp" -->
<script language="JavaScript">
function test(){
if (document.form2.page.value=="" || isNaN(document.form2.page.value)) {
alert("输入页数必须为数值型");
document.form2.page.focus();
return false;
}
return true;
}
</script>
<script>
function del() //用于判断记录有没有选中的函数
{
var flag=true;
var temp="";
var tmp;
if((document.form1.answer.length+"")=="undefined") {tmp=1}else{tmp=document.form1.answer.length}
if (tmp==1){
if (document.form1.answer.checked){
flag=false;
temp=document.form1.answer.value
}}else
{
for (i=0;i<document.form1.answer.length;i++) {
if (document.form1.answer[i].checked){
if (temp=="")
{
flag=false;
temp=document.form1.answer[i].value
}
else
{flag=false;
temp = temp +","+ document.form1.answer[i].value
}}}}
if (flag){ alert("对不起,你还没有选择!")}
else
{name=document.form1.name.value
if (confirm("确定要批量删除?")){ window.location="delnews_all.asp?id=" + temp;}}
return !flag;
}
</script>
<script language=Javascript>
function checkall(all)//用于判断全选记录的函数
{
var a = document.getElementsByName("answer");
for (var i=0; i<a.length; i++) a[i].checked = all.checked;
}
</script>
<link href="25175_1.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
margin-top: 0px;
}
-->
</style><table width="768" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="754" valign="top" bgcolor="#A0A4AC" style="line-height:140%;"> 网站名称:<font color="#0000FF"><a href="http://www.25175.com">SP.25175</a></font><br>
网站LOGO:<a href="http://www.25175.com/logo1.GIF">http://www.25175.com/logo1.GIF</a><br>
演示地址:<font color="#0000FF"><a href="http://www.25175.com/asp/test_20050825_v161/">http://www.25175.com/asp/test_20050825_v161/</a><br>
</font>下载地址:<font color="#0000FF"><a href="http://www.25175.com/asp/test_20050825_v161/test_20050825_v161.rar">http://www.25175.com/asp/test_20050825_v161/test_20050825_v161.rar</a><br>
</font> 在线聊天:<a href="http://wpa.qq.com/msgrd?V=1&Uin=29752345&Site=www.25175.com&Menu=yes">29752345</a></td>
</tr>
</table>
<table width="768" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="1"><div align="center"></div></td>
</tr>
</table>
<table width="768" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="25" bgcolor="#A0A4AC"><a href="index.asp">首页</a> <a href="add.asp">添加试题</a> <a href="delete_all.asp">删除试题</a> <a href="SEARCH.ASP">列出试题答案</a> <a href="change_password.asp">修改密码</a> <a href="login.asp">登入</a> <a href="20050130_logout.asp">退出</a></td>
</tr>
</table>
<%
sql="select * from test order by id desc"
rs.open sql,conn,1,3
page = CLng(request("page")) '利用CLng函数把page值转换为Long型
judge=request("judge")
judge2=request("judge2")
judge3=0
%>
<title>www.25175.com 在线考试系统v1.61</title>
<link href="css.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
if not (rs.EOF or rs.BOF) then
rs.MoveFirst
rs.PageSize =20 '每页显示的条数
If page < 1 Then page = 1
If page > rs.PageCount Then page = rs.PageCount
rs.AbsolutePage = page
For ipage = 1 To rs.PageSize
%>
<table width="768" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<form method="POST" id=form1 name=form1>
<table width="768" border="0" align="center" cellpadding="0" cellspacing="1">
<tr bgcolor="#A0A4AC">
<td width="30" height="25"><%=rs("id")%></td>
<td width="700"><%=rs("question")%></td>
<td>
<div align="center">
<input type="checkbox" name="answer" value="<%=rs("id")%>" id="Checkbox1">
</div></td>
</tr>
<%
rs.MoveNext
If rs.EOF Then Exit For
Next
%>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="30" valign="top">
<div align="right">
<table width="768" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="1" bgcolor="#A0A4AC"><div align="center"></div></td>
</tr>
</table>
<table width="768" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="3"><div align="center"></div></td>
</tr>
</table>
<input type="checkbox" name="chkall" value="on" onClick="checkall(this)" id="Checkbox2">选中所有的显示信息
<input type="button" name="btnDelete" value="删除" onClick="del()" id="Button1">
</div></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<table width="768" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="25" bgcolor="#A0A4AC">
<form onSubmit="return test();" method="get" action="delete_all.asp" id=form2 name=form2>
页数:<%Response.Write "<input type=text size=2 maxlength=4 name=page class=editbox1><input type=hidden name=judge value=1>" '显示输入页数框并将page,judge参数传递下去%>
<% If page = 1 Then
Response.Write "第一页 上一页 "
End If
If page <> 1 Then
Response.Write "<a href=delete_all.asp?page=1>第一页</a> "
'Response.Write "<a href=delete_all.asp?page="&(page-1)&">上一页</a> "
Response.Write "<a href=delete_all.asp?page="&(page-9)&">前十页</a> "
End If
If page <> RS.PageCount Then
Response.Write "<a href=delete_all.asp?page="&(page)&">"&(page)&"</a> "
Response.Write "<a href=delete_all.asp?page="&(page+1)&">"&(page+1)&"</a> "
Response.Write "<a href=delete_all.asp?page="&(page+2)&">"&(page+2)&"</a> "
Response.Write "<a href=delete_all.asp?page="&(page+3)&">"&(page+3)&"</a> "
Response.Write "<a href=delete_all.asp?page="&(page+4)&">"&(page+4)&"</a> "
Response.Write "<a href=delete_all.asp?page="&(page+5)&">"&(page+5)&"</a> "
Response.Write "<a href=delete_all.asp?page="&(page+6)&">"&(page+6)&"</a> "
Response.Write "<a href=delete_all.asp?page="&(page+7)&">"&(page+7)&"</a> "
Response.Write "<a href=delete_all.asp?page="&(page+8)&">"&(page+8)&"</a> "
Response.Write "<a href=delete_all.asp?page="&(page+9)&">"&(page+9)&"</a> "
Response.Write "<a href=delete_all.asp?page="&(page+10)&">后十页</a> "
Response.Write "<a href=delete_all.asp?page="&RS.PageCount&">最后一页</a> "
End If
If page = RS.PageCount Then
Response.Write "下一页 最后一页"
End If
%>
</form> </td>
</tr>
<tr>
<td height="25">记录总数:<%=rs.recordCount%> 总页数:<%=rs.PageCount%> 当前页次:<%=page%> </td>
</tr>
</table>
<table width="768" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><%else%></td>
<td><table border="0" align=center cellpadding="0" cellspacing="0" >
<td >对不起,还没有记录!</td>
</table></td>
<td><%end if%></td>
</tr>
</table>
<%
else
Response.Redirect "20050130_loginagine.asp"
end if
%>
<table width="768" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="20" bgcolor="#A0A4AC"><div align="center" class="style1">
<div align="center"><a href="http://www.25175.com">powered by 25175</a></div>
</div></td>
</tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -