<form method="post" name="from" action="main.asp?action=删除选定记录">
<div class="frame">
<table border="0" cellpadding="5" cellspacing="1" class="table">
<tr>
<th colspan="10">==备案管理==</th>
</tr>
<%
if not(rs.bof and rs.eof) then
%>
<tr bgcolor="#E1EDFF">
<td width="6%">选择</td>
<td width="9%">FTP用户名</td>
<td width="19%">网站名称</td>
<td width="3%">网站域名</td>
<td width="9%">姓名</td>
<td width="15%">主办单位名称</td>
<td width="11%">联系QQ</td>
<td width="6%">状态</td>
<td width="15%">操作管理</td>
</tr>
<%
'进行分页处理
'---------------------------
dim page,id,PCount,TopicCount
id=Request.QueryString("page")
'如果参数页不是数值型的则后退
'-------------------------------
if not(IsNumeric(id)) then
call js("后退","")
response.end
end if
'如果参数页大于Cint的最大范围:32767则后退
'-----------------------------------------
if id>32767 then
call js("后退","")
response.end
end if
'如果参数页小于或者等于0则后退
'-------------------------------
if Cint(id)<=0 and id<>""then
call js("后退","")
response.end
end if
'如果参数页为空则设置参数页为第一页
'------------------------------------
if id="" then
page=1
else
page=Cint(id)
end if
rs.PageSize=30
rs.AbsolutePage=page
dim i
i=rs.PageSize
'如果参数页大于最大页数则后退
'--------------------------------
if Cint(id)>Cint(rs.PageCount) then
call js("后退","")
response.end
end if
'开始循环输出
'--------------------------------
do while not rs.eof and i>0
i=i-1
%>
<tr <% call admin_color() %> title="客户提交时间:<%=rs("l_Titme")%>">
<td align="center"><input type="checkbox" name="DelSelect" value="<%=rs("l_id")%>" /></td>
<td><%=rs("l_ftp")%></td>
<td><%=rs("l_WzName")%></td>
<td>
<%
'对域名进行处理,以英文分号 (;)进行分组
'-----------------------------------------
dim yuming
yuming=Split(rs("l_ym"),";")
dim ii
for ii=0 to Ubound(yuming)
response.write "<a href='http://www."&yuming(ii)&"' target='_blank'>"&yuming(ii)&"</a>"
if Ubound(yuming)<>ii then response.write ";"
next
%>
</td>
<td><%=rs("l_FuZeName")%>
</td>
<td><%=rs("l_ZhName")%></td>
<td>
<%
if rs("l_QQ")=0 then
response.write "<font color='red'>没有留下QQ号</font>"
else
%>
<img src="http://wpa.("l_QQ")%>:4"><a href="http://wpa.("l_QQ")%>" title="点击联系客户" target="_blank"><%=rs("l_QQ")%></a>
<% end if %>
</td>
<%
dim alt,img
select case rs("l_now")
case "未审核"
img="/images/icpY.gif"
alt="状态:未审核"
case "已审核"
img="/images/icpOK.gif"
alt="状态:已审核"
case "审核有误"
img="/images/icpNo.gif"
alt="状态:审核有误"
end select
%>
<%
dim shenhe1
if rs("l_now")="未审核" then
shenhe1="已审核"
else
shenhe1="未审核"
end if
%>
<% if session("lele")="乐乐" then %>
<td align="center"><a href="?action=<%=shenhe1%>&l_id=<%=rs("l_id")%>&ty=<%=ty%>"><img src="<%=img%>" alt="备案状态:<%=alt%>" width="17" height="17" border="0" /></a></td>
<% else %>
<td align="center"><img src="<%=img%>" alt="备案状态:<%=alt%>" width="17" height="17" border="0" /></td>
<% end if %>
<td width="7%">
<input type="button" name="xianxi" value="详细" onClick="javascript:location.href='xx.asp?l_id=<%=rs("l_id")%>'" />
<% if session("lele")="乐乐" then %>
<input type="button" name="DelOne" value="删除" onClick="javascript:if(confirm('确定删除此条链接吗?此操作不可恢复哟!')){location.href='?action=删除一条记录&l_id=<%=rs("l_id")%>&ty=<%=ty%>';}" />
<% else %>
<input type="button" name="DelOne" value="删除" onClick="alert('对不起,你已登录,但没有删除权限操作')" />
<% end if %>
</td>
</tr>
<%
rs.movenext
if rs.eof then exit do
loop
else
response.write "<tr><td colspan='10' align='left' class='red' bgcolor='#E1EDFF'>暂时没有"&replace(replace(request.querystring("type"),"记录",""),"搜索功能","您需要查询的")&"记录</td></tr>"
end if
%>
<%
sql="select * from biean"
if not(rs.bof and rs.eof) then
%>
<tr>
<td colspan="10" bgcolor="#E1EDFF" align="left">
<input type="checkbox" name="blogall" onClick="alert('此功能已禁用!')" />全选
<%
if session("lele")="乐乐" then
%>
<input type="submit" value="删除选定记录" onClick="javascript:if(confirm('确定要删除选定的记录吗?此操作不可恢复哟!')){return true;}else{
return false;}">
<% else %>
<input type="button" value="删除选定记录" onClick="alert('对不起,你已登录,但没有权限删除操作')">
<% end if %>
<input name="DelAll" type="button" onClick="javascript:alert('此功能已禁用!')" value="清空所有记录" />
<% end if %>
<%
'调用分页处理代码的子过程
'----------------------------------------------
dim Two
Two=""
if Two<>"" then Two="&type="&request.querystring("type")
sql="select * from beian"
if not(rs.bof and rs.eof) then
Call TurnPage(rs.RecordCount,rs.PageCount,Two,Page)
end if
rs.close
set rs=nothing
%>
</table>
</div>
</form>
这是显示数据库信息的代码。。
sql部份
<%
dim rs,sql
select case request.querystring("type")
case "以个人备案记录"
sql="select * from beian where l_Class='个人' order by l_id desc"
case "以公司备案记录"
sql="select * from beian where l_Class='公司' order by l_id desc"
case "今天新提交"
sql="select * from beian where year(l_Titme)&month(l_Titme)&day(l_Titme)="&year(now())&month(now())&day(now())&" order by l_id desc"
case "已审核"
sql="select * from beian where l_now='已审核' order by l_id desc"
case "未审核"
sql="select * from beian where l_now='未审核' order by l_id desc"
case "审核有误"
sql="select * from beian where l_now='审核有误' order by l_id desc"
case "搜索功能"
dim letgo
letgo=server.HTMLEncode(trim(request.form("letgo")))
sql="select * from beian where l_ftp like '%"&letgo&"%' or l_ym like '%"&letgo&"%' or l_ZhName like '%"&letgo&"%'"
sql=sql&" or l_QQ like '%"&letgo&"%' order by l_id desc"
case else
sql="select * from beian order by l_id desc"
end select
set rs=server.createobject("adodb.recordset")
rs.open sql,lele,1,1
%>