<%@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=""
banben=0
NewsID=0
weizhi1=""
if request("NewsID")<>"" then
	NewsID=clng(request("NewsID"))
end if

sql="select title,sort from TbNews where id="&NewsID
rs.open sql,conn,1,1
if not rs.eof then
	NewsTitle=rs("title")
	SortID=rs("sort")
end if
rs.close

select case SortID
	case 2
		tag="Xxjj_Zbjj"
		banben=1
		weizhi1="Xxjj"
	case 3
		tag="Xxjj_Fxqjs"
		banben=1
		weizhi1="Xxjj"
	
	case 5
		tag="Xywh_Bxzz"
		banben=1
		weizhi1="Xywh"
	case 6
		tag="Xywh_Jxts"
		banben=1
		weizhi1="Xywh"
	case 7
		tag="Xywh_Glts"
		banben=1
		weizhi1="Xywh"
	case 8
		tag="Xywh_Fzzl"
		banben=1
		weizhi1="Xywh"
	
	case 10
		tag="Ccsz_Ccap"
		banben=1
		weizhi1="Ccsz"
	case 11
		tag="Ccsz_Zdtj"
		banben=1
		weizhi1="Ccsz"
	
	case 13
		tag="Xwzx_Xwgg"
		banben=1
		weizhi1="Xwzx"
	case 14
		tag="Xwzx_Xxhd"
		banben=1
		weizhi1="Xwzx"
	case 15
		tag="Xwzx_Hyxw"
		banben=1
		weizhi1="Xwzx"
	
	case 17
		tag="Zlxz_Gzxzq"
		banben=1
		weizhi1="Zlxz"
	case 18
		tag="Zlxz_Czxzq"
		banben=1
		weizhi1="Zlxz"
	case 19
		tag="Zlxz_Xxxzq"
		banben=1
		weizhi1="Zlxz"
	case 20
		tag="Xxjlzd"
		banben=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 NewsTitle<>"" then response.Write(NewsTitle&"——")%><%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-left:16px; margin-top:8px; margin-right:15px;">
					  <%
					  select case banben
							case 1
								call banmian1(NewsID)
						end select
					  %>
					  </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 banmian1(NewsID)
	sort_id=0
	newsorder=0
	sql="select * from TbNews where id="&NewsID
	rs.open sql,conn,1,3
	if not rs.eof then
		response.Write("<div style='text-align:center;font-size:14px;font-weight:bold;padding-bottom:5px;color:#333;'>")
		response.Write(rs("title"))
		response.Write("</div>")
		response.Write("<div style='text-align:center;border-bottom:1px #CCCCCC solid;margin-top:20px;margin-bottom:10px;'></div>")
		response.Write("<div  style='text-align:center;padding-top:5px;'>作者：")
		call getAdmin(rs("UserID"))
		response.Write("&nbsp;&nbsp;&nbsp;&nbsp;")
		response.Write("阅读次数：")
		response.Write(rs("Hits")&"次")
		response.Write("&nbsp;&nbsp;&nbsp;&nbsp;")
		response.Write("更新时间：")
		response.Write(rs("Sdate"))
		response.Write("</div>")
		response.Write("<div style='padding-top:20px;line-height:20px;color:#333;'>")
		response.Write(replace(rs("Content"),"<IMG ","<img onload='resize(this)' "))
		response.Write("</div>")
		if (rs("sort")=17 or rs("sort")=18 or rs("sort")=19) and rs("file")<>"" then
			response.Write("<div style='margin-top:15px;'>")
			response.Write("<a href='DownLoad.asp?NewsID="&rs("id")&"' class='C_020294'><img src='images/xiazai.gif' width='180' height='60' /></a>")
			response.Write("</div>")
		end if
		hits=rs("Hits")
		rs("Hits")=hits+1
		SortID=rs("sort")
		NewsOrder=rs("order")
		rs.update
	end if
	rs.close
	response.Write("<div style='font-size:12px; color:#333333; clear:both; text-align:left;padding-top:20px;line-height:20px;'>")
	call UPANDNEXT(NewsOrder,SortID)
	response.Write("</div>")
end sub
sub getAdmin(id)
	sql2="select top 1 Nickname from Tbadministrator where id="&clng(id)
	rs2.open sql2,conn,1,1
	if not rs2.eof then
		response.Write rs2("Nickname")
	end if
	rs2.close
end sub
sub UPANDNEXT(NewsOrder,SortID)
	sql="select * from TbNews where sort="&SortID&" and [order]>"&clng(NewsOrder)&" order by [order] asc"
	rs.open sql,conn,1,1
	if not rs.eof then
		response.Write("上一篇：")
		response.Write("<a href='News_Show.asp?NewsID="&rs("id")&"' title='"&rs("title")&"' class='fanye'>")
		if CheckStringLength(rs("title"))>60 then
				response.Write(InterceptString(rs("title"),57)&"...")
			else
				response.Write(rs("title"))
		end if
		response.Write("</a>")
		response.Write("<br>")
	end if
	rs.close
	
	sql="select *  from TbNews where sort="&SortID&" and [order]<"&clng(NewsOrder)&" order by [order] desc "
	rs.open sql,conn,1,1
	if not rs.eof then	
		response.Write("下一篇：")
		response.Write("<a href='News_Show.asp?NewsID="&rs("id")&"' title='"&rs("title")&"' class='fanye'>")
		if CheckStringLength(rs("title"))>60 then
				response.Write(InterceptString(rs("title"),57)&"...")
			else
				response.Write(rs("title"))
		end if
		response.Write("</a>")
		response.Write("<br>")
	end if
	rs.close	
	response.Write("<a href='News_List.asp?tag="&tag&"' class='fanye'>返回列表</a>")
end sub
%>

