New Feeds

[질답/버그/제안] apms.js 파일에 apms_scrap 로 별도로 만들고 싶은되요

작성자 정보

  • 관리자 작성
  • 작성일

컨텐츠 정보

본문

아래 부분이 실행 이 안되고 

null 만 나오는되요


이부분에 추가 할려면 별도로 진행 해야 되나요?

조언 구합니다.


bbsscrap.php

// 자바스크립트 사용가능할 때
if($_POST['js'] == "on") {

$error = $success = $count = "";

function print_result($error, $success, $count) {
echo '{ "error": "' . $error . '", "success": "' . $success . '", "count": "' . $count . '" }';
exit;
}

if (!$is_member) {
$error = 'login';
print_result($error, $success, $count);
}

if (!($bo_table && $wr_id)) {
$error = '값이 제대로 넘어오지 않았습니다.';
print_result($error, $success, $count);
}

$sql = " SELECT count(ms_id) AS cnt FROM g5_scrap WHERE mb_id='{mb_id}' AND bo_table = '{$bo_table}' AND wr_id = '{$wr_id}' ";
$row = sql_fetch($sql);
$error = $sql;




}








apms.js

function apms_bbs_scrap(mb_id, bo_table, wr_id, id) {
var href = g5_bbs_url + '/bbsscrap.php?id=' + mb_id + '&bo_table=' + bo_table + '&wr_id=' + wr_id;
$.post(href, { js: "on" }, function (data) {
console.log(data);

}, "json");
}

관련자료

댓글 0
등록된 댓글이 없습니다.
전체 1,963 / 1 페이지
번호
제목
이름

Favorites


최근글


새댓글


  • 댓글이 없습니다.
알림 0