📄 fy.common.front.asp
字号:
If InStr(strHtml,"{$List_小说栏目地址}")>0 Then
strHtml=FY_Replace(strHtml,"{$List_小说栏目地址}",FY_Class_Url(rs("类别"),0))
End if
If InStr(strHtml,"{$List_小说栏目名}")>0 Then
strHtml=FY_Replace(strHtml,"{$List_小说栏目名}",FY_Class_Name(rs("类别")))
End if
strHtml=FY_Replace(strHtml,"{$List_小说完整名称}",rs("书名"))
strHtml=FY_Replace(strHtml,"{$List_小说标题}",GetSubStr(rs("书名"),ListBQ(5),False))
If InStr(strHtml,"{$List_小说前言")>0 Then
strHtml=FY_Replace(strHtml,"{$List_小说前言}",GetSubStr(rs("前言"),ListBQ(6),False))
End if
strHtml=FY_Replace(strHtml,"{$List_小说编号}",rs("编号"))
strHtml=FY_Replace(strHtml,"{$List_小说作者}",rs("作者"))
strHtml=FY_Replace(strHtml,"{$List_时间_日}",day(rs("更新时间")))
strHtml=FY_Replace(strHtml,"{$List_时间_月}",month(rs("更新时间")))
strHtml=FY_Replace(strHtml,"{$List_时间_年}",year(rs("更新时间")))
strHtml=FY_Replace(strHtml,"{$List_小说地址}",FY_Novel_Url(rs("编号"),rs("类别")))
strHtml=FY_Replace(strHtml,"{$List_小说状态}",FY_XSZT(rs("状态")))
If InStr(strHtml,"{$List_最新章节")>0 Then
strHtml=FY_Replace(strHtml,"{$List_最新章节}",FY_Contents_Name(rs("最新章节")))
strHtml=FY_Replace(strHtml,"{$List_最新章节连接}",FY_Contents_Url(rs("最新章节"),rs("类别"),rs("编号")))
End if
strHtml=FY_Replace(strHtml,"{$List_更新日期}",FY_Time(rs("更新时间"),ListBQ(9)))
strHtml=FY_Replace(strHtml,"{$List_添加时间}",FY_Time(rs("添加时间"),ListBQ(10)))
strHtml=FY_Replace(strHtml,"{$List_封面图片}",FY_Novel_Pic(rs("图片")))
If InStr(strHtml,"{next(")>0 Then
regEx.Pattern = "\{next\((.*?)\)}([\s\S]*?){\/next}"
Set next_XH = regEx.Execute(strHtml)
For Each Match In next_XH
If InStr(Match.SubMatches(0),"|")>0 Then
next_X(5)=split(Match.SubMatches(0),"|") '循环参数
next_X(4)=Match.SubMatches(1) '循环内容
If ubound(next_X(5))=3 Then
next_X(0)=FY_CLng(next_X(5)(0))
next_X(1)=FY_CLng(next_X(5)(1))
next_X(2)=FY_CLng(next_X(5)(2))
next_X(3)=FY_CLng(next_X(5)(3))
If next_X(0)<2 And next_X(1)<2 And next_X(2)>0 And next_X(2)<10 Then
If (next_X(0)=1 And LISTQB_i=1) Or LISTQB_i=next_X(3) Or ((LISTQB_i+next_X(3)) Mod next_X(2)=0) Or (next_X(1)=1 And j=rs.pagesize) Or (next_X(1)=1 And j=x) Then
strHtml = FY_Replace(strHtml, Match.Value,next_X(4))
Else
strHtml = FY_Replace(strHtml, Match.Value,"")
End if
Else
strHtml = FY_Replace(strHtml, Match.Value,"错误内循环标签003,请检查错误,如果无法发现错误,请联系客服")
End if
Else
strHtml = FY_Replace(strHtml, Match.Value,"错误内循环标签002,请检查错误,如果无法发现错误,请联系客服")
End if
Else
strHtml = FY_Replace(strHtml, Match.Value,"错误内循环标签001,请检查错误,如果无法发现错误,请联系客服")
End if
Next
set next_XH=nothing
End if
LISTQB_i=LISTQB_i+1
rs.movenext
If rs.eof then exit for
next
If ListBQ(12)=1 Then '验证是否含有分页
session("FY_ZGYS")=maxpage '总共页数,提供给生成使用
session("FY_Bq")=List_PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>",FY_List_BM_C)
'获得分页标签,给后续替换
ElseIf FY_CLng(session("FY_ZGYS"))<2 Then
session("FY_ZGYS")=1
End if
rs.close
set rs=nothing
End if
End if
End Sub
'分类编写
'FY_List_Class_A 模板
'FY_List_Class_B 模板正则后的参数
'FY_List_Class_C 当前栏目
Public Sub FY_List_Class(FY_List_Class_A,FY_List_Class_B,FY_List_Class_C)
Dim FY_List_Class_I
strHtml=""
List_CS(0)="" '防止循环时提交前一项的数据
List_CS(1)=""
List_CS(2)=""
List_CS(3)=""
List_CS(4)=""
List_CS(6)=""
List_CS(7)=""
List_CS(8)=""
For FY_List_Class_I=0 to 7
ListBQ(FY_List_Class_I)=ListBQ(20)(FY_List_Class_I)
If FY_List_Class_I<4 And ListBQ(FY_List_Class_I)="" Then
strHtml="列表模板标签使用错误,标签错误编号003" '在不允许为空的参数上设置空值
exit for
ElseIf FY_List_Class_I<4 And Not(IsNumeric(ListBQ(FY_List_Class_I))) Then
strHtml="列表模板标签使用错误,标签错误编号004" '在必须为数字的参数上设置非数值
exit for
End if
If FY_List_Class_I<4 Then
ListBQ(FY_List_Class_I)=FY_CLng(ListBQ(FY_List_Class_I))
End if
next
If strHtml="" Then
If ListBQ(20)(0)<>0 Then
List_CS(0)="Top "&ListBQ(20)(0)
End if
If ListBQ(20)(2)=0 Then
List_CS(1)="排序 asc,编号 desc"
ElseIf ListBQ(20)(2)=1 Then
List_CS(1)="编号 desc"
Else
List_CS(1)="链接属性='00',排序 desc"
End if
If ListBQ(20)(3)=1 Then
List_CS(2)=" 链接属性='00'"
ElseIf ListBQ(20)(3)=2 Then
List_CS(2)=" 链接属性<>'00'"
Else
List_CS(2)=""
End if
set rs=server.createobject("adodb.recordset")
sql="select "&List_CS(0)&"* from 分类 where 分类状态=0"&List_CS(2)&" order by "&List_CS(1)
rs.open sql,conn,1,1
If rs.eof and rs.bof then
strHtml=""
else
FY_List_Class_I=1
do while not rs.eof
If FY_List_Class_I mod 2=1 Then
strHtml=strHtml&""&FY_Replace(FY_List_Class_A,"{$List_单双行显示}",ListBQ(20)(4))
Else
strHtml=strHtml&""&FY_Replace(FY_List_Class_A,"{$List_单双行显示}",ListBQ(20)(5))
End if
If FY_List_Class_C=rs("编号") Then
strHtml=FY_Replace(strHtml,"{$Class_当前栏目附加}",ListBQ(20)(6))
Else
strHtml=FY_Replace(strHtml,"{$Class_当前栏目附加}",ListBQ(20)(7))
End if
If rs("链接属性")="00" Then
strHtml=FY_Replace(strHtml,"{$Class_栏目地址}",FY_Class_Url(rs("编号"),0))
Else
strHtml=FY_Replace(strHtml,"{$Class_栏目地址}",FY_DefiniteUrl(rs("链接属性"),FY_Config(3)&InstallDir))
End if
strHtml=FY_Replace(strHtml,"{$Class_栏目名称}",rs("分类名称"))
strHtml=FY_Replace(strHtml,"{$Class_窗口定义}",FY_OpenType(rs("打开方式")))
FY_List_Class_I=FY_List_Class_I+1
rs.MoveNext
loop
End if
rs.close
set rs=nothing
If ListBQ(20)(1)=0 Then
If FY_List_Class_C=0 Then
strHtml=""&FY_Replace(FY_Replace(FY_Replace(FY_List_Class_A,"{$Class_栏目名称}","首页"),"{$Class_当前栏目附加}",ListBQ(20)(6)),"{$Class_栏目地址}",InstallDir&"Index."&FY_Html_Name(FY_Config(15)))&""&strHtml
Else
strHtml=""&FY_Replace(FY_Replace(FY_Replace(FY_List_Class_A,"{$Class_栏目名称}","首页"),"{$Class_当前栏目附加}",ListBQ(20)(7)),"{$Class_栏目地址}",InstallDir&"Index."&FY_Html_Name(FY_Config(15)))&""&strHtml
End if
ElseIf ListBQ(20)(1)=1 Then
If FY_List_Class_C=0 Then
strHtml=strHtml&""&FY_Replace(FY_Replace(FY_Replace(FY_List_Class_A,"{$Class_栏目名称}","首页"),"{$Class_当前栏目附加}",ListBQ(20)(7)),"{$Class_栏目地址}",InstallDir&"Index."&FY_Html_Name(FY_Config(15)))
Else
strHtml=strHtml&""&FY_Replace(FY_Replace(FY_Replace(FY_List_Class_A,"{$Class_栏目名称}","首页"),"{$Class_当前栏目附加}",ListBQ(20)(7)),"{$Class_栏目地址}",InstallDir&"Index."&FY_Html_Name(FY_Config(15)))
End if
End if
strHtml=FY_Replace(strHtml,"{$Class_窗口定义}","")
End if
End Sub
'模板内容
'当前栏目 非栏目设置成0
'当前页码
'FYGN 分页功能
Public Function FY_Mb_GO(strcontent,FY_Mb_GO_A,FY_Mb_GO_B,FY_Mb_GO_C,FYGN)
strcontent=FY_MBBQ_BQ(strcontent) '自定义标签
strcontent=FY_Mb_ZZ(strcontent,FY_Mb_GO_A,FY_Mb_GO_B,FY_Mb_GO_C,FYGN) '预留标签
strcontent=FY_MBBQ_Mr(strcontent) '系统默认标签
FY_Mb_GO=strcontent
End Function
Public Function FY_Mb_List(FY_Mb_Class,FY_Mb_List_A,FY_Mb_List_B,FY_Mb_List_C,FY_Mb_List_D,FY_Mb_List_E,FY_Mb_List_F,FYGN)
strHtml=""
ListBQ(20)=split(FY_Mb_List_A,"|||||")
If ubound(ListBQ(20))<>FY_Mb_List_C Then
FY_Mb_List="列表模板标签使用错误,标签错误编号001 "&FY_Mb_List_A&"11111111111"&FY_Mb_List_B '标签的位数不正确
Else
If FY_Mb_Class="小说" Then
if ListBQ(20)(12)=1 And FYGN=0 Then
FY_Mb_List="列表模板标签使用错误,标签错误编号002" '在不允许使用分页的页面使用了分页
Else
Call FY_List_B(FY_Mb_List_B,FY_Mb_List_A,FY_Mb_List_D,FY_Mb_List_E,FY_Mb_List_F,FYGN)
End if
Else
Call FY_List_Class(FY_Mb_List_B,FY_Mb_List_A,FY_Mb_List_D)
End if
FY_Mb_List=strHtml
End if
End Function
Public Function FY_Mb_ZZ(ByVal strcontent,FY_Mb_ZZ_A,FY_Mb_ZZ_B,FY_Mb_ZZ_C,FYGN)
Dim strList
strList = strcontent
If InStr(strList,"【List(")>0 Then
regEx.Pattern = "\【List\((.*?)\)】([\s\S]*?)【\/List】"
Set Matches = regEx.Execute(strList)
For Each Match In Matches
strList = FY_Replace(strList, Match.Value,FY_Mb_List("小说",Match.SubMatches(0),Match.SubMatches(1),17,FY_Mb_ZZ_A,FY_Mb_ZZ_B,FY_Mb_ZZ_C,FYGN))
Next
set Matches=nothing
If session("FY_Bq")<>"" Then
strList=FY_Replace(strList,"{$List_分页标签}",session("FY_Bq"))
session("FY_Bq")=""
Else
strList=FY_Replace(strList,"{$List_分页标签}","")
End if
End if
If InStr(strList,"【Class_List(")>0 Then
regEx.Pattern = "\【Class_List\((.*?)\)】([\s\S]*?)【\/Class_List】"
Set Matches = regEx.Execute(strList)
For Each Match In Matches
strList = FY_Replace(strList, Match.Value,FY_Mb_List("分类",Match.SubMatches(0),Match.SubMatches(1),7,FY_Mb_ZZ_A,FY_Mb_ZZ_B,FY_Mb_ZZ_C,FYGN))
Next
set Matches=nothing
End if
FY_Mb_ZZ = strList
End Function
'默认标签替换
Function FY_MBBQ_Mr(ByVal FY_MBBQ_Mr_TXT)
FY_MBBQ_Mr_TXT=FY_Replace(FY_MBBQ_Mr_TXT,"{$系统目录}",InstallDir)
FY_MBBQ_Mr_TXT=FY_Replace(FY_MBBQ_Mr_TXT,"{$网站名称}",FY_Config(0))
FY_MBBQ_Mr_TXT=FY_Replace(FY_MBBQ_Mr_TXT,"{$网站副标题}",FY_Config(20))
FY_MBBQ_Mr_TXT=FY_Replace(FY_MBBQ_Mr_TXT,"{$访问地址}",FY_Config(3)&""&InstallDir&"")
FY_MBBQ_Mr_TXT=FY_Replace(FY_MBBQ_Mr_TXT,"{$网站域名}",FY_Config(3))
FY_MBBQ_Mr_TXT=FY_Replace(FY_MBBQ_Mr_TXT,"{$站长邮箱}",FY_Config(5))
FY_MBBQ_Mr_TXT=FY_Replace(FY_MBBQ_Mr_TXT,"{$站长QQ}",FY_Config(4))
FY_MBBQ_Mr_TXT=FY_Replace(FY_MBBQ_Mr_TXT,"{$keywords}",FY_Config(2))
FY_MBBQ_Mr_TXT=FY_Replace(FY_MBBQ_Mr_TXT,"{$description}",FY_Config(1))
FY_MBBQ_Mr_TXT=FY_Replace(FY_MBBQ_Mr_TXT,"{$官方连接}",FY_Config(7))
FY_MBBQ_Mr_TXT=FY_Replace(FY_MBBQ_Mr_TXT,"{$小说数量}",FY_Config(10))
FY_MBBQ_Mr_TXT=FY_Replace(FY_MBBQ_Mr_TXT,"{$栏目数量}",FY_Config(11))
FY_MBBQ_Mr_TXT=FY_Replace(FY_MBBQ_Mr_TXT,"{$站长名字}",FY_Config(12))
FY_MBBQ_Mr_TXT=FY_Replace(FY_MBBQ_Mr_TXT,"{$默认模板}",FY_Config(16))
FY_MBBQ_Mr_TXT=FY_Replace(FY_MBBQ_Mr_TXT,"{$网站版权}",FY_Config(6))
FY_MBBQ_Mr_TXT=FY_Replace(FY_MBBQ_Mr_TXT,"{$当前位置}",FY_Web_R)
'FY_MBBQ_Mr_TXT=FY_Replace(FY_MBBQ_Mr_TXT,"",)
FY_MBBQ_Mr=FY_MBBQ_Mr_TXT
End Function
'标签使用,从号码小的到大的运行
Function FY_MBBQ_BQ(ByVal FY_MBBQ_BQ_TXT)
If InStr(FY_MBBQ_BQ_TXT,"{$MY_")>0 Then
Dim MB_BQ_Rs
Set MB_BQ_Rs = Server.CreateObject("adodb.recordset")
sql = "select * from 自定义标签 order by Priority asc,LabelID asc"
MB_BQ_Rs.Open sql, conn, 1, 1
do while not MB_BQ_Rs.eof
FY_MBBQ_BQ_TXT=FY_Replace(FY_MBBQ_BQ_TXT,"{$MY_"&MB_BQ_Rs("LabelName")&"}",MB_BQ_Rs("LabelContent"))
MB_BQ_Rs.movenext
loop
MB_BQ_Rs.close
set MB_BQ_Rs=nothing
End if
FY_MBBQ_BQ=FY_MBBQ_BQ_TXT
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -