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

'//n为调用数字条数

'//信息调用：<script src=xinxixjs.asp?n=10&fox=x></script>
'//张贴调用：<script src=xinxixjs.asp?n=10&fox=z></script>

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

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

fox=Request("fox")
select case fox
case "x"
	call x()
case "z"
	call z()
end select

sub x()
set rsnew=server.createobject("adodb.recordset")
sqlnew="select * from FOX_xinxi where yz=1 and tj=1 and ts=0 order by fbsj desc"
rsnew.open sqlnew,conn,1,1
for i=1 to TopicCount
if rsnew.eof then
response.write "document.write('待添加');"
else
 	if len(rsnew("company"))>titlelong then
		newtopic=left(rsnew("company"),titlelong)&"…"
		else
		newtopic=rsnew("company")
	end if
		response.write "document.write('<font color=red>·</font>');" 
		dim rss,sqls,shengid,sheng
		set rss=server.createobject("adodb.recordset")
sqls="select id,sheng from FOX_sheng where id="&rsnew("sheng")&""
rss.open sqls,conn,1,1
    shengid=rss("id")
    sheng=rss("sheng")
		response.write "document.write('[<a href="&siteurl&"xinxilist.asp?sheng="&shengid&" target=_blank><font color=red>"&sheng&"</font></a>]<a href="&siteurl&"xinxiinfo.asp?fox="&rsnew("id")&" target=_blank>"&newtopic&"</a><br>');" 
	rsnew.movenext
end if
next
rsnew.close
set rsnew=nothing
end sub

sub z()
set rsnew=server.createobject("adodb.recordset")
sqlnew="select * from FOX_xinxi where yz=1 and tj=1 and ts=1 order by fbsj desc"
rsnew.open sqlnew,conn,1,1
for i=1 to TopicCount
if rsnew.eof then
response.write "document.write('待添加');"
else
 	if len(rsnew("company"))>titlelong then
		newtopic=left(rsnew("company"),titlelong)&"…"
		else
		newtopic=rsnew("company")
	end if
		response.write "document.write('<font color=red>·</font>');" 
		dim rss,sqls,shengid,sheng
		set rss=server.createobject("adodb.recordset")
sqls="select id,sheng from FOX_sheng where id="&rsnew("sheng")&""
rss.open sqls,conn,1,1
    shengid=rss("id")
    sheng=rss("sheng")
		response.write "document.write('[<a href="&siteurl&"xinxilist.asp?sheng="&shengid&" target=_blank><font color=red>"&sheng&"</font></a>]<a href="&siteurl&"adinfo.asp?fox="&rsnew("id")&" target=_blank>"&newtopic&"</a><br>');" 
	rsnew.movenext
end if
next
rsnew.close
set rsnew=nothing
end sub
%>
</body></html>