<? if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 ?>

<table border=0 class="admin_head">
<tr>
<th><h2 class="sub_title left">▶ 일반 관리</h2></th>
<td><?=$amina_btn?></td>
</tr>
</table>

<table border=0 class="admin_tbl">
<colgroup>
	<col class="w120">
	<col class="w120">
	<col class="w120">
	<col>
</colgroup>
<tr>
<th>경험치</th>
<th>설정값</th>
<th>썸네일</th>
<th>&nbsp;</th>
</tr>
<tr>
<td align=center>
	<input type="button" value="일괄산출" onclick="amina_win('<?=AMINA_URL?>/reset.exp.php?bo_table=<?=$bo_table?>');" class="btn_red">
</td>
<td align=center>
	<input type="button" value="일괄정리" onclick="amina_win('<?=AMINA_URL?>/reset.set.php?bo_table=<?=$bo_table?>');" class="btn_blue">
</td>
<td align=center>
	<input type="button" value="일괄삭제" onclick="amina_win('<?=AMINA_URL?>/reset.thumb.php?bo_table=<?=$bo_table?>');" class="btn_red">
</td>
<th>&nbsp;</th>
</tr>
</table>

<table border=0 class="admin_head">
<tr>
<th><h2 class="sub_title left">▶ 기능 설정 DB 관리</h2></th>
<td>&nbsp;</td>
</tr>
</table>

<table border=0 class="admin_tbl">
<colgroup>
	<col class="w120">
	<col>
	<col class="w80">
	<col class="w80">
</colgroup>
<tr>
<th>게시판 ID</th>
<th>&nbsp;</th>
<th>&nbsp;</th>
<th>&nbsp;</th>
</tr>
<? 
	$result = sql_query(" select * from {$g4['amina']} order by bo_table "); 
	$i = 0;
	while ($row = sql_fetch_array($result)) { 
		$bg = $i%2 ? '' : ' class="bg_gray"';
		echo "<tr".$bg.">";
		echo "<td>".$row['bo_table']."</td>";
		echo "<td>&nbsp;</td>";
		echo "<td><a href=\"".G4_ADMIN_URL."/amina.admin.php?loc=func&bo_table=".$row['bo_table']."\">수정</a></td>";
		echo "<td><a href=\"".AMINA_URL."/admin.update.php?loc=ma&type=func&bo_table=".$bo_table."&id=".$row['id']."\">삭제</a></td>";
		echo "</tr>\n";
		$i++;
	}
?>
</table>

<table border=0 class="admin_head">
<tr>
<th><h2 class="sub_title left">▶ 스킨 설정 DB 관리</h2></th>
<td>&nbsp;</td>
</tr>
</table>

<table border=0 class="admin_tbl">
<colgroup>
	<col class="w80">
	<col class="w120">
	<col class="w160">
	<col>
	<col class="w80">
	<col class="w80">
</colgroup>
<tr>
<th>&nbsp;</th>
<th>게시판 ID</th>
<th>카테고리</th>
<th>&nbsp;</th>
<th>&nbsp;</th>
<th>&nbsp;</th>
</tr>
<? 
	$result = sql_query(" select * from {$g4['amina_skin']} order by bo_table, skin_type, sca desc "); 
	$i = 0;
	while ($row = sql_fetch_array($result)) { 
		$bg = $i%2 ? '' : ' class="bg_gray"';
		$c_type = $row['sca'] ? $row['sca'] : '전체(공통)';
		if($row['skin_type'] > 1) { //PC
			$s_type = '모바일';
			$l_type = 'm';
		} else {
			$s_type = 'PC';
			$l_type = 'pc';
		}
		echo "<tr".$bg.">";
		echo "<td>".$s_type."</td>";
		echo "<td>".$row['bo_table']."</td>";
		echo "<td>".$c_type."</td>";
		echo "<td>&nbsp;</td>";
		echo "<td><a href=\"".G4_ADMIN_URL."/amina.admin.php?loc=".$l_type."&bo_table=".$row['bo_table']."&sca=".urlencode($row['sca'])."\">수정</a></td>";
		echo "<td><a href=\"".AMINA_URL."/admin.update.php?loc=ma&type=skin&bo_table=".$bo_table."&id=".$row['id']."\">삭제</a></td>";
		echo "</tr>\n";
		$i++;
	}
?>
</table>

<table border=0 class="admin_head no_margin">
<tr>
<th> </th>
<td><?=$amina_btn?></td>
</tr>
</table>
