/home/mjc1/public_html/adm/faqform.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?php
$sub_menu 
'300700';
include_once(
'./_common.php');
include_once(
G5_EDITOR_LIB);

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

$sql " select * from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
$fm sql_fetch($sql);

$html_title 'FAQ '.$fm['fm_subject'];;

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

    
$sql " select * from {$g5['faq_table']} where fa_id = '$fa_id' ";
    
$fa sql_fetch($sql);
    if (!
$fa['fa_id']) alert("등록된 자료가 없습니다.");
}
else
    
$html_title .= ' 항목 입력';

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

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

<form name="frmfaqform" action="./faqformupdate.php" onsubmit="return frmfaqform_check(this);" method="post">
<input type="hidden" name="w" value="<?php echo $w?>">
<input type="hidden" name="fm_id" value="<?php echo $fm_id?>">
<input type="hidden" name="fa_id" value="<?php echo $fa_id?>">

<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="fa_order">출력순서</label></th>
        <td>
            <?php echo help('숫자가 작을수록 FAQ 페이지에서 먼저 출력됩니다.'); ?>
            <input type="text" name="fa_order" value="<?php echo $fa['fa_order']; ?>" id="fa_order" class="frm_input" maxlength="10" size="10">
            <?php if ($w == 'u') { ?><a href="<?php echo G5_BBS_URL?>/faq.php?fm_id=<?php echo $fm_id?>" class="btn_frmline">내용보기</a><?php ?>
        </td>
    </tr>
    <tr>
        <th scope="row">질문</th>
        <td><?php echo editor_html('fa_subject'get_text($fa['fa_subject'], 0)); ?></td>
    </tr>
    <tr>
        <th scope="row">답변</th>
        <td><?php echo editor_html('fa_content'get_text($fa['fa_content'], 0)); ?></td>
    </tr>
    </tbody>
    </table>
</div>

<div class="btn_confirm01 btn_confirm">
    <input type="submit" value="확인" class="btn_submit" accesskey="s">
    <a href="./faqlist.php?fm_id=<?php echo $fm_id?>">목록</a>
</div>

</form>

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

    //check_field(f.fa_subject, "제목을 입력하세요.");
    //check_field(f.fa_content, "내용을 입력하세요.");

    if (errmsg != "")
    {
        alert(errmsg);
        errfld.focus();
        return false;
    }

    <?php echo get_editor_js('fa_subject'); ?>
    <?php echo get_editor_js('fa_content'); ?>

    return true;
}

// document.getElementById('fa_order').focus(); 포커스 해제
</script>

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