<?php
	//引入语言包
	$g_langpackage=new grouplp;
	
	//引入公共模块
	require("foundation/module_mypals.php");
	
	//变量区
	$group_creat=get_sess_cgroup();
	$user_id=get_sess_userid();
	
	//数据表定义区
	$t_group_member=$tablePreStr."group_members";
	$t_group=$tablePreStr."groups";
	
	//定义读取操作
	dbtarget('r',$dbServs);
	$dbo=new dbex;
	$sql="SELECT gm.user_name,gm.user_id,gm.user_sex,gm.add_time,gs.group_name,gm.group_id FROM `$t_group_member` as gm join `$t_group` as gs on (gm.group_id=gs.group_id) WHERE (INSTR(gs.group_manager_id,',$user_id,')>0 or gs.add_userid='$user_id') AND gm.state='0' order by gs.group_name";
	$my_group=$dbo->getRs($sql);
	
	//没有数据自动跳转
	if(empty($my_group)){
		echo "<script type='text/javascript'>window.location.href='?app=start';</script>";
}

?>
