<?php
$cate_id = "mnu_message_manage"; //현재 메뉴 ID 필수!!!

include_once "{$_SERVER['DOCUMENT_ROOT']}/common.inc.php";
include_once _ADM_INC_PATH_ ."/auth_check.php";

include _ADM_INC_PATH_ ."/header.html";

$qryobj = new cUtil\Mlang();
$tran = $qryobj->getTran($_REQUEST['TRAN_ID'],1);
$uselang = $qryobj->getLang("","Y");
?>

        <div id="cmd_bar" class="mb-2">
          <div class="h4"><i class="bi bi-files-alt"></i> 메세지 등록</div>
          <div class="text-right">
          </div>
        </div>

        <form method="post" enctype="multipart/form-data" id="aform" class="fadmin" action="./message.ajax.php">
          <div class="fld-block">
            <label for="member_id"> 기본 메세지 </label>
            <div><h4><?=$tran['KR']?></h4></div>
          </div>
          <div class="fld-block">
            <label>Translator </label>
            <div class="w-100">
              <table class="table table-bordered w-100">
                <colgroup>
                  <col width="10%">
                  <col width="*">
                </colgroup>
                <thead>
                <tr>
                  <th>Lang</th>
                  <th>Trans Text</th>
                </tr>
                </thead>
                <tbody>
                <?php foreach( $uselang as $lang ){?>
                <tr>
                  <td class="text-center"><?=$lang['Code_Val']?></td>
                  <td><textarea name="<?=$lang['Code_Uid']?>" class="w-100" style="height:40px;"><?=$tran[$lang['Code_Uid']]?></textarea></td>
                </tr>
                <?php }?>
                </tbody>
              </table>
            </div>
          </div>
          <div class="fld-block">
            <label>등록일 </label>
            <div class="form-inline"><?=getDT_datetime($tran['MATE_DT'])?></div>
          </div>
          <div class="fld-block">
            <label>수정일 </label>
            <div class="form-inline"><?=getDT_datetime($tran['EDIT_DT'])?></div>
          </div>
          <div class="text-center mt-4">
            <a href="javascript: history.go(-1)" class="btn btn-success px-5">리스트</a>
            <button type="submit" class="btn btn-primary px-5">등 록</button>
          </div>
          <?=hidden_input('TRAN_ID', $_REQUEST['TRAN_ID'])?>
          <?=hidden_input('mode', 'setTran')?>
        </form>
<?php

include _ADM_INC_PATH_ ."/footer.html";