📄 cls_js.asp
字号:
<%'Copyright (c) 2006 Foosun Inc. Code by Einstein.Liu
Class Cls_Js
private ns_id,ns_ename,ns_cname,ns_js_type,ns_manner,ns_picWidth,ns_picHeight,ns_newsNum,ns_newsTitleNum,ns_titleCSS,ns_contentCSS
private ns_backCSS,ns_rowNum,ns_picPath,ns_addTime,ns_showTimeTF,ns_contentNum,ns_naviPic,ns_dateType,ns_dateCss,ns_info
private ns_moreContent,ns_LinkWord,ns_LinkCSS,ns_rowSpace,ns_rowBettween,ns_openMode
Private TempSysRootDir
Private ListSpace,ListSpaceStr,Temp_i,TableCellSpace,TitleSpace,TitleSpaceStr,MoreContentStr
'获得自由js的参数
public Function getFreeJsParam(jsid)
Dim F_FreeJsParam_Rs,sql_statement
Set F_FreeJsParam_Rs=Server.CreateObject(G_FS_RS)
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="&CintStr(jsid)
F_FreeJsParam_Rs.open sql_statement,Conn,1,1
if not F_FreeJsParam_Rs.eof and not F_FreeJsParam_Rs.bof then
ns_id=F_FreeJsParam_Rs("ID")
ns_ename=F_FreeJsParam_Rs("EName")
ns_cname=F_FreeJsParam_Rs("CName")
ns_js_type=F_FreeJsParam_Rs("Type")
ns_manner=F_FreeJsParam_Rs("Manner")
ns_picWidth=F_FreeJsParam_Rs("PicWidth")
ns_picHeight=F_FreeJsParam_Rs("PicHeight")
ns_newsNum=F_FreeJsParam_Rs("NewsNum")
ns_newsTitleNum=F_FreeJsParam_Rs("NewsTitleNum")
ns_titleCSS=F_FreeJsParam_Rs("TitleCSS")
ns_contentCSS=F_FreeJsParam_Rs("ContentCSS")
ns_backCSS=F_FreeJsParam_Rs("BackCSS")
ns_rowNum=F_FreeJsParam_Rs("RowNum")
ns_picPath=F_FreeJsParam_Rs("PicPath")
ns_addTime=F_FreeJsParam_Rs("AddTime")
ns_showTimeTF=F_FreeJsParam_Rs("ShowTimeTF")
ns_contentNum=F_FreeJsParam_Rs("ContentNum")
ns_naviPic=F_FreeJsParam_Rs("NaviPic")
ns_dateType=F_FreeJsParam_Rs("DateType")
ns_dateCss=F_FreeJsParam_Rs("DateCSS")
ns_info=F_FreeJsParam_Rs("Info")
ns_moreContent=F_FreeJsParam_Rs("MoreContent")
ns_LinkWord=F_FreeJsParam_Rs("LinkWord")
ns_LinkCSS=F_FreeJsParam_Rs("LinkCSS")
ns_rowSpace=F_FreeJsParam_Rs("RowSpace")
ns_rowBettween=F_FreeJsParam_Rs("RowBettween")
ns_openMode=F_FreeJsParam_Rs("OpenMode")
End if
End Function
'赋值
public Property get id()'Free JS id
id=ns_id
End Property
public Property get ename()' Free Js 英文名
ename=ns_ename
End Property
public Property get cname()' Free Js 中文名
cname=ns_cname
End Property
public Property get js_type()' 类型(0为文字,1为图片)
js_type=ns_js_type
End Property
public Property get manner()' 样式(1-5 为文字样式,6-17为图片样式)(暂)
manner=ns_manner
End Property
public Property get picWidth()' 图片宽度
picWidth=ns_picWidth
End Property
public Property get picHeight()' 图片高度
picHeight=ns_picHeight
End Property
public Property get newsNum()' 允许调用新闻条数
newsNum=ns_newsNum
End Property
public Property get newsTitleNum()'新闻标题字数
newsTitleNum=ns_newsTitleNum
End Property
public Property get titleCSS()' 新闻标题样式
titleCSS=ns_titleCSS
End Property
public Property get contentCSS()' 新闻内容样式
contentCSS=ns_contentCSS
End Property
public Property get backCSS() 'JS背景样式
backCSS=ns_backCSS
End Property
public Property get rowNum()' 每行并排条数(不能为”0”)
rowNum=ns_rowNum
End Property
public Property get picPath()' 为某种样式备用
picPath=ns_picPath
End Property
public Property get addTime()' Free Js添加时间
addTime=ns_addTime
End Property
public Property get showTimeTF()'是否在新闻标题后显示新闻时间(“0”为否,”1” 为是)
showTimeTF=ns_showTimeTF
End Property
public Property get contentNum()' Free Js 新闻内容字数
contentNum=ns_contentNum
End Property
public Property get naviPic()' Free Js 新闻标题导航图片
naviPic=ns_naviPic
End Property
public Property get dateType()' Free Js 日期样式(1-15)
dateType=ns_dateType
End Property
public Property get dateCSS()' Free Js 日期CSS样式
dateCSS=ns_dateCSS
End Property
public Property get info()' Free Js 备注
info=ns_info
End Property
public Property get moreContent()' Free Js 更多链接(新闻内容)
moreContent=ns_moreContent
End Property
public Property get linkWord()' Free Js 链接文字或是图片
linkWord=ns_linkWord
End Property
public Property get linkCSS()' Free Js 链接样式表
linkCSS=ns_linkCSS
End Property
public Property get rowSpace()' Free Js 新闻行距
rowSpace=ns_rowSpace
End Property
public Property get rowBettween()'行间图片
rowBettween=ns_rowBettween
End Property
public Property get openMode()'窗口打开方式
openMode=ns_openMode
End Property
'----------------------------------------------
Public Property Let SysRootDir(ExteriorValue)
TempSysRootDir = ExteriorValue
End Property
'----------------------------------------------
Public Function GetOneNewsLinkURL(NewsID)
Dim NewsObj
Set NewsObj = New cls_NS
GetOneNewsLinkURL = NewsObj.get_NewsLink(NewsID)
Set NewsObj = Nothing
End Function
'-----自由JS时间格式化
Public Function DateFormat(DateStr,Types)
Dim DateString
if IsDate(DateStr) = False then
DateString = ""
end if
Select Case Types
Case "1"
DateString = Year(DateStr)&"-"&Month(DateStr)&"-"&Day(DateStr)
Case "2"
DateString = Year(DateStr)&"."&Month(DateStr)&"."&Day(DateStr)
Case "3"
DateString = Year(DateStr)&"/"&Month(DateStr)&"/"&Day(DateStr)
Case "4"
DateString = Month(DateStr)&"/"&Day(DateStr)&"/"&Year(DateStr)
Case "5"
DateString = Day(DateStr)&"/"&Month(DateStr)&"/"&Year(DateStr)
Case "6"
DateString = Month(DateStr)&"-"&Day(DateStr)&"-"&Year(DateStr)
Case "7"
DateString = Month(DateStr)&"."&Day(DateStr)&"."&Year(DateStr)
Case "8"
DateString = Month(DateStr)&"-"&Day(DateStr)
Case "9"
DateString = Month(DateStr)&"/"&Day(DateStr)
Case "10"
DateString = Month(DateStr)&"."&Day(DateStr)
Case "11"
DateString = Month(DateStr)&"月"&Day(DateStr)&"日"
Case "12"
DateString = Day(DateStr)&"日"&Hour(DateStr)&"时"
case "13"
DateString = Day(DateStr)&"日"&Hour(DateStr)&"点"
Case "14"
DateString = Hour(DateStr)&"时"&Minute(DateStr)&"分"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -