📄 module_config.asp
字号:
<%
'****************************************************
' Jetiben CMS Power by Jetiben.com
' Email: jetiben@hotmail.com
' Web: http://www.jetiben.com/
'****************************************************
Function module_data_side()
Dim tmpstr: tmpstr = ireplace("module.data_side", "tpl")
module_data_side = tmpstr
End Function
Function module_data_list()
Dim classid, tsort
classid = get_num(request.querystring("classid"), 0)
Dim tmpstr, tmpastr, tmprstr, tmptstr
tmpstr = ireplace("module.data_list", "tpl")
Dim tmpstra, tmpstrb
tmpstra = ctemplate(tmpstr, "{$}")
tmpstrb = ctemplate(tmpstra, "{$$}")
sqlstr = "select top " & nlisttopx & " * from " & ndatabase & "," & sort_database & " where " & ndatabase & "." & cfname("class") & "=" & sort_database & "." & sort_idfield & " and " & sort_database & "." & cfnames(sort_fpre, "lng") & "='" & nlng & "' and " & sort_database & "." & cfnames(sort_fpre, "genre") & "='" & ngenre & "' and " & ndatabase & "." & cfname("hidden") & "=0"
If classid > 0 Then sqlstr = sqlstr & " and (" & sort_database & "." & sort_idfield & "=" & classid & " or " & sort_database & "." & cfnames(sort_fpre, "fsid") & "=" & classid & ")"
sqlstr = sqlstr & " order by " & ndatabase & "." & cfname("time") & " desc"
Dim jcutpage, jcuti
Set jcutpage = New jtb_cutpage
jcutpage.perpage = npagesize
jcutpage.sqlstr = sqlstr
jcutpage.cutpage
Set rs = jcutpage.pagers
Dim tmpi, tmpstrc, tmpstrd, tmpstre, tmpsort
tmpi = 0
If Not rs.EOF Then tsort = get_str(rs(cfnames(sort_fpre, "sort")))
If classid > 0 Then Call cntitle(tsort)
For jcuti = 1 To npagesize
If Not rs.EOF Then
If Not tmpi = 0 And tmpi Mod 2 = 0 Then
tmpstrc = tmpstrc & Replace(tmpstra, jtbc_cinfo, tmpstre)
tmpstrd = ""
tmpstre = ""
End If
tmpstrd = Replace(tmpstrb, "{$pic}", get_str(rs(cfname("image"))))
tmpstrd = Replace(tmpstrd, "{$snum}", get_str(rs(cfname("snum"))))
tmpstrd = Replace(tmpstrd, "{$topic}", get_str(rs(cfname("topic"))))
tmpstrd = Replace(tmpstrd, "{$price}", get_num(rs(cfname("price")), 0))
tmpstrd = Replace(tmpstrd, "{$wprice}", get_num(rs(cfname("wprice")), 0))
tmpstrd = Replace(tmpstrd, "{$unit}", get_str(rs(cfname("unit"))))
tmpstrd = Replace(tmpstrd, "{$id}", rs(nidfield))
If get_num(rs(cfname("limit")), 0) = 1 Then
tmpstrd = replace(tmpstrd, "{$limitstr}", get_num(rs(cfname("limitnum")), 0) & " " & get_str(rs(cfname("unit"))))
Else
Dim tlimitless: tlimitless = itake("config.limitless", "lng")
tmpstrd = replace(tmpstrd, "{$limitstr}", tlimitless)
End If
tmpstre = tmpstre & tmpstrd
rs.movenext
tmpi = tmpi + 1
End If
Next
tmpstr = Replace(tmpstr, "{$cpagestr}", jcutpage.pagestr)
Set rs = Nothing
Set jcutpage = Nothing
If Not tmpstre = "" Then tmpstrc = tmpstrc & Replace(tmpstra, jtbc_cinfo, tmpstre)
tmpstrc = Replace(tmpstr, jtbc_cinfo, tmpstrc)
module_data_list = tmpstrc
End Function
Function module_data_detail()
Dim tid, tmpstr
tid = get_num(request.querystring("id"), 0)
Set rs = server.CreateObject("adodb.recordset")
sqlstr = "select * from " & ndatabase & " where " & nidfield & "=" & tid & " and " & cfname("hidden") & "=0"
rs.open sqlstr, conn, 1, 3
If Not rs.EOF Then
rs(cfname("count")) = rs(cfname("count")) + 1
rs.Update
Dim ttpoic: ttpoic = get_str(rs(cfname("topic")))
Call cntitle(ttpoic)
tmpstr = itake("module.data_detail", "tpl")
tmpstr = Replace(tmpstr, "{$id}", get_num(rs(nidfield), 0))
tmpstr = Replace(tmpstr, "{$topic}", ttpoic)
tmpstr = Replace(tmpstr, "{$pic}", get_str(rs(cfname("image"))))
tmpstr = Replace(tmpstr, "{$snum}", get_str(rs(cfname("snum"))))
tmpstr = Replace(tmpstr, "{$price}", get_num(rs(cfname("price")), 0))
tmpstr = Replace(tmpstr, "{$wprice}", get_num(rs(cfname("wprice")), 0))
tmpstr = Replace(tmpstr, "{$content}", encode_content(get_str(rs(cfname("content"))), get_num(rs(cfname("cttype")), 0)))
tmpstr = Replace(tmpstr, "{$time}", get_date(rs(cfname("time"))))
tmpstr = Replace(tmpstr, "{$count}", get_num(rs(cfname("count")), 0))
tmpstr = Replace(tmpstr, "{$unit}", get_str(rs(cfname("unit"))))
If get_num(rs(cfname("limit")), 0) = 1 Then
tmpstr = replace(tmpstr, "{$limitnum}", get_num(rs(cfname("limitnum")), 0))
tmpstr = replace(tmpstr, "{$limitstr}", get_num(rs(cfname("limitnum")), 0) & " " & get_str(rs(cfname("unit"))))
Else
Dim tlimitless: tlimitless = itake("config.limitless", "lng")
tmpstr = replace(tmpstr, "{$limitnum}", -1)
tmpstr = replace(tmpstr, "{$limitstr}", tlimitless)
End If
module_data_detail = creplace(tmpstr)
End If
Set rs = Nothing
End Function
Function jtb_cms_module_list()
Dim tmpstr: tmpstr = ireplace("module.list", "tpl")
jtb_cms_module_list = tmpstr
End Function
Function jtb_cms_module_detail()
Dim tmpstr: tmpstr = ireplace("module.detail", "tpl")
jtb_cms_module_detail = tmpstr
End Function
Function jtb_cms_module()
Select Case request.querystring("type")
Case "list"
jtb_cms_module = jtb_cms_module_list
Case "detail"
jtb_cms_module = jtb_cms_module_detail
Case Else
jtb_cms_module = jtb_cms_module_list
End Select
End Function
'****************************************************
' Jetiben CMS Power by Jetiben.com
' Email: jetiben@hotmail.com
' Web: http://www.jetiben.com/
'****************************************************
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -