Files
dnssash/adm/rb/module_list.php
2026-06-11 18:47:38 +09:00

75 lines
2.3 KiB
PHP

<?php
$sub_menu = '000200';
include_once('./_common.php');
auth_check_menu($auth, $sub_menu, "r");
$g5['title'] = '모듈 관리';
include_once(G5_ADMIN_PATH.'/admin.head.php');
// 💡 [최종 수정] 버튼을 가로로 정렬하기 위한 스타일 추가
?>
<style>
.td_mng_s .btn {
display: inline-block;
margin: 0 2px;
vertical-align: middle;
}
</style>
<?php
$table_name = (isset($_GET['tables']) && $_GET['tables']) ? $_GET['tables'] : 'rb_module';
// SQL 쿼리
$sql = "SELECT * FROM {$table_name} where md_theme = '{$config['cf_theme']}' ORDER BY md_id DESC";
$result = sql_query($sql);
?>
<div class="local_ov01 local_ov">
<span class="btn_ov01"><span class="ov_txt"> 전체 모듈 수</span><span class="ov_num"> <?php echo sql_num_rows($result); ?>개</span></span>
</div>
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $g5['title']; ?> 목록</caption>
<thead>
<tr>
<th scope="col">ID</th>
<th scope="col">타이틀</th>
<th scope="col">타입</th>
<th scope="col">레이아웃</th>
<th scope="col">관리</th>
</tr>
</thead>
<tbody>
<?php
for ($i=0; $row=sql_fetch_array($result); $i++) {
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $bg; ?>">
<td class="td_num"><?php echo $row['md_id'] ?></td>
<td class="td_left"><?php echo get_text($row['md_title']) ?></td>
<td class="td_left"><?php echo get_text($row['md_type']) ?></td>
<td class="td_left"><?php echo get_text($row['md_layout']) ?></td>
<td class="td_mng td_mng_s">
<a href="./module_form.php?w=u&amp;md_id=<?php echo $row['md_id']; ?>&amp;tables=<?php echo $table_name; ?>&amp;<?php echo $qstr; ?>" class="btn btn_03">수정</a>
<a href="./moduleformupdate.php?w=d&amp;md_id=<?php echo $row['md_id']; ?>&amp;tables=<?php echo $table_name; ?>&amp;<?php echo $qstr; ?>" onclick="return delete_confirm(this);" class="btn btn_02">삭제</a>
</td>
</tr>
<?php
}
if ($i == 0)
echo '<tr><td colspan="5" class="empty_table">자료가 없습니다.</td></tr>';
?>
</tbody>
</table>
</div>
<div class="btn_fixed_top">
<a href="./module_form.php?tables=<?php echo $table_name; ?>" class="btn btn_01">모듈 추가</a>
</div>
<?php
include_once(G5_ADMIN_PATH.'/admin.tail.php');
?>