📄 admin_booksearch.asp
字号:
<!-- #include file="../conn.asp" -->
<!-- #include file="session.asp" -->
<!--#include file="../inc/config.asp"--><%
key_keyword=CheckSql(request("key_keyword"))
key_type=CheckSql(request("key_type"))
if key_keyword="" then
response.write "<script language=javascript>alert('查询内容不能为空!');history.back(-1);</script>"
response.end
end if
If key_type="none" Then
Response.Write ("<script>alert(' 操作错误! \n\n 请选择您需要的搜索类型!~ ');history.back();</script>")
response.end
end if
If Request("page")<>"" then
CurrentPage=Cint(Request("Page"))
Else
CurrentPage=1
End if%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css.css" rel="stylesheet" type="text/css">
<script language="javaScript" src="../js/js.js"></script>
<title><%=Sitename%> - 搜索管理模块 - Powered By CnEnd Novelsmanagement</title>
</head>
<body>
<div id="topmomo">
<a href="admin_book.asp?info=booklist&cndb=vip">查看长篇VIP</a> |
<a href="admin_book.asp?info=bookadd">添加长篇作品</a> |
<a href="admin_book.asp?info=booklist&cndb=all">长篇作品列表</a> |
<a href="admin_Article.asp?info=add">添加短篇文章</a> |
<a href="admin_Article.asp?info=list&cndb=all">短篇文章列表</a></div>
<table border="0" width="100%" align="center" cellpadding="0" cellspacing="0" align="right">
<tr>
<form action="admin_booksearch.asp" method="get">
<td height="25" align="right" class="font"> 关键字:
<input maxlength="30" name="key_keyword" size="10" class="checklist" class="form">
<select size="1" name="key_type" class="checklist" class="form">
<option value="list_name">作品名称</option>
<option value="list_user">作者名称</option>
<option value="key">作品主角</option>
</select>
<input type="submit" value="搜 索" name="submit" class="button">
</td>
</form>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tborder">
<tr height="25">
<td align="center" class="thead">作 品 搜 索</td>
</tr>
<tr align="center" height="25">
<td align="left" class="tcat"> 搜 索 结 果</b>
<font color="#FFE1FF">您搜索的关键字为:<%=key_keyword%></font></td>
</tr>
<%if key_type="list_key" or key_type="list_name" or key_type="list_user" then
set rssh=server.CreateObject("ADODB.recordset")
If key_type="list_key" Then
sqlsh="select id,list_name,list_pic,list_user,list_tai,newviewname,list_all from list_book where list_key like '%"&key_keyword&"%' ORDER BY ID desc"
ElseIf key_type="list_name" Then
sqlsh="select id,list_name,list_pic,list_user,list_tai,newviewname,list_all from list_book where list_name like '%"&key_keyword&"%' ORDER BY ID desc"
ElseIf key_type="list_user" Then
sqlsh="select id,list_name,list_pic,list_user,list_tai,newviewname,list_all from list_book where list_user = '"&key_keyword&"' ORDER BY ID desc"
else
response.write "<tr align=center><td colspan=9 height=22 class=alt1><font color=red>没有相关内容</font></td></tr>"
end if
'MySQL需要如下语句
conn.CursorLocation=3
rssh.open sqlsh,conn,1,1
if rssh.eof and rssh.bof then
response.write "<tr align=center><td colspan=9 height=22 class=alt1><font color=red>没有相关内容</font></td></tr>"
else
response.write "<form name=form method=get action=admin_booklist.asp>"
Rssh.PageSize=MaxBookPerPage
Allpage=Rssh.PageCount
If Currentpage>Allpage Then Currentpage=1
Num=Rssh.RecordCount
Rssh.MoveFirst
Rssh.AbsolutePage=CurrentPage
i=0
do while not rssh.eof
%>
<tr align="center">
<td valign="middle" class="alt2">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tborder">
<tr>
<!--************* 图片 *********************-->
<td class="alt2" style="PADDING-TOP: 10px" align="middle" width="17%">
<table cellspacing="0" cellpadding="0" border="0">
<tr valign="top">
<td>
<a title="<%=rssh("list_name")%>" href="admin_book.asp?info=zhanglist&b_id=<%=rssh("id")%>">
<img class="img1" height="95" src="<%=rssh("list_pic")%>" width="70" border="0"></a></td>
<td width="4" bgcolor="#b4b6b5">
<img height="4" src="images/dian02.gif" width="4"></td>
</tr>
<tr>
<td bgcolor="#b4b6b5" colspan="2">
<img height="5" src="images/dian03.gif" width="4"></td>
</tr>
</table>
<br>
</td>
<!--************* 文字 *********************-->
<td class="alt1" width="83%" valign="top" style="PADDING-LEFT: 3px">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tborder">
<tr height="30">
<td width="33%" class="alt1"><input type="checkbox" name="checked" value="<%=rssh("id")%>" class="form">
<a title="点击查看分卷" href="admin_book.asp?info=zhanglist&b_id=<%=rssh("id")%>"><strong><%=rssh("list_name")%></strong></a></td>
<td width="42%" class="alt2">作者:<%=rssh("list_user")%></td>
<td width="25%" class="alt1">
<a href="admin_book.asp?urltype=search&info=bookedit&id=<%=rssh("id")%>&key_type=<%=key_type%>&key_keyword=<%=key_keyword%>&page=<%=CurrentPage%>">
修改</a>
<a href="admin_booklist.asp?info=采集&checked=<%=rssh("id")%>">
采集</a>
<a href="admin_works.asp?urltype=search&info=book_del&id=<%=rssh("id")%>&key_type=<%=key_type%>&key_keyword=<%=key_keyword%>&page=<%=CurrentPage%>">
删除</a></td>
</tr>
<tr height="30">
<td class="alt1">作品状态: <%if rssh("list_tai")="1" then response.write("转载中...") end if%>
<%if rssh("list_tai")="2" then response.write("连载中...") end if%>
<%if rssh("list_tai")="3" then response.write("出版中...") end if%>
<%if rssh("list_tai")="4" then response.write("已暂停...") end if%>
<%if rssh("list_tai")="5" then response.write("已停止...") end if%>
<%if rssh("list_tai")="6" then response.write("已完成...") end if%></td>
<td class="alt2">最新章节:<%if rssh("newviewname")<>"" then
response.write rssh("newviewname")
else response.write "暂无更新"
end if%></td>
<td class="alt1">
<a title="<%=rssh("list_name")%>" href="admin_book.asp?info=zhanglist&b_id=<%=rssh("id")%>">
添加章节</a>
<a title="点击将未归入分卷的章节归卷" href="admin_book.asp?info=viewgocook&id=<%=rssh("id")%>">
移动章节</a></td>
</tr>
<tr>
<td height="30" colspan="4" class="alt1"><%=left(rssh("list_all"),100)%>...</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<%i=i+1
If i>=MaxBookPerPage Then Exit Do
Rssh.MoveNext
Loop
%>
<tr>
<td height="25" align="center" colspan="9" class="alt3">
<input type="hidden" name="urltype" value="search">
<input type="hidden" name="key_type" value="<%=key_type%>">
<input type="hidden" name="key_keyword" value="<%=key_keyword%>">
<input type="hidden" name="Page" value="<%=CurrentPage%>">
<input class="button" type="button" onclick="CheckAll(this.form)" value="全选" name="chkall" style="width: 45; height: 20">
<input class="button" type="button" onclick="CheckOthers(this.form)" value="反选" name="chkOthers" style="width: 45; height: 20">
<input class="button" type="submit" value="删除" name="info" style="width: 45; height: 20">
<input class="button" type="submit" value="推荐" name="info" style="width: 45; height: 20">
<input class="button" type="submit" value="移动" name="info" style="width: 45; height: 20">
<input class="button" type="submit" value="采集" name="info" style="width: 45; height: 20">
<input class="button" type="submit" value="审核" name="info" style="width: 45; height: 20">
<input class="button" type="submit" value="静态生成" name="info" style="width: 70; height: 20">
<input class="button" type="submit" value="通过 VIP" name="info" style="width: 70; height: 20">
<input class="button" type="submit" value="生成全文TXT" name="info" style="width: 80; height: 20">
</td>
</tr>
</form>
<%End If
Rssh.Close
Set Rssh=Nothing
elseif key_type="list_article" or key_type="list_Arkey" then
set rs=server.createobject("adodb.recordset")
if key_type="list_article" then
sql="select Ar_id,Ar_class,Ar_name,Ar_username,Ar_userid from Article where Ar_name like '%"&key_keyword&"%' order by Ar_id desc"
elseif key_type="list_Arkey" then
sql="select Ar_id,Ar_class,Ar_name,Ar_username,Ar_userid from Article where Ar_key like '%"&key_keyword&"%' order by Ar_id desc"
else
response.write "<tr align=center><td colspan=9 height=22 class=alt1><span class=style1>暂无任何作品</span></td></tr>"
end if
'MySQL需要如下语句
conn.CursorLocation=3
rs.open sql,conn,1,1%>
<tr align="center">
<td valign="middle" class="alt2">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tborder"> <form name="form" onsubmit="javascript:return cnendb();" target="cnendb" action="admin_works.asp?info=article_list">
<tr align="center" height="22">
<td class="tcat"></td>
<td width="12%" class="tcat"><b>所属分类</b></td>
<td width="35%" class="tcat"><b>作品名称</b></td>
<td width="25%" class="tcat"><b>作 者</b></td>
<td width="12%" class="tcat"><b>审核状态</b></td>
<td width="15%" class="tcat"><b>操作</b></td>
</tr>
<%if rs.eof and rs.bof then
response.write "<tr align=center><td colspan=9 height=22 class=alt1><span class=style1>暂无任何作品</span></td></tr>"
else
Rs.PageSize=MaxArticlePerPage
Allpage=Rs.PageCount
If Currentpage>Allpage Then Currentpage=1
Num=Rs.RecordCount
Rs.MoveFirst
Rs.AbsolutePage=CurrentPage
i=0
do while not rs.eof
%>
<tr align=center height=22>
<td align=center class=alt2>
<input type=checkbox name=checked value=<%=rs("Ar_id")%>></td>
<%Ar_class=rs("Ar_class")
set rs1=server.createobject("adodb.recordset")
sql1="select classname from Ar_class where id="&Ar_class
rs1.open sql1,conn,1,1
if rs1.eof and rs1.bof then
Response.Write "<td class=alt1>已被删除</td>"
else
Response.Write "<td class=alt1><a href=admin_Article.asp?info=list&cndb=class&id="&Ar_class&">"&rs1("classname")&"</a></td>"
end if
rs1.close
set rs1=nothing
if rs("Ar_userid")=0 Then
Response.Write "<td class=alt2 align=left> "
Response.Write "<a target=_blank href=../read_Article.asp?id="&rs("Ar_id")&">"&rs("Ar_name")&"</a></td>"
Response.Write "<td class=alt1>"&rs("Ar_username")&"</td>"
else
Response.Write "<td class=alt2 align=left> "
Response.Write "<a target=_blank href=../read_userbook.asp?id="&rs("Ar_id")&">"&rs("Ar_name")&"</a></td>"
set rs2=server.createobject("adodb.recordset")
sql2="select NAME from Userinfo where ID="&rs("Ar_userid")
rs2.open sql2,conn,1,1
if rs2.eof and rs2.bof then
Response.Write "<td class=alt1>会员已被删除</td>"
else
Response.Write "<td class=alt1><a href=admin_Article.asp?info=list&cndb=user&id="&rs("Ar_userid")&">"&rs2("name")&"</a></td>"
end if
rs2.close
set rs2=nothing
end if%>
<td class=alt2>
<input class=button type=button name=lock value="<%if rs("Ar_lock")=0 then%>取消审核<%else%>通过审核<%end if%>" onclick="javascript:window.open('admin_userbookSave.asp?id=<%=rs("Ar_id")%>&page=<%=Page1%>&act=lock','_blank','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=500,height=300')" style="width: 60; height: 20"></td>
<td class="alt1">
<a title="修改" href="admin_Article.asp?urltype=search&info=edit&id=<%=rs("Ar_id")%>&key_type=<%=key_type%>&key_keyword=<%=key_keyword%>&page=<%=CurrentPage%>">
修改</a>
<a title="删除" href="admin_works.asp?urltype=search&info=article_del&key_type=<%=key_type%>&key_keyword=<%=key_keyword%>&id=<%=id%>&Ar_id=<%=rs("Ar_id")%>&userid=<%=rs("Ar_userid")%>&page=<%=CurrentPage%>" onclick="return(del('<%=rs("Ar_name")%>'))">
删除</a></td>
</tr>
<%i=i+1
If i>=MaxArticlePerPage Then Exit Do
Rs.MoveNext
Loop%>
<tr>
<td height="20" align="center" colspan="8" class="alt3">
<input type="hidden" name="info" value="article_list">
<input class="button" type="button" onclick="CheckAll(this.form)" value="全选" name="chkall" style="width: 45; height: 20">
<input class="button" type="button" onclick="CheckOthers(this.form)" value="反选" name="chkOthers" style="width: 45; height: 20">
<input class="button" type="submit" value="删除" name="docndb" style="width: 45; height: 20">
<input class="button" type="submit" value="通过审核" name="docndb" style="width: 60; height: 20">
<input class="button" type="submit" value="取消审核" name="docndb" style="width: 60; height: 20">
</td>
</tr></table>
<%End If
Rs.Close
Set Rs=Nothing
else
end if%></td>
</tr>
<tr>
<td height="24" align="center" class="alt2"><%Response.Write ShowPage("admin_booksearch.asp?key_type="&key_type&"&key_keyword="&key_keyword&"",CurrentPage,Num,MaxArticlePerPage,True,True," 个项目")%></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -