a704acc3 by sayhoChun

api test complete

1 parent 05145a47
...@@ -64,7 +64,8 @@ if (! class_exists("ApiBoard")) ...@@ -64,7 +64,8 @@ if (! class_exists("ApiBoard"))
64 //자유게시판 게시물 작성 64 //자유게시판 게시물 작성
65 function saveBoard(){ 65 function saveBoard(){
66 $title=$this->req["title"]; 66 $title=$this->req["title"];
67 $userFk = $this->appUser["no"]; 67 //$userFk = $this->appUser["no"];
68 $userFk=$this->req["userFk"];
68 $imgPathBoard1=$this->req["imgPathBoard1"]; 69 $imgPathBoard1=$this->req["imgPathBoard1"];
69 $imgPathBoard2=$this->req["imgPathBoard2"]; 70 $imgPathBoard2=$this->req["imgPathBoard2"];
70 $imgPathBoard3=$this->req["imgPathBoard3"]; 71 $imgPathBoard3=$this->req["imgPathBoard3"];
...@@ -74,7 +75,7 @@ if (! class_exists("ApiBoard")) ...@@ -74,7 +75,7 @@ if (! class_exists("ApiBoard"))
74 INSERT INTO tblBoard(userFk, title, imgPathBoard1, imgPathBoard2, imgPathBoard3, content, status, regDate) 75 INSERT INTO tblBoard(userFk, title, imgPathBoard1, imgPathBoard2, imgPathBoard3, content, status, regDate)
75 VALUES 76 VALUES
76 ( 77 (
77 '{$userFk}',, 78 '{$userFk}',
78 '{$title}', 79 '{$title}',
79 '{$imgPathBoard1}', 80 '{$imgPathBoard1}',
80 '{$imgPathBoard2}', 81 '{$imgPathBoard2}',
...@@ -153,7 +154,7 @@ if (! class_exists("ApiBoard")) ...@@ -153,7 +154,7 @@ if (! class_exists("ApiBoard"))
153 FROM tblComment C 154 FROM tblComment C
154 JOIN tblUser U ON C.userFk=U.userNo 155 JOIN tblUser U ON C.userFk=U.userNo
155 WHERE targetFk='{$boardNo}' AND commentType='FB' 156 WHERE targetFk='{$boardNo}' AND commentType='FB'
156 ORDER BY C.commentGroup ASC, C.gOrder ASC 157 ORDER BY C.commentGroup DESC, C.gOrder ASC
157 "; 158 ";
158 $commentList=$this->getArray($sql); 159 $commentList=$this->getArray($sql);
159 160
...@@ -169,7 +170,8 @@ if (! class_exists("ApiBoard")) ...@@ -169,7 +170,8 @@ if (! class_exists("ApiBoard"))
169 //고객센터 게시물 저장 170 //고객센터 게시물 저장
170 function saveCS(){ 171 function saveCS(){
171 $title=$this->req["title"]; 172 $title=$this->req["title"];
172 $userFk = $this->appUser["no"]; 173 //$userFk = $this->appUser["no"];
174 $userFk=$this->req["userFk"];
173 $targetType=$this->req["targetType"]; 175 $targetType=$this->req["targetType"];
174 $imgPathCS1=$this->req["imgPathCS1"]; 176 $imgPathCS1=$this->req["imgPathCS1"];
175 $imgPathCS2=$this->req["imgPathCS2"]; 177 $imgPathCS2=$this->req["imgPathCS2"];
...@@ -201,7 +203,7 @@ if (! class_exists("ApiBoard")) ...@@ -201,7 +203,7 @@ if (! class_exists("ApiBoard"))
201 $searchText=$this->req["searchText"]; 203 $searchText=$this->req["searchText"];
202 $searchType=$this->req["searchType"]; 204 $searchType=$this->req["searchType"];
203 205
204 $where="status=1 AND targetType = 1"; 206 $where="CS.status=1 AND targetType = 1";
205 207
206 if(!empty($searchText)){ 208 if(!empty($searchText)){
207 if(empty($search_type)){ 209 if(empty($search_type)){
...@@ -219,8 +221,8 @@ if (! class_exists("ApiBoard")) ...@@ -219,8 +221,8 @@ if (! class_exists("ApiBoard"))
219 $sql=" 221 $sql="
220 SELECT COUNT(*) 222 SELECT COUNT(*)
221 FROM tblCustomerService CS 223 FROM tblCustomerService CS
222 JOIN tblUser U ON CS.userFk=U.no 224 JOIN tblUser U ON CS.userFk=U.userNo
223 WHERE status=1 225 WHERE CS.status=1
224 ORDER BY csNo DESC 226 ORDER BY csNo DESC
225 "; 227 ";
226 $this->rownum = $this->getValue($sql, "rn"); 228 $this->rownum = $this->getValue($sql, "rn");
...@@ -228,9 +230,9 @@ if (! class_exists("ApiBoard")) ...@@ -228,9 +230,9 @@ if (! class_exists("ApiBoard"))
228 230
229 $sql=" 231 $sql="
230 SELECT CS.*, U.userID, U.userNo 232 SELECT CS.*, U.userID, U.userNo
231 FORM tblCustomerService CS 233 FROM tblCustomerService CS
232 JOIN tblUser U ON CS.userFk=U.no 234 JOIN tblUser U ON CS.userFk=U.userNo
233 WHERE status=1 235 WHERE CS.status=1
234 ORDER BY csNo DESC 236 ORDER BY csNo DESC
235 LIMIT {$this->startNum}, {$this->endNum} 237 LIMIT {$this->startNum}, {$this->endNum}
236 "; 238 ";
...@@ -244,7 +246,8 @@ if (! class_exists("ApiBoard")) ...@@ -244,7 +246,8 @@ if (! class_exists("ApiBoard"))
244 246
245 //고객센터 게시물 내용 247 //고객센터 게시물 내용
246 function getInfoOfCS(){ 248 function getInfoOfCS(){
247 $csNo=$this->req["no"]; 249 //$csNo=$this->req["no"];
250 $csNo=2;
248 $sql=" 251 $sql="
249 SELECT * 252 SELECT *
250 FROM tblCustomerService 253 FROM tblCustomerService
...@@ -259,7 +262,7 @@ if (! class_exists("ApiBoard")) ...@@ -259,7 +262,7 @@ if (! class_exists("ApiBoard"))
259 FROM tblComment C 262 FROM tblComment C
260 JOIN tblUser U ON C.userFk=U.userNo 263 JOIN tblUser U ON C.userFk=U.userNo
261 WHERE targetFk='{$csNo}' AND commentType='CS' 264 WHERE targetFk='{$csNo}' AND commentType='CS'
262 ORDER BY C.commentGroup ASC, C.gOrder ASC 265 ORDER BY C.commentGroup DESC, C.gOrder ASC
263 "; 266 ";
264 267
265 $commentList=$this->getArray($sql); 268 $commentList=$this->getArray($sql);
...@@ -280,12 +283,19 @@ if (! class_exists("ApiBoard")) ...@@ -280,12 +283,19 @@ if (! class_exists("ApiBoard"))
280 $cityNumber=$this->req["cityNumber"]; 283 $cityNumber=$this->req["cityNumber"];
281 $searchText=$this->req["searchText"]; 284 $searchText=$this->req["searchText"];
282 285
283 $where="status=1"; 286 $where="WHERE status=1";
284 287
285 if(!empty($provinceNumber)){ 288 if(!empty($provinceNumber)){
286 $where.=" AND address LIKE (SELECT abbreviation FROM tblZipProvince WHERE provinceNumber='{$provinceNumber}')"; 289 $where.=" AND address LIKE (SELECT abbreviation FROM tblZipProvince WHERE provinceNumber='{$provinceNumber}')";
287 } 290 }
288 291
292 if(!empty($cityNumber)){
293 $where.=" AND address LIKE (SELECT abbreviation FROM tblZipCity WHERE provinceNumber='{$provinceNumber}')";
294 }
295 if(!empty($searchText)){
296 $where.=" AND name LIKE '%{$searchText}%'";
297 }
298
289 $sql=" 299 $sql="
290 SELECT COUNT(*) 300 SELECT COUNT(*)
291 FROM tblCompany 301 FROM tblCompany
...@@ -312,7 +322,8 @@ if (! class_exists("ApiBoard")) ...@@ -312,7 +322,8 @@ if (! class_exists("ApiBoard"))
312 322
313 //AS업체 상세 323 //AS업체 상세
314 function getInfoOfCompany(){ 324 function getInfoOfCompany(){
315 $companyNo=$this->req["no"]; 325 //$companyNo=$this->req["no"];
326 $companyNo=1;
316 327
317 $sql=" 328 $sql="
318 SELECT * 329 SELECT *
...@@ -328,7 +339,7 @@ if (! class_exists("ApiBoard")) ...@@ -328,7 +339,7 @@ if (! class_exists("ApiBoard"))
328 FROM tblComment C 339 FROM tblComment C
329 JOIN tblUser U ON C.userFk=U.userNo 340 JOIN tblUser U ON C.userFk=U.userNo
330 WHERE targetFk='{$companyNo}' AND commentType='CP' 341 WHERE targetFk='{$companyNo}' AND commentType='CP'
331 ORDER BY C.ommentGroup ASC, C.gOrder ASC 342 ORDER BY C.commentGroup DESC, C.gOrder ASC
332 "; 343 ";
333 $commentList=$this->getArray($sql); 344 $commentList=$this->getArray($sql);
334 345
...@@ -350,8 +361,6 @@ if (! class_exists("ApiBoard")) ...@@ -350,8 +361,6 @@ if (! class_exists("ApiBoard"))
350 $content=$this->req["content"]; 361 $content=$this->req["content"];
351 $parentNo=$this->req["parentNo"]; //부모 댓글의 기본키 362 $parentNo=$this->req["parentNo"]; //부모 댓글의 기본키
352 363
353
354
355 if(empty($parentNo)){ //부모가 없을 때 364 if(empty($parentNo)){ //부모가 없을 때
356 $sql=" 365 $sql="
357 INSERT INTO tblComment(userFk, targetFk, commentGroup, gOrder, depth, content, commentType, status, regDate) 366 INSERT INTO tblComment(userFk, targetFk, commentGroup, gOrder, depth, content, commentType, status, regDate)
...@@ -380,115 +389,56 @@ if (! class_exists("ApiBoard")) ...@@ -380,115 +389,56 @@ if (! class_exists("ApiBoard"))
380 389
381 return $this->makeResultJson("1", "저장되었습니다"); 390 return $this->makeResultJson("1", "저장되었습니다");
382 } 391 }
383 else{ //부모 있을 때 392 else{ //부모 있을 때
384 $sql=" 393 $sql="
385 SELECT * 394 SELECT gOrder, commentGroup, depth
386 FROM tblComment 395 FROM tblComment
387 WHERE commentType='{$commentType}' 396 WHERE commentNo='{$parentNo}'
388 AND commentGroup=(SELECT commentGroup FROM tblComment WHERE commentType='{$commentType}' AND commentNo='{$parentNo}' AND status=1)
389 AND gOrder=(SELECT gOrder+1 FROM tblComment WHERE commentType='{$commentType}' AND commentNo='{$parentNo}' AND status=1)
390 AND depth=(SELECT depth+1 FROM tblComment WHERE commentType='{$commentType}' AND commentNo='{$parentNo}' AND status=1)
391 ORDER BY gOrder DESC
392 LIMIT 0, 1
393 "; 397 ";
394 $child=$this->getRow($sql); 398 $parent=$this->getRow($sql);
395 $childNo=$child["commentNo"];
396 $childGroup=$child["commentGroup"];
397 $childOrder=$child["gOrder"];
398 $childDepth=$child["depth"];
399 399
400 $parentGOrder=$parent["gOrder"];
401 $parentCommentGroup=$parent["commentGroup"];
402 $parentDepth=$parent["depth"];
403
404 $sql="
405 UPDATE tblComment
406 SET gOrder=gOrder+1
407 WHERE commentGroup='{$parentCommentGroup}' AND gOrder>'{$parentGOrder}'
408 ";
409 $this->update($sql);
400 410
401 if(!empty($childNo)){ //부모에게 자식이 있을 때 411 $sql="
402 $sql=" 412 INSERT INTO tblComment(userFk, targetFk, commentGroup, gOrder, depth, content, commentType, status, regDate)
403 INSERT INTO tblComment(userFk, targetFk, commentGroup, gOrder, depth, content, commentType, status, regDate) 413 VALUES
404 VALUES 414 (
405 (
406 '{$userFk}', 415 '{$userFk}',
407 '{$targetFk}', 416 '{$targetFk}',
408 '{$childGroup}', 417 '{$parentCommentGroup}',
409 '{$childOrder}' + 1, 418 '{$parentGOrder}' + 1,
410 '{$childDepth}', 419 '{$parentDepth}' + 1,
411 '{$content}', 420 '{$content}',
412 '{$commentType}', 421 '{$commentType}',
413 1, 422 1,
414 NOW() 423 NOW()
415 )
416 ";
417 $this->update($sql);
418
419 $currentNo=$this->mysql_insert_id();
420
421 $sql="
422 UPDATE tblComment
423 SET gOrder=gOrder+1
424 WHERE commentGroup='{$childGroup}' AND gOrder >= '{$childOrder}' + 1 AND commentNo <> '{$currentNo}' AND status=1
425 ";
426 $this->update($sql);
427
428 $sql="
429 SELECT COUNT(*) AS count
430 FROM tblComment
431 WHERE commentGroup='{$childGroup}' AND gOrder='{$childOrder}'+1;
432 ";
433 $count=$this->getValue($sql, "count");
434
435 if($count != 1){
436 $sql="
437 UPDATE tblComment
438 SET gOrder=gOrder+1
439 WHERE commentNo='{$currentNo}'
440 ";
441 $this->update($sql);
442 }
443
444 return $this->makeResultJson("1", "저장되었습니다");
445 }
446 else{ //부모에게 자식이 없을 때
447 $sql="
448 INSERT INTO tblComment(userFk, targetFk, commentGroup, gOrder, depth, content, commentType, status, regDate)
449 VALUES
450 (
451 '{$userFk}',
452 '{$targetFk}',
453 (SELECT commentGroup FROM (SELECT * FROM tblComment) AS tblComment WHERE commentNo='{$parentNo}' AND status=1),
454 (SELECT gOrder + 1 FROM (SELECT * FROM tblComment) AS tblComment WHERE commentNo='{$parentNo}' AND status=1),
455 (SELECT depth + 1 FROM (SELECT * FROM tblComment) AS tblComment WHERE commentNo='{$parentNo}' AND status=1),
456 '{$content}',
457 '{$commentType}',
458 1,
459 NOW()
460 ) 424 )
461 "; 425 ";
462 $this->update($sql); 426 $this->update($sql);
463 427
464 $currentNo=$this->mysql_insert_id(); 428 return $this->makeResultJson("1", "저장되었습니다");
465
466 $sql="SELECT commentGroup FROM tblComment WHERE commentNo='{$parentNo}' AND status=1";
467 $commentGroup=$this->getValue($sql, "commentGroup");
468
469 $sql="SELECT gOrder + 1 FROM tblComment WHERE commentNo='{$parentNo}' AND status=1";
470 $gOrder=$this->getValue($sql, "gOrder + 1");
471
472 $sql="
473 UPDATE tblComment
474 SET gOrder=gOrder+1
475 WHERE commentGroup='{$commentGroup}' AND gOrder >= '{$gOrder}' AND commentNo <> '{$currentNo}' AND status=1
476 ";
477 $this->update($sql);
478 return $this->makeResultJson("1", "저장되었습니다");
479 }
480 } 429 }
481 } 430 }
482 431
483 //제작사양서 저장 432 //제작사양서 저장
484 function saveProductionSpec(){ 433 function saveProductionSpec(){
485 $userFk = $this->appUser["no"]; 434 //$userFk = $this->appUser["no"];
435 $userFk = $this->req["userFk"];
486 $requestDate=$this->req["requestDate"]; 436 $requestDate=$this->req["requestDate"];
487 $companyName=$this->req["companyName"]; 437 $companyName=$this->req["companyName"];
488 $vehicleTON=$this->req["vehicleTON"]; 438 $vehicleTON=$this->req["vehicleTON"];
489 $vehicleText=$this->req["vehicleText"]; 439 $vehicleText=$this->req["vehicleText"];
490 $vehicleType=$this->req["vehicleType"]; 440 $vehicleType=$this->req["vehicleType"];
491 $productName=$thie->req["productName"]; 441 $productName=$this->req["productName"];
492 $telephone=$this->req["telephone"]; 442 $telephone=$this->req["telephone"];
493 $managerFk=$this->req["managerFk"]; 443 $managerFk=$this->req["managerFk"];
494 $type=$this->req["type"]; 444 $type=$this->req["type"];
...@@ -515,8 +465,8 @@ if (! class_exists("ApiBoard")) ...@@ -515,8 +465,8 @@ if (! class_exists("ApiBoard"))
515 $specialAddition=$this->req["specialAddition"]; 465 $specialAddition=$this->req["specialAddition"];
516 466
517 $sql=" 467 $sql="
518 INSERT INTO tblProductionSpec(userFk, requestDate, companyName, vehicleTON, vehicleText, vehicleType, productName, telephone, managerFk, type, internalLength, internalHeight, internalWidth, alCoil, 468 INSERT INTO tblProductionSpec(userFk, requestDate, companyName, vehicleTON, vehicleText, vehicleType, productName, telephone, managerFk, `type`, internalLength, internalHeight, internalWidth, alCoil,
519 floor, floorValue, tent, sideBoard, windStopper, freezer, gate, load, eTrackGate, eTrackWing, turnBuckle, toolBucket, bumperFootHold, wingProtector, axis, axisValue, specialAddition) 469 `floor`, floorValue, tent, sideBoard, windStopper, freezer, gate, `load`, eTrackGate, eTrackWing, turnBuckle, toolBucket, bumperFootHold, wingProtector, axis, axisValue, specialAddition, status, regDate)
520 VALUES 470 VALUES
521 ( 471 (
522 '{$userFk}', 472 '{$userFk}',
...@@ -560,7 +510,8 @@ if (! class_exists("ApiBoard")) ...@@ -560,7 +510,8 @@ if (! class_exists("ApiBoard"))
560 510
561 //내 제작사양서 511 //내 제작사양서
562 function getListOfMyProductionSpec(){ 512 function getListOfMyProductionSpec(){
563 $userFk=$this->appUser["no"]; 513 //$userFk=$this->appUser["no"];
514 $userFk=1;
564 $sql=" 515 $sql="
565 SELECT productionNo, companyName, requestDate 516 SELECT productionNo, companyName, requestDate
566 FROM tblProductionSpec 517 FROM tblProductionSpec
...@@ -580,8 +531,8 @@ if (! class_exists("ApiBoard")) ...@@ -580,8 +531,8 @@ if (! class_exists("ApiBoard"))
580 $dateFormer=$this->req["dateFormer"]; 531 $dateFormer=$this->req["dateFormer"];
581 $dateLatter=$this->req["dateLatter"]; 532 $dateLatter=$this->req["dateLatter"];
582 $managerFk=$this->req["managerFk"]; 533 $managerFk=$this->req["managerFk"];
583 534
584 $where="status=1"; 535 $where="WHERE status=1";
585 if(!empty($dateFormer)){ 536 if(!empty($dateFormer)){
586 $where .= " AND DATE_FORMAT(requestDate, '%Y%m%d') >= DATE_FORMAT('{$dateFormer}', '%Y%m%d')"; 537 $where .= " AND DATE_FORMAT(requestDate, '%Y%m%d') >= DATE_FORMAT('{$dateFormer}', '%Y%m%d')";
587 } 538 }
...@@ -594,7 +545,7 @@ if (! class_exists("ApiBoard")) ...@@ -594,7 +545,7 @@ if (! class_exists("ApiBoard"))
594 545
595 $sql=" 546 $sql="
596 SELECT productionNo, companyName, requestDate 547 SELECT productionNo, companyName, requestDate
597 FROM tblProduntionSpec 548 FROM tblProductionSpec
598 {$where} 549 {$where}
599 ORDER BY productionNo DESC 550 ORDER BY productionNo DESC
600 "; 551 ";
...@@ -609,6 +560,7 @@ if (! class_exists("ApiBoard")) ...@@ -609,6 +560,7 @@ if (! class_exists("ApiBoard"))
609 //제작사양서 상세정보 560 //제작사양서 상세정보
610 function getInfoOfProductionSpec(){ 561 function getInfoOfProductionSpec(){
611 $productionNo=$this->req["productionNo"]; 562 $productionNo=$this->req["productionNo"];
563 $productionNo=3;
612 $sql=" 564 $sql="
613 SELECT * 565 SELECT *
614 FROM tblProductionSpec 566 FROM tblProductionSpec
...@@ -627,7 +579,10 @@ if (! class_exists("ApiBoard")) ...@@ -627,7 +579,10 @@ if (! class_exists("ApiBoard"))
627 ORDER BY name ASC 579 ORDER BY name ASC
628 "; 580 ";
629 $list=$this->getArray($sql); 581 $list=$this->getArray($sql);
630 return $this->makeResultJson("1", "", $list); 582 if(sizeof($list)>0)
583 return $this->makeResultJson("1", "", $list);
584 else
585 return $this->makeResultJson("-1000", "내역이 없습니다");
631 } 586 }
632 587
633 //좋아요 588 //좋아요
...@@ -658,7 +613,7 @@ if (! class_exists("ApiBoard")) ...@@ -658,7 +613,7 @@ if (! class_exists("ApiBoard"))
658 $userNo=$this->appUser["no"]; 613 $userNo=$this->appUser["no"];
659 614
660 $sql=" 615 $sql="
661 SELECT productionNo, companyName, requestDate 616 SELECT PS.productionNo, companyName, requestDate
662 FROM tblProductionSpec PS 617 FROM tblProductionSpec PS
663 JOIN tblLike L ON PS.productionNo=L.productionNo 618 JOIN tblLike L ON PS.productionNo=L.productionNo
664 WHERE L.userNo='{$userNo}' 619 WHERE L.userNo='{$userNo}'
......
...@@ -89,7 +89,7 @@ if (! class_exists("ApiStatic")){ ...@@ -89,7 +89,7 @@ if (! class_exists("ApiStatic")){
89 //탑차 분류별 리스트 89 //탑차 분류별 리스트
90 function getListOfVehicle(){ 90 function getListOfVehicle(){
91 $vehicleType=$this->req["vehicleType"]; 91 $vehicleType=$this->req["vehicleType"];
92 92 $vehicleType="IS";
93 $sql=" 93 $sql="
94 SELECT vehicleNo, name, imgPathVehicle 94 SELECT vehicleNo, name, imgPathVehicle
95 FROM tblVehicle 95 FROM tblVehicle
...@@ -103,13 +103,14 @@ if (! class_exists("ApiStatic")){ ...@@ -103,13 +103,14 @@ if (! class_exists("ApiStatic")){
103 //탑차 정보 103 //탑차 정보
104 function getInfoOfVehicle(){ 104 function getInfoOfVehicle(){
105 $vehicleNo=$this->req["vehicleNo"]; 105 $vehicleNo=$this->req["vehicleNo"];
106 106 $vehicleNo=1;
107 echo $vehicleNo;
107 $sql=" 108 $sql="
108 SELECT * 109 SELECT *
109 FROM tblVehicle 110 FROM tblVehicle
110 WHERE vehicleNo='{$vehicleNo}' 111 WHERE vehicleNo='{$vehicleNo}'
111 "; 112 ";
112 $reusult=$this->getRow($sql); 113 $result=$this->getRow($sql);
113 return $this->makeResultJson("1", "", $result); 114 return $this->makeResultJson("1", "", $result);
114 } 115 }
115 116
......
...@@ -10,6 +10,16 @@ ...@@ -10,6 +10,16 @@
10 $event = $obj2->getListOfEvent(); 10 $event = $obj2->getListOfEvent();
11 $board = $obj2->getListOfBoard(); 11 $board = $obj2->getListOfBoard();
12 $comment= $obj2->getInfoOfBoard(); 12 $comment= $obj2->getInfoOfBoard();
13 $CS = $obj2->getListOfCS();
14 $CSInfo = $obj2->getInfoOfCS();
15 $AS = $obj2->getListOfCompany();
16 $ASInfo = $obj2->getInfoOfCompany();
17 $myProductionSpec=$obj2->getListOfMyProductionSpec();
18 $productionSpec=$obj2->getListOfProductionSpec();
19 $productionSpecInfo=$obj2->getInfoOfProductionSpec();
20 $vehicleList=$obj->getListOfVehicle();
21 $vehicleInfo=$obj->getInfoOfVehicle();
22
13 23
14 //$vnum = $obj->virtualNum ; 24 //$vnum = $obj->virtualNum ;
15 ?> 25 ?>
...@@ -58,11 +68,105 @@ $(document).ready(function(){ ...@@ -58,11 +68,105 @@ $(document).ready(function(){
58 async : false, 68 async : false,
59 cache : false, 69 cache : false,
60 data:{ 70 data:{
61 "commentType" : "FB", 71 "commentType" : "CS",
62 "targetFk" : 1, 72 "targetFk" : 2,
63 "userFk" : 1, 73 "userFk" : 1,
64 "content" : "세 번째 부모" 74 "content" : "test 대댓글2",
75 "parentNo" : 62
76 },
77 success : function(data){
78 alert(data.returnmessage);
79 },
80 error : function(req, res, error){
81 alert(req+res+error);
82 }
83 });
84 }) ;
65 85
86 $(".saveBoard").click2(function(){
87 $.ajax({
88 type: 'post',
89 url : "/action_front.php?cmd=ApiBoard.saveBoard",
90 async : false,
91 cache : false,
92 data:{
93 "title" : "제목제목제목",
94 "userFk" : 1,
95 "imgPathBoard1" : "경로1",
96 "imgPathBoard2" : "경로2",
97 "imgPathBoard3" : "경로3",
98 "content" : "내용내용내용"
99 },
100 success : function(data){
101 alert(data.returnmessage);
102 },
103 error : function(req, res, error){
104 alert(req+res+error);
105 }
106 });
107 }) ;
108
109 $(".saveCS").click2(function(){
110 $.ajax({
111 type: 'post',
112 url : "/action_front.php?cmd=ApiBoard.saveCS",
113 async : false,
114 cache : false,
115 data:{
116 "title" : "제목제목제목",
117 "userFk" : 1,
118 "imgPathBoard1" : "경로1",
119 "imgPathBoard2" : "경로2",
120 "imgPathBoard3" : "경로3",
121 "content" : "내용내용내용"
122 },
123 success : function(data){
124 alert(data.returnmessage);
125 },
126 error : function(req, res, error){
127 alert(req+res+error);
128 }
129 });
130 }) ;
131
132 $(".saveProductionSpec").click2(function(){
133 $.ajax({
134 type: 'post',
135 url : "/action_front.php?cmd=ApiBoard.saveProductionSpec",
136 async : false,
137 cache : false,
138 data:{
139 "userFk" : 1,
140 "requestDate" : "2017-10-18",
141 "companyName" : "리치",
142 "vehicleTON" : "123123",
143 "vehicleText" : "vehicleText",
144 "vehicleType" : "HY",
145 "productName" : "wtf",
146 "telephone" : "01001011",
147 "managerFk" : "1",
148 "type" : "R",
149 "internalLength" : 108,
150 "internalHeight" : 120,
151 "internalWidth" : 32,
152 "alCoil" : "G",
153 "floor" : "C",
154 "floorValue" : 22,
155 "tent" : 0,
156 "sideBoard" : 1,
157 "windStopper" : 1,
158 "freezer" : 0,
159 "gate" : 2,
160 "load" : "S",
161 "eTrackGate" : 0,
162 "eTrackWing" : 1,
163 "turnBuckle" : "rkskek",
164 "toolBucket" : 2,
165 "bumberFootHold" : 1,
166 "wingProtector" : 2,
167 "axis" : 1,
168 "axisValue" : "302",
169 "specialAddition" : "special"
66 }, 170 },
67 success : function(data){ 171 success : function(data){
68 alert(data.returnmessage); 172 alert(data.returnmessage);
...@@ -124,6 +228,9 @@ $(document).ready(function(){ ...@@ -124,6 +228,9 @@ $(document).ready(function(){
124 <div id="Contents" class="notice" style="width:1000px;" > 228 <div id="Contents" class="notice" style="width:1000px;" >
125 <form name=test1 method=POST> 229 <form name=test1 method=POST>
126 <span class="button bigrounded blue saveComment btnleft_y">댓글 저장 </span> 230 <span class="button bigrounded blue saveComment btnleft_y">댓글 저장 </span>
231 <span class="button bigrounded blue saveBoard btnleft_y">게시물 저장 </span>
232 <span class="button bigrounded blue saveCS btnleft_y">고객센터 게시물 저장 </span>
233 <span class="button bigrounded blue saveProductionSpec btnleft_y">제작사양서 저장 </span>
127 </form> 234 </form>
128 <div class="data"> 235 <div class="data">
129 <table class="datacList" id="datacList"> 236 <table class="datacList" id="datacList">
...@@ -157,6 +264,43 @@ $(document).ready(function(){ ...@@ -157,6 +264,43 @@ $(document).ready(function(){
157 <td class="center">Comment</td> 264 <td class="center">Comment</td>
158 <td class=""><?echo $comment;?></td> 265 <td class=""><?echo $comment;?></td>
159 </tr> 266 </tr>
267 <tr>
268 <td class="center">CS</td>
269 <td class=""><?echo $CS;?></td>
270 </tr>
271 <tr>
272 <td class="center">CSInfo</td>
273 <td class=""><?echo $CSInfo;?></td>
274 </tr>
275 <tr>
276 <td class="center">AS</td>
277 <td class=""><?echo $AS;?></td>
278 </tr>
279 <tr>
280 <td class="center">ASInfo</td>
281 <td class=""><?echo $ASInfo;?></td>
282 </tr>
283
284 <tr>
285 <td class="center">MyProductionSpec</td>
286 <td class=""><?echo $myProductionSpec;?></td>
287 </tr>
288 <tr>
289 <td class="center">ProductionSpecList</td>
290 <td class=""><?echo $productionSpec;?></td>
291 </tr>
292 <tr>
293 <td class="center">ProductionSpecInfo</td>
294 <td class=""><?echo $productionSpecInfo;?></td>
295 </tr>
296 <tr>
297 <td class="center">vehicleList</td>
298 <td class=""><?echo $vehicleList;?></td>
299 </tr>
300 <tr>
301 <td class="center">vehicleInfo</td>
302 <td class=""><?echo $vehicleInfo;?></td>
303 </tr>
160 </table> 304 </table>
161 </div> 305 </div>
162 <br> 306 <br>
......