%
if IsObject(getSQLConnection()) then
set objConn=getSQLConnection()
else
Response.Redirect("error/?id=1")
end if
intPage=Request.QueryString("intPage")
if IsInteger32(intPage) then
intPage=CLng(intPage)
else
intPage=1
end if
intParamCount=0
strParamName=""
strParamValue=""
strSQL="SELECT NEWS_ID,NEWS_CAT,CONTENT_TYPE,NEWS_DATE,NEWS_TITLE,NEWS_CONTENT FROM URT_NEWS_CN WHERE APPROVED='1' AND (ONLINE_DATE IS NULL OR (ONLINE_DATE IS NOT NULL AND DATEDIFF(d,ONLINE_DATE,GETDATE())>=0)) AND (OFFLINE_DATE IS NULL OR (OFFLINE_DATE IS NOT NULL AND DATEDIFF(d,GETDATE(),OFFLINE_DATE)>=0)) ORDER BY LAST_MOD_DATE DESC"
set objRS=objConn.Execute(strSQL)
if not objRS.eof then
aryNews=objRS.GetRows()
lngRecordCount=UBound(aryNews,2)+1
if lngRecordCount mod 10 = 0 then
lngPageCount=lngRecordCount\10
else
lngPageCount=lngRecordCount\10+1
end if
if intPage>lngPageCount then intPage=lngPageCount
intStartIndex=(intPage-1)*10
intEndIndex=intPage*10-1
if intEndIndex>lngRecordCount-1 then intEndIndex=lngRecordCount-1
for intCount=intStartIndex to intEndIndex
select case aryNews(1,intCount)
case 0
strBullet="news_icon_news.gif"
case 1
strBullet="news_icon_evens.gif"
case 2
strBullet="news_icon_3.gif"
case 3
strBullet="news_icon_other.gif"
end select
if aryNews(2,intCount)="1" then
strNewsContentUrl=aryNews(5,intCount)
strContentTarget=" target=""_blank"""
else
strNewsContentUrl="investor_newscon.asp?id=" & aryNews(0,intCount) & "&intPage=" & intPage
strContentTarget=""
end if
if len(aryNews(4,intCount))>20 then
strNewsTitle=getEncodedText(left(aryNews(4,intCount),20),false) & ".."
else
strNewsTitle=getEncodedText(aryNews(4,intCount),false)
end if
if len(aryNews(5,intCount))>50 then
strNewsContent=getEncodedText(left(aryNews(5,intCount),50),false) & ".."
else
strNewsContent=getEncodedText(aryNews(5,intCount),false)
end if
strNewsList=strNewsList & "
" & vbcrlf
next
strPageAttr=PageUpDown("news.asp",intPage,lngPageCount,lngRecordCount,intParamCount,strParamName,strParamValue,"c",3,"pg","pgdis","","pginfo")
end if
if strNewsList="" then
strNewsList=strNewsList & "
" & vbcrlf
strNewsList=strNewsList & "
" & vbcrlf
strNewsList=strNewsList & "
目前沒有任何最新消息
" & vbcrlf
strNewsList=strNewsList & "
" & vbcrlf
strNewsList=strNewsList & "
" & vbcrlf
end if
%>
United Radiant Technology Corp