Cls_Js.asp
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:88k
源码类别:

数据库编程

开发平台:

ASP/ASPX

  1. <%'Copyright (c) 2006 Foosun Inc. Code by Einstein.Liu
  2. Class Cls_Js
  3. private ns_id,ns_ename,ns_cname,ns_js_type,ns_manner,ns_picWidth,ns_picHeight,ns_newsNum,ns_newsTitleNum,ns_titleCSS,ns_contentCSS
  4. private ns_backCSS,ns_rowNum,ns_picPath,ns_addTime,ns_showTimeTF,ns_contentNum,ns_naviPic,ns_dateType,ns_dateCss,ns_info
  5. private ns_moreContent,ns_LinkWord,ns_LinkCSS,ns_rowSpace,ns_rowBettween,ns_openMode
  6. Private TempSysRootDir
  7. Private ListSpace,ListSpaceStr,Temp_i,TableCellSpace,TitleSpace,TitleSpaceStr,MoreContentStr
  8. '获得自由js的参数
  9. public Function getFreeJsParam(jsid)
  10. Dim F_FreeJsParam_Rs,sql_statement
  11. Set F_FreeJsParam_Rs=Server.CreateObject(G_FS_RS)
  12. sql_statement="select ID,EName,CName,Type,Manner,PicWidth,PicHeight,NewsNum,NewsTitleNum,TitleCSS,ContentCSS,BackCSS,RowNum,PicPath,AddTime,ShowTimeTF,ContentNum,NaviPic,DateType,DateCSS,Info,MoreContent,LinkWord,LinkCSS,RowSpace,RowBettween,OpenMode from FS_NS_FreeJS where id="&jsid
  13. F_FreeJsParam_Rs.open sql_statement,Conn,1,1
  14. if not F_FreeJsParam_Rs.eof and not F_FreeJsParam_Rs.bof then
  15. ns_id=F_FreeJsParam_Rs("ID")
  16. ns_ename=F_FreeJsParam_Rs("EName")
  17. ns_cname=F_FreeJsParam_Rs("CName")
  18. ns_js_type=F_FreeJsParam_Rs("Type")
  19. ns_manner=F_FreeJsParam_Rs("Manner")
  20. ns_picWidth=F_FreeJsParam_Rs("PicWidth")
  21. ns_picHeight=F_FreeJsParam_Rs("PicHeight")
  22. ns_newsNum=F_FreeJsParam_Rs("NewsNum")
  23. ns_newsTitleNum=F_FreeJsParam_Rs("NewsTitleNum")
  24. ns_titleCSS=F_FreeJsParam_Rs("TitleCSS")
  25. ns_contentCSS=F_FreeJsParam_Rs("ContentCSS")
  26. ns_backCSS=F_FreeJsParam_Rs("BackCSS")
  27. ns_rowNum=F_FreeJsParam_Rs("RowNum")
  28. ns_picPath=F_FreeJsParam_Rs("PicPath")
  29. ns_addTime=F_FreeJsParam_Rs("AddTime")
  30. ns_showTimeTF=F_FreeJsParam_Rs("ShowTimeTF")
  31. ns_contentNum=F_FreeJsParam_Rs("ContentNum")
  32. ns_naviPic=F_FreeJsParam_Rs("NaviPic")
  33. ns_dateType=F_FreeJsParam_Rs("DateType")
  34. ns_dateCss=F_FreeJsParam_Rs("DateCSS")
  35. ns_info=F_FreeJsParam_Rs("Info")
  36. ns_moreContent=F_FreeJsParam_Rs("MoreContent")
  37. ns_LinkWord=F_FreeJsParam_Rs("LinkWord")
  38. ns_LinkCSS=F_FreeJsParam_Rs("LinkCSS")
  39. ns_rowSpace=F_FreeJsParam_Rs("RowSpace")
  40. ns_rowBettween=F_FreeJsParam_Rs("RowBettween")
  41. ns_openMode=F_FreeJsParam_Rs("OpenMode")
  42. End if
  43. End Function
  44. '赋值
  45. public Property get id()'Free JS id
  46. id=ns_id
  47. End Property 
  48. public Property get ename()' Free Js 英文名
  49. ename=ns_ename
  50. End Property
  51. public Property get cname()' Free Js 中文名
  52. cname=ns_cname
  53. End Property
  54. public Property get js_type()' 类型(0为文字,1为图片)
  55. js_type=ns_js_type
  56. End Property
  57. public Property get manner()' 样式(1-5 为文字样式,6-17为图片样式)(暂)
  58. manner=ns_manner
  59. End Property
  60. public Property get picWidth()' 图片宽度
  61. picWidth=ns_picWidth
  62. End Property
  63. public Property get picHeight()' 图片高度
  64. picHeight=ns_picHeight
  65. End Property
  66. public Property get newsNum()' 允许调用新闻条数
  67. newsNum=ns_newsNum
  68. End Property
  69. public Property get newsTitleNum()'新闻标题字数
  70. newsTitleNum=ns_newsTitleNum
  71. End Property
  72. public Property get titleCSS()' 新闻标题样式
  73. titleCSS=ns_titleCSS
  74. End Property
  75. public Property get contentCSS()' 新闻内容样式
  76. contentCSS=ns_contentCSS
  77. End Property
  78. public Property get backCSS() 'JS背景样式
  79. backCSS=ns_backCSS
  80. End Property
  81. public Property get rowNum()' 每行并排条数(不能为”0”)
  82. rowNum=ns_rowNum
  83. End Property
  84. public Property get picPath()' 为某种样式备用
  85. picPath=ns_picPath
  86. End Property
  87. public Property get addTime()' Free Js添加时间
  88. addTime=ns_addTime
  89. End Property
  90. public Property get showTimeTF()'是否在新闻标题后显示新闻时间(“0”为否,”1” 为是)
  91. showTimeTF=ns_showTimeTF
  92. End Property
  93. public Property get contentNum()' Free Js 新闻内容字数
  94. contentNum=ns_contentNum
  95. End Property
  96. public Property get naviPic()' Free Js 新闻标题导航图片
  97. naviPic=ns_naviPic
  98. End Property
  99. public Property get dateType()' Free Js 日期样式(1-15)
  100. dateType=ns_dateType
  101. End Property
  102. public Property get dateCSS()' Free Js 日期CSS样式
  103. dateCSS=ns_dateCSS
  104. End Property
  105. public Property get info()' Free Js 备注
  106. info=ns_info
  107. End Property
  108. public Property get moreContent()' Free Js 更多链接(新闻内容)
  109. moreContent=ns_moreContent
  110. End Property
  111. public Property get linkWord()' Free Js 链接文字或是图片
  112. linkWord=ns_linkWord
  113. End Property
  114. public Property get linkCSS()' Free Js 链接样式表
  115. linkCSS=ns_linkCSS
  116. End Property
  117. public Property get rowSpace()' Free Js 新闻行距
  118. rowSpace=ns_rowSpace
  119. End Property
  120. public Property get rowBettween()'行间图片
  121. rowBettween=ns_rowBettween
  122. End Property
  123. public Property get openMode()'窗口打开方式
  124. openMode=ns_openMode
  125. End Property
  126. '----------------------------------------------
  127. Public Property Let SysRootDir(ExteriorValue)
  128. TempSysRootDir = ExteriorValue
  129. End Property
  130. '----------------------------------------------
  131. Public Function GetOneNewsLinkURL(NewsID)
  132. Dim DoMain,TempParentID,RsParentObj,RsDoMainObj,ReturnValue
  133. Dim CheckRootClassIndex,CheckRootClassNumber,TempClassSaveFilePath
  134. Dim NewsSql,RsNewsObj
  135. '-----------------------/l
  136. dim DatePathStr
  137. CheckRootClassNumber = 30
  138. ReturnValue = ""
  139. NewsSql = "Select SavePath,FileName,ClassEName,FS_NS_News.IsURL as IsURL,FS_NS_News.SaveNewsPath,FS_NS_News.URLAddress as URLAddress,FS_NS_NewsClass.ParentID as ParentID,FS_NS_NewsClass.[Domain] as [Domain],FS_NS_NewsClass.FileExtName as ClassFileExtName,FS_NS_News.FileExtName as NewsFileExtName from FS_NS_News,FS_NS_NewsClass where FS_NS_News.ClassID=FS_NS_NewsClass.ClassID and FS_NS_News.isLock=0 and FS_NS_News.NewsID='" & NewsID & "'"
  140. Set RsNewsObj = Conn.Execute(NewsSql)
  141. if RsNewsObj.Eof then
  142. Set RsNewsObj = Nothing
  143. GetOneNewsLinkURL = ""
  144. Exit Function
  145. else
  146. if RsNewsObj("IsURL") = 1 then'是否是标题新闻
  147. ReturnValue = RsNewsObj("URLAddress")
  148. else
  149. if RsNewsObj("ParentID") <> "0" then
  150. Set RsParentObj = Conn.Execute("Select ParentID,[Domain] from FS_NS_NewsClass where ClassID='" & RsNewsObj("ParentID") & "'")
  151. if Not RsParentObj.Eof then
  152. CheckRootClassIndex = 1
  153. TempParentID = RsParentObj("ParentID")
  154. do while Not (TempParentID = "0")
  155. CheckRootClassIndex = CheckRootClassIndex + 1
  156. RsParentObj.Close
  157. Set RsParentObj = Nothing
  158. Set RsParentObj = Conn.Execute("Select ParentID,[Domain] from FS_NS_NewsClass where ClassID='" & TempParentID & "'")
  159. if RsParentObj.Eof then
  160. Set RsParentObj = Nothing
  161. Set RsNewsObj = Nothing
  162. GetOneNewsLinkURL = ""
  163. Exit Function
  164. end if
  165. TempParentID = RsParentObj("ParentID")
  166. if CheckRootClassIndex > CheckRootClassNumber then TempParentID = "0" '防止死循环
  167. Loop
  168. DoMain = RsParentObj("DoMain")
  169. Set RsParentObj = Nothing
  170. else
  171. Set RsParentObj = Nothing
  172. Set RsNewsObj = Nothing
  173. GetOneNewsLinkURL = ""
  174. Exit Function
  175. end if
  176. else
  177. DoMain = RsNewsObj("DoMain")
  178. end if
  179. '---------------/l
  180. Dim LinkType
  181. LinkType=Conn.execute("Select LinkType from FS_NS_SysParam")(0)
  182. If LinkType=1 Then
  183. If IsNull(DoMain) Or DoMain="" Then
  184. DatePathStr=Conn.execute("Select MF_Domain from FS_MF_Config")(0) &"/"& RsNewsObj("SavePath")&"/"&RsNewsObj("ClassEName")&"/"&RsNewsObj("FileName")&"."&RsNewsObj("NewsFileExtName")
  185. if instr(lcase(DatePathStr),"http://")=0 then
  186. DatePathStr="http://"&Replace(DatePathStr,"//","/")
  187. else
  188. DatePathStr="http://"&Replace(mid(DatePathStr,len("http://")+1),"//","/")
  189. end if
  190. Elseif Not IsNull(DoMain) And (DoMain <> "") then
  191. DatePathStr = DoMain &"/" & RsNewsObj("FileName") & "." & RsNewsObj("NewsFileExtName")
  192. if instr(lcase(DatePathStr),"http://")=0 then DatePathStr="http://"&Replace(DatePathStr,"//","/")
  193. End if
  194. ElseIf LinkType=0 then
  195. 'DatePathStr =RsNewsObj("SavePath")&"/"&RsNewsObj("ClassEName")&"/"& RsNewsObj("FileName") & "." & RsNewsObj("NewsFileExtName")
  196. DatePathStr =RsNewsObj("SavePath")&"/"&RsNewsObj("ClassEName")&RsNewsObj("SaveNewsPath")&"/" & RsNewsObj("FileName") & "." & RsNewsObj("NewsFileExtName")
  197. End if
  198. End If
  199. End if 
  200. Set RsNewsObj = Nothing
  201. GetOneNewsLinkURL = DatePathStr
  202. End Function
  203. '-----自由JS时间格式化
  204. Public Function  DateFormat(DateStr,Types)
  205. Dim DateString
  206. if IsDate(DateStr) = False then
  207. DateString = ""
  208. end if
  209. Select Case Types
  210.   Case "1" 
  211.   DateString = Year(DateStr)&"-"&Month(DateStr)&"-"&Day(DateStr)
  212.   Case "2"
  213.   DateString = Year(DateStr)&"."&Month(DateStr)&"."&Day(DateStr)
  214.   Case "3"
  215.   DateString = Year(DateStr)&"/"&Month(DateStr)&"/"&Day(DateStr)
  216.   Case "4"
  217.   DateString = Month(DateStr)&"/"&Day(DateStr)&"/"&Year(DateStr)
  218.   Case "5"
  219.   DateString = Day(DateStr)&"/"&Month(DateStr)&"/"&Year(DateStr)
  220.   Case "6"
  221.   DateString = Month(DateStr)&"-"&Day(DateStr)&"-"&Year(DateStr)
  222.   Case "7"
  223.   DateString = Month(DateStr)&"."&Day(DateStr)&"."&Year(DateStr)
  224.   Case "8"
  225.   DateString = Month(DateStr)&"-"&Day(DateStr)
  226.   Case "9"
  227.   DateString = Month(DateStr)&"/"&Day(DateStr)
  228.   Case "10"
  229.   DateString = Month(DateStr)&"."&Day(DateStr)
  230.   Case "11"
  231.   DateString = Month(DateStr)&"月"&Day(DateStr)&"日"
  232.   Case "12"
  233.   DateString = Day(DateStr)&"日"&Hour(DateStr)&"时"
  234.   case "13"
  235.   DateString = Day(DateStr)&"日"&Hour(DateStr)&"点"
  236.   Case "14"
  237.   DateString = Hour(DateStr)&"时"&Minute(DateStr)&"分"
  238.   Case "15"
  239.   DateString = Hour(DateStr)&":"&Minute(DateStr)
  240.   Case "16"
  241.   DateString = Year(DateStr)&"年"&Month(DateStr)&"月"&Day(DateStr)&"日"
  242.   Case Else
  243.   DateString = DateStr
  244.  End Select
  245.  DateFormat = DateString
  246.  End Function
  247.  '---------------------------------------------
  248. Public Function LoseHtml(ContentStr)
  249. Dim ClsTempLoseStr,regEx
  250. If ContentStr="" Or IsNull(ContentStr) Then Exit function
  251. ClsTempLoseStr = Cstr(ContentStr)
  252. Set regEx = New RegExp
  253. regEx.Pattern = "</*[^<>]*>"
  254. regEx.IgnoreCase = True
  255. regEx.Global = True
  256. ClsTempLoseStr = regEx.Replace(ClsTempLoseStr,"")
  257. LoseHtml = ClsTempLoseStr
  258. End Function
  259. '---------------------------------------------
  260. Function GotTopic(Str,StrLen)
  261. Dim l,t,c,i
  262. If StrLen=0 then
  263. GotTopic=""
  264. exit function
  265. End If
  266. if IsNull(Str) then 
  267. GotTopic = ""
  268. Exit Function
  269. end if
  270. if Str = "" then
  271. GotTopic=""
  272. Exit Function
  273. end if
  274. Str=Replace(Replace(Replace(Replace(Str,"&nbsp;"," "),"&quot;",Chr(34)),"&gt;",">"),"&lt;","<")
  275. l=len(str)
  276. t=0
  277. strlen=Clng(strLen)
  278. for i=1 to l
  279. c=Abs(Asc(Mid(str,i,1)))
  280. if c>255 then
  281. t=t+2
  282. else
  283. t=t+1
  284. end if
  285. if t>=strlen then
  286. GotTopic=left(str,i)
  287. exit for
  288. else
  289. GotTopic=str
  290. end if
  291. next
  292. GotTopic = Replace(Replace(Replace(Replace(GotTopic," ","&nbsp;"),Chr(34),"&quot;"),">","&gt;"),"<","&lt;")
  293. end Function
  294. '-----------------------------------------------------
  295. Private Function ListTitle(TitleStr,TitleNum)
  296.    Dim ClsTitleStr,ClsTitleNum,i,j,ClsTempNum,k,ClsTitleStrResult,LeftStr,RightStr
  297.    ClsTitleNum = Cint(TitleNum)
  298.    ClsTempNum = Len(Cstr(TitleStr))
  299.    if ClsTitleNum > ClsTempNum then
  300.    ClsTitleNum = ClsTempNum
  301.    end if
  302.    ClsTitleStr = Left(Cstr(TitleStr),ClsTitleNum)
  303.    Dim TempStr
  304.    For i = 1 to ClsTitleNum - 1
  305.    TempStr = TempStr & Mid(ClsTitleStr,i,1) & "<br>"
  306.    Next
  307.    TempStr = TempStr & Right(ClsTitleStr,1)
  308.    ListTitle = TempStr
  309. End Function
  310.  '生成函数
  311. Public Function WCssA(EName,CreateFileTF)
  312. Dim ClsJSObj,ClsJSFileObj,ClsFileSql,ClsNewsObj,TempEName,JSCodeStr,i,MyFile,CrHNJS,OpenMode
  313. Set ClsJSObj = Conn.Execute("Select ID,EName,CName,Type,Manner,PicWidth,PicHeight,NewsNum,NewsTitleNum,TitleCSS,ContentCSS,BackCSS,RowNum,PicPath,AddTime,ShowTimeTF,ContentNum,NaviPic,DateType,DateCSS,Info,MoreContent,LinkWord,LinkCSS,RowSpace,RowBettween,OpenMode From FS_NS_FreeJS Where EName='"&EName&"'")
  314. If Not ClsJSObj.eof then
  315.   JSCodeStr = "document.write('<table class="""&ClsJSObj("BackCSS")&""" width=""100%"" border=""0"" cellpadding=""0"" cellspacing="""&ClsJSObj("RowSpace")&"""><tr>"
  316.   Set ClsJSFileObj=server.createobject(G_FS_RS)
  317.   ClsFileSql="Select ID,Title,JSName,FileName,PicPath,ClassID,NewsTime,ToJsTime,DelFlag From FS_NS_FreeJSFile where JSName='"&EName&"' and DelFlag=0 order by ToJsTime desc"
  318.   ClsJSFileObj.open ClsFileSql,Conn,1,1
  319.   If ClsJSFileObj.eof then
  320. JSCodeStr = JSCodeStr & "<td>此JS内暂无新闻</td>"
  321.   End If
  322.   If ClsJSObj("OpenMode")=1 then
  323.   OpenMode = "target=_blank"
  324.   Else
  325.   OpenMode = "target=_self"
  326.   End If
  327.   for i=1 to ClsJSObj("NewsNum")
  328.   If ClsJSFileObj.eof then Exit For
  329.   Set ClsNewsObj = Conn.Execute("Select ID,NewsID,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress,Content,isPicNews,NewsPicFile,NewsSmallPicFile,PicborderCss,Templet,isPop,Source,Editor,Keywords,Author,SaveNewsPath,FileName,FileExtName,NewsProperty,TodayNewsPic,isLock,isRecyle,addtime  From FS_NS_News where FileName='"&ClsJSFileObj("FileName")&"'")
  330.   If ClsJSObj("ShowTimeTF")="1" then
  331.   JSCodeStr = JSCodeStr &"<td valign=middle ><img src="""&ClsJSObj("NaviPic")&""" /><a class="""&ClsJSObj("TitleCSS")&""" href=" & GetOneNewsLinkURL(ClsNewsObj("NewsID")) &" "&OpenMode&">"&GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum"))&"</a></td><td><Span class="""&ClsJSObj("DateCSS")&""">"&DateFormat(ClsNewsObj("AddTime"),""&ClsJSObj("DateType")&"")&"</Span></td>"
  332.   Else
  333.   JSCodeStr = JSCodeStr &"<td valign=middle><img src="""&ClsJSObj("NaviPic")&""" /><a class="""&ClsJSObj("TitleCSS")&""" href=" & GetOneNewsLinkURL(ClsNewsObj("NewsID")) &" "&OpenMode&">"&GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum"))&"</a></td>"
  334.   End If
  335.   ClsNewsObj.Close
  336.   Set ClsNewsObj = Nothing
  337.   ClsJSFileObj.MoveNext
  338.   if i mod Cint(ClsJSObj("RowNum")) = 0 or ClsJSFileObj.eof then
  339. if ClsJSObj("ShowTimeTF")=1 then
  340.   JSCodeStr = JSCodeStr &"</tr><tr><td colspan="""&Cint(ClsJSObj("RowNum"))*2&""" height="""&ClsJSObj("RowSpace")&""" background="""& ClsJSObj("RowBettween")&"""></td></tr><tr>"
  341. else
  342.   JSCodeStr = JSCodeStr &"</tr><tr><td colspan="""&Cint(ClsJSObj("RowNum"))&""" height="""&ClsJSObj("RowSpace")&""" background="""& ClsJSObj("RowBettween")&"""></td></tr><tr>"
  343. end if
  344.   end if
  345.   next 
  346.   ClsJSFileObj.Close 
  347.   Set ClsJSFileObj = Nothing 
  348.   JSCodeStr = JSCodeStr & "</tr></table>');"
  349.   JSCodeStr = Replace(JSCodeStr,"<tr></tr>","")
  350.   JSCodeStr = Replace(Replace(JSCodeStr,Chr(13),""),Chr(10),"")
  351.   Set MyFile=Server.CreateObject(G_FS_FSO)
  352.   If MyFile.FileExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js") then
  353.  MyFile.DeleteFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  354.   End If
  355.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS")) Then
  356. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS"))
  357.   End if
  358.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")) Then
  359. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs"))
  360.   End if
  361.   Set CrHNJS=MyFile.CreateTextFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  362.   CrHNJS.write JSCodeStr
  363.   Set MyFile=nothing
  364.   '---------
  365.   ClsJSObj.Close
  366.   Set ClsJSObj = Nothing
  367. Else
  368. WCssA = "生成JS文件时未找到参数"
  369. End If
  370. End Function 
  371. Public Function WCssB(EName,CreateFileTF)
  372. Dim ClsJSObj,ClsJSFileObj,ClsFileSql,ClsNewsObj,TempEName,JSCodeStr,i,MyFile,CrHNJS,OpenMode
  373. Dim NewsLinkStr
  374. Set ClsJSObj = Conn.Execute("Select ID,EName,CName,Type,Manner,PicWidth,PicHeight,NewsNum,NewsTitleNum,TitleCSS,ContentCSS,BackCSS,RowNum,PicPath,AddTime,ShowTimeTF,ContentNum,NaviPic,DateType,DateCSS,Info,MoreContent,LinkWord,LinkCSS,RowSpace,RowBettween,OpenMode From FS_NS_FreeJS Where EName='"&EName&"'")
  375. If Not ClsJSObj.eof then
  376.   JSCodeStr = "document.write('<table class="""&ClsJSObj("BackCSS")&""" width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr>"
  377.   Set ClsJSFileObj=server.createobject(G_FS_RS)
  378.   ClsFileSql="Select ID,Title,JSName,FileName,PicPath,ClassID,NewsTime,ToJsTime,DelFlag From FS_NS_FreeJSFile where JSName='"&EName&"' and DelFlag=0 order by ToJsTime desc"
  379.   ClsJSFileObj.open ClsFileSql,Conn,1,1
  380.   If ClsJSFileObj.eof then 
  381. JSCodeStr = JSCodeStr & "<td>此JS内暂无新闻</td>"
  382.   end if
  383.   If ClsJSObj("OpenMode")=1 then
  384.   OpenMode = "target=_blank"
  385.   Else
  386.   OpenMode = "target=_self"
  387.   End If
  388. ListSpaceStr = ""
  389. for Temp_i = 1 to Cint(ClsJSObj("RowSpace"))
  390. ListSpaceStr = ListSpaceStr & "&nbsp;"
  391. next 
  392.   for i=1 to ClsJSObj("NewsNum")
  393.   If ClsJSFileObj.eof then Exit For
  394.   Set ClsNewsObj = Conn.Execute("Select ID,NewsID,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress,Content,isPicNews,NewsPicFile,NewsSmallPicFile,PicborderCss,Templet,isPop,Source,Editor,Keywords,Author,SaveNewsPath,FileName,FileExtName,NewsProperty,TodayNewsPic,isLock,isRecyle,addtime From FS_NS_News where FileName='"&ClsJSFileObj("FileName")&"'")
  395.   NewsLinkStr = GetOneNewsLinkURL(ClsNewsObj("NewsID"))
  396.   If ClsJSObj("ShowTimeTF")=1 then
  397.   JSCodeStr = JSCodeStr &"<td width="&Cint(100/Cint(ClsJSObj("RowNum")))&"% valign=""top""><table width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr><td>"& ClsJSObj("NaviPic") &"<a class="""&ClsJSObj("TitleCSS")&""" href=" & NewsLinkStr &" "&OpenMode&">"&GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum"))&"</a></td><td><Span class="""&ClsJSObj("DateCSS")&""">"&DateFormat(ClsNewsObj("AddTime"),""&ClsJSObj("DateType")&"")&"</Span></td><td rowspan=2>"&ListSpaceStr&"</td></tr>"
  398.   Else
  399.   JSCodeStr = JSCodeStr &"<td width="&Cint(100/Cint(ClsJSObj("RowNum")))&"% valign=""top""><table width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr><td>"& ClsJSObj("NaviPic") &"<a class="""&ClsJSObj("TitleCSS")&""" href=" & NewsLinkStr &" "&OpenMode&">"&GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum"))&"</a></td><td rowspan=2>"&ListSpaceStr&"</td></tr>"
  400.   End If
  401.   If ClsJSObj("ShowTimeTF")=1 then
  402. If  ClsJSObj("MoreContent")=1 then
  403.   JSCodeStr = JSCodeStr & "<tr><td colspan=2><Span class="""&ClsJSObj("ContentCSS")&""">"&TitleSpaceStr&left(ClsNewsObj("Content"),ClsJSObj("ContentNum"))&"</Span>......<br><div align=""right""><a class="""&ClsJSObj("LinkCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&ClsJSObj("LinkWord")&"</a></div></td></tr></table></td>"
  404. Else
  405.   JSCodeStr = JSCodeStr & "<tr><td colspan=2><Span class="""&ClsJSObj("ContentCSS")&""">"&TitleSpaceStr&left(ClsNewsObj("Content"),ClsJSObj("ContentNum"))&"</Span>......</td></tr></table></td>"
  406. End If
  407.   Else
  408. If  ClsJSObj("MoreContent")=1 then
  409.   JSCodeStr = JSCodeStr & "<tr><td><Span class="""&ClsJSObj("ContentCSS")&""">"&TitleSpaceStr&GotTopic(Replace(Replace(Replace(Replace(LoseHtml(ClsNewsObj("Content")),chr(13) & chr(10),""),chr(13) & chr(10),""),"[Page]",""),"&nbsp;",""),ClsJSObj("ContentNum"))&"</Span>......<br><div align=""right""><a class="""&ClsJSObj("LinkCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&ClsJSObj("LinkWord")&"</a></div></td></tr></table></td>"
  410. Else
  411.   JSCodeStr = JSCodeStr & "<tr><td><Span class="""&ClsJSObj("ContentCSS")&""">"&TitleSpaceStr&left(ClsNewsObj("Content"),ClsJSObj("ContentNum"))&"</Span>......</td></tr></table></td>"
  412. End If
  413.   End If
  414.   ClsNewsObj.Close
  415.   Set ClsNewsObj = Nothing
  416.   ClsJSFileObj.MoveNext
  417.   if i mod Cint(ClsJSObj("RowNum")) = 0 or ClsJSFileObj.eof then
  418.   JSCodeStr = JSCodeStr &"</tr><tr><td colspan="""&Cint(ClsJSObj("RowNum"))&""" height="""&ClsJSObj("RowSpace")&""" background="""&ClsJSObj("RowBettween")&"""></td></tr><tr>"
  419.   end if
  420.   next 
  421.   ClsJSFileObj.Close 
  422.   Set ClsJSFileObj = Nothing 
  423.   JSCodeStr = JSCodeStr & "</tr></table>');"
  424.   JSCodeStr = Replace(JSCodeStr,"<tr></tr>","")
  425.   JSCodeStr = Replace(Replace(JSCodeStr,Chr(13),""),Chr(10),"")
  426.   if CreateFileTF = True then
  427.   Set MyFile=Server.CreateObject(G_FS_FSO)
  428. If MyFile.FileExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js") then
  429. MyFile.DeleteFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  430. End If
  431.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS")) Then
  432. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS"))
  433.   End if
  434.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")) Then
  435. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs"))
  436.   End if
  437. Set CrHNJS=MyFile.CreateTextFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  438.   CrHNJS.write JSCodeStr
  439.   Set MyFile=nothing
  440.   ClsJSObj.Close
  441.   Set ClsJSObj = Nothing
  442.   else
  443.   WCssB = JSCodeStr
  444.   end if
  445. Else
  446. WCssB = "生成JS文件时未找到参数"
  447. End If
  448. End Function 
  449. Public Function WCssC(EName,CreateFileTF)
  450. Dim ClsJSObj,ClsJSFileObj,ClsFileSql,ClsNewsObj,TempEName,JSCodeStr,i,MyFile,CrHNJS,OpenMode
  451. Dim NewsLinkStr
  452. Set ClsJSObj = Conn.Execute("Select ID,EName,CName,Type,Manner,PicWidth,PicHeight,NewsNum,NewsTitleNum,TitleCSS,ContentCSS,BackCSS,RowNum,PicPath,AddTime,ShowTimeTF,ContentNum,NaviPic,DateType,DateCSS,Info,MoreContent,LinkWord,LinkCSS,RowSpace,RowBettween,OpenMode From FS_NS_FreeJS Where EName='"&EName&"'")
  453. If Not ClsJSObj.eof then
  454.   JSCodeStr = "document.write('<table class="""&ClsJSObj("BackCSS")&""" width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr>"
  455.   Set ClsJSFileObj=server.createobject(G_FS_RS)
  456.   ClsFileSql="Select ID,Title,JSName,FileName,PicPath,ClassID,NewsTime,ToJsTime,DelFlag From FS_NS_FreeJSFile where JSName='"&EName&"' and DelFlag=0 order by ToJsTime desc"
  457.   ClsJSFileObj.open ClsFileSql,Conn,1,1
  458.   If ClsJSFileObj.eof then 
  459. JSCodeStr = JSCodeStr & "<td>此JS内暂无新闻</td></tr>"
  460.   end if
  461.   If ClsJSObj("OpenMode")=1 then
  462.   OpenMode = "target=_blank"
  463.   Else
  464.   OpenMode = "target=_self"
  465.   End If
  466. ListSpaceStr = ""
  467. for Temp_i = 1 to Cint(ClsJSObj("RowSpace"))
  468. ListSpaceStr = ListSpaceStr & "&nbsp;"
  469. next 
  470.   for i=1 to ClsJSObj("NewsNum")
  471.   If ClsJSFileObj.eof then Exit For
  472.   Set ClsNewsObj = Conn.Execute("Select ID,NewsID,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress,Content,isPicNews,NewsPicFile,NewsSmallPicFile,PicborderCss,Templet,isPop,Source,Editor,Keywords,Author,SaveNewsPath,FileName,FileExtName,NewsProperty,TodayNewsPic,isLock,isRecyle,addtime From FS_NS_News where FileName='"&ClsJSFileObj("FileName")&"'")
  473.   NewsLinkStr = GetOneNewsLinkURL(ClsNewsObj("NewsID"))
  474.   If ClsJSObj("ShowTimeTF")="1" then
  475.   JSCodeStr = JSCodeStr &"<td width="&Cint(100/Cint(ClsJSObj("RowNum")))&"% valign=""top""><table width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr><td valign=""top""><div align=""center"">"& ClsJSObj("NaviPic") &"<br><Span class="""&ClsJSObj("TitleCSS")&"""><a href="""&NewsLinkStr&""">"&ListTitle(GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum")),ClsJSObj("NewsTitleNum"))&"</a></Span><br><Span class="""&ClsJSObj("DateCSS")&""">"&ListTitle(DateFormat(ClsNewsObj("AddTime"),""&ClsJSObj("DateType")&""),50)&"</Span></div></td>"
  476.   Else
  477.   JSCodeStr = JSCodeStr &"<td width="&Cint(100/Cint(ClsJSObj("RowNum")))&"% valign=""top""><table width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr><td valign=""top""><div align=""center"">"& ClsJSObj("NaviPic") &"<br><Span class="""&ClsJSObj("TitleCSS")&"""><a href="""&NewsLinkStr&""">"&ListTitle(GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum")),ClsJSObj("NewsTitleNum"))&"</a></Span></div></td>"
  478.   End If
  479.   If  ClsJSObj("MoreContent")=1 then
  480.   JSCodeStr = JSCodeStr & "<td><Span class="""&ClsJSObj("ContentCSS")&""">"&TitleSpaceStr&left(ClsNewsObj("Content"),ClsJSObj("ContentNum"))&"</Span>......<br><div align=""right""><a class="""&ClsJSObj("LinkCSS")&""" href=" & NewsLinkStr&"."&ClsNewsObj("FileExtName")&" "&OpenMode&">"&ClsJSObj("LinkWord")&"</a></div></td><td>"&ListSpaceStr&"</td></tr></table></td>"
  481.   Else
  482.   JSCodeStr = JSCodeStr & "<td><Span class="""&ClsJSObj("ContentCSS")&""">"&TitleSpaceStr&left(ClsNewsObj("Content"),ClsJSObj("ContentNum"))&"</Span>......</td><td>"&ListSpaceStr&"</td></tr></table></td>"
  483.   End If
  484.   ClsNewsObj.Close
  485.   Set ClsNewsObj = Nothing
  486.   ClsJSFileObj.MoveNext
  487.   if i mod Cint(ClsJSObj("RowNum")) = 0 or ClsJSFileObj.eof then
  488.   JSCodeStr = JSCodeStr &"</tr><tr><td colspan="""&Cint(ClsJSObj("RowNum"))&""" height="""&ClsJSObj("RowSpace")&""" background="""&ClsJSObj("RowBettween")&"""></td></tr><tr>"
  489.   end if
  490.   next 
  491.   ClsJSFileObj.Close 
  492.   Set ClsJSFileObj = Nothing 
  493.   JSCodeStr = JSCodeStr & "</tr></table>');"
  494.   JSCodeStr = Replace(JSCodeStr,"<tr></tr>","")
  495.   JSCodeStr = Replace(Replace(JSCodeStr,Chr(13),""),Chr(10),"")
  496.   if CreateFileTF = True then
  497.   Set MyFile=Server.CreateObject(G_FS_FSO)
  498.  If MyFile.FileExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js") then
  499. MyFile.DeleteFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  500.   End If
  501.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS")) Then
  502. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS"))
  503.   End if
  504.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")) Then
  505. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs"))
  506.   End if
  507.   Set CrHNJS=MyFile.CreateTextFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  508.   CrHNJS.write JSCodeStr
  509.   Set MyFile=nothing
  510.   ClsJSObj.Close
  511.   Set ClsJSObj = Nothing
  512. else
  513. WCssC = JSCodeStr
  514. end if
  515. Else
  516. WCssC = "生成JS文件时未找到参数"
  517. End If
  518. End Function 
  519. Public Function WCssD(EName,CreateFileTF)
  520. Dim ClsJSObj,ClsJSFileObj,ClsFileSql,ClsNewsObj,TempEName,JSCodeStr,i,MyFile,CrHNJS,OpenMode
  521. Dim NewsLinkStr
  522. Set ClsJSObj = Conn.Execute("Select ID,EName,CName,Type,Manner,PicWidth,PicHeight,NewsNum,NewsTitleNum,TitleCSS,ContentCSS,BackCSS,RowNum,PicPath,AddTime,ShowTimeTF,ContentNum,NaviPic,DateType,DateCSS,Info,MoreContent,LinkWord,LinkCSS,RowSpace,RowBettween,OpenMode From FS_NS_FreeJS Where EName='"&EName&"'")
  523. If Not ClsJSObj.eof then
  524.   JSCodeStr = "document.write('<table class="""&ClsJSObj("BackCSS")&""" width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr>"
  525.   Set ClsJSFileObj=server.createobject(G_FS_RS)
  526.   ClsFileSql="Select ID,Title,JSName,FileName,PicPath,ClassID,NewsTime,ToJsTime,DelFlag From FS_NS_FreeJSFile where JSName='"&EName&"' and DelFlag=0 order by ToJsTime desc"
  527.   ClsJSFileObj.open ClsFileSql,Conn,1,1
  528.   If ClsJSFileObj.eof then 
  529. JSCodeStr = JSCodeStr & "<td>此JS内暂无新闻</td></tr>"
  530.   end if
  531.   If ClsJSObj("OpenMode")=1 then
  532.   OpenMode = "target=_blank"
  533.   Else
  534.   OpenMode = "target=_self"
  535.   End If
  536. ListSpaceStr = ""
  537. for Temp_i = 1 to Cint(ClsJSObj("RowSpace"))
  538. ListSpaceStr = ListSpaceStr & "&nbsp;"
  539. next 
  540.   for i=1 to ClsJSObj("NewsNum")
  541.   If ClsJSFileObj.eof then Exit For
  542.   Set ClsNewsObj = Conn.Execute("Select ID,NewsID,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress,Content,isPicNews,NewsPicFile,NewsSmallPicFile,PicborderCss,Templet,isPop,Source,Editor,Keywords,Author,SaveNewsPath,FileName,FileExtName,NewsProperty,TodayNewsPic,isLock,isRecyle,addtime From FS_NS_News where FileName='"&ClsJSFileObj("FileName")&"'")
  543.   NewsLinkStr = GetOneNewsLinkURL(ClsNewsObj("NewsID"))
  544.   If  ClsJSObj("MoreContent")=1 then
  545.   JSCodeStr = JSCodeStr & "<td width="&Cint(100/Cint(ClsJSObj("RowNum")))&"% valign=""top""><table width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr><td valign=""top""><Span class="""&ClsJSObj("ContentCSS")&""">"&TitleSpaceStr&left(ClsNewsObj("Content"),ClsJSObj("ContentNum"))&"</Span>......<br><div align=""right""><a class="""&ClsJSObj("LinkCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&ClsJSObj("LinkWord")&"</a></div></td>"
  546.   Else
  547.   JSCodeStr = JSCodeStr & "<td width="&Cint(100/Cint(ClsJSObj("RowNum")))&"% valign=""top""><table width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr><td valign=""top""><Span class="""&ClsJSObj("ContentCSS")&""">"&TitleSpaceStr&left(ClsNewsObj("Content"),ClsJSObj("ContentNum"))&"</Span>......</td>"
  548.   End If
  549.   If ClsJSObj("ShowTimeTF")="1" then
  550.   JSCodeStr = JSCodeStr &"<td valign=""top""><div align=""center"">"& ClsJSObj("NaviPic") &"<br><Span class="""&ClsJSObj("TitleCSS")&"""><a href="""&NewsLinkStr&""">"&ListTitle(GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum")),ClsJSObj("NewsTitleNum"))&"</a></Span><br><Span class="""&ClsJSObj("DateCSS")&""">"&ListTitle(DateFormat(ClsNewsObj("AddTime"),""&ClsJSObj("DateType")&""),50)&"</Span></div></td><td>"&ListSpaceStr&"</td></tr></table></td>"
  551.   Else
  552.   JSCodeStr = JSCodeStr &"<td valign=""top""><div align=""center"">"& ClsJSObj("NaviPic") &"<br><Span class="""&ClsJSObj("TitleCSS")&"""><a href="""&NewsLinkStr&""">"&ListTitle(GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum")),ClsJSObj("NewsTitleNum"))&"</a></Span></div></td><td>"&ListSpaceStr&"</td></tr></table></td>"
  553.   End If
  554.   ClsNewsObj.Close
  555.   Set ClsNewsObj = Nothing
  556.   ClsJSFileObj.MoveNext
  557.   if i mod Cint(ClsJSObj("RowNum")) = 0 or ClsJSFileObj.eof then
  558.   JSCodeStr = JSCodeStr &"</tr><tr><td colspan="""&Cint(ClsJSObj("RowNum"))&""" height="""&ClsJSObj("RowSpace")&""" background="""&ClsJSObj("RowBettween")&"""></td></tr><tr>"
  559.   end if
  560.   next 
  561.   ClsJSFileObj.Close 
  562.   Set ClsJSFileObj = Nothing 
  563.   JSCodeStr = JSCodeStr & "</tr></table>');"
  564.   JSCodeStr = Replace(JSCodeStr,"<tr></tr>","")
  565.   JSCodeStr = Replace(Replace(JSCodeStr,Chr(13),""),Chr(10),"")
  566.   if CreateFileTF = True then
  567.   Set MyFile=Server.CreateObject(G_FS_FSO)
  568.   If MyFile.FileExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js") then
  569.  MyFile.DeleteFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  570.   End If
  571.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS")) Then
  572. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS"))
  573.   End if
  574.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")) Then
  575. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs"))
  576.   End if
  577.   Set CrHNJS=MyFile.CreateTextFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  578.   CrHNJS.write JSCodeStr
  579.   Set MyFile=nothing
  580.   ClsJSObj.Close
  581.   Set ClsJSObj = Nothing
  582. else
  583. WCssD = JSCodeStr
  584. end if
  585. Else
  586. WCssD = "生成JS文件时未找到参数"
  587. End If
  588. End Function
  589. Public Function WCssE(EName,CreateFileTF)
  590. Dim ClsJSObj,ClsJSFileObj,ClsFileSql,ClsNewsObj,TempEName,JSCodeStr,i,MyFile,CrHNJS,OpenMode
  591. Dim NewsLinkStr
  592. Set ClsJSObj = Conn.Execute("Select ID,EName,CName,Type,Manner,PicWidth,PicHeight,NewsNum,NewsTitleNum,TitleCSS,ContentCSS,BackCSS,RowNum,PicPath,AddTime,ShowTimeTF,ContentNum,NaviPic,DateType,DateCSS,Info,MoreContent,LinkWord,LinkCSS,RowSpace,RowBettween,OpenMode From FS_NS_FreeJS Where EName='"&EName&"'")
  593. If Not ClsJSObj.eof then
  594.   JSCodeStr = "document.write('<table class="""&ClsJSObj("BackCSS")&""" width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr>"
  595.   Set ClsJSFileObj=server.createobject(G_FS_RS)
  596.   ClsFileSql="Select ID,Title,JSName,FileName,PicPath,ClassID,NewsTime,ToJsTime,DelFlag From FS_NS_FreeJSFile where JSName='"&EName&"' and DelFlag=0 order by ToJsTime desc"
  597.   ClsJSFileObj.open ClsFileSql,Conn,1,1
  598.   If ClsJSFileObj.eof then 
  599. JSCodeStr = JSCodeStr & "<td>此JS内暂无新闻</td></tr>"
  600.   end if
  601.   If ClsJSObj("OpenMode")=1 then
  602.   OpenMode = "target=_blank"
  603.   Else
  604.   OpenMode = "target=_self"
  605.   End If
  606. ListSpaceStr = ""
  607. for Temp_i = 1 to Cint(ClsJSObj("RowSpace"))
  608. ListSpaceStr = ListSpaceStr & "&nbsp;"
  609. next 
  610.   for i=1 to ClsJSObj("NewsNum")
  611.   If ClsJSFileObj.eof then Exit For
  612.   Set ClsNewsObj = Conn.Execute("Select ID,NewsID,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress,Content,isPicNews,NewsPicFile,NewsSmallPicFile,PicborderCss,Templet,isPop,Source,Editor,Keywords,Author,SaveNewsPath,FileName,FileExtName,NewsProperty,TodayNewsPic,isLock,isRecyle,addtime From FS_NS_News where FileName='"&ClsJSFileObj("FileName")&"'")
  613.   NewsLinkStr = GetOneNewsLinkURL(ClsNewsObj("NewsID"))
  614.   If  ClsJSObj("MoreContent")=1 then
  615.   JSCodeStr = JSCodeStr & "<td width="&Cint(100/Cint(ClsJSObj("RowNum")))&"% valign=""top""><table width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr><td><Span class="""&ClsJSObj("ContentCSS")&""">"&TitleSpaceStr&left(ClsNewsObj("Content"),ClsJSObj("ContentNum"))&"</Span>......<br><div align=""right""><a class="""&ClsJSObj("LinkCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&ClsJSObj("LinkWord")&"</a></div></td><td rowspan=2>"&ListSpaceStr&"</td></tr>"
  616.   Else
  617.   JSCodeStr = JSCodeStr & "<td width="&Cint(100/Cint(ClsJSObj("RowNum")))&"% valign=""top""><table width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr><td><Span class="""&ClsJSObj("ContentCSS")&""">"&TitleSpaceStr&left(ClsNewsObj("Content"),ClsJSObj("ContentNum"))&"</Span>......</td><td rowspan=2>"&ListSpaceStr&"</td></tr>"
  618.   End If
  619.   If ClsJSObj("ShowTimeTF")=1 then
  620.   JSCodeStr = JSCodeStr &"<tr><td>"& ClsJSObj("NaviPic") &"<a class="""&ClsJSObj("TitleCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum"))&"</a>&nbsp;<Span class="""&ClsJSObj("DateCSS")&""">"&DateFormat(ClsNewsObj("AddTime"),""&ClsJSObj("DateType")&"")&"</Span></td></tr></table></td>"
  621.   Else
  622.   JSCodeStr = JSCodeStr &"<tr><td>"& ClsJSObj("NaviPic") &"<a class="""&ClsJSObj("TitleCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum"))&"</a></td></tr></table></td>"
  623.   End If
  624.   ClsNewsObj.Close
  625.   Set ClsNewsObj = Nothing
  626.   ClsJSFileObj.MoveNext
  627.   if i mod Cint(ClsJSObj("RowNum")) = 0 or ClsJSFileObj.eof then
  628.   JSCodeStr = JSCodeStr &"</tr><tr><td colspan="""&Cint(ClsJSObj("RowNum"))&""" height="""&ClsJSObj("RowSpace")&""" background="""&ClsJSObj("RowBettween")&"""></td></tr><tr>"
  629.   end if
  630.   next 
  631.   ClsJSFileObj.Close 
  632.   Set ClsJSFileObj = Nothing 
  633.   JSCodeStr = JSCodeStr & "</tr></table>');"
  634.   JSCodeStr = Replace(JSCodeStr,"<tr></tr>","")
  635.   JSCodeStr = Replace(Replace(JSCodeStr,Chr(13),""),Chr(10),"")
  636.   if CreateFileTF = True then
  637.   Set MyFile=Server.CreateObject(G_FS_FSO)
  638.   If MyFile.FileExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js") then
  639.  MyFile.DeleteFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  640.   End If
  641.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS")) Then
  642. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS"))
  643.   End if
  644.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")) Then
  645. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs"))
  646.   End if
  647.   Set CrHNJS=MyFile.CreateTextFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  648.   CrHNJS.write JSCodeStr
  649.   Set MyFile=nothing
  650.   ClsJSObj.Close
  651.   Set ClsJSObj = Nothing
  652.   else
  653.   WCssE = JSCodeStr
  654.   end if
  655. Else
  656. WCssE = "生成JS文件时未找到参数"
  657. End If
  658. End Function
  659. Public Function PCssA(EName,CreateFileTF)
  660. Dim ClsJSObj,ClsJSFileObj,ClsFileSql,ClsNewsObj,TempEName,JSCodeStr,i,MyFile,CrHNJS,OpenMode
  661. Dim NewsLinkStr
  662. Set ClsJSObj = Conn.Execute("Select ID,EName,CName,Type,Manner,PicWidth,PicHeight,NewsNum,NewsTitleNum,TitleCSS,ContentCSS,BackCSS,RowNum,PicPath,AddTime,ShowTimeTF,ContentNum,NaviPic,DateType,DateCSS,Info,MoreContent,LinkWord,LinkCSS,RowSpace,RowBettween,OpenMode From FS_NS_FreeJS Where EName='"&EName&"'")
  663. If Not ClsJSObj.eof then
  664.   JSCodeStr = "document.write('<table class="""&ClsJSObj("BackCSS")&""" width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr>"
  665.   Set ClsJSFileObj=server.createobject(G_FS_RS)
  666.   ClsFileSql="Select ID,Title,JSName,FileName,PicPath,ClassID,NewsTime,ToJsTime,DelFlag From FS_NS_FreeJSFile where JSName='"&EName&"' and DelFlag=0 order by ToJsTime desc"
  667.   ClsJSFileObj.open ClsFileSql,Conn,1,1
  668.   If ClsJSFileObj.eof then 
  669. JSCodeStr = JSCodeStr & "<td>此JS内暂无新闻</td></tr>"
  670.   end if
  671.   If ClsJSObj("OpenMode")=1 then
  672.   OpenMode = "target=_blank"
  673.   Else
  674.   OpenMode = "target=_self"
  675.   End If
  676.   for i=1 to ClsJSObj("NewsNum")
  677.   If ClsJSFileObj.eof then Exit For
  678.   Set ClsNewsObj = Conn.Execute("Select ID,NewsID,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress,Content,isPicNews,NewsPicFile,NewsSmallPicFile,PicborderCss,Templet,isPop,Source,Editor,Keywords,Author,SaveNewsPath,FileName,FileExtName,NewsProperty,TodayNewsPic,isLock,isRecyle,addtime From FS_NS_News where FileName='"&ClsJSFileObj("FileName")&"'")
  679.   NewsLinkStr = GetOneNewsLinkURL(ClsNewsObj("NewsID"))
  680.   JSCodeStr = JSCodeStr & "<td width="&Cint(100/Cint(ClsJSObj("RowNum")))&"% valign=""top""><table width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr><td align=""center""><a href="&NewsLinkStr&" "&OpenMode&"><img src="& ClsJSFileObj("PicPath") &" height="&ClsJSObj("PicHeight")&" width="&ClsJSObj("PicWidth")&" border=""0""></a></td></tr>"
  681.   If ClsJSObj("ShowTimeTF")="1" then
  682.   JSCodeStr = JSCodeStr & "<tr><td align=""center"">"& ClsJSObj("NaviPic") &"<a class="""&ClsJSObj("TitleCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum"))&"</a>&nbsp;<Span class="""&ClsJSObj("DateCSS")&""">"&DateFormat(ClsNewsObj("AddTime"),""&ClsJSObj("DateType")&"")&"</Span></td></tr></table></td>"
  683.   Else
  684.   JSCodeStr = JSCodeStr & "<tr><td align=""center"">"& ClsJSObj("NaviPic") &"<a class="""&ClsJSObj("TitleCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum"))&"</a></td></tr></table></td>"
  685.   End If
  686.   ClsNewsObj.Close
  687.   Set ClsNewsObj = Nothing
  688.   ClsJSFileObj.MoveNext
  689.   if i mod Cint(ClsJSObj("RowNum")) = 0 or ClsJSFileObj.eof then
  690.   JSCodeStr = JSCodeStr &"</tr><tr><td colspan="""&Cint(ClsJSObj("RowNum"))&""" height="""&ClsJSObj("RowSpace")&""" background="""&ClsJSObj("RowBettween")&"""></td></tr><tr>"
  691.   end if
  692.   next 
  693.   ClsJSFileObj.Close 
  694.   Set ClsJSFileObj = Nothing 
  695.   JSCodeStr = JSCodeStr & "</tr></table>');"
  696.   JSCodeStr = Replace(JSCodeStr,"<tr></tr>","")
  697.   JSCodeStr = Replace(Replace(JSCodeStr,Chr(13),""),Chr(10),"")
  698.   if CreateFileTF = True then
  699.   Set MyFile=Server.CreateObject(G_FS_FSO)
  700.   If MyFile.FileExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js") then
  701.  MyFile.DeleteFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  702.   End If
  703.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS")) Then
  704. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS"))
  705.   End if
  706.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")) Then
  707. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs"))
  708.   End if
  709.   Set CrHNJS=MyFile.CreateTextFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  710.   CrHNJS.write JSCodeStr
  711.   Set MyFile=nothing
  712.   ClsJSObj.Close
  713.   Set ClsJSObj = Nothing
  714.   else
  715.   PCssA = JSCodeStr
  716.   end if
  717. Else
  718. PCssA = "生成JS文件时未找到参数"
  719. End If
  720. End Function
  721. Public Function PCssB(EName,CreateFileTF)
  722. Dim ClsJSObj,ClsJSFileObj,ClsFileSql,ClsNewsObj,TempEName,JSCodeStr,i,MyFile,CrHNJS,OpenMode
  723. Dim NewsLinkStr
  724. Set ClsJSObj = Conn.Execute("Select ID,EName,CName,Type,Manner,PicWidth,PicHeight,NewsNum,NewsTitleNum,TitleCSS,ContentCSS,BackCSS,RowNum,PicPath,AddTime,ShowTimeTF,ContentNum,NaviPic,DateType,DateCSS,Info,MoreContent,LinkWord,LinkCSS,RowSpace,RowBettween,OpenMode From FS_NS_FreeJS Where EName='"&EName&"'")
  725. If Not ClsJSObj.eof then
  726.   JSCodeStr = "document.write('<table class="""&ClsJSObj("BackCSS")&""" width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr>"
  727.   Set ClsJSFileObj=server.createobject(G_FS_RS)
  728.   ClsFileSql="Select ID,Title,JSName,FileName,PicPath,ClassID,NewsTime,ToJsTime,DelFlag From FS_NS_FreeJSFile where JSName='"&EName&"' and DelFlag=0 order by ToJsTime desc"
  729.   ClsJSFileObj.open ClsFileSql,Conn,1,1
  730.   If ClsJSFileObj.eof then 
  731. JSCodeStr = JSCodeStr & "<td>此JS内暂无新闻</td></tr>"
  732.   end if
  733.   If ClsJSObj("OpenMode")=1 then
  734.   OpenMode = "target=_blank"
  735.   Else
  736.   OpenMode = "target=_self"
  737.   End If
  738. ListSpaceStr = ""
  739. for Temp_i = 1 to Cint(ClsJSObj("RowSpace")2)
  740. ListSpaceStr = ListSpaceStr & "&nbsp;"
  741. next 
  742.   for i=1 to ClsJSObj("NewsNum")
  743.   If ClsJSFileObj.eof then Exit For
  744.   Set ClsNewsObj = Conn.Execute("Select ID,NewsID,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress,Content,isPicNews,NewsPicFile,NewsSmallPicFile,PicborderCss,Templet,isPop,Source,Editor,Keywords,Author,SaveNewsPath,FileName,FileExtName,NewsProperty,TodayNewsPic,isLock,isRecyle,addtime From FS_NS_News where FileName='"&ClsJSFileObj("FileName")&"'")
  745.   NewsLinkStr = GetOneNewsLinkURL(ClsNewsObj("NewsID"))
  746.   JSCodeStr = JSCodeStr & "<td width="&Cint(100/Cint(ClsJSObj("RowNum")))&"% valign=""top""><table width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr><td valign=""top"" align=""center"" rowspan=""2""><a href="&NewsLinkStr&" "&OpenMode&"><img src="& ClsJSFileObj("PicPath") &" height="&ClsJSObj("PicHeight")&" width="&ClsJSObj("PicWidth")&" border=""0""></a></td><td rowspan=""2"">"&ListSpaceStr&"</td>"
  747.   If ClsJSObj("ShowTimeTF")="1" then
  748.   JSCodeStr = JSCodeStr & "<td align=""left"">"& ClsJSObj("NaviPic") &"<a class="""&ClsJSObj("TitleCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum"))&"</a>&nbsp;<Span class="""&ClsJSObj("DateCSS")&""">"&DateFormat(ClsNewsObj("AddTime"),""&ClsJSObj("DateType")&"")&"</Span></td><td rowspan=""2"">"&ListSpaceStr&"</td></tr>"
  749.   Else
  750.   response.write ClsNewsObj("NewsTitle")&"---"&ClsJSObj("NewsTitleNum")
  751.   JSCodeStr = JSCodeStr & "<td align=""left"">"& ClsJSObj("NaviPic") &"<a class="""&ClsJSObj("TitleCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum"))&"</a></td><td rowspan=""2"">"&ListSpaceStr&"</td></tr>"
  752.   End If
  753.   If  ClsJSObj("MoreContent")=1 Then
  754.   JSCodeStr = JSCodeStr & "<tr><td><Span class="""&ClsJSObj("ContentCSS")&""">"&TitleSpaceStr&left(ClsNewsObj("Content"),ClsJSObj("ContentNum"))&"</Span>......<br><div align=""right""><a class="""&ClsJSObj("LinkCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&ClsJSObj("LinkWord")&"</a></div></td></tr></table></td>"
  755.   Else
  756.   JSCodeStr = JSCodeStr & "<tr><td><Span class="""&ClsJSObj("ContentCSS")&""">"&TitleSpaceStr&left(ClsNewsObj("Content"),ClsJSObj("ContentNum"))&"</Span>......</td></tr></table></td>"
  757.   End If
  758.   ClsNewsObj.Close
  759.   Set ClsNewsObj = Nothing
  760.   ClsJSFileObj.MoveNext
  761.   if i mod Cint(ClsJSObj("RowNum")) = 0 or ClsJSFileObj.eof then
  762.   JSCodeStr = JSCodeStr &"</tr><tr><td colspan="""&Cint(ClsJSObj("RowNum"))&""" height="""&ClsJSObj("RowSpace")&""" background="""&ClsJSObj("RowBettween")&"""></td></tr><tr>"
  763.   end if
  764.   next 
  765.   ClsJSFileObj.Close 
  766.   Set ClsJSFileObj = Nothing 
  767.   JSCodeStr = JSCodeStr & "</tr></table>');"
  768.   JSCodeStr = Replace(Replace(JSCodeStr,"<tr></tr>",""),"&nbsp;&nbsp;&nbsp;&nbsp;","")
  769.   JSCodeStr = Replace(Replace(JSCodeStr,Chr(13),""),Chr(10),"")
  770.   if CreateFileTF = True then
  771.   Set MyFile=Server.CreateObject(G_FS_FSO)
  772.   If MyFile.FileExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js") then
  773.  MyFile.DeleteFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  774.   End If
  775.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS")) Then
  776. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS"))
  777.   End if
  778.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")) Then
  779. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs"))
  780.   End if
  781.   Set CrHNJS=MyFile.CreateTextFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  782.   CrHNJS.write JSCodeStr
  783.   Set MyFile=nothing
  784.   ClsJSObj.Close
  785.   Set ClsJSObj = Nothing
  786.    else
  787.   PCssB = JSCodeStr
  788.    end if
  789. Else
  790. PCssB = "生成JS文件时未找到参数"
  791. End If
  792. End Function
  793. Public Function PCssC(EName,CreateFileTF)
  794. Dim ClsJSObj,ClsJSFileObj,ClsFileSql,ClsNewsObj,TempEName,JSCodeStr,i,MyFile,CrHNJS,OpenMode
  795. Dim NewsLinkStr
  796. Set ClsJSObj = Conn.Execute("Select ID,EName,CName,Type,Manner,PicWidth,PicHeight,NewsNum,NewsTitleNum,TitleCSS,ContentCSS,BackCSS,RowNum,PicPath,AddTime,ShowTimeTF,ContentNum,NaviPic,DateType,DateCSS,Info,MoreContent,LinkWord,LinkCSS,RowSpace,RowBettween,OpenMode From FS_NS_FreeJS Where EName='"&EName&"'")
  797. If Not ClsJSObj.eof then
  798.   JSCodeStr = "document.write('<table class="""&ClsJSObj("BackCSS")&""" width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr>"
  799.   Set ClsJSFileObj=server.createobject(G_FS_RS)
  800.   ClsFileSql="Select ID,Title,JSName,FileName,PicPath,ClassID,NewsTime,ToJsTime,DelFlag From FS_NS_FreeJSFile where JSName='"&EName&"' and DelFlag=0 order by ToJsTime desc"
  801.   ClsJSFileObj.open ClsFileSql,Conn,1,1
  802.   If ClsJSFileObj.eof then 
  803. JSCodeStr = JSCodeStr & "<td>此JS内暂无新闻</td></tr>"
  804.   end if
  805.   If ClsJSObj("OpenMode")=1 then
  806.   OpenMode = "target=_blank"
  807.   Else
  808.   OpenMode = "target=_self"
  809.   End If
  810.   for i=1 to ClsJSObj("NewsNum")
  811.   If ClsJSFileObj.eof then Exit For
  812.   Set ClsNewsObj = Conn.Execute("Select ID,NewsID,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress,Content,isPicNews,NewsPicFile,NewsSmallPicFile,PicborderCss,Templet,isPop,Source,Editor,Keywords,Author,SaveNewsPath,FileName,FileExtName,NewsProperty,TodayNewsPic,isLock,isRecyle,addtime From FS_NS_News where FileName='"&ClsJSFileObj("FileName")&"'")
  813.   NewsLinkStr = GetOneNewsLinkURL(ClsNewsObj("NewsID"))
  814.   JSCodeStr = JSCodeStr & "<td align=""center""><a href="&NewsLinkStr&" "&OpenMode&"><img src="& ClsJSFileObj("PicPath") &" height="&ClsJSObj("PicHeight")&" width="&ClsJSObj("PicWidth")&" border=""0""></a></td>"
  815.   ClsNewsObj.Close
  816.   Set ClsNewsObj = Nothing
  817.   ClsJSFileObj.MoveNext
  818.   if i mod Cint(ClsJSObj("RowNum")) = 0 or ClsJSFileObj.eof then
  819.   JSCodeStr = JSCodeStr &"</tr><tr><td colspan="""&Cint(ClsJSObj("RowNum"))&""" height="""&ClsJSObj("RowSpace")&""" background="""&ClsJSObj("RowBettween")&"""></td></tr><tr>"
  820.   end if
  821.   next 
  822.   ClsJSFileObj.Close 
  823.   Set ClsJSFileObj = Nothing 
  824.   JSCodeStr = JSCodeStr & "</tr></table>');"
  825.   JSCodeStr = Replace(JSCodeStr,"<tr></tr>","")
  826.   JSCodeStr = Replace(Replace(JSCodeStr,Chr(13),""),Chr(10),"")
  827.   if CreateFileTF = True then
  828.   Set MyFile=Server.CreateObject(G_FS_FSO)
  829.   If MyFile.FileExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js") then
  830.  MyFile.DeleteFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  831.   End If
  832.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS")) Then
  833. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS"))
  834.   End if
  835.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")) Then
  836. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs"))
  837.   End if
  838.   Set CrHNJS=MyFile.CreateTextFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  839.   CrHNJS.write JSCodeStr
  840.   Set MyFile=nothing
  841.   ClsJSObj.Close
  842.   Set ClsJSObj = Nothing
  843.    else
  844.   PCssC = JSCodeStr
  845.    end if
  846. Else
  847. PCssC = "生成JS文件时未找到参数"
  848. End If
  849. End Function
  850. Public Function PCssD(EName,CreateFileTF)
  851. Dim ClsJSObj,ClsJSFileObj,ClsFileSql,ClsNewsObj,TempEName,JSCodeStr,i,MyFile,CrHNJS,OpenMode
  852. Dim NewsLinkStr
  853. Set ClsJSObj = Conn.Execute("Select ID,EName,CName,Type,Manner,PicWidth,PicHeight,NewsNum,NewsTitleNum,TitleCSS,ContentCSS,BackCSS,RowNum,PicPath,AddTime,ShowTimeTF,ContentNum,NaviPic,DateType,DateCSS,Info,MoreContent,LinkWord,LinkCSS,RowSpace,RowBettween,OpenMode From FS_NS_FreeJS Where EName='"&EName&"'")
  854. If Not ClsJSObj.eof then
  855.   JSCodeStr = "document.write('<table class="""&ClsJSObj("BackCSS")&""" width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr>"
  856.   Set ClsJSFileObj=server.createobject(G_FS_RS)
  857.   ClsFileSql="Select ID,Title,JSName,FileName,PicPath,ClassID,NewsTime,ToJsTime,DelFlag From FS_NS_FreeJSFile where JSName='"&EName&"' and DelFlag=0 order by ToJsTime desc"
  858.   ClsJSFileObj.open ClsFileSql,Conn,1,1
  859.   If ClsJSFileObj.eof then 
  860. JSCodeStr = JSCodeStr & "<td>此JS内暂无新闻</td></tr>"
  861.   end if
  862.   If ClsJSObj("OpenMode")=1 then
  863.   OpenMode = "target=_blank"
  864.   Else
  865.   OpenMode = "target=_self"
  866.   End If
  867. ListSpaceStr = ""
  868. for Temp_i = 1 to Cint(ClsJSObj("RowSpace"))
  869. ListSpaceStr = ListSpaceStr & "&nbsp;"
  870. next 
  871.   for i=1 to ClsJSObj("NewsNum")
  872.   If ClsJSFileObj.eof then Exit For
  873.   Set ClsNewsObj = Conn.Execute("Select ID,NewsID,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress,Content,isPicNews,NewsPicFile,NewsSmallPicFile,PicborderCss,Templet,isPop,Source,Editor,Keywords,Author,SaveNewsPath,FileName,FileExtName,NewsProperty,TodayNewsPic,isLock,isRecyle,addtime From FS_NS_News where FileName='"&ClsJSFileObj("FileName")&"'")
  874.   NewsLinkStr = GetOneNewsLinkURL(ClsNewsObj("NewsID"))
  875.   JSCodeStr = JSCodeStr & "<td width="&Cint(100/Cint(ClsJSObj("RowNum")))&"% valign=""top""><table width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr><td valign=""top"" colspan=""2"" align=""center""><a href="&NewsLinkStr&" "&OpenMode&"><img src="& ClsJSFileObj("PicPath") &" height="&ClsJSObj("PicHeight")&" width="&ClsJSObj("PicWidth")&" border=""0""></a></td><td rowspan=""2"">"&ListSpaceStr&"</td></tr>"
  876.   If ClsJSObj("ShowTimeTF")="1" then
  877.   JSCodeStr = JSCodeStr &"<tr><td valign=""top""><div align=""center"">"& ClsJSObj("NaviPic") &"<br><Span class="""&ClsJSObj("TitleCSS")&"""><a href="""&NewsLinkStr&""">"&ListTitle(GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum")),ClsJSObj("NewsTitleNum"))&"</a></Span><br><Span class="""&ClsJSObj("DateCSS")&""">"&ListTitle(DateFormat(ClsNewsObj("AddTime"),""&ClsJSObj("DateType")&""),50)&"</Span></div></td>"
  878.   Else
  879.   JSCodeStr = JSCodeStr &"<tr><td valign=""top""><div align=""center"">"& ClsJSObj("NaviPic") &"<br><Span class="""&ClsJSObj("TitleCSS")&"""><a href="""&NewsLinkStr&""">"&ListTitle(GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum")),ClsJSObj("NewsTitleNum"))&"</a></Span></div></td>"
  880.   End If
  881.   If  ClsJSObj("MoreContent")=1 then
  882.   JSCodeStr = JSCodeStr & "<td><Span class="""&ClsJSObj("ContentCSS")&""">"&TitleSpaceStr&left(ClsNewsObj("Content"),ClsJSObj("ContentNum"))&"</Span>......<br><div align=""right""><a class="""&ClsJSObj("LinkCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&ClsJSObj("LinkWord")&"</a></div></td></tr></table></td>"
  883.   Else
  884.   JSCodeStr = JSCodeStr & "<td><Span class="""&ClsJSObj("ContentCSS")&""">"&TitleSpaceStr&left(ClsNewsObj("Content"),ClsJSObj("ContentNum"))&"</Span>......</td></tr></table></td>"
  885.   End If
  886.   ClsNewsObj.Close
  887.   Set ClsNewsObj = Nothing
  888.   ClsJSFileObj.MoveNext
  889.   if i mod Cint(ClsJSObj("RowNum")) = 0 or ClsJSFileObj.eof then
  890.   JSCodeStr = JSCodeStr &"</tr><tr><td colspan="""&Cint(ClsJSObj("RowNum"))&""" height="""&ClsJSObj("RowSpace")&""" background="""&ClsJSObj("RowBettween")&"""></td></tr><tr>"
  891.   end if
  892.   next 
  893.   ClsJSFileObj.Close 
  894.   Set ClsJSFileObj = Nothing 
  895.   JSCodeStr = JSCodeStr & "</tr></table>');"
  896.   JSCodeStr = Replace(JSCodeStr,"<tr></tr>","")
  897.   JSCodeStr = Replace(Replace(JSCodeStr,Chr(13),""),Chr(10),"")
  898.   JSCodeStr = Replace(Replace(JSCodeStr,"src='","src="),"' border"," border")
  899.   if CreateFileTF = True then
  900.   Set MyFile=Server.CreateObject(G_FS_FSO)
  901.   If MyFile.FileExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js") then
  902.  MyFile.DeleteFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  903.   End If
  904.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS")) Then
  905. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS"))
  906.   End if
  907.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")) Then
  908. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs"))
  909.   End if
  910.   Set CrHNJS=MyFile.CreateTextFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  911.   CrHNJS.write JSCodeStr
  912.   Set MyFile=nothing
  913.   ClsJSObj.Close
  914.   Set ClsJSObj = Nothing
  915.    else
  916.   PCssD = JSCodeStr
  917.    end if
  918. Else
  919. PCssD = "生成JS文件时未找到参数"
  920. End If
  921. End Function
  922. Public Function PCssE(EName,CreateFileTF)
  923. Dim ClsJSObj,ClsJSFileObj,ClsFileSql,ClsNewsObj,TempEName,JSCodeStr,i,MyFile,CrHNJS,OpenMode
  924. Dim NewsLinkStr
  925. Set ClsJSObj = Conn.Execute("Select ID,EName,CName,Type,Manner,PicWidth,PicHeight,NewsNum,NewsTitleNum,TitleCSS,ContentCSS,BackCSS,RowNum,PicPath,AddTime,ShowTimeTF,ContentNum,NaviPic,DateType,DateCSS,Info,MoreContent,LinkWord,LinkCSS,RowSpace,RowBettween,OpenMode From FS_NS_FreeJS Where EName='"&EName&"'")
  926. If Not ClsJSObj.eof then
  927.   JSCodeStr = "document.write('<table class="""&ClsJSObj("BackCSS")&""" width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr>"
  928.   Set ClsJSFileObj=server.createobject(G_FS_RS)
  929.   ClsFileSql="Select ID,Title,JSName,FileName,PicPath,ClassID,NewsTime,ToJsTime,DelFlag From FS_NS_FreeJSFile where JSName='"&EName&"' and DelFlag=0 order by ToJsTime desc"
  930.   ClsJSFileObj.open ClsFileSql,Conn,1,1
  931.   If ClsJSFileObj.eof then 
  932. JSCodeStr = JSCodeStr & "<td>此JS内暂无新闻</td></tr>"
  933.   end if
  934.   If ClsJSObj("OpenMode")=1 then
  935.   OpenMode = "target=_blank"
  936.   Else
  937.   OpenMode = "target=_self"
  938.   End If
  939. ListSpaceStr = ""
  940. for Temp_i = 1 to Cint(ClsJSObj("RowSpace")2)
  941. ListSpaceStr = ListSpaceStr & "&nbsp;"
  942. next 
  943.   for i=1 to ClsJSObj("NewsNum")
  944.   If ClsJSFileObj.eof then Exit For
  945.   Set ClsNewsObj = Conn.Execute("Select ID,NewsID,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress,Content,isPicNews,NewsPicFile,NewsSmallPicFile,PicborderCss,Templet,isPop,Source,Editor,Keywords,Author,SaveNewsPath,FileName,FileExtName,NewsProperty,TodayNewsPic,isLock,isRecyle,addtime From FS_NS_News where FileName='"&ClsJSFileObj("FileName")&"'")
  946.   NewsLinkStr = GetOneNewsLinkURL(ClsNewsObj("NewsID"))
  947.   JSCodeStr = JSCodeStr & "<td width="&Cint(100/Cint(ClsJSObj("RowNum")))&"% valign=""top""><table width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr><td rowspan=""2"">"&ListSpaceStr&"</td><td valign=""top"" align=""center""><a href="&NewsLinkStr&" "&OpenMode&"><img src="& ClsJSFileObj("PicPath") &" height="&ClsJSObj("PicHeight")&" width="&ClsJSObj("PicWidth")&" border=""0""></a></td><td rowspan=""2"">"&ListSpaceStr&"</td></tr>"
  948.   If  ClsJSObj("MoreContent")=1 then
  949.   JSCodeStr = JSCodeStr & "<tr><td><Span class="""&ClsJSObj("ContentCSS")&""">"&TitleSpaceStr&left(ClsNewsObj("Content"),ClsJSObj("ContentNum"))&"</Span>......<br><div align=""right""><a class="""&ClsJSObj("LinkCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&ClsJSObj("LinkWord")&"</a></div></td></tr></table></td>"
  950.   Else
  951.   JSCodeStr = JSCodeStr & "<tr><td><Span class="""&ClsJSObj("ContentCSS")&""">"&TitleSpaceStr&left(ClsNewsObj("Content"),ClsJSObj("ContentNum"))&"</Span>......</td></tr></table></td>"
  952.   End If
  953.   ClsNewsObj.Close
  954.   Set ClsNewsObj = Nothing
  955.   ClsJSFileObj.MoveNext
  956.   if i mod Cint(ClsJSObj("RowNum")) = 0 or ClsJSFileObj.eof then
  957.   JSCodeStr = JSCodeStr &"</tr><tr><td colspan="""&Cint(ClsJSObj("RowNum"))&""" height="""&ClsJSObj("RowSpace")&""" background="""&ClsJSObj("RowBettween")&"""></td></tr><tr>"
  958.   end if
  959.   next 
  960.   ClsJSFileObj.Close 
  961.   Set ClsJSFileObj = Nothing 
  962.   JSCodeStr = JSCodeStr & "</tr></table>');"
  963.   JSCodeStr = Replace(JSCodeStr,"<tr></tr>","")
  964.   JSCodeStr = Replace(Replace(JSCodeStr,Chr(13),""),Chr(10),"")
  965.   if CreateFileTF = True then
  966.   Set MyFile=Server.CreateObject(G_FS_FSO)
  967.   If MyFile.FileExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js") then
  968.  MyFile.DeleteFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  969.   End If
  970.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS")) Then
  971. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS"))
  972.   End if
  973.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")) Then
  974. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs"))
  975.   End if
  976.   Set CrHNJS=MyFile.CreateTextFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  977.   CrHNJS.write JSCodeStr
  978.   Set MyFile=nothing
  979.   ClsJSObj.Close
  980.   Set ClsJSObj = Nothing
  981.    else
  982.   PCssE = JSCodeStr
  983.    end if
  984. Else
  985. PCssE = "生成JS文件时未找到参数"
  986. End If
  987. End Function
  988. Public Function PCssF(EName,CreateFileTF)
  989. Dim ClsJSObj,ClsJSFileObj,ClsFileSql,ClsNewsObj,TempEName,JSCodeStr,i,MyFile,CrHNJS,OpenMode
  990. Dim NewsLinkStr
  991. Set ClsJSObj = Conn.Execute("Select ID,EName,CName,Type,Manner,PicWidth,PicHeight,NewsNum,NewsTitleNum,TitleCSS,ContentCSS,BackCSS,RowNum,PicPath,AddTime,ShowTimeTF,ContentNum,NaviPic,DateType,DateCSS,Info,MoreContent,LinkWord,LinkCSS,RowSpace,RowBettween,OpenMode From FS_NS_FreeJS Where EName='"&EName&"'")
  992. If Not ClsJSObj.eof then
  993.   JSCodeStr = "document.write('<table class="""&ClsJSObj("BackCSS")&""" width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr>"
  994.   Set ClsJSFileObj=server.createobject(G_FS_RS)
  995.   ClsFileSql="Select ID,Title,JSName,FileName,PicPath,ClassID,NewsTime,ToJsTime,DelFlag From FS_NS_FreeJSFile where JSName='"&EName&"' and DelFlag=0 order by ToJsTime desc"
  996.   ClsJSFileObj.open ClsFileSql,Conn,1,1
  997.   If ClsJSFileObj.eof then 
  998. JSCodeStr = JSCodeStr & "<td>此JS内暂无新闻</td></tr>"
  999.   end if
  1000.   If ClsJSObj("OpenMode")=1 then
  1001.   OpenMode = "target=_blank"
  1002.   Else
  1003.   OpenMode = "target=_self"
  1004.   End If
  1005. ListSpaceStr = ""
  1006. for Temp_i = 1 to Cint(ClsJSObj("RowSpace"))
  1007. ListSpaceStr = ListSpaceStr & "&nbsp;"
  1008. next 
  1009.   for i=1 to ClsJSObj("NewsNum")
  1010.   If ClsJSFileObj.eof then Exit For
  1011.   Set ClsNewsObj = Conn.Execute("Select ID,NewsID,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress,Content,isPicNews,NewsPicFile,NewsSmallPicFile,PicborderCss,Templet,isPop,Source,Editor,Keywords,Author,SaveNewsPath,FileName,FileExtName,NewsProperty,TodayNewsPic,isLock,isRecyle,addtime From FS_NS_News where FileName='"&ClsJSFileObj("FileName")&"'")
  1012.   NewsLinkStr = GetOneNewsLinkURL(ClsNewsObj("NewsID"))
  1013.   JSCodeStr = JSCodeStr & "<td width="&Cint(100/Cint(ClsJSObj("RowNum")))&"% valign=""top""><table width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr><td valign=""top"" align=""center""><a href="&NewsLinkStr&" "&OpenMode&"><img src="& ClsJSFileObj("PicPath") &" height="&ClsJSObj("PicHeight")&" width="&ClsJSObj("PicWidth")&" border=""0""></a></td>"
  1014.   If  ClsJSObj("MoreContent")=1 then
  1015.   JSCodeStr = JSCodeStr & "<td><Span class="""&ClsJSObj("ContentCSS")&""">"&TitleSpaceStr&left(ClsNewsObj("Content"),ClsJSObj("ContentNum"))&"</Span>......<br><div align=""right""><a class="""&ClsJSObj("LinkCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&ClsJSObj("LinkWord")&"</a></div></td><td>"&ListSpaceStr&"</td></tr></table></td>"
  1016.   Else
  1017.   JSCodeStr = JSCodeStr & "<td><Span class="""&ClsJSObj("ContentCSS")&""">"&TitleSpaceStr&left(ClsNewsObj("Content"),ClsJSObj("ContentNum"))&"</Span>......</td><td>"&ListSpaceStr&"</td></tr></table></td>"
  1018.   End If
  1019.   ClsNewsObj.Close
  1020.   Set ClsNewsObj = Nothing
  1021.   ClsJSFileObj.MoveNext
  1022.   if i mod Cint(ClsJSObj("RowNum")) = 0 or ClsJSFileObj.eof then
  1023.   JSCodeStr = JSCodeStr &"</tr><tr><td colspan="""&Cint(ClsJSObj("RowNum"))&""" height="""&ClsJSObj("RowSpace")&""" background="""&ClsJSObj("RowBettween")&"""></td></tr>"
  1024.   end if
  1025.   next 
  1026.   ClsJSFileObj.Close 
  1027.   Set ClsJSFileObj = Nothing 
  1028.   JSCodeStr = JSCodeStr & "</table>');"
  1029.   JSCodeStr = Replace(Replace(JSCodeStr,Chr(13),""),Chr(10),"")
  1030.   if CreateFileTF = True then
  1031.   Set MyFile=Server.CreateObject(G_FS_FSO)
  1032.   If MyFile.FileExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js") then
  1033.  MyFile.DeleteFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  1034.   End If
  1035.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS")) Then
  1036. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS"))
  1037.   End if
  1038.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")) Then
  1039. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs"))
  1040.   End if
  1041.   Set CrHNJS=MyFile.CreateTextFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  1042.   CrHNJS.write JSCodeStr
  1043.   Set MyFile=nothing
  1044.   ClsJSObj.Close
  1045.   Set ClsJSObj = Nothing
  1046.    else
  1047.   PCssF = JSCodeStr
  1048.    end if
  1049. Else
  1050. PCssF = "生成JS文件时未找到参数"
  1051. End If
  1052. End Function
  1053. Public Function PCssG(EName,CreateFileTF)
  1054. Dim ClsJSObj,ClsJSFileObj,ClsFileSql,ClsNewsObj,TempEName,JSCodeStr,i,MyFile,CrHNJS,OpenMode
  1055. Dim NewsLinkStr
  1056. Set ClsJSObj = Conn.Execute("Select ID,EName,CName,Type,Manner,PicWidth,PicHeight,NewsNum,NewsTitleNum,TitleCSS,ContentCSS,BackCSS,RowNum,PicPath,AddTime,ShowTimeTF,ContentNum,NaviPic,DateType,DateCSS,Info,MoreContent,LinkWord,LinkCSS,RowSpace,RowBettween,OpenMode From FS_NS_FreeJS Where EName='"&EName&"'")
  1057. If Not ClsJSObj.eof then
  1058.   JSCodeStr = "document.write('<table class="""&ClsJSObj("BackCSS")&""" width=""100%"" border=""0"" cellpadding=""0"" cellspacing="""&ClsJSObj("RowSpace")&"""><tr>"
  1059.   Set ClsJSFileObj=server.createobject(G_FS_RS)
  1060.   ClsFileSql="Select ID,Title,JSName,FileName,PicPath,ClassID,NewsTime,ToJsTime,DelFlag From FS_NS_FreeJSFile where JSName='"&EName&"' and DelFlag=0 order by ToJsTime desc"
  1061.   ClsJSFileObj.open ClsFileSql,Conn,1,1
  1062.   If ClsJSFileObj.eof then 
  1063. JSCodeStr = JSCodeStr & "<td>此JS内暂无新闻</td></tr>"
  1064.   end if
  1065.   If ClsJSObj("OpenMode")=1 then
  1066.   OpenMode = "target=_blank"
  1067.   Else
  1068.   OpenMode = "target=_self"
  1069.   End If
  1070.   JSCodeStr = JSCodeStr & "<td valign=""top"" align=""center"" height="&ClsJSObj("PicHeight")&" width="&ClsJSObj("PicWidth")&"><img src="& ClsJSObj("PicPath") &" height="&ClsJSObj("PicHeight")&" width="&ClsJSObj("PicWidth")&" border=""0""></td><td><table width=""100%"" border=""0"" cellpadding=""0"" cellspacing="""&ClsJSObj("RowSpace")&"""><tr>"
  1071.   for i=1 to ClsJSObj("NewsNum")
  1072.   If ClsJSFileObj.eof then Exit For
  1073.   Set ClsNewsObj = Conn.Execute("Select ID,NewsID,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress,Content,isPicNews,NewsPicFile,NewsSmallPicFile,PicborderCss,Templet,isPop,Source,Editor,Keywords,Author,SaveNewsPath,FileName,FileExtName,NewsProperty,TodayNewsPic,isLock,isRecyle,addtime From FS_NS_News where FileName='"&ClsJSFileObj("FileName")&"'")
  1074.   NewsLinkStr = GetOneNewsLinkURL(ClsNewsObj("NewsID"))
  1075.   if i mod Cint(ClsJSObj("RowNum")) = 0 and not ClsJSFileObj.eof then
  1076.   If ClsJSObj("ShowTimeTF")="1" then
  1077.   JSCodeStr = JSCodeStr & "<td><div align=""left""><img src="""&ClsJSObj("NaviPic")&""" /><a class="""&ClsJSObj("TitleCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum"))&"</a>&nbsp;<Span class="""&ClsJSObj("DateCSS")&""">"&DateFormat(ClsNewsObj("AddTime"),""&ClsJSObj("DateType")&"")&"</Span></div></td><td rowspan=""2"">"&ListSpaceStr&"</td></tr>"
  1078.   Else
  1079.   JSCodeStr = JSCodeStr & "<td><div align=""left""><img src="""&ClsJSObj("NaviPic")&""" /><a class="""&ClsJSObj("TitleCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum"))&"</a></div></td><td rowspan=""2"">"&ListSpaceStr&"</td></tr>"
  1080.   End If
  1081.   end if
  1082.   if ClsJSFileObj.eof then
  1083.   If ClsJSObj("ShowTimeTF")="1" then
  1084.   JSCodeStr = JSCodeStr & "<td><div align=""left""><img src="""&ClsJSObj("NaviPic")&""" /><a class="""&ClsJSObj("TitleCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum"))&"</a>&nbsp;<Span class="""&ClsJSObj("DateCSS")&""">"&DateFormat(ClsNewsObj("AddTime"),""&ClsJSObj("DateType")&"")&"</Span></div></td><td rowspan=""2"">"&ListSpaceStr&"</td></tr>"
  1085.   Else
  1086.   JSCodeStr = JSCodeStr & "<td><div align=""left""><img src="""&ClsJSObj("NaviPic")&""" /><a class="""&ClsJSObj("TitleCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum"))&"</a></div></td><td rowspan=""2"">"&ListSpaceStr&"</td></tr>"
  1087.   End If
  1088.   end if
  1089.   ClsNewsObj.Close
  1090.   Set ClsNewsObj = Nothing
  1091.   ClsJSFileObj.MoveNext
  1092.   next 
  1093.   ClsJSFileObj.Close 
  1094.   Set ClsJSFileObj = Nothing 
  1095.   JSCodeStr = JSCodeStr & "</tr></table></td></tr></table>');"
  1096.   JSCodeStr = Replace(Replace(JSCodeStr,Chr(13),""),Chr(10),"")
  1097.   if CreateFileTF = True then
  1098.   Set MyFile=Server.CreateObject(G_FS_FSO)
  1099.   If MyFile.FileExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js") then
  1100.  MyFile.DeleteFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  1101.   End If
  1102.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS")) Then
  1103. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS"))
  1104.   End if
  1105.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")) Then
  1106. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs"))
  1107.   End if
  1108.   Set CrHNJS=MyFile.CreateTextFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  1109.   CrHNJS.write JSCodeStr
  1110.   Set MyFile=nothing
  1111.   ClsJSObj.Close
  1112.   Set ClsJSObj = Nothing
  1113.    else
  1114.   PCssG = JSCodeStr
  1115.    end if
  1116. Else
  1117. PCssG = "生成JS文件时未找到参数"
  1118. End If
  1119. End Function
  1120. Public Function PCssH(EName,CreateFileTF)
  1121. Dim ClsJSObj,ClsJSFileObj,ClsFileSql,ClsNewsObj,TempEName,JSCodeStr,i,MyFile,CrHNJS,OpenMode
  1122. Dim NewsLinkStr
  1123. Set ClsJSObj = Conn.Execute("Select ID,EName,CName,Type,Manner,PicWidth,PicHeight,NewsNum,NewsTitleNum,TitleCSS,ContentCSS,BackCSS,RowNum,PicPath,AddTime,ShowTimeTF,ContentNum,NaviPic,DateType,DateCSS,Info,MoreContent,LinkWord,LinkCSS,RowSpace,RowBettween,OpenMode From FS_NS_FreeJS Where EName='"&EName&"'")
  1124. If Not ClsJSObj.eof then
  1125.   JSCodeStr = "document.write('<table class="""&ClsJSObj("BackCSS")&""" width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr>"
  1126.   Set ClsJSFileObj=server.createobject(G_FS_RS)
  1127.   ClsFileSql="Select ID,Title,JSName,FileName,PicPath,ClassID,NewsTime,ToJsTime,DelFlag From FS_NS_FreeJSFile where JSName='"&EName&"' and DelFlag=0 order by ToJsTime desc"
  1128.   ClsJSFileObj.open ClsFileSql,Conn,1,1
  1129.   If ClsJSFileObj.eof then 
  1130. JSCodeStr = JSCodeStr & "<td>此JS内暂无新闻</td>"
  1131.   end if
  1132.   If ClsJSObj("OpenMode")=1 then
  1133.   OpenMode = "target=_blank"
  1134.   Else
  1135.   OpenMode = "target=_self"
  1136.   End If
  1137. ListSpaceStr = ""
  1138. for Temp_i = 1 to Cint(ClsJSObj("RowSpace"))
  1139. ListSpaceStr = ListSpaceStr & "&nbsp;"
  1140. next 
  1141.   for i=1 to ClsJSObj("NewsNum")
  1142.   If ClsJSFileObj.eof then Exit For
  1143.   Set ClsNewsObj = Conn.Execute("Select ID,NewsID,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress,Content,isPicNews,NewsPicFile,NewsSmallPicFile,PicborderCss,Templet,isPop,Source,Editor,Keywords,Author,SaveNewsPath,FileName,FileExtName,NewsProperty,TodayNewsPic,isLock,isRecyle,addtime From FS_NS_News where FileName='"&ClsJSFileObj("FileName")&"'")
  1144.   NewsLinkStr = GetOneNewsLinkURL(ClsNewsObj("NewsID"))
  1145.   JSCodeStr = JSCodeStr & "<td width="&Cint(100/Cint(ClsJSObj("RowNum")))&"% valign=""top""><table width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr><td valign=""top"" align=""left""><a href="&NewsLinkStr&" "&OpenMode&"><img src="& ClsJSFileObj("PicPath") &" height="&ClsJSObj("PicHeight")&" width="&ClsJSObj("PicWidth")&" border=""0""></a></td>"
  1146.   If ClsJSObj("ShowTimeTF")="1" then
  1147.   JSCodeStr = JSCodeStr & "<td><div align=""left""><img src=""<img src="""&ClsJSObj("NaviPic")&""" />"" /><a class="""&ClsJSObj("TitleCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum"))&"</a>&nbsp;<Span class="""&ClsJSObj("DateCSS")&""">"&DateFormat(ClsNewsObj("AddTime"),""&ClsJSObj("DateType")&"")&"</Span></div></td><td rowspan=""2"">"&ListSpaceStr&"</td></tr>"
  1148.   Else
  1149.   JSCodeStr = JSCodeStr & "<td><div align=""left""><img src=""<img src="""&ClsJSObj("NaviPic")&""" />"" /><a class="""&ClsJSObj("TitleCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum"))&"</a></div></td><td rowspan=""2"">"&ListSpaceStr&"</td></tr>"
  1150.   End If
  1151.   If  ClsJSObj("MoreContent")=1 then
  1152.   JSCodeStr = JSCodeStr & "<tr><td colspan=""2""><Span class="""&ClsJSObj("ContentCSS")&""">"&TitleSpaceStr&left(ClsNewsObj("Content"),ClsJSObj("ContentNum"))&"</Span>......<br><div align=""right""><a class="""&ClsJSObj("LinkCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&ClsJSObj("LinkWord")&"</a></div></td></tr></table></td>"
  1153.   Else
  1154.   JSCodeStr = JSCodeStr & "<tr><td colspan=""2""><Span class="""&ClsJSObj("ContentCSS")&""">"&TitleSpaceStr&left(ClsNewsObj("Content"),ClsJSObj("ContentNum"))&"</Span>......</td></tr></table></td>"
  1155.   End If
  1156.   ClsNewsObj.Close
  1157.   Set ClsNewsObj = Nothing
  1158.   ClsJSFileObj.MoveNext
  1159.   if i mod Cint(ClsJSObj("RowNum")) = 0 or ClsJSFileObj.eof then
  1160.   JSCodeStr = JSCodeStr &"</tr><tr><td colspan="""&Cint(ClsJSObj("RowNum"))&""" height="""&ClsJSObj("RowSpace")&""" background="""&ClsJSObj("RowBettween")&"""></td></tr><tr>"
  1161.   end if
  1162.   next 
  1163.   ClsJSFileObj.Close 
  1164.   Set ClsJSFileObj = Nothing 
  1165.   JSCodeStr = JSCodeStr & "</tr></table>');"
  1166.   JSCodeStr = Replace(JSCodeStr,"<tr></tr>","")
  1167.   JSCodeStr = Replace(Replace(JSCodeStr,Chr(13),""),Chr(10),"")
  1168.   if CreateFileTF = True then
  1169.   Set MyFile=Server.CreateObject(G_FS_FSO)
  1170.   If MyFile.FileExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js") then
  1171.  MyFile.DeleteFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  1172.   End If
  1173.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS")) Then
  1174. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS"))
  1175.   End if
  1176.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")) Then
  1177. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs"))
  1178.   End if
  1179.   Set CrHNJS=MyFile.CreateTextFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  1180.   CrHNJS.write JSCodeStr
  1181.   Set MyFile=nothing
  1182.   ClsJSObj.Close
  1183.   Set ClsJSObj = Nothing
  1184.    else
  1185.   PCssH = JSCodeStr
  1186.    end if
  1187. Else
  1188. PCssH = "生成JS文件时未找到参数"
  1189. End If
  1190. End Function
  1191. Public Function PCssI(EName,CreateFileTF)
  1192. Dim ClsJSObj,ClsJSFileObj,ClsFileSql,ClsNewsObj,TempEName,JSCodeStr,i,MyFile,CrHNJS,OpenMode
  1193. Dim NewsLinkStr
  1194. Set ClsJSObj = Conn.Execute("Select ID,EName,CName,Type,Manner,PicWidth,PicHeight,NewsNum,NewsTitleNum,TitleCSS,ContentCSS,BackCSS,RowNum,PicPath,AddTime,ShowTimeTF,ContentNum,NaviPic,DateType,DateCSS,Info,MoreContent,LinkWord,LinkCSS,RowSpace,RowBettween,OpenMode From FS_NS_FreeJS Where EName='"&EName&"'")
  1195. If Not ClsJSObj.eof then
  1196.   JSCodeStr = "document.write('<table class="""&ClsJSObj("BackCSS")&""" width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr>"
  1197.   Set ClsJSFileObj=server.createobject(G_FS_RS)
  1198.   ClsFileSql="Select ID,Title,JSName,FileName,PicPath,ClassID,NewsTime,ToJsTime,DelFlag From FS_NS_FreeJSFile where JSName='"&EName&"' and DelFlag=0 order by ToJsTime desc"
  1199.   ClsJSFileObj.open ClsFileSql,Conn,1,1
  1200.   If ClsJSFileObj.eof then 
  1201. JSCodeStr = JSCodeStr & "<td>此JS内暂无新闻</td></tr>"
  1202.   end if
  1203.   If ClsJSObj("OpenMode")=1 then
  1204.   OpenMode = "target=_blank"
  1205.   Else
  1206.   OpenMode = "target=_self"
  1207.   End If
  1208. ListSpaceStr = ""
  1209. for Temp_i = 1 to Cint(ClsJSObj("RowSpace")2)
  1210. ListSpaceStr = ListSpaceStr & "&nbsp;"
  1211. next 
  1212.   for i=1 to ClsJSObj("NewsNum")
  1213.   If ClsJSFileObj.eof then Exit For
  1214.   Response.Write("Select ID,NewsID,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress,Content,isPicNews,NewsPicFile,NewsSmallPicFile,PicborderCss,Templet,isPop,Source,Editor,Keywords,Author,SaveNewsPath,FileName,FileExtName,NewsProperty,TodayNewsPic,isLock,isRecyle,addtime From FS_NS_News where FileName='"&ClsJSFileObj("FileName")&"'")
  1215.   Set ClsNewsObj = Conn.Execute("Select ID,NewsID,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress,Content,isPicNews,NewsPicFile,NewsSmallPicFile,PicborderCss,Templet,isPop,Source,Editor,Keywords,Author,SaveNewsPath,FileName,FileExtName,NewsProperty,TodayNewsPic,isLock,isRecyle,addtime From FS_NS_News where FileName='"&ClsJSFileObj("FileName")&"'")
  1216.   NewsLinkStr = GetOneNewsLinkURL(ClsNewsObj("NewsID"))
  1217.   If ClsJSObj("ShowTimeTF")="1" then
  1218.   JSCodeStr = JSCodeStr & "<td width="&Cint(100/Cint(ClsJSObj("RowNum")))&"% valign=""top""><table width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr><td rowspan=""2"">"&ListSpaceStr&"</td><td colspan=""3""><div align=""center""><img src=""<img src="""&ClsJSObj("NaviPic")&""" />"" /><a class="""&ClsJSObj("TitleCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum"))&"</a>&nbsp;<Span class="""&ClsJSObj("DateCSS")&""">"&DateFormat(ClsNewsObj("AddTime"),""&ClsJSObj("DateType")&"")&"</Span></div></td><td rowspan=""2"">"&ListSpaceStr&"</td></tr>"
  1219.   Else
  1220.   JSCodeStr = JSCodeStr & "<td width="&Cint(100/Cint(ClsJSObj("RowNum")))&"% valign=""top""><table width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr><td rowspan=""2"">"&ListSpaceStr&"</td><td colspan=""3""><div align=""center""><img src=""<img src="""&ClsJSObj("NaviPic")&""" />"" /><a class="""&ClsJSObj("TitleCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum"))&"</a></div></td><td rowspan=""2"">"&ListSpaceStr&"</td></tr>"
  1221.   End If
  1222.   JSCodeStr = JSCodeStr & "<tr><td valign=""top""><a href="&NewsLinkStr&" "&OpenMode&"><img src="& ClsJSFileObj("PicPath") &" height="&ClsJSObj("PicHeight")&" width="&ClsJSObj("PicWidth")&" border=""0""></a></td><td>&nbsp;</td>"   
  1223.   If  ClsJSObj("MoreContent")=1 then
  1224.   JSCodeStr = JSCodeStr & "<td><Span class="""&ClsJSObj("ContentCSS")&""">"&TitleSpaceStr&left(ClsNewsObj("Content"),ClsJSObj("ContentNum"))&"</Span>......<br><div align=""right""><a class="""&ClsJSObj("LinkCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&ClsJSObj("LinkWord")&"</a></div></td></tr></table></td>"
  1225.   Else
  1226.   JSCodeStr = JSCodeStr & "<td><Span class="""&ClsJSObj("ContentCSS")&""">"&TitleSpaceStr&left(ClsNewsObj("Content"),ClsJSObj("ContentNum"))&"</Span>......</td></tr></table></td>"
  1227.   End If
  1228.   ClsNewsObj.Close
  1229.   Set ClsNewsObj = Nothing
  1230.   ClsJSFileObj.MoveNext
  1231.   if i mod Cint(ClsJSObj("RowNum")) = 0 or ClsJSFileObj.eof then
  1232.   JSCodeStr = JSCodeStr &"</tr><tr><td colspan="""&Cint(ClsJSObj("RowNum"))&""" height="""&ClsJSObj("RowSpace")&""" background="""&ClsJSObj("RowBettween")&"""></td></tr><tr>"
  1233.   end if
  1234.   next 
  1235.   ClsJSFileObj.Close 
  1236.   Set ClsJSFileObj = Nothing 
  1237.   JSCodeStr = JSCodeStr & "</tr></table>');"
  1238.   JSCodeStr = Replace(JSCodeStr,"<tr></tr>","")
  1239.   JSCodeStr = Replace(Replace(JSCodeStr,Chr(13),""),Chr(10),"")
  1240.   if CreateFileTF = True then
  1241.   Set MyFile=Server.CreateObject(G_FS_FSO)
  1242.   If MyFile.FileExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js") then
  1243.  MyFile.DeleteFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  1244.   End If
  1245.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS")) Then
  1246. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS"))
  1247.   End if
  1248.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")) Then
  1249. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs"))
  1250.   End if
  1251.   Set CrHNJS=MyFile.CreateTextFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  1252.   CrHNJS.write JSCodeStr
  1253.   Set MyFile=nothing
  1254.   ClsJSObj.Close
  1255.   Set ClsJSObj = Nothing
  1256.    else
  1257.   PCssI = JSCodeStr
  1258.    end if
  1259. Else
  1260. PCssI = "生成JS文件时未找到参数"
  1261. End If
  1262. End Function
  1263. Public Function PCssJ(EName,CreateFileTF)
  1264. Dim ClsJSObj,ClsJSFileObj,ClsFileSql,ClsNewsObj,TempEName,JSCodeStr,i,MyFile,CrHNJS,OpenMode
  1265. Dim NewsLinkStr
  1266. Set ClsJSObj = Conn.Execute("Select ID,EName,CName,Type,Manner,PicWidth,PicHeight,NewsNum,NewsTitleNum,TitleCSS,ContentCSS,BackCSS,RowNum,PicPath,AddTime,ShowTimeTF,ContentNum,NaviPic,DateType,DateCSS,Info,MoreContent,LinkWord,LinkCSS,RowSpace,RowBettween,OpenMode From FS_NS_FreeJS Where EName='"&EName&"'")
  1267. If Not ClsJSObj.eof then
  1268.   JSCodeStr = "document.write('<table class="""&ClsJSObj("BackCSS")&""" width=100% border=0 cellpadding=0 cellspacing="""&ClsJSObj("RowSpace")&"""><tr>"
  1269.   Set ClsJSFileObj=server.createobject(G_FS_RS)
  1270.   ClsFileSql="Select ID,Title,JSName,FileName,PicPath,ClassID,NewsTime,ToJsTime,DelFlag From FS_NS_FreeJSFile where JSName='"&EName&"' and DelFlag=0 order by ToJsTime desc"
  1271.   ClsJSFileObj.open ClsFileSql,Conn,1,1
  1272.   If ClsJSFileObj.eof then 
  1273. JSCodeStr = JSCodeStr & "<td>此JS内暂无新闻</td>"
  1274.   end if
  1275.   If ClsJSObj("OpenMode")=1 then
  1276.   OpenMode = "target=_blank"
  1277.   Else
  1278.   OpenMode = "target=_self"
  1279.   End If
  1280.   for i=1 to ClsJSObj("NewsNum")
  1281.   If ClsJSFileObj.eof then Exit For
  1282.   Set ClsNewsObj = Conn.Execute("Select ID,NewsID,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress,Content,isPicNews,NewsPicFile,NewsSmallPicFile,PicborderCss,Templet,isPop,Source,Editor,Keywords,Author,SaveNewsPath,FileName,FileExtName,NewsProperty,TodayNewsPic,isLock,isRecyle,addtime From FS_NS_News where FileName='"&ClsJSFileObj("FileName")&"'")
  1283.   NewsLinkStr = GetOneNewsLinkURL(ClsNewsObj("NewsID"))
  1284.   If ClsJSObj("ShowTimeTF")="1" then
  1285.   JSCodeStr = JSCodeStr &"<td width="&Cint(100/Cint(ClsJSObj("RowNum")))&"% valign=""top""><table background="""& ClsJSFileObj("PicPath")&""" width=""100%"" border=""0"" cellpadding=""0"" cellspacing="""&ClsJSObj("RowSpace")&"""><tr><td>"& ClsJSObj("NaviPic") &"<a class="""&ClsJSObj("TitleCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum"))&"</a>&nbsp;<Span class="""&ClsJSObj("DateCSS")&""">"&DateFormat(ClsNewsObj("AddTime"),""&ClsJSObj("DateType")&"")&"</Span></td></tr>"
  1286.   Else
  1287.   JSCodeStr = JSCodeStr &"<td width="&Cint(100/Cint(ClsJSObj("RowNum")))&"% valign=""top""><table background="""& ClsJSFileObj("PicPath")&""" width=""100%"" border=""0"" cellpadding=""0"" cellspacing="""&ClsJSObj("RowSpace")&"""><tr><td>"& ClsJSObj("NaviPic") &"<a class="""&ClsJSObj("TitleCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum"))&"</a></td></tr>"
  1288.   End If
  1289.   If  ClsJSObj("MoreContent")=1 then
  1290.   JSCodeStr = JSCodeStr & "<tr><td><Span class="""&ClsJSObj("ContentCSS")&""">"&TitleSpaceStr&left(ClsNewsObj("Content"),ClsJSObj("ContentNum"))&"</Span>......<br><div align=""right""><a class="""&ClsJSObj("LinkCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&ClsJSObj("LinkWord")&"</a></div></td></tr></table></td>"
  1291.   Else
  1292.   JSCodeStr = JSCodeStr & "<tr><td><Span class="""&ClsJSObj("ContentCSS")&""">"&TitleSpaceStr&left(ClsNewsObj("Content"),ClsJSObj("ContentNum"))&"</Span>......</td></tr></table></td>"
  1293.   End If
  1294.   ClsNewsObj.Close
  1295.   Set ClsNewsObj = Nothing
  1296.   ClsJSFileObj.MoveNext
  1297.   if i mod Cint(ClsJSObj("RowNum")) = 0 or ClsJSFileObj.eof then
  1298.   JSCodeStr = JSCodeStr &"</tr><tr><td colspan="""&Cint(ClsJSObj("RowNum"))&""" height="""&ClsJSObj("RowSpace")&""" background="""&ClsJSObj("RowBettween")&"""></td></tr><tr>"
  1299.   end if
  1300.   next 
  1301.   ClsJSFileObj.Close 
  1302.   Set ClsJSFileObj = Nothing 
  1303.   JSCodeStr = JSCodeStr & "</tr></table>');"
  1304.   JSCodeStr = Replace(JSCodeStr,"<tr></tr>","")
  1305.   JSCodeStr = Replace(Replace(JSCodeStr,Chr(13),""),Chr(10),"")
  1306.   if CreateFileTF = True then
  1307.   Set MyFile=Server.CreateObject(G_FS_FSO)
  1308.   If MyFile.FileExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js") then
  1309.  MyFile.DeleteFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  1310.   End If
  1311.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS")) Then
  1312. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS"))
  1313.   End if
  1314.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")) Then
  1315. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs"))
  1316.   End if
  1317.   Set CrHNJS=MyFile.CreateTextFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  1318.   CrHNJS.write JSCodeStr
  1319.   Set MyFile=nothing
  1320.   ClsJSObj.Close
  1321.   Set ClsJSObj = Nothing
  1322.    else
  1323.   PCssJ = JSCodeStr
  1324.    end if
  1325. Else
  1326. PCssJ = "生成JS文件时未找到参数"
  1327. End If
  1328. End Function
  1329. Public Function PCssK(EName,CreateFileTF)
  1330. Dim ClsJSObj,ClsJSFileObj,ClsFileSql,ClsNewsObj,TempEName,JSCodeStr,i,MyFile,CrHNJS,OpenMode
  1331. Dim NewsLinkStr
  1332. Set ClsJSObj = Conn.Execute("Select ID,EName,CName,Type,Manner,PicWidth,PicHeight,NewsNum,NewsTitleNum,TitleCSS,ContentCSS,BackCSS,RowNum,PicPath,AddTime,ShowTimeTF,ContentNum,NaviPic,DateType,DateCSS,Info,MoreContent,LinkWord,LinkCSS,RowSpace,RowBettween,OpenMode From FS_NS_FreeJS Where EName='"&EName&"'")
  1333. If Not ClsJSObj.eof then
  1334.   JSCodeStr = "document.write('<table background="""& ClsJSObj("PicPath")&""" width=""100%"" border=""0"" cellpadding=""0"" cellspacing="""&ClsJSObj("RowSpace")&"""><tr>"
  1335.   Set ClsJSFileObj=server.createobject(G_FS_RS)
  1336.   ClsFileSql="Select ID,Title,JSName,FileName,PicPath,ClassID,NewsTime,ToJsTime,DelFlag From FS_NS_FreeJSFile where JSName='"&EName&"' and DelFlag=0 order by ToJsTime desc"
  1337.   ClsJSFileObj.open ClsFileSql,Conn,1,1
  1338.   If ClsJSFileObj.eof then
  1339. JSCodeStr = JSCodeStr & "<td>此JS内暂无新闻</td>"
  1340.   End If
  1341.   If ClsJSObj("OpenMode")=1 then
  1342.   OpenMode = "target=_blank"
  1343.   Else
  1344.   OpenMode = "target=_self"
  1345.   End If
  1346.   for i=1 to ClsJSObj("NewsNum")
  1347.   If ClsJSFileObj.eof then Exit For
  1348.   Set ClsNewsObj = Conn.Execute("Select ID,NewsID,PopId,ClassID,SpecialEName,NewsTitle,CurtTitle,NewsNaviContent,isShowReview,TitleColor,titleBorder,TitleItalic,IsURL,URLAddress,Content,isPicNews,NewsPicFile,NewsSmallPicFile,PicborderCss,Templet,isPop,Source,Editor,Keywords,Author,SaveNewsPath,FileName,FileExtName,NewsProperty,TodayNewsPic,isLock,isRecyle,addtime From FS_NS_News where FileName='"&ClsJSFileObj("FileName")&"'")
  1349.   NewsLinkStr = GetOneNewsLinkURL(ClsNewsObj("NewsID"))
  1350.   If ClsJSObj("ShowTimeTF")="1" then
  1351.   JSCodeStr = JSCodeStr &"<td valign=middle><img src=""<img src="""&ClsJSObj("NaviPic")&""" />"" /><a class="""&ClsJSObj("TitleCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum"))&"</a></td><td><Span class="""&ClsJSObj("DateCSS")&""">"&DateFormat(ClsNewsObj("AddTime"),""&ClsJSObj("DateType")&"")&"</Span></td>"
  1352.   Else
  1353.   JSCodeStr = JSCodeStr &"<td valign=middle><img src=""<img src="""&ClsJSObj("NaviPic")&""" />"" /><a class="""&ClsJSObj("TitleCSS")&""" href="&NewsLinkStr&" "&OpenMode&">"&GotTopic(ClsNewsObj("NewsTitle"),ClsJSObj("NewsTitleNum"))&"</a></td>"
  1354.   End If
  1355.   ClsNewsObj.Close
  1356.   Set ClsNewsObj = Nothing
  1357.   ClsJSFileObj.MoveNext
  1358.   if i mod Cint(ClsJSObj("RowNum")) = 0 or ClsJSFileObj.eof then
  1359. if ClsJSObj("ShowTimeTF")=1 then
  1360.   JSCodeStr = JSCodeStr &"</tr><tr><td colspan="""&Cint(ClsJSObj("RowNum"))*2&""" height="""&ClsJSObj("RowSpace")&""" background="""&ClsJSObj("RowBettween")&"""></td></tr><tr>"
  1361. else
  1362.   JSCodeStr = JSCodeStr &"</tr><tr><td colspan="""&Cint(ClsJSObj("RowNum"))&""" height="""&ClsJSObj("RowSpace")&""" background="""&ClsJSObj("RowBettween")&"""></td></tr><tr>"
  1363. end if
  1364.   end if
  1365.   next 
  1366.   ClsJSFileObj.Close 
  1367.   Set ClsJSFileObj = Nothing 
  1368.   JSCodeStr = JSCodeStr & "</tr></table>');"
  1369.   JSCodeStr = Replace(JSCodeStr,"<tr></tr>","")
  1370.   JSCodeStr = Replace(Replace(JSCodeStr,Chr(13),""),Chr(10),"")
  1371.   if CreateFileTF = True then
  1372.   Set MyFile=Server.CreateObject(G_FS_FSO)
  1373.   If MyFile.FileExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js") then
  1374.  MyFile.DeleteFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  1375.   End If
  1376.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS")) Then
  1377. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS"))
  1378.   End if
  1379.   If Not MyFile.FolderExists(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")) Then
  1380. MyFile.CreateFolder(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs"))
  1381.   End if
  1382.   Set CrHNJS=MyFile.CreateTextFile(Server.MapPath("../../../"&TempSysRootDir&"/JS/FreeJs")&""& EName &".js")
  1383.   CrHNJS.write JSCodeStr
  1384.   Set MyFile=nothing
  1385.   ClsJSObj.Close
  1386.   Set ClsJSObj = Nothing
  1387.    else
  1388.   PCssK = JSCodeStr
  1389.    end if
  1390. Else
  1391. PCssK = "生成JS文件时未找到参数"
  1392. End If
  1393. End Function
  1394. End Class
  1395. %>
  1396. <!-- Powered by: FoosunCMS4.0系列,Company:Foosun Inc. -->