<% Dim template ,page,channel,classid Dim i,rs Set rs = Server.CreateObject("adodb.recordset") id = Isnumer( safeRequest("id",0) , 0 ) page = Isnumer( safeRequest("page",0) , 1 ) classid = Isnumer( safeRequest("classid",0) , 0) province= isnumer(safeRequest("province",0),0) city = isnumer(safeRequest("city",0),0) keyword = safeRequest("keyword",0) channel = 4 '指定模板路径 tpl.cache.Folder = "/" & sitePath & "include/template/" template = tpl.cache.read("store.html") '注册系统变量 tpl.assign "SiteName",SiteName tpl.assign "SiteTitle",SiteTitle tpl.assign "SiteAddress",SiteAddress tpl.assign "SiteEmail",SiteEmail tpl.assign "SiteVideo",SiteVideo tpl.assign "SiteBottom",SiteBottom tpl.assign "SitePath",SitePath tpl.assign "page",page tpl.assign "province",province tpl.assign "city",city tpl.assign "keyword",keyword '查询频道 tpl.assign "channelid" , channel tpl.assign "classid" , classid rs.open "select * from channel where id="&channel,conn,1,1 if not rs.eof then For i = 0 TO rs.fields.count - 1 tpl.assign "chr" & rs.fields(i).name , rs.fields(i).Value Next End If Rs.close rs.open "select * from channel where id="&classid,conn,1,1 if not rs.eof then For i = 0 TO rs.fields.count - 1 tpl.assign "cls" & rs.fields(i).name , rs.fields(i).Value Next End If Rs.close '读取模板 call tpl.display(template,true) '关闭数据库 Set tpl = nothing call closedb() %>