<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="setup.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="page.asp"-->
<!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">
<link href="style.css" rel="stylesheet" type="text/css" />
<title><%=site_name%></title></head>
<body>
<!--#include file="top.asp"-->
<div id="box">
<div id="left">

<div id="nav4">栏目导航</div>
  <div id="nav_content">
  <ul class="cannel2">
  <li><a href="star.asp?Professional=教师">教师</a></li>
  <li><a href="star.asp?Professional=学生">学生</a></li>
</ul>
</div>
<div id="nav4">点击排行</div>
<div id="nav_content">
<ul>
<%
 Set rs2 = Server.CreateObject("ADODB.RecordSet")
rs2.open "select top 6 * from news order by hit desc",conn,1,1
if rs2.eof and rs2.bof then
response.Write("暂无信息")
else
do while not rs2.eof
%>
<li>·<a href="list.asp?yiid=<%=rs2("yiid")%>"><%=rs2("title")%></a></li>
<%
rs2.movenext
loop
end if
rs2.close
set rs2=nothing
 %>
</ul>
</div>

</div>

<div id="right">
<div id="address">您的位置：本站首页→ 名星风采
          </div>

<div id="big_content">
<div id="content">
<ul class="products">
<%	
set rs=server.createobject("adodb.recordset") 
Professional=request.QueryString("Professional")
if Professional="" then
exec="select  * from star order by id desc"
end if 
if Professional<>"" then
exec="select  * from star where Professional='"&Professional&"' order by id desc"
end if
rs.open exec,conn,1,1 
if rs.eof then
response.Write "&nbsp;该分类暂无信息！"
else
rs.PageSize =12 '每页记录条数
iCount=rs.RecordCount '记录总数
iPageSize=rs.PageSize
maxpage=rs.PageCount 
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif  page>maxpage then
page=maxpage
end if
rs.AbsolutePage=Page
if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if	
%>
        <%For i=1 To x%>
 <li><a href="star_view.asp?id=<%=rs("id")%>" title="<%=rs("name")%>"></a><a href="star_view.asp?id=<%=rs("id")%>" title="<%=rs("name")%>"><img src="<%=rs("photo")%>" width="157" height="166" /></a><br />
        <a href="star_view.asp?id=<%=rs("id")%>" title="<%=rs("name")%>"><%=left(rs("name"),40)%></a></li>
        <%rs.movenext
next
%>
<%
end if
%>
</ul>
      <%'以下显示分页
 call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
%>
</div>
</div>
</div>
</div>
<!--#include file="bottom.asp"-->
</body>
</html>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>