📄 m_team.asp
字号:
<!--#include file="inc/inc_sys.asp"-->
<!--#include file="../inc/class_blog.asp"-->
<%
If CheckAccess("r_group_user")=False Then Response.Write "无权操作":Response.End
dim rs, sql
dim UserID,cmd,Keyword,sField
dim str
keyword=Trim(Request("keyword"))
if keyword<>"" then
keyword=oblog.filt_badstr(keyword)
end if
sField=Trim(Request("Field"))
cmd=Trim(Request("cmd"))
Action=Trim(Request("Action"))
UserID=Trim(Request("UserID"))
if cmd="" then
cmd=0
else
cmd=CLng(cmd)
end if
G_P_FileName="m_team.asp?cmd=" & cmd
if sField<>"" then
G_P_FileName=G_P_FileName&"&Field="&sField
end if
if keyword<>"" then
G_P_FileName=G_P_FileName&"&keyword="&keyword
cmd=10
End If
%>
<!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>oBlog--<%=oblog.CacheConfig(69)%>管理</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"><%=oblog.CacheConfig(69)%>管理</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" id="table1">
<form name="form1" action="m_team.asp" method="get">
<tr class="tdbg">
<td width="100" height="30"><strong>快速查找<%=oblog.CacheConfig(69)%>:</strong></td>
<td width="687" height="30">
<select size=1 name="cmd" onChange="javascript:submit()">
<option value=>请选择查询条件</option>
<option value="0">等待认证的<%=oblog.CacheConfig(69)%></option>
<option value="1">被锁住的<%=oblog.CacheConfig(69)%></option>
<option value="2">最后注册的50个<%=oblog.CacheConfig(69)%></option>
<option value="3">积分最高TOP10</option>
<option value="4">积分最低的10个<%=oblog.CacheConfig(69)%></option>
<option value="5">推荐<%=oblog.CacheConfig(69)%></option>
</select>
<a href="m_team.asp?cmd=2"><%=oblog.CacheConfig(69)%>管理首页</a></td>
</tr>
</form>
<form name="form2" method="post" action="m_team.asp">
<tr class="tdbg">
<td width="120"><strong><%=oblog.CacheConfig(69)%>高级查询:</strong></td>
<td >
<select name="Field" id="Field">
<option value="teamid" selected><%=oblog.CacheConfig(69)%>ID</option>
<option value="teamname" selected><%=oblog.CacheConfig(69)%>名</option>
<option value="UserID" ><%=oblog.CacheConfig(70)%>ID</option>
<option value="username" ><%=oblog.CacheConfig(70)%>名</option>
</select>
<input name="Keyword" type="text" id="Keyword" size="20" maxlength="30">
<input type="submit" name="Submit2" value=" 查 询 ">
<input name="cmd" type="hidden" id="cmd" value="10">
若为空,则查询所有<%=oblog.CacheConfig(69)%></td>
</tr>
</form>
</table>
</div>
</div>
<ul class="main_end">
<li class="main_end_left left"></li>
<li class="main_end_right right"></li>
</ul>
</div>
<%
Dim s1,actionStr,teamid
s1=Request("s1")
teamid=Request("teamid")
If teamid<>"" Then
If Instr(teamid,",") Then
teamid=FilterIds(teamid)
Else
teamid=Int(teamid)
End If
End If
'OB_DEBUG teamid,1
select Case LCase(Action)
Case "modifystate","pass0","pass1"
If Action = "pass0" Then s1 = "2"
If Action = "pass1" Then s1 = "1"
select Case s1
Case "1"
actionStr="通过审核"
Call TeamScore(teamid,1)
oblog.Execute("Update oblog_team Set istate=3 Where teamid IN (" & teamid &") ")
WriteSysLog "进行了通过审核"&oblog.CacheConfig(69)&"操作,目标"&oblog.CacheConfig(69)&"ID:"&teamid&"",oblog.NowUrl&"?"&Request.QueryString
Case "2"
actionStr="锁定"
oblog.Execute("Update oblog_team Set istate=2 Where teamid IN (" & teamid &") ")
WriteSysLog "进行了锁定"&oblog.CacheConfig(69)&"操作,目标"&oblog.CacheConfig(69)&"ID:"&teamid&"",oblog.NowUrl&"?"&Request.QueryString
Case "3"
actionStr="解除锁定"
oblog.Execute("Update oblog_team Set istate=3 Where teamid IN (" & teamid &") ")
WriteSysLog "进行了解除锁定"&oblog.CacheConfig(69)&"操作,目标"&oblog.CacheConfig(69)&"ID:"&teamid&"",oblog.NowUrl&"?"&Request.QueryString
End select
oblog.ShowMsg "群组" & actionStr & "成功",""
Case "best"
call best()
Case "delteam"
oblog.Execute("DELETE FROM oblog_team Where teamid in (" & teamid &" )")
WriteSysLog "进行了删除"&oblog.CacheConfig(69)&"操作,目标"&oblog.CacheConfig(69)&"ID:"&teamid&"",oblog.NowUrl&"?"&Request.QueryString
oblog.ShowMsg "群组删除成功",""
Case "modify"
Call modify()
case "modifyteaminfo"
call modifyteaminfo()
Case else
call main()
end select
if FoundErr=true then
call WriteErrMsg()
end If
Sub TeamScore(teamid,istate)
Dim rs
Set rs = oblog.Execute ("select createrid,istate FROM oblog_team WHERE teamid IN (" & teamid &") ")
If rs(1) = 1 Then
If istate = 3 Then
oblog.GiveScore "" ,oblog.CacheScores(12),rs(0)
End If
ElseIf rs(1) = 3 Then
If istate = 1 Then
oblog.GiveScore "" ,oblog.CacheScores(12),rs(0)
End If
End if
rs.close
Set rs=Nothing
End Sub
sub main()
sGuide=""
select case cmd
case 0
sql="select top 500 * from oblog_team Where istate=1 order by teamid desc"
sGuide=sGuide & "等待管理认证的" & oblog.CacheConfig(69)
case 1
sql="select top 500 * from oblog_team Where istate=2 order by teamid desc"
sGuide=sGuide & "所有被锁住的" & oblog.CacheConfig(69)
case 2
sql="select top 500 * from oblog_team Where istate>0 order by teamid desc"
sGuide=sGuide & "最后注册的500个" & oblog.CacheConfig(69)
case 3
sql="select top 500 * from oblog_team Where istate=3 order by teamscore desc"
sGuide=sGuide & "积分最高的前500个" & oblog.CacheConfig(69)
case 4
sql="select top 500 * from oblog_team Where istate=3 order by teamscore"
sGuide=sGuide & "积分最少的10个" & oblog.CacheConfig(69)
case 5
sql="select top 500 * from oblog_team Where isbest=1 order by teamscore"
sGuide=sGuide & "推荐" & oblog.CacheConfig(69)
case 10
if Keyword="" then
sql="select top 500 * from oblog_team order by teamid Desc"
sGuide=sGuide & "所有" & oblog.CacheConfig(69)
else
select case LCase(sField)
case "userid"
if IsNumeric(Keyword)=false then
FoundErr=true
ErrMsg=ErrMsg & "<br><li>"&oblog.CacheConfig(70)&"ID必须是整数!</li>"
else
sql="select * from oblog_team where managerid=" & CLng(Keyword)
sGuide=sGuide & oblog.CacheConfig(70) & "ID等于<font color=red> " & CLng(Keyword) & " </font>的" & oblog.CacheConfig(69)
end if
case "username"
sql="select * from oblog_team where managername like '%" & Keyword & "%'"
sGuide=sGuide & oblog.CacheConfig(70) &"用户名中含有“ <font color=red>" & Keyword & "</font> ”的" & oblog.CacheConfig(69)
case "teamname"
sql="select * from oblog_team where t_name like '%" & Keyword & "%'"
sGuide=sGuide & oblog.CacheConfig(69) &"名称中含有“ <font color=red>" & Keyword & "</font> ”的" & oblog.CacheConfig(69)
case "teamid"
sql="select * from oblog_team where teamid=" & CLng(Keyword)
sGuide=sGuide & oblog.CacheConfig(69) &"ID等于“ <font color=red>" & Keyword & "</font> ”的" & oblog.CacheConfig(69)
end select
end if
case else
FoundErr=true
ErrMsg=ErrMsg & "<br><li>错误的参数!</li>"
end select
If sGuide="" Then sGuide="群组管理"
if FoundErr=true then exit sub
if not IsObject(conn) then link_database
Set rs=Server.CreateObject("Adodb.RecordSet")
'Response.write sql
rs.Open sql,Conn,1,1
%>
<div id="main_body">
<ul class="main_top">
<li class="main_top_left left"><%=sGuide%></li>
<li class="main_top_right right"> </li>
</ul>
<div class="main_content_rightbg">
<div class="main_content_leftbg">
<%
Call oblog.MakePageBar(rs,"个" & oblog.CacheConfig(69))
%>
</table>
</div>
</div>
<%
rs.Close
set rs=Nothing
end sub
sub showContent()
dim i
i=0
%>
<style type="text/css">
<!--
.border tr td {padding:3px 0!important;}
-->
</style>
<form name="myform" method="Post" action="" onsubmit="return confirm('确定要执行选定的操作吗?');">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF" class="border" id="table3">
<tr class="title">
<td width="30" align="center"><strong>选中</strong></td>
<td width="44" align="center"><strong>ID</strong></td>
<td width="90" align="center"><strong><%=oblog.CacheConfig(69)%>LOGO</strong></td>
<td width="140" align="center"><strong><%=oblog.CacheConfig(69)%>名 <%=oblog.CacheConfig(70)%> 申请时间</strong></td>
<td width="60" align="center"><strong>会员数</strong></td>
<td width="50" align="center"><strong>主贴</strong></td>
<td width="50" align="center"><strong>回复</strong></td>
<td align="center"><strong>申请说明</strong></td>
<td width="70" align="center" ><strong>状态</strong></td>
<td width="80" align="center" ><strong>操作</strong></td>
</tr>
<%do while not rs.EOF %>
<tr class="tdbg">
<td align="center">
<input type="checkbox" id="teamid" name = "teamid" value="<%=rs("teamid")%>"/></td>
<td style="font-family:Century Gothic,verdana,tahoma,Arial,Helvetica,sans-serif;font-size:10px;font-weight:600;" align="center"><%=rs("teamid")%></td>
<td align="center"><a href="<%=ProIco(rs("t_ico"),3)%>" target="_blank" title="点击查看该图"><img src="../<%=rs("t_ico")%>" align="absmiddle" style="width:80px;height:60px;border:0;"></a></td>
<td><span style="display:block;padding:0 0 0 8px!important;"><a href="../group.asp?gid=<%=rs("teamid")%>" target="_blank"><%=rs("t_name")%></a></span><span style="display:block;padding:0 0 0 8px!important;color:#217dbd;">组长:<a href="../go.asp?userid=<%=rs("managerid")%>" target="_blank"><%=rs("managername")%></a></span><span style="display:block;color:#999;font-family:tahoma,Arial,Helvetica,sans-serif;font-size:10px;padding:0 0 0 8px!important;"><%=rs("createtime")%></span></td>
<td align="center" style="font-weight:600;color:#217dbd;">
<%=rs("icount0")%>人
</td>
<td align="center" style="font-weight:600;color:#f00;">
<%=rs("icount1")%>
</td>
<td align="center" style="font-weight:600;color:#090;">
<%=rs("icount2")%>
</td>
<td valign="top">
<span style="padding:6px;"><%=oblog.Filt_html(OB_IIF(rs("intro"),""))%></span>
</td>
<td align="center">
<%select case cint(rs("istate"))
case 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -