관리자: 기본환경설정, 관리권한설정, 회원관리 cbox

This commit is contained in:
whitedot
2013-02-15 09:55:23 +09:00
parent a89eeb346e
commit 8c4a21a271
4 changed files with 661 additions and 639 deletions

View File

@ -103,125 +103,122 @@ $colspan = 15;
</div>
<?}?>
<form id="fmemberlist" name="fmemberlist" method="post" action="./member_list_update.php" onsubmit="return fmemberlist_submit(this);">
<input type="hidden" name="sst" value='<?=$sst?>'>
<input type="hidden" name="sod" value='<?=$sod?>'>
<input type="hidden" name="sfl" value='<?=$sfl?>'>
<input type="hidden" name="stx" value='<?=$stx?>'>
<input type="hidden" name="page" value='<?=$page?>'>
<section class="cbox">
<h2>회원 목록</h2>
<p>회원자료 삭제 시 다른 회원이 기존 회원아이디를 사용하지 못하도록 회원아이디, 이름, 별명은 삭제하지 않고 영구 보관합니다.</p>
<table class="tbl_mb_list">
<caption>
회원 목록
<p>
회원자료 삭제 시 다른 회원이 기존 회원아이디를 사용하지 못하도록 회원아이디, 이름, 별명은 삭제하지 않고 영구 보관합니다.
</p>
</caption>
<thead>
<tr>
<th scope="col"><label for="chkall">전체</label><br><input type="checkbox" id="chkall" name="chkall" value="1" title="현재 페이지 회원 전체선택" onclick="check_all(this.form)"></th>
<th scope="col"><?=subject_sort_link('mb_id')?>회원아이디</a></th>
<th scope="col"><?=subject_sort_link('mb_nick')?>별명</a></th>
<th scope="col"><?=subject_sort_link('mb_name')?>이름</a></th>
<th scope="col"><?=subject_sort_link('mb_level', '', 'desc')?>권한</a></th>
<th scope="col"><?=subject_sort_link('mb_point', '', 'desc')?> 포인트</a></th>
<th scope="col"><?=subject_sort_link('mb_today_login', '', 'desc')?>최종접속</a></th>
<th scope="col"><?=subject_sort_link('mb_mailling', '', 'desc')?>수신</a></th>
<th scope="col"><?=subject_sort_link('mb_open', '', 'desc')?>공개</a></th>
<th scope="col"><?=subject_sort_link('mb_email_certify', '', 'desc')?>인증</a></th>
<th scope="col"><?=subject_sort_link('mb_intercept_date', '', 'desc')?>차단</a></th>
<th scope="col">그룹</th>
<th scope="col">관리</th>
</tr>
</thead>
<tbody>
<?
for ($i=0; $row=sql_fetch_array($result); $i++) {
// 접근가능한 그룹수
$sql2 = " select count(*) as cnt from {$g4['group_member_table']} where mb_id = '{$row['mb_id']}' ";
$row2 = sql_fetch($sql2);
$group = '';
if ($row2['cnt'])
$group = '<a href="./boardgroupmember_form.php?mb_id='.$row['mb_id'].'">'.$row2['cnt'].'</a>';
<form id="fmemberlist" name="fmemberlist" method="post" action="./member_list_update.php" onsubmit="return fmemberlist_submit(this);">
<input type="hidden" name="sst" value="<?=$sst?>">
<input type="hidden" name="sod" value="<?=$sod?>">
<input type="hidden" name="sfl" value="<?=$sfl?>">
<input type="hidden" name="stx" value="<?=$stx?>">
<input type="hidden" name="page" value="<?=$page?>">
if ($is_admin == 'group')
{
$s_mod = '';
$s_del = '';
<table class="tbl_mb_list">
<thead>
<tr>
<th scope="col"><input type="checkbox" id="chkall" name="chkall" value="1" title="현재 페이지 회원 전체선택" onclick="check_all(this.form)"></th>
<th scope="col"><?=subject_sort_link('mb_id')?>회원아이디</a></th>
<th scope="col"><?=subject_sort_link('mb_nick')?>별명</a></th>
<th scope="col"><?=subject_sort_link('mb_name')?>이름</a></th>
<th scope="col"><?=subject_sort_link('mb_level', '', 'desc')?>권한</a></th>
<th scope="col"><?=subject_sort_link('mb_point', '', 'desc')?> 포인트</a></th>
<th scope="col"><?=subject_sort_link('mb_today_login', '', 'desc')?>최종접속</a></th>
<th scope="col"><?=subject_sort_link('mb_mailling', '', 'desc')?>수신</a></th>
<th scope="col"><?=subject_sort_link('mb_open', '', 'desc')?>공개</a></th>
<th scope="col"><?=subject_sort_link('mb_email_certify', '', 'desc')?>인증</a></th>
<th scope="col"><?=subject_sort_link('mb_intercept_date', '', 'desc')?>차단</a></th>
<th scope="col">그룹</th>
<th scope="col">관리</th>
</tr>
</thead>
<tbody>
<?
for ($i=0; $row=sql_fetch_array($result); $i++) {
// 접근가능한 그룹수
$sql2 = " select count(*) as cnt from {$g4['group_member_table']} where mb_id = '{$row['mb_id']}' ";
$row2 = sql_fetch($sql2);
$group = '';
if ($row2['cnt'])
$group = '<a href="./boardgroupmember_form.php?mb_id='.$row['mb_id'].'">'.$row2['cnt'].'</a>';
if ($is_admin == 'group')
{
$s_mod = '';
$s_del = '';
}
else
{
$s_mod = '<a href="./member_form.php?'.$qstr.'&amp;w=u&amp;mb_id='.$row['mb_id'].'">수정</a>';
$s_del = '<a href="javascript:post_delete(\'member_delete.php\', \''.$row['mb_id'].'\');">삭제</a>';
}
$s_grp = '<a href="./boardgroupmember_form.php?mb_id='.$row['mb_id'].'">그룹</a>';
$leave_date = $row['mb_leave_date'] ? $row['mb_leave_date'] : date('Ymd', $g4['server_time']);
$intercept_date = $row['mb_intercept_date'] ? $row['mb_intercept_date'] : date('Ymd', $g4['server_time']);
$mb_nick = get_sideview($row['mb_id'], $row['mb_nick'], $row['mb_email'], $row['mb_homepage']);
$mb_id = $row['mb_id'];
$leave_msg = '';
$intercept_msg = '';
$intercept_title = '';
if ($row['mb_leave_date']) {
$mb_id = $mb_id;
$leave_msg = '탈퇴함';
}
else if ($row['mb_intercept_date']) {
$mb_id = $mb_id;
$intercept_msg = '차단됨';
$intercept_title = '차단해제';
}
if ($intercept_title == '')
$intercept_title = '차단하기';
?>
<tr>
<td class="td_chk">
<input type="hidden" id="mb_id_<?=$i?>" name="mb_id[<?=$i?>]" value="<?=$row['mb_id']?>">
<input type="checkbox" id="chk_<?=$i?>" name="chk[]" value="<?=$i?>" title="회원선택">
</td>
<td class="td_mbid">
<?=$mb_id?>
<span><?=$leave_msg?><?=$intercept_msg?></span>
</td>
<td class="td_name"><div><?=$mb_nick?></div></td>
<td class="td_mbname"><?=$row['mb_name']?></td>
<td><?=get_member_level_select("mb_level[$i]", 1, $member['mb_level'], $row['mb_level'])?></td>
<td><a href="point_list.php?sfl=mb_id&amp;stx=<?=$row['mb_id']?>"><?=number_format($row['mb_point'])?></a></td>
<td><?=substr($row['mb_today_login'],2,8)?></td>
<td><?=$row['mb_mailling']?'예':'아니오';?></td>
<td><?=$row['mb_open']?'예':'아니오';?></td>
<td><?=preg_match('/[1-9]/', $row['mb_email_certify'])?'예':'아니오';?></td>
<td class="td_chk">
<? if(empty($row['mb_leave_date'])){?>
<input type="checkbox" id="mb_intercept_date_<?=$i?>" name="mb_intercept_date[<?=$i?>]" <?=$row['mb_intercept_date']?'checked':'';?> value="<?=$intercept_date?>" title="<?=$intercept_title?>">
<?}?>
</td>
<td class="td_chk"><?=$group?></td>
<td><?=$s_mod?> <?=$s_del?> <?=$s_grp?></td>
</tr>
<?
}
else
{
$s_mod = '<a href="./member_form.php?'.$qstr.'&amp;w=u&amp;mb_id='.$row['mb_id'].'">수정</a>';
$s_del = '<a href="javascript:post_delete(\'member_delete.php\', \''.$row['mb_id'].'\');">삭제</a>';
}
$s_grp = '<a href="./boardgroupmember_form.php?mb_id='.$row['mb_id'].'">그룹</a>';
if ($i == 0)
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
?>
</table>
$leave_date = $row['mb_leave_date'] ? $row['mb_leave_date'] : date('Ymd', $g4['server_time']);
$intercept_date = $row['mb_intercept_date'] ? $row['mb_intercept_date'] : date('Ymd', $g4['server_time']);
<div class="btn_list">
<input type="submit" name="btn_submit" onclick="document.pressed=this.value" value="선택수정">
<input type="submit" name="btn_submit" onclick="document.pressed=this.value" value="선택삭제">
<? if ($is_admin == 'super') {?><a href="./member_form.php">회원추가</a><?}?>
</div>
$mb_nick = get_sideview($row['mb_id'], $row['mb_nick'], $row['mb_email'], $row['mb_homepage']);
</form>
</section>
$mb_id = $row['mb_id'];
$leave_msg = '';
$intercept_msg = '';
$intercept_title = '';
if ($row['mb_leave_date']) {
$mb_id = $mb_id;
$leave_msg = '탈퇴함';
}
else if ($row['mb_intercept_date']) {
$mb_id = $mb_id;
$intercept_msg = '차단됨';
$intercept_title = '차단해제';
}
if ($intercept_title == '')
$intercept_title = '차단하기';
?>
<tr>
<td class="td_chk">
<input type="hidden" id="mb_id_<?=$i?>" name="mb_id[<?=$i?>]" value="<?=$row['mb_id']?>">
<input type="checkbox" id="chk_<?=$i?>" name="chk[]" value="<?=$i?>" title="회원선택">
</td>
<td class="td_mbid">
<?=$mb_id?>
<span><?=$leave_msg?><?=$intercept_msg?></span>
</td>
<td class="td_name"><div><?=$mb_nick?></div></td>
<td class="td_mbname"><?=$row['mb_name']?></td>
<td><?=get_member_level_select("mb_level[$i]", 1, $member['mb_level'], $row['mb_level'])?></td>
<td><a href="point_list.php?sfl=mb_id&amp;stx=<?=$row['mb_id']?>"><?=number_format($row['mb_point'])?></a></td>
<td><?=substr($row['mb_today_login'],2,8)?></td>
<td><?=$row['mb_mailling']?'예':'아니오';?></td>
<td><?=$row['mb_open']?'예':'아니오';?></td>
<td><?=preg_match('/[1-9]/', $row['mb_email_certify'])?'예':'아니오';?></td>
<td class="td_chk">
<? if(empty($row['mb_leave_date'])){?>
<input type="checkbox" id="mb_intercept_date_<?=$i?>" name="mb_intercept_date[<?=$i?>]" <?=$row['mb_intercept_date']?'checked':'';?> value="<?=$intercept_date?>" title="<?=$intercept_title?>">
<?}?>
</td>
<td class="td_chk"><?=$group?></td>
<td><?=$s_mod?> <?=$s_del?> <?=$s_grp?></td>
</tr>
<?
}
if ($i == 0)
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
?>
</table>
<div class="btn_list">
<input type="submit" name="btn_submit" onclick="document.pressed=this.value" value="선택수정">
<input type="submit" name="btn_submit" onclick="document.pressed=this.value" value="선택삭제">
<? if ($is_admin == 'super') {?><a href="./member_form.php">회원추가</a><?}?>
</div>
<?
echo get_paging($config['cf_write_pages'], $page, $total_page, '?'.$qstr.'&amp;page=');
?>
</form>
<?=get_paging($config['cf_write_pages'], $page, $total_page, '?'.$qstr.'&amp;page=');?>
<script>
<?