📄 module_config.asp
字号:
rs(cfnames(tfpre, "username")) = nusername
rs(cfnames(tfpre, "data")) = tvotes
rs(cfnames(tfpre, "time")) = Now()
rs.update
End If
Set rs = Nothing
tdatabase = cndatabase(ngenre, "vote_data")
tidfield = cnidfield(ngenre, "vote_data")
tfpre = cnfpre(ngenre, "vote_data")
sqlstr = "update " & tdatabase & " set " & cfnames(tfpre, "count") & "=" & cfnames(tfpre, "count") & "+1 where " & cfnames(tfpre, "fid") & "=" & tid & " and " & tidfield & " in (" & tvotes & ")"
If run_sqlstr(sqlstr) Then
response.cookies("forum_vote")(CStr(tid)) = "1"
Call imessage(itake("vote.succeed", "lng"), tbackurl)
Else
Call imessage(itake("vote.error0", "lng"), tbackurl)
End If
End Sub
Sub jtb_cms_module_topic_editdisp()
Call isuserlogin(get_actual_route(ngenre))
Dim tsid: tsid = get_num(request.querystring("sid"), 0)
Dim tid: tid = get_num(request.querystring("tid"), 0)
Dim tbackurl: tbackurl = get_safecode(request.querystring("backurl"))
If Not request.Form("valcode") = session("rndcodes") Then
Call client_alert(itake("global.lng_error.valcode", "lng"), -1)
End If
Dim tmpchkstr, tmpcitem
tmpchkstr = "topic:" & itake("config.topic", "lng") & ",content:" & itake("config.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
Call set_forum_ndatabase("topic")
sqlstr = "select * from " & ndatabase & " where " & nidfield & "=" & tid
Set rs = server.CreateObject("adodb.recordset")
rs.open sqlstr, conn, 1, 3
Dim tcontent_database
If Not rs.EOF Then
rs(cfname("icon")) = get_num(request.Form("icon"), 0)
rs(cfname("topic")) = left_intercept(get_str(request.Form("topic")), 50)
rs(cfname("ubb")) = get_num(request.Form("ubb"), 0)
rs.update
tid = rs(nidfield)
tcontent_database = rs(cfname("content_database"))
rs.close
Call set_forum_ndatabase("data")
ndatabase = tcontent_database
sqlstr = "select * from " & ndatabase & " where " & cfname("tid") & "=" & tid
rs.open sqlstr, conn, 1, 3
If Not rs.EOF Then
Dim tcontents: tcontents = left_intercept(get_str(request.Form("content")), 100000)
tcontents = tcontents & vbcrlf & vbcrlf & ireplace("module.topicedit_info", "lng")
rs(cfname("content")) = tcontents
rs.update
End If
rs.close
Set rs = Nothing
Call imessage(itake("module.topicedit_succeed", "lng"), tbackurl)
Else
Call imessage(itake("module.topicedit_failed", "lng"), tbackurl)
End If
End Sub
Sub jtb_cms_module_topic_replydisp()
Dim tbackurl: tbackurl = get_safecode(request.querystring("backurl"))
Call isuserlogin(tbackurl)
Call check_valcode(-1)
Dim ttid: ttid = get_num(request.querystring("tid"), 0)
Dim tid, tsid
Dim tmpchkstr, tmpcitem
tmpchkstr = "content:" & itake("config.replycontent", "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
Call set_forum_ndatabase("topic")
sqlstr = "select * from " & ndatabase & " where " & cfname("hidden") & "=0 and " & nidfield & "=" & ttid
Set rs = server.CreateObject("adodb.recordset")
rs.open sqlstr, conn, 1, 3
If rs.EOF Then Call imessage(itake("config.notexist", "lng"), tbackurl)
tsid = rs(cfname("sid"))
If rs(cfname("lock")) = 1 Then Call imessage(itake("config.lockinfo", "lng"), tbackurl)
If Not check_forum_popedom(tsid, 0) = 0 Then Call imessage(itake("module.popedom", "lng"), -1)
If check_forum_blacklist(tsid) Then Call imessage(itake("module.inblacklist", "lng"), -1)
rs(cfname("reply")) = rs(cfname("reply")) + 1
rs(cfname("lasttime")) = Now()
rs(cfname("lastuser")) = nusername
rs.update
rs.close
sqlstr = "select * from " & ndatabase
rs.open sqlstr, conn, 1, 3
rs.addnew
rs(cfname("sid")) = tsid
rs(cfname("fid")) = ttid
rs(cfname("icon")) = get_num(request.Form("icon"), 0)
rs(cfname("topic")) = left_intercept(get_str(request.Form("topic")), 50)
rs(cfname("author")) = nusername
rs(cfname("authorip")) = nuserip
rs(cfname("content_database")) = get_str(get_value(ngenre & ".ndatabase_data"))
rs(cfname("ubb")) = get_num(request.Form("ubb"), 0)
rs(cfname("time")) = Now()
rs(cfname("lasttime")) = Now()
rs.update
tid = rs(nidfield)
If get_num(tid, 0) = 0 Then tid = get_topid(ndatabase, nidfield)
rs.close
Call set_forum_ndatabase("data")
sqlstr = "select * from " & ndatabase
rs.open sqlstr, conn, 1, 3
rs.addnew
rs(cfname("tid")) = tid
rs(cfname("content")) = left_intercept(get_str(request.Form("content")), 100000)
rs.update
rs.close
Call set_forum_ndatabase("sort")
sqlstr = "select * from " & ndatabase & " where " & nidfield & "=" & tsid
rs.open sqlstr, conn, 1, 3
If Not rs.EOF then
rs(cfname("nnote")) = rs(cfname("nnote")) + 1
rs(cfname("last_time")) = Now()
rs.update
End If
rs.close
Set rs = nothing
Call update_userproperty("topic", 1, 0, nusername)
Call update_userproperty("integral", nint_reply, 0, nusername)
response.redirect tbackurl
End Sub
Sub jtb_cms_module_manage_topicdisp()
ncontrol = "select"
If forum_isadmin = 1 Then ncontrol = ncontrol & ",htop"
ncontrol = ncontrol & ",top,elite,lock,hidden"
Dim tsid, tcsid, tbackurl, totsql
tsid = get_num(request.querystring("sid"), 0)
totsql = " and " & cfname("sid") & "=" & tsid
tbackurl = get_safecode(request.querystring("backurl"))
tcsid = get_safecode(request.Form("sel_id"))
Call set_forum_ndatabase("topic")
Select Case request.Form("control")
Case "htop"
If cinstr(ncontrol, "htop", ",") Then Call dbase_switch(ndatabase, nfpre & "htop", nidfield, tcsid, totsql)
Case "top"
If cinstr(ncontrol, "top", ",") Then Call dbase_switch(ndatabase, nfpre & "top", nidfield, tcsid, totsql)
Case "elite"
If cinstr(ncontrol, "elite", ",") Then Call dbase_switch(ndatabase, nfpre & "elite", nidfield, tcsid, totsql)
Case "lock"
If cinstr(ncontrol, "lock", ",") Then Call dbase_switch(ndatabase, nfpre & "lock", nidfield, tcsid, totsql)
Case "hidden"
If cinstr(ncontrol, "hidden", ",") Then Call dbase_switch(ndatabase, nfpre & "hidden", nidfield, tcsid, totsql)
End Select
Call dbase_update(ndatabase, cfname("color"), htmlencode(request.Form("color")), nidfield, tcsid, totsql)
Call dbase_update(ndatabase, cfname("b"), get_num(request.Form("b"), 0), nidfield, tcsid, totsql)
response.redirect tbackurl
End Sub
Sub jtb_cms_module_manage_detaildisp()
Call set_forum_ndatabase("topic")
ncontrol = "select,hidden"
Dim tsid, tcsid, tbackurl, totsql
tsid = get_num(request.querystring("sid"), 0)
totsql = " and " & cfname("sid") & "=" & tsid
tbackurl = get_safecode(request.querystring("backurl"))
tcsid = get_safecode(request.Form("sel_id"))
Call set_forum_ndatabase("topic")
Select Case request.Form("control")
Case "hidden"
If cinstr(ncontrol, "hidden", ",") Then Call dbase_switch(ndatabase, nfpre & "hidden", nidfield, tcsid, totsql)
End Select
response.redirect tbackurl
End Sub
Sub jtb_cms_module_manage_blacklistdisp()
Call set_forum_ndatabase("blacklist")
ncontrol = "select,delete"
Dim tsid, tcsid, tbackurl, totsql
tsid = get_num(request.querystring("sid"), 0)
totsql = " and " & cfname("sid") & "=" & tsid
tbackurl = get_safecode(request.querystring("backurl"))
tcsid = get_safecode(request.Form("sel_id"))
Select Case request.Form("control")
Case "delete"
If cinstr(ncontrol, "delete", ",") Then Call dbase_delete(ndatabase, nidfield, tcsid, totsql)
End Select
response.redirect tbackurl
End Sub
Sub jtb_cms_module_manage_add_blacklistdisp()
Dim tsid: tsid = get_num(request.querystring("sid"), 0)
Dim tbackurl: tbackurl = get_safecode(request.querystring("backurl"))
Dim tmpchkstr, tmpcitem
tmpchkstr = "username:" & itake("blacklist.username", "lng") & ",remark:" & itake("blacklist.remark", "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
Call set_forum_ndatabase("blacklist")
Dim tid
sqlstr = "select * from " & ndatabase
Set rs = server.CreateObject("adodb.recordset")
rs.open sqlstr, conn, 1, 3
rs.addnew
rs(cfname("username")) = left_intercept(get_str(request.Form("username")), 50)
rs(cfname("sid")) = tsid
rs(cfname("admin")) = nusername
rs(cfname("time")) = now()
rs(cfname("remark")) = left_intercept(get_str(request.Form("remark")), 255)
rs.update
Set rs = nothing
response.redirect tbackurl
End Sub
Sub jtb_cms_module_managedisp()
Call isuserlogin("0")
Dim tsid: tsid = get_num(request.querystring("sid"), 0)
forum_isadmin = check_forum_isadmin(tsid)
If forum_isadmin = 0 Then Call imessage(itake("config.admininfo", "lng"), -1)
Select Case request.querystring("mtype")
Case "topic"
Call jtb_cms_module_manage_topicdisp
Case "detail"
Call jtb_cms_module_manage_detaildisp
Case "blacklist"
Call jtb_cms_module_manage_blacklistdisp
Case "add_blacklist"
Call jtb_cms_module_manage_add_blacklistdisp
End select
End Sub
Sub jtb_cms_module_action()
Select Case request.querystring("action")
Case "manage"
Call jtb_cms_module_managedisp
Case "release"
Call jtb_cms_module_topic_releasedisp
Case "vote"
Call jtb_cms_module_topic_votedisp
Case "edit"
Call jtb_cms_module_topic_editdisp
Case "reply"
Call jtb_cms_module_topic_replydisp
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 + -