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

📄 module_config.asp

📁 JTBC网站内容管理系统是一套可扩充的网站内容管理系统
💻 ASP
📖 第 1 页 / 共 4 页
字号:
    rs.movenext
    toutstr = toutstr & tmpstr
  Loop
  Set rs = nothing
  module_data_forum = toutstr
End Function

Function module_data_topic_list()
  Call set_forum_ndatabase("sort")
  Dim tsid: tsid = get_num(request.querystring("sid"), 0)
  Dim tutype: tutype = get_userinfo("utype", nusername)
  Dim tmpstr
  Dim tmpastr, tmprstr, tmptstr
  Dim trs, tsqlstr
  Dim tislock
  tmpstr = itake("module.data_topic_list", "tpl")
  sqlstr = "select * from " & ndatabase & " where " & cfname("hidden") & "=0 and not " & cfname("fsid") & "=0 and " & nidfield & "=" & tsid
  Set rs = conn.Execute(sqlstr)
  If not rs.EOF Then
    Call cntitle(rs(cfname("sort")))
    tislock = check_forum_islock(rs(cfname("popedom")), tutype, rs(cfname("type")), rs(cfname("attestation")), nusername)
    If tislock Then Call imessage(itake("module.popedom", "lng"), -1)
    tmprstr = ""
    tmpastr = ctemplate(tmpstr, "{$child_forum}")
    tsqlstr = "select * from " & ndatabase & " where " & cfname("fsid") & "=" & rs(nidfield) & " and " & cfname("hidden") & "=0 order by " & cfname("order") & " asc"
    Set trs = conn.Execute(tsqlstr)
    If Not trs.eof Then
      Dim tpl_image: tpl_image = itake("global.tpl_config.image", "tpl")
      Dim tforum_images
      Dim tmptstr2, tmpastr2, tmprstr2
      tmpastr2 = ctemplate(tmpastr, "{$recurrence_ida}")
      Do While not trs.EOF
        tislock = check_forum_islock(trs(cfname("popedom")), tutype, trs(cfname("type")), trs(cfname("attestation")), nusername)
        tforum_images = get_str(trs(cfname("images")))
        If Not check_null(tforum_images) Then tforum_images = replace(tpl_image, "{$value}", tforum_images)
        tmptstr2 = Replace(tmpastr2, "{$sort}", get_str(trs(cfname("sort"))))
        tmptstr2 = Replace(tmptstr2, "{$explain}", encode_article(get_str(trs(cfname("explain")))))
        tmptstr2 = Replace(tmptstr2, "{$admin}", get_forum_admin(trs(cfname("admin"))))
        tmptstr2 = Replace(tmptstr2, "{$pic}", get_forum_pic(tislock, trs(cfname("today_date"))))
        tmptstr2 = Replace(tmptstr2, "{$forum_images}", tforum_images)
        tmptstr2 = Replace(tmptstr2, "{$forum_info}", get_forum_info(trs(nidfield), tislock, trs(cfname("last_tid")), trs(cfname("last_topic")), trs(cfname("last_time")), trs(cfname("today_ntopic")), trs(cfname("today_date")), trs(cfname("ntopic")), trs(cfname("nnote"))))
        tmptstr2 = Replace(tmptstr2, "{$id}", get_num(trs(nidfield),0))
        tmprstr2 = tmprstr2 & tmptstr2
        trs.movenext
      loop
      tmpastr = Replace(tmpastr, jtbc_cinfo, tmprstr2)
      tmpstr = Replace(tmpstr, jtbc_cinfo, tmpastr)
    Else
      tmpstr = Replace(tmpstr, jtbc_cinfo, "")
    End If
    Set trs = nothing
    tmpstr = Replace(tmpstr, "{$forum_admin}", get_forum_admin(rs(cfname("admin"))))
    tmpstr = Replace(tmpstr, "{$sort}", get_str(rs(cfname("sort"))))
    tmpstr = Replace(tmpstr, "{$rule}", encode_article(get_str(rs(cfname("rule")))))
  Else
    Call imessage(itake("config.notexist", "lng"), -1)
  End If
  Set rs = nothing
  Call set_forum_ndatabase("topic")
  tmprstr = ""
  tmpastr = ctemplate(tmpstr, "{$recurrence_idb}")
  sqlstr = "select top 5000 * from " & ndatabase & " where (" & cfname("htop") & "=1 or " & cfname("sid") & "=" & tsid & ") and " & cfname("fid") & "=0 and " & cfname("hidden") & "=0 order by " & cfname("htop") & " desc," & cfname("top") & " desc," & cfname("lasttime") & " desc"
  Dim jcutpage, jcuti
  Set jcutpage = New jtb_cutpage
  jcutpage.perpage = npagesize
  jcutpage.sqlstr = sqlstr
  jcutpage.cutpage
  Set rs = jcutpage.pagers
  Dim tmptopic, tmptopicpic
  Dim tpicnew: tpicnew = ireplace("config.new", "tpl")
  For jcuti = 1 To npagesize
    If Not rs.EOF Then
      tmptopic = change_forum_topic(htmlencode(get_str(rs(cfname("topic")))), get_str(rs(cfname("color"))), get_str(rs(cfname("b"))))
      tmptopicpic = ""
      If DateDiff("h", rs(cfname("time")), Now()) < 24 Then tmptopicpic = tmptopicpic & tpicnew
      tmptstr = Replace(tmpastr, "{$ico}", get_forum_topic_pic(rs(cfname("htop")), rs(cfname("top")), rs(cfname("lock")), rs(cfname("elite")), rs(cfname("count"))))
      tmptstr = Replace(tmptstr, "{$icon}", get_num(rs(cfname("icon")), 0))
      tmptstr = Replace(tmptstr, "{$topic}", tmptopic)
      tmptstr = Replace(tmptstr, "{$topicpic}", tmptopicpic)
      tmptstr = Replace(tmptstr, "{$author}", htmlencode(get_str(rs(cfname("author")))))
      tmptstr = Replace(tmptstr, "{$reply}", get_num(rs(cfname("reply")), 0))
      tmptstr = Replace(tmptstr, "{$count}", get_num(rs(cfname("count")), 0))
      tmptstr = Replace(tmptstr, "{$lasttime}", format_date(rs(cfname("lasttime")), 11))
      tmptstr = Replace(tmptstr, "{$lastuser}", htmlencode(get_str(rs(cfname("lastuser")))))
      tmptstr = Replace(tmptstr, "{$tid}", 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)
  tmpstr = Replace(tmpstr, "{$sid}", tsid)
  tmpstr = Replace(tmpstr, "{$userfolder}", get_actual_route(userfolder))
  tmpstr = Replace(tmpstr, "{$loadreply}", itake("module.loadreply", "lng"))
  tmpstr = creplace(tmpstr)
  module_data_topic_list = tmpstr
End Function

Function module_data_topic_detail()
  Dim tsid: tsid = get_num(request.querystring("sid"), 0)
  Dim ttid: ttid = get_num(request.querystring("tid"), 0)
  Dim ttlock, ttopic
  If Not check_forum_popedom(tsid, 0) = 0 Then Call imessage(itake("module.popedom", "lng"), -1)
  Dim tmpstr, tmpastr, tmprstr, tmptstr
  tmpstr = itake("module.data_topic_detail", "tpl")
  Dim tuser_ndatabase, tuser_nidfield, tuser_nfpre
  Dim tftopic_ndatabase, tftopic_nidfield, tftopic_nfpre
  Dim tfdata_ndatabase, tfdata_nidfield, tfdata_nfpre
  tuser_ndatabase = cndatabase(userfolder, "0")
  tuser_nidfield = cnidfield(userfolder, "0")
  tuser_nfpre = cnfpre(userfolder, "0")
  tftopic_ndatabase = cndatabase(ngenre, "topic")
  tftopic_nidfield = cnidfield(ngenre, "topic")
  tftopic_nfpre = cnfpre(ngenre, "topic")
  sqlstr = "select * from " & tuser_ndatabase & "," & tftopic_ndatabase & " where " & tuser_ndatabase & "." & cfnames(tuser_nfpre, "username") & "=" & tftopic_ndatabase & "." & cfnames(tftopic_nfpre, "author") & " and (" & tftopic_ndatabase & "." & tftopic_nidfield & "=" & ttid & " or " & tftopic_ndatabase & "." & cfnames(tftopic_nfpre, "fid") & "=" & ttid & " ) and " & tftopic_ndatabase & "." & cfnames(tftopic_nfpre, "hidden") & "=0 order by " & tftopic_ndatabase & "." & cfnames(tftopic_nfpre, "fid") & " asc," & tftopic_ndatabase & "." & cfnames(tftopic_nfpre, "time") & " asc"
  Dim jcutpage, jcuti
  Set jcutpage = New jtb_cutpage
  jcutpage.perpage = npagesize_reply
  jcutpage.sqlstr = sqlstr
  jcutpage.cutpage
  Set rs = jcutpage.pagers
  If rs.EOF Then Call imessage(itake("global.lng_public.sudd", "lng"), -1)
  If not rs(cfnames(tftopic_nfpre, "sid")) = tsid and rs(cfnames(tftopic_nfpre, "htop")) = 0 Then Call imessage(itake("global.lng_public.sudd", "lng"), -1)
  Dim tvoteid: tvoteid = get_num(rs(cfnames(tftopic_nfpre, "voteid")), 0)
  If not tvoteid = 0 Then
    Dim tvote_ndatabase, tvote_nidfield, tvote_nfpre
    Dim tvote_data_ndatabase, tvote_data_nidfield, tvote_data_nfpre
    tvote_ndatabase = cndatabase(ngenre, "vote")
    tvote_nidfield = cnidfield(ngenre, "vote")
    tvote_nfpre = cnfpre(ngenre, "vote")
    tvote_data_ndatabase = cndatabase(ngenre, "vote_data")
    tvote_data_nidfield = cnidfield(ngenre, "vote_data")
    tvote_data_nfpre = cnfpre(ngenre, "vote_data")
    Dim tvi, tvtopic, tvtype, tvday, tendtime, trs, tsqlstrc
    tsqlstrc = "select * from " & tvote_ndatabase & "," & tvote_data_ndatabase & " where " & tvote_ndatabase & "." & tvote_nidfield & "=" & tvote_data_ndatabase & "." & cfnames(tvote_data_nfpre, "fid") & " and " & tvote_ndatabase & "." & tvote_nidfield & "=" & tvoteid
    Set trs = server.CreateObject("adodb.recordset")
    trs.open tsqlstrc, conn, 1, 3
    If not trs.EOF Then
      tvtopic = get_str(trs(cfnames(tvote_nfpre, "topic")))
      tvtype = get_num(trs(cfnames(tvote_nfpre, "type")), 0)
      tvday = get_num(trs(cfnames(tvote_nfpre, "day")), -1)
      If tvday = -1 Then
        tendtime = itake("config.noexp", "lng")
      Else
        tendtime = DateAdd("d", get_date(trs(cfnames(tvote_nfpre, "day"))), tvday)
      End If
      Dim tvoteary, tvotecount
      tvi = 0: tvotecount = 0
      ReDim tvoteary(trs.recordcount - 1, 2)
      Do While not trs.EOF
        tvoteary(tvi, 0) = trs(tvote_data_nidfield)
        tvoteary(tvi, 1) = get_str(trs(cfnames(tvote_data_nfpre, "topic")))
        tvoteary(tvi, 2) = trs(cfnames(tvote_data_nfpre, "count"))
        tvotecount = tvotecount + trs(cfnames(tvote_data_nfpre, "count"))
        trs.movenext
        tvi = tvi + 1
      Loop
      Dim tvotestr, tvoteastr, tvoterstr, tvotetstr
      tvotestr = ctemplate(tmpstr, "{$recurrence_vote}")
      tvoteastr = ctemplate(tvotestr, "{$recurrence_voa}")
      For tvi = 0 to UBound(tvoteary)
        tvotetstr = Replace(tvoteastr, "{$id}", tvoteary(tvi, 0))
        tvotetstr = Replace(tvotetstr, "{$topic}", tvoteary(tvi, 1))
        tvotetstr = Replace(tvotetstr, "{$type}", tvtype)
        tvotetstr = Replace(tvotetstr, "{$per}", cper(tvoteary(tvi, 2), tvotecount))
        tvoterstr = tvoterstr & tvotetstr
      Next
      tvotestr = Replace(tvotestr, jtbc_cinfo, tvoterstr)
      tvotestr = Replace(tvotestr, "{$topic}", tvtopic)
      tvotestr = Replace(tvotestr, "{$count}", tvotecount)
      tvotestr = Replace(tvotestr, "{$endtime}", tendtime)
      tvotestr = Replace(tvotestr, "{$id}", tvoteid)
      tmpstr = Replace(tmpstr, jtbc_cinfo, tvotestr)
    Else
      tmpstr = cvalhtml(tmpstr, 0, "{$recurrence_vote}")
    End If
    Set trs = Nothing
  Else
    tmpstr = cvalhtml(tmpstr, 0, "{$recurrence_vote}")
  End If
  Dim tcutnote: tcutnote = jcutpage.cutnote
  tmpastr = ctemplate(tmpstr, "{$recurrence_ida}")
  For jcuti = 1 To npagesize_reply
    If Not rs.EOF Then
      If jcuti = 1 Then
        ttlock = get_num(rs(cfnames(tftopic_nfpre, "lock")), 0)
        ttopic = htmlencode(get_str(rs(cfnames(tftopic_nfpre, "topic"))))
        Call cntitle(ttopic)
      End If
      tmptstr = Replace(tmpastr, "{$username}", htmlencode(get_str(rs(cfnames(tuser_nfpre, "username")))))
      tmptstr = Replace(tmptstr, "{$face}", get_userface(get_num(rs(cfnames(tuser_nfpre, "face")), 0), get_num(rs(cfnames(tuser_nfpre, "face_u")), 0), get_str(rs(cfnames(tuser_nfpre, "face_url")))))
      tmptstr = Replace(tmptstr, "{$face_u}", get_num(rs(cfnames(tuser_nfpre, "face_u")), 0))
      tmptstr = Replace(tmptstr, "{$face_width}", get_num(rs(cfnames(tuser_nfpre, "face_width")), 0))
      tmptstr = Replace(tmptstr, "{$face_height}", get_num(rs(cfnames(tuser_nfpre, "face_height")), 0))
      tmptstr = Replace(tmptstr, "{$email}", get_str(rs(cfnames(tuser_nfpre, "email"))))
      tmptstr = Replace(tmptstr, "{$num_topic}", get_num(rs(cfnames(tuser_nfpre, "topic")), 0))
      tmptstr = Replace(tmptstr, "{$integral}", get_num(rs(cfnames(tuser_nfpre, "integral")), 0))
      tmptstr = Replace(tmptstr, "{$regtime}", format_date(rs(cfnames(tuser_nfpre, "time")), 1))
      tmptstr = Replace(tmptstr, "{$sign}", htmlencode(get_str(rs(cfnames(tuser_nfpre, "sign")))))
      tmptstr = Replace(tmptstr, "{$icon}", get_num(rs(cfnames(tftopic_nfpre, "icon")), 0))
      tmptstr = Replace(tmptstr, "{$topic}", htmlencode(get_str(rs(cfnames(tftopic_nfpre, "topic")))))
      tmptstr = Replace(tmptstr, "{$time}", get_date(rs(cfnames(tftopic_nfpre, "time"))))
      tmptstr = Replace(tmptstr, "{$content}",encode_forum_content(get_str(get_forum_content(rs(cfnames(tftopic_nfpre, "content_database")) , get_num(rs(tftopic_nidfield), 0))), get_num(rs(cfnames(tftopic_nfpre, "ubb")), 0)))
      tmptstr = Replace(tmptstr, "{$floor}", tcutnote + jcuti)
      tmptstr = Replace(tmptstr, "{$tid}", get_num(rs(tftopic_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)
  tmprstr = ""
  tmpastr = ctemplate(tmpstr, "{$topic_reply}")
  Dim tmpary: tmpary = split(tmpastr, "{$$}")
  If ttlock = 0 Then
    tmprstr = tmpary(0)
  Else
    tmprstr = tmpary(1)
  End If
  tmpstr = Replace(tmpstr, jtbc_cinfo, tmprstr)
  Dim str_topic: str_topic = itake("global.lng_noun.topic", "lng")
  Dim str_integral: str_integral = itake("global.lng_noun.integral", "lng")
  Dim str_regtime: str_regtime = itake("global.lng_user.reg", "lng")
  Dim str_floor: str_floor = itake("global.lng_unit.floor", "lng")
  tmpstr = Replace(tmpstr, "{$str_topic}", str_topic)
  tmpstr = Replace(tmpstr, "{$str_integral}", str_integral)
  tmpstr = Replace(tmpstr, "{$str_regtime}", str_regtime)
  tmpstr = Replace(tmpstr, "{$str_floor}", str_floor)
  tmpstr = Replace(tmpstr, "{$sid}", tsid)
  tmpstr = Replace(tmpstr, "{$tid}", ttid)
  tmpstr = Replace(tmpstr, "{$userfolder}", get_actual_route(userfolder))
  tmpstr = creplace(tmpstr)
  tmpstr = cvalhtml(tmpstr, nvalidate, "{$recurrence_valcode}")
  Dim tsqlstr: tsqlstr = "update " & tftopic_ndatabase & " set " & cfnames(tftopic_nfpre, "count") & "=" & cfnames(tftopic_nfpre, "count") & "+1 where " & tftopic_nidfield & "=" & ttid
  conn.Execute(tsqlstr)
  module_data_topic_detail = tmpstr
End Function

Function module_data_topic_release()
  Call set_forum_ndatabase("sort")
  Dim tsid: tsid = get_num(request.querystring("sid"), 0)
  Dim tvote: tvote = get_num(request.querystring("vote"), 0)
  Dim tforum_popedom: tforum_popedom = check_forum_popedom(tsid, 1)
  If tforum_popedom = 1 Then Call imessage(itake("module.pdm_type", "lng"), -1)
  If tforum_popedom = 2 Then Call imessage(itake("module.pdm_mode", "lng"), -1)
  If tforum_popedom = 3 Then Call imessage(itake("module.popedom", "lng"), -1)
  Dim tmpstr: tmpstr = ireplace("module.data_topic_release", "tpl")
  tmpstr = replace(tmpstr, "{$sid}", tsid)
  tmpstr = cvalhtml(tmpstr, tvote, "{$recurrence_vote}")
  tmpstr = cvalhtml(tmpstr, nvalidate, "{$recurrence_valcode}")
  module_data_topic_release = tmpstr
End Function

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -