<?php
$sub_menu = '550300';
include_once('./_common.php');
include_once(G5_EDITOR_LIB);

auth_check($auth[$sub_menu], "w");

$html_title = "고객";
$g5['title'] = $html_title.' 관리';

if ($w == "u")
{
    $html_title .= " 수정";
    $readonly = " readonly";

    $sql = " select * from `okone_contact` where me_id = '$me_id' ";
    $co = sql_fetch($sql);
    if (!$co['me_id'])
        alert('등록된 자료가 없습니다.');
}

include_once (G5_ADMIN_PATH.'/admin.head.php');
?>

<form name="frmcontentform" action="./contact_okone_update.php" onsubmit="return frmcontentform_check(this);" method="post" enctype="MULTIPART/FORM-DATA" >
<input type="hidden" name="w" value="<?php echo $w; ?>">
<input type="hidden" name="me_id" value="<?php echo $co['me_id']; ?>">
<input type="hidden" name="token" value="">

<div class="tbl_frm01 tbl_wrap">
    <table>
    <caption><?php echo $g5['title']; ?> 목록</caption>
    <colgroup>
        <col class="grid_4">
        <col>
    </colgroup>
    <tbody>
    <tr>
        <th scope="row"><label for="me_name">성명</label></th>
        <td><input type="text" name="me_name" value="<?php echo htmlspecialchars2($co['me_name']); ?>" id="me_name" required class="frm_input required" size="90"></td>
    </tr>
    <tr>
        <th scope="row"><label for="me_email">E-mail</label></th>
        <td><input type="text" name="me_email" value="<?php echo htmlspecialchars2($co['me_email']); ?>" id="me_email" required class="frm_input required" size="90"></td>
    </tr>
    <tr>
        <th scope="row"><label for="me_tel">연락처</label></th>
        <td><input type="text" name="me_tel" value="<?php echo htmlspecialchars2($co['me_tel']); ?>" id="me_tel" required class="frm_input required" size="90"></td>
    </tr>
    <tr>
        <th scope="row"><label for="me_type">문의구분</label></th>
        <td><input type="text" name="me_type" value="<?php echo htmlspecialchars2($co['me_type']); ?>" id="me_type" required class="frm_input required" size="90"></td>
    </tr>
    <tr>
        <th scope="row"><label for="me_content">문의내용</label></th>
        <td><textarea name="me_content" rows="3" style="width:100%;"><?php echo htmlspecialchars2($co['me_content']); ?></textarea></td>
    </tr>
    <tr>
        <th scope="row">관리자메모</th>
        <td><?php echo editor_html('me_admin', get_text($co['me_admin'], 0)); ?></td>
    </tr>
    </tbody>
    </table>
</div>

<div class="btn_fixed_top">
    <a href="./contact_okone_list.php" class="btn btn_02">목록</a>
    <input type="submit" value="확인" class="btn btn_submit" accesskey="s">
</div>

</form>

<script>
function frmcontentform_check(f)
{
    errmsg = "";
    errfld = "";

    <?php echo get_editor_js('me_admin'); ?>
    <?php echo chk_editor_js('me_admin'); ?>

    if (errmsg != "") {
        alert(errmsg);
        errfld.focus();
        return false;
    }
    return true;
}
</script>

<?php
include_once (G5_ADMIN_PATH.'/admin.tail.php');
?>
