⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gx_gl.asp

📁 ASPyuandaima希望能帮上大家的忙.一起学习JAVA吧
💻 ASP
字号:
<!--#include file="conn.asp"-->
<html>
<head>
<title>信息管理</title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<%if session("gxjb")<>"admin" then  response.redirect "gx_dl.asp"%>
<!--#include file="gx_wjt.asp"-->
<%page =int(Request.QueryString("page"))
id=request.querystring("id")
cz=request.querystring("cz")
if id<>"" and cz="sc" then
	exec="delete from gx where id in ("+id+")"
	conn.execute exec
	conn.close
	response.redirect "gx_gl.asp?page="+cstr(page)
end if

set rs=server.createobject("adodb.recordset")
if session("gxjb")="admin" then
	exec="select * from gx order by id desc"
	rs.open exec,conn,1,1
	rs.PageSize =30
	If page < 1 Then   page = 1
	If page > rs.PageCount Then    page = rs.PageCount
	if not  rs.eof then  rs.AbsolutePage =page%>
<table width="778" border="0" cellpadding="1" cellspacing="1" align="center">
	<tr height="25" bgcolor="#CCD8E6">
		<Td align="center" width="10%">序号</Td>
		<td align="center">信息</td>
		<td align="center">联系方式</td>
		<td align="center">发布方式</td>
		<td align="center">类别</td>
	</tr>
	<%For i = 1 To rs.PageSize
	If rs.EOF Then	 Exit For
	xx=rs("xx")
	if len(xx)>50 then xx=left(xx,50)+"..."
	lxfs=xszh(rs("lxfs"))
	if len(lxfs)>50 then lxfs=left(lxfs,50)+"..."%>
	<tr height="25" bgcolor="#E3E9F1">
		<td align="center">
		<input type="checkbox" name="fid" value="<%=rs("id")%>">
		<%=rs.pagesize*(page-1)+cstr(i)%></td>
		<td align="center"><textarea cols="45" rows="2"><%=xx%></textarea></td>
		<td align="center"><a href=# title="<%=rs("lxfs")%>"><%=lxfs%></a></td>
		<td align="center"><%=rs("zt")%></td>
		<td align="center"><%=rs("lb")%></td>
	</tr>
	<%rs.movenext
next%>
</table>
<center>
共<font color="#FF0000"><%=rs.recordcount%></font>条信息 
&nbsp;&nbsp;
<input type="checkbox" name="qx" onClick="javascript:selectall();">全选
&nbsp;&nbsp;
<a href=# onClick="javascript:if(confirm('确定批量删除吗?')) window.location='gx_gl.asp?cz=sc&page=<%=cstr(page)%>&id='+pltj();"><font color="#FF0000">批&nbsp;量&nbsp;删&nbsp;除</font></a>
第<%for i=1 to rs.PageCount%>
<a href="gx_gl.asp?lx=<%=lx%>&page=<%=i%>">
<%if i=page then
	response.write i
else
	response.write  "["+cstr(i)+"]"
end if%>
</a>
<%next%>
页</center>
<%end if
rs.close
conn.close
set conn=nothing%>
</body>
</html>
<script language="javascript">
var dd="";
function pltj()
{ 
    var list="";
	for(var i=0;i<document.all.length;i++){ 
		if (document.all[i].type=="checkbox"&&document.all[i].name!="qx"){
			if (document.all[i].checked && i<document.all.length){
				list += document.all[i].value + ",";
			}
		}
	}
	return list;
}
function selectall()
{
	if (dd==""){
		for(var i=0;i<document.all.length;i++){
			if (document.all[i].type=="checkbox")
				document.all[i].checked = true;
		}
		dd="1";
	}
	else{
		for(var i=0;i<document.all.length;i++){ 
			if (document.all[i].type=="checkbox")
				document.all[i].checked = false;
		}
		dd="";
	}
}
function gn(i)
{
	if(document.all("tb"+i).style.display=="none")
		document.all("tb"+i).style.display="block";
	else
		document.all("tb"+i).style.display="none";
}
</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -