⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 module_config.asp

📁 JTBC网站内容管理系统是一套可扩充的网站内容管理系统
💻 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}",  get_str(rs(cfname("time"))))
      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)
  tmpstr = creplace(tmpstr)
  module_data_list = 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, "{$content}", encode_content(cutepage_content(rs(cfname("content")), rs(cfname("cp_note")), rs(cfname("cp_mode")), rs(cfname("cp_type")), rs(cfname("cp_num"))), rs(cfname("cttype"))))
    tmpstr = Replace(tmpstr, "{$time}", get_date(rs(cfname("time"))))
    tmpstr = Replace(tmpstr, "{$count}", get_num(rs(cfname("count")), 0))
    tmpstr = Replace(tmpstr, "{$page_sel}", cutepage_content_page_sel(rs(cfname("content")), rs(cfname("cp_note")), rs(cfname("cp_mode")), rs(cfname("cp_type")), rs(cfname("cp_num")), "folder=" & ncreatefolder & ";filetype=" & ncreatefiletype & ";time=" & rs(cfname("time")) & ";"))
    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_index()
  jtb_cms_module_index = jtb_cms_module_list
End Function

Function jtb_cms_module_default()
  jtb_cms_module_default = jtb_cms_module_index
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 "index"
      jtb_cms_module = jtb_cms_module_index
    Case Else
      jtb_cms_module = jtb_cms_module_default
  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 + -