관리자: 가변형으로 변경

This commit is contained in:
whitedot
2013-10-14 14:48:05 +09:00
parent 1192b139bd
commit cfd8db6b9e
49 changed files with 4033 additions and 3031 deletions

View File

@ -46,9 +46,7 @@ $from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$listall = '';
if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
$listall = '<a href="'.$_SERVER['PHP_SELF'].'">전체목록</a>';
$listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</a>';
$g5['title'] = '게시판관리';
include_once('./admin.head.php');
@ -56,73 +54,61 @@ include_once('./admin.head.php');
$colspan = 16;
?>
<form name="fsearch" id="fsearch" method="get">
<fieldset>
<legend>게시판 검색</legend>
<span>
<?php echo $listall ?>
생성된 게시판수 <?php echo number_format($total_count) ?>개
</span>
<select name="sfl" title="검색대상">
<option value="bo_table"<?php echo get_selected($_GET['sfl'], "bo_subject", true); ?>>TABLE</option>
<option value="bo_subject"<?php echo get_selected($_GET['sfl'], "bo_subject"); ?>>제목</option>
<option value="a.gr_id"<?php echo get_selected($_GET['sfl'], "a.gr_id"); ?>>그룹ID</option>
</select>
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
<input type="submit" value="검색" class="btn_submit">
</fieldset>
<div class="local_ov01 local_ov">
<?php echo $listall ?>
생성된 게시판수 <?php echo number_format($total_count) ?>개
</div>
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
<label for="sfl" class="sound_only">검색대상</label>
<select name="sfl">
<option value="bo_table"<?php echo get_selected($_GET['sfl'], "bo_subject", true); ?>>TABLE</option>
<option value="bo_subject"<?php echo get_selected($_GET['sfl'], "bo_subject"); ?>>제목</option>
<option value="a.gr_id"<?php echo get_selected($_GET['sfl'], "a.gr_id"); ?>>그룹ID</option>
</select>
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
<input type="submit" value="검색" class="btn_submit">
</form>
<section class="cbox">
<h2>생성된 게시판 목록</h2>
<p>여러개의 게시판 설정을 한번에 바꾸실 때는 게시판 체크기능을 이용하세요.</p>
<?php if ($is_admin == 'super') { ?>
<div class="btn_add01 btn_add">
<a href="./board_form.php" id="bo_add">게시판 추가</a>
</div>
<?php } ?>
<?php if ($is_admin == 'super') { ?>
<div class="btn_add sort_with">
<a href="./board_form.php" id="bo_add">게시판 추가</a>
</div>
<?php } ?>
<form name="fboardlist" id="fboardlist" action="./board_list_update.php" onsubmit="return fboardlist_submit(this);" method="post">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<ul class="sort_odr">
<li><?php echo subject_sort_link('a.gr_id') ?>그룹<span class="sound_only"> 순 정렬</span></a></li>
<li><?php echo subject_sort_link('bo_table') ?>TABLE<span class="sound_only"> 순 정렬</span></a></li>
<li><?php echo subject_sort_link('bo_skin', '', 'desc') ?>스킨<span class="sound_only"> 순 정렬</span></a></li>
<li><?php echo subject_sort_link('bo_mobile_skin', '', 'desc') ?>모바일<span class="sound_only"> 스킨 순 정렬</span></a></li>
<li><?php echo subject_sort_link('bo_subject') ?>제목<span class="sound_only"> 순 정렬</span></a></li>
<li><?php echo subject_sort_link('bo_use_sns') ?>SNS<span class="sound_only"> 순 정렬</span></a></li>
<li><?php echo subject_sort_link('bo_use_search') ?>검색사용<span class="sound_only"> 순 정렬</span></a></li>
<li><?php echo subject_sort_link('bo_show_menu') ?>메뉴보임<span class="sound_only"> 순 정렬</span></a></li>
<li><?php echo subject_sort_link('bo_order') ?>출력순서<span class="sound_only"> 순 정렬</span></a></li>
</ul>
<form name="fboardlist" id="fboardlist" action="./board_list_update.php" onsubmit="return fboardlist_submit(this);" method="post">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<table class="tbl_bo_list">
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col">
<label for="chkall" class="sound_only">게시판 전체</label>
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
</th>
<th scope="col">그룹</th>
<th scope="col">TABLE</th>
<th scope="col">스킨</th>
<th scope="col">모바일<br>스킨</th>
<th scope="col">제목</th>
<th scope="col"><?php echo subject_sort_link('a.gr_id') ?>그룹</a></th>
<th scope="col"><?php echo subject_sort_link('bo_table') ?>TABLE</a></th>
<th scope="col"><?php echo subject_sort_link('bo_skin', '', 'desc') ?>스킨</a></th>
<th scope="col"><?php echo subject_sort_link('bo_mobile_skin', '', 'desc') ?>모바일<br>스킨</span></a></th>
<th scope="col"><?php echo subject_sort_link('bo_subject') ?>제목</a></th>
<th scope="col">읽기P<span class="sound_only">포인트</span></th>
<th scope="col">쓰기P<span class="sound_only">포인트</span></th>
<th scope="col">댓글P<span class="sound_only">포인트</span></th>
<th scope="col">다운P<span class="sound_only">포인트</span></th>
<th scope="col">SNS<br>사용</th>
<th scope="col">검색<br>사용</th>
<th scope="col">메뉴<br>보임</th>
<th scope="col">출력<br>순서</th>
<th scope="col"><?php echo subject_sort_link('bo_use_sns') ?>SNS<br>사용</a></th>
<th scope="col"><?php echo subject_sort_link('bo_use_search') ?>검색<br>사용</a></th>
<th scope="col"><?php echo subject_sort_link('bo_show_menu') ?>메뉴<br>보임</a></th>
<th scope="col"><?php echo subject_sort_link('bo_order') ?>출력<br>순서</a></th>
<th scope="col">접속기기</th>
<th scope="col">관리</th>
</tr>
@ -132,10 +118,12 @@ $colspan = 16;
for ($i=0; $row=sql_fetch_array($result); $i++) {
$one_update = '<a href="./board_form.php?w=u&amp;bo_table='.$row['bo_table'].'&amp;'.$qstr.'">수정</a>';
$one_copy = '<a href="./board_copy.php?bo_table='.$row['bo_table'].'" class="board_copy" target="win_board_copy">복사</a>';
$tr_bg = $i%2 ? 'class="tr_bg1"' : 'class="tr_bg0"';
?>
<tr>
<td>
<tr<?php echo ' '.$tr_bg; ?>>
<td class="td_chk">
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo get_text($row['bo_subject']) ?></label>
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
</td>
@ -146,33 +134,66 @@ $colspan = 16;
<input type="hidden" name="gr_id[<?php echo $i ?>]" value="<?php echo $row['gr_id'] ?>"><?php echo $row['gr_subject'] ?>
<?php } ?>
</td>
<td class="td_boid">
<td>
<input type="hidden" name="board_table[<?php echo $i ?>]" value="<?php echo $row['bo_table'] ?>">
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $row['bo_table'] ?>"><?php echo $row['bo_table'] ?></a>
</td>
<td>
<label for="bo_skin_<?php echo $i; ?>" class="sound_only">모바일 스킨</label>
<?php echo get_skin_select('board', 'bo_skin_'.$i, "bo_skin[$i]", $row['bo_skin']); ?>
</td>
<td>
<label for="bo_mobile_skin_<?php echo $i; ?>" class="sound_only">모바일 스킨</label>
<?php echo get_mobile_skin_select('board', 'bo_mobile_skin_'.$i, "bo_mobile_skin[$i]", $row['bo_mobile_skin']); ?>
</td>
<td><input type="text" name="bo_subject[<?php echo $i ?>]" value="<?php echo get_text($row['bo_subject']) ?>" id="bo_subject[<?php echo $i ?>]" title="게시판제목" class="required frm_input" size="10" required="required"></td>
<td><input type="text" name="bo_read_point[<?php echo $i ?>]" value="<?php echo $row['bo_read_point'] ?>" title="읽기포인트" class="frm_input" size="2"></td>
<td><input type="text" name="bo_write_point[<?php echo $i ?>]" value="<?php echo $row['bo_write_point'] ?>" title="쓰기포인트" class="frm_input" size="2"></td>
<td><input type="text" name="bo_comment_point[<?php echo $i ?>]" value="<?php echo $row['bo_comment_point'] ?>" title="댓글포인트" class="frm_input" size="2"></td>
<td><input type="text" name="bo_download_point[<?php echo $i ?>]" value="<?php echo $row['bo_download_point'] ?>" title="다운포인트" class="frm_input" size="2"></td>
<td><input type="checkbox" name="bo_use_sns[<?php echo $i ?>]" value="1" id="bo_use_sns<?php echo $i ?>" <?php echo $row['bo_use_sns']?"checked":"" ?> title="선택시 SNS 사용"></td>
<td><input type="checkbox" name="bo_use_search[<?php echo $i ?>]" value="1" id="bo_use_search_<?php echo $i ?>" <?php echo $row['bo_use_search']?"checked":"" ?> title="선택시 검색사용"></td>
<td><input type="checkbox" name="bo_show_menu[<?php echo $i ?>]" value="1" id="bo_show_menu_<?php echo $i ?>" <?php echo $row['bo_show_menu']?"checked":"" ?> title="선택시 메뉴보이기"></td>
<td><input type="text" name="bo_order[<?php echo $i ?>]" value="<?php echo $row['bo_order'] ?>" id="bo_order<?php echo $i ?>" title="출력순서" class="frm_input" size="2"></td>
<td>
<select name="bo_device[<?php echo $i ?>]" id="bo_device_<?php echo $i ?>" title="접속기기 선택">
<label for="bo_subject_<?php echo $i; ?>" class="sound_only">게시판 제목</label>
<input type="text" name="bo_subject[<?php echo $i ?>]" value="<?php echo get_text($row['bo_subject']) ?>" id="bo_subject_<?php echo $i ?>" required class="required frm_input" size="10">
</td>
<td>
<label for="" class="sound_only">읽기 포인트</label>
<input type="text" name="bo_read_point[<?php echo $i ?>]" value="<?php echo $row['bo_read_point'] ?>" id="bo_read_point_<?php echo $i; ?>" class="frm_input" size="2">
</td>
<td>
<label for="" class="sound_only">쓰기 포인트</label>
<input type="text" name="bo_write_point[<?php echo $i ?>]" value="<?php echo $row['bo_write_point'] ?>" id="bo_write_point_<?php echo $i; ?>" class="frm_input" size="2">
</td>
<td>
<label for="" class="sound_only">댓글 포인트</label>
<input type="text" name="bo_comment_point[<?php echo $i ?>]" value="<?php echo $row['bo_comment_point'] ?>" id="bo_comment_point_<?php echo $i; ?>" class="frm_input" size="2">
</td>
<td>
<label for="" class="sound_only">다운 포인트</label>
<input type="text" name="bo_download_point[<?php echo $i ?>]" value="<?php echo $row['bo_download_point'] ?>" id="bo_download_point_<?php echo $i; ?>" class="frm_input" size="2">
</td>
<td class="td_chk">
<label for="bo_use_sns_<?php echo $i; ?>" class="sound_only">SNS 사용</label>
<input type="checkbox" name="bo_use_sns[<?php echo $i ?>]" value="1" id="bo_use_sns_<?php echo $i ?>" <?php echo $row['bo_use_sns']?"checked":"" ?>>
</td>
<td class="td_chk">
<label for="bo_use_search_<?php echo $i; ?>" class="sound_only">검색 사용</label>
<input type="checkbox" name="bo_use_search[<?php echo $i ?>]" value="1" id="bo_use_search_<?php echo $i ?>" <?php echo $row['bo_use_search']?"checked":"" ?>>
</td>
<td class="td_chk">
<label for="bo_show_menu_<?php echo $i; ?>" class="sound_only">메인메뉴 보이기</label>
<input type="checkbox" name="bo_show_menu[<?php echo $i ?>]" value="1" id="bo_show_menu_<?php echo $i ?>" <?php echo $row['bo_show_menu']?"checked":"" ?>>
</td>
<td class="td_chk">
<label for="bo_order_<?php echo $i; ?>" class="sound_only">출력 순서</label>
<input type="text" name="bo_order[<?php echo $i ?>]" value="<?php echo $row['bo_order'] ?>" id="bo_order_<?php echo $i ?>" class="frm_input" size="2">
</td>
<td class="td_mngsmall">
<label for="bo_device_<?php echo $i; ?>" class="sound_only">접속기기</label>
<select name="bo_device[<?php echo $i ?>]" id="bo_device_<?php echo $i ?>">
<option value="both"<?php echo get_selected($row['bo_device'], 'both', true); ?>>모두</option>
<option value="pc"<?php echo get_selected($row['bo_device'], 'pc'); ?>>PC</option>
<option value="mobile"<?php echo get_selected($row['bo_device'], 'mobile'); ?>>모바일</option>
</select>
</td>
<td><?php echo $one_update ?> <?php echo $one_copy ?></td>
<td class="td_mngsmall">
<?php echo $one_update ?>
<?php echo $one_copy ?>
</td>
</tr>
<?php
}
@ -181,16 +202,16 @@ $colspan = 16;
?>
</tbody>
</table>
</div>
<div class="btn_list">
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value">
<?php if ($is_admin == 'super') { ?>
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
<?php } ?>
</div>
<div class="btn_list01 btn_list">
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value">
<?php if ($is_admin == 'super') { ?>
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
<?php } ?>
</div>
</form>
</section>
</form>
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['PHP_SELF'].'?'.$qstr.'&amp;page='); ?>