/home/mjc1/public_html/manage/category/cate_add_01.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
<? 
if( $mode == "up"){

    include(
"./common.php");
    
    
$sql "select *  from cate1 where category_code = '$code'"
    
$result mysql_query($sql);
    
$resultsu mysql_num_rows($result);
    
    if(
$resultsu ) { 
        
$row mysql_fetch_object($result);    
        
$category_name $row->category_name;
    }
    
    
$valueOpt        =    "Ä«Å×°í¸®¼öÁ¤";
    
$titleOpt        =    "´ëºÐ·ù Ä«Å×°í¸® ¼öÁ¤ ÆäÀÌÁö";
} else {
    
$valueOpt        =    "Ä«Å×°í¸®Ãß°¡";
    
$titleOpt        =    "´ëºÐ·ù Ä«Å×°í¸® Ãß°¡ ÆäÀÌÁö";
}


?>
<!DOCTYPE html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
    <title><?=$titleOpt;?></title> 
    <link rel='stylesheet' type='text/css' href='../css/reset.css'>
    <link rel='stylesheet' type='text/css' href='../css/point.css'>
    
    <script language="JavaScript">
        function init() {
            myform.codename.focus();
        }
        
        function cate_add() {
            if(!myform.codename.value) {
                alert("´ëºÐ·ù¸íÀ» ÀÔ·ÂÇϼ¼¿ä");
                myform.codename.focus();
                return false;
            }
            document.myform.action= "cate_addok.php";
            document.myform.submit();
            return true;
        }
        
        function cate_reset() {
            myform.reset();
            init();
        }
        
        function go_list() {
            location.href = "category.php";
        }
        
        function Key_Press()
        {
            if(window.event.keyCode ==13)
            cate_add();
        }
    </script>
</head>


<body onLoad="init()" style="background:none">
<form name="myform" onSubmit="return false;">
    <input type="hidden" name="code" value='<?=$code;?>'>
    <input type="hidden" name="mode" value='<?=$mode;?>'>

   <div class="categoryAddTitle">
        <h3>´ëºÐ·ù Ä«Å×°í¸®</h3>
        <p class="gray">´ëºÐ·ù Ä«Å×°í¸®¿¡ ÇØ´çµÇ´Â ³»¿ëÀ» ¾Æ·¡ ÇØ´ç¶õ¿¡ ÀÔ·ÂÇϼ¼¿ä.</p>
    </div><!-- //categoryAddTitle-->

    <div class="categoryAddWarp">
    <table class="categoryAddTable">
        <tr>
            <th>´ëºÐ·ùÄÚµå</th>
            <td class="last">ÀÚµ¿»ý¼º</td>
        </tr>
        <tr>
            <th class="bottom">´ëºÐ·ù¸í</th>
            <td class="bottom last"><input type="Text" name="codename" size="25" maxlength="50" onKeyPress="Key_Press()" value=<?=$category_name;?>></td>
        </tr>
    </table><!-- //categoryAddTable -->
    </div><!-- //categoryAddWarp-->

    <div class="categoryAddBtn"><input name="up_cate" type="button" id="up_cate" value="<?=$valueOpt;?>" onClick="cate_add()"><input name="edit_item_ok" type="button" id="edit_item_ok" value="»õ·ÎÀÔ·Â" onClick="cate_reset();"></div>
      
    </form>

</body>
</html>