%
Response.Expires= -1
Response.ExpiresAbsolute = Now() - 1
response.CacheControl="no-cache"
server.ScriptTimeout=50000
%>
<%
'取出newcateid所对应名称
Function GetNewcatename(newcata_ID)
Set Rs_t=Conn.Execute("select title from edu_cataid where id="&newcata_ID&"")
If Not Rs_t.Eof Then
GetNewcatename=Rs_t(0)
End If
Rs_t.Close
Set Rs_t=Nothing
End Function
'取出lesson_id所对应名称
Function GetLessonname(lesson_id)
Set Rs_t=Conn.Execute("select lesson from LessonSet where lesson_id="&lesson_id&"")
If Not Rs_t.Eof Then
GetLessonname=Rs_t(0)
End If
Rs_t.Close
Set Rs_t=Nothing
End Function
nctid=checkstr(request("nctid"),1)
leupid=checkstr(request("leupid"),1)
newsubid=checkstr(request("newsubid"),1)
if nctid=0 then nctid=320
if nctid>0 then
SqlContent=SqlContent&" and newcataid="&nctid
end if
if leupid>0 then
SqlContent=SqlContent&" and lesson_up="&leupid
end if
if newsubid>0 then
SqlContent=SqlContent&" and newsubid="&newsubid
end if
if nctid=299 then
showtitle="招生简章"
else
if leupid>0 then showtitle=GetLessonname(leupid)&":"&GetNewcatename(newsubid) else showtitle=GetNewcatename(newsubid)
end if
%>
面授招生信息
<%
sql="select top 15 cast(title as varchar(26)) as showtitle,title,t_color,htmlpath,html,addlink from edu_news where newcataid=299 and isshow=1 order by shownum,addtime desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3
if not(rs.eof or rs.bof) then
do while not rs.eof
if rs("addlink")="" or isnull(rs("addlink")) then
newslink="/ms/web_news/html/"&rs("htmlpath")&"/"&rs("html")
else
newslink=rs("addlink")
end if
response.Write("- "&rs(0)&"
")
rs.movenext
loop
end if
rs.close
set rs=nothing
%>
面授资讯
<%
sql="select top 15 cast(title as varchar(26)) as showtitle,title,t_color,htmlpath,html,addlink from edu_news where newcataid=320 and isshow=1 order by shownum,addtime desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3
if not(rs.eof or rs.bof) then
do while not rs.eof
if rs("addlink")="" or isnull(rs("addlink")) then
newslink="/ms/web_news/html/"&rs("htmlpath")&"/"&rs("html")
else
newslink=rs("addlink")
end if
response.Write("- "&rs(0)&"
")
rs.movenext
loop
end if
rs.close
set rs=nothing
%>
<%
if nctid>0 then ntitle=replace(GetNewcatename(nctid),"面授课程","招生简章")
if newsubid>0 then ntitle=GetNewcatename(newsubid)
if leupid>0 then ntitle=GetLessonname(leupid)
response.Write(ntitle)
%>
<%
sql="select count(0) from edu_news where isshow=1 "&SqlContent&""
set rs=server.CreateObject("Adodb.recordset")
rs.open sql,conn,3
'=================rows为记录总数============
rows=rs(0)
'==============maxrows为每页最大记录数==============
maxrows=30
'====================pagecou为共多少页==================
pagecou=rows\maxrows
if rows >(maxrows * pagecou) then pagecou=pagecou+1
'=================curpage为当前页次============
if checkstr(Request("page"),1)=0 then curpage=1 else curpage=checkstr(Request("page"),1)
spage=maxrows*curpage
if curpage=pagecou and rows mod maxrows>0 then n=rows mod maxrows else n=maxrows
startno=maxrows*(curpage-1)+1
ids="0"
set rs=server.CreateObject("adodb.recordset")
sql="SELECT * from(select ROW_NUMBER() OVER(ORDER BY ID desc) as rowNum,id from edu_news where isshow=1 "&SqlContent&" ) G0 where rowNum>"&spage-maxrows&" and rowNum<="&spage&""
rs.open sql,conn,3
if not(rs.bof or rs.eof) then
rs.Movelast
for i=1 to n
if rs.bof or rs.eof then exit for
ids=ids&","&rs("id")
rs.MovePrevious
next
else
ids=0
end if
find_ids=" and id in ("&ids&")"
set rs=server.CreateObject("adodb.recordset")
sql="select title,t_color,htmlpath,html,addlink,right(CONVERT(varchar(12),addtime,23),5) AS add_time from edu_news where isshow=1 "&find_ids&" order by addtime desc"
rs.open sql,conn,3
do until rs.eof
if rs("addlink")="" or isnull(rs("addlink")) then
newslink="/ms/web_news/html/"&rs("htmlpath")&"/"&rs("html")
else
newslink=rs("addlink")
end if
%>
- <%=rs(0)%> <%=rs(5)%>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
共<%=pagecou%>页 当前第<%=curpage%>页
[首页]
<%if curpag>1 then%>
[上一页]
<%end if%>
<%if curpage
[下一页]
<%end if%>
[最后一页]
<%
conn.close
set conn=nothing
%>