견적의뢰 폼으로 등록된 글이 삭제가 안되는군요.
본문
고수님들 소스한번 봐주십솨.
아래 소스를 메인화면에 걸어놓고 견적의뢰로 사용시
등록된 글이 삭제가 안되더라구요.
게시판에서 직접 글쓰기 하면 삭제가 되구요.
<?
$g5_path = ".."; // 그누보드가 있는 상대경로를 적어줌
?>
<form name=frm method=post action="<?=$g5['path']?>/bbs/write_update_nonecapcha.php" onsubmit="return checkFrm(this);">
<input type=hidden name=w value="">
<input type=hidden name=bo_table value="estimate"> <!--보낼 게시판명-->
<input type=hidden name=wr_id value="">
<input type=hidden name=sca value="">
<input type=hidden name=sfl value="">
<input type=hidden name=stx value="">
<input type=hidden name=spt value="">
<input type=hidden name=sst value="">
<input type=hidden name=sod value="">
<input type=hidden name=s value="s">
<input type=hidden name=wr_subject value="문의합니다.">
<input type=hidden name=wr_content value="">
<input type=hidden name="wr_1" value="">
<input type="hidden" name="wr_8" value="답변준비중..."> <!--/기초상태-->
<input type=hidden name="secret" value="secret">
<ul class="send">
<li>
<!--폼그룹/-->
<div class="form-group">
<div class="col-sm-6">
<label>담당자명</label>
<input class='form-control' type="text" name="wr_name" required itemname="담당자명">
</div>
<div class="col-sm-6">
<label>비밀번호 설정</label>
<input type="password" name="wr_password" id="wr_password" class='form-control' maxlength="20">
</div>
</div>
</li>
<li>
<!--폼그룹/-->
<div class="form-group">
<div class="col-sm-4">
<label>통신사선택</label>
<select name='wr_1' class="form-control " required>
<option value="010" <? if ($hp_num[0] == "010") { echo "selected"; } ?>>010</option>
<option value="011" <? if ($hp_num[0] == "011") { echo "selected"; } ?>>011</option>
<option value="016" <? if ($hp_num[0] == "016") { echo "selected"; } ?>>016</option>
<option value="017" <? if ($hp_num[0] == "017") { echo "selected"; } ?>>017</option>
<option value="018" <? if ($hp_num[0] == "018") { echo "selected"; } ?>>018</option>
<option value="019" <? if ($hp_num[0] == "019") { echo "selected"; } ?>>019</option>
<option value="02" <? if ($hp_num[0] == "02") { echo "selected"; } ?>>02</option>
<option value="032" <? if ($hp_num[0] == "032") { echo "selected"; } ?>>032</option>
<option value="042" <? if ($hp_num[0] == "042") { echo "selected"; } ?>>042</option>
<option value="062" <? if ($hp_num[0] == "062") { echo "selected"; } ?>>062</option>
<option value="053" <? if ($hp_num[0] == "053") { echo "selected"; } ?>>053</option>
<option value="052" <? if ($hp_num[0] == "052") { echo "selected"; } ?>>052</option>
<option value="051" <? if ($hp_num[0] == "051") { echo "selected"; } ?>>051</option>
<option value="031" <? if ($hp_num[0] == "031") { echo "selected"; } ?>>031</option>
<option value="033" <? if ($hp_num[0] == "033") { echo "selected"; } ?>>033</option>
<option value="043" <? if ($hp_num[0] == "043") { echo "selected"; } ?>>043</option>
<option value="041" <? if ($hp_num[0] == "041") { echo "selected"; } ?>>041</option>
<option value="063" <? if ($hp_num[0] == "063") { echo "selected"; } ?>>063</option>
<option value="061" <? if ($hp_num[0] == "061") { echo "selected"; } ?>>061</option>
<option value="054" <? if ($hp_num[0] == "054") { echo "selected"; } ?>>054</option>
<option value="055" <? if ($hp_num[0] == "055") { echo "selected"; } ?>>055</option>
<option value="064" <? if ($hp_num[0] == "064") { echo "selected"; } ?>>064</option>
<option value="0505" <? if ($hp_num[0] == "0505") { echo "selected"; } ?>>0505</option>
<option value="070" <? if ($hp_num[0] == "070") { echo "selected"; } ?>>070</option>
</select>
</div>
<div class="col-sm-4">
<label>번호 앞 4자리</label>
<input class='form-control' placeholder="앞자리" size='4' type='text' name='wr_2' maxlength='4' required <? if ($wr_2) { echo "value='$wr_2'"; } ?>>
</div>
<div class="col-sm-4">
<label>번호 뒤 4자리</label>
<input class='form-control' placeholder="뒷자리" size='4' type='text' name='wr_3' maxlength='4' required <? if ($wr_3) { echo "value='$wr_3'"; } ?>>
</div>
</div>
<!--/폼그룹-->
</li>
<li>
<!--폼그룹/-->
<div class="form-group">
<div class="col-sm-6">
<label>상담분야</label>
<select name="wr_10" id="wr_10" required class="form-control pull-left required" >
<option value="">상담분야 선택</option>
<option value="매매" <?php echo ($write['wr_10'] == "매매") ? "selected" : "";?>>매매</option>
<option value="임대" <?php echo ($write['wr_10'] == "임대") ? "selected" : "";?>>임대</option>
</select>
</div>
<div class="col-sm-6">
<label>제작예산 범위</label>
<select name="wr_7" id="wr_7" required class="form-control pull-right required" >
<option value="" <?=($write["wr_7"] == "") ? " selected " : ""?>>제작예산 범위</option>
<option value="현금거래" <?=($write["wr_7"] == "현금거래") ? " selected " : ""?>>현금거래</option>
<option value="카드결제" <?=($write["wr_7"] == "카드결제") ? " selected " : ""?>>카드결제</option>
<option value="제안바람" <?=($write["wr_7"] == "제안바람") ? " selected " : ""?>>제안바람</option>
</select>
</div>
</div>
</li>
<li style="clear:both; position:relative;">
<script>
$(document).ready(function() {
$('#selectEmail').change(function() {
if($(this).val()=='1') {
$("#wr_9").val('');
} else
$("#wr_9").val($(this).val());
});
});
</script>
<!--폼그룹/-->
<div class="form-group">
<div class="col-sm-4">
<label>이메일 계정</label>
<input type="text" name="wr_6" id="wr_6" class="form-control pull-left" placeholder="계정" required <?php echo $write['wr_6'] ?> >
</div>
<div class="col-sm-4">
<label>선택</label>
<select name="selectEmail" id="selectEmail" class="form-control pull-right" >
<option value="">이메일 선택</option>
<option value="naver.com" <?php echo ($write['wr_9'] == "naver.com") ? "selected" : "";?>>naver.com</option>
<option value="hanmail.net" <?php echo ($write['wr_9'] == "hanmail.net") ? "selected" : "";?>>hanmail.net</option>
<option value="nate.com" <?php echo ($write['wr_9'] == "nate.com") ? "selected" : "";?>>nate.com</option>
<option value="gmail.com" <?php echo ($write['wr_9'] == "gmail.com") ? "selected" : "";?>>gmail.com</option>
<option value="lycos.co.kr" <?php echo ($write['wr_9'] == "lycos.co.kr") ? "selected" : "";?>>lycos.co.kr</option>
<option value="yahoo.co.kr" <?php echo ($write['wr_9'] == "yahoo.co.kr") ? "selected" : "";?>>yahoo.co.kr</option>
<option value="yahoo.com" <?php echo ($write['wr_9'] == "yahoo.com") ? "selected" : "";?>>yahoo.com</option>
<option value="empal.com" <?php echo ($write['wr_9'] == "empal.com") ? "selected" : "";?>>empal.com</option>
<option value="dreamwiz.com" <?php echo ($write['wr_9'] == "dreamwiz.com") ? "selected" : "";?>>dreamwiz.com</option>
</select>
</div>
<div class="col-sm-4">
<label>이메일 직접입력</label>
<input type="text" name="wr_9" id="wr_9" class="form-control" placeholder="이메일" required <?php echo $write['wr_9'] ?> >
</div>
</div>
</li>
<li>
<!--폼그룹/-->
<div class="form-group">
<div class="col-sm-12">
<label>상담내용</label>
<textarea name="wr_content" id="wr_content" class="form-control" style="width:100%; height:60px;" required rows="3" placeholder="상담내용을 간략하게 요약해서 써주세요!"><?php echo $write['wr_content'] ?></textarea>
</div>
<div class="col-sm-12" style="padding:10px 15px;">
<input type="checkbox" id="wr_4" name=wr_4 value="동의함" <?=$write[wr_4]?> />
<label for="wr_4" class="checkbox-style" style="clear:both; margin-top:5px !important;">
<a href="/bbs/content.php?co_id=privacy" style="padding-right:10px; color:#e81d25;" target="_blank"> 개인정보취급방침</a>읽었으며 동의합니다.
</label>
</input>
</div>
</div>
</li>
<li>
<!--폼그룹/-->
<div class="form-group">
<div class="col-sm-12" >
<input name="image" type="submit" value="접수" class="btn btn-lg btn-danger">
</div>
</div>
</li>
</ul>
</form>
<script type="text/javascript">
function checkFrm(obj) {
if(obj.wr_4.checked == false) {
alert('개인정보 활동동의에 체크해주세요.');
obj.wr_4.focus();
return false;
}
}
</script>
<script language="javascript">
var char_min = parseInt(<?=$write_min?>);
var char_max = parseInt(<?=$write_max?>);
</script>
업데이트과정을 충실히 적용하는편이 아니라서 그런지도 모르겠네요
현재 적용된 버전은
define('G5_VERSION', '그누보드5');
define('G5_GNUBOARD_VER', '5.2.4');
define('G5_YOUNGCART_VER', '5.2.4.1');
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
define('_GNUBOARD_', true);
if (PHP_VERSION >= '5.1.0') {
//if (function_exists("date_default_timezone_set")) date_default_timezone_set("Asia/Seoul");
date_default_timezone_set("Asia/Seoul");
}
답변 4
wr_id야 오토인크리먼트라서 문제없는데
wr_parent에 wr_id와 같은 값이 들어있어야 하는데
해당 wr_parent 필드에 0이나 비어있어서 삭제가 안되고있을겁니다.
wr_id가 부여가 되지않아 그런건 아닐까요~?
제 생각도 라에님과 동일하네요 등록되는 페이지에서 wr_id가 생성되는지 확인해보세요
생성되면 wr_num 등의 값도 제대로 들어가는지 확인해보시고요
write_update_nonecapcha.php에 wr_parent를 입력하는 코드를 넣어야합니다
write_update.php 소스를 참고해서 만들어 넣으세요
이미등록된 것은 아래코드를 스킨 상단에 넣어서 페이지를 한번 열어본후 코드를 삭제하고
게시물을 삭제하면 됩니다
sql_query("update $write_table set wr_parent=wr_id where wr_parent=0 ");
답변을 작성하시기 전에 로그인 해주세요.