10e833b5 by sayhoChun

web flow/form comleted, productionPortrait API added

1 parent 91cbd259
1 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminUser.php" ?>
2 <? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/header.php" ?>
3 <? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/leftBoardManage.php" ?>
4 <?
5 $obj = new AdminUser($_REQUEST) ;
6
7 //$list = $obj->getListOfUser() ;
8 $boardType=$_REQUEST["boardType"];
9 $vnum = $obj->virtualNum ;
10 ?>
11 <script>
12
13 $(document).ready(function(){
14
15 //=====프레입웤 변수들==================================================================================//
16 var FORM_TARGET_CLS_NM = "DIV#Contents" ; // 폼을 동적 wrap 할 타겟 ID이름
17 var FORM_NAME = "nf" ; // 폼이름
18 var FORM_METHOD = "GET" ; // 폼 메쏘드
19 var FORM_USE_FILE = false ; // 파일폼 사용 여부
20 var FORM_ACTION = document.URL ;
21
22 var NEXT_CMD = "" ; // 다은 수행 할 cmd
23 //=====================================================================================================//
24
25 var jForm = $(FORM_TARGET_CLS_NM).mf({ "name" : FORM_NAME , "method" : FORM_METHOD , "action" : FORM_ACTION , "useFile" : FORM_USE_FILE }) ;
26
27 // 페이징
28 $(".jPage").click2(function(){
29 jForm.ci() ;
30 jForm.mi("page",$(this).attr("page")) ;
31 jForm.submit() ;
32 }) ;
33
34
35 $(".jAutoSearch").change(function(){
36 jForm.ci() ;
37 jForm.submit() ;
38 });
39
40
41 $(".jSearch").click2(function(){
42 jForm.ci() ;
43 jForm.submit() ;
44 });
45
46 $(".jView").click2(function(){
47 var no = $(this).attr("no");
48 var type='<?=$boardType?>';
49 location.href = "/admin/boardManage/productionPortraitView.php?no=" + no + "&rurl=" + jQuery.rich.bin2hex(document.URL);
50 });
51
52
53 $(".jAddUserExcel").click2(function(){
54 var s=$("#search_text").val();
55 location.href = "/admin/excel/userListExcel.php?search_text="+s;
56 });
57
58
59
60
61 // 회원 탈퇴
62 $(".jDelUser").click2(function(){
63
64 var no = $(this).attr("no");
65
66 var noArr = new Array(no);
67
68 if(confirm("정말 삭제하시겠습니까?"))
69 {
70 deleteUser(noArr);
71 }
72 }) ;
73
74
75 // 단체 삭제
76 $(".jDelUserMulti").click2(function(){
77
78
79 var noArr = new Array();
80 var noCount = $(".jUserNo:checked").length;
81
82 if(noCount == 0)
83 {
84 alert("삭제할 관리자를 하나 이상 선택해주세요.");
85 return false;
86 }
87
88
89 if(confirm("정말 삭제하시겠습니까?"))
90 {
91 for(var i = 0; i < noCount; i++ )
92 {
93 noArr[i] = $(".jUserNo:checked:eq(" + i + ")").val();
94 }
95
96 deleteUser(noArr);
97 }
98
99 });
100
101 $(".jBtnMS").click2(function(){
102 var no = $(this).attr("no");
103 var member_type = $(this).attr("member_type");
104
105 $.ajax({
106 url : "/action_front.php?cmd=AdminUser.processRequestMemberShipUser",
107 async : false,
108 cache : false,
109 dataType : "json",
110 data : {
111 "no" : no
112 , "member_type" : member_type
113 },
114 success : function(data){
115 alert(data.returnMessage);
116 location.reload();
117 }
118 });
119 });
120
121
122 $("#jCheckAll").change(function(){
123 if($(this).is(":checked"))
124 $(".jUserNo").prop("checked", true);
125 else
126 $(".jUserNo").prop("checked", false);
127 });
128
129 }) ;
130
131
132
133 function deleteUser(noArr)
134 {
135 $.ajax({
136 url : "/action_front.php?cmd=AdminUser.deleteUser",
137 async : false,
138 cache : false,
139 dataType : "json",
140 data : {
141 "no" : noArr
142 },
143 success : function(data){
144 alert("삭제되었습니다");
145 location.reload();
146 }
147 });
148 }
149
150
151
152 </script>
153
154
155 <div id="Contents" class="notice">
156
157 <h1>제작사진</h1>
158 <h2>
159 게시물 관리 ><span>제작사진</span>
160
161 </h2>
162 <div class="data" >
163
164 <div class="btngroupright">
165 <input type="button" class="button smallrounded blue jView" no="" value="등록" />
166 <input type="button" class="button smallrounded blue jDelMulti" value="삭제" />
167 </div>
168
169 <table class="datacList">
170 <thead>
171 <tr>
172 <th class="no" width="5%">No</th>
173 <th width="2%"><input type="checkbox" id="jCheckAll"></th>
174 <th width="50%">제목</th>
175 <th width="10%">등록일</th>
176 <th width="10%">-</th>
177
178 </tr>
179 </thead>
180 <tbody><!-- 10줄 리스트// 마지막 tr에 class="last" 넣어주세요 -->
181 <? for($i=0; $i<sizeof($list); $i++){ ?>
182 <tr class="<?=(sizeof($list)-1 == $i) ? "last" : "datacLists"?>">
183 <td class="no center">
184 <?=$vnum--?>
185 </td>
186 <td class="center">
187 <input type="checkbox" class="jUserNo" value="<?=$list[$i]["no"] ?>" >
188 </td>
189 <td class="center">
190
191 </td>
192 <td class="center">
193
194 </td>
195 <td class="center">
196 <input type="button" class="button searchsmall white jView" value="상세보기" no="<?=$list[$i]["no"]?>" />
197 </td>
198
199 </tr>
200 <? } ?>
201 <?if(sizeof($list) == 0){?>
202 <tr class="last">
203 <td class="no center" colspan="11">No Data</td>
204 </tr>
205 <?}?>
206 </tbody>
207 </table>
208
209 <!-- Pagination -->
210 <? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/pageNavigation.php" ?>
211 <!--//Pagination -->
212
213 </div>
214
215 <div id="jDialogArea" style="display:none;">
216 <table class="datav" style="width:100%;">
217 <tr>
218 <th style="height:25px; width:70px;">포인트</th>
219 <td>
220 <input type="input" id="jAddHeartPoint" value="" style="width:100%;"/>
221 </td>
222 </tr>
223 </table>
224 </div>
225
226 </div>
227
228 <? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/footer.php" ?>
...\ No newline at end of file ...\ No newline at end of file
1 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminOperate.php" ?>
2 <? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/header.php" ?>
3 <? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/leftBoardManage.php" ?>
4 <?
5 $obj = new AdminOperate($_REQUEST, "");
6 //$info = $obj->getInfoOfShop();
7
8 //$cateCodeList = $obj->getShopCategoryCodeList();
9 //$shopImgList = $obj->getShopImgList($info["no"]);
10
11 $admin_type = $obj->admUser["admin_type"];
12
13
14 $rurl = pack("H*", $_REQUEST["rurl"]) ;
15 ?>
16 <script src="/admin/inc/fileUpload/fileUploadJS.js"></script>
17 <script type="text/javascript">
18 var _rurl = "<?=$rurl?>";
19 var _no = "<?=$_REQUEST[no]?>";
20
21 function MultiArticle(sTitle, sC, sCt, sImg){
22 this.title = sTitle;
23 this.categoryNumber = sC;
24 this.contents = sCt;
25 this.imgContainer = sImg;
26 }
27
28 $(document).ready(function(){
29
30 var multiArray = new Array();
31
32 for(var i = 1; i <= 10; i++){
33 multiArray[i] = new MultiArticle("", i, "", 0);
34 }
35
36 init();
37
38 <?if($admin_type == 3) { ?>
39 setReadOnly();
40 <?} ?>
41 //=====프레입웤 변수들==================================================================================//
42 var FORM_TARGET_CLS_NM = ".data" ; // 폼을 동적 wrap 할 타겟 ID이름
43 var FORM_NAME = "alf" ; // 폼이름
44 var FORM_METHOD = "POST" ; // 폼 메쏘드
45 var FORM_USE_FILE = false ; // 파일폼 사용 여부
46 var FORM_ACTION = "/action_front.php" ;
47
48
49 var NEXT_CMD = "" ; // 다은 수행 할 cmd
50 //=====================================================================================================//
51
52 var jForm = $(FORM_TARGET_CLS_NM).mf({ "name" : FORM_NAME , "method" : FORM_METHOD , "action" : FORM_ACTION , "useFile" : FORM_USE_FILE }) ;
53
54 $(".jCancel").click2(function(){
55 location.href = _rurl;
56 });
57
58 var prev;
59
60 function init(){
61 initFileUpload(101);
62 initFileUpload(102);
63 initFileUpload(103);
64 initFileUpload(104);
65 initFileUpload(105);
66 initFileUpload(106);
67 initFileUpload(107);
68 initFileUpload(108);
69 initFileUpload(109);
70 initFileUpload(110);
71
72 toggleHide(1);
73 }
74
75 $("#category").click(function(){
76 var currentNum = $(this).val();
77 multiArray[currentNum].title = $("#mTitle").val();
78 multiArray[currentNum].contents = $("#mContent").val();
79 });
80
81 $("#category").change(function(){
82 var currentNum = $(this).val();
83 $("#mTitle").val(multiArray[currentNum].title);
84 $("#mContent").val(multiArray[currentNum].contents);
85 toggleHide(currentNum);
86
87 });
88
89 function toggleHide(number){
90 for(var q = 1; q <= 10; q++){
91 if(q != number) $(".imgFiles[no="+q+"]").hide();
92 else $(".imgFiles[no="+q+"]").show();
93 }
94 }
95
96 $(".jSave").click2(function(){
97
98 $("#jData").ajaxSubmit({
99 url:"/action_front.php?cmd=AdminOperate.saveShop",
100 type : "post",
101 forceSync : true,
102 dataType : "json",
103 success : function(data){
104 alert(data.returnMessage);
105 location.href = _rurl;
106 }
107
108 });
109 });
110
111 $("#jCategorCd").change(function(){
112 setPromotion();
113 });
114
115 setPromotion();
116
117 }) ;
118
119
120
121 function setPromotion()
122 {
123 if($("#jCategorCd").val() == "1")
124 {
125 $("#jPromotionSelect").val("1");
126 $("#jPromotionSelect").prop("disabled", true);
127 $("#jPromotionHidden").prop("disabled", false);
128 }
129 else
130 {
131 $("#jPromotionSelect").prop("disabled", false);
132 $("#jPromotionHidden").prop("disabled", true);
133 }
134 }
135
136 function setReadOnly(){
137 $("[name=name]").attr("readonly", true);
138 $("[name=tel]").attr("readonly", true);
139 $("[name=addr_old]").attr("readonly", true);
140 $("[name=addr_new]").attr("readonly", true);
141 $("[name=discount_rate]").attr("readonly", true);
142 $("[name=discount_desc]").attr("readonly", true);
143 }
144
145
146 </script>
147
148 <div id="Contents" class="notice">
149
150 <h1>게시판 관리 -등록</h1>
151
152 <!-- location area -->
153 <h2>
154 업체 관리 >
155 <?
156 if($_REQUEST["boardType"] == "NO")
157 echo "공지사항";
158 else
159 echo "이벤트"
160 ?>
161 >
162 <span><?
163 if($_REQUEST["no"]=="")
164 echo "등록";
165 else
166 echo "상세보기";
167 ?></span>
168 </h2>
169 <!-- location area -->
170
171
172 <div class="data" style="width:80%;">
173
174 <form id="jData" method="post" enctype="multipart/form-data">
175 <input type="hidden" name="no" value="<?=$_REQUEST[no]?>" />
176 <table class="datav" style="width:100%;">
177 <colgroup>
178 <col width="10%" />
179 <col width="90%" />
180 </colgroup>
181 <tr>
182 <th style="height:25px;">제목</th>
183 <td class="l">
184 <input type="text" id="mTitle" class="wl" style="width:70%;" value="" />
185 </td>
186 </tr>
187 <tr>
188 <th style="height:25px;">카테고리</th>
189 <td>
190 <select id="category">
191 <option value=1>컨텐츠1</option>
192 <option value=2>컨텐츠2</option>
193 <option value=3>컨텐츠3</option>
194 <option value=4>컨텐츠4</option>
195 <option value=5>컨텐츠5</option>
196 <option value=6>컨텐츠6</option>
197 <option value=7>컨텐츠7</option>
198 <option value=8>컨텐츠8</option>
199 <option value=9>컨텐츠9</option>
200 <option value=10>컨텐츠10</option>
201 </select>
202 </td>
203 </tr>
204 <tr>
205 <th style="height:25px;">내용</th>
206 <td class="l">
207 <textarea name="special_contract" rows="7" id="mContent" style="width:90%;resize:vertical;"><?=$info["special_contract"]?></textarea>
208 </td>
209 </tr>
210
211 <tr>
212 <th style="height:25px;">이미지</th>
213 <td class="imgFiles" no=1>
214 <?
215 $fileIndex = "101";
216 $fileName = "img01";
217 $filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
218 $fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
219 include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
220 ?>
221 </td>
222 <td class="imgFiles" no=2>
223 <?
224 $fileIndex = "102";
225 $fileName = "img02";
226 $filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
227 $fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
228 include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
229 ?>
230 </td>
231 <td class="imgFiles" no=3>
232 <?
233 $fileIndex = "103";
234 $fileName = "img03";
235 $filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
236 $fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
237 include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
238 ?>
239 </td>
240 <td class="imgFiles" no=4>
241 <?
242 $fileIndex = "104";
243 $fileName = "img04";
244 $filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
245 $fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
246 include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
247 ?>
248 </td>
249 <td class="imgFiles" no=5>
250 <?
251 $fileIndex = "105";
252 $fileName = "img05";
253 $filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
254 $fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
255 include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
256 ?>
257 </td>
258 <td class="imgFiles" no=6>
259 <?
260 $fileIndex = "106";
261 $fileName = "img06";
262 $filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
263 $fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
264 include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
265 ?>
266 </td>
267 <td class="imgFiles" no=7>
268 <?
269 $fileIndex = "107";
270 $fileName = "img07";
271 $filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
272 $fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
273 include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
274 ?>
275 </td>
276 <td class="imgFiles" no=8>
277 <?
278 $fileIndex = "108";
279 $fileName = "img08";
280 $filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
281 $fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
282 include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
283 ?>
284 </td>
285 <td class="imgFiles" no=9>
286 <?
287 $fileIndex = "109";
288 $fileName = "img09";
289 $filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
290 $fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
291 include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
292 ?>
293 </td>
294 <td class="imgFiles" no=10>
295 <?
296 $fileIndex = "110";
297 $fileName = "img10";
298 $filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
299 $fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
300 include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
301 ?>
302 </td>
303
304 </tr>
305 </table>
306 </form>
307
308 <div class="btngroupcenter">
309 <span class="button bigrounded blue jCancel">취소 </span>
310 <span class="button bigrounded blue jSave" >저장</span>
311 </div>
312
313 </div>
314 </div>
...\ No newline at end of file ...\ No newline at end of file
...@@ -29,6 +29,10 @@ $(document).ready(function(){ ...@@ -29,6 +29,10 @@ $(document).ready(function(){
29 <a href="/admin/boardManage/certificateList.php">기관인정서</a> 29 <a href="/admin/boardManage/certificateList.php">기관인정서</a>
30 </li> 30 </li>
31 31
32 <li matchUrl="/admin/boardManage/productionPortrait.php">
33 <a href="/admin/boardManage/productionPortrait.php">제작사진</a>
34 </li>
35
32 </ul> 36 </ul>
33 37
34 38
......
...@@ -907,9 +907,37 @@ if (! class_exists("ApiBoard")) ...@@ -907,9 +907,37 @@ if (! class_exists("ApiBoard"))
907 return $this->makeResultJson("1","", $result); 907 return $this->makeResultJson("1","", $result);
908 } 908 }
909 909
910 function getListOfProductionPortrait(){
911 $sql="
912 SELECT COUNT(*)
913 FROM tblProductionPortrait
914 WHERE status=1
915 ORDER BY regDate DESC
916 ";
917 $this->rownum=$this->getValue($sql, "rn");
918 $this->initPage();
919 $this->setPageForDevice($this->rownum);
910 920
921 $sql="
922 SELECT ppNo, title, regDate
923 FROM tblProductionPortrait
924 WHERE status=1
925 ORDER BY regDate DESC
926 ";
927 $result=$this->getArray($sql);
928 return $this->makeResultJson("1", "", $result);
929 }
911 930
931 function getInfoOfProductionPortrait(){
932 $ppNo=$this->req["ppNo"];
912 933
934 $sql="
935 SELECT *
936 FROM tblProductionPortrait
937 WHERE ppNo='{$ppNo}'
938 LIMIT 0, 1
939 ";
940 }
913 941
914 942
915 943
......