<%@ CODEPAGE = "936" %>

<!--#INCLUDE FILE="../inc/const.asp" -->
<!--#INCLUDE FILE="connt.asp" -->

<%dim foolcat,title
  dim js,strsql
  set js = server.CreateObject("ADODB.RecordSet")
  strSql = "SELECT TOP 11 Nclass.*,download.* FROM download,Nclass where Nclass.Nclassid=download.Nclassid ORDER BY download.dateandtime DESC"
  set js = conn.Execute (StrSql)
do until js.eof
    showname=""&js("bb")&""
	if len(showname)>10 then
		title=left(showname,10)+"..."
	else
		title=showname
	end if
tmp = "http://" & request.servervariables("SERVER_NAME") & _            
left(request.servervariables("SCRIPT_NAME"),len(request.servervariables("SCRIPT_NAME"))-len("/admin/outjs.asp"))
   foolcat = foolcat + "<tr><td>&nbsp;<img src=images/dot1.gif> <a href="&tmp&"/list.asp?id="&js("id")&" target=_blank>" & title & "</a><span class=b2><font color=FF0000>("&month(js("dateandtime"))&"月"&day(js("dateandtime"))&"日)</font></span></td></tr>"
i=i+1     
	 if i>=11 then exit do
js.MoveNext
loop
'生成JS文件
foolcat = "" + foolcat + ""
foolcat = "document.write('" & foolcat & "')"
FolderPath = Server.MapPath("../")
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.CreateTextFile(FolderPath&"\news.js")
fout.WriteLine foolcat
'关闭连接
fout.close
set fout = nothing
js.close
set js = nothing
conn.close
set conn=nothing
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<link rel="stylesheet" type="text/css" href="style.css">
</head><body bgcolor="#800000"><br><br>
<p align=center><b><FONT color="#FFFF00" size="6">恭喜! 您已成功更新JS文件</FONT></b></p> 
</body></html>