0652c268 by sayhoChun

comment related function complete

1 parent 8609c565
...@@ -263,6 +263,8 @@ if (! class_exists("ApiBoard")) ...@@ -263,6 +263,8 @@ if (! class_exists("ApiBoard"))
263 $boardNo=$this->req["boardNo"]; 263 $boardNo=$this->req["boardNo"];
264 264
265 $sql="UPDATE tblBoard SET status=0 WHERE boardNo='{$boardNo}'"; 265 $sql="UPDATE tblBoard SET status=0 WHERE boardNo='{$boardNo}'";
266 $this->update($sql);
267 return $this->makeResultJson("1", "삭제되었습니다")
266 } 268 }
267 269
268 //고객센터 게시물 저장 270 //고객센터 게시물 저장
...@@ -342,6 +344,8 @@ if (! class_exists("ApiBoard")) ...@@ -342,6 +344,8 @@ if (! class_exists("ApiBoard"))
342 $csNo=$this->req["csNo"]; 344 $csNo=$this->req["csNo"];
343 345
344 $sql="UPDATE tblCustomerService SET status=0 WHERE csNo='{$csNo}'"; 346 $sql="UPDATE tblCustomerService SET status=0 WHERE csNo='{$csNo}'";
347 $this->update($sql);
348 return $this->makeResultJson("1", "삭제되었습니다")
345 } 349 }
346 350
347 //고객센터 게시물 리스트 351 //고객센터 게시물 리스트
...@@ -578,6 +582,40 @@ if (! class_exists("ApiBoard")) ...@@ -578,6 +582,40 @@ if (! class_exists("ApiBoard"))
578 } 582 }
579 } 583 }
580 584
585 function getInfoOfComment(){
586 $commentNo=$this->req["commentNo"];
587 $sql="
588 SELECT *
589 FROM tblComment
590 WHERE commentNo='{$commentNo}'
591 ";
592 $result=$this->getRow($sql);
593 return $this->makeResultJson("1", "", $result);
594 }
595
596 function modifyComment(){
597 $commentNo=$this->req["commentNo"];
598 $content=$this->req["content"];
599 $sql="
600 UPDATE tblComment
601 SET content='$content'
602 WHERE commentNo='{$commentNo}'
603 ";
604 $this->update($sql);
605 }
606
607 function delComment(){
608 $commentNo=$this->req["commentNo"];
609
610 $sql="
611 UPDATE tblComment
612 SET status=0
613 WHERE commentNo='{$commentNo}' OR (
614 commentGroup=(SELECT commentGroup FROM (SELECT * FROM tblComment) AS c WHERE commentNo='{$commentNo}')
615 AND depth > (SELECT depth FROM (SELECT * FROM tblComment) AS c WHERE commentNo='{$commentNo}'))
616 ";
617 }
618
581 //제작사양서 저장 619 //제작사양서 저장
582 function saveProductionSpec(){ 620 function saveProductionSpec(){
583 //$userFk = $this->appUser["no"]; 621 //$userFk = $this->appUser["no"];
......