<?php
/*
 * 注意：此文件由tpl_engine编译型模板引擎编译生成。
 * 如果您的模板要进行修改，请修改 templates/default/modules/group/group_remind_member.html
 * 如果您的模型要进行修改，请修改 models/modules/group/group_remind_member.php
 *
 * 修改完成之后需要您进入后台重新编译，才会重新生成。
 * 如果您开启了debug模式运行，那么您可以省去上面这一步，但是debug模式每次都会判断程序是否更新，debug模式只适合开发调试。
 * 如果您正式运行此程序时，请切换到service模式运行！
 * 
 * 如有您有问题请到官方论坛（http://tech.jooyea.com/bbs/）提问，谢谢您的支持。
 */
?><?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>";
}

?>

<!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">
<title></title>
<link rel="stylesheet" type="text/css" href="skin/<?php echo $skinUrl;?>/css/row_menus.css">
<link rel="stylesheet" type="text/css" href="skin/<?php echo $skinUrl;?>/css/iframe.css">
</head>
<body>

<div class='container'>
	<div class='rs_head'><?php echo $g_langpackage->g_req_member;?></div>
</div>

<table class='main'>
	<tr>
		<th><?php echo $g_langpackage->g_name;?></th>
		<th><?php echo $g_langpackage->g_m_name;?></th>
		<th><?php echo $g_langpackage->g_sex;?></th>
		<th><?php echo $g_langpackage->g_r_time;?></th>
		<th><?php echo $g_langpackage->g_ctrl;?></th>
	</tr>
	
	<?php foreach($my_group as $rs){?>

	<tr>
		
		<td>
			<a href="?app=group_space&group_id=<?php echo $rs['group_id'];?>" target="_self"><?php echo $rs['group_name'];?></a>
		</td>
		
		<td>
			<a href="home.php?h=<?php echo $rs['user_id'];?>" target="_blank"><?php echo $rs['user_name'];?></a>
		</td>
		
		<td>
			<?php echo get_pals_sex($rs['user_sex']);?>
		</td>
		
		<td width="130px">
			<?php echo $rs['add_time'];?>
		</td>
		
		<td>
			<a href='do.php?act=group_approve&userid=<?php echo $rs['user_id'];?>&group_id=<?php echo $rs["group_id"];?>&type=remind'><?php echo $g_langpackage->g_check;?></a>&nbsp|&nbsp
			<a href='do.php?act=group_del_req&userid=<?php echo $rs['user_id'];?>&group_id=<?php echo $rs["group_id"];?>&type=remind'><?php echo $g_langpackage->g_del;?></a>&nbsp|&nbsp
			<a href="home.php?h=<?php echo $rs['user_id'];?>" target="_blank"><?php echo $g_langpackage->g_examine;?></a>
		</td>
	</tr>
	
	<?php }?>
	
</body> 
</html>