/home/mjc1/public_html/manage/categoryImgManage2.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<!DOCTYPE html><head>
        <meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
        <title>Á¤º¸°ü¸®</title> 
        <link rel='stylesheet' type='text/css' href='./css/reset.css'>
        <link rel='stylesheet' type='text/css' href='./css/point.css'>
    </head>

<?
   
include("./category/common.php");
   
   
//ÇØ´çÄ«Å×°í¸®ÀÇ À̸§
    
$categoryQry      =   "select category_name, subTitle_bar_img ,subTitle_smallbox_img , subTitle_box_img, program_img, program_img2 ,program_compare_img ,program_mean ,ManualMovieFile, DemoDownFile,ManualDocumentFile
                                            from cate3 
                                            where cate1_code='
$largeCode' and  cate2_code= '$middleCode' and category_code = '$smallCode' order by idx "
                                                              
    
$result           =   mysql_query($categoryQry);
    
$row              =   mysql_fetch_array$result);
    
    
$category_nameArr    =  explode"->",$row[0] );
    
$program_mean        =   stripslashes($row[7]);

    
//µð·ºÅ丮¿¡ ÀúÀåµÈÆÄÀÏ
    
$dir                                =    "./category3_img/"
    
$program_imgDir    =    "./program_img/"
    
    
//ÇÁ·Î±×·¥»óǰÀ̹ÌÁö 
    ###############################
    ##   subTitle_bar_img                (ÇÁ·Î±×·¥ Å¸ÀÌÆ²¹Ù)
    ##   subTitle_smallbox_img        (¼­ºê ÇÁ·Î±×·¥ÀÛÀº¹Ú½º À̹ÌÁö)
    ##   subTitle_box_img                (ÇÁ·Î±×·¥¹Ú½º À̹ÌÁö) 
    ##   program_img                        (ÇÁ·Î±×·¥ ¼³¸íÀ̹ÌÁö)
    ##   program_img2                    (ÇÁ·Î±×·¥ °³¿äÀ̹ÌÁö)
    ##   program_compare_img    (´Ù¸¥ ÇÁ·Î±×·¥°úÀÇ ºñ±³À̹ÌÁö)
    ###############################
    
  
if($row[1] !== "" && $row[1] !== "0" ) {  $_DisPlayImg_1      =    "<img src="$program_imgDir.$row[1]." border=1 width=600 height=20>";     }
  else                                   {  
$_DisPlayImg_1      =    "À̹ÌÁö°¡ ¾ø½À´Ï´Ù.";  }
   
  if(
$row[2] !== "" && $row[2] !== "0")  {  $_DisPlayImg_2      =    "<img src="$program_imgDir.$row[2]." border=1>";  }
  else                                   {  
$_DisPlayImg_2      =    "À̹ÌÁö°¡ ¾ø½À´Ï´Ù.";  }
   
  if(
$row[3] !== "" && $row[3] !== "0" ) {   $_DisPlayImg_3      =    "<img src="$program_imgDir.$row[3]." border=1>";  }
  else                                    {  
$_DisPlayImg_3      =    "À̹ÌÁö°¡ ¾ø½À´Ï´Ù."; }
   
  if(
$row[4] !== "" && $row[4] !== "0" )  {  $_DisPlayImg_4      =    "<img src="$program_imgDir.$row[4]." border=1>";  }
  else                                    {  
$_DisPlayImg_4      =    "À̹ÌÁö°¡ ¾ø½À´Ï´Ù."; }
   
  if(
$row[5] !== "" && $row[5] !== "0" )  {  $_DisPlayImg_5      =    "<img src="$program_imgDir.$row[5]." border=1>";  }
  else                                    { 
$_DisPlayImg_5      =    "À̹ÌÁö°¡ ¾ø½À´Ï´Ù.";  }
    
  if(
$row[6] !== "" && $row[6] !== "0")   { $_DisPlayImg_6      =    "<img src="$program_imgDir.$row[6]." border=1>";  }
  else                                    { 
$_DisPlayImg_6      =    "À̹ÌÁö°¡ ¾ø½À´Ï´Ù.";     }

?>


<script language="JavaScript">
function view(va,num){
   document.getElementById("Image_"+num).innerHTML  =  "<img src='"+ va +"'>";
}

function upload(){
    if( confirm("ÀÌ ÆÄÀϵéÀ» ¾÷·Îµå ÇϽðڽÀ´Ï±î?") ){
        categoryUpload.action =  "categoryImgProcess.php";
        categoryUpload.submit();
    }
}

function programView(s){
    if( s == 1){
        window.open("programCompareView.php?largeCode=<?=$largeCode;?>&middleCode=<?=$middleCode;?>&smallCode=<?=$smallCode;?>","","width=600,height=500,scrollbars=yes");
    }

    if(s == 2){
        window.open("programMeanView.php?largeCode=<?=$largeCode;?>&middleCode=<?=$middleCode;?>&smallCode=<?=$smallCode;?>","","width=600,height=500,scrollbars=yes");
    }

</script>

<body>
    <div class="wrap">
        <div class="container">    

            <FORM name='categoryUpload' METHOD=POST  enctype="multipart/form-data">
               <div class="pointSearch" style="padding:20px;">
                    <div class="pointSearchBox" style="width:200px;">
                        <div>
                            <h5>Ä«Å×°í¸®¸í :</h5>
                            <span><?=$category_nameArr[1];?></span>
                        </div>
                    </div><!-- //pointSearchBox -->
                </div><!-- //pointSearch-->

                <div class="borderWarp">
                <table class="borderTable" style="border-top:1px solid #bdbebd">
                    <tfoot>
                    <tr>
                        <th>Ç÷¡½¬ ÆÄÀϸí</th>
                        <td class="last"><input type=text name='ManualMovieFile' value='<?=$row[8];?>'></td>
                    </tr>
                    <tr>
                        <th>¹«·á´Ù¿î·Îµå ÇÁ·Î±×·¥¸í</th>
                        <td class="last"><input type=text name='DemoDownFile' value='<?=$row[9];?>'>(°æ·Î:/download/)</td>
                    </tr>
                    <tr>
                        <th class="bottom">»ç¿ë¼³¸í¼­¸í:</th>
                        <td class="bottom last"><input type=text name='ManualDocumentFile' value='<?=$row[10];?>'>(°æ·Î:/save_dir/doc/)</td>
                    </tr>
                    </tfoot>
                </table><!--//borderTable-->
                </div><!--borderWarp-->


                <div class="borderWarp">
                <table class="borderTable">
                    <thead>
                    <tr>
                        <th>±âÁ¸À̹ÌÁö</th>
                        <th class="last">ÁغñµÈ À̹ÌÁö</th>
                    </tr>
                    </thead>
                    
                    <tbody>
                    <tr>
                        <td><?=$_DisPlayImg_1;?><br>ÇÁ·Î±×·¥ ¸Þ´º¹Ù »çÁø</td>
                        <td class="last"><div id="Image_1"></div></td>
                    </tr>
                    <tr>
                        <td><?=$_DisPlayImg_2;?><br>ÇÁ·Î±×·¥¹Ú½º ÀÛÀº»çÁø</td>
                        <td class="last"><div id="Image_2"></div></td>
                    </tr>
                    <tr>
                        <td><?=$_DisPlayImg_3;?><br>ÇÁ·Î±×·¥¹Ú½º ±âº»»çÁø</td>
                        <td class="last"><div id="Image_3"></div></td>
                    </tr>
                    <tr>
                        <td><?=$_DisPlayImg_4;?><br>ÇÁ·Î±×·¥ °£´Ü¼³¸í »çÁø</td>
                        <td class="last"><div id="Image_4"></div></td>
                    </tr>
                    <tr>
                        <td><?=$_DisPlayImg_5;?><br>ÇÁ·Î±×·¥ °³¿ä »çÁø</td>
                        <td class="last"><div id="Image_5"></div></td>
                    </tr>
                    <tr>
                        <td><?=$_DisPlayImg_6;?><br>´Ù¸¥ÇÁ·Î±×·¥°úÀÇ ºñ±³ »çÁø</td>
                        <td class="last"><div id="Image_6"></div></td>
                    </tr>
                    <tr>
                        <td colspan="2" class="last bottom">
                            <div class="btn1Warp"><a href="javascript:programView('2');" class="grayBtn" style="width:200px">Á¦Ç°°³¿ä(Ç¥) º¸±â</a></div>
                        </td>
                    </tr>
                    </tbody>
                </table><!--//borderTable-->
                </div><!--borderWarp-->
                
                <div class="borderWarp">
                <table class="borderTable" style="border-top:1px solid #bdbebd">
                    <tfoot>
                    <tr>
                        <th>ÇÁ·Î±×·¥ ¸Þ´º¹Ù »çÁø</th>
                        <td class="last"><input type="file" name="subTitle_bar_img" onChange="view(this.value,'1')"></td>
                    </tr>
                    <tr>
                        <th>ÇÁ·Î±×·¥ ÀÛÀº¹Ú½º</th>
                        <td class="last"><input type="file" name="subTitle_smallbox_img" onChange="view(this.value,'2')"></td>
                    </tr>
                    <tr>
                        <th>ÇÁ·Î±×·¥ ±âº»¹Ú½º</th>
                        <td class="last"><input type="file" name="subTitle_box_img" onChange="view(this.value,'3')"></td>
                    </tr>
                    <tr>
                        <th>ÇÁ·Î±×·¥ ¼³¸í»çÁø</th>
                        <td class="last"><input type="file" name="program_img" onChange="view(this.value,'4')"></td>
                    </tr>
                    
                    
                    <tr>
                        <th>ÇÁ·Î±×·¥ °³¿ä »çÁø</th>
                        <td class="last"><input type="file" name="program_img2" onChange="view(this.value,'5')"></td>
                    </tr>
                    <tr>
                        <th>´Ù¸¥ÇÁ·Î±×·¥°úÀÇ ºñ±³»çÁø</th>
                        <td class="last"><input type="file" name="program_compare_img" onChange="view(this.value,'6')"></td>
                    </tr>
                    <tr>
                        <th class="bottom">Á¦Ç°¼Ò°³(HTML)</th>
                        <td class="bottom last"><textarea name="program_mean" cols=100 rows=10><?=$program_mean;?></textarea></td>
                    </tr>
                    </tfoot>
                </table><!-- //borderTable -->
                </div><!-- //borderWarp-->

                <div class="btn1Warp"><a href="javascript:upload();" class="grayBtn">¾÷·ÎµåÇϱâ</a></div>

                <input type='hidden' name='pageMode' value='2'>
                <input type='hidden' name='category_code' value='<?=$smallCode;?>'>
                <input type='hidden' name='cate1_code'   value='<?=$largeCode;?>'>
                <input type='hidden' name='cate2_code'   value='<?=$middleCode;?>'>

            </form>
            
        </div><!-- //container -->    
    </div><!-- //wrap -->
</body>
</html>