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

📄 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_add()
  Dim tmpstr: tmpstr = ireplace("module.data_add", "tpl")
  tmpstr = cvalhtml(tmpstr, nvalidate, "{$recurrence_valcode}")
  module_data_add = tmpstr
End Function

Function module_data_list()
  Dim tmpstr, tmpastr, tmprstr, tmptstr
  tmpstr = ireplace("module.data_list", "tpl")
  tmpastr = ctemplate(tmpstr, "{$recurrence_ida}")
  sqlstr = "select * from " & ndatabase & " where " & cfname("hidden") & "=0 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, "{$topic}", htmlencode(get_str(rs(cfname("topic")))))
      tmptstr = Replace(tmptstr, "{$author}", htmlencode(get_str(rs(cfname("author")))))
      tmptstr = Replace(tmptstr, "{$content}", creplaces(encode_article(ubbcode(htmlencode(get_str(rs(cfname("content")))), 0))))
      tmptstr = Replace(tmptstr, "{$face}", get_num(rs(cfname("face")), 0))
      tmptstr = Replace(tmptstr, "{$sex}", get_num(rs(cfname("sex")), 0))
      tmptstr = Replace(tmptstr, "{$time}",  get_date(rs(cfname("time"))))
      tmptstr = Replace(tmptstr, "{$qq}", get_num(rs(cfname("qq")), 0))
      tmptstr = Replace(tmptstr, "{$email}", htmlencode(get_str(rs(cfname("email")))))
      tmptstr = Replace(tmptstr, "{$homepage}", htmlencode(get_str(rs(cfname("homepage")))))
      tmptstr = Replace(tmptstr, "{$authorip}", htmlencode(get_str(rs(cfname("authorip")))))
      tmptstr = Replace(tmptstr, "{$id}", get_num(rs(nidfield),0))
      tastr = ctemplate(tmptstr, "{$admin_reply}")
      If check_null(rs(cfname("reply"))) Then
        tmptstr = Replace(tmptstr, jtbc_cinfo, "")
      Else
        ttstr = replace(tastr, "{$replytime}", get_date(rs(cfname("replytime"))))
        ttstr = Replace(ttstr, "{$reply}", creplace(encode_article(ubbcode(htmlencode(get_str(rs(cfname("reply")))), 0))))
        tmptstr = Replace(tmptstr, jtbc_cinfo, ttstr)
      End If
      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)
  Dim tstr_reply: tstr_reply = itake("config.reply", "lng")
  tmpstr = Replace(tmpstr, "{$str_reply}", tstr_reply)
  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_add()
  Dim tmpstr: tmpstr = ireplace("module.add", "tpl")
  jtb_cms_module_add = tmpstr
End Function

Function jtb_cms_module()
  Select case request.querystring("type")
    Case "add"
      jtb_cms_module = jtb_cms_module_add
    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 check_valcode(-1)
  Dim tmpchkstr, tmpcitem
  tmpchkstr = "author:" & itake("module.author", "lng") & ",topic:" & itake("module.topic", "lng") & ",content:" & itake("module.content", "lng")
  For Each tmpcitem In Split(tmpchkstr, ",")
    If check_null(request.Form(Split(tmpcitem, ":")(0))) Then
      Call client_alert(replace_template(itake("global.lng_error.insert_empty", "lng"), "[]", "[" & Split(tmpcitem, ":")(1) & "]"), -1)
    End If
  Next
  sqlstr = "select * from " & ndatabase
  Set rs = server.CreateObject("adodb.recordset")
  rs.open sqlstr, conn, 1, 3
  rs.addnew
  rs(cfname("author")) = left_intercept(get_str(request.Form("author")), 50)
  rs(cfname("authorip")) = nuserip
  rs(cfname("sex")) = get_num(request.Form("sex"), 0)
  rs(cfname("qq")) = get_num(request.Form("qq"), 0)
  rs(cfname("face")) = get_num(request.Form("face"), 0)
  rs(cfname("email")) = left_intercept(get_str(request.Form("email")), 50)
  rs(cfname("homepage")) = left_intercept(get_str(request.Form("homepage")), 200)
  rs(cfname("topic")) = left_intercept(get_str(request.Form("topic")), 50)
  rs(cfname("content")) = left_intercept(get_str(request.Form("content")), 1000)
  rs(cfname("hidden")) = get_num(request.Form("hidden"), 0)
  rs(cfname("time")) = Now()
  rs.update
  rs.Close
  Set rs = Nothing
  response.redirect nuri
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 + -