8609c565 by sayhoChun

board modify, delete added

1 parent 4250d0bc
...@@ -227,6 +227,7 @@ if (! class_exists("ApiBoard")) ...@@ -227,6 +227,7 @@ if (! class_exists("ApiBoard"))
227 } 227 }
228 228
229 function modifyBoard(){ //미완성 229 function modifyBoard(){ //미완성
230 $boardNo=$this->req["boardNo"];
230 $imgResult = $this->inFn_Common_fileSave($_FILES); 231 $imgResult = $this->inFn_Common_fileSave($_FILES);
231 232
232 $title=$this->req["title"]; 233 $title=$this->req["title"];
...@@ -243,25 +244,27 @@ if (! class_exists("ApiBoard")) ...@@ -243,25 +244,27 @@ if (! class_exists("ApiBoard"))
243 $content=$this->req["content"]; 244 $content=$this->req["content"];
244 245
245 $sql=" 246 $sql="
246 INSERT INTO tblBoard(userFk, title, imgPathBoard1, imgPathBoard2, imgPathBoard3, imgPathBoard4, imgPathBoard5, content, status, regDate) 247 UPDATE tblBoard
247 VALUES 248 SET
248 ( 249 title='{$title}',
249 '{$userFk}', 250 imgPathBoard1='{$imgPathBoard1}',
250 '{$title}', 251 imgPathBoard2='{$imgPathBoard2}',
251 '{$imgPathBoard1}', 252 imgPathBoard3='{$imgPathBoard3}',
252 '{$imgPathBoard2}', 253 imgPathBoard4='{$imgPathBoard4}',
253 '{$imgPathBoard3}', 254 imgPathBoard5='{$imgPathBoard5}',
254 '{$imgPathBoard4}', 255 content='{$content}'
255 '{$imgPathBoard5}', 256 WHERE boardNo='{$boardNo}' AND status=1
256 '{$content}',
257 1,
258 NOW()
259 )
260 "; 257 ";
261 $this->update($sql); 258 $this->update($sql);
262 return $this->makeResultJson("1", "저장되었습니다"); 259 return $this->makeResultJson("1", "저장되었습니다");
263 } 260 }
264 261
262 function delBoard(){
263 $boardNo=$this->req["boardNo"];
264
265 $sql="UPDATE tblBoard SET status=0 WHERE boardNo='{$boardNo}'";
266 }
267
265 //고객센터 게시물 저장 268 //고객센터 게시물 저장
266 function saveCS(){ 269 function saveCS(){
267 $imgResult = $this->inFn_Common_fileSave($_FILES); 270 $imgResult = $this->inFn_Common_fileSave($_FILES);
...@@ -299,6 +302,48 @@ if (! class_exists("ApiBoard")) ...@@ -299,6 +302,48 @@ if (! class_exists("ApiBoard"))
299 302
300 } 303 }
301 304
305 function modifyCS(){ //미완성
306 $csNo=$this->req["csNo"];
307 $imgResult = $this->inFn_Common_fileSave($_FILES);
308
309 $title=$this->req["title"];
310 $targetType=$this->req["targetType"];
311 //$userFk = $this->appUser["no"];
312 $userFk=$this->req["userFk"];
313 $content=$this->req["content"];
314
315 $imgPathCS1 = $imgResult["imgPathCS1"]["saveURL"] != null ? $imgResult["imgPathCS1"]["saveURL"] : $this->req["imgPathCS1"];
316 $imgPathCS2 = $imgResult["imgPathCS2"]["saveURL"] != null ? $imgResult["imgPathCS2"]["saveURL"] : $this->req["imgPathCS2"];
317 $imgPathCS3 = $imgResult["imgPathCS3"]["saveURL"] != null ? $imgResult["imgPathCS3"]["saveURL"] : $this->req["imgPathCS3"];
318 $imgPathCS4 = $imgResult["imgPathCS4"]["saveURL"] != null ? $imgResult["imgPathCS4"]["saveURL"] : $this->req["imgPathCS4"];
319 $imgPathCS5 = $imgResult["imgPathCS5"]["saveURL"] != null ? $imgResult["imgPathCS5"]["saveURL"] : $this->req["imgPathCS5"];
320
321
322
323
324 $sql="
325 UPDATE tblCustomerService
326 SET
327 title='{$title}',
328 targetType='{$targetType}',
329 imgPathCS1='{$imgPathCS1}',
330 imgPathCS2='{$imgPathCS2}',
331 imgPathCS3='{$imgPathCS3}',
332 imgPathCS4='{$imgPathCS4}',
333 imgPathCS5='{$imgPathCS5}',
334 content='{$content}'
335 WHERE csNo='{$csNo}' AND status=1
336 ";
337 $this->update($sql);
338 return $this->makeResultJson("1", "저장되었습니다");
339 }
340
341 function delCS(){
342 $csNo=$this->req["csNo"];
343
344 $sql="UPDATE tblCustomerService SET status=0 WHERE csNo='{$csNo}'";
345 }
346
302 //고객센터 게시물 리스트 347 //고객센터 게시물 리스트
303 function getListOfCS(){ 348 function getListOfCS(){
304 $searchText=$this->req["searchText"]; 349 $searchText=$this->req["searchText"];
......