
 <%
picjsstr="<SCRIPT language=JavaScript>"& vbCrLf
picjsstr=picjsstr&"var imgUrl = new Array(); "& vbCrLf
picjsstr=picjsstr&"var imgtext = new Array(); "& vbCrLf
picjsstr=picjsstr&"var imgLink = new Array(); "& vbCrLf
Const ForReading =1, ForWriting = 2
	
	Set picrs=Server.CreateObject("Adodb.RecordSet")
	'picsql="Select id,title,picture From article Where ispic=1"
	picsql="Select id,title,picture From article where picture<>null and ispic=1 order by id desc"
	picrs.open picsql,conn,1,1
	
	if not picrs.eof then
	for i=1 to newhdpicnum
	picjsstr=picjsstr&"imgUrl["&i&"]='"&picrs("picture")&"';"& vbCrLf
	picjsstr=picjsstr&"imgLink["&i&"]='article/"&picrs("id")&".html';"& vbCrLf
	picjsstr=picjsstr&"imgtext["&i&"]='"&picrs("title")&"';"& vbCrLf
	picrs.movenext
	if  picrs.EOF then exit for
	next
	end if
	picrs.close
	set picrs=nothing
	
	voteincdir = server.mappath("../include/rolpic3.js")
	picjsstr=picjsstr&getfile(voteincdir) 
	picjsstr=picjsstr&"</script>"& vbCrLf
	newpic=picjsstr

%>



