From 75418eb7c18d6d456a1c5a67654cfee54ab637e5 Mon Sep 17 00:00:00 2001 From: gnuboard Date: Tue, 18 Jun 2013 11:02:52 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=EC=82=AC=EC=9A=A9=ED=9B=84=EA=B8=B0=20?= =?UTF-8?q?=EC=83=81=ED=92=88=EB=AC=B8=EC=9D=98=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/alert_login.php | 13 +++ lib/common.lib.php | 15 +++ shop/item.php | 9 ++ shop/itemqa.php | 198 +++++++++++++++++++++++++++++++++++++ shop/itemqaform.php | 82 +++++++++++++++ shop/itemqaformupdate.php | 70 +++++++++++++ shop/itemqaupdate.php | 112 --------------------- shop/itemuseform.php | 2 +- shop/itemuseformupdate.php | 2 +- 9 files changed, 389 insertions(+), 114 deletions(-) create mode 100644 bbs/alert_login.php create mode 100644 shop/itemqa.php create mode 100644 shop/itemqaform.php create mode 100644 shop/itemqaformupdate.php delete mode 100644 shop/itemqaupdate.php diff --git a/bbs/alert_login.php b/bbs/alert_login.php new file mode 100644 index 000000000..4e93f9333 --- /dev/null +++ b/bbs/alert_login.php @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file diff --git a/lib/common.lib.php b/lib/common.lib.php index 274271520..0de04ebb0 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -169,6 +169,21 @@ function alert_close($msg, $error=true) exit; } + +// 경고메세지 출력후 창을 닫음 +function alert_login($msg, $url) +{ + global $g4; + + $header = ''; + if (isset($g4['title'])) { + $header = $g4['title']; + } + include_once(G4_BBS_PATH.'/alert_login.php'); + exit; +} + + // confirm 창 function confirm($msg, $url1='', $url2='', $url3='') { diff --git a/shop/item.php b/shop/item.php index 5f8984d9e..9368e8849 100644 --- a/shop/item.php +++ b/shop/item.php @@ -597,9 +597,18 @@ else

상품문의

+
+ + diff --git a/shop/itemqa.php b/shop/itemqa.php new file mode 100644 index 000000000..cc30052c6 --- /dev/null +++ b/shop/itemqa.php @@ -0,0 +1,198 @@ + + +
+

등록된 상품문의

+ + '; + ?> + +
  • + +
    +
    작성자
    +
    +
    작성일
    +
    +
    상태
    +
    +
    + + + +
  • + + +
  • + +
    +
    작성자
    +
    +
    작성일
    +
    +
    + + +
  • + + = 0) echo ''; + + if (!$i) echo '

    상품문의가 없습니다.

    '; + ?> +
    + + 1) { + $str .= '처음'.PHP_EOL; + } + + $start_page = ( ( (int)( ($cur_page - 1 ) / $write_pages ) ) * $write_pages ) + 1; + $end_page = $start_page + $write_pages - 1; + + if ($end_page >= $total_page) $end_page = $total_page; + + if ($start_page > 1) $str .= '이전'.PHP_EOL; + + if ($total_page > 1) { + for ($k=$start_page;$k<=$end_page;$k++) { + if ($cur_page != $k) + $str .= ''.$k.'페이지'.PHP_EOL; + else + $str .= '열린'.$k.'페이지'.PHP_EOL; + } + } + + if ($total_page > $end_page) $str .= '다음'.PHP_EOL; + + if ($cur_page < $total_page) { + $str .= '맨끝'.PHP_EOL; + } + + if ($str) + return ""; + else + return ""; +} + +echo itemqa_page(10, $page, $total_page, "./itemqa.php?it_id=$it_id&page=", ""); +?> + +
    + + 상품문의 쓰기 새 창 + 더보기 +
    + + + + \ No newline at end of file diff --git a/shop/itemqaform.php b/shop/itemqaform.php new file mode 100644 index 000000000..d9bb2a6be --- /dev/null +++ b/shop/itemqaform.php @@ -0,0 +1,82 @@ + + + +
    +
    + + + +
    + 상품문의 쓰기 +
      +
    • + + +
    • +
    • + + +
    • +
    + +
    +
    +
    + + + + \ No newline at end of file diff --git a/shop/itemqaformupdate.php b/shop/itemqaformupdate.php new file mode 100644 index 000000000..b90df62ff --- /dev/null +++ b/shop/itemqaformupdate.php @@ -0,0 +1,70 @@ + diff --git a/shop/itemqaupdate.php b/shop/itemqaupdate.php deleted file mode 100644 index c4d31d50c..000000000 --- a/shop/itemqaupdate.php +++ /dev/null @@ -1,112 +0,0 @@ - diff --git a/shop/itemuseform.php b/shop/itemuseform.php index c6fab9cae..ad24c5ab1 100644 --- a/shop/itemuseform.php +++ b/shop/itemuseform.php @@ -10,7 +10,7 @@ $it_id = escape_trim($_REQUEST['it_id']); $is_id = escape_trim($_REQUEST['is_id']); if (!$is_member) { - alert("사용후기는 회원만 평가가 가능합니다.", G4_BBS_URL."/login.php"); + alert_close("사용후기는 회원만 작성 가능합니다."); } if ($w == "") { diff --git a/shop/itemuseformupdate.php b/shop/itemuseformupdate.php index b5f71ecf4..9e994f0ef 100644 --- a/shop/itemuseformupdate.php +++ b/shop/itemuseformupdate.php @@ -2,7 +2,7 @@ include_once('./_common.php'); if (!$is_member) { - alert_close("사용후기는 회원만 등록이 가능합니다."); + alert_close("사용후기는 회원만 작성이 가능합니다."); } $is_subject = trim($_REQUEST['is_subject']); From 3680563f126567cd024796e64b11bfc2c53158ef Mon Sep 17 00:00:00 2001 From: gnuboard Date: Tue, 18 Jun 2013 18:05:07 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=EC=82=AC=EC=9A=A9=ED=9B=84=EA=B8=B0,=20?= =?UTF-8?q?=EC=83=81=ED=92=88=EB=AC=B8=EC=9D=98=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20=EC=99=84=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/itemqaform.php | 23 ++- adm/shop_admin/itemqaformupdate.php | 16 +- adm/shop_admin/itemqalist.php | 72 +++++++- adm/shop_admin/itemqalistupdate.php | 39 +++++ adm/shop_admin/itemuseform.php | 1 - shop/item.php | 10 -- shop/itemqa.inc.php | 240 ------------------------- shop/itemqa.php | 262 ++-------------------------- shop/itemqaform.php | 76 -------- shop/itemqaformupdate.php | 109 ++---------- shop/itemuse.php | 31 ++-- shop/itemuseformupdate.php | 24 ++- 12 files changed, 206 insertions(+), 697 deletions(-) create mode 100644 adm/shop_admin/itemqalistupdate.php delete mode 100644 shop/itemqa.inc.php diff --git a/adm/shop_admin/itemqaform.php b/adm/shop_admin/itemqaform.php index af291ed56..aaac87b9a 100644 --- a/adm/shop_admin/itemqaform.php +++ b/adm/shop_admin/itemqaform.php @@ -1,6 +1,7 @@ +
    + + + + + +

    상품문의 수정/답변

    상품에 대한 문의에 답변하실 수 있습니다. 상품 문의 내용의 수정도 가능합니다.

    @@ -48,11 +56,12 @@ $qstr = 'page='.$page.'&sort1='.$sort1.'&sort2='.$sort2; - + - + + @@ -65,6 +74,16 @@ $qstr = 'page='.$page.'&sort1='.$sort1.'&sort2='.$sort2;
    + + diff --git a/adm/shop_admin/itemqaformupdate.php b/adm/shop_admin/itemqaformupdate.php index 4c42eafa8..50e53f816 100644 --- a/adm/shop_admin/itemqaformupdate.php +++ b/adm/shop_admin/itemqaformupdate.php @@ -9,14 +9,10 @@ if ($w == 'd') else auth_check($auth[$sub_menu], "w"); -$iq = sql_fetch(" select * from {$g4['shop_item_qa_table']} where iq_id = '$iq_id' "); -if (!$iq['iq_id']) { - alert('등록된 자료가 없습니다.'); -} - $qstr = "page=$page&sort1=$sort1&sort2=$sort2"; -if ($w == "u") { +if ($w == "u") +{ $sql = "update {$g4['shop_item_qa_table']} set iq_subject = '$iq_subject', iq_question = '$iq_question', @@ -25,12 +21,8 @@ if ($w == "u") { sql_query($sql); goto_url("./itemqaform.php?w=$w&iq_id=$iq_id&$qstr"); -} else if ($w == "d") { - $sql = "delete from {$g4['shop_item_qa_table']} where iq_id = '$iq_id' "; - sql_query($sql); - - goto_url("./itemqalist.php?$qstr"); -} else { +} +else { alert(); } ?> diff --git a/adm/shop_admin/itemqalist.php b/adm/shop_admin/itemqalist.php index 9e203117d..8c3bcc681 100644 --- a/adm/shop_admin/itemqalist.php +++ b/adm/shop_admin/itemqalist.php @@ -110,9 +110,21 @@ if ($sfl || $stx) // 검색 결과일 때만 처음 버튼을 보여줌
  • 답변 순 정렬
  • + + + + + + + + + @@ -124,36 +136,84 @@ if ($sfl || $stx) // 검색 결과일 때만 처음 버튼을 보여줌 + - + '; + echo ''; } ?>
    + + + 상품명 이름 질문
    + + + + + + + 수정 - 삭제
    자료가 없습니다.
    자료가 없습니다.
    +
    + + +
    +
    + + + diff --git a/adm/shop_admin/itemqalistupdate.php b/adm/shop_admin/itemqalistupdate.php new file mode 100644 index 000000000..b81d07653 --- /dev/null +++ b/adm/shop_admin/itemqalistupdate.php @@ -0,0 +1,39 @@ + diff --git a/adm/shop_admin/itemuseform.php b/adm/shop_admin/itemuseform.php index cea759926..36ab83f25 100644 --- a/adm/shop_admin/itemuseform.php +++ b/adm/shop_admin/itemuseform.php @@ -32,7 +32,6 @@ $qstr = 'page='.$page.'&sort1='.$sort1.'&sort2='.$sort2; -

    사용후기 수정

    diff --git a/shop/item.php b/shop/item.php index c3ad7d4ae..45f4e9f9c 100644 --- a/shop/item.php +++ b/shop/item.php @@ -600,16 +600,6 @@ else $("#itemqa").load("./itemqa.php", {it_id:""}); }); -<<<<<<< HEAD - - -======= ->>>>>>> 8ba2a84198461168008549042bbfc2d01e738d03
    diff --git a/shop/itemqa.inc.php b/shop/itemqa.inc.php deleted file mode 100644 index b51a01d10..000000000 --- a/shop/itemqa.inc.php +++ /dev/null @@ -1,240 +0,0 @@ - - -
    -

    등록된 상품문의

    - - "; - //if ($row[iq_answer]) $qa .= ""; - //$qa = "$qa"; - - $iq_stats = ''; - $iq_answer = ''; - $iq_flag = 0; - if ($row['iq_answer']) - { - $iq_answer = conv_content($row['iq_answer'],0); - $iq_stats = '답변완료'; - } else { - $iq_stats = '답변전'; - $iq_answer = '답변이 등록되지 않았습니다.'; - $iq_flag = 1; - } - - if ($i == 0) echo '
      '; - ?> - -
    1. - -
      -
      작성자
      -
      -
      작성일
      -
      -
      상태
      -
      -
      - -
      -

      - 문의내용
      - -

      -

      - 답변
      - -

      - - - - - - - -
      - - -
      - -
      - -
      -
      - - - - 삭제하시려면 글 작성 시 입력하신 패스워드를 입력해주세요. - - - -
      -
      -
    2. - - = 0) echo '
    '; - - if (!$i) echo '

    상품문의가 없습니다.

    '; - ?> -
    - -
    - -
    - -
    -

    상품문의 작성

    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - 패스워드는 최소 3글자 이상 입력하십시오. - -
    자동등록방지
    - -
    - -
    -
    -
    - - - - diff --git a/shop/itemqa.php b/shop/itemqa.php index 2d044548c..e98987a01 100644 --- a/shop/itemqa.php +++ b/shop/itemqa.php @@ -1,4 +1,3 @@ -<<<<<<< HEAD
    @@ -37,7 +36,7 @@ include_once(G4_PATH.'/head.sub.php'); $iq_star = get_star($row['iq_score']); $iq_name = get_text($row['iq_name']); $iq_subject = conv_subject($row['iq_subject'],50,"…"); - $iq_question = get_view_thumbnail($row['iq_question'], 300); + $iq_question = get_view_thumbnail($row['iq_question'], $thumbnail_width); $iq_time = substr($row['iq_time'], 2, 8); $iq_href = './itemqalist.php?bo_table=itemqa&wr_id='.$row['wr_id']; @@ -47,15 +46,15 @@ include_once(G4_PATH.'/head.sub.php'); $iq_stats = ''; $iq_answer = ''; - $iq_flag = 0; if ($row['iq_answer']) { - $iq_answer = get_view_thumbnail($row['iq_answer'], 300); + $iq_answer = get_view_thumbnail($row['iq_answer'], $thumbnail_width); $iq_stats = '답변완료'; + $is_answer = true; } else { $iq_stats = '답변전'; $iq_answer = '답변이 등록되지 않았습니다.'; - $iq_flag = 1; + $is_answer = false; } if ($i == 0) echo '
      '; @@ -77,41 +76,22 @@ include_once(G4_PATH.'/head.sub.php'); 문의내용

      -

      - 답변
      - -

      - + - - - - -
    1. - -
      -
      작성자
      -
      -
      작성일
      -
      -
      - - +
    2. $(function(){ $(".itemqa_form").click(function(){ - window.open(this.href, "itemqa_form", "width=800,height=550"); + window.open(this.href, "itemqa_form", "width=800,height=500"); + }); + + $(".itemqa_delete").click(function(){ + return confirm("정말 삭제 하시겠습니까?\n\n삭제후에는 되돌릴수 없습니다."); }); $(".qa_href").click(function(){ @@ -193,217 +177,3 @@ $(function(){ }); }); - - -======= - - -
      -

      등록된 상품문의

      - - "; - //if ($row[iq_answer]) $qa .= ""; - //$qa = "$qa"; - - $iq_stats = ''; - $iq_answer = ''; - $iq_flag = 0; - if ($row['iq_answer']) - { - $iq_answer = conv_content($row['iq_answer'],0); - $iq_stats = '답변완료'; - } else { - $iq_stats = '답변전'; - $iq_answer = '답변이 등록되지 않았습니다.'; - $iq_flag = 1; - } - - if ($i == 0) echo '
        '; - ?> - -
      1. - -
        -
        작성자
        -
        -
        작성일
        -
        -
        상태
        -
        -
        - -
        -

        - 문의내용
        - -

        -

        - 답변
        - -

        - - - - - - - -
        - 수정 - 삭제 -
        - -
        -
      2. - - = 0) echo '
      '; - - if (!$i) echo '

      상품문의가 없습니다.

      '; - ?> -
      - - 1) { - $str .= '처음'.PHP_EOL; - } - - $start_page = ( ( (int)( ($cur_page - 1 ) / $write_pages ) ) * $write_pages ) + 1; - $end_page = $start_page + $write_pages - 1; - - if ($end_page >= $total_page) $end_page = $total_page; - - if ($start_page > 1) $str .= '이전'.PHP_EOL; - - if ($total_page > 1) { - for ($k=$start_page;$k<=$end_page;$k++) { - if ($cur_page != $k) - $str .= ''.$k.'페이지'.PHP_EOL; - else - $str .= '열린'.$k.'페이지'.PHP_EOL; - } - } - - if ($total_page > $end_page) $str .= '다음'.PHP_EOL; - - if ($cur_page < $total_page) { - $str .= '맨끝'.PHP_EOL; - } - - if ($str) - return ""; - else - return ""; -} - -echo itemqa_page($config['cf_write_pages'], $page, $total_page, "./itemqa.php?it_id=$it_id&page=", ""); -?> - - - - ->>>>>>> 8ba2a84198461168008549042bbfc2d01e738d03 diff --git a/shop/itemqaform.php b/shop/itemqaform.php index f4fdfc937..d9bb2a6be 100644 --- a/shop/itemqaform.php +++ b/shop/itemqaform.php @@ -1,4 +1,3 @@ -<<<<<<< HEAD -
      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - 패스워드는 최소 3글자 이상 입력하십시오. - -
      자동등록방지
      - -
      - -
      -
      -
      - - - ->>>>>> 8ba2a84198461168008549042bbfc2d01e738d03 ?> \ No newline at end of file diff --git a/shop/itemqaformupdate.php b/shop/itemqaformupdate.php index 4116040e0..2e5a60402 100644 --- a/shop/itemqaformupdate.php +++ b/shop/itemqaformupdate.php @@ -1,16 +1,15 @@ >>>>>> 8ba2a84198461168008549042bbfc2d01e738d03 } -$url = "./item.php?it_id=$it_id"; +$url = "./item.php?it_id=$it_id&_=".get_token()."#sit_qa"; -<<<<<<< HEAD if ($w == "") { -======= -if ($w == '') -{ - $sql = " select max(iq_id) as max_iq_id from {$g4['shop_item_qa_table']} "; - $row = sql_fetch($sql); - $max_iq_id = $row['max_iq_id']; - - $sql = " select max(iq_id) as max_iq_id from {$g4['shop_item_qa_table']} - where it_id = '$it_id' - and mb_id = '{$member['mb_id']}' "; - $row = sql_fetch($sql); - if ($row['max_iq_id'] && $row['max_iq_id'] == $max_iq_id) - alert('같은 상품에 대하여 계속해서 질문 하실 수 없습니다.'); - ->>>>>>> 8ba2a84198461168008549042bbfc2d01e738d03 $sql = "insert {$g4['shop_item_qa_table']} set it_id = '$it_id', mb_id = '{$member['mb_id']}', @@ -76,24 +34,17 @@ if ($w == '') iq_ip = '$REMOTE_ADDR' "; sql_query($sql); -<<<<<<< HEAD alert_opener("상품문의가 등록 되었습니다.", $url); } else if ($w == "u") -======= - alert_opener('상품문의가 등록되었습니다.', $url); -} -else if ($w == 'u') ->>>>>>> 8ba2a84198461168008549042bbfc2d01e738d03 { - $sql = " select iq_password from {$g4['shop_item_qa_table']} where iq_id = '$iq_id' "; - $row = sql_fetch($sql); - if ($row['iq_password'] != $iq_password) -<<<<<<< HEAD - alert("패스워드가 틀리므로 수정하실 수 없습니다."); -======= - alert('패스워드가 틀리므로 수정하실 수 없습니다.'); ->>>>>>> 8ba2a84198461168008549042bbfc2d01e738d03 + if (!$is_amdin) + { + $sql = " select count(*) as cnt from {$g4['shop_item_qa_table']} where mb_id = '{$member['mb_id']}' and iq_id = '$iq_id' "; + $row = sql_fetch($sql); + if (!$row['cnt']) + alert("자신의 상품문의만 수정하실 수 있습니다."); + } $sql = " update {$g4['shop_item_qa_table']} set iq_subject = '$iq_subject', @@ -101,25 +52,19 @@ else if ($w == 'u') where iq_id = '$iq_id' "; sql_query($sql); -<<<<<<< HEAD alert_opener("상품문의가 수정 되었습니다.", $url); } else if ($w == "d") { if (!$is_admin) -======= - alert_opener('상품문의가 수정되었습니다.', $url); -} -else if ($w == 'd') -{ - if ($is_member) ->>>>>>> 8ba2a84198461168008549042bbfc2d01e738d03 { - $sql = " select count(*) as cnt from {$g4['shop_item_qa_table']} where mb_id = '{$member['mb_id']}' and iq_id = '$iq_id' "; + $sql = " select iq_answer from {$g4['shop_item_qa_table']} where mb_id = '{$member['mb_id']}' and iq_id = '$iq_id' "; $row = sql_fetch($sql); - if (!$row['cnt']) -<<<<<<< HEAD + if (!$row) alert("자신의 상품문의만 삭제하실 수 있습니다."); + + if ($row['iq_answer']) + alert("답변이 있는 상품문의는 삭제하실 수 없습니다."); } //$sql = " delete from {$g4['shop_item_qa_table']} where mb_id = '{$member['mb_id']}' and iq_id = '$iq_id' "; @@ -127,23 +72,5 @@ else if ($w == 'd') sql_query($sql); alert("상품문의가 삭제 되었습니다.", $url); -======= - die('자신의 상품문의만 삭제하실 수 있습니다.'); - } - else - { - $iq_password = sql_password($iq_password); - - $sql = " select iq_password from {$g4['shop_item_qa_table']} where iq_id = '$iq_id' "; - $row = sql_fetch($sql); - if ($row['iq_password'] != $iq_password) - die('패스워드가 틀리므로 삭제하실 수 없습니다.'); - } - - $sql = " delete from {$g4['shop_item_qa_table']} where mb_id = '{$member['mb_id']}' and iq_id = '$iq_id' "; - sql_query($sql); - - goto_url($url); ->>>>>>> 8ba2a84198461168008549042bbfc2d01e738d03 } ?> diff --git a/shop/itemuse.php b/shop/itemuse.php index 65408f70f..3ac830143 100644 --- a/shop/itemuse.php +++ b/shop/itemuse.php @@ -4,10 +4,9 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php'); $it_id = $_REQUEST['it_id']; -$itemuse_form = "./itemuseform.php?it_id=".$it_id; $itemuse_list = "./itemuselist.php"; - -//include_once(G4_PATH.'/head.sub.php'); +$itemuse_form = "./itemuseform.php?it_id=".$it_id; +$itemuse_formupdate = "./itemuseformupdate.php?it_id=".$it_id; ?>
      @@ -48,6 +47,8 @@ $itemuse_list = "./itemuselist.php"; $is_time = substr($row['is_time'], 2, 8); $is_href = './itemuselist.php?bo_table=itemuse&wr_id='.$row['wr_id']; + $hash = md5($row['is_id'].$row['is_time'].$row['is_ip']); + // http://stackoverflow.com/questions/6967081/show-hide-multiple-divs-with-jquery?answertab=votes#tab-top if ($i == 0) echo '
        '; @@ -68,6 +69,13 @@ $itemuse_list = "./itemuselist.php";

        + + + + @@ -122,18 +130,25 @@ echo itemuse_page($config['cf_write_pages'], $page, $total_page, "./itemuse.php? ?> - - \ No newline at end of file diff --git a/shop/itemuseformupdate.php b/shop/itemuseformupdate.php index 9e994f0ef..cdbc24f3f 100644 --- a/shop/itemuseformupdate.php +++ b/shop/itemuseformupdate.php @@ -16,9 +16,10 @@ if ($w == "" || $w == "u") { if (!$is_content) alert("내용을 입력하여 주십시오."); } -$url = "./item.php?it_id=$it_id"; +$url = "./item.php?it_id=$it_id&_=".get_token()."#sit_use"; -if ($w == "") { +if ($w == "") +{ /* $sql = " select max(is_id) as max_is_id from {$g4['shop_item_use_table']} "; $row = sql_fetch($sql); @@ -49,7 +50,9 @@ if ($w == "") { } else { alert_opener("사용후기가 등록 되었습니다.", $url); } -} else if ($w == "u") { +} +else if ($w == "u") +{ $sql = " select is_password from {$g4['shop_item_use_table']} where is_id = '$is_id' "; $row = sql_fetch($sql); if ($row['is_password'] != $is_password) @@ -64,4 +67,19 @@ if ($w == "") { alert_opener("사용후기가 수정 되었습니다.", $url); } +else if ($w == "d") +{ + if (!$is_admin) + { + $sql = " select count(*) as cnt from {$g4['shop_item_use_table']} where mb_id = '{$member['mb_id']}' and is_id = '$is_id' "; + $row = sql_fetch($sql); + if (!$row['cnt']) + alert("자신의 사용후기만 삭제하실 수 있습니다."); + } + + $sql = " delete from {$g4['shop_item_use_table']} where is_id = '$is_id' and md5(concat(is_id,is_time,is_ip)) = '{$hash}' "; + sql_query($sql); + + alert("사용후기를 삭제 하였습니다.", $url); +} ?> \ No newline at end of file