<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
'****************************************************************
'**   版权所有：烈火工作室  演示网站http://www.strongfire.cn   **
'**   QQ:839225572   邮箱：strongfire2008@163.com              **
'**   非正版用户不得擅自非法修改用于商业用途！查出必究。       **
'****************************************************************
%>
<!--#include file="islogin.asp"-->
<!--#include file="Check_SqlIn.asp"-->
<!--#include file="admin_conn.asp"-->
<!--#include file = "config.asp"-->
<%

'newsperpage=30

se_ClassName=Request("se_ClassName")

selecttype=Request("selecttype")
searchkeys=Request("searchkeys")

%>
<html>
<head>
<LINK href="admin_Css.css" type=text/css rel=stylesheet>
<script language = "JavaScript">
function go(URL,cfmText)
{
	var ret;
	ret = confirm(cfmText);
	if(ret!=false)window.location=URL;
}
 </script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>修改信息列表</title>

<style type="text/css">
<!--
.STYLE1 {
	font-size: 14px;
	color: #0000FF;
	font-weight: bold;
}
-->
</style>
</head>


<body>
<div align="center">
 
      
  <table border="0" cellspacing="1" align="center" class="list">
    <tr>
      <th colspan="5"><div align="center" >信息列表</div></th>
    </tr>
    <tr>
      <td width="50" ><div align="center">ID号</div></td>
      <td width="277" ><div align="center">标题</div></td>
      <td width="75" ><div align="center">浏览数</div></td>
      <td width="99"><div align="center">所属类别</div></td>
      <td width="80" ><div align="center">操作</div></td>
    </tr>
<%

if selecttype=2 then
	if not IsNumeric(searchkeys) then
		response.write"<SCRIPT language=JavaScript>alert('ID号应该为数字！');"
		response.write"javascript:history.go(-1)</SCRIPT>"
		response.end
	end if
	sql="select id,Title,hits,ClassName from article where id="&searchkeys&" order by id"
else
	if se_classname="" then
		sql="select id,Title,hits,ClassName from article where title like '%"&searchkeys&"%' order by ClassName"
	else
		sql="select id,Title,hits,ClassName from article where ClassName='"& se_ClassName &"' and title like '%"&searchkeys&"%' order by id"
	end if
	
		
end if

Set rs=Server.CreateObject("ADODB.RecordSet") 
rs.Open sql,conn,1,1
if rs.eof and rs.bof then
  response.Write("<tr><td colspan='6' ><div align='center'>暂时没有记录</div> </td></tr>")
else
	rs.PageSize=newsperpage
	page=clng(request("page"))
	if page=0 then page=1 
	pages=rs.pagecount
	if page > pages then page=pages
	rs.AbsolutePage=page 
	pp=1
	for j=1 to rs.PageSize 
	Title = rs("Title")
	turl="..\article.asp?id="&rs("id")
%>
	
    
    <tr>
      <td width="50"><div align="center"><%=rs("id")%></div></td>
      <td ><a class=noline href="<%=turl%>"  target=_blank><%=Title%></a></td>
      <td width="75" ><div align="center"><%=rs("hits")%></div></td>
      <td width="99" ><div align="center"><%=rs("classname")%></div></td>
      <td width="80" ><div align="center"><a href='searchModify.asp?id=<%=rs("id")%>&page=<%=Page%>&searchkeys=<%=searchkeys%>&selecttype=<%=selecttype%>&se_ClassName=<%=se_ClassName%>'>修改</a> <a href="javascript:go('searchdel.asp?id=<%=rs("id")%>&page=<%=Page%>&searchkeys=<%=searchkeys%>&selecttype=<%=selecttype%>&se_ClassName=<%=se_ClassName%>','您确定要删除？')">删除</a>  </div></td>
    </tr>
<%
rs.movenext
pp=pp+1
if rs.eof then exit for
next
%>	
	
    
	
    <tr>
      <td colspan="5" class="table_td2"><div align="center"><br>
	   <form method=Post action="Searchlist.asp?selecttype=<%=selecttype%>&searchkeys=<%=searchkeys%>&se_ClassName=<%=se_ClassName%>">
                          <%if Page<2 then      
    response.write "首页 上一页&nbsp;"
  else
    response.write "<a href=searchlist.asp?selecttype="&selecttype&"&searchkeys="&searchkeys&"&se_ClassName="&se_ClassName&"&page=1>首页</a>&nbsp;"
    response.write "<a href=searchlist.asp?selecttype="&selecttype&"&searchkeys="&searchkeys&"&se_ClassName="&se_ClassName&"&page=" & Page-1 & ">上一页</a>&nbsp;"
  end if
  if rs.pagecount-page<1 then
    response.write "下一页 尾页"
  else
    response.write "<a href=searchlist.asp?selecttype="&selecttype&"&searchkeys="&searchkeys&"&se_ClassName="&se_ClassName&"&page=" & (page+1) & ">"
    response.write "下一页</a> <a href=searchlist.asp?selecttype="&selecttype&"&searchkeys="&searchkeys&"&se_ClassName="&se_ClassName&"&page="&rs.pagecount&">尾页</a>"
  end if
   response.write "&nbsp;页次：<strong><font color=red>"&Page&"</font>/"&rs.pagecount&"</strong>页 "
    response.write "&nbsp;共<b><font color='#FF0000'>"&rs.recordcount&"</font></b>条记录 <b>"&rs.pagesize&"</b>条记录/页"
   response.write " 转到：<input type='text' name='page' size=4 maxlength=10  value="&page&">"
   response.write " <input class=input type='submit'  value=' Goto '  name='cndok'></span>"     
%>
                        </form>
	  
	  
	  </div></td>
    </tr>
<%
end if
set rs=nothing
conn.close
set conn=nothing
%>
  </table>
  
  <p><br>
  </p>
</div>
</body>

</html>
