📄 admin_groups.asp
字号:
<!--#include file="inc/inc_sys.asp"-->
<%
Dim sAction,rst,ErrMsg
Dim sGid,sName,sLevel,sStyle,sPoints,sAutoUpdate,sOBCodes,sDayPosts,sPostChk,sSecondDomain,sDomain,sClasses,sSkins
Dim sSkinEdit,sSkinScript,sPostScript,sADSystem,sADuser,sQQNumber,sModNote,sModAddress,sModZhai,sModArgue,sModActions,sModScript,sIn_group
Dim sUpTypes,sUpSize,sUpSpace,sUpWaterMark,sIsPassword,sPMs,sUpdates,sCodePost,sMailPost,sDownLoad,sGetPwd,sDigg
Link_Database
'Layout
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>用户等级配置</title>
<link rel="stylesheet" href="images/style.css" type="text/css" />
<script src="images/menu.js" type="text/javascript"></script>
</head>
<body>
<div id="main_body">
<ul class="main_top">
<li class="main_top_left left">用户等级管理</li>
<li class="main_top_right right"> </li>
</ul>
<div class="main_content_rightbg">
<div class="main_content_leftbg">
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
<tr class="tdbg">
<td width="70" height="30"><strong>管理导航:</strong></td>
<td height="30">
<a href="admin_groups.asp">当前组列表</a> |
<a href="admin_groups.asp?action=add">新增用户等级</a> |
<a href="admin_groups.asp?action=move">不同等级间用户转移</a>
</td>
</tr>
<tr class="tdbg">
<td height="30" colspan="2" >
<font color="red"><strong>等级级别最小的组被默认为用户注册后所属的默认等级</strong></font>
</td>
</tr>
</table>
</div>
</div>
<ul class="main_end">
<li class="main_end_left left"></li>
<li class="main_end_right right"></li>
</ul>
</div>
<br />
<%
sGid=Request.QueryString("gid")
sGid=CheckInt(sGid,"")
sAction=LCase(Request.QueryString("action"))
select Case sAction
Case "add","show"
Call ShowForm(sGid)
Case "move"
Call ShowMove()
Case "savemove"
Call SaveMove
Case "save"
Call Save
Case "del"
Set rst=conn.execute("select Count(Userid) From oblog_user Where user_group=" & sGid)
If rst.Eof Then
conn.execute("Delete From oblog_groups Where groupid=" & sGid)
Else
If rst(0)>0 Then
ErrMsg="该等级中有"&rst(0)&"用户存在,请先将该部分用户转移到其他等级,此处列出除该等级外的等级列表,进行选择"
Else
conn.execute("Delete From oblog_groups Where groupid=" & sGid)
ErrMsg="该等级已经被删除"
End If
End If
EventLog "进行用户组的删除操作,目标用户组ID为"&sGid,oblog.NowUrl&"?"&Request.QueryString
oblog.ShowMsg "删除成功","admin_groups.asp"
Case "restat"
Set rst = oblog.execute ("select count(userid) from oblog_user where user_group = "&sGid)
oblog.execute ("update oblog_groups set g_members ="&rst(0)&" where groupid = " & sGid)
rst.close
Set rst=Nothing
oblog.ShowMsg "重新统计成功","admin_groups.asp"
Case Else
Call ShowList
End select
conn.Close
Set conn=Nothing
Dim sJs
sJs=JsValid("form1","g_name","1",1,50,"必须输入等级名称!")
sJs=sJs & JsValid("form1","g_uptypes","1",1,100,"必须填写上传文件类型!")
Call MakeValidJs("form1","checksubmit",sJs)
%>
</body>
</html>
<%
'Biz
Function GetMaxOrder()
Dim rst
Set rst=conn.execute("select Max(g_order) From oblog_groups")
If rst.Eof Or IsNull(rst(0)) Or Not IsNumeric(rst(0)) Then
GetMaxOrder =1
Else
GetMaxOrder =Int(rst(0))+1
End If
End Function
Sub ShowList()
Set rst=conn.Execute("select groupid,g_name,g_points,g_autoupdate,g_members,g_level From oblog_groups Order By g_level")
%>
<div id="main_body">
<ul class="main_top">
<li class="main_top_left left">用户等级信息</li>
<li class="main_top_right right"> </li>
</ul>
<div class="main_content_rightbg">
<div class="main_content_leftbg">
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" Class="border">
<%
If rst.Eof Then
%>
<tr><td align="center">目前还没有定义任何用户等级信息</td></tr>
<%
rst.Close
Set rst=Nothing
Exit Sub
End If
%>
<tr><td>等级级别</td><td>等级名称<td>积分限制</td><td>是否自动升级</td><td>用户数</td><td>操作</td>
<%
Do While Not rst.Eof
%>
<tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
<td><%=rst(5)%></td>
<td><%=rst(1)%></td>
<td><%=rst(2)%></td>
<td><%If rst(3)="1" Then Response.Write "是" Else Response.Write "否"%></td>
<td><%=rst(4)%></td>
<td><a href="admin_groups.asp?action=restat&gid=<%=rst(0)%>">重新统计</a> <a href="admin_groups.asp?action=show&gid=<%=rst(0)%>">修改</a>
<%If rst(4)=0 Then%>
<a href="admin_groups.asp?action=del&gid=<%=rst(0)%>" onclick="return confirm('确定要删除选中的用户组吗?');">删除</a>
<%End If%>
</td>
</tr>
<%
rst.MoveNext
Loop
rst.Close
Set rst=Nothing
%>
</tr></table>
</div>
</div>
<ul class="main_end">
<li class="main_end_left left"></li>
<li class="main_end_right right"></li>
</ul>
</div>
<%
End Sub
Sub ShowForm(Gid)
Dim rst,iOrder
If Gid<>"" And Gid>0 Then
Set rst=oblog.execute("select * From oblog_groups Where groupid=" &Gid)
If Not rst.Eof Then
sGid=rst("groupid")
sName=rst("g_name")
sLevel=rst("g_level")
sStyle=rst("g_style")
sPoints=CheckInt(rst("g_points"),"0")
sAutoUpdate=rst("g_autoupdate")
sOBCodes=rst("g_obcodes")
sDayPosts=rst("g_post_day")
sPostChk=rst("g_post_chk")
sSecondDomain=rst("g_seconddomain")
sDomain=rst("g_domain")
sClasses=rst("g_classes")
sSkins=rst("g_skins")
sSkinEdit=rst("g_skin_edit")
sSkinScript=rst("g_skin_script")
sPostScript=rst("g_post_script")
sADSystem=rst("g_ad_sys")
sADuser=rst("g_ad_user")
sQQNumber=rst("g_qq_number")
sModNote=rst("g_mod_note")
sModAddress=rst("g_mod_address")
sModZhai=rst("g_mod_zhai")
sModArgue=rst("g_mod_argue")
sModActions=rst("g_mod_meet")
sUpTypes=rst("g_up_types")
sUpSize=rst("g_up_size")
sUpSpace=rst("g_up_space")
sUpWaterMark=rst("g_up_watermark")
sIsPassword=rst("g_is_password")
sPMs=rst("g_pm_numbers")
sCodePost=OB_IIF(rst("is_code_addblog"),"0")
sUpdates=rst("oneday_update")
sIn_group=rst("in_group")
If oblog.cacheconfig(51)="1" Then
sMailPost=OB_IIF(rst("g_mailpost"),"0")
End If
sDownLoad = rst("g_download")
sGetPwd = rst("g_getpwd")
End If
If Trim(sPoints)="" Then sPoints="0"
rst.Close
Set rst=Nothing
Else
Set rst=oblog.execute("select Max(g_level) From oblog_groups")
If Not rst.Eof Then
sLevel=OB_IIF(rst(0),0)
Else
sLevel=0
End If
sLevel=sLevel+1
End If
%>
<div id="main_body">
<ul class="main_top">
<li class="main_top_left left">等级信息配置</li>
<li class="main_top_right right"> </li>
</ul>
<div class="main_content_rightbg">
<div class="main_content_leftbg">
<form method="post" action="admin_groups.asp?action=save&gid=<%=Gid%>" id="form1" name="form1" onSubmit="return checksubmit();">
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF" Class="border">
<tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
<td width="348" height="25" >等级名称</td>
<td height="25" ><% Call EchoInput("g_name",40,40,sName)%></td>
</tr>
<tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
<td width="348" height="25" >等级级别(不允许重复):</td>
<td height="25" ><% Call EchoInput("g_level",40,40,sLevel)%></td>
</tr>
<tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
<td width="348" height="25" >升级到该等级的最小积分:</td>
<td height="25" ><% Call EchoInput("g_points",40,10,sPoints)%>(如果该等级不允许升级,请将其设置为0)</td>
</tr>
<tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
<td width="348" height="25" > 是否允许自动升级</td>
<td> <% Call EchoRadio("g_autoupdate","","",sAutoupdate)%> </td>
</tr>
<!--
<tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
<td height="25" >组的css样式,注意在程序中将使用 style="xxx" 的形式</td>
<td height="25" ><% Call EchoInput("g_font",40,20,sStyle)%></td>
</tr>
-->
<tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
<td width="348" height="25" >是否允许修改二级域名</td>
<td height="25" ><% Call EchoRadio("g_seconddomain","","",sSecondDomain)%></td>
</tr>
<tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
<td width="348" height="25" >是否可以绑定顶级域名</td>
<td height="25" ><% Call EchoRadio("g_domain","","",sDomain)%> </td>
</tr>
<tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
<td width="348" height="25" >每天最多可发出的邀请数目,0为不允许发送</td>
<td height="25" ><% Call EchoInput("g_obcodes",40,40,sOBCodes)%></td>
</tr>
<tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
<td width="348" height="25" >发布的日志是否需要审核</td>
<td height="25" > <% Call EchoRadio("g_logchk","","",sPostChk)%></td>
</tr>
<tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
<td width="348" height="25" >允许发布的一级日志分类<br/>(不选择则允许发布在任意分类)</td>
<td>
<%
Dim sTmp,sChecked,rstTmp,i
sTmp="," & sClasses & ","
sChecked=""
Set rstTmp=conn.Execute("select * From oblog_logclass Where depth=0 And idType=0")
If rstTmp.Eof Then
Response.Write "还没有定义任何分类"
Else
Do While Not rstTmp.Eof
If InStr(sTmp,"," & rstTmp("classId") & ",")>0 Then
sChecked=" checked"
Else
sChecked=""
End If
Response.Write "<input name=""g_classes"" type=""checkbox"" value="& rstTmp("classId")& sChecked &">" & rstTmp("classname") & " "
i=i+1
If i Mod 5 =0 Then Response.Write "<br/>"
rstTmp.MoveNext
Loop
End If
rstTmp.Close
%></td>
</tr>
<tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
<td width="348" height="25" >每天允许发布的日志数目</td>
<td><% Call EchoInput("g_dayposts",40,40,sDayPosts)%>(0为不限制)</td>
</tr>
<tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
<td width="348" height="25" >日志中是否允许使用脚本</td>
<td height="25" > <% Call EchoRadio("g_post_script","","",sPostScript)%></td>
</tr>
<tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
<td width="348" height="25" >允许使用的模板分类<br/>(如果为不选择则允许使用所有模板)</td>
<td height="25" >
<%
sTmp=Replace("," & sSkins & ","," ","")
sChecked=""
i=0
Set rstTmp=conn.Execute("select * From oblog_skinclass Where iType=0")
If rstTmp.Eof Then
Response.Write "还没有定义任何分类"
Else
Do While Not rstTmp.Eof
If InStr(sTmp,"," & rstTmp("classId") & ",")>0 Then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -