<!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=utf-8" />
<meta   name="robots" content="noindex, nofollow" />
<meta   http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>成员管理 - {$_mtagname$} - 群组 - <jcms:site.name/></title>
<script type="text/javascript" src="../_libs/jquery.tools.pack.js"></script>
<script type="text/javascript" src="../_data/jcmsV4.x.js"></script>
<link   type="text/css" rel="stylesheet" href="../_data/jcmsV4.x.css" />
<script type="text/javascript" src="../style/user/common.js"></script>
<link   type="text/css" rel="stylesheet" href="../style/user/common.css" />
<script type="text/javascript">
var pagesize=20;
var page=thispage();
(function(){
	$(document).ready(function(){
		var id = anchor();
		if(id!="1" && id!="2" && id!="3" && id!="4") id="0";
		aLoad(id);
	});
})();
function aLoad(s) {
	page = "1";
	if(s == "1")
		sort = "&sort=1";
	else if(s == "2")
		sort = "&sort=2";
	else if(s == "3")
		sort = "&sort=3";
	else if(s == "4")
		sort = "&sort=4";
	else
		sort = "";
	ajaxList(page);
}
function ajaxList(currentpage)
{
	//设置选项卡
	for(i=0; i<5; i++)
	{
		$OBJ("tab"+i).className = "";
        
	}

	if(sort == "&sort=1")
		$OBJ("tab1").className = "current";
	else if(sort == "&sort=2")
		$OBJ("tab2").className = "current";
	else if(sort == "&sort=3")
		$OBJ("tab3").className = "current";
	else if(sort == "&sort=4")
		$OBJ("tab4").className = "current";
	else
		$OBJ("tab0").className = "current";
	if(currentpage!=null) page=currentpage;
	$.ajax({
		type:		"get",
		dataType:	"json",
		data:		"page="+currentpage+"&pagesize="+pagesize+"&time="+(new Date().getTime()),
		url:		"view_membermanage_ajax.aspx?mtagid={$_mtagid$}&oper=ajaxGetList"+sort,
		error:		function(XmlHttpRequest,textStatus, errorThrown){if(XmlHttpRequest.responseText!=""){alert(XmlHttpRequest.responseText);}},
		success:	function(d){
			switch (d.result)
			{
			case '0':
				JumbotCms.Alert(d.returnval, "0");
				break;
			case '1':
				$("#ajaxList").setTemplateElement("tplList", null, {filter_data: false});
				$("#ajaxList").processTemplate(d);
				$("#ajaxPageBar").html(d.pagerbar);
				break;
			}
		}
	});
}
function ajaxManage(){
	var ids = JoinSelect("selectID");
	var toPower = $("#toPower").val();
	if(ids=="")
	{
		JumbotCms.Alert("没有任何选择项", "0"); 
		return;
	}
	$.ajax({
		type:		"post",
		dataType:	"json",
		data:		"ids="+ids,
		url:		"view_membermanage_ajax.aspx?mtagid={$_mtagid$}&oper=ajaxManage&topower="+toPower+"&time="+(new Date().getTime()),
		error:		function(XmlHttpRequest,textStatus, errorThrown){alert(XmlHttpRequest.responseText); },
		success:	function(d){
			switch (d.result)
			{
			case '0':
				JumbotCms.Alert(d.returnval, "0");
				break;
			case '1':
				JumbotCms.Message(d.returnval, "1");
				ajaxList(page);
				break;
			}
		}
	});
}
</script>
<script type="text/javascript" src="../style/mtag/ajax.js"></script>
</head>
<body>
<style>
@import url(../style/member/style.css);
#ucmenu{width:600px;}
</style>
<iframe frameborder="0" scrolling="no" src="../user/index_default.aspx?do=header" width="100%" height="76" marginwidth="0" marginheight="0" hspace="0" vspace="0" id="ifheader"></iframe>
<!--顶部结束,中框架开始-->
<div id="wrap">
	<div id="main">
		<div id="app_sidebar">
			<ul class="app_list" id="default_userapp">
				<li class="currently"><img src="../style/member/ico_home.gif"><a href="../user/index_default.aspx">个人中心首页</a></li>
			</ul>
			<ul class="app_list" id="my_userapp">
				<li class="hr"></li>
				<li><img src="../style/member/ico_contribute.gif"><a href="../user/contribute_default.aspx" target="_blank">我的投稿</a><em></em></li>
				<li><img src="../style/app/message.gif"><a href="../user/pmlist_default.aspx">短信</a><em><a href="../user/pmsend_default.aspx">发送</a></em></li>
				<li><img src="../style/app/friend.gif"><a href="../user/friendlist_default.aspx">好友</a><em><a href="../user/friendadd_default.aspx">添加</a></em></li>
				<li><img src="../style/app/mtag.gif"><a href="index_default.aspx">群组</a><em><a href="threadlist_default.aspx">话题</a></em></li>
				<li><img src="../style/app/favorite.gif"><a href="../user/favorite_default.aspx">收藏夹</a></li>
				
			</ul>
		</div>
		<div id="mainarea">
			<h2 class="title"> <img src="../style/app/mtag.gif">群组 - {$_mtagname$} </h2>
			<div class="tabs_header">
				<ul class="tabs">
					<li><a href="view_setting_default.aspx?mtagid={$_mtagid$}"><span>基本设置</span></a></li>
					<li><a href="view_invite_default.aspx?mtagid={$_mtagid$}"><span>邀请好友</span></a></li>
					<li class="active"><a href="view_membermanage_default.aspx?mtagid={$_mtagid$}"><span>成员管理</span></a></li>
					<li><a href="view_threadmanage_default.aspx?mtagid={$_mtagid$}"><span>话题批量管理</span></a></li>
					<li><a href="view_default.aspx?mtagid={$_mtagid$}"><span>返回群组首页</span></a></li>
				</ul>
			</div>
			<div id="content">
<textarea id="tplList" style="display:none">
<div class="h_status"> 选择相应的用户进行用户等级变更。</div>
<div class="h_status">
<ul class="avatar_list">
{#foreach $T.table as record}
<li>
<div class="avatar48"><a href="javascript:void(0);" onclick="ShowUserPage({$T.record.memberuserid});" title="{$T.record.memberusername}"><img src="../_data/avatar/{$T.record.memberuserid}_m.jpg" onerror="this.src='../_data/avatar/0_m.jpg'" alt="{$T.record.memberusername}" width="48" height="48" /></a></div>
<p><a href="javascript:void(0);" onclick="ShowUserPage({$T.record.memberuserid});" title="{$T.record.memberusername}">{$T.record.memberusername}</a></p>
<p>
{#if $T.record.memberisfounder == '0'}
<input class="checkbox" name="selectID" type="checkbox" value='{$T.record.memberuserid}' /> 选定
{#else}
主群主
{#/if}
</p>
</li>
{#/for}
</ul>
</div>				
<p>
<input onclick="checkAll()" id="checkedAll" name="checkedAll" type="checkbox" />
全选 &nbsp;
设为：
<select id="toPower">
<option value="8">副群主</option>
<option value="0" selected>普通成员</option>
<option value="-1">禁止发言</option>
<option value="-2">待审核成员</option>
<option value="-9">踢出群组</option>
</select>
<input type="button" onclick="ajaxManage();" value="提交" class="submit" />
</p></textarea>
				<div id="ajaxList" style="width:640px;"></div>
				<div id="ajaxPageBar" class="pages"> </div>
			</div>
			<div id="sidebar" style="width:150px;">
				<div class="cat">
					<h3>成员级别</h3>
					<ul class="post_list line_list">
						<li id="tab0"><a href="#0" onclick="aLoad('0');">全部成员</a></li>
						<li id="tab1"><a href="#1" onclick="aLoad('1');">群主</a></li>
						<li id="tab2"><a href="#2" onclick="aLoad('2');">普通成员</a></li>
						<li id="tab3"><a href="#3" onclick="aLoad('3');">禁止发言</a></li>
						<li id="tab4"><a href="#4" onclick="aLoad('4');">待审核成员</a></li>
					</ul>
				</div>
			</div>
		</div>
		<!--/mainarea-->
		<div id="bottom"></div>
	</div>
</div>
<iframe frameborder="0" scrolling="no" src="../user/index_default.aspx?do=footer" width="100%" height="50" marginwidth="0" marginheight="0" hspace="0" vspace="0" id="iffooter"></iframe>
</body>
</html>
