📄 module_config.asp
字号:
<%
'****************************************************
' Jetiben CMS Power by Jetiben.com
' Email: jetiben@hotmail.com
' Web: http://www.jetiben.com/
'****************************************************
Dim forum_isadmin
Function module_data_top()
Dim tmpstr: tmpstr = ireplace("module.data_top", "tpl")
module_data_top = tmpstr
End Function
Function module_data_foot()
Dim tmpstr: tmpstr = ireplace("module.data_foot", "tpl")
module_data_foot = tmpstr
End Function
Function module_data_list_foot()
Dim tmpstr: tmpstr = ireplace("module.data_list_foot", "tpl")
module_data_list_foot = tmpstr
End Function
Function module_data_manage_menu()
Dim tmpstr, tsid
tsid = get_num(request.querystring("sid"), 0)
tmpstr = ireplace("module.data_manage_menu", "tpl")
tmpstr = replace(tmpstr, "{$sid}", tsid)
module_data_manage_menu = tmpstr
End Function
Function module_data_manage_topic()
ncontrol = "select"
If forum_isadmin = 1 Then ncontrol = ncontrol & ",htop"
ncontrol = ncontrol & ",top,elite,lock,hidden"
Dim tncontrol, tpl_select: tpl_select = itake("global.tpl_config.select", "tpl")
tncontrol = show_xmlinfo_select("sel_color.all", "", "select")
tncontrol = replace_template(tpl_select, "{$option}" & spa & "{$name}", tncontrol & spa & "color")
ncontrols = tncontrol & " "
tncontrol = show_xmlinfo_select("sel_b.all", "", "select")
tncontrol = replace_template(tpl_select, "{$option}" & spa & "{$name}", tncontrol & spa & "b")
ncontrols = ncontrols & tncontrol & " "
Call set_forum_ndatabase("sort")
Dim tsid: tsid = get_num(request.querystring("sid"), 0)
Dim tmpstr
Dim tmpastr, tmprstr, tmptstr
Dim trs, tsqlstr
tmpstr = itake("module.data_manage_topic", "tpl")
sqlstr = "select * from " & ndatabase & " where " & cfname("hidden") & "=0 and not " & cfname("fsid") & "=0 and " & nidfield & "=" & tsid
Set rs = conn.Execute(sqlstr)
If rs.EOF Then Call imessage(itake("config.notexist", "lng"), -1)
Set rs = nothing
Call set_forum_ndatabase("topic")
tmpastr = ctemplate(tmpstr, "{$recurrence_ida}")
sqlstr = "select * from " & ndatabase & " where " & cfname("sid") & "=" & tsid & " and " & cfname("fid") & "=0"
If trim(request.querystring("att")) = "elite" Then sqlstr = sqlstr & " and " & cfname("elite") & "=1"
If trim(request.querystring("att")) = "lock" Then sqlstr = sqlstr & " and " & cfname("lock") & "=1"
If trim(request.querystring("att")) = "top" Then sqlstr = sqlstr & " and " & cfname("top") & "=1"
If trim(request.querystring("att")) = "htop" Then sqlstr = sqlstr & " and " & cfname("htop") & "=1"
If trim(request.querystring("att")) = "hidden" Then sqlstr = sqlstr & " and " & cfname("hidden") & "=1"
sqlstr = sqlstr & " 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")
Dim tpichtop: tpichtop = ireplace("config.htop", "tpl")
Dim tpictop: tpictop = ireplace("config.top", "tpl")
Dim tpicelite: tpicelite = ireplace("config.elite", "tpl")
Dim tpiclock: tpiclock = ireplace("config.lock", "tpl")
Dim tpichidden: tpichidden = ireplace("config.hidden", "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
If rs(cfname("htop")) = 1 Then tmptopicpic = tmptopicpic & tpichtop
If rs(cfname("top")) = 1 Then tmptopicpic = tmptopicpic & tpictop
If rs(cfname("elite")) = 1 Then tmptopicpic = tmptopicpic & tpicelite
If rs(cfname("lock")) = 1 Then tmptopicpic = tmptopicpic & tpiclock
If rs(cfname("hidden")) = 1 Then tmptopicpic = tmptopicpic & tpichidden
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, "{$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)
tmpstr = Replace(tmpstr, "{$sid}", tsid)
tmpstr = Replace(tmpstr, "{$userfolder}", get_actual_route(userfolder))
tmpstr = creplace(tmpstr)
module_data_manage_topic = tmpstr
End Function
Function module_data_manage_detail()
ncontrol = "select,hidden"
Dim tsid: tsid = get_num(request.querystring("sid"), 0)
Dim ttid: ttid = get_num(request.querystring("tid"), 0)
Dim ttlock
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_manage_detail", "tpl")
Dim tuser_ndatabase, tuser_nidfield, tuser_nfpre
Dim tftopic_ndatabase, tftopic_nidfield, tftopic_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 & " ) 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
Dim tpichidden: tpichidden = ireplace("config.hidden", "tpl")
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)
tmpastr = ctemplate(tmpstr, "{$recurrence_ida}")
For jcuti = 1 To npagesize_reply
If Not rs.EOF Then
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, "{$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, "{$id}", get_num(rs(tftopic_nidfield), 0))
If rs(cfnames(tftopic_nfpre, "hidden")) = 1 Then
tmptstr = Replace(tmptstr, "{$topicpic}", tpichidden)
Else
tmptstr = Replace(tmptstr, "{$topicpic}", "")
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 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")
tmpstr = Replace(tmpstr, "{$str_topic}", str_topic)
tmpstr = Replace(tmpstr, "{$str_integral}", str_integral)
tmpstr = Replace(tmpstr, "{$str_regtime}", str_regtime)
tmpstr = Replace(tmpstr, "{$tid}", ttid)
tmpstr = Replace(tmpstr, "{$sid}", tsid)
tmpstr = creplace(tmpstr)
module_data_manage_detail = tmpstr
End Function
Function module_data_manage_blacklist()
ncontrol = "select,delete"
Call set_forum_ndatabase("sort")
Dim tsid: tsid = get_num(request.querystring("sid"), 0)
Dim tmpstr
Dim tmpastr, tmprstr, tmptstr
Dim trs, tsqlstr
tmpstr = itake("module.data_manage_blacklist", "tpl")
sqlstr = "select * from " & ndatabase & " where " & cfname("hidden") & "=0 and not " & cfname("fsid") & "=0 and " & nidfield & "=" & tsid
Set rs = conn.Execute(sqlstr)
If rs.EOF Then Call imessage(itake("config.notexist", "lng"), -1)
Set rs = nothing
Call set_forum_ndatabase("blacklist")
tmprstr = ""
tmpastr = ctemplate(tmpstr, "{$recurrence_ida}")
sqlstr = "select * from " & ndatabase & " where " & cfname("sid") & "=" & tsid & " order by " & nidfield & " desc"
Dim jcutpage, jcuti
Set jcutpage = New jtb_cutpage
jcutpage.perpage = npagesize
jcutpage.sqlstr = sqlstr
jcutpage.cutpage
Set rs = jcutpage.pagers
For jcuti = 1 To npagesize
If Not rs.EOF Then
tmptstr = Replace(tmpastr, "{$username}", htmlencode(get_str(rs(cfname("username")))))
tmptstr = Replace(tmptstr, "{$sid}", get_num(rs(cfname("sid")), 0))
tmptstr = Replace(tmptstr, "{$admin}", htmlencode(get_str(rs(cfname("admin")))))
tmptstr = Replace(tmptstr, "{$time}", get_str(rs(cfname("time"))))
tmptstr = Replace(tmptstr, "{$remark}", htmlencode(get_str(rs(cfname("remark")))))
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)
tmpstr = Replace(tmpstr, "{$sid}", tsid)
tmpstr = Replace(tmpstr, "{$userfolder}", get_actual_route(userfolder))
tmpstr = creplace(tmpstr)
module_data_manage_blacklist = tmpstr
End Function
Function module_data_forum()
Call set_forum_ndatabase("sort")
Dim tutype: tutype = get_userinfo("utype", nusername)
Dim tmpstr, tmpstrs, toutstr
Dim tmpastr, tmprstr, tmptstr
Dim trs, tsqlstr
Dim tislock
tmpstr = ireplace("module.data_forum", "tpl")
tmpstrs = tmpstr
sqlstr = "select * from " & ndatabase & " where " & cfname("fsid") & "=0 and " & cfname("hidden") & "=0 order by " & cfname("order") & " asc"
Set rs = conn.Execute(sqlstr)
Dim tpl_image: tpl_image = itake("global.tpl_config.image", "tpl")
Dim tforum_images
Do While not rs.EOF
tmpstr = tmpstrs
tmprstr = ""
tmpastr = ctemplate(tmpstr, "{$recurrence_ida}")
tsqlstr = "select * from " & ndatabase & " where " & cfname("fsid") & "=" & rs(nidfield) & " and " & cfname("hidden") & "=0 order by " & cfname("order") & " asc"
Set trs = conn.Execute(tsqlstr)
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)
tmptstr = Replace(tmpastr, "{$sort}", get_str(trs(cfname("sort"))))
tmptstr = Replace(tmptstr, "{$explain}", encode_article(get_str(trs(cfname("explain")))))
tmptstr = Replace(tmptstr, "{$admin}", get_forum_admin(trs(cfname("admin"))))
tmptstr = Replace(tmptstr, "{$pic}", get_forum_pic(tislock, trs(cfname("today_date"))))
tmptstr = Replace(tmptstr, "{$forum_images}", tforum_images)
tmptstr = Replace(tmptstr, "{$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"))))
tmptstr = Replace(tmptstr, "{$id}", get_num(trs(nidfield),0))
tmprstr = tmprstr & tmptstr
trs.movenext
Loop
Set trs = nothing
tmpstr = Replace(tmpstr, "{$sort}", rs(cfname("sort")))
tmpstr = Replace(tmpstr, jtbc_cinfo, tmprstr)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -