<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/function.asp"-->
<!--#include file="../inc/remove.asp"-->
<%
dim idc,id1,id
idc=trim(request("id"))
if idc<>"" then
id=idc
Set news=Server.CreateObject("ADODB.Recordset")
Sql="Select * From ft_news where id="&id&""
news.Open Sql,Conn,1,1
if news.bof and news.eof then
response.redirect "../"
else
	  set rs_class=conn.execute("select * from ft_news_class where class_id="&news("class_id")&"")
	  if rs_class.eof and rs_class.bof then
	  else
	  classname=rs_class("name")
	  class_id=rs_class("class_id")
	  end if
	  rs_class.close
	  set rs_class=nothing
newsname=news("name")
newstitle=news("title")
newskeywords=news("keywords")
newsdescription=news("description")
newscontent=news("content")
copyfrom=news("copyfrom")
author=news("author")
hits=news("hits")
newsdate=formatdatetime(news("date"),2)
ft_uploadfiles=news("ft_uploadfiles")
end if
news.close
set news=nothing
else
response.redirect "../"
end if
%>
<%
pagename=newsname
%>
<title><%=newstitle%></title>
<meta name="keywords" content="<%=newskeywords%>" />
<meta name="description" content="<%=newsdescription%>" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<meta content="telephone=no" name="format-detection">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon-precomposed" href="<%=webfolder%>images/icon.png"/>
<link rel="stylesheet" href="<%=webfolder%>css/jquery.mobile-1.3.1.min.css" />
<script src="<%=webfolder%>js/jquery-1.9.1.min.js" type"text/javascript"></script>
<script src="<%=webfolder%>js/jquery.mobile-1.3.1.min.js" type="text/javascript"></script>
<script language="javascript"  type="text/javascript" src="<%=webfolder%>inc/hits2.asp?action=news_hits&amp;id=<%=id%>"></script>
</head>

<body>
<div data-role="page" id="page-success" data-dom-cache="true">
<!--#include file="../inc/viewheader.asp"-->
<div data-role="content">
	<h2 class='title'><%=newsname%></h2>
    <p style='color:#666;font-size:x-small;'>来源: <%=copyfrom%>，<% if author<>"" then%>编辑: <%=author%>，<%end if%>日期: <%=newsdate%>,浏览：<%=hits%>次</p>
	<div class='TextContent'>
          <%=newscontent%>
    </div>
<div style="clear:both;"></div>
<ul data-role="listview" data-inset="true" style="margin-top:10px;">
<li data-role="list-divider">相关阅读</li>
          <%
		  Randomize(Timer())
          Set rskey=Server.CreateObject("ADODB.Recordset")
          Sql="SELECT TOP 8 * FROM ft_news where id<>"&id&" order by Rnd(-(id + " & Int((10000 * Rnd) + 1) & "))"
          rskey.Open Sql,Conn,1,1   
          if rskey.eof and rskey.bof then 
          %>
          <li>暂时没有资讯</li>
		  <%
          else 
          do while not rskey.eof
          %>
<li><a href="<%=webfolder%>view/news_view.asp?id=<%=rskey("id")%>" title="<%=rskey("name")%>" data-transition="slidefade" data-inline="true"><%=rskey("name")%></a></li>
          <%rskey.movenext
          loop
          end if
          rskey.close
          set rskey=nothing
          %>
</ul>
</div>
<div data-role="content">
<ul data-role="listview" data-inset="true" data-filter="true" data-filter-reveal="true" data-filter-placeholder="站内搜索...">
              <%
              set rs=server.CreateObject("adodb.recordset")
              rs.open "select top 30 * from ft_search where show=false order by hits desc,id desc",conn,1,1
              if rs.eof and rs.bof then
              else
              do while not rs.eof
              %>
<li><a href="<%=mlink%>tag/?id=<%=rs("id")%>" title="<%=rs("name")%>" data-transition="slidefade" data-inline="true"><%=rs("name")%></a></li>
              <%
              rs.movenext
              loop
              end if
              rs.close
              set rs=nothing
              %>
</ul>
</div>
<!--#include file="../inc/mfoot.asp"-->
</div>
</body>
</html>
