추가 필드 넣고 글 수정할때 글이 존재하지 않습니다. 라고 나옵니다. 정보
추가 필드 넣고 글 수정할때 글이 존재하지 않습니다. 라고 나옵니다.첨부파일
본문
추가 필드를 mysql의 g4_write_[게시판] 에
wr_a1 ~ wr_a20
wr_b1 ~ wr_b20
.
.
wr_t1 ~ wr_t20
까지 넣고 bbs/write_update.php 에 위의 주소를 글쓰기와 업데이트, 2군데에 다 넣었습니다.
(대신 DB에서 NULL 이라고 찍혀있네요)
그리고 게시판에서는 기존 것에서 왠만한건 다 지우고
subject, contents 부분만 남겨둔채 새로 추가한 필드만 넣고 제대로 돌아가는 것은 확인했습니다만...
글 수정에서 내용을 넣고 Submit을 하면 "글이 존재하지 않습니다. 글이 삭제 되었거나 이동되었을수도 있습니다." 라고 나옵니다;;;
제가 뭔가 빠뜨린게 있을까요?
(write_update.php는 첨부파일로 넣었습니다.)
---- write.skin.php -----
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<div style="height:14px; line-height:1px; font-size:1px;"> </div>
<style type="text/css">
.write_head { height:30px; text-align:center; color:#8492A0; }
.field { border:1px solid #ccc; }
.formtable {padding: 7px 7px 7px 0px; text-align: right;}
.formtable2 {padding: 7px 0px 7px 0px;}
.formbox {padding: 4px; border: #ddd 4px solid;}
.formboxdes {font-size:11px; color: #666;}
.formbox:focus {
border: 4px solid #F90;
color: #4b4b4b;
}
.formreddot {color: #F30;}
.formtablebig {padding: 20px 0px 0px 0px;}
</style>
<script type="text/javascript">
// 글자수 제한
var char_min = parseInt(<?=$write_min?>); // 최소
var char_max = parseInt(<?=$write_max?>); // 최대
</script>
<!-- 합계 계산 -->
<SCRIPT LANGUAGE="JavaScript">
function startCalc(){
interval = setInterval("calc()",1);
}
function calc(){
one = document.fwrite.wr_h1.value;
two = document.fwrite.wr_j1.value;
document.fwrite.wr_total.value = (one * 1) * (two * 1);
}
function stopCalc(){
clearInterval(interval);
}
</script>
<!-- 합계 계산 End -->
<form name="fwrite" method="post" onsubmit="return fwrite_submit(this);" enctype="multipart/form-data" style="margin:0px;">
<input type=hidden name=null>
<input type=hidden name=w value="<?=$w?>">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=sca value="<?=$sca?>">
<input type=hidden name=sfl value="<?=$sfl?>">
<input type=hidden name=stx value="<?=$stx?>">
<input type=hidden name=spt value="<?=$spt?>">
<input type=hidden name=sst value="<?=$sst?>">
<input type=hidden name=sod value="<?=$sod?>">
<input type=hidden name=page value="<?=$page?>">
<table width="<?=$width?>" align=center cellpadding=0 cellspacing=0><tr><td>
<div style="border:1px solid #ddd; height:34px; background:url(<?=$board_skin_path?>/img/title_bg.gif) repeat-x;">
<div style="font-weight:bold; font-size:14px; margin:7px 0 0 10px;">:: <?=$title_msg?> ::</div>
</div>
<div style="height:3px; background:url(<?=$board_skin_path?>/img/title_shadow.gif) repeat-x; line-height:1px; font-size:1px;"></div>
<? if ($is_admin) { ?>
<div style="padding: 6px;"></div>
<div style=" background: #efefef; border: #CCC 1px solid; padding: 6px; font-weight:bold;">Admin Section
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="formtablebig">
<tr>
<td width="15%" class="formtable">실 무게(lb)</td>
<td width="35%" class="formtable2"><input type="text" name=wr_p1 itemname="여분2" value="<?=$write[wr_p1]?>" size="35" class="formbox" /></td>
<td width="15%" class="formtable">배송 가격($)</td>
<td width="35%" class="formtable2"><input type="text" name=wr_q1 itemname="여분2" value="<?=$write[wr_q1]?>" size="35" class="formbox" /></td>
</tr>
<tr>
<td class="formtable">배송일</td>
<td class="formtable2"><input type="text" name="wr_r1" itemname="여분2" value="<?=$write[wr_r1]?>" size="35" class="formbox" /></td>
<td class="formtable">트래킹 넘버</td>
<td class="formtable2"><input type="text" name="wr_s1" itemname="여분2" value="<?=$write[wr_s1]?>" size="35" class="formbox" /></td>
</tr>
<tr>
<td class="formtable">프로세스</td>
<td class="formtable2"><select name="wr_t1" itemname="여분2" required="required" value="<?=$write[wr_t1]?>" class="formbox">
<option value="jj1" >주문</option>
<option value="jj2" >배송받음/배송준비중</option>
<option value="jj3" >배송시작</option>
<option value="jj4" >세관에 걸림</option>
</select></td>
<td class="formtable"> </td>
<td class="formtable2"><?
$option = "";
$option_hidden = "";
if ($is_notice || $is_html || $is_secret || $is_mail) {
$option = "";
if ($is_notice) {
$option .= "<input type=checkbox name=notice value='1' $notice_checked>공지 ";
}
if ($is_html) {
if ($is_dhtml_editor) {
$option_hidden .= "<input type=hidden value='html1' name='html'>";
} else {
$option .= "<input onclick='html_auto_br(this);' type=checkbox value='$html_value' name='html' $html_checked><span class=w_title>html</span> ";
}
}
if ($is_secret) {
if ($is_admin || $is_secret==1) {
$option .= "<input type=checkbox value='secret' name='secret' $secret_checked><span class=w_title>비밀글</span> ";
} else {
$option_hidden .= "<input type=hidden value='secret' name='secret'>";
}
}
if ($is_mail) {
$option .= "<input type=checkbox value='mail' name='mail' $recv_email_checked>답변메일받기 ";
}
}
echo $option_hidden;
if ($option) {
?><?=$option?><? } ?></td>
</tr>
</table>
</div>
<div style="padding: 6px;"></div>
<? } ?>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="formtablebig">
<tr>
<td width="15%" class="formtable">수취인명<span class="formreddot">*</span></td>
<td width="35%" class="formtable2">: <input class="formbox" size=35 name=wr_1 itemname="이름" required value="<?=$write[wr_1]?><?=$member[mb_name]?>"></td>
<td width="15%" class="formtable">전화번호<span class="formreddot">*</span></td>
<td width="35%" class="formtable2">:
<input class="formbox" size="35" name="wr_2" itemname="전화번호" required="required" value="<?=$wr_2?><?=$member[mb_tel]?>" /></td>
</tr>
<tr>
<td class="formtable">주소<span class="formreddot">*</span></td>
<td colspan="3" class="formtable2">:
<input class="formbox" size="110" name="wr_3" itemname="이름" required="required" value="<?=$wr_3?><?=$member[mb_addr1]?> <?=$member[mb_addr2]?>" /></td>
</tr>
<tr>
<td class="formtable">주민등록번호<span class="formreddot">*</span></td>
<td colspan="3" class="formtable2">:
<input type="text" name="wr_a1" itemname="여분2" required="required" value="<?=$write[wr_a1]?>" size="35" class="formbox" title="세관 통관을 위한 주민등록번호를 적어주십시요." />
<span class="formboxdes">*원활한 세관 통관을 위해 기입해주시기 바랍니다.</span>
<input size="35" name="wr_subject" itemname="이름" type="hidden" required="required" value="<?=$write[subject]?><?=date("Y-m-d")?>" /></td>
</tr>
</table>
<div style="padding: 6px;"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="formtablebig">
<tr>
<td width="15%" class="formtable">주문사이트<span class="formreddot">*</span></td>
<td width="35%" class="formtable2"><input type="text" name="wr_b1" itemname="여분4" required="required" value="<?=$write[wr_b1]?>" size="35" class="formbox" /></td>
<td width="15%" class="formtable">브랜드<span class="formreddot">*</span></td>
<td width="35%" class="formtable2"><input type="text" name=wr_c1 itemname="여분4" required value="<?=$write[wr_c1]?>" size="35" class="formbox" /></td>
</tr>
<tr>
<td class="formtable">제품명<span class="formreddot">*</span></td>
<td class="formtable2"><input type="text" name="wr_d1" itemname="여분4" required="required" value="<?=$write[wr_d1]?>" size="35" class="formbox" /></td>
<td class="formtable">제품코드<span class="formreddot">*</span></td>
<td class="formtable2"><input type="text" name=wr_e1 itemname="여분2" required value="<?=$write[wr_e1]?>" size="35" class="formbox" /></td>
</tr>
<tr>
<td class="formtable">색상<span class="formreddot">*</span></td>
<td class="formtable2"><input type="text" name=wr_f1 itemname="여분2" required value="<?=$write[wr_f1]?>" size="35" class="formbox" /></td>
<td class="formtable">사이즈</td>
<td class="formtable2"><input type="text" name=wr_g1 itemname="여분2" required value="<?=$write[wr_g1]?>" size="35" class="formbox" /></td>
</tr>
<tr>
<td class="formtable">수량<span class="formreddot">*</span></td>
<td class="formtable2"><input type="text" name=wr_h1 itemname="여분2" required value="<?=$write[wr_h1]?>" size="35" class="formbox" onFocus="startCalc();" onBlur="stopCalc();" /></td>
<td class="formtable">품목<span class="formreddot">*</span></td>
<td class="formtable2"><select name=wr_i1 itemname="여분2" required value="<?=$write[wr_i1]?>" class="formbox">
<option value="의류" >의류</option>
<option value="모자" >모자</option>
<option value="신발/운동화/슬리퍼/구두" >신발/운동화/슬리퍼/구두</option>
<option value="가방/핸드백/백팩" >가방/핸드백/백팩</option>
<option value="아기용품" >아기용품</option>
<option value="벨트" >벨트</option>
<option value="귀걸이/목걸이/반지" >귀걸이/목걸이/반지</option>
<option value="시계" >시계</option>
<option value="지갑" >지갑</option>
<option value="화장품" >화장품</option>
<option value="비타민" >비타민</option>
<option value="건강용품" >건강용품</option>
<option value="캔푸드" >캔푸드</option>
<option value="가정용품" >가정용품</option>
<option value="주방용품" >주방용품</option>
<option value="기타용품" >기타용품</option>
<option value="선글라스" >선글라스</option>
<option value="수영용품" >수영용품</option>
<option value="속옷" >속옷</option>
<option value="장난감" >장난감</option>
<option value="운동용품" >운동용품</option>
<option value="서류" >서류</option>
<option value="책/도서류" >책/도서류</option>
<option value="개인용품" >개인용품</option>
<option value="자동차용품" >자동차용품</option>
<option value="기계용품" >기계용품</option>
<option value="자전거" >자전거</option>
<option value="카메라" >카메라</option>
<option value="카메라용품" >카메라용품</option>
<option value="컴퓨터/모니터" >컴퓨터/모니터</option>
<option value="컴퓨터 관련용품" >컴퓨터 관련용품</option>
<option value="스캐너/프린터/키보드/마우스" >스캐너/프린터/키보드/마우스</option>
<option value="소프트웨어" >소프트웨어</option>
<option value="PDA/PDA용품" >PDA/PDA용품</option>
<option value="CDP/MP3/포터블 오디오" >CDP/MP3/포터블 오디오</option>
<option value="기타(Guitar)" >기타(Guitar)</option>
<option value="기타(Guitar) 관련용품" >기타(Guitar) 관련용품</option>
<option value="면도기/드라이어/다리미" >면도기/드라이어/다리미</option>
<option value="블루레이/DVD/게임CD" >블루레이/DVD/게임CD</option>
<option value="담배/술" >담배/술</option>
<option value="그 외(ETC.)" >그 외(ETC.)</option>
</select></td>
</tr>
<tr>
<td class="formtable">단가<span class="formreddot">*</span></td>
<td class="formtable2"><input type="text" name=wr_j1 itemname="여분2" required value="<?=$write[wr_j1]?>" size="35" class="formbox" onFocus="startCalc();" onBlur="stopCalc();" /><br />
<span class="formboxdes">*달러($)표시는 기입하지 마십시요.</span></td>
<td class="formtable">합계</td>
<td class="formtable2"><span class="formreddot"><strong>
<input type=text name="wr_total" class="formbox" size=25 readonly></strong></span>($:달러)</td>
</tr>
<tr>
<td class="formtable">제품 URL<span class="formreddot">*</span></td>
<td class="formtable2"><input type="text" name="wr_k1" itemname="여분2" required="required" value="<?=$write[wr_k1]?>" size="35" class="formbox" /></td>
<td class="formtable">Order No.<span class="formreddot">*</span></td>
<td class="formtable2"><input type="text" name="wr_l1" itemname="여분2" required="required" value="<?=$write[wr_l1]?>" size="35" class="formbox" /></td>
</tr>
<tr>
<td class="formtable">Shipping Name<span class="formreddot">*</span></td>
<td class="formtable2"><input type="text" name="wr_m1" itemname="여분2" required="required" value="<?=$write[wr_m1]?>" size="35" class="formbox" /></td>
<td class="formtable">Tracking No.</td>
<td class="formtable2"><input type="text" name="wr_n1" itemname="여분2" required="required" value="<?=$write[wr_n1]?>" size="35" class="formbox" /></td>
</tr>
</table>
<div style="padding: 6px;"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="formtablebig">
<tr>
<td width="15%" class="formtable">총 예상 무게(lb)</td>
<td width="35%" class="formtable2"><input type="text" id="wr_content" name="wr_content" size="35" class="formbox" value="<?=$content?>" /></td>
<td width="15%" class="formtable">배송 메모</td>
<td width="35%" class="formtable2"><input type="text" name=wr_o1 itemname="여분2" required value="<?=$write[wr_o1]?>" size="35" class="formbox" /></td>
</tr>
<tr>
<td class="formtable"> </td>
<td class="formtable2"> </td>
<td class="formtable"> </td>
<td class="formtable2"> </td>
</tr>
<tr>
<td class="formtable"> </td>
<td class="formtable2"> </td>
<td class="formtable"> </td>
<td class="formtable2"> </td>
</tr>
<tr>
<td class="formtable"> </td>
<td class="formtable2"> </td>
<td class="formtable"> </td>
<td class="formtable2"> </td>
</tr>
<tr>
<td class="formtable"> </td>
<td class="formtable2"> </td>
<td class="formtable"> </td>
<td class="formtable2"> </td>
</tr>
<tr>
<td class="formtable"> </td>
<td class="formtable2"> </td>
<td class="formtable"> </td>
<td class="formtable2"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center" valign="top" style="padding-top:30px;">
<input type=image id="btn_submit" src="<?=$board_skin_path?>/img/btn_write.gif" border=0 accesskey='s'>
<a href="./board.php?bo_table=<?=$bo_table?>"><img id="btn_list" src="<?=$board_skin_path?>/img/btn_list.gif" border=0></a></td>
</tr>
</table>
</td></tr></table>
</form>
<script type="text/javascript" src="<?="$g4[path]/js/jquery.kcaptcha.js"?>"></script>
<script type="text/javascript">
<?
// 관리자라면 분류 선택에 '공지' 옵션을 추가함
if ($is_admin)
{
echo "
if (typeof(document.fwrite.ca_name) != 'undefined')
{
document.fwrite.ca_name.options.length += 1;
document.fwrite.ca_name.options[document.fwrite.ca_name.options.length-1].value = '공지';
document.fwrite.ca_name.options[document.fwrite.ca_name.options.length-1].text = '공지';
}";
}
?>
with (document.fwrite)
{
if (typeof(wr_name) != "undefined")
wr_name.focus();
else if (typeof(wr_subject) != "undefined")
wr_subject.focus();
else if (typeof(wr_content) != "undefined")
wr_content.focus();
if (typeof(ca_name) != "undefined")
if (w.value == "u")
ca_name.value = "<?=$write[ca_name]?>";
}
function html_auto_br(obj)
{
if (obj.checked) {
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다.");
if (result)
obj.value = "html2";
else
obj.value = "html1";
}
else
obj.value = "";
}
function fwrite_submit(f)
{
/*
var s = "";
if (s = word_filter_check(f.wr_subject.value)) {
alert("제목에 금지단어('"+s+"')가 포함되어있습니다");
return false;
}
if (s = word_filter_check(f.wr_content.value)) {
alert("내용에 금지단어('"+s+"')가 포함되어있습니다");
return false;
}
*/
if (document.getElementById('char_count')) {
if (char_min > 0 || char_max > 0) {
var cnt = parseInt(document.getElementById('char_count').innerHTML);
if (char_min > 0 && char_min > cnt) {
alert("내용은 "+char_min+"글자 이상 쓰셔야 합니다.");
return false;
}
else if (char_max > 0 && char_max < cnt) {
alert("내용은 "+char_max+"글자 이하로 쓰셔야 합니다.");
return false;
}
}
}
if (document.getElementById('tx_wr_content')) {
if (!ed_wr_content.outputBodyText()) {
alert('내용을 입력하십시오.');
ed_wr_content.returnFalse();
return false;
}
}
var subject = "";
var content = "";
$.ajax({
url: "<?=$board_skin_path?>/ajax.filter.php",
type: "POST",
data: {
"subject": f.wr_subject.value,
"content": f.wr_content.value
},
dataType: "json",
async: false,
cache: false,
success: function(data, textStatus) {
subject = data.subject;
content = data.content;
}
});
if (subject) {
alert("제목에 금지단어('"+subject+"')가 포함되어있습니다");
f.wr_subject.focus();
return false;
}
if (content) {
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
if (typeof(ed_wr_content) != "undefined")
ed_wr_content.returnFalse();
else
f.wr_content.focus();
return false;
}
if (typeof(f.wr_key) != 'undefined') {
if (hex_md5(f.wr_key.value) != md5_norobot_key) {
alert('자동등록방지용 글자가 제대로 입력되지 않았습니다.');
f.wr_key.select();
f.wr_key.focus();
return false;
}
}
document.getElementById('btn_submit').disabled = true;
//document.getElementById('btn_list').disabled = true;
<?
if ($g4[https_url])
echo "f.action = '$g4[https_url]/$g4[bbs]/write_update.php';";
else
echo "f.action = './write_update.php';";
?>
return true;
}
</script>
<script type="text/javascript" src="<?="$g4[path]/js/board.js"?>"></script>
<script type="text/javascript"> window.onload=function() { drawFont(); } </script>
wr_a1 ~ wr_a20
wr_b1 ~ wr_b20
.
.
wr_t1 ~ wr_t20
까지 넣고 bbs/write_update.php 에 위의 주소를 글쓰기와 업데이트, 2군데에 다 넣었습니다.
(대신 DB에서 NULL 이라고 찍혀있네요)
그리고 게시판에서는 기존 것에서 왠만한건 다 지우고
subject, contents 부분만 남겨둔채 새로 추가한 필드만 넣고 제대로 돌아가는 것은 확인했습니다만...
글 수정에서 내용을 넣고 Submit을 하면 "글이 존재하지 않습니다. 글이 삭제 되었거나 이동되었을수도 있습니다." 라고 나옵니다;;;
제가 뭔가 빠뜨린게 있을까요?
(write_update.php는 첨부파일로 넣었습니다.)
---- write.skin.php -----
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<div style="height:14px; line-height:1px; font-size:1px;"> </div>
<style type="text/css">
.write_head { height:30px; text-align:center; color:#8492A0; }
.field { border:1px solid #ccc; }
.formtable {padding: 7px 7px 7px 0px; text-align: right;}
.formtable2 {padding: 7px 0px 7px 0px;}
.formbox {padding: 4px; border: #ddd 4px solid;}
.formboxdes {font-size:11px; color: #666;}
.formbox:focus {
border: 4px solid #F90;
color: #4b4b4b;
}
.formreddot {color: #F30;}
.formtablebig {padding: 20px 0px 0px 0px;}
</style>
<script type="text/javascript">
// 글자수 제한
var char_min = parseInt(<?=$write_min?>); // 최소
var char_max = parseInt(<?=$write_max?>); // 최대
</script>
<!-- 합계 계산 -->
<SCRIPT LANGUAGE="JavaScript">
function startCalc(){
interval = setInterval("calc()",1);
}
function calc(){
one = document.fwrite.wr_h1.value;
two = document.fwrite.wr_j1.value;
document.fwrite.wr_total.value = (one * 1) * (two * 1);
}
function stopCalc(){
clearInterval(interval);
}
</script>
<!-- 합계 계산 End -->
<form name="fwrite" method="post" onsubmit="return fwrite_submit(this);" enctype="multipart/form-data" style="margin:0px;">
<input type=hidden name=null>
<input type=hidden name=w value="<?=$w?>">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=sca value="<?=$sca?>">
<input type=hidden name=sfl value="<?=$sfl?>">
<input type=hidden name=stx value="<?=$stx?>">
<input type=hidden name=spt value="<?=$spt?>">
<input type=hidden name=sst value="<?=$sst?>">
<input type=hidden name=sod value="<?=$sod?>">
<input type=hidden name=page value="<?=$page?>">
<table width="<?=$width?>" align=center cellpadding=0 cellspacing=0><tr><td>
<div style="border:1px solid #ddd; height:34px; background:url(<?=$board_skin_path?>/img/title_bg.gif) repeat-x;">
<div style="font-weight:bold; font-size:14px; margin:7px 0 0 10px;">:: <?=$title_msg?> ::</div>
</div>
<div style="height:3px; background:url(<?=$board_skin_path?>/img/title_shadow.gif) repeat-x; line-height:1px; font-size:1px;"></div>
<? if ($is_admin) { ?>
<div style="padding: 6px;"></div>
<div style=" background: #efefef; border: #CCC 1px solid; padding: 6px; font-weight:bold;">Admin Section
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="formtablebig">
<tr>
<td width="15%" class="formtable">실 무게(lb)</td>
<td width="35%" class="formtable2"><input type="text" name=wr_p1 itemname="여분2" value="<?=$write[wr_p1]?>" size="35" class="formbox" /></td>
<td width="15%" class="formtable">배송 가격($)</td>
<td width="35%" class="formtable2"><input type="text" name=wr_q1 itemname="여분2" value="<?=$write[wr_q1]?>" size="35" class="formbox" /></td>
</tr>
<tr>
<td class="formtable">배송일</td>
<td class="formtable2"><input type="text" name="wr_r1" itemname="여분2" value="<?=$write[wr_r1]?>" size="35" class="formbox" /></td>
<td class="formtable">트래킹 넘버</td>
<td class="formtable2"><input type="text" name="wr_s1" itemname="여분2" value="<?=$write[wr_s1]?>" size="35" class="formbox" /></td>
</tr>
<tr>
<td class="formtable">프로세스</td>
<td class="formtable2"><select name="wr_t1" itemname="여분2" required="required" value="<?=$write[wr_t1]?>" class="formbox">
<option value="jj1" >주문</option>
<option value="jj2" >배송받음/배송준비중</option>
<option value="jj3" >배송시작</option>
<option value="jj4" >세관에 걸림</option>
</select></td>
<td class="formtable"> </td>
<td class="formtable2"><?
$option = "";
$option_hidden = "";
if ($is_notice || $is_html || $is_secret || $is_mail) {
$option = "";
if ($is_notice) {
$option .= "<input type=checkbox name=notice value='1' $notice_checked>공지 ";
}
if ($is_html) {
if ($is_dhtml_editor) {
$option_hidden .= "<input type=hidden value='html1' name='html'>";
} else {
$option .= "<input onclick='html_auto_br(this);' type=checkbox value='$html_value' name='html' $html_checked><span class=w_title>html</span> ";
}
}
if ($is_secret) {
if ($is_admin || $is_secret==1) {
$option .= "<input type=checkbox value='secret' name='secret' $secret_checked><span class=w_title>비밀글</span> ";
} else {
$option_hidden .= "<input type=hidden value='secret' name='secret'>";
}
}
if ($is_mail) {
$option .= "<input type=checkbox value='mail' name='mail' $recv_email_checked>답변메일받기 ";
}
}
echo $option_hidden;
if ($option) {
?><?=$option?><? } ?></td>
</tr>
</table>
</div>
<div style="padding: 6px;"></div>
<? } ?>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="formtablebig">
<tr>
<td width="15%" class="formtable">수취인명<span class="formreddot">*</span></td>
<td width="35%" class="formtable2">: <input class="formbox" size=35 name=wr_1 itemname="이름" required value="<?=$write[wr_1]?><?=$member[mb_name]?>"></td>
<td width="15%" class="formtable">전화번호<span class="formreddot">*</span></td>
<td width="35%" class="formtable2">:
<input class="formbox" size="35" name="wr_2" itemname="전화번호" required="required" value="<?=$wr_2?><?=$member[mb_tel]?>" /></td>
</tr>
<tr>
<td class="formtable">주소<span class="formreddot">*</span></td>
<td colspan="3" class="formtable2">:
<input class="formbox" size="110" name="wr_3" itemname="이름" required="required" value="<?=$wr_3?><?=$member[mb_addr1]?> <?=$member[mb_addr2]?>" /></td>
</tr>
<tr>
<td class="formtable">주민등록번호<span class="formreddot">*</span></td>
<td colspan="3" class="formtable2">:
<input type="text" name="wr_a1" itemname="여분2" required="required" value="<?=$write[wr_a1]?>" size="35" class="formbox" title="세관 통관을 위한 주민등록번호를 적어주십시요." />
<span class="formboxdes">*원활한 세관 통관을 위해 기입해주시기 바랍니다.</span>
<input size="35" name="wr_subject" itemname="이름" type="hidden" required="required" value="<?=$write[subject]?><?=date("Y-m-d")?>" /></td>
</tr>
</table>
<div style="padding: 6px;"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="formtablebig">
<tr>
<td width="15%" class="formtable">주문사이트<span class="formreddot">*</span></td>
<td width="35%" class="formtable2"><input type="text" name="wr_b1" itemname="여분4" required="required" value="<?=$write[wr_b1]?>" size="35" class="formbox" /></td>
<td width="15%" class="formtable">브랜드<span class="formreddot">*</span></td>
<td width="35%" class="formtable2"><input type="text" name=wr_c1 itemname="여분4" required value="<?=$write[wr_c1]?>" size="35" class="formbox" /></td>
</tr>
<tr>
<td class="formtable">제품명<span class="formreddot">*</span></td>
<td class="formtable2"><input type="text" name="wr_d1" itemname="여분4" required="required" value="<?=$write[wr_d1]?>" size="35" class="formbox" /></td>
<td class="formtable">제품코드<span class="formreddot">*</span></td>
<td class="formtable2"><input type="text" name=wr_e1 itemname="여분2" required value="<?=$write[wr_e1]?>" size="35" class="formbox" /></td>
</tr>
<tr>
<td class="formtable">색상<span class="formreddot">*</span></td>
<td class="formtable2"><input type="text" name=wr_f1 itemname="여분2" required value="<?=$write[wr_f1]?>" size="35" class="formbox" /></td>
<td class="formtable">사이즈</td>
<td class="formtable2"><input type="text" name=wr_g1 itemname="여분2" required value="<?=$write[wr_g1]?>" size="35" class="formbox" /></td>
</tr>
<tr>
<td class="formtable">수량<span class="formreddot">*</span></td>
<td class="formtable2"><input type="text" name=wr_h1 itemname="여분2" required value="<?=$write[wr_h1]?>" size="35" class="formbox" onFocus="startCalc();" onBlur="stopCalc();" /></td>
<td class="formtable">품목<span class="formreddot">*</span></td>
<td class="formtable2"><select name=wr_i1 itemname="여분2" required value="<?=$write[wr_i1]?>" class="formbox">
<option value="의류" >의류</option>
<option value="모자" >모자</option>
<option value="신발/운동화/슬리퍼/구두" >신발/운동화/슬리퍼/구두</option>
<option value="가방/핸드백/백팩" >가방/핸드백/백팩</option>
<option value="아기용품" >아기용품</option>
<option value="벨트" >벨트</option>
<option value="귀걸이/목걸이/반지" >귀걸이/목걸이/반지</option>
<option value="시계" >시계</option>
<option value="지갑" >지갑</option>
<option value="화장품" >화장품</option>
<option value="비타민" >비타민</option>
<option value="건강용품" >건강용품</option>
<option value="캔푸드" >캔푸드</option>
<option value="가정용품" >가정용품</option>
<option value="주방용품" >주방용품</option>
<option value="기타용품" >기타용품</option>
<option value="선글라스" >선글라스</option>
<option value="수영용품" >수영용품</option>
<option value="속옷" >속옷</option>
<option value="장난감" >장난감</option>
<option value="운동용품" >운동용품</option>
<option value="서류" >서류</option>
<option value="책/도서류" >책/도서류</option>
<option value="개인용품" >개인용품</option>
<option value="자동차용품" >자동차용품</option>
<option value="기계용품" >기계용품</option>
<option value="자전거" >자전거</option>
<option value="카메라" >카메라</option>
<option value="카메라용품" >카메라용품</option>
<option value="컴퓨터/모니터" >컴퓨터/모니터</option>
<option value="컴퓨터 관련용품" >컴퓨터 관련용품</option>
<option value="스캐너/프린터/키보드/마우스" >스캐너/프린터/키보드/마우스</option>
<option value="소프트웨어" >소프트웨어</option>
<option value="PDA/PDA용품" >PDA/PDA용품</option>
<option value="CDP/MP3/포터블 오디오" >CDP/MP3/포터블 오디오</option>
<option value="기타(Guitar)" >기타(Guitar)</option>
<option value="기타(Guitar) 관련용품" >기타(Guitar) 관련용품</option>
<option value="면도기/드라이어/다리미" >면도기/드라이어/다리미</option>
<option value="블루레이/DVD/게임CD" >블루레이/DVD/게임CD</option>
<option value="담배/술" >담배/술</option>
<option value="그 외(ETC.)" >그 외(ETC.)</option>
</select></td>
</tr>
<tr>
<td class="formtable">단가<span class="formreddot">*</span></td>
<td class="formtable2"><input type="text" name=wr_j1 itemname="여분2" required value="<?=$write[wr_j1]?>" size="35" class="formbox" onFocus="startCalc();" onBlur="stopCalc();" /><br />
<span class="formboxdes">*달러($)표시는 기입하지 마십시요.</span></td>
<td class="formtable">합계</td>
<td class="formtable2"><span class="formreddot"><strong>
<input type=text name="wr_total" class="formbox" size=25 readonly></strong></span>($:달러)</td>
</tr>
<tr>
<td class="formtable">제품 URL<span class="formreddot">*</span></td>
<td class="formtable2"><input type="text" name="wr_k1" itemname="여분2" required="required" value="<?=$write[wr_k1]?>" size="35" class="formbox" /></td>
<td class="formtable">Order No.<span class="formreddot">*</span></td>
<td class="formtable2"><input type="text" name="wr_l1" itemname="여분2" required="required" value="<?=$write[wr_l1]?>" size="35" class="formbox" /></td>
</tr>
<tr>
<td class="formtable">Shipping Name<span class="formreddot">*</span></td>
<td class="formtable2"><input type="text" name="wr_m1" itemname="여분2" required="required" value="<?=$write[wr_m1]?>" size="35" class="formbox" /></td>
<td class="formtable">Tracking No.</td>
<td class="formtable2"><input type="text" name="wr_n1" itemname="여분2" required="required" value="<?=$write[wr_n1]?>" size="35" class="formbox" /></td>
</tr>
</table>
<div style="padding: 6px;"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="formtablebig">
<tr>
<td width="15%" class="formtable">총 예상 무게(lb)</td>
<td width="35%" class="formtable2"><input type="text" id="wr_content" name="wr_content" size="35" class="formbox" value="<?=$content?>" /></td>
<td width="15%" class="formtable">배송 메모</td>
<td width="35%" class="formtable2"><input type="text" name=wr_o1 itemname="여분2" required value="<?=$write[wr_o1]?>" size="35" class="formbox" /></td>
</tr>
<tr>
<td class="formtable"> </td>
<td class="formtable2"> </td>
<td class="formtable"> </td>
<td class="formtable2"> </td>
</tr>
<tr>
<td class="formtable"> </td>
<td class="formtable2"> </td>
<td class="formtable"> </td>
<td class="formtable2"> </td>
</tr>
<tr>
<td class="formtable"> </td>
<td class="formtable2"> </td>
<td class="formtable"> </td>
<td class="formtable2"> </td>
</tr>
<tr>
<td class="formtable"> </td>
<td class="formtable2"> </td>
<td class="formtable"> </td>
<td class="formtable2"> </td>
</tr>
<tr>
<td class="formtable"> </td>
<td class="formtable2"> </td>
<td class="formtable"> </td>
<td class="formtable2"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center" valign="top" style="padding-top:30px;">
<input type=image id="btn_submit" src="<?=$board_skin_path?>/img/btn_write.gif" border=0 accesskey='s'>
<a href="./board.php?bo_table=<?=$bo_table?>"><img id="btn_list" src="<?=$board_skin_path?>/img/btn_list.gif" border=0></a></td>
</tr>
</table>
</td></tr></table>
</form>
<script type="text/javascript" src="<?="$g4[path]/js/jquery.kcaptcha.js"?>"></script>
<script type="text/javascript">
<?
// 관리자라면 분류 선택에 '공지' 옵션을 추가함
if ($is_admin)
{
echo "
if (typeof(document.fwrite.ca_name) != 'undefined')
{
document.fwrite.ca_name.options.length += 1;
document.fwrite.ca_name.options[document.fwrite.ca_name.options.length-1].value = '공지';
document.fwrite.ca_name.options[document.fwrite.ca_name.options.length-1].text = '공지';
}";
}
?>
with (document.fwrite)
{
if (typeof(wr_name) != "undefined")
wr_name.focus();
else if (typeof(wr_subject) != "undefined")
wr_subject.focus();
else if (typeof(wr_content) != "undefined")
wr_content.focus();
if (typeof(ca_name) != "undefined")
if (w.value == "u")
ca_name.value = "<?=$write[ca_name]?>";
}
function html_auto_br(obj)
{
if (obj.checked) {
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다.");
if (result)
obj.value = "html2";
else
obj.value = "html1";
}
else
obj.value = "";
}
function fwrite_submit(f)
{
/*
var s = "";
if (s = word_filter_check(f.wr_subject.value)) {
alert("제목에 금지단어('"+s+"')가 포함되어있습니다");
return false;
}
if (s = word_filter_check(f.wr_content.value)) {
alert("내용에 금지단어('"+s+"')가 포함되어있습니다");
return false;
}
*/
if (document.getElementById('char_count')) {
if (char_min > 0 || char_max > 0) {
var cnt = parseInt(document.getElementById('char_count').innerHTML);
if (char_min > 0 && char_min > cnt) {
alert("내용은 "+char_min+"글자 이상 쓰셔야 합니다.");
return false;
}
else if (char_max > 0 && char_max < cnt) {
alert("내용은 "+char_max+"글자 이하로 쓰셔야 합니다.");
return false;
}
}
}
if (document.getElementById('tx_wr_content')) {
if (!ed_wr_content.outputBodyText()) {
alert('내용을 입력하십시오.');
ed_wr_content.returnFalse();
return false;
}
}
var subject = "";
var content = "";
$.ajax({
url: "<?=$board_skin_path?>/ajax.filter.php",
type: "POST",
data: {
"subject": f.wr_subject.value,
"content": f.wr_content.value
},
dataType: "json",
async: false,
cache: false,
success: function(data, textStatus) {
subject = data.subject;
content = data.content;
}
});
if (subject) {
alert("제목에 금지단어('"+subject+"')가 포함되어있습니다");
f.wr_subject.focus();
return false;
}
if (content) {
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
if (typeof(ed_wr_content) != "undefined")
ed_wr_content.returnFalse();
else
f.wr_content.focus();
return false;
}
if (typeof(f.wr_key) != 'undefined') {
if (hex_md5(f.wr_key.value) != md5_norobot_key) {
alert('자동등록방지용 글자가 제대로 입력되지 않았습니다.');
f.wr_key.select();
f.wr_key.focus();
return false;
}
}
document.getElementById('btn_submit').disabled = true;
//document.getElementById('btn_list').disabled = true;
<?
if ($g4[https_url])
echo "f.action = '$g4[https_url]/$g4[bbs]/write_update.php';";
else
echo "f.action = './write_update.php';";
?>
return true;
}
</script>
<script type="text/javascript" src="<?="$g4[path]/js/board.js"?>"></script>
<script type="text/javascript"> window.onload=function() { drawFont(); } </script>
댓글 전체