8b44cd93 by sayhoChun

end of day commit

1 parent 71def015
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
31 <link rel="stylesheet" type="text/css" href="/admin/inc/css/base.css"> 31 <link rel="stylesheet" type="text/css" href="/admin/inc/css/base.css">
32 <link rel="stylesheet" type="text/css" href="/admin/inc/css/login.css"> 32 <link rel="stylesheet" type="text/css" href="/admin/inc/css/login.css">
33 33
34 <title>GROUPBY Application Back Office</title> 34 <title>한중특장 Application Back Office</title>
35 35
36 36
37 <script language="javascript" type="text/javascript"> 37 <script language="javascript" type="text/javascript">
......
...@@ -83,6 +83,9 @@ ...@@ -83,6 +83,9 @@
83 }); 83 });
84 84
85 85
86
87
88
86 $(".jMod").click2(function(){ 89 $(".jMod").click2(function(){
87 pickupRows(); 90 pickupRows();
88 var data = $("#jData").serialize(); 91 var data = $("#jData").serialize();
......
...@@ -39,7 +39,7 @@ if (! class_exists("ApiBoard")) ...@@ -39,7 +39,7 @@ if (! class_exists("ApiBoard"))
39 39
40 //공지사항 정보 40 //공지사항 정보
41 function getInfoOfNotice(){ 41 function getInfoOfNotice(){
42 $noticeNo=$this->req["no"]; 42 $noticeNo=$this->req["noticeNo"];
43 43
44 $sql=" 44 $sql="
45 SELECT * 45 SELECT *
...@@ -75,7 +75,7 @@ if (! class_exists("ApiBoard")) ...@@ -75,7 +75,7 @@ if (! class_exists("ApiBoard"))
75 75
76 //이벤트 정보 76 //이벤트 정보
77 function getInfoOfEvent(){ 77 function getInfoOfEvent(){
78 $eventNo=$this->req["no"]; 78 $eventNo=$this->req["eventNo"];
79 $sql=" 79 $sql="
80 SELECT * 80 SELECT *
81 FROM tblEvent 81 FROM tblEvent
...@@ -155,11 +155,12 @@ if (! class_exists("ApiBoard")) ...@@ -155,11 +155,12 @@ if (! class_exists("ApiBoard"))
155 155
156 //자유게시판 리스트 156 //자유게시판 리스트
157 function getListOfBoard(){ 157 function getListOfBoard(){
158
158 $searchText=$this->req["searchText"]; 159 $searchText=$this->req["searchText"];
159 $searchType=$this->req["searchType"]; 160 $searchType=$this->req["searchType"];
160 161
161 $where="WHERE B.status=1"; 162 $where="WHERE B.status=1";
162 163 /*
163 if(!empty($searchText)){ 164 if(!empty($searchText)){
164 if(empty($search_type)){ 165 if(empty($search_type)){
165 $where.=" AND (U.userID LIKE '%{$searchText}%' OR B.title LIKE '%{$searchText}%')"; 166 $where.=" AND (U.userID LIKE '%{$searchText}%' OR B.title LIKE '%{$searchText}%')";
...@@ -172,7 +173,7 @@ if (! class_exists("ApiBoard")) ...@@ -172,7 +173,7 @@ if (! class_exists("ApiBoard"))
172 } 173 }
173 } 174 }
174 175
175 176 */
176 $sql=" 177 $sql="
177 SELECT COUNT(*) AS rn 178 SELECT COUNT(*) AS rn
178 FROM tblBoard B 179 FROM tblBoard B
...@@ -203,8 +204,7 @@ if (! class_exists("ApiBoard")) ...@@ -203,8 +204,7 @@ if (! class_exists("ApiBoard"))
203 204
204 //게시물 정보 205 //게시물 정보
205 function getInfoOfBoard(){ 206 function getInfoOfBoard(){
206 //$boardNo = $this->req["no"]; 207 $boardNo = $this->req["boardNo"];
207 $boardNo=1;
208 $sql=" 208 $sql="
209 SELECT B.*, U.userID, U.userName 209 SELECT B.*, U.userID, U.userName
210 FROM tblBoard B 210 FROM tblBoard B
...@@ -238,8 +238,8 @@ if (! class_exists("ApiBoard")) ...@@ -238,8 +238,8 @@ if (! class_exists("ApiBoard"))
238 $imgResult = $this->inFn_Common_fileSave($_FILES); 238 $imgResult = $this->inFn_Common_fileSave($_FILES);
239 239
240 $title=$this->req["title"]; 240 $title=$this->req["title"];
241 //$userFk = $this->appUser["no"]; 241 $userFk = $this->appUser["no"];
242 $userFk=$this->req["userFk"]; 242 //$userFk=$this->req["userFk"];
243 243
244 $imgPathBoard1 = $imgResult["imgPathBoard1"]["saveURL"] != null ? $imgResult["imgPathBoard1"]["saveURL"] : $this->req["imgPathBoard1"]; 244 $imgPathBoard1 = $imgResult["imgPathBoard1"]["saveURL"] != null ? $imgResult["imgPathBoard1"]["saveURL"] : $this->req["imgPathBoard1"];
245 $imgPathBoard2 = $imgResult["imgPathBoard2"]["saveURL"] != null ? $imgResult["imgPathBoard2"]["saveURL"] : $this->req["imgPathBoard2"]; 245 $imgPathBoard2 = $imgResult["imgPathBoard2"]["saveURL"] != null ? $imgResult["imgPathBoard2"]["saveURL"] : $this->req["imgPathBoard2"];
...@@ -247,7 +247,6 @@ if (! class_exists("ApiBoard")) ...@@ -247,7 +247,6 @@ if (! class_exists("ApiBoard"))
247 $imgPathBoard4 = $imgResult["imgPathBoard4"]["saveURL"] != null ? $imgResult["imgPathBoard4"]["saveURL"] : $this->req["imgPathBoard4"]; 247 $imgPathBoard4 = $imgResult["imgPathBoard4"]["saveURL"] != null ? $imgResult["imgPathBoard4"]["saveURL"] : $this->req["imgPathBoard4"];
248 $imgPathBoard5 = $imgResult["imgPathBoard5"]["saveURL"] != null ? $imgResult["imgPathBoard5"]["saveURL"] : $this->req["imgPathBoard5"]; 248 $imgPathBoard5 = $imgResult["imgPathBoard5"]["saveURL"] != null ? $imgResult["imgPathBoard5"]["saveURL"] : $this->req["imgPathBoard5"];
249 249
250
251 $content=$this->req["content"]; 250 $content=$this->req["content"];
252 251
253 $sql=" 252 $sql="
...@@ -284,8 +283,8 @@ if (! class_exists("ApiBoard")) ...@@ -284,8 +283,8 @@ if (! class_exists("ApiBoard"))
284 $imgPathCS5 = $imgResult["imgPathCS5"]["saveURL"] != null ? $imgResult["imgPathCS5"]["saveURL"] : $this->req["imgPathCS5"]; 283 $imgPathCS5 = $imgResult["imgPathCS5"]["saveURL"] != null ? $imgResult["imgPathCS5"]["saveURL"] : $this->req["imgPathCS5"];
285 284
286 $title=$this->req["title"]; 285 $title=$this->req["title"];
287 //$userFk = $this->appUser["no"]; 286 $userFk = $this->appUser["no"];
288 $userFk=$this->req["userFk"]; 287 //$userFk=$this->req["userFk"];
289 $targetType=$this->req["targetType"]; 288 $targetType=$this->req["targetType"];
290 $content=$this->req["content"]; 289 $content=$this->req["content"];
291 290
...@@ -308,7 +307,6 @@ if (! class_exists("ApiBoard")) ...@@ -308,7 +307,6 @@ if (! class_exists("ApiBoard"))
308 "; 307 ";
309 $this->update($sql); 308 $this->update($sql);
310 return $this->makeResultJson("1", "저장되었습니다"); 309 return $this->makeResultJson("1", "저장되었습니다");
311
312 } 310 }
313 311
314 function modifyCS(){ //미완성 312 function modifyCS(){ //미완성
...@@ -327,9 +325,6 @@ if (! class_exists("ApiBoard")) ...@@ -327,9 +325,6 @@ if (! class_exists("ApiBoard"))
327 $imgPathCS4 = $imgResult["imgPathCS4"]["saveURL"] != null ? $imgResult["imgPathCS4"]["saveURL"] : $this->req["imgPathCS4"]; 325 $imgPathCS4 = $imgResult["imgPathCS4"]["saveURL"] != null ? $imgResult["imgPathCS4"]["saveURL"] : $this->req["imgPathCS4"];
328 $imgPathCS5 = $imgResult["imgPathCS5"]["saveURL"] != null ? $imgResult["imgPathCS5"]["saveURL"] : $this->req["imgPathCS5"]; 326 $imgPathCS5 = $imgResult["imgPathCS5"]["saveURL"] != null ? $imgResult["imgPathCS5"]["saveURL"] : $this->req["imgPathCS5"];
329 327
330
331
332
333 $sql=" 328 $sql="
334 UPDATE tblCustomerService 329 UPDATE tblCustomerService
335 SET 330 SET
...@@ -361,7 +356,7 @@ if (! class_exists("ApiBoard")) ...@@ -361,7 +356,7 @@ if (! class_exists("ApiBoard"))
361 $searchType=$this->req["searchType"]; 356 $searchType=$this->req["searchType"];
362 357
363 $where="CS.status=1 AND targetType = 1"; 358 $where="CS.status=1 AND targetType = 1";
364 359 /*
365 if(!empty($searchText)){ 360 if(!empty($searchText)){
366 if(empty($search_type)){ 361 if(empty($search_type)){
367 $where.=" AND (U.userID LIKE '%{$searchText}%' OR CS.title LIKE '%{$searchText}%')"; 362 $where.=" AND (U.userID LIKE '%{$searchText}%' OR CS.title LIKE '%{$searchText}%')";
...@@ -373,13 +368,13 @@ if (! class_exists("ApiBoard")) ...@@ -373,13 +368,13 @@ if (! class_exists("ApiBoard"))
373 $where.=" AND CS.title LIKE '%{$searchText}%'"; 368 $where.=" AND CS.title LIKE '%{$searchText}%'";
374 } 369 }
375 } 370 }
376 371 */
377 372
378 $sql=" 373 $sql="
379 SELECT COUNT(*) AS rn 374 SELECT COUNT(*) AS rn
380 FROM tblCustomerService CS 375 FROM tblCustomerService CS
381 JOIN tblUser U ON CS.userFk=U.userNo 376 JOIN tblUser U ON CS.userFk=U.userNo
382 WHERE CS.status=1 377 WHERE CS.status=1 AND CS.targetType=1
383 ORDER BY csNo DESC 378 ORDER BY csNo DESC
384 "; 379 ";
385 $this->initPage(); 380 $this->initPage();
...@@ -388,10 +383,10 @@ if (! class_exists("ApiBoard")) ...@@ -388,10 +383,10 @@ if (! class_exists("ApiBoard"))
388 $this->setPageForDevice($this->rownum); 383 $this->setPageForDevice($this->rownum);
389 384
390 $sql=" 385 $sql="
391 SELECT CS.*, U.userID, U.userNo 386 SELECT CS.csNo, CS.title, U.userID, U.userNo
392 FROM tblCustomerService CS 387 FROM tblCustomerService CS
393 JOIN tblUser U ON CS.userFk=U.userNo 388 JOIN tblUser U ON CS.userFk=U.userNo
394 WHERE CS.status=1 389 WHERE CS.status=1 AND CS.targetType=1
395 ORDER BY csNo DESC 390 ORDER BY csNo DESC
396 LIMIT {$this->startNum}, {$this->endNum} 391 LIMIT {$this->startNum}, {$this->endNum}
397 "; 392 ";
...@@ -405,8 +400,8 @@ if (! class_exists("ApiBoard")) ...@@ -405,8 +400,8 @@ if (! class_exists("ApiBoard"))
405 400
406 //고객센터 게시물 내용 401 //고객센터 게시물 내용
407 function getInfoOfCS(){ 402 function getInfoOfCS(){
408 //$csNo=$this->req["no"]; 403 $csNo=$this->req["csNo"];
409 $csNo=2; 404
410 $sql=" 405 $sql="
411 SELECT CS.*, U.userID, U.userName 406 SELECT CS.*, U.userID, U.userName
412 FROM tblCustomerService CS 407 FROM tblCustomerService CS
...@@ -440,7 +435,7 @@ if (! class_exists("ApiBoard")) ...@@ -440,7 +435,7 @@ if (! class_exists("ApiBoard"))
440 //AS엄체 리스트 435 //AS엄체 리스트
441 function getListOfCompany(){ 436 function getListOfCompany(){
442 $provinceNumber=$this->req["provinceNumber"]; 437 $provinceNumber=$this->req["provinceNumber"];
443 $productNumber=$this->req["productNumber"]; 438 $productCoder=$this->req["productCode"];
444 $searchText=$this->req["searchText"]; 439 $searchText=$this->req["searchText"];
445 440
446 $where="WHERE status=1"; 441 $where="WHERE status=1";
...@@ -450,7 +445,7 @@ if (! class_exists("ApiBoard")) ...@@ -450,7 +445,7 @@ if (! class_exists("ApiBoard"))
450 } 445 }
451 446
452 if(!empty($productNumber)){ 447 if(!empty($productNumber)){
453 $where.=" AND productCode='{$productNumber}'"; 448 $where.=" AND productCode='{$productCode}'";
454 } 449 }
455 if(!empty($searchText)){ 450 if(!empty($searchText)){
456 $where.=" AND name LIKE '%{$searchText}%'"; 451 $where.=" AND name LIKE '%{$searchText}%'";
...@@ -484,8 +479,7 @@ if (! class_exists("ApiBoard")) ...@@ -484,8 +479,7 @@ if (! class_exists("ApiBoard"))
484 479
485 //AS업체 상세 480 //AS업체 상세
486 function getInfoOfCompany(){ 481 function getInfoOfCompany(){
487 //$companyNo=$this->req["no"]; 482 $companyNo=$this->req["no"];
488 $companyNo=1;
489 483
490 $sql=" 484 $sql="
491 SELECT C.* 485 SELECT C.*
...@@ -518,8 +512,8 @@ if (! class_exists("ApiBoard")) ...@@ -518,8 +512,8 @@ if (! class_exists("ApiBoard"))
518 function saveComment(){ 512 function saveComment(){
519 $commentType=$this->req["commentType"]; 513 $commentType=$this->req["commentType"];
520 $targetFk=$this->req["targetFk"]; 514 $targetFk=$this->req["targetFk"];
521 //$userFk = $this->appUser["no"];; 515 $userFk = $this->appUser["no"];;
522 $userFk=$this->req["userFk"]; 516 //$userFk=$this->req["userFk"];
523 $content=$this->req["content"]; 517 $content=$this->req["content"];
524 $parentNo=$this->req["parentNo"]; //부모 댓글의 기본키 518 $parentNo=$this->req["parentNo"]; //부모 댓글의 기본키
525 519
...@@ -611,6 +605,7 @@ if (! class_exists("ApiBoard")) ...@@ -611,6 +605,7 @@ if (! class_exists("ApiBoard"))
611 WHERE commentNo='{$commentNo}' 605 WHERE commentNo='{$commentNo}'
612 "; 606 ";
613 $this->update($sql); 607 $this->update($sql);
608 return $this->makeResultJson(1, "수정되었습니다");
614 } 609 }
615 610
616 function delComment(){ 611 function delComment(){
...@@ -623,6 +618,8 @@ if (! class_exists("ApiBoard")) ...@@ -623,6 +618,8 @@ if (! class_exists("ApiBoard"))
623 commentGroup=(SELECT commentGroup FROM (SELECT * FROM tblComment) AS c WHERE commentNo='{$commentNo}') 618 commentGroup=(SELECT commentGroup FROM (SELECT * FROM tblComment) AS c WHERE commentNo='{$commentNo}')
624 AND depth > (SELECT depth FROM (SELECT * FROM tblComment) AS c WHERE commentNo='{$commentNo}')) 619 AND depth > (SELECT depth FROM (SELECT * FROM tblComment) AS c WHERE commentNo='{$commentNo}'))
625 "; 620 ";
621 $this->update($sql);
622 return $this->makeResultJson(1, "삭제되었습니다");
626 } 623 }
627 624
628 //제작사양서 저장 625 //제작사양서 저장
...@@ -853,7 +850,7 @@ if (! class_exists("ApiBoard")) ...@@ -853,7 +850,7 @@ if (! class_exists("ApiBoard"))
853 function getInfoOfProductionSpec(){ 850 function getInfoOfProductionSpec(){
854 $userNo=$this->appUser["userNo"]; 851 $userNo=$this->appUser["userNo"];
855 $productionNo=$this->req["productionNo"]; 852 $productionNo=$this->req["productionNo"];
856 $productionNo=3; 853 //$productionNo=3;
857 $sql=" 854 $sql="
858 SELECT PS.*, U.userNo, U.userName, IFNULL((SELECT userNo FROM tblLike WHERE userNo='{$userNo}' AND productionNo='{$productionNo}'), 0) AS likeStatus 855 SELECT PS.*, U.userNo, U.userName, IFNULL((SELECT userNo FROM tblLike WHERE userNo='{$userNo}' AND productionNo='{$productionNo}'), 0) AS likeStatus
859 FROM tblProductionSpec PS 856 FROM tblProductionSpec PS
...@@ -950,6 +947,8 @@ if (! class_exists("ApiBoard")) ...@@ -950,6 +947,8 @@ if (! class_exists("ApiBoard"))
950 WHERE ppNo='{$ppNo}' 947 WHERE ppNo='{$ppNo}'
951 LIMIT 0, 1 948 LIMIT 0, 1
952 "; 949 ";
950 $result=$this->getArray($sql);
951 return $this->makeResultJson("1", "", $result);
953 } 952 }
954 953
955 954
......