<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("$g4[path]/lib/outlogin.lib.php");
include_once("$g4[path]/lib/poll.lib.php");
include_once("$g4[path]/lib/visit.lib.php");
include_once("$g4[path]/lib/connect.lib.php");
include_once("$g4[path]/lib/popular.lib.php");

// $board[shop]; 




  $mct     =  "  po_poll1 = 'skin'  ";  
  $mct    .=  " and po_poll2 = '$url' "; 
  $site_bill = sql_fetch("select * from $board[shop] where  $mct");

  if(!$out_row)
    $set_skin = 'basic';

  $colspan = 2;
  $right_width =$site_bill[po_poll5] - $site_bill[po_poll6] - $site_bill[po_poll7] - $site_bill[po_poll8] - $site_bill[po_poll9];

?>

<table width=100% cellpadding=0 cellspacing=1>
<tr><td colspan='<?=$colspan?>' class='line1'></td></tr>

<form action="<?=$shop_path?>/skin.update.php?act=<?=$url?>" method=post enctype="multipart/form-data">

<input type=hidden name=po_poll1   value="skin">

<tr><td colspan='<?=$colspan?>' style='padding-left:10px; height:30px;'><b><?=$url?></b></td></tr>
<tr><td colspan='<?=$colspan?>' class='line2'></td></tr>
<tr><td width="120" style='padding-left:10px; height:30px;'>스킨선택</td>
    <td style='padding-left:10px;'><select name="po_poll3" value="<?=$site_bill[po_poll3]?>" >
<?
$skin_path  = "../skin";
$skin_path .= "/$url/";  // 목록스킨을 지정합니다.
$arr = shop_file("$skin_path");
for ($k=0; $k<count($arr); $k++){
   $option = $arr[$k];
   if (strlen($option) > 10)
   $option = substr($arr[$k], 0, 25) . "";
   echo '<option value="';
   echo $arr[$k];
   echo '"';
   if ($arr[$k] == $site_bill[po_poll3])
   echo 'selected';
   echo '>';
   echo  $option;
   echo "\n"; 
   }  
?>    
</select>
</td></tr>

<tr><td width="120" style='padding-left:10px; height:30px;'>위치설정</td>
    <td style='padding-left:10px;'>
        <select class=ed name=po_poll4 id='po_poll4'>
        <option value="left">left</option>
        <option value="center">center</option>
		<option value="right">right</option>
        &nbsp;<?=help("'체크박스'는 글작성시 비밀글 체크가 가능합니다.\n\n'무조건'은 작성되는 모든글을 비밀글로 작성합니다. (관리자는 체크박스로 출력합니다.)\n\n스킨에 따라 적용되지 않을 수 있습니다.")?>
        <script language='javascript'>document.getElementById('po_poll4').value='<?=$site_bill[po_poll4]?>';</script>
        </select>
    </td>
</tr>
<tr><td width="120" style='padding-left:10px; height:30px;'>폭 세부설정</td>
    <td style='padding-left:10px;'>
	<table width=100% cellpadding=0 cellspacing=0>
	<tr><td style='padding-left:10px;'>전체폭</td>
	    <td><input class=ed type="text" name="po_poll5" required value="<?=$site_bill[po_poll5]?>" size="25"></td>
		<td style='padding-left:10px;'>우측폭</td>
		<td><b><?=$right_width?></b></td>
		<td style='padding-left:10px;'></td>
		<td></td>
		<td>[우측폭은 자동조절]</td>
		<td></td>
    </tr>
	<tr><td height="3"></td></tr>
	<tr><td style='padding-left:10px;'>좌측폭</td>
	    <td><input class=ed type="text" name="po_poll6" required value="<?=$site_bill[po_poll6]?>" size="25"></td>
		<td style='padding-left:10px;'>좌/메인간격</td>
		<td><input class=ed type="text" name="po_poll8" required value="<?=$site_bill[po_poll8]?>" size="25"></td>
		<td></td>
		<td></td>
		<td></td>
		<td></td>
    </tr>
	<tr><td height="3"></td></tr>
	<tr><td style='padding-left:10px;'>메인폭</td>
	    <td><input class=ed type="text" name="po_poll7" required value="<?=$site_bill[po_poll7]?>" size="25"></td>
		<td style='padding-left:10px;'>메인/우측간격</td>
		<td><input class=ed type="text" name="po_poll9" required value="<?=$site_bill[po_poll9]?>" size="25"></td>
		<td></td>
		<td></td>
    </tr>
	</table>

    </td>
</tr>
<tr><td width="120" style='padding-left:10px; height:30px;'>이미지1</td>
    <td style='padding-left:10px;'>
        <input type=file name=po_poll19 class=ed size=60>
        <?
        if ($site_bill[po_poll19])
            echo "<br><a href='$g4[path]/data/file/index/$site_bill[po_poll19]' target='_blank'>$site_bill[po_poll19]</a> <input type=checkbox name='index_menu_del' value='$site_bill[po_poll19]'> 삭제";
        ?>
    </td>
</tr>
<tr><td width="120" style='padding-left:10px; height:30px;'>이미지2</td>
    <td style='padding-left:10px;'>
        <input type=file name=po_poll18 class=ed size=60>
        <?
        if ($site_bill[po_poll18])
            echo "<br><a href='$g4[path]/data/file/index/$site_bill[po_poll18]' target='_blank'>$site_bill[po_poll18]</a> <input type=checkbox name='index_menu_del2' value='$site_bill[po_poll18]'> 삭제";
        ?>
    </td>
</tr>

<tr><td width="120" style='padding-left:10px; height:30px;'>내용1</td>
    <td style='padding-left:10px;'>
     <textarea class=ed name=po_poll15 rows=5 style='width:80%;'><?=$site_bill["po_poll15"] ?></textarea>
    </td>
</tr>
<tr><td width="120" style='padding-left:10px; height:30px;'>내용2</td>
    <td style='padding-left:10px;'>
     <textarea class=ed name=po_poll14 rows=5 style='width:80%;'><?=$site_bill["po_poll14"] ?></textarea>
    </td>
</tr>

<tr><td colspan='<?=$colspan?>' height="15"></td></tr>
<tr><td colspan='<?=$colspan?>' align="center"><input type="submit" name="formbutton1" value="확인"></td></tr>
<tr><td colspan='<?=$colspan?>' height="15"></td></tr>
<tr><td colspan='<?=$colspan?>' class='line2'></td></tr>
</form>
</table>