📄 admin_search.asp
字号:
<!--#include file="conn.asp"-->
<!-- #include file="check.asp" -->
<%'===================================================================
'= Copyright (c) 2005,马克斯(QQ448265)开发 =
'= All rights reserved. =
'=------------------------------------------------------------------=
'= 文件名称:admin_search.asp =
'= 摘 要:后台—数据检索 =
'=------------------------------------------------------------------=
'= 用 途:免费电影系统 =
'= 最后更新:2007-07-1 =
'====================================================================%><%
keyword=replace(trim(request("keyword")),"'","''")
key=trim(request("key"))
key=replace(key,",","")
%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>后台管理中心</title>
<LINK href="admin.css" type=text/css rel=stylesheet>
</head>
<BODY>
<script language="JavaScript">
<!--//
function Juge(myform)
{
if (myform.keyword.value == "")
{
alert("请输入要查询的关键字!");
myform.keyword.focus();
return (false);
}
}
d=escape(document.URL);
function CheckOthers(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
// if (e.name != 'chkall')
if (e.checked==false)
{
e.checked = true;// form.chkall.checked;
}
else
{
e.checked = false;
}
}
}
//-->
</script>
<%if keyword="" then%>
<p align='center'><br><br>Sorry, 请 输 入 您 要 找 查 的 关 键 字<br><br><a href=""javascript:history.go(-1)"">点 此 返 回</a><br><br></p><%else%>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder">
<tr>
<th colspan="7">数据管理</th></tr>
<tr><form method=get name="myform" action="admin_search.asp" onSubmit="return Juge(this)">
<td class=forumrow height="22" colspan="7">
查询: <input align="absmiddle" name="keyword" type="text" id="keyword" size="30"> 查询类别:
<select size="1" name="key"><option value="0">所有分类</option><%set rs=server.createobject("adodb.recordset")
sql="SELECT zt_typeid,zt_typename FROM zt_type order by zt_typeid"
rs.Open sql,conn,1,1
do while not rs.eof%><option value="<%=rs("zt_typeid")%>"><%=rs("zt_typename")%></option><%
rs.movenext
loop
rs.Close
set rs=nothing
%></select>
<input type="submit" name="Submit" align="absmiddle" value="查 询..." class=button> <select size="1" name="key" onchange=javascript:window.location.href=this.options[this.selectedIndex].value><option value="">查看分类</option><%set rs=server.createobject("adodb.recordset")
sql="SELECT zt_typeid,zt_typename FROM zt_type order by zt_typeid"
rs.Open sql,conn,1,1
do while not rs.eof%><option value="admin_list.asp?zt_typeid=<%=rs("zt_typeid")%>"><%=rs("zt_typename")%></option><%
rs.movenext
loop
rs.Close
set rs=nothing
%></select> 【<a href=# onclick="javascript:self.location.reload()">刷新本页</a>】
</td></tr></form>
</table>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1">
<tr>
<td colspan=8>关键字搜索(关键字:<span style="color: #990033;"><%=keyword%></span>)
<hr size="1" noshade color="#000000;"></td>
</tr><tr>
<th width="70%">标题 </th><th nowrap>来源</th><th nowrap>HTML选项</th><th nowrap>数据类别</th><th nowrap>设定推荐级别</th><th nowrap>修改数据</th><th nowrap>删除</th><th nowrap>整理时间</th></tr><form method="post" name="make_del" action="">
<%
if key=0 then
usql=" where ZT_name Like '%"& keyword &"%' order by ZT_Id desc"
else
usql=" where ZT_name Like '%"& keyword &"%' and zt_type="&key&" order by ZT_Id desc"
end if
page = CInt(request.querystring("page"))
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select zt_id,zt_name,zt_type,zt_pic,zt_date,zt_tj,zt_dy from zt_data"&usql
'response.write sql
'response.end
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'><br><br>Sorry, 未 找 到 你 想 要 的 记 录<br><br><a href=""javascript:history.go(-1)"">点 此 返 回</a><br><br></p>"
else
rs.pagesize = "30"
if page = "" or page < "1" then
page = "1"
end if
if rs.pagecount > "0" then
rs.absolutepage = page
end if
do while not rs.eof
i=i+1
if i > rs.pagesize then
exit do
end if
zt_typeid=rs("zt_type")
zt_id=rs("zt_id")
%>
<tr><input type="hidden" name="zt_en" value="<%=get_classenname(zt_typeid)%>" />
<td class=forumrow><input type="checkbox" name="zt_id" value="<%=zt_id%>" id="<%=zt_id%>" /><label for="<%=zt_id%>"><%=zt_id%>.<%=rs("zt_name")%></label> <%if rs("zt_pic")<>"" then response.write"<font color=#ff0000>[图]</font>"%> <%if rs("zt_tj")=1 then response.write"<font color=#ff0000>[推荐1]</font>"%> <%if rs("zt_tj")=2 then response.write"<font color=#ff0000>[推荐2]</font>"%></td>
<td class=forumrow align="center" nowrap><%=rs("zt_dy")%></td>
<td class=forumrow align="center" nowrap><a href="make_view_play.asp?zt_id=<%=zt_id%>">生成</a></td>
<td class=forumrow align="center" nowrap><A HREF="?zt_typeid=<%=zt_typeid%>"><%=get_classname(zt_typeid)%></A></td>
<td class=forumrow align="center"><%if rs("zt_tj")=1 or rs("zt_tj")=2 then response.write"<a href=admin_p.asp?action=notj&zt_id="&zt_id&"><FONT COLOR=#990000>取消</FONT></a>" else response.write"<a href=admin_p.asp?action=tj&zt_id="&zt_id&">推荐1</a> <a href=admin_p.asp?action=tj2&zt_id="&zt_id&">推荐2</a>" end if%></td>
<td class=forumrow align="center"><a href=admin_p.asp?action=edit&zt_id=<%=zt_id%>>编 辑</a></td>
<td class=forumrow align="center"><a href=admin_p.asp?action=delete&zt_id=<%=zt_id%>&zt_en=<%=get_classenname(zt_typeid)%> onclick="return confirm('确定要删除吗?');">删除</a></td>
<td class=forumrow align="center" nowrap><%if cstr(formatdatetime(rs("zt_date"),2))=cstr(date()) then response.write"<FONT COLOR=""#FF0000"">"&rs("zt_date")&"</FONT>" else response.write""&rs("zt_date")%></td></tr>
<%
if i>=rs.pagesize then exit do
rs.movenext
loop
end if
keyword=server.urlencode(keyword)%><TR>
<TD class=forumrow colspan=8><input type="button" value="全/反选" onClick="CheckOthers(this.form)" /> <input type="submit" name="submit" value="批量删除" onclick="document.make_del.action='admin_p.asp?action=delall';" /> <input type="submit" name="make" value="批量生成内容页" onclick="document.make_del.action='make_view.asp?action=view_c';" /><%If maxz_18="1" Then %> <input type="submit" name="make" value="批量生成播放页" onclick="document.make_del.action='make_play.asp?action=play_c';" /><%End If %></TD>
</TR></table>
<table border="0" width="100%" height="25" cellspacing="0" cellpadding="0" class="tableBorder">
<tr>
<td width="15%" nowrap> 页次:<b><%=page%></b>/<b><%=rs.pagecount%></b> 每页<b><%=rs.pagesize%></b> 总找到数据<b><font color=#ff0000><%=rs.recordcount%></font></b>条</td>
<td width="65%" nowrap><p align="center"><%if page = "1" then%>首页 上一页<%else%> <a href="admin_list.asp" title="首页">首页</a> <a href="?keyword=<%=keyword%>&key=<%=key%>&page=<%=page-1%>" title="上一页">上一页</a><%end if%> <%if rs.pagecount-page < 1 then%>下一页 尾页<%else%><a href="?keyword=<%=keyword%>&key=<%=key%>&page=<%=page+1%>" title="下一页">下一页</a> <a href="?keyword=<%=keyword%>&key=<%=key%>&page=<%=rs.pagecount%>" title="尾页">尾页</a><%end if%></p></td><td width="18%" nowrap><table cellpadding="0" cellspacing="0"><form onsubmit="window.location=this.KKK2.options[this.KKK2.selectedIndex].value; return false;"><tr><td nowrap>跳到 <select name="select" onchange="javascript:window.location.href=this.options[this.selectedIndex].value" style="FONT-SIZE: 9pt"><%for go=1 to Rs.pagecount%><option value=?keyword=<%=keyword%>&key=<%=key%>&page=<%=go%>>第<%=go%>页</option><%next%></select></td></td></tr></form></table></td></tr></table><TABLE>
<%end if%>
<%
call admin_footer()
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -