<!--#include file="City_include.asp"-->
<%
Function Get_www654cn_Cityinfo()

End Function

Function Get_www654cn_Demo(demoid) '读出模版文件
  demoid=cint(demoid)
  set rs_demo = server.CreateObject ("Adodb.recordset")
      sql_demo="select * from www654cn_DEMO where ifuse=1 and demoid="&demoid&""
      rs_demo.open sql_demo,conn,1,1
  if rs_demo.eof and rs_demo.bof then 
     response.write "<SCRIPT LANGUAGE=JavaScript>alert (' 魔棒不存在或没有开启！');javascript:history.back();</script>"
     response.end
  Else
     Get_www654cn_Demo=rs_demo("demohtml")
  End if
  rs_demo.close
  set rs_demo=nothing
End Function

Function Get_www654cn_replace(okfile,n) '替换模板数据 n=1 行业主页,2分页,3
select case n
       case "1"
           okfile = replace(okfile,"{www654cn_space12}",www654cn_space12)  '主打分站
           okfile = replace(okfile,"{www654cn_space13}",www654cn_space13)  '热门网址

           okfile = replace(okfile,"{classname}",classname)     '分类名
           okfile = replace(okfile,"{class_navigation}",class_navigation)     '分类导航条
           okfile = replace(okfile,"{wangzhandenglu}",wzdl)     '网站登陆
           okfile = replace(okfile,"{linkdl}",linkdl)           '申请此类的友情连接
           okfile = replace(okfile,"{newsday}",newsday)         '更新日期。。。。654。cn
           okfile = replace(okfile,"{classlist}",classlist)     '分类列表 如： mp3下载  |  在线听歌
           okfile = replace(okfile,"{urllist}",urllist)         '网址列表
           okfile = replace(okfile,"{sortlink}",sortlink)
           okfile = replace(okfile,"{sortlinklogo}",sortlinklogo)
           okfile = replace(okfile,"{sorthot}",sorthot)
           okfile = replace(okfile,"{gjc}",ymgjc)               '分类说明。。
           okfile = replace(okfile,"{titlename}",titlename)     '子分类名称。。
           okfile = replace(okfile,"{url}",weburl)              '网站地址
           okfile = replace(okfile,"{email}",webemail)          '电子邮件
           okfile = replace(okfile,"{webtitle}",webtitle)       '网页标题
           okfile = replace(okfile,"{webstat}",webstat2)        '版权声明
           okfile = replace(okfile,"{memo}",webdescription)     '网站描述
           okfile = replace(okfile,"{copyright}",webcopyright)
           okfile = replace(okfile,"{copyrightV}",webcopyrightV)
           okfile = replace(okfile,"{logo2}",weblogo2)          '顶端logo地址
           okfile = replace(okfile,"{keywords}",keywords)    '关键字设置
           okfile = replace(okfile,"{webgao}",webgao)           '网站公告
           okfile = replace(okfile,"{TongJi}",TongJi)           '网站统计
       case "2"
         response.write "出错了！！！654"
         response.end
       case else
         response.write "出错了！！！654"
         response.end
end select
okfile = replace(okfile,"{www654cn_24_MingZhan}",www654cn_MingZhan)           '
okfile = replace(okfile,"{indexlist}",indexlist)   
okfile = replace(okfile,"{Classlist}",Classlist) 

okfile = replace(okfile,"{Classname}",Classname)     '城市名称。如：上海工作。
okfile = replace(okfile,"{Cityname}",Cityname)       '城市名称。如：上海。
okfile = replace(okfile,"{CitynameE}",CitynameE)     '城市English名称。如：shanghai。
okfile = replace(okfile,"{CitynameUrl}",CitynameUrl)     '城市名称。如：BeiJing_Fangchan。
okfile = replace(okfile,"{Weather}",Weather)     '城市名称。如：BeiJing_Fangchan。

'okfile = replace(okfile,"{Classlist}",Classlist)  
'okfile = replace(okfile,"{Classlist}",Classlist)  

Get_www654cn_replace=okfile
End Function

Function Get_www654cn_replace_ads(okfile) ' 广告替换 如：{www654cn_ads1}{www654cn_ads2}
set rs_ads=server.createobject("adodb.recordset")               
sql_ads="select * from www654cn_ADS"          
rs_ads.open sql_ads,conn,1,1
while not rs_ads.eof 
  adsurl=rs_ads("url")
  adsads=rs_ads("ads")
  adsjs=rs_ads("js")
  adsclass=rs_ads("class")
  adsx=rs_ads("x")
  adsy=rs_ads("y")
  adsm=rs_ads("m")
  n=rs_ads("编号")
  adsopen=rs_ads("open")
  www654cn_ads=""
  if adsopen=true then
     Select case adsclass
            case 1
                 www654cn_ads=www654cn_ads&"<a href="""&adsurl&""" target=""_blank""><img src="""&adsads&""" width="""&adsx&""" height="""&adsy&""" border=""0""></a>"
            case 2
                 www654cn_ads=www654cn_ads&"<object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0 width="&adsx&" height="&adsy&"><param name=movie value="&adsads&"><param name=quality value=high>"
                 www654cn_ads=www654cn_ads&"<embed src="""&adsads&""" quality=high pluginspage=http://www.macromedia.com/go/getflashplayer type=application/x-shockwave-flash width="&adsx&" height="&adsy&"></embed></object>"
            case 3
                 www654cn_ads=www654cn_ads&"<a href="""&adsurl&""" target=""_blank"">"&adsads&"</a>"
            case 4
                 www654cn_ads=www654cn_ads&""&adsjs&""
     End Select
  End if
  ads="{www654cn_ads"&n&"}"
  okfile = replace(okfile,ads,www654cn_ads)  'ads1
 ' response.write ads
  rs_ads.movenext
wend
rs_ads.close
set rs_ads=nothing
Get_www654cn_replace_ads=okfile
End Function

Function Get_www654cn_Createtextfile(okfile,fpath,filename)   '（内容，路径，文件名）
 Set fso = Server.CreateObject("Scripting.FileSystemObject")
 If NOT  fso.folderexists (server.mappath(fpath)) then   '判断路径
         fso.CreateFolder (server.mappath(fpath))
 End If

 Set fout = fso.Createtextfile(server.mappath(fpath&"/"&filename),true)
     fout.write(okfile)
     fout.close
End Function

%>