채택완료

게시글 작성 후 이동하는 url 질문

2017-05-02 (화) 17:05:23 5,082

온라인 예약 게시판을 만든 후

예약 완료 후 alert("완료");

뜨고 특정 페이지로 이동 시키고 싶은데요

이거 어디서 수정해야 하나요....

예약 게시판은 관리자만 볼 수 있기에 

예약 완료되자 마자 alert문으로 글을 읽을 권한이 없습니다.

가 나옵니다 ㅠㅠ

|

답변 2개 / 댓글 4개

채택된 답변
+20 포인트

bbs\write_update.php 에서 하단에 아래와 같이 수정해주세요.

if ($file_upload_msg) {
    alert($file_upload_msg, G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr);
} else {

    if ($bo_table=='reservation') { //reservation은 온라인 예약 게시판

    alert('완료');
    goto_url('http://sir.kr');

    } else {

    goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr);

    }

}

답변에 대한 댓글 4개

2017-05-02 (화) 17:21:29
alert문은 잘 뜨는데 이동이 안되네요 ㅠㅠ...
2017-05-02 (화) 17:21:59
if ($file_upload_msg){
alert($file_upload_msg, G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr);
}
else{
if($bo_table=='sub0702'){
alert("예약신청 완료되었습니다. 예약 스케줄 확인 후 연락 드리겠습니다.");
goto_url('http://www.google.com');
}else{
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr);
}
}
2017-05-02 (화) 17:25:27
글 등록과 alert 정상적이나
글 등록을 해도 글 등록 페이지에 머뭅니다..
2017-05-02 (화) 17:29:04
alert("예약신청 완료되었습니다. 예약 스케줄 확인 후 연락 드리겠습니다.","board.php?bo_table=sub0701");
이런 식으로 하니까 되네요 답변 감사합니다 ㅎㅎ

아래와 같이 수정해보세요.

if ($file_upload_msg){
    alert($file_upload_msg, G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr);
}
else{
if ($bo_table=='sub0702') alert('예약신청 완료되었습니다. 예약 스케줄 확인 후 연락 드리겠습니다.', 'http://www.google.com'); 
else
    goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr); 
}  

답변을 작성하려면 로그인이 필요합니다.