productionPortraitView.php
9.22 KB
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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
<? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminOperate.php" ?>
<? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/header.php" ?>
<? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/leftBoardManage.php" ?>
<?
$obj = new AdminOperate($_REQUEST, "");
//$info = $obj->getInfoOfShop();
//$cateCodeList = $obj->getShopCategoryCodeList();
//$shopImgList = $obj->getShopImgList($info["no"]);
$admin_type = $obj->admUser["admin_type"];
$rurl = pack("H*", $_REQUEST["rurl"]) ;
?>
<script src="/admin/inc/fileUpload/fileUploadJS.js"></script>
<script type="text/javascript">
var _rurl = "<?=$rurl?>";
var _no = "<?=$_REQUEST[no]?>";
function MultiArticle(sTitle, sC, sCt, sImg){
this.title = sTitle;
this.categoryNumber = sC;
this.contents = sCt;
this.imgContainer = sImg;
}
$(document).ready(function(){
var multiArray = new Array();
for(var i = 1; i <= 10; i++){
multiArray[i] = new MultiArticle("", i, "", 0);
}
init();
<?if($admin_type == 3) { ?>
setReadOnly();
<?} ?>
//=====프레입웤 변수들==================================================================================//
var FORM_TARGET_CLS_NM = ".data" ; // 폼을 동적 wrap 할 타겟 ID이름
var FORM_NAME = "alf" ; // 폼이름
var FORM_METHOD = "POST" ; // 폼 메쏘드
var FORM_USE_FILE = false ; // 파일폼 사용 여부
var FORM_ACTION = "/action_front.php" ;
var NEXT_CMD = "" ; // 다은 수행 할 cmd
//=====================================================================================================//
var jForm = $(FORM_TARGET_CLS_NM).mf({ "name" : FORM_NAME , "method" : FORM_METHOD , "action" : FORM_ACTION , "useFile" : FORM_USE_FILE }) ;
$(".jCancel").click2(function(){
location.href = _rurl;
});
var prev;
function init(){
initFileUpload(101);
initFileUpload(102);
initFileUpload(103);
initFileUpload(104);
initFileUpload(105);
initFileUpload(106);
initFileUpload(107);
initFileUpload(108);
initFileUpload(109);
initFileUpload(110);
toggleHide(1);
}
$("#category").click(function(){
var currentNum = $(this).val();
multiArray[currentNum].title = $("#mTitle").val();
multiArray[currentNum].contents = $("#mContent").val();
});
$("#category").change(function(){
var currentNum = $(this).val();
$("#mTitle").val(multiArray[currentNum].title);
$("#mContent").val(multiArray[currentNum].contents);
toggleHide(currentNum);
});
function toggleHide(number){
for(var q = 1; q <= 10; q++){
if(q != number) $(".imgFiles[no="+q+"]").hide();
else $(".imgFiles[no="+q+"]").show();
}
}
$(".jSave").click2(function(){
$("#jData").ajaxSubmit({
url:"/action_front.php?cmd=AdminOperate.saveShop",
type : "post",
forceSync : true,
dataType : "json",
success : function(data){
alert(data.returnMessage);
location.href = _rurl;
}
});
});
$("#jCategorCd").change(function(){
setPromotion();
});
setPromotion();
}) ;
function setPromotion()
{
if($("#jCategorCd").val() == "1")
{
$("#jPromotionSelect").val("1");
$("#jPromotionSelect").prop("disabled", true);
$("#jPromotionHidden").prop("disabled", false);
}
else
{
$("#jPromotionSelect").prop("disabled", false);
$("#jPromotionHidden").prop("disabled", true);
}
}
function setReadOnly(){
$("[name=name]").attr("readonly", true);
$("[name=tel]").attr("readonly", true);
$("[name=addr_old]").attr("readonly", true);
$("[name=addr_new]").attr("readonly", true);
$("[name=discount_rate]").attr("readonly", true);
$("[name=discount_desc]").attr("readonly", true);
}
</script>
<div id="Contents" class="notice">
<h1>게시판 관리 -등록</h1>
<!-- location area -->
<h2>
업체 관리 >
<?
if($_REQUEST["boardType"] == "NO")
echo "공지사항";
else
echo "이벤트"
?>
>
<span><?
if($_REQUEST["no"]=="")
echo "등록";
else
echo "상세보기";
?></span>
</h2>
<!-- location area -->
<div class="data" style="width:80%;">
<form id="jData" method="post" enctype="multipart/form-data">
<input type="hidden" name="no" value="<?=$_REQUEST[no]?>" />
<table class="datav" style="width:100%;">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tr>
<th style="height:25px;">제목</th>
<td class="l">
<input type="text" id="mTitle" class="wl" style="width:70%;" value="" />
</td>
</tr>
<tr>
<th style="height:25px;">카테고리</th>
<td>
<select id="category">
<option value=1>컨텐츠1</option>
<option value=2>컨텐츠2</option>
<option value=3>컨텐츠3</option>
<option value=4>컨텐츠4</option>
<option value=5>컨텐츠5</option>
<option value=6>컨텐츠6</option>
<option value=7>컨텐츠7</option>
<option value=8>컨텐츠8</option>
<option value=9>컨텐츠9</option>
<option value=10>컨텐츠10</option>
</select>
</td>
</tr>
<tr>
<th style="height:25px;">내용</th>
<td class="l">
<textarea name="special_contract" rows="7" id="mContent" style="width:90%;resize:vertical;"><?=$info["special_contract"]?></textarea>
</td>
</tr>
<tr>
<th style="height:25px;">이미지</th>
<td class="imgFiles" no=1>
<?
$fileIndex = "101";
$fileName = "img01";
$filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
</td>
<td class="imgFiles" no=2>
<?
$fileIndex = "102";
$fileName = "img02";
$filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
</td>
<td class="imgFiles" no=3>
<?
$fileIndex = "103";
$fileName = "img03";
$filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
</td>
<td class="imgFiles" no=4>
<?
$fileIndex = "104";
$fileName = "img04";
$filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
</td>
<td class="imgFiles" no=5>
<?
$fileIndex = "105";
$fileName = "img05";
$filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
</td>
<td class="imgFiles" no=6>
<?
$fileIndex = "106";
$fileName = "img06";
$filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
</td>
<td class="imgFiles" no=7>
<?
$fileIndex = "107";
$fileName = "img07";
$filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
</td>
<td class="imgFiles" no=8>
<?
$fileIndex = "108";
$fileName = "img08";
$filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
</td>
<td class="imgFiles" no=9>
<?
$fileIndex = "109";
$fileName = "img09";
$filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
</td>
<td class="imgFiles" no=10>
<?
$fileIndex = "110";
$fileName = "img10";
$filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
$fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
?>
</td>
</tr>
</table>
</form>
<div class="btngroupcenter">
<span class="button bigrounded blue jCancel">취소 </span>
<span class="button bigrounded blue jSave" >저장</span>
</div>
</div>
</div>