📄 module_config.asp
字号:
<%
'****************************************************
' Jetiben CMS Power by Jetiben.com
' Email: jetiben@hotmail.com
' Web: http://www.jetiben.com/
'****************************************************
Function module_data_member_side()
Dim tmpstr: tmpstr = ireplace("module.data_member_side", "tpl")
module_data_member_side = tmpstr
End Function
Function module_data_member_info()
Dim tmpstr: tmpstr = itake("module.data_member_info", "tpl")
Set rs = server.CreateObject("adodb.recordset")
sqlstr = "select * from " & ndatabase & " where " & cfname("username") & "='" & nusername & "'"
rs.open sqlstr, conn, 1, 3
Dim tmpi, tmpfields, tmpfieldsvalue
If Not rs.EOF Then
For tmpi = 0 To rs.fields.Count - 1
tmpfields = rs.fields(tmpi).Name
tmpfieldsvalue = get_str(rs(tmpfields))
tmpstr = Replace(tmpstr, "{$" & Replace(tmpfields, nfpre, "") & "}", htmlencode(tmpfieldsvalue))
Next
tmpstr = Replace(tmpstr, "{$id}", get_str(rs(nidfield)))
End If
Set rs = Nothing
tmpstr = creplace(tmpstr)
module_data_member_info = tmpstr
End Function
Function module_data_member_information()
Dim tmpstr: tmpstr = itake("module.data_member_information", "tpl")
Set rs = server.CreateObject("adodb.recordset")
sqlstr = "select * from " & ndatabase & " where " & cfname("username") & "='" & nusername & "'"
rs.open sqlstr, conn, 1, 3
Dim tmpi, tmpfields, tmpfieldsvalue
If Not rs.EOF Then
For tmpi = 0 To rs.fields.Count - 1
tmpfields = rs.fields(tmpi).Name
tmpfieldsvalue = get_str(rs(tmpfields))
tmpstr = Replace(tmpstr, "{$" & Replace(tmpfields, nfpre, "") & "}", htmlencode(tmpfieldsvalue))
Next
tmpstr = Replace(tmpstr, "{$id}", get_str(rs(nidfield)))
End If
Set rs = Nothing
tmpstr = creplace(tmpstr)
module_data_member_information = tmpstr
End Function
Function module_data_member_password()
Dim tmpstr: tmpstr = ireplace("module.data_member_password", "tpl")
module_data_member_password = tmpstr
End Function
Function module_data_member_userset()
Dim tmpstr: tmpstr = itake("module.data_member_userset", "tpl")
Set rs = server.CreateObject("adodb.recordset")
sqlstr = "select * from " & ndatabase & " where " & cfname("username") & "='" & nusername & "'"
rs.open sqlstr, conn, 1, 3
Dim tmpi, tmpfields, tmpfieldsvalue
If Not rs.EOF Then
For tmpi = 0 To rs.fields.Count - 1
tmpfields = rs.fields(tmpi).Name
tmpfieldsvalue = get_str(rs(tmpfields))
tmpstr = Replace(tmpstr, "{$" & Replace(tmpfields, nfpre, "") & "}", htmlencode(tmpfieldsvalue))
Next
tmpstr = Replace(tmpstr, "{$id}", get_str(rs(nidfield)))
End If
Set rs = Nothing
tmpstr = creplace(tmpstr)
module_data_member_userset = tmpstr
End Function
Function module_data_member_message_list()
ndatabase = cndatabase(ngenre, "message")
nidfield = cnidfield(ngenre, "message")
nfpre = cnfpre(ngenre, "message")
Dim tmpstr, tmpastr, tmprstr, tmptstr
tmpstr = itake("module.data_member_message_list", "tpl")
tmpastr = ctemplate(tmpstr, "{$recurrence_ida}")
sqlstr = "select * from " & ndatabase & " where " & cfname("recipients") & "='" & nusername & "' order by " & cfname("read") & " asc," & cfname("time") & " 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, "{$read}", get_num(rs(cfname("read")), 0))
tmptstr = Replace(tmptstr, "{$addresser}", htmlencode(get_str(rs(cfname("addresser")))))
tmptstr = Replace(tmptstr, "{$topic}", htmlencode(get_str(rs(cfname("topic")))))
tmptstr = Replace(tmptstr, "{$time}", get_date(rs(cfname("time"))))
tmptstr = Replace(tmptstr, "{$len}", get_num(rs(cfname("len")), 0))
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 = creplace(tmpstr)
module_data_member_message_list = tmpstr
End Function
Function module_data_member_message_listb()
ncontrol = "select,delete"
ndatabase = cndatabase(ngenre, "message")
nidfield = cnidfield(ngenre, "message")
nfpre = cnfpre(ngenre, "message")
Dim tmpstr, tmpastr, tmprstr, tmptstr
tmpstr = itake("module.data_member_message_listb", "tpl")
tmpastr = ctemplate(tmpstr, "{$recurrence_ida}")
sqlstr = "select * from " & ndatabase & " where " & cfname("addresser") & "='" & nusername & "' 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
For jcuti = 1 To npagesize
If Not rs.EOF Then
tmptstr = Replace(tmpastr, "{$read}", get_num(rs(cfname("read")), 0))
tmptstr = Replace(tmptstr, "{$recipients}", htmlencode(get_str(rs(cfname("recipients")))))
tmptstr = Replace(tmptstr, "{$topic}", htmlencode(get_str(rs(cfname("topic")))))
tmptstr = Replace(tmptstr, "{$time}", get_date(rs(cfname("time"))))
tmptstr = Replace(tmptstr, "{$len}", get_num(rs(cfname("len")), 0))
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 = creplace(tmpstr)
module_data_member_message_listb = tmpstr
End Function
Function module_data_member_message_detail()
ndatabase = cndatabase(ngenre, "message")
nidfield = cnidfield(ngenre, "message")
nfpre = cnfpre(ngenre, "message")
Dim tid, tmpstr
tid = get_num(request.querystring("id"),0)
Set rs = server.CreateObject("adodb.recordset")
sqlstr = "select * from " & ndatabase & " where (" & cfname("recipients") & "='" & nusername & "' or " & cfname("addresser") & "='" & nusername & "') and " & nidfield & "=" & tid
rs.open sqlstr, conn, 1, 3
if not rs.eof then
If rs(cfname("read")) = 0 and rs(cfname("recipients")) = nusername Then
rs(cfname("read")) = 1
rs.update
End If
tmpstr = itake("module.data_member_message_detail", "tpl")
tmpstr = replace(tmpstr, "{$topic}", htmlencode(get_str(rs(cfname("topic")))))
tmpstr = replace(tmpstr, "{$content}", encode_article(ubbcode(htmlencode(get_str(rs(cfname("content")))), 0)))
tmpstr = replace(tmpstr, "{$addresser}", htmlencode(get_str(rs(cfname("addresser")))))
tmpstr = replace(tmpstr, "{$time}", get_date(rs(cfname("time"))))
tmpstr = replace(tmpstr, "{$id}", get_num(rs(nidfield), 0))
tmpstr = creplace(tmpstr)
module_data_member_message_detail = tmpstr
Else
Call imessage(itake("message.detail_error", "lng"), "0")
End if
set rs = nothing
End Function
Function module_data_member_message_send
Dim tmpstr: tmpstr = itake("module.data_member_message_send", "tpl")
Dim tusername: tusername = get_safecode(request.querystring("username"))
tusername = htmlencode(tusername)
tmpstr = replace(tmpstr, "{$username}", tusername)
tmpstr = creplace(tmpstr)
module_data_member_message_send = tmpstr
End Function
Function module_data_member_friend()
ndatabase = cndatabase(ngenre, "friend")
nidfield = cnidfield(ngenre, "friend")
nfpre = cnfpre(ngenre, "friend")
Dim tmpstr, tmpastr, tmprstr, tmptstr
tmpstr = itake("module.data_member_friend", "tpl")
tmpastr = ctemplate(tmpstr, "{$recurrence_ida}")
sqlstr = "select * from " & ndatabase & " where " & cfname("username") & "='" & nusername & "' 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
For jcuti = 1 To npagesize
If Not rs.EOF Then
tmptstr = Replace(tmpastr, "{$name}", htmlencode(get_str(rs(cfname("name")))))
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)
tmpstr = creplace(tmpstr)
module_data_member_friend = tmpstr
End Function
Function module_data_user_detail()
Dim tusername: tusername = get_safecode(request.querystring("username"))
Dim tmpstr: tmpstr = itake("module.data_user_detail", "tpl")
Set rs = server.CreateObject("adodb.recordset")
sqlstr = "select * from " & ndatabase & " where " & cfname("username") & "='" & tusername & "'"
rs.open sqlstr, conn, 1, 3
Dim tmpi, tmpfields, tmpfieldsvalue
If Not rs.EOF Then
For tmpi = 0 To rs.fields.Count - 1
tmpfields = rs.fields(tmpi).Name
tmpfieldsvalue = get_str(rs(tmpfields))
tmpstr = Replace(tmpstr, "{$" & Replace(tmpfields, nfpre, "") & "}", htmlencode(tmpfieldsvalue))
Next
tmpstr = Replace(tmpstr, "{$id}", get_str(rs(nidfield)))
tmpstr = creplace(tmpstr)
module_data_user_detail = tmpstr
Else
Call imessage(itake("global.lng_public.not_exist", "lng"), -1)
End If
Set rs = Nothing
End Function
Function module_data_lostpassword()
Dim tmpstr: tmpstr = ireplace("module.data_lostpassword", "tpl")
module_data_lostpassword = tmpstr
End Function
Function jtb_cms_module_login()
Dim tmpstr: tmpstr = ireplace("module.login", "tpl")
tmpstr = cvalhtml(tmpstr, nvalidate, "{$recurrence_valcode}")
jtb_cms_module_login = tmpstr
End Function
Function jtb_cms_module_commence()
Dim tmpstr: tmpstr = ireplace("module.register", "tpl")
jtb_cms_module_commence = tmpstr
End Function
Function jtb_cms_module_premise()
Dim tmpstr: tmpstr = ireplace("module.premise", "tpl")
jtb_cms_module_premise = tmpstr
End Function
Function jtb_cms_module_member()
Dim tmpstr: tmpstr = ireplace("module.member", "tpl")
jtb_cms_module_member = tmpstr
End Function
Function jtb_cms_module_member_information()
Dim tmpstr: tmpstr = ireplace("module.member_information", "tpl")
jtb_cms_module_member_information = tmpstr
End Function
Function jtb_cms_module_member_password()
Dim tmpstr: tmpstr = ireplace("module.member_password", "tpl")
jtb_cms_module_member_password = tmpstr
End Function
Function jtb_cms_module_member_userset()
Dim tmpstr: tmpstr = ireplace("module.member_userset", "tpl")
jtb_cms_module_member_userset = tmpstr
End Function
Function jtb_cms_module_member_message_list()
Dim tmpstr: tmpstr = ireplace("module.member_message_list", "tpl")
jtb_cms_module_member_message_list = tmpstr
End Function
Function jtb_cms_module_member_message_listb()
Dim tmpstr: tmpstr = ireplace("module.member_message_listb", "tpl")
jtb_cms_module_member_message_listb = tmpstr
End Function
Function jtb_cms_module_member_message_detail()
Dim tmpstr: tmpstr = ireplace("module.member_message_detail", "tpl")
jtb_cms_module_member_message_detail = tmpstr
End Function
Function jtb_cms_module_member_message_send()
Dim tmpstr: tmpstr = ireplace("module.member_message_send", "tpl")
jtb_cms_module_member_message_send = tmpstr
End Function
Function jtb_cms_module_member_friend()
Dim tmpstr: tmpstr = ireplace("module.member_friend", "tpl")
jtb_cms_module_member_friend = tmpstr
End Function
Function jtb_cms_module_user_detail()
Dim tmpstr: tmpstr = ireplace("module.user_detail", "tpl")
jtb_cms_module_user_detail = tmpstr
End Function
Function jtb_cms_module_lostpassword()
Dim tmpstr: tmpstr = ireplace("module.lostpassword", "tpl")
jtb_cms_module_lostpassword = tmpstr
End Function
Function jtb_cms_module_member_message()
Select Case request.querystring("mtypes")
Case "send"
jtb_cms_module_member_message = jtb_cms_module_member_message_send
Case "detail"
jtb_cms_module_member_message = jtb_cms_module_member_message_detail
Case "list"
jtb_cms_module_member_message = jtb_cms_module_member_message_list
Case "listb"
jtb_cms_module_member_message = jtb_cms_module_member_message_listb
Case Else
jtb_cms_module_member_message = jtb_cms_module_member_message_list
End Select
End Function
Function jtb_cms_module_manage()
Select Case request.querystring("mtype")
Case "member"
jtb_cms_module_manage = jtb_cms_module_member
Case "information"
jtb_cms_module_manage = jtb_cms_module_member_information
Case "password"
jtb_cms_module_manage = jtb_cms_module_member_password
Case "userset"
jtb_cms_module_manage = jtb_cms_module_member_userset
Case "message"
jtb_cms_module_manage = jtb_cms_module_member_message
Case "friend"
jtb_cms_module_manage = jtb_cms_module_member_friend
Case Else
jtb_cms_module_manage = jtb_cms_module_member
End Select
End Function
Function jtb_cms_module()
Select Case request.querystring("type")
Case "login"
jtb_cms_module = jtb_cms_module_login
Case "commence"
Call check_passport_isregister_close
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -