8609c565 by sayhoChun

board modify, delete added

1 parent 4250d0bc
......@@ -227,6 +227,7 @@ if (! class_exists("ApiBoard"))
}
function modifyBoard(){ //미완성
$boardNo=$this->req["boardNo"];
$imgResult = $this->inFn_Common_fileSave($_FILES);
$title=$this->req["title"];
......@@ -243,25 +244,27 @@ if (! class_exists("ApiBoard"))
$content=$this->req["content"];
$sql="
INSERT INTO tblBoard(userFk, title, imgPathBoard1, imgPathBoard2, imgPathBoard3, imgPathBoard4, imgPathBoard5, content, status, regDate)
VALUES
(
'{$userFk}',
'{$title}',
'{$imgPathBoard1}',
'{$imgPathBoard2}',
'{$imgPathBoard3}',
'{$imgPathBoard4}',
'{$imgPathBoard5}',
'{$content}',
1,
NOW()
)
UPDATE tblBoard
SET
title='{$title}',
imgPathBoard1='{$imgPathBoard1}',
imgPathBoard2='{$imgPathBoard2}',
imgPathBoard3='{$imgPathBoard3}',
imgPathBoard4='{$imgPathBoard4}',
imgPathBoard5='{$imgPathBoard5}',
content='{$content}'
WHERE boardNo='{$boardNo}' AND status=1
";
$this->update($sql);
return $this->makeResultJson("1", "저장되었습니다");
}
function delBoard(){
$boardNo=$this->req["boardNo"];
$sql="UPDATE tblBoard SET status=0 WHERE boardNo='{$boardNo}'";
}
//고객센터 게시물 저장
function saveCS(){
$imgResult = $this->inFn_Common_fileSave($_FILES);
......@@ -298,6 +301,48 @@ if (! class_exists("ApiBoard"))
return $this->makeResultJson("1", "저장되었습니다");
}
function modifyCS(){ //미완성
$csNo=$this->req["csNo"];
$imgResult = $this->inFn_Common_fileSave($_FILES);
$title=$this->req["title"];
$targetType=$this->req["targetType"];
//$userFk = $this->appUser["no"];
$userFk=$this->req["userFk"];
$content=$this->req["content"];
$imgPathCS1 = $imgResult["imgPathCS1"]["saveURL"] != null ? $imgResult["imgPathCS1"]["saveURL"] : $this->req["imgPathCS1"];
$imgPathCS2 = $imgResult["imgPathCS2"]["saveURL"] != null ? $imgResult["imgPathCS2"]["saveURL"] : $this->req["imgPathCS2"];
$imgPathCS3 = $imgResult["imgPathCS3"]["saveURL"] != null ? $imgResult["imgPathCS3"]["saveURL"] : $this->req["imgPathCS3"];
$imgPathCS4 = $imgResult["imgPathCS4"]["saveURL"] != null ? $imgResult["imgPathCS4"]["saveURL"] : $this->req["imgPathCS4"];
$imgPathCS5 = $imgResult["imgPathCS5"]["saveURL"] != null ? $imgResult["imgPathCS5"]["saveURL"] : $this->req["imgPathCS5"];
$sql="
UPDATE tblCustomerService
SET
title='{$title}',
targetType='{$targetType}',
imgPathCS1='{$imgPathCS1}',
imgPathCS2='{$imgPathCS2}',
imgPathCS3='{$imgPathCS3}',
imgPathCS4='{$imgPathCS4}',
imgPathCS5='{$imgPathCS5}',
content='{$content}'
WHERE csNo='{$csNo}' AND status=1
";
$this->update($sql);
return $this->makeResultJson("1", "저장되었습니다");
}
function delCS(){
$csNo=$this->req["csNo"];
$sql="UPDATE tblCustomerService SET status=0 WHERE csNo='{$csNo}'";
}
//고객센터 게시물 리스트
function getListOfCS(){
......