1. mobile/skin/shop/basic/itemuse.skin.php ( 수정삭제버튼 있음 )
1번 페이지에 있는 구매후기에는 본인이 쓴 후기글을 수정/삭제할 수 있는 버튼이 출력되는데
2. mobile/skin/shop/basic/itemuselist.skin.php ( 수정삭제버튼 없음)
2번 페이지에는 수정/삭제 버튼이 출력되지 않아 1번 페이지에 있는 버튼 코드를 2번페이지에 붙혀넣었습니다.
Copy
<?php if ($is_admin || $row['mb_id'] == $member['mb_id']) { ?><div class="sit_use_cmd"><a href="<?php echo $itemuse_form."&is_id={$row['is_id']}&w=u"; ?>" class="itemuse_form btn01" onclick="return false;">수정</a><a href="<?php echo $itemuse_formupdate."&is_id={$row['is_id']}&w=d&hash={$hash}"; ?>" class="itemuse_delete btn01">삭제</a></div> <?php } ?>
위 코드를 붙혀 넣었는데 기능을 하지 않습니다.
어떻게 해결해야 하는지 질문 드립니다.
답변 3개 / 댓글 1개
채택된 답변
+20 포인트
8년 전
붙여 넣은 상태에서 itemuselist.skin.php 파일에서
$row2 = sql_fetch(" select it_name from {$g5['g5_shop_item_table']} where it_id = '{$row['it_id']}' ");
$it_href = G5_SHOP_URL."/item.php?it_id={$row['it_id']}";
여기 바로쯤에 아래내용 추가.
$itemuse_form = "./itemuseform.php?it_id=".$row['it_id'];
$itemuse_formupdate = "./itemuseformupdate.php?it_id=".$row['it_id'];
같은 파일 하단 스크립트에도 추가
$(".itemuse_form").click(function(){
window.open(this.href, "itemuse_form", "width=810,height=680,scrollbars=1");
return false;
});
$(".itemuse_delete").click(function(){
if (confirm("정말 삭제 하시겠습니까?\n\n삭제후에는 되돌릴수 없습니다.")) {
return true;
} else {
return false;
}
});
8년 전
안그래도 다시 여쭤보려했는데 미리 달아주셨네요 감사합니다!
8년 전
와 감사합니다 ㅠ 덕분에 해결했습니다!
답변에 대한 댓글 1개
8년 전
답변을 작성하려면 로그인이 필요합니다.
$itemuse_form = "./itemuseform.php?it_id=".$row['it_id'];
$itemuse_formupdate = "./itemuseformupdate.php?it_id=".$row['it_id'];
여기 아래에 이거 더 추가해보세요.
$hash = md5($row['is_id'].$row['is_time'].$row['is_ip']);