<?php 	if(! function_exists('check_session')){ die(); } ?>
<table>
	<tr>
		<td class="notice" style="text-align: right;padding-right: 5px;font-size: 9pt">
		<?php $permission	= $GLOBALS['permission'];
		if($permission['top_man'] == 1 OR $permission['allowed_sections'] == 'all'){ ?>
		<strong>إظهار أعضاء مجموعة محددة</strong> : <br />
		- <a href="members.php?step=control&do=">الكل</a>
		<?php while($srow	= mysql_fetch_array($GLOBALS['groups_query'])){ ?>
		- <a href="members.php?step=control&do=group&group_id=<?= $srow['id'] ?>"><?= $srow['name']; ?></a>
		<? } } ?>
		<hr style="border: 1px dotted silver;width: 100%" />
		عدد النتائج : <?= $GLOBALS['num']; ?> // ممجموع عدد الأعضاء : <?= $GLOBALS['all']['num']; ?>
		</td>
	</tr>
</table>
<table>
	<tr>
		<td class="head">إدارة الأعضاء</td>
	</tr>
</table>
<?php if($GLOBALS['num'] > 0){ ?>
		<form action="members.php?step=delete_group&to=members.php?step=control[and]page=<?= $_GET['page'] ?>[and]do=<?= $_GET['do']; ?>" method="post">
<table>
	<tr>
		<td style="width: 400px" class="rightc_table">اسم المستخدم</td>
		<td style="width: 200px" class="leftc_table">المجموعة</td>
		<td style="width: 200px" class="leftc_table">تاريخ التسجيل</td>
		<td style="width: 60px" class="rightc_table">تعديل</td>
		<td style="width: 60px" class="rightc_table">حذف</td>
	</tr>
	<?php while($rows	= mysql_fetch_array($GLOBALS['query'])){ ?>
	<tr>
		<td style="width: 400px" class="rightcd_table">
		<a href="members.php?step=edit&id=<?= $rows['id']; ?>&to=members.php?step=control[and]page=<?= $_GET['page']?>[and]do=<?= $_GET['do']?>">
		<?= $rows['username'];?></a>
		</td>
		<td style="width: 200px;text-align:center" class="leftcd_table">
			<?php
			get_groupinfo($rows['group_id'],'`id`,`name`');
			$group	 = $GLOBALS['ginfo'];
			?>
			<a href="groups.php?step=edit&id=<?= $group['id']; ?>&to=members.php?step=control[and]page=<?= $_GET['page']?>[and]do=<?= $_GET['do']?>"><?= $group['name']; ?></a>
		</td>
		<td style="width: 200px" class="leftcd_table" style="text-align: center">
		<?= $rows['reg_date']; ?>
		</td>
		<td style="width: 60px" class="rightcd_table" style="text-align: center">
			<a href="members.php?step=edit&id=<?= $rows['id'] ?>&to=members.php?step=control[and]page=<?= $_GET['page'] ?>[and]do=<?= $_GET['do']; ?>">تعديل</a>
		</td>
		<td style="width: 60px" class="rightcd_table" style="text-align: center">
		<?php 
		if(! in_array($rows['id'],$GLOBALS['undelete'])){ ?>
		<input type="checkbox" name="id[]" value="<?= $rows['id']; ?>" /> 
		<?php } ?>
		</td>
	</tr>
	<? } ?>
</table>
<?php }else{ ?>
<div class="error">لايوجد نتائج لهذه المعطيات</div>
<?php } ?>
		