<?php
if( !defined('ISDVBBS') ){
	header('HTTP/1.0 404 Not Found');
	printFooter();
	exit;
}
?>
<SCRIPT LANGUAGE="JavaScript">
	function SelectAllItems()
	{
		var do_check=document.getElementById("mchkSelAll");
		
		var selItems;
		try{
			selItems = document.getElementsByName("chkID[]");
		}catch(e){
			selItems = document.getElementsById("chkID");
		}
		
		if(do_check.checked)
		{
			if(selItems != null)
				for(i = 0; i < selItems.length; i++) {
					if (!selItems[i].disabled)
						selItems[i].checked = true;
				}
		}
		else
		{
				if(selItems != null)
					for(i = 0; i < selItems.length; i++)
						selItems[i].checked = false;
		}
	}

function alertreadme(str,url){
{if(confirm(str)){
location.href=url;
return true;
}return false;}
}

</SCRIPT>
<script language="javascript">
function CheckAll(form){alert(form);
	for (var i=0;i<form.elements.length;i++){
		var e = form.elements[i];
		if (e.name == 'groupid') e.checked = form.chkall.checked;
	}
}
function clicksubmit(form){
	if(confirm('<?=$lang["sub_info1"]?>')){
		this.document.batchform.submit();
		return true;
	}else{
		return false;
	}
}

//SELECT表单选取 Obj 表单名，VAL所选的值
function ChkSelected(Obj,Val)
{
	if (Obj)
	{
	for (i=0;i<Obj.length;i++){
		if (Obj.options[i].value==Val){
		Obj.options[i].selected=true;
		break;
		}
	}
	}
}
</script>
<table border="0" cellspacing="1" cellpadding="0"  align="center" class="indextableborder1">
<tr> 
<td class="tdtit" colspan="10"><?=$lang['list_str1']?></td>
</tr>
<form name="searchform" method="post" action="?action=search">
<tr>
	<td colspan="10" class="forumrow">
		&nbsp;<?=$lang['list_str2']?><input name="keyword" type="text" value="<?=$keyword?>" size="15" />
		<input name="Submit" type="submit" class="button" value="<?=$lang['list_str2_1']?>" />
		<select name="orders" id="orders" onchange='javascript:submit()'>
			<option value="0" selected><?=$lang['list_str2_2']?></option>
			<option value="1"><?=$lang['list_str2_3']?></option>
			<option value="2"><?=$lang['list_str2_4']?></option>
			<option value="3"><?=$lang['list_str2_5']?></option>
			<option value="4"><?=$lang['list_str2_6']?></option>
		</select>
		<script language="javascript">
		function setorders(ordernum){
			document.searchform.orders.options(ordernum).selected= true;
		}
		setorders(<?=$orders?>);
		</script>
	</td>
</tr>
</form>
<tr>
	<td height="25" class="forumrow">选项</td>
	<td height="25" class="forumrow"><b><?=$lang['list_str1_1']?></b></td>
	<td height="25" class="forumrow"><b><?=$lang['list_str1_2']?></b></td>
	<td height="25" class="forumrow"><b><?=$lang['list_str1_3']?></b></td>
	<td height="25" class="forumrow"><b><?=$lang['list_str1_4']?></b></td>
	<td height="25" class="forumrow"><b><?=$lang['list_str1_5']?></b></td>
	<td height="25" class="forumrow"><b><?=$lang['list_str1_6']?></b></td>
	<td height="25" class="forumrow"><b><?=$lang['list_str1_7']?></b></td>
	<td height="25" class="forumrow"><b><?=$lang['list_str1_8']?></b></td>
	<td height="25" class="forumrow"><b><?=$lang['list_str1_9']?></b></td>
</tr>


<form method="post" action="indivgroup.php?action=batchmodify" name="batchform">
  <?
		if(!empty($info_list)){
			if(is_array($info_list)){
				foreach($info_list as $info_val){
  ?>
	<tr>
		<td class="forumrow"><input type="checkbox" name="chkID[]" id="chkID" value="<?=$info_val['id']?>"/></td>
		<td class="forumrow" align="center"><a title="<?=$info_val['groupinfo']?>"><?=$info_val['groupname']?></a></td>
		<td class="forumrow"><a href="../dispuser.php?id=<?=$info_val['appuserid']?>" target="_blank"><?=$info_val['appusername']?></a></td>
		<td class="forumrow"><?=$info_val['usernum']?></td>
		<td class="forumrow"><?=$info_val['postnum']?></td>
		<td class="forumrow"><?=$info_val['topicnum']?></td>
		<td class="forumrow" align="center"><input type="text" name="limituser_<?=$info_val['id']?>" value="<?=$info_val['limituser']?>" size="8"/></td>
		<td class="forumrow"><?=$info_val['appdate']?></td>
		<td class="forumrow">
		<select size="1" name="GroupStats_<?=$info_val['id']?>">
			<option value="1"><?=$lang['item_type_1']?></option>
			<option value="2"><?=$lang['item_type_2']?></option>
			<option value="3"><?=$lang['item_type_3']?></option>
			<option value="0"><?=$lang['item_type_0']?></option>
		</select>
		<script language="javascript">ChkSelected(document.batchform.GroupStats_<?=$info_val['id']?>,'<?=$info_val['stats']?>');</script>
		</td>
		<td height="23" class="td1" align="right">
			<a href="indivgroup.php?groupid=<?=$info_val['id']?>&action=addedit&page=<?=$_GET['page']?>&keyword=<?=$keyword?>&orders=<?=$orders?>&<?=$QueryString?>"><?=$lang['sub_info4']?></a> | 
			<a href="indivgroup.php?groupid=<?=$info_val['id']?>&action=del&page=<?=$_GET['page']?>&keyword=<?=$keyword?>&orders=<?=$orders?>&<%=QueryString%>"><?=$lang['sub_info5']?></a> | 
			<a href="indivgroup.php?action=orders&groupword=<?=$info_val['groupname']?>"><?=$lang['sub_info2']?></a>
		</td>
	</tr>
  <?
	$offset++;
				}
			}
		}
  ?>
	<tr>
		<td colspan="10">
			<div style="margin-left:35px;">
			<input type="submit" name="Submit" value="<?=$lang['sub_info6']?>" onclick="return clicksubmit(this.form);" class="button"/>
			<input type="checkbox" name="mchkSelAll" id="mchkSelAll" value="on" onclick="SelectAllItems()" class="chkbox" />&nbsp;<?=$lang['sub_info3']?> 
			</div>
		</td>
	</tr>
</form>
	<tr>
		<td colspan="10" class="forumrow1">
			<? if($total>0)	
			  page_search($lang['page_info1'],$lang['page_info2'],'','','','','keyword',$keyword,'orders',$orders,'action','search');
			?>
		</td>
	</tr>
</table>
<div class="indextableborder1">
