<?

include_once("./_common.php");
include_once("$g4[path]/head.sub.php");

//cart config
include_once("$g4[path]/skin/cart/basic/config/cart_config.php");
//$cart_table[cart_category] = "g4_cart_category";





//수정일경우[변경]
if($se_03 == 'w'){

    $title_msg  = "분류수정";

    //$se_01  = $wr_id;
    $mct        = " where ne_1 = '$se_01' ";
    $sql        = " select * from {$cart_table[cart_category]} $mct  ";
    $list     = sql_fetch($sql);

    //분류코드
    $code     =  $list[ne_1];

}
elseif($se_03 == 'p'){
    $title_msg  = "분류추가";

    $code    =  time();

}
else{
    $title_msg  = "분류등록";

    //분류코드 생성

    $code    =  time();




}


//전체폭
$width = "98%"; // 전체폭 890 에서 작업
$colspan = 3;




?>

<table width="<?=$width?>" align=center cellpadding=0 cellspacing=0>
<tr>
  <td>
    <!---------등록---------->
    <form name="fwrite" method="post" action="javascript:fwrite_check(document.fwrite);" enctype="multipart/form-data" style="margin:0px;">
    <input type = "hidden" name = "se_01" value = "<?=$se_01?>" />
    <input type = "hidden" name = "se_02" value = "<?=$se_02?>" />
    <input type = "hidden" name = "se_03" value = "<?=$se_03?>" />
    <input type = "hidden" name = "ne_1" value = "<?=$code?>" />

    <table width="100%" cellspacing="0" cellpadding="0">
    <tr><td height="5" colspan=<?=$colspan?> ></td></tr>
    <tr><td colspan=<?=$colspan?> >&nbsp;&nbsp;<?=$title_msg?></td></tr>
    <tr><td height="5" colspan=<?=$colspan?>></td></tr>
    <tr><td height="2"  bgcolor=#3acac2 colspan=<?=$colspan?>></td></tr>
    <tr height="35">
      <td style='padding-left:10px;width:120px; height:30px;' bgcolor=#fffbf7>· 코드번호</td>
      <td style='padding-left:10px;'><?=$code?></td>
    </td>
  </tr>
  <tr><td height="1"  bgcolor=#e2e2e2 colspan=<?=$colspan?>></td></tr>
  <tr height="35">
    <td style='padding-left:10px;width:120px; height:30px;' bgcolor=#fffbf7>· 분류이름 *</td>
    <td style='padding-left:10px;'><input class=ed style="width:200px;" name=wr_subject id="wr_subject" itemname="분류이름" required value="<?=$list[wr_subject]?>"></td>
  </tr>
  <tr><td height="1"  bgcolor=#e2e2e2 colspan=<?=$colspan?>></td></tr>
  <tr height="35">
    <td style='padding-left:10px;width:120px; height:30px;' bgcolor=#fffbf7>· 출력스킨</td>
    <td style='padding-left:10px;'>
      <select name=ne_2 required itemname="출력스킨">
      <?
      $arr = view_skin_dir("list_skin");
      for ($i=0; $i<count($arr); $i++) {
          echo "<option value='$arr[$i]'>$arr[$i]</option>\n";
      }
      ?>
      </select>
      <script language="JavaScript">document.fwrite.ne_2.value="<?=$list[ne_2]?>";</script>

    </td>
  </tr>
  <tr><td height="1"  bgcolor=#e2e2e2 colspan=<?=$colspan?>></td></tr>
    <tr height="35">
    <td style='padding-left:10px;width:120px; height:30px;' bgcolor=#fffbf7>· 출력순서</td>
    <td style='padding-left:10px;'><input class=ed style="width:60px;" name=ne_8 id="ne_3" itemname="출력순서" value="<?=$list[ne_8]?>"></td>
  </tr>
  <tr><td height="1"  bgcolor=#e2e2e2 colspan=<?=$colspan?>></td></tr>
  <tr height="35">
    <td style='padding-left:10px;width:120px; height:30px;' bgcolor=#fffbf7>· 재고수량</td>
    <td style='padding-left:10px;'><input class=ed style="width:60px;" name=ne_3 id="ne_3" itemname="재고수량" value="<?=$list[ne_3]?>"></td>
  </tr>
  <tr><td height="1"  bgcolor=#e2e2e2 colspan=<?=$colspan?>></td></tr>
  <tr><td colspan=<?=$colspan?> height="30" >&nbsp;&nbsp;분류세부설정</td></tr>
  <tr><td height="1"  bgcolor=#e2e2e2 colspan=<?=$colspan?>></td></tr>
  <tr height="35">
    <td style='padding-left:10px;width:120px; height:30px;' bgcolor=#fffbf7>· 상단파일경로</td>
    <td style='padding-left:10px;'><input class=ed style="width:80%;" name=ne_4 id="ne_4" itemname="상단파일경로" value="<?=$list[ne_4]?>"></td>
  </tr>
  <tr><td height="1"  bgcolor=#e2e2e2 colspan=<?=$colspan?>></td></tr>
  <tr height="35">
    <td style='padding-left:10px;width:120px; height:30px;' bgcolor=#fffbf7>· 하단파일경로</td>
    <td style='padding-left:10px;'><input class=ed style="width:80%;" name=ne_5 id="ne_5" itemname="하단파일경로" value="<?=$list[ne_5]?>"></td>
  </tr>
  <tr><td height="1"  bgcolor=#e2e2e2 colspan=<?=$colspan?>></td></tr>
  <tr><td height="1"  bgcolor=#e2e2e2 colspan=<?=$colspan?>></td></tr>
  <tr height="35">
    <td style='padding-left:10px;width:120px; height:30px;' bgcolor=#fffbf7>· 상단 내용</td>
    <td style='padding-left:10px;'>

        <textarea id="ne_6" name="ne_6" class=tx style='width:100%; word-break:break-all;' rows=5 itemname="상단 내용" required ><?=$list[ne_6]?></textarea>

    </td>
  </tr>
  <tr><td height="1"  bgcolor=#e2e2e2 colspan=<?=$colspan?>></td></tr>

  <tr height="35">
    <td style='padding-left:10px;width:120px; height:30px;' bgcolor=#fffbf7>· 하단 내용</td>
    <td style='padding-left:10px;'>
        <textarea id="ne_7" name="ne_7" class=tx style='width:100%; word-break:break-all;' rows=5 itemname="하단 내용" required ><?=$list[ne_7]?></textarea>
    </td>
  </tr>
  <tr><td height="2"  bgcolor=#e2e2e2 colspan=<?=$colspan?>></td></tr>
  <tr><td height="30" colspan=<?=$colspan?>></td></tr>
  <tr><td height="35" colspan=<?=$colspan?> align="center">
        <input type=image id="btn_submit" src="<?=$board_skin_path?>/img/btn_write.gif" border=0 accesskey='s'>&nbsp;
        
  </td></tr>
  <tr><td height="30" colspan=<?=$colspan?>></td></tr>

  </table>

  </form>
  <!-------//등록---------->

</td>
</tr>
</table>

<script language="javascript">

function fwrite_check(f) {
    var f = document.fwrite;

    f.action = "./add_update.php";
    f.submit();
}
</script>




