<!--#include file="conn.asp"-->
<%'//知道首页调用文件1.0

'//n为调用数字条数

'//最新问题：<script src=zhidao/js.asp?n=10&fox=wen></script>
'//状况问题：<script src=zhidao/js.asp?n=10&fox=zh></script>

'//调用说明：直接将以上相应地址放于页面，文字大小及颜色属性，遵循页面CSS
'//设置本文件说明：仔细查看本文件注释内容并调整以下有注解的代码。

dim TopicCount,titlelong,newtopic,fox,a,b,c,d,e
dim siteurl
siteurl="zhidao/"               '知道地址，如果和本文件同目录则不需改，否则请修改siteurl和conn.asp的路径
dim rsnew,sqlnew,i
TopicCount=request("n")			'调用TOP几条
titlelong=14     		'每行贴子的调用字符数，如欲显示完整标题，却导致影响表格换行的问题，请在表格table中加入：style="WORD-BREAK: break-all;"
siteurl="zhidao/" 'blog地址，如果和本文件同目录则不需改，否则请修改siteurl和conn.asp的路径

fox=Request("fox")
select case fox
case "wen"
	call wen()
case "zh"
	call zh()
end select

sub wen()
set rsnew=server.createobject("adodb.recordset")
sqlnew="select * from FOX_xinxi order by fbsj desc"
rsnew.open sqlnew,conn,1,1
for i=1 to TopicCount
if rsnew.eof then
response.write "document.write('待添加<br>');"
else
 	if len(rsnew("company"))>titlelong then
		newtopic=left(rsnew("company"),titlelong)&"…"
		else
		newtopic=rsnew("company")
	end if
		response.write "document.write('&nbsp;<img src="&siteurl&"images/icn_ps.gif>&nbsp;<a href="&siteurl&"wenlist.asp?fox="&rsnew("id")&" target=_blank>"&newtopic&"</a><br>');" '此中<img src=images/index_dot.gif>为标题前小图标，如不需要可删除
	rsnew.movenext
end if
next
rsnew.close
set rsnew=nothing
end sub

sub zh()
set rsnew=server.createobject("adodb.recordset")
sqlnew="select * from FOX_xinxi order by fbsj desc"
rsnew.open sqlnew,conn,1,1
for i=1 to TopicCount
if rsnew.eof then
response.write "document.write('待添加<br>');"
else
 	if len(rsnew("company"))>titlelong then
		newtopic=left(rsnew("company"),titlelong)&"…"
		else
		newtopic=rsnew("company")
		e=rsnew("fbsj")
	end if
		response.write "document.write('&nbsp;<img src="&siteurl&"images/t"&rsnew("ok")&".gif>');"
	if rsnew("jf")=0 then
		response.write "document.write('&nbsp;<img src="&siteurl&"images/0.gif>');" 
		else
		response.write "document.write('&nbsp;<img src="&siteurl&"images/1.gif>');" 
		end if
	if rsnew("hfcs")=0 then
	    response.write "document.write('&nbsp;<img src="&siteurl&"images/w0.gif>');" 
	    else
	    response.write "document.write('&nbsp;<img src="&siteurl&"images/w1.gif>');" 
	    end if
		response.write "document.write('&nbsp;<img src="&siteurl&"images/icn_ps.gif>&nbsp;<a href="&siteurl&"wenlist.asp?fox="&rsnew("id")&" target=_blank>"&newtopic&"</a><br>');" '此中<img src=images/index_dot.gif>为标题前小图标，如不需要可删除
	rsnew.movenext
end if
next
rsnew.close
set rsnew=nothing
end sub
%>
