<!--#include file="mdb.asp"-->
<!--#include file="aq.asp"-->
<%
if session("adminlogin")<>sessionvar then
Response.Write("<script language=javascript>alert('新13名站导航提示：你尚未登录，或者超时了！请重新登录');this.location.href='index.asp';</script>")
Response.End
End if
%>
<%
dim Range,keyword,pn
Range=request("Range")
keyword=request("keyword")
pn=request("pn")
Rootpage =""
%>
<%
if request.QueryString("act")="del" then
conn.execute "delete from news where newsid in ("&request("selectdel")&")"
response.Redirect  "editnews.asp"
end if %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>搜索新闻</title>
<LINK REL="stylesheet" HREF="css.css" TYPE="text/css">
</head>
<body>
<table width="80%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#990000">
<tr>
<td valign="top" bgcolor="#FFFFFF">
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#999999">
<tr>
<td align="left" bgcolor="#999999"><strong><font color="#FFFFFF">搜索结果</font></strong></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#990000">
<tr>
<td height="18" bgcolor="#FFFFFF">你输入的关键字是：[ <font color=#FF0000><%=keyword%></font> ]</td>
</tr>
</table>

<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#990000">
<form name="form1" method="post" action="editnews.asp?action=del">
<%
if Range="News" then
Rootpage = "newsinfo"
sql="select * from news where newsname like '%"&keyword&"%'"
end if

if pn="" then pn=1
set r=server.createobject("adodb.recordset")
r.open sql,conn,1,3
if  r.eof or r.bof then
response.write "<tr><td height=25 align=middle colspan=4 bgcolor=#FFFFFF>新13名站导航提示：在本站没有找到有关 <B>"&keyword&"</B> 记录的内容！</td></tr>"

response.end
end if
r.pagesize=20
r.absolutepage=pn
rowcount=r.pagesize
do while not r.eof and not r.bof and rowcount>0
set rr=server.createobject("adodb.recordset")

response.write "<tr><td bgcolor=#FFFFFF width=100 align=center>"&r("newsid")&"</td>"
response.write "<td bgcolor=#FFFFFF align=left><a href=../"&Rootpage&".asp?id="&r("newsid")&" target=_blank>"&r("newsname")&"</A></td>"
response.write "<td bgcolor=#FFFFFF width=100 align=center><a href=newsedit.asp?id="&r("newsid")&">【编 辑】</A></td>"
response.write "<td bgcolor=#FFFFFF width=100 align=center><input name=selectdel type=checkbox id=selectdel value="&r("newsid")&"></td></tr>"
rr.close                   
set rr=nothing
rowcount=rowcount-1
r.movenext
loop
%>
<tr> 
<td height="30" colspan="4" bgcolor="#FFFFFF" align="center"><input type="submit" name="Submit" value="新13名站导航提示：删除所选新闻">
全选 <input type="checkbox" name="checkbox" value="Check All" onClick="mm()"></td>
</tr>
</form>
</table>

<script language=javascript>
function mm()
{
   var a = document.getElementsByTagName("input");
   if(a[0].checked==true){
   for (var i=0; i<a.length; i++)
      if (a[i].type == "checkbox") a[i].checked = false;
   }
   else
   {
   for (var i=0; i<a.length; i++)
      if (a[i].type == "checkbox") a[i].checked = true;
   }
}
</script>

<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1">
<form id="Search" name="Search" method="post" action="news_search.asp">
<tbody>
<tr>
<td><input name="Range" type="radio" class="inputnoborder" value="News" checked="checked" /> 
<input name="keyword" value="<%=keyword%>" size="50" maxlength="100" style="margin:0;" onFocus="this.select();" /> </td>
<td width="100" align="center" valign="middle"><input name="提交" type="submit" value="新闻查询"></a></td>
</tr>
</tbody>
</form>
</table></td>
</tr>
</table>
</body>
</html>