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

📄 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 tfid: tfid = get_num(request.querystring("fid"), 0)
  Dim tmpstr, tmpastr, tmprstr, tmptstr
  tmpstr = ireplace("module.data_list", "tpl")
  tmpastr = ctemplate(tmpstr, "{$recurrence_ida}")
  sqlstr = "select * from " & ndatabase & " where " & cfname("hidden") & "=0 and " & cfname("fid") & "=" & tfid & " order by " & cfname("time") & " desc"
  Dim jcutpage, jcuti
  Set jcutpage = New jtb_cutpage
  jcutpage.perpage = npagesize
  jcutpage.sqlstr = sqlstr
  jcutpage.cutpage
  Set rs = jcutpage.pagers
  Dim tastr, ttstr
  For jcuti = 1 To npagesize
    If Not rs.EOF Then
      tmptstr = Replace(tmpastr, "{$author}", htmlencode(get_str(rs(cfname("author")))))
      tmptstr = Replace(tmptstr, "{$authorip}", htmlencode(format_ip(get_str(rs(cfname("authorip"))), 2)))
      tmptstr = Replace(tmptstr, "{$content}", encode_article(ubbcode(htmlencode(get_str(rs(cfname("content")))), 0)))
      tmptstr = Replace(tmptstr, "{$time}",  get_date(rs(cfname("time"))))
      tmptstr = Replace(tmptstr, "{$id}", get_num(rs(nidfield),0))
      rs.movenext
      tmprstr = tmprstr & tmptstr
    End If
  Next
  tmpstr = Replace(tmpstr, "{$cpagestr}", jcutpage.pagestr)
  Set rs = Nothing
  Set jcutpage = Nothing
  tmpstr = Replace(tmpstr, jtbc_cinfo, tmprstr)
  module_data_list = tmpstr
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
  Select Case request.querystring("type")
    Case "list"
      jtb_cms_module = jtb_cms_module_list
    Case Else
      jtb_cms_module = jtb_cms_module_list
  End Select
End Function

Sub jtb_cms_module_adddisp()
  Call jtb_cms_web_noout
  Dim tbackurl: tbackurl = get_safecode(request.querystring("backurl"))
  Dim tkeyword, tfid
  tkeyword = get_str(request.querystring("keyword"))
  tfid = get_num(request.querystring("fid"), 0)
  Dim tauthor, tscontent
  tauthor = get_str(request.form("author"))
  tscontent = get_str(request.form("content"))
  If not (check_null(tscontent) or tfid = 0) Then
    Set rs = server.CreateObject("adodb.recordset")
    sqlstr = "select * from " & ndatabase
    rs.open sqlstr, conn, 1, 3
    rs.addnew
    rs(cfname("author")) = left_intercept(tauthor, 50)
    rs(cfname("authorip")) = nuserip
    rs(cfname("content")) = left_intercept(tscontent, 500)
    rs(cfname("time")) = Now()
    rs(cfname("keyword")) = tkeyword
    rs(cfname("fid")) = tfid
    rs.update
    Set rs = Nothing
  End If
  If not check_null(tbackurl) Then
    response.redirect tbackurl
  Else
    response.redirect "?type=list&keyword=" & tkeyword & "&fid=" & tfid
  End If
End Sub

Sub jtb_cms_module_action()
  Select Case request.querystring("action")
    Case "add"
      Call jtb_cms_module_adddisp
  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 + -