📄 class_qq.asp
字号:
if Trim(Request("modify"))="1" and id<>"" then
if IsManager=true then
sql="select * from oblog_teampost where postid="&CLng(id)
Else
If IsMember Then
sql="select * from oblog_teampost where postid="&CLng(id)&" and userid="&oblog.l_uid
End if
end if
set rs=oblog.execute(sql)
if not rs.eof then
sTopic=rs("topic")
sContent=rs("content")
end if
end If
sRet="<a name=""add_comment""></a>" & vbcrlf & "<div id=""form_comment"">" & vbcrlf
If id <> "" And modify<>"1" Then
sRet = sRet & " <div class=""title"">回复内容</div>" & vbcrlf
End if
sRet = sRet & "<form action='"&FormUrl&"' method='post' name='commentform' id='commentform'>" & vbcrlf
sRet=sRet&"<div id=""ad_teamcomment""></div>" & vbcrlf
sName=oblog.l_uname
If sName ="" Then sName="游客"
sRet=sRet & " <fieldset>" & vbcrlf
sRet=sRet & " <legend>" & sName & " , 欢迎您参与" &oblog.CacheConfig(69)& "回复,在此处发布的内容将不显示在您的博客中</legend>" & vbcrlf
sRet=sRet & " <table>" & vbcrlf
If Not oblog.checkuserlogined() Then
sRet=sRet & " <tr >" & vbcrlf
sRet=sRet & " <td><label for=""UserName"">用户名:</label></td>" & vbcrlf
sRet=sRet & " <td><input name=""UserName"" type=""text"" id=""UserName"" size=""15"" maxlength=""20"" value="""" /></td>" & vbcrlf
sRet=sRet & " </tr>" & vbcrlf
Else
sRet=sRet & " <tr style=""display:none"">" & vbcrlf
sRet=sRet & " <td><label for=""UserName"">昵称:</label></td>" & vbcrlf
sRet=sRet & " <td><input name=""UserName"" type=""text"" id=""UserName"" size=""15"" maxlength=""20"" value="""" /></td>" & vbcrlf
sRet=sRet & " </tr>" & vbcrlf
sRet=sRet & " <tr style=""display:none"">" & vbcrlf
sRet=sRet & " <td><label for=""Password"">密码:</label></td>" & vbcrlf
sRet=sRet & " <td><input name='Password' type='password' id='Password' size='15' maxlength='20' value='' /> (游客无须输入密码)</td>" & vbcrlf
sRet=sRet & " </tr style=""display:none"">" & vbcrlf
sRet=sRet & " <tr style=""display:none"">" & vbcrlf
sRet=sRet & " <td><label for=""homepage"">主页:</label></td>" & vbcrlf
sRet=sRet & " <td><input name=""homepage"" type=""text"" id=""homepage"" size=""42"" maxlength=""50"" value=""http://"" /></td>" & vbcrlf
sRet=sRet & " </tr>" & vbcrlf
End If
If Id="" or modify="1" Then
sRet=sRet & " <tr>" & vbcrlf & " <td><label for=""commenttopic"">标题:</label></td>" & vbcrlf & " <td><input name=""commenttopic"" type=""text"" id=""commenttopic"" size=""50"" maxlength='50' value="""&sTopic&""" /></td>" & vbcrlf & " </tr>" & vbcrlf
sRet=sRet & " <tr>" & vbcrlf & " <td><label>内容:</label></td>" & vbcrlf & " <td><div id=""oblog_edit""><span id=""loadedit"" style=""font-size:12px""><img src='"&blogurl&"images/loading.gif' align='absbottom'> 正在载入编辑器...</span><textarea id=""oblog_edittext"" name=""oblog_edittext"" style=""width:400px;height:250px; display:none"" >"&sContent&"</textarea></div></td>" & vbcrlf & " </tr>" & vbcrlf
Else
sRet=sRet & " <tr>" & vbcrlf & " <td><label>内容:</label></td>" & vbcrlf & " <td><div id=""oblog_edit""><img src="""&blogurl&"images/loading.gif""></div><textarea id=""oblog_edittext"" name=""oblog_edittext"" style=""width:400px;height:250px; display:none"" >"&sContent&"</textarea></div></td>" & vbcrlf & " </tr>" & vbcrlf
end If
if oblog.CacheConfig(30)="1" Then
sRet=sRet & " <tr id =ob_code>" & vbcrlf
sRet=sRet & " <td><label for=""CodeStr"">验证码:</label></td>" & vbcrlf
sRet=sRet & " <td><input name=""CodeStr"" id=""CodeStr"" type=""text"" size=""6"" maxlength=""20"" /> "&oblog.getcode&"</td>" & vbcrlf
sRet=sRet & " </tr>" & vbcrlf
End if
sRet=sRet & " <tr>" & vbcrlf
sRet=sRet & " <td></td>" & vbcrlf
sRet=sRet & " <td><input type=""submit"" id=""Submit"" value="" 提 交 "" onclick='oblog_edittext.createTextRange().execCommand(""Copy"");' /></td>" & vbcrlf
sRet=sRet & " </tr>" & vbcrlf
sRet=sRet & " </table>"& vbcrlf
sRet=sRet & " </fieldset>"& vbcrlf
sRet=sRet & "</form>" & vbcrlf
sRet=sRet & "</div>" & vbcrlf
if oblog.CacheConfig(30)="1" Then
sRet=sRet & "<script>document.getElementById(""ob_code"").style.display='';</script>"
end if
if id<>"" and modify<>"1" then
sRet=sRet & "<script>function addcode(){return true;}</script>"
sRet=sRet & "<script src=""commentedit.asp""></script>"
else
end If
if id="" or modify="1" then
'载入编辑器
sRet=sRet& "<script language=JavaScript src='"&C_Editor_UBB&"/scripts/language/schi/editor_lang.js'></script>"
sRet=sRet& "<script language=JavaScript src='"&C_Editor_UBB&"/scripts/innovaeditor.js'></script>"
sRet=sRet& "<script language=""JavaScript"">"
sRet=sRet& "var oEdit1 = new InnovaEditor(""oEdit1"");"
sRet=sRet& "oEdit1.width=397;"
sRet=sRet& "oEdit1.height=260;"
sRet=sRet& "oEdit1.features=[""Hyperlink"",""Image"",""Flash"",""Media"",""CustomObject"",""|"", ""ClearAll"",""PasteWord"",""PasteText"",""RemoveFormat"",""|"", ""Bold"",""Italic"",""Underline"",""Strikethrough"",""|"", ""ForeColor"",""BackColor"",""|""];"
sRet=sRet& "oEdit1.cmdCustomObject = ""modelessDialogShow('"&blogdir&"editor/scripts/emot.htm',280,200)""; "
sRet=sRet& "oEdit1.cmdAssetManager=""modalDialogShow('"&blogdir&"editupload.asp',640,465)"";"
sRet=sRet& "oEdit1.REPLACE(""oblog_edittext"");"
sRet=sRet& "oEdit1.focus();"
sRet=sRet& "</script>"
'编辑器载入完毕
End if
CommentForm=sRet
sRet=""
End Function
Function GetTheme()
Dim sRet,sStyle,oFso,oStream
Dim team_Show
Dim trs
team_Show = "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"">"&vbcrlf
team_Show = team_Show &"<html xmlns=""http://www.w3.org/1999/xhtml"">"&vbcrlf
team_Show = team_Show &"<head>"&vbcrlf
team_Show = team_Show &"<meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"" />"&vbcrlf
team_Show = team_Show &"<title>$title$</title>"&vbcrlf
team_Show = team_Show &"<script src="""&blogurl&"inc/main.js"" type=""text/javascript""></script>"&vbcrlf
team_Show = team_Show &"{OB_STYLE}"&vbcrlf
team_Show = team_Show &"</head>"&vbcrlf
team_Show = team_Show &"<body>"&vbcrlf
team_Show = team_Show &"<span id=""ad_teamtop""></span>"&vbcrlf
g_Show_main = team_Show
' If Application(oblog.cache_name&"_group_theme_main"&g_id)="" Then
Set trs = oblog.Execute ("select user_skin_main,user_skin_showlog FROM oblog_team WHERE teamid = "&g_id)
If IsNull(trs(0)) Or IsNull(trs(1)) Then
set trs=oblog.Execute("select skinmain,skinshowlog from oblog_teamskin where isdefault=1")
If trs.EOF Then
set trs=oblog.Execute("select TOP 1 skinmain,skinshowlog from oblog_teamskin")
End if
End if
sRet = trs(0)
sStyle = OB_PickUpCss(sRet)
g_Show_main = Replace(g_Show_main,"{OB_STYLE}",sStyle)
g_Show_main = g_Show_main & sRet
g_Show_list = team_Show&trs(1)
g_Show_list = Replace(g_Show_list,"{OB_STYLE}",sStyle)
trs.Close
Set trs = Nothing
' Application.Lock
'模板
Set oFso=Server.CreateObject(oblog.CacheCompont(1))
Set oStream=oFSO.OpenTextFile(Server.Mappath("oBlogStyle/group/g_log.htm"),1,False)
g_Show_log = oStream.ReadAll
' Application(oblog.cache_name&"_group_theme_list"&g_id) = g_Show_log
' Application(oblog.cache_name&"_group_theme_main"&g_id) = g_Show_main
' Application(oblog.cache_name&"_group_theme_post"&g_id) = g_Show_list
' Application.Unlock
sRet=""
' Else
' g_Show_main = Application(oblog.cache_name&"_group_theme_main"&g_id)
' g_Show_list = Application(oblog.cache_name&"_group_theme_post"&g_id)
' g_Show_log = Application(oblog.cache_name&"_group_theme_list"&g_id)
' End If
End Function
Function IsManager()
IsManager=false
imMode=0
If oblog.CodeCookie(g_ManagerName)=Request.Cookies(cookies_name)("username") Then
If oblog.checkuserlogined()=true Then
imMode=1
IsManager=true
End If
End If
End Function
Function IsMember()
Dim rs
IsMember=false
If oblog.checkuserlogined()=true Then
Set rs=oblog.Execute("select id From oblog_teamusers Where state>2 and teamid=" & g_id & " And userid=" & oblog.l_uid )
If Not rs.Eof Then
IsMember=true
End If
Set rs=Nothing
End If
End Function
'----------------------------------------------------
'群组管理功能模块
'----------------------------------------------------
'申请加入模块
Function JoinForm(id)
Dim sRet,rs
' If oblog.checkuserlogined()=false Then
' JoinForm="<p><a href='login.asp?fromurl=group.asp?cmd=join$gid="&g_id&"'>您必须先登录后才能申请加入</a></p>"
' Exit Function
' End If
'判断加入条件
Set rs=oblog.execute("select joinlimit,joinscores,icount0 From oblog_team Where teamid="& Int(id))
If rs.Eof Then
ErrMsg="目标" &oblog.CacheConfig(69)& "不存在!"
Response.End
End If
select Case rs(0)
Case 1
Case 2
ErrMsg="本" &oblog.CacheConfig(69)& "只能由"&oblog.CacheConfig(70)&"发出邀请,不能申请加入"
Case 3
If oblog.l_uscores<rs(1) Then
ErrMsg="加入本" &oblog.CacheConfig(69)& "需要至少 " & rs(1) & " 点积分,您的积分不足"
End If
End select
if rs(2)>=Int(oblog.CacheConfig(71)) then
ErrMsg="本" &oblog.CacheConfig(69)& "成员已达到系统上限"&oblog.CacheConfig(71)&"人。"
end if
Set rs=Nothing
If ErrMsg<>"" Then
JoinForm=ErrMsg
Exit Function
End If
'是否任何人都可以加入
sRet="<form id=""join"" action=group.asp?cmd=savejoin&gid="&g_id&" method=""post"">" & vbcrlf
sRet = sRet &" <fieldset>" & vbcrlf
If Not oblog.checkuserlogined() Then
sRet=sRet & " <legend>游客,请填写您的申请信息</legend>" & vbcrlf
sRet=sRet & " <table>" & vbcrlf
sRet=sRet & " <tr>" & vbcrlf
sRet=sRet & " <td><label for=""UserName"">用户名:</label></td>" & vbcrlf
sRet=sRet & " <td><input name=""UserName"" type=""text"" id=""UserName"" size=""15"" maxlength=""20"" value="""" /></td>" & vbcrlf
sRet=sRet & " </tr>" & vbcrlf
sRet=sRet & " <tr>" & vbcrlf
sRet=sRet & " <td><label for=""Password"">密码:</label></td>" & vbcrlf
sRet=sRet & " <td><input name=""Password"" type=""password"" id=""Password"" size=""15"" maxlength=""20"" value="""" /></td>" & vbcrlf
sRet=sRet & " </tr>" & vbcrlf
Else
sRet=sRet &" <legend>"& oblog.DecodeCookie(Request.Cookies(cookies_name)("username")) & ",请填写您的申请信息</legend>"
sRet=sRet & " <table>" & vbcrlf
sRet=sRet & " <tr style=""display:none"">" & vbcrlf
sRet=sRet & " <td><label for=""UserName"">昵称:</label></td>" & vbcrlf
sRet=sRet & " <td><input name=""UserName"" type=""text"" id=""UserName"" size=""15"" maxlength=""0"" value="""" /></td>" & vbcrlf
sRet=sRet & " </tr>" & vbcrlf
sRet=sRet & " <tr style=""display:none"">" & vbcrlf
sRet=sRet & " <td><label for=""Password"">密码:</label></td>" & vbcrlf
sRet=sRet & " <td><input name=""Password"" type=""password"" id=""Password"" size=""15"" maxlength=""20"" value="""" /> (游客无须输入密码)</td>" & vbcrlf
sRet=sRet & " </tr>" & vbcrlf
sRet=sRet & " <tr style=""display:none"">" & vbcrlf
sRet=sRet & " <td><label for=""Password"">主页:</label></td>" & vbcrlf
sRet=sRet & " <td><input name=""homepage"" type=""text"" id=""homepage"" size=""42"" maxlength=""50"" value=""http://"" /></td>" & vbcrlf
sRet=sRet & " </tr>" & vbcrlf
End If
sRet=sRet & " <tr>" & vbcrlf
sRet=sRet & " <td><label for=""info"">内容:</label></td>" & vbcrlf
sRet=sRet & " <td><textarea cols=""50"" rows=""6"" maxlength=""200"" name=""info"" id=""info""></textarea></td>" & vbcrlf
sRet=sRet & " </tr>" & vbcrlf
sRet=sRet & " <tr>" & vbcrlf
sRet=sRet & " <td></td>" & vbcrlf
sRet=sRet & " <td><input type=""submit"" id=""Submit"" value="" 提 交 "" /></td>" & vbcrlf
sRet=sRet & " </tr>" & vbcrlf
sRet=sRet & " </table>" & vbcrlf
sRet=sRet & " </fieldset>" & vbcrlf
sRet=sRet & "</form>" & vbcrlf
JoinForm=sRet
End Function
'批准模块
Function AcceptJoin()
Dim rs,sql,sRet,ustate
'判断用户是否登录
If oblog.checkuserlogined()=false Then
AcceptJoin="<p>您必须登录后才能进行申请操作</p>"
Exit Function
End If
ustate=2
'判断加入条件
Set rs=oblog.execute("select joinlimit,joinscores From oblog_team Where teamid="& Int(g_id))
If rs.Eof Then
ErrMsg="目标" &oblog.CacheConfig(69)& "不存在!"
Response.End
End If
select Case rs(0)
Case -1
ustate=3
Case 1
ErrMsg="本" &oblog.CacheConfig(69)& "只能由组长发出邀请,不能申请加入"
Case 2
If oblog.l_uscores<rs(1) Then
ErrMsg="加入本" &oblog.CacheConfig(69)& "需要至少 " & rs(1) & " 点积分,您的积分不足"
End If
Case Else
End select
If ErrMsg<>"" Then
AcceptJoin=ErrMsg
Exit Function
End If
'判断之前是否已加入或申请
Sql="select * From oblog_teamusers Where teamid=" & g_id & " And userid=" & oblog.l_uid
Set rs=Server.CreateObject("Adodb.Recordset")
rs.Open Sql,conn,1,3
If Not rs.Eof Then
select Case rs("state")
Case 3
sRet="您已经是该" &oblog.CacheConfig(69)& "的成员。"
Case 1
sRet="您已经被邀请,请进入您的后台接受或拒绝该" &oblog.CacheConfig(69)& "的邀请。"
Case 2
sRet="您已经发出申请,请等待管理员审核。"
Case 5
sRet="您是该" &oblog.CacheConfig(69)& "管理员,不需要进行申请。"
End select
Else
'判断条件
rs.AddNew
rs("teamid")=g_Id
rs("userid")=oblog.l_uid
rs("state")=ustate
rs("info")= left(Request("info"),200)
rs("icount")=0
rs("addtime")=Now
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -