日期:2014-05-17  浏览次数:20911 次

谁来指点一下呀,困死在这儿了!!!
<!--#include file="webconfig.asp"-->
<%
Dim SortID
SortID=Trim(FLib.SafeSql(Request("SortID")))
IF SortID<>"" then
Sql = "Select * from weeklySort where ID ="&SortID
Set Rs = Db.CreateRS()
Rs.Open Sql, Db.Conn, 1, 1
If not Rs.eof then
SortName=Rs("SortName")
SortID=Rs("ID")
end if
Rs.close
set rs=nothing

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"/>
  <link href="css/css.css" rel="stylesheet" type="text/css">
  <script src="js/muen.js" type="text/javascript"></script>
  <script src="js/buttom.js" type="text/javascript"></script>
</head>
<body>
 <div class="juzhong">
  <!--#include file="top.asp"-->
  <div class="guestbook">
  <div class="guestbook_left">
  <div class="guestbook_left_1">标题4</div>
  <div class="cartoon_left_2">
  <li><a href="weekly.asp">标题4</a></li>
  <li><a href="lps/index.html">标题4</a></li>
  <li><a href="cartoon.asp">标题4</a></li>
  <li><a href="http://127.0.0.1/News.asp?SortID=7">标题4</a></li>
  </div>
  </div>
  <div class="guestbook_right">
  <div class="guestbook_right_1">当前位置</div>
  <div class="weekly_content_list">  
<%'开始分页
Const MaxPerPage=2
  dim totalPut  
  dim CurrentPage
  dim TotalPages
  dim j
 
  if Not isempty(request("page")) then
  currentPage=Cint(request("page"))
  else
  currentPage=1
  end if 
Set Rs = Db.CreateRS()
sql="select * from weeklySort where ID>0"
namekey=FLib.SafeSql(Request("namekey"))
if namekey<>"" then  
sql=sql&" and SortName like '%"&namekey&"%'"  
end if
if SortID<>"" then
sql=sql&" and SortID="&SortID&""
end if
sql=sql&" order by PX desc"
Rs.Open Sql, Db.Conn, 1, 1
 
if err.number<>0 then
response.write "数据库中无数据"
end if

  if rs.eof And rs.bof then
  Response.Write "<p align='center' class='contents'> 没有此类信息!<a href='#' onclick='history.go(-1);'>返回上一步</a></p>"
  else
totalPut=rs.recordcount

  if currentpage<1 then
  currentpage=1
  end if

  if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
  end