BVB Source Codes

Jie Yang v0.6.3 article system Show createtemplate.asp Source code

Return Download Jie Yang v0.6.3 article system: download createtemplate.asp Source code - Download Jie Yang v0.6.3 article system Source code - Type:.asp
  1. <%
  2. '生成所有模板
  3. Sub CreateTemplate()
  4.         On error resume Next
  5.         Dim Fso,FileName,Template_Con
  6.         Set Fso=Server.CreateObject("Scripting.FileSystemObject")
  7.         sql="select P_folder,T_id,T_cid,T_type,T_content,T_isdefault from Article_Template,Article_TemplateProject where P_id=T_pid and P_isdefault=1"
  8.     set rs=server.CreateObject ("Adodb.recordset")
  9.         rs.open sql,conn,1,3
  10.         if not rs.eof then
  11.                 TemplateDirs=rs("P_folder")
  12.                 '如果方案文件夹不存在则创建
  13.                 if not fso.FolderExists(server.MapPath(InstallDir&"Templates/"&TemplateDirs)) Then    '判断文件夹是否存在
  14.                         fso.CreateFolder (server.MapPath(InstallDir&"templates/"&TemplateDirs))
  15.                 end if
  16.                
  17.                 Do While Not(rs.Eof)           
  18.                         TemplateID=rs("T_id")
  19.                         ChannelID=rs("T_cid")
  20.                         TemplateContent=rs("T_content")
  21.                         IsDefault=rs("T_isdefault")
  22.                         typeid=rs("T_type")
  23.                         TemplateContent=ReplaceAllLabel(TemplateContent)
  24.                         Fso.CreateTextFile(Server.MapPath("../../Templates/"&TemplateDirs&"/T_"&ChannelID&"_"&typeid&"_"&TemplateID&".html")).WriteLine(TemplateContent)
  25.                         if IsDefault=1 then
  26.                                 Fso.CreateTextFile(Server.MapPath("../../Templates/"&TemplateDirs&"/T_"&ChannelID&"_"&typeid&"_0.html")).WriteLine(TemplateContent)
  27.                         end if
  28.                 rs.MoveNext
  29.                 Loop
  30.         end if
  31.         rs.close
  32.         set rs=nothing
  33.         Set Fso=Nothing
  34. End Sub
  35. %>
downloadcreatetemplate.asp Source code - Download Jie Yang v0.6.3 article system Source code
Related Source Codes/Software:
Jilin classification information release system v5.0 trial version - A ready-made classifieds site publishing system, h... 2016-09-21
Linyi CMS v6.5 market classification information - A. supply and demand information function: informa... 2016-09-21
Tesco discount net SQL version - And presentations, faster. 2016-09-21
- electronic enterprise website management system In a fully functional version - Super suitable for enterprise agents build a corpo... 2016-09-21
Rio mesh network hard disk system v3.0 - System functions: 1, increase the progress of Asp... 2016-09-21
Classified information network business in suzhou - Overall module: classification of supply and deman... 2016-09-21
NPOINT virtual host v1.7.0 formal version management system - The system main function is introduced 2016-09-21
IDC sales web site - Beautiful IDC sales web site source code 2016-09-21
Oo 126 CMS movie site system - This procedure ASP + ACC/ASP + SQL, using new kern... 2016-09-21
Pcook CMS bubble guest v3.0 SDCMS version - Developed by Asp+Access, and meet the needs of sma... 2016-09-21
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top