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
|
<!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,introTitle_img,subTitle_out_img,subTitle_over_img ,subExplain_img from cate2 where cate1_code='$largeCode' and category_code = '$middleCode' order by idx "; $result = mysql_query($categoryQry); $row = mysql_fetch_array( $result);
//¼¹ö¿¡ ÀúÀåµÈ ÆÄÀϸí°ú µ¥ÀÌŸº£À̽º¿¡ Á¸ÀçÇÏ´Â ÆÄÀϸíÀ» ºñ±³ÇÑ´Ù. ########################################### ## $row[1] ---> ÀÎÆ®·Î ŸÀÌÆ² À̹ÌÁö ### ## $row[2] ---> ¼ºê ŸÀÌÆ² À̹ÌÁö ### ## $row[3] ---> ¼ºê ¼³¸í À̹ÌÁö ### ########################################### //µð·ºÅ丮¿¡ ÀúÀåµÈÆÄÀÏ if($largeCode == "01"){ $dir = "./category2_img/"; } else { $dir = "./category4_img/"; } if($row[1] !== ""){ $_DisPlayImg_1 = "<img src=". $dir.$row[1]." border=1>"; } else { $_DisPlayImg_1 = "À̹ÌÁö°¡ ¾ø½À´Ï´Ù."; } if($row[2] !== ""){ $_DisPlayImg_2 = "<img src=". $dir.$row[2]." border=1>"; } else { $_DisPlayImg_2 = "À̹ÌÁö°¡ ¾ø½À´Ï´Ù."; } if($row[3] !== ""){ $_DisPlayImg_3 = "<img src=". $dir.$row[3]." border=1>"; } else { $_DisPlayImg_3 = "À̹ÌÁö°¡ ¾ø½À´Ï´Ù."; } if($row[4] !== ""){ $_DisPlayImg_4 = "<img src=". $dir.$row[4]." border=1>"; } else { $_DisPlayImg_4 = "À̹ÌÁö°¡ ¾ø½À´Ï´Ù."; }
///////////////////////////////////////////////////////////////////// ?> <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(); } } </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><?=$row[0];?></span> </div> </div><!-- //pointSearchBox --> </div><!-- //pointSearch-->
<div class="borderWarp"> <table class="borderTable"> <thead> <tr> <th>±âÁ¸À̹ÌÁö</th> <th class="last">ÁغñµÈ À̹ÌÁö</th> </tr> </thead> <tbody> <? //ÇÁ·Î±×·¥»óǰ¸¸ ¸ðµç À̹ÌÁö¸¦ ¾÷·Îµå //´Ù¸¥ Ä«Å×°í¸®À̹ÌÁö´Â ±âº» ÁÂÃøÀ̹ÌÁö Çϳª¸¸ ¾÷·Îµå if( $largeCode == "01" ){ ?> <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> <? } else { ?> <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> <? } ?> </tbody>
<? //ÇÁ·Î±×·¥»óǰ¸¸ ¸ðµç À̹ÌÁö¸¦ ¾÷·Îµå //´Ù¸¥ Ä«Å×°í¸®À̹ÌÁö´Â ±âº» ÁÂÃøÀ̹ÌÁö Çϳª¸¸ ¾÷·Îµå if( $largeCode == "01" ){ ?> <tfoot> <tr> <th>ÀÎÆ®·Î Ä«Å×°í¸®¸í À̹ÌÁö</th> <td class="last"><input type="file" name="categoryUp1" onChange="view(this.value,'1')"></td> </tr> <tr> <th>¼ºê Ä«Å×°í¸®¸í À̹ÌÁö(out)</th> <td class="last"><input type="file" name="categoryUp2" onChange="view(this.value,'2')"></td> </tr> <tr> <th>¼ºê Ä«Å×°í¸®¸í À̹ÌÁö(over)</th> <td class="last"><input type="file" name="categoryUp3" onChange="view(this.value,'3')"></td> </tr> <tr> <th class="bottom">¼ºê Ä«Å×°í¸®°³¿ä À̹ÌÁö</th> <td class="last bottom"><input type="file" name="categoryUp4" onChange="view(this.value,'4')"></td> </tr> </tfoot> <? } else { ?> <tfoot> <tr> <th>¼ºê Ä«Å×°í¸®¸í À̹ÌÁö</th> <td><input type="file" name="OnlycategoryUp" onChange="view(this.value,'2')"></td> </tr> <tr> <th class="bottom">¼ºê Ä«Å×°í¸®¸í À̹ÌÁö(over )</th> <td class="bottom"><input type="file" name="OnlycategoryUp2" onChange="view(this.value,'3')"></td> </tr> </tfoot> <? } ?>
</table><!-- //borderTable --> </div><!-- //borderWarp--> <div class="btn1Warp"><a href="javascript:upload();" class="grayBtn">¾÷·ÎµåÇϱâ</a></div>
<input type='hidden' name='pageMode' value='1'> <input type='hidden' name='category_code' value='<?=$middleCode;?>'> <input type='hidden' name='cate1_code' value='<?=$largeCode;?>'> </form>
</div><!-- //container --> </div><!-- //wrap --> </body> </html>
|