📄 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 = itake("module.data_list", "tpl")
tmpastr = ctemplate(tmpstr, "{$recurrence_ida}")
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 tmptopic, postfix_good
postfix_good = ireplace("global.tpl_config.postfix_good", "tpl")
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
tmptopic = get_str(rs(cfname("topic")))
if rs(cfname("good")) = 1 then tmptopic = tmptopic & postfix_good
tmptstr = Replace(tmpastr, "{$topic}", tmptopic)
tmptstr = Replace(tmptstr, "{$time}", format_date(get_date(rs(cfname("time"))), 1))
tmptstr = Replace(tmptstr, "{$star}", get_num(rs(cfname("star")),0))
tmptstr = Replace(tmptstr, "{$size}", csize(get_num(rs(cfname("size")),0)))
tmptstr = Replace(tmptstr, "{$scont}", encode_art(get_str(rs(cfname("scont")))))
tmptstr = Replace(tmptstr, "{$lng}", itake("sel_lng." & get_num(rs(cfname("lng")),0), "sel"))
tmptstr = Replace(tmptstr, "{$accredit}", itake("sel_accredit." & get_num(rs(cfname("accredit")),0), "sel"))
tmptstr = Replace(tmptstr, "{$runco}", get_str(rs(cfname("runco"))))
tmptstr = Replace(tmptstr, "{$id}", get_num(rs(nidfield),0))
tmptstr = Replace(tmptstr, "{$count}", get_num(rs(cfname("count")),0))
rs.movenext
tmprstr = tmprstr & tmptstr
End If
Next
tmpstr = Replace(tmpstr, "{$cpagestr}", jcutpage.pagestr)
tmpstr = Replace(tmpstr, "{$sort}", tsort)
Set rs = Nothing
Set jcutpage = Nothing
tmpstr = Replace(tmpstr, jtbc_cinfo, tmprstr)
module_data_list = creplace(tmpstr)
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, "{$time}", format_date(get_date(rs(cfname("time"))), 1))
tmpstr = Replace(tmpstr, "{$star}", get_num(rs(cfname("star")),0))
tmpstr = Replace(tmpstr, "{$size}", csize(get_num(rs(cfname("size")),0)))
tmpstr = Replace(tmpstr, "{$scont}", encode_art(get_str(rs(cfname("scont")))))
tmpstr = Replace(tmpstr, "{$lng}", itake("sel_lng." & get_num(rs(cfname("lng")),0), "sel"))
tmpstr = Replace(tmpstr, "{$accredit}", itake("sel_accredit." & get_num(rs(cfname("accredit")),0), "sel"))
tmpstr = Replace(tmpstr, "{$link}", get_str(rs(cfname("link"))))
tmpstr = Replace(tmpstr, "{$author}", get_str(rs(cfname("author"))))
tmpstr = Replace(tmpstr, "{$runco}", get_str(rs(cfname("runco"))))
tmpstr = replace(tmpstr, "{$content}", encode_content(rs(cfname("content")), rs(cfname("cttype"))))
tmpstr = Replace(tmpstr, "{$id}", get_num(rs(nidfield),0))
tmpstr = Replace(tmpstr, "{$count}", get_num(rs(cfname("count")),0))
Dim turl, tdownurl: tdownurl = itake("config.url", "lng")
Dim ti, tmpastr, tmprstr, tmptstr
tmpastr = ctemplate(tmpstr, "{$recurrence_ida}")
For ti = 1 to 5
tmptstr = tmpastr
turl = get_str(rs(cfname("url" & ti)))
If not check_null(turl) Then
tmptstr = Replace(tmptstr, "{$downurl}", tdownurl & "[" & ti & "]")
tmptstr = Replace(tmptstr, "{$downhref}", nuri & "?action=download&id=" & get_num(rs(nidfield),0) & "&did=" & ti)
tmprstr = tmprstr & tmptstr
End If
Next
tmpstr = Replace(tmpstr, jtbc_cinfo, tmprstr)
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
Sub jtb_cms_module_downloaddisp
Dim tid, tdid, turl
tid = get_num(request.querystring("id"), 0)
tdid = get_num(request.querystring("did"), 0)
sqlstr = "select * from " & ndatabase & " where " & nidfield & "=" & tid
Set rs = server.CreateObject("adodb.recordset")
rs.open sqlstr, conn, 1, 3
If not rs.EOF Then
If tdid >= 1 and tdid <= 5 Then
turl = get_str(rs(cfname("url" & tdid)))
If not check_null(turl) Then
rs(cfname("url_count" & tdid)) = rs(cfname("url_count" & tdid)) + 1
rs.update
response.redirect turl
End If
End If
End If
Set rs = Nothing
Call imessage(itake("module.download_error", "lng"), "0")
End Sub
Sub jtb_cms_module_action()
Select Case request.querystring("action")
Case "download"
Call jtb_cms_module_downloaddisp
End Select
End Sub
Call jtb_cms_module_action
'****************************************************
' 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 + -