TSYS一个新闻多种特性时如何进行前台更新?(2)
Sql="Select Top 8 Title,FilePath,AddTime From view_NewsInfo Where dbo.IsSpeciality(Speciality,'18')>0 order By Id DESC"
Set Rs=Conn.ExeCute(Sql)
While Not Rs.Eof
strHtml=strHtml&"·[" & StrClass.FormatMyDate(Rs("AddTime"),"{m}/{d}") & "]<a href=""" & Rs("FilePath") & """ target=""_blank"">" & Rs("Title") & "</a><br>" & vbCrLf
Rs.MoveNext
Wend
Rs.Close
Set Rs=Nothing
With TClass
.OpenTemplate(TemplateFilePath)
.StartElement="<!--DownRecommand:start-->"
.EndElement="<!--DownRecommand:end-->"
.Value=strHtml
.ReplaceTemplate()
.Save()
End With
Set TClass=Nothing
End Function