<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--#include file="conn.asp"-->
<%
tag=""
SortID=0
WebName=""
banmian=0
weizhi1=""
if request("tag")<>"" then
	tag=request("tag")
end if
select case tag
	case "Xxjj_Zbjj"
		SortID=2
		banmian=1
		weizhi1="Xxjj"
	case "Xxjj_Fxqjs"
		SortID=3
		banmian=1
		weizhi1="Xxjj"
		
	case "Xywh_Bxzz"
		SortID=5
		banmian=1
		weizhi1="Xywh"
	case "Xywh_Jxts"
		SortID=6
		banmian=2
		weizhi1="Xywh"
	case "Xywh_Glts"
		SortID=7
		banmian=1
		weizhi1="Xywh"
	case "Xywh_Fzzl"
		SortID=8
		banmian=1
		weizhi1="Xywh"
	
	case "Ccsz_Ccap"
		SortID=10
		banmian=1
		weizhi1="Ccsz"
	case "Ccsz_Zdtj"
		SortID=11
		banmian=1
		weizhi1="Ccsz"
		
	case "Xwzx_Xwgg"
		SortID=13
		banmian=1
		weizhi1="Xwzx"
	case "Xwzx_Xxhd"
		SortID=14
		banmian=1
		weizhi1="Xwzx"
	case "Xwzx_Hyxw"
		SortID=15
		banmian=1
		weizhi1="Xwzx"
		
	case "Zlxz_Gzxzq"
		SortID=17
		banmian=3
		weizhi1="Zlxz"
	case "Zlxz_Czxzq"
		SortID=18
		banmian=3
		weizhi1="Zlxz"
	case "Zlxz_Xxxzq"
		SortID=19
		banmian=3
		weizhi1="Zlxz"
		
	case "Xxjlzd"
		SortID=20
		banmian=1
		weizhi1="Web_Else"
end select
sql="select name from TbNewsSort where id="&SortID
rs.open sql,conn,1,1
if not rs.eof then
	WebName=rs("name")
end if
rs.close
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel="stylesheet" href="css/style.css" type="text/css" />
<title><%if WebName<>"" then response.Write(WebName&"——")%>遂宁市博朗教育培训学校</title>
</head>
<body>
<script src="Comm_javascript.js"></script>
<!--#include file="Comm_top.asp"-->
<table border="0" cellpadding="0" cellspacing="0" width="1003" class="WebCenter">
  <tr>
    <td style="width:259px;background-color:#FBFBFB;" align="left" valign="top"><!--#include file="Comm_left.asp"--></td>
    <td><table align="left" border="0" cellpadding="0" cellspacing="0" width="744">
        <tr>
          <td><table align="left" border="0" cellpadding="0" cellspacing="0" width="744">
              <tr>
                <td><img src="images/index2_r2_c2.jpg" width="28" height="90"/></td>
                <td style="width:695px; height:90px; background-color:#FCFEFD;" align="left" valign="top">
				<div style="margin-top:3px;"><%call GetErQiehuan()%></div>
				</td>
                <td><img src="images/index2_r2_c5.jpg" width="21" height="90"/></td>
              </tr>
            </table></td>
        </tr>
        <tr>
          <td><table align="left" border="0" cellpadding="0" cellspacing="0" width="744">
              <tr>
                <td style="width:20px; height:610px; background:url(images/index2_r4_c2.jpg);"></td>
                <td><table align="left" border="0" cellpadding="0" cellspacing="0" width="707">
                    <tr>
                      <td style="width:707px; height:59px;background:url(images/index2_r4_c3.jpg);" align="left" valign="top">
					  <div style="color:#000000; font-weight:bold; margin-left:34px; margin-top:18px;"><%=WebName%></div>
					  </td>
                    </tr>
                    <tr>
                      <td><img src="images/index2_r6_c3.jpg" width="707" height="20"/></td>
                    </tr>
                    <tr>
                      <td style="width:707px; height:531px; background-color:#FDFDFD;" align="left" valign="top">  
					  <div style="margin-top:8px;">
					  <%
						n=0
						select case banmian
							case 1
								n=20
							case 2
								n=20
							case 3
								n=20
						end select
						call getList("","TbNews","sort="&SortID&"","","[order] desc",""&n&"","","tag="&tag&"")
					  %>
					  </div>
					  </td>
                    </tr>
                  </table></td>
                <td style="width:17px; height:610px; background:url(images/index2_r4_c6.jpg);"></td>
              </tr>
            </table></td>
        </tr>
        <tr>
          <td><img src="images/index2_r11_c2.jpg" width="744" height="42"/></td>
        </tr>
      </table></td>
  </tr>
</table>
<!--#include file="Comm_bottom.asp"-->
</body>
</html>
<!--#include file="conn_close.asp"-->
<%
sub showList(page,maxpage,pagesize,record,file_name,file_terms)
	select case banmian
		case 1
			call GetBanmian1()
		case 2
			call GetBanmian2()
		case 3
			call GetBanmian3()
	end select
    response.Write("<div style='text-align:center;color:#333;clear:both;padding-top:20px;'>")	
	if file_terms<>"" then
		urlFrist=file_name&"?pages=1&"&file_terms
		urlup=file_name&"?pages="&(page-1)&"&"&file_terms
		urlnext=file_name&"?pages="&(page+1)&"&"&file_terms
		urlend=file_name&"?pages="&maxpage&"&"&file_terms
	else
		urlFrist=file_name&"?pages=1"
		urlup=file_name&"?pages="&(page-1)
		urlnext=file_name&"?pages="&(page+1)
		urlend=file_name&"?pages="&maxpage
	end if
	if page<>1 then
		response.Write("<a href="&urlFrist&" class='fanye'>首页</a>")
	else
		response.Write("首页")
	end if
	if page>1 then
    	response.Write("&nbsp;<a href="&urlup&" class='fanye'>上一页</a>")
	else
		response.Write("&nbsp;上一页")
    end if
    if page<maxpage then
        response.Write("&nbsp;<a href="&urlnext&" class='fanye'>下一页</a>")
	else
		 response.Write("&nbsp;下一页")
    end if
	if page<>maxpage then
		response.Write("&nbsp;<a href="&urlend&" class='fanye'>尾页</a>")
	else
		response.Write("&nbsp;尾页")
	end if	
	if page<maxpage then
		allto=page*pagesize
	else
		if (record mod pagesize)=0 then
			allto=(page)*pagesize
		else
			allto=(page-1)*pagesize+(record mod pagesize)
		end if
	end if
	if maxpage=1 then
		allto=record
	end if
	
	response.Write(" 从 第"&((page-1)*pagesize)+1&"条 到 第"&allto&"条 (共 "&record&" 条记录，共"&maxpage&"页)")
	response.Write("</div>")
end sub
sub GetBanmian1()
	response.Write("<div style='margin-left:18px;margin-right:23px;'>")
		linei=1
		do while not rs.eof
			if linei<2 then
				response.Write("<div style='height:30px;'>")
				linei=linei+1
			else
				response.Write("<div style='height:30px;background-color:#F7F7F7;'>")
				linei=1
			end if
			response.Write("<div style='line-height:30px;color:#020294;float:left;width:590px;'>")
			response.Write("&nbsp;·&nbsp;<a href='News_Show.asp?NewsID="&rs("id")&"' target='_blank' class='C_000' ")
			if CheckStringLength(rs("title"))>87 then
				response.Write(" title='"&rs("title")&"' >"&InterceptString(rs("title"),84)&"...")
			else
				response.Write(" >"&rs("title"))
			end if
			response.Write("</a></div>")
			Sdate=rs("Sdate")
			response.Write("<div style='height:30px;line-height:30px;color:#4865DB;'>")
			response.Write(right(year(Sdate),2)&"-"&right("0"&month(Sdate),2)&"-"&right("0"&day(Sdate),2))
			response.Write("</div>")
			response.Write("</div>")
			rs.movenext
		loop
		response.Write("</div>")
end sub
sub GetBanmian2()
	linei=1
	response.Write("<div style='margin-left:25px;margin-top:15px;'>")
	do while not rs.eof
		response.Write("<div style='float:left;width:81px;'>")
		response.Write("<div>")
		response.Write("<img src='"&rs("picture")&"' width='81' height='89' />")
		response.Write("</div>")
		response.Write("<div style='margin-top:3px;width:81px;text-align:center;'>")
		response.Write("<a href='News_Show.asp?NewsID="&rs("id")&"' target='_blank' class='C_B_00' ")
		if CheckStringLength(rs("title"))>16 then
			response.Write(" title='"&rs("title")&"' >"&InterceptString(rs("title"),12)&"")
		else
			response.Write(" >"&rs("title"))
		end if
		response.Write("</a>")
		response.Write("</div>")
		response.Write("</div>")
		
		if linei<5 then
			response.Write("<div style='float:left;width:60px;overflow:hidden;'>&nbsp;</div>")
			linei=linei+1
		else
			response.Write("<div style='clear:both;height:15px;overflow:hidden;'>&nbsp;</div>")
			linei=1
		end if
		rs.movenext
	loop
	response.Write("</div>")
end sub
sub GetBanmian3()
	response.Write("<div style='margin-left:18px;margin-right:23px;'>")
		linei=1
		do while not rs.eof
			if linei<2 then
				response.Write("<div style='height:30px;'>")
				linei=linei+1
			else
				response.Write("<div style='height:30px;background-color:#F7F7F7;'>")
				linei=1
			end if
			response.Write("<div style='line-height:30px;color:#020294;float:left;width:590px;'>")
			response.Write("&nbsp;·&nbsp;<a href='News_Show.asp?NewsID="&rs("id")&"' target='_blank' class='C_000' ")
			if CheckStringLength(rs("title"))>87 then
				response.Write(" title='"&rs("title")&"' >"&InterceptString(rs("title"),84)&"...")
			else
				response.Write(" >"&rs("title"))
			end if
			response.Write("</a></div>")
			response.Write("<div style='height:30px;line-height:30px;color:#4865DB;'>")
			if rs("file")<>"" then
				response.Write("<a href='DownLoad.asp?NewsID="&rs("id")&"' class='C_020294'>下&nbsp;&nbsp;载</a>")
			else
				response.Write("无文件")
			end if
			response.Write("</div>")
			response.Write("</div>")
			rs.movenext
		loop
	response.Write("</div>")
end sub
%>