글쓰기 오류 좀 잡아주세요.. ㅠㅁㅠ 정보
글쓰기 오류 좀 잡아주세요.. ㅠㅁㅠ
본문
아래 소스로 글쓰기부분을 만들었습니다.
관리자로 로그인하였을 경우에는 아무런 에러도 없이 잘 작동됩니다만..
비회원으로 글쓰기를 누르면 스크립트 에러가 뜹니다.
에러 내역은..
줄: 411
문자:9
오류: 'document.getElementById(...)'은 NULL이거나 개체가 아닙니다.
코드:0
URL:게시판주소..
..입니다.
헌데 아래 소스는 마지막줄이 388라인입니다. ㅡ.ㅡa
어디서 문제인지 도저히 못찾아내겠습니다.
소스 좀 보시고 에러 나오는 부분 좀 찾아주세요. ㅠㅁㅠ
write.skin.php 소스 전문==================================================================================
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if ($is_dhtml_editor) {
include_once("$g4[path]/lib/cheditor.lib.php");
echo "<script src='$g4[editor_path]/cheditor.js'></script>";
echo cheditor1('wr_content', $content);
}
include_once("$g4[path]/lib/cheditor.lib.php");
echo "<script src='$g4[editor_path]/cheditor.js'></script>";
echo cheditor1('wr_content', $content);
}
$wr_option1 = explode("|", $write[wr_1]);
$wr_option1_1 = $wr_option1[0]; //옵션1
$wr_option1_2 = $wr_option1[1]; //옵션2
$wr_option1_3 = $wr_option1[2]; //옵션3
$wr_option1_4 = $wr_option1[3]; //옵션4
$wr_option1_5 = $wr_option1[4]; //옵션5
$wr_option1_6 = $wr_option1[5]; //옵션6
$wr_option1_7 = $wr_option1[6]; //옵션7
$wr_option1_1 = $wr_option1[0]; //옵션1
$wr_option1_2 = $wr_option1[1]; //옵션2
$wr_option1_3 = $wr_option1[2]; //옵션3
$wr_option1_4 = $wr_option1[3]; //옵션4
$wr_option1_5 = $wr_option1[4]; //옵션5
$wr_option1_6 = $wr_option1[5]; //옵션6
$wr_option1_7 = $wr_option1[6]; //옵션7
?>
<script language="javascript">
// 글자수 제한
var char_min = parseInt(<?=$write_min?>); // 최소
var char_max = parseInt(<?=$write_max?>); // 최대
</script>
<!--<form name="fwrite" method="post" action="./write_update.php" enctype="multipart/form-data" autocomplete="off" style="margin:0px;">-->
<form name="fwrite" method="post" action="javascript:fwrite_check(document.fwrite);" 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=wr_id value="<?=$wr_id?>">
<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?>">
// 글자수 제한
var char_min = parseInt(<?=$write_min?>); // 최소
var char_max = parseInt(<?=$write_max?>); // 최대
</script>
<!--<form name="fwrite" method="post" action="./write_update.php" enctype="multipart/form-data" autocomplete="off" style="margin:0px;">-->
<form name="fwrite" method="post" action="javascript:fwrite_check(document.fwrite);" 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=wr_id value="<?=$wr_id?>">
<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>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<colgroup width=240><colgroup width=''>
<tr><td colspan=2 height=28 style="padding-left:8px">홈 > <?=$board[bo_subject]?></td></tr>
<tr><td colspan=2 height=2 bgcolor="#0A7299"></td></tr>
<tr><td style='padding-left:10px' colspan=2 height=32>· 홈페이지 정보</td></tr>
<tr><td colspan="2" style="background:url(<?=$board_skin_path?>/img/title_bg.gif) repeat-x; height:3px;"></td></tr>
<colgroup width=240><colgroup width=''>
<tr><td colspan=2 height=28 style="padding-left:8px">홈 > <?=$board[bo_subject]?></td></tr>
<tr><td colspan=2 height=2 bgcolor="#0A7299"></td></tr>
<tr><td style='padding-left:10px' colspan=2 height=32>· 홈페이지 정보</td></tr>
<tr><td colspan="2" style="background:url(<?=$board_skin_path?>/img/title_bg.gif) repeat-x; height:3px;"></td></tr>
<tr><td colspan=2 height=6></td></tr>
<? if ($is_admin) { ?>
<? if ($is_notice || $is_html || $is_secret || $is_mail) { ?>
<tr>
<td style="padding:6px; line-height:150%; height:30px;border:1 solid #E7E7E7">▷ 옵션</td>
<td style="padding:6px; line-height:150%; background-color:#F9F9F9; border-left:2 solid #DEDEDE">
<? if ($is_notice) { ?><input type=checkbox name=notice value="1" <?=$notice_checked?>>공지 <? } ?>
<? if ($is_html) { ?>
<? if ($is_dhtml_editor) { ?>
<input type=hidden value="html1" name="html">
<? } else { ?>
<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) { ?>
<input type=checkbox value="secret" name="secret" <?=$secret_checked?>><span class=w_title>비밀글</span>
<? } ?>
<? } ?>
<? if ($is_mail) { ?><input type=checkbox value="mail" name="mail" <?=$recv_email_checked?>>답변메일받기 <? } ?>
</td>
</tr>
<tr><td colspan=2 height=6></td></tr>
<? } ?>
<? } else { ?>
<input type=hidden value="secret" name="secret">
<? } ?>
<? if ($is_admin) { ?>
<? if ($is_notice || $is_html || $is_secret || $is_mail) { ?>
<tr>
<td style="padding:6px; line-height:150%; height:30px;border:1 solid #E7E7E7">▷ 옵션</td>
<td style="padding:6px; line-height:150%; background-color:#F9F9F9; border-left:2 solid #DEDEDE">
<? if ($is_notice) { ?><input type=checkbox name=notice value="1" <?=$notice_checked?>>공지 <? } ?>
<? if ($is_html) { ?>
<? if ($is_dhtml_editor) { ?>
<input type=hidden value="html1" name="html">
<? } else { ?>
<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) { ?>
<input type=checkbox value="secret" name="secret" <?=$secret_checked?>><span class=w_title>비밀글</span>
<? } ?>
<? } ?>
<? if ($is_mail) { ?><input type=checkbox value="mail" name="mail" <?=$recv_email_checked?>>답변메일받기 <? } ?>
</td>
</tr>
<tr><td colspan=2 height=6></td></tr>
<? } ?>
<? } else { ?>
<input type=hidden value="secret" name="secret">
<? } ?>
<tr>
<td style="padding:6px; line-height:150%; height:30px;border:1 solid #E7E7E7">▷ 사이트이름<br>
<input class="ed" size=44 name=wr_subject id=wr_subject itemname="사이트명" required value="<?=$subject?>"></td>
<td style="padding:6px; line-height:150%; background-color:#F9F9F9; border-left:2 solid #DEDEDE">
· <font color="#FF6600">특수문자가 들어간 경우 관리자에 의해 변경될<br>
수도 있습니다.</font>
</td>
</tr>
<tr><td colspan=2 height=6></td></tr>
<td style="padding:6px; line-height:150%; height:30px;border:1 solid #E7E7E7">▷ 사이트이름<br>
<input class="ed" size=44 name=wr_subject id=wr_subject itemname="사이트명" required value="<?=$subject?>"></td>
<td style="padding:6px; line-height:150%; background-color:#F9F9F9; border-left:2 solid #DEDEDE">
· <font color="#FF6600">특수문자가 들어간 경우 관리자에 의해 변경될<br>
수도 있습니다.</font>
</td>
</tr>
<tr><td colspan=2 height=6></td></tr>
<? if ($is_link) { ?>
<tr>
<td style="padding:6px; line-height:150%; height:30px;border:1 solid #E7E7E7">▷ 사이트주소<br>
<input type='text' class='ed' size=44 name='wr_link1' id=wr_link1 itemname='사이트주소' required value="<?=$write['wr_link1']?>">
<td style="padding:6px; line-height:150%; background-color:#F9F9F9; border-left:2 solid #DEDEDE">
· 정확한 사이트 주소 (URL)를 적어주세요.<br>
ex) http://www.sir.co.kr
</td></tr>
<tr><td colspan=2 height=6></td></tr>
<? } ?>
<tr>
<td style="padding:6px; line-height:150%; height:30px;border:1 solid #E7E7E7">▷ 사이트주소<br>
<input type='text' class='ed' size=44 name='wr_link1' id=wr_link1 itemname='사이트주소' required value="<?=$write['wr_link1']?>">
<td style="padding:6px; line-height:150%; background-color:#F9F9F9; border-left:2 solid #DEDEDE">
· 정확한 사이트 주소 (URL)를 적어주세요.<br>
ex) http://www.sir.co.kr
</td></tr>
<tr><td colspan=2 height=6></td></tr>
<? } ?>
<tr>
<td style="padding:6px; line-height:150%; height:30px;border:1 solid #E7E7E7">▷ 사이트설명<br>
<? if ($is_dhtml_editor) { ?>
<?=cheditor2('fwrite', 'wr_content', '100%', '350');?>
<? } else { ?>
<textarea id=wr_content name=wr_content class=tx style='width:100%; word-break:break-all;' rows=5 itemname="사이트설명" required
<? if ($write_min || $write_max) { ?>onkeyup="check_byte('wr_content', 'char_count');"<?}?>><?=$content?></textarea>
<? if ($write_min || $write_max) { ?><script language="javascript"> check_byte('wr_content', 'char_count'); </script><?}?>
<? } ?>
<td style="padding:6px; line-height:150%; height:30px;border:1 solid #E7E7E7">▷ 사이트설명<br>
<? if ($is_dhtml_editor) { ?>
<?=cheditor2('fwrite', 'wr_content', '100%', '350');?>
<? } else { ?>
<textarea id=wr_content name=wr_content class=tx style='width:100%; word-break:break-all;' rows=5 itemname="사이트설명" required
<? if ($write_min || $write_max) { ?>onkeyup="check_byte('wr_content', 'char_count');"<?}?>><?=$content?></textarea>
<? if ($write_min || $write_max) { ?><script language="javascript"> check_byte('wr_content', 'char_count'); </script><?}?>
<? } ?>
</td>
<td style="padding:6px; line-height:150%; background-color:#F9F9F9; border-left:2 solid #DEDEDE">
· 사이트설명은 희망 검색어를 포함하여 내용을<br>
50자 이내(띄어쓰기 포함)로 적어주세요.<br>
· HTML, 특수문자 등은 적용되지 않습니다.<br>
· <font color="#FF6600">관리자에 의해 다소 변경 될 수 있습니다.</font>
</td>
</tr>
<tr><td colspan=2 height=6></td></tr>
<td style="padding:6px; line-height:150%; background-color:#F9F9F9; border-left:2 solid #DEDEDE">
· 사이트설명은 희망 검색어를 포함하여 내용을<br>
50자 이내(띄어쓰기 포함)로 적어주세요.<br>
· HTML, 특수문자 등은 적용되지 않습니다.<br>
· <font color="#FF6600">관리자에 의해 다소 변경 될 수 있습니다.</font>
</td>
</tr>
<tr><td colspan=2 height=6></td></tr>
<? if ($is_category){ ?>
<tr>
<td style="padding:6px; line-height:150%; height:30px;border:1 solid #E7E7E7">▷ 분류<br>
<tr>
<td style="padding:6px; line-height:150%; height:30px;border:1 solid #E7E7E7">▷ 분류<br>
<!-- <select name=ca_name required itemname="분류"><option value="">선택하세요<?//=$category_option?></select> -->
<?
//답글이나 수정에서도 다중선택된 분류 유지(2006년 8월 27일 일요일 오전 4:57 플록)
$key = explode("|", $board['bo_category_list']);
foreach( $key as $ctg){
$arr = explode(",", $write['ca_name']);
$str = "";
for ($j=0; $j<count($arr); $j++){
if (trim($arr[$j]))
$str .= ($ctg == $arr[$j])?"checked":" ";
}
?><input type='checkbox' value='<?=$ctg?>' name='multi_ctg[]' id='<?=$ctg?>' <?=$str?>><label for='<?=$ctg?>' style="cursor:pointer"><?=$ctg?></label><?
}
?>
</td>
<td style="padding:6px; line-height:150%; background-color:#F9F9F9; border-left:2 solid #DEDEDE">
· <font color="#FF6600">해당되는 부분을 모두 선택해주세요.</font><br>
· 해당부분이 없으시면 기타를 선택해주세요.
</td>
</tr>
<tr><td colspan=2 height=6></td></tr>
<? } ?>
<?
//답글이나 수정에서도 다중선택된 분류 유지(2006년 8월 27일 일요일 오전 4:57 플록)
$key = explode("|", $board['bo_category_list']);
foreach( $key as $ctg){
$arr = explode(",", $write['ca_name']);
$str = "";
for ($j=0; $j<count($arr); $j++){
if (trim($arr[$j]))
$str .= ($ctg == $arr[$j])?"checked":" ";
}
?><input type='checkbox' value='<?=$ctg?>' name='multi_ctg[]' id='<?=$ctg?>' <?=$str?>><label for='<?=$ctg?>' style="cursor:pointer"><?=$ctg?></label><?
}
?>
</td>
<td style="padding:6px; line-height:150%; background-color:#F9F9F9; border-left:2 solid #DEDEDE">
· <font color="#FF6600">해당되는 부분을 모두 선택해주세요.</font><br>
· 해당부분이 없으시면 기타를 선택해주세요.
</td>
</tr>
<tr><td colspan=2 height=6></td></tr>
<? } ?>
<tr>
<td style="padding:6px; line-height:150%; height:30px;border:1 solid #E7E7E7">▷ 사이즈<br>
<input type=checkbox name="wr_option1_1" id="베르만" value="베르만" <? if($wr_option1_1=="베르만") echo"checked";?>><label for='베르만' style="cursor:pointer">베르만</label>
<input type=checkbox name="wr_option1_2" id="SD9~17" value="SD9~17" <? if($wr_option1_2=="SD9~17") echo"checked";?>><label for='SD9~17' style="cursor:pointer">SD9~17</label>
<input type=checkbox name="wr_option1_3" id="MSD,유노아" value="MSD,유노아" <? if($wr_option1_3=="MSD,유노아") echo"checked";?>><label for='MSD,유노아' style="cursor:pointer">MSD,유노아</label> <br>
<input type=checkbox name="wr_option1_4" id="쥬니어,미니폐" value="쥬니어,미니폐" <? if($wr_option1_4=="쥬니어,미니폐") echo"checked";?>><label for='쥬니어,미니폐' style="cursor:pointer">쥬니어,미니폐</label>
<input type=checkbox name="wr_option1_5" id="USD,쁘띠" value="USD,쁘띠" <? if($wr_option1_5=="USD,쁘띠") echo"checked";?>><label for='USD,쁘띠' style="cursor:pointer">USD,쁘띠</label>
<input type=checkbox name="wr_option1_6" id="PF" value="PF" <? if($wr_option1_6=="PF") echo"checked";?>><label for='PF' style="cursor:pointer">PF</label> <br>
<input type=checkbox name="wr_option1_7" id="ETC" value="ETC" <? if($wr_option1_7=="ETC") echo"checked";?>><label for='ETC' style="cursor:pointer">ETC</label>
</td>
<td style="padding:6px; line-height:150%; background-color:#F9F9F9; border-left:2 solid #DEDEDE">
· <font color="#FF6600">사이트에서 다루시는 아이타입을 선택하세요.</font><br>
· 해당부분이 없으시면 ETC를 선택해주세요.
</td>
</tr>
<tr><td colspan=2 height=6></td></tr>
<td style="padding:6px; line-height:150%; height:30px;border:1 solid #E7E7E7">▷ 사이즈<br>
<input type=checkbox name="wr_option1_1" id="베르만" value="베르만" <? if($wr_option1_1=="베르만") echo"checked";?>><label for='베르만' style="cursor:pointer">베르만</label>
<input type=checkbox name="wr_option1_2" id="SD9~17" value="SD9~17" <? if($wr_option1_2=="SD9~17") echo"checked";?>><label for='SD9~17' style="cursor:pointer">SD9~17</label>
<input type=checkbox name="wr_option1_3" id="MSD,유노아" value="MSD,유노아" <? if($wr_option1_3=="MSD,유노아") echo"checked";?>><label for='MSD,유노아' style="cursor:pointer">MSD,유노아</label> <br>
<input type=checkbox name="wr_option1_4" id="쥬니어,미니폐" value="쥬니어,미니폐" <? if($wr_option1_4=="쥬니어,미니폐") echo"checked";?>><label for='쥬니어,미니폐' style="cursor:pointer">쥬니어,미니폐</label>
<input type=checkbox name="wr_option1_5" id="USD,쁘띠" value="USD,쁘띠" <? if($wr_option1_5=="USD,쁘띠") echo"checked";?>><label for='USD,쁘띠' style="cursor:pointer">USD,쁘띠</label>
<input type=checkbox name="wr_option1_6" id="PF" value="PF" <? if($wr_option1_6=="PF") echo"checked";?>><label for='PF' style="cursor:pointer">PF</label> <br>
<input type=checkbox name="wr_option1_7" id="ETC" value="ETC" <? if($wr_option1_7=="ETC") echo"checked";?>><label for='ETC' style="cursor:pointer">ETC</label>
</td>
<td style="padding:6px; line-height:150%; background-color:#F9F9F9; border-left:2 solid #DEDEDE">
· <font color="#FF6600">사이트에서 다루시는 아이타입을 선택하세요.</font><br>
· 해당부분이 없으시면 ETC를 선택해주세요.
</td>
</tr>
<tr><td colspan=2 height=6></td></tr>
<? if ($is_file) { ?>
<tr>
<td style="padding:6px; line-height:150%; height:30px;border:1 solid #E7E7E7">▷ 스크린샷<span onclick="add_file();" style='cursor:pointer; font-family:tahoma; font-size:12pt;'>+</span> <span onclick="del_file();" style='cursor:pointer; font-family:tahoma; font-size:12pt;'>-</span><br>
<table id="variableFiles" cellpadding=0 cellspacing=0></table><?// print_r2($file); ?>
<script language="JavaScript">
var flen = 0;
function add_file(delete_code)
{
var upload_count = <?=(int)$board[bo_upload_count]?>;
if (upload_count && flen >= upload_count)
{
alert("이 게시판은 "+upload_count+"개 까지만 파일 업로드가 가능합니다.");
return;
}
<tr>
<td style="padding:6px; line-height:150%; height:30px;border:1 solid #E7E7E7">▷ 스크린샷<span onclick="add_file();" style='cursor:pointer; font-family:tahoma; font-size:12pt;'>+</span> <span onclick="del_file();" style='cursor:pointer; font-family:tahoma; font-size:12pt;'>-</span><br>
<table id="variableFiles" cellpadding=0 cellspacing=0></table><?// print_r2($file); ?>
<script language="JavaScript">
var flen = 0;
function add_file(delete_code)
{
var upload_count = <?=(int)$board[bo_upload_count]?>;
if (upload_count && flen >= upload_count)
{
alert("이 게시판은 "+upload_count+"개 까지만 파일 업로드가 가능합니다.");
return;
}
var objTbl;
var objRow;
var objCell;
if (document.getElementById)
objTbl = document.getElementById("variableFiles");
else
objTbl = document.all["variableFiles"];
var objRow;
var objCell;
if (document.getElementById)
objTbl = document.getElementById("variableFiles");
else
objTbl = document.all["variableFiles"];
objRow = objTbl.insertRow(objTbl.rows.length);
objCell = objRow.insertCell(0);
objCell = objRow.insertCell(0);
objCell.innerHTML = "<input type='file' class='ed' size=25 name='bf_file[]' title='파일 용량 <?=$upload_max_filesize?> 이하만 업로드 가능'>";
if (delete_code)
objCell.innerHTML += delete_code;
else
{
<? if ($is_file_content) { ?>
objCell.innerHTML += "<br><input type='text' class='ed' size=50 name='bf_content[]' title='업로드 이미지 파일에 해당 되는 내용을 입력하세요.'>";
<? } ?>
;
}
if (delete_code)
objCell.innerHTML += delete_code;
else
{
<? if ($is_file_content) { ?>
objCell.innerHTML += "<br><input type='text' class='ed' size=50 name='bf_content[]' title='업로드 이미지 파일에 해당 되는 내용을 입력하세요.'>";
<? } ?>
;
}
flen++;
}
}
<?=$file_script; //수정시에 필요한 스크립트?>
function del_file()
{
// file_length 이하로는 필드가 삭제되지 않아야 합니다.
var file_length = <?=(int)$file_length?>;
var objTbl = document.getElementById("variableFiles");
if (objTbl.rows.length - 1 > file_length)
{
objTbl.deleteRow(objTbl.rows.length - 1);
flen--;
}
}
</script>
</td>
<td style="padding:6px; line-height:150%; background-color:#F9F9F9; border-left:2 solid #DEDEDE">
· 스크린샷이 있다면 올려주세요.<br>
· 현재는 본서비스를 제공하고 있지 않습니다.
</td></tr>
<tr><td colspan=2 height=6></td></tr>
<? } ?>
{
// file_length 이하로는 필드가 삭제되지 않아야 합니다.
var file_length = <?=(int)$file_length?>;
var objTbl = document.getElementById("variableFiles");
if (objTbl.rows.length - 1 > file_length)
{
objTbl.deleteRow(objTbl.rows.length - 1);
flen--;
}
}
</script>
</td>
<td style="padding:6px; line-height:150%; background-color:#F9F9F9; border-left:2 solid #DEDEDE">
· 스크린샷이 있다면 올려주세요.<br>
· 현재는 본서비스를 제공하고 있지 않습니다.
</td></tr>
<tr><td colspan=2 height=6></td></tr>
<? } ?>
<? if ($is_name) { ?>
<tr><td colspan=2 height=10></td></tr>
<tr><td colspan=2 height=2 bgcolor="#0A7299"></td></tr>
<tr><td style='padding-left:10px' colspan=2 height=32>· 등록자 정보</td></tr>
<tr><td colspan="2" style="background:url(<?=$board_skin_path?>/img/title_bg.gif) repeat-x; height:3px;"></td></tr>
<tr><td colspan=2 height=10></td></tr>
<tr><td colspan=2 height=2 bgcolor="#0A7299"></td></tr>
<tr><td style='padding-left:10px' colspan=2 height=32>· 등록자 정보</td></tr>
<tr><td colspan="2" style="background:url(<?=$board_skin_path?>/img/title_bg.gif) repeat-x; height:3px;"></td></tr>
<tr><td colspan=2 height=6></td></tr>
<tr>
<td style="padding:6px; line-height:150%; height:30px;border:1 solid #E7E7E7">▷ 등록자<br>
<input class='ed' size=44 maxlength=20 name=wr_name id=wr_name itemname="등록자" required value="<?=$name?>"></td>
<td style="padding:6px; line-height:150%; background-color:#F9F9F9; border-left:2 solid #DEDEDE">
· 등록자 이름을 적어주세요. ex) 치에
</td>
</tr>
<tr><td colspan=2 height=6></td></tr>
<? } ?>
<td style="padding:6px; line-height:150%; height:30px;border:1 solid #E7E7E7">▷ 등록자<br>
<input class='ed' size=44 maxlength=20 name=wr_name id=wr_name itemname="등록자" required value="<?=$name?>"></td>
<td style="padding:6px; line-height:150%; background-color:#F9F9F9; border-left:2 solid #DEDEDE">
· 등록자 이름을 적어주세요. ex) 치에
</td>
</tr>
<tr><td colspan=2 height=6></td></tr>
<? } ?>
<? if ($is_password) { ?>
<tr>
<td style="padding:6px; line-height:150%; height:30px;border:1 solid #E7E7E7">▷ 패스워드<br>
<input class='ed' size=44 type=password maxlength=20 name=wr_password id=wr_password itemname="패스워드" <?=$password_required?>></td>
<td style="padding:6px; line-height:150%; background-color:#F9F9F9; border-left:2 solid #DEDEDE">
· <font color="#FF6600">수정/삭제 신청시 필요한 정보입니다.</font>
</td>
</tr>
<tr><td colspan=2 height=6></td></tr>
<? } ?>
<tr>
<td style="padding:6px; line-height:150%; height:30px;border:1 solid #E7E7E7">▷ 패스워드<br>
<input class='ed' size=44 type=password maxlength=20 name=wr_password id=wr_password itemname="패스워드" <?=$password_required?>></td>
<td style="padding:6px; line-height:150%; background-color:#F9F9F9; border-left:2 solid #DEDEDE">
· <font color="#FF6600">수정/삭제 신청시 필요한 정보입니다.</font>
</td>
</tr>
<tr><td colspan=2 height=6></td></tr>
<? } ?>
<? if ($is_email) { ?>
<tr>
<td style="padding:6px; line-height:150%; height:30px;border:1 solid #E7E7E7">▷ 이메일<br>
<input class='ed' size=44 maxlength=100 name=wr_email email itemname="이메일" value="<?=$email?>"></td>
<td style="padding:6px; line-height:150%; background-color:#F9F9F9; border-left:2 solid #DEDEDE">
· 관리자와 연락 가능한 메일을 적어주세요.
</td>
</tr>
<tr><td colspan=2 height=6></td></tr>
<? } ?>
<tr>
<td style="padding:6px; line-height:150%; height:30px;border:1 solid #E7E7E7">▷ 이메일<br>
<input class='ed' size=44 maxlength=100 name=wr_email email itemname="이메일" value="<?=$email?>"></td>
<td style="padding:6px; line-height:150%; background-color:#F9F9F9; border-left:2 solid #DEDEDE">
· 관리자와 연락 가능한 메일을 적어주세요.
</td>
</tr>
<tr><td colspan=2 height=6></td></tr>
<? } ?>
<? if ($is_trackback) { ?>
<tr>
<td style="padding:6px; line-height:150%; height:30px;border:1 solid #E7E7E7">▷ 트랙백주소<br>
<input class='ed' size=42 name=wr_trackback itemname="트랙백" value="<?=$trackback?>">
<? if ($w=="u") { ?><input type=checkbox name="re_trackback" value="1">핑 보냄<? } ?>
</td>
<td style="padding:6px; line-height:150%; background-color:#F9F9F9; border-left:2 solid #DEDEDE">
· 트랙백보낼주소를 넣어주세요.
</td>
</tr>
<tr><td colspan=2 height=6></td></tr>
<? } ?>
<tr>
<td style="padding:6px; line-height:150%; height:30px;border:1 solid #E7E7E7">▷ 트랙백주소<br>
<input class='ed' size=42 name=wr_trackback itemname="트랙백" value="<?=$trackback?>">
<? if ($w=="u") { ?><input type=checkbox name="re_trackback" value="1">핑 보냄<? } ?>
</td>
<td style="padding:6px; line-height:150%; background-color:#F9F9F9; border-left:2 solid #DEDEDE">
· 트랙백보낼주소를 넣어주세요.
</td>
</tr>
<tr><td colspan=2 height=6></td></tr>
<? } ?>
<? if ($is_norobot) { ?>
<tr>
<td style="padding:6px; line-height:150%; height:30px;border:1 solid #E7E7E7">▷ 자동등록방지<br>
· <?=$norobot_str?> <input class='ed' type=input size=10 name=wr_key itemname="자동등록방지" required></td>
<td style="padding:6px; line-height:150%; background-color:#F9F9F9; border-left:2 solid #DEDEDE">
· 왼쪽의 글자중 <font color="red">빨간글자만</font>순서대로 입력<br>
하세요.
</td>
</tr>
<tr><td colspan=2 height=6></td></tr>
<? } ?>
<tr>
<td style="padding:6px; line-height:150%; height:30px;border:1 solid #E7E7E7">▷ 자동등록방지<br>
· <?=$norobot_str?> <input class='ed' type=input size=10 name=wr_key itemname="자동등록방지" required></td>
<td style="padding:6px; line-height:150%; background-color:#F9F9F9; border-left:2 solid #DEDEDE">
· 왼쪽의 글자중 <font color="red">빨간글자만</font>순서대로 입력<br>
하세요.
</td>
</tr>
<tr><td colspan=2 height=6></td></tr>
<? } ?>
<tr><td colspan=2 height=2 bgcolor="#0A7299"></td></tr>
</table>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="center" valign="top" style="padding-top:10px;">
<input type=image id="btn_submit" src="<?=$board_skin_path?>/img/btn_write.gif" border=0 accesskey='s'></td>
</tr>
<tr><td height=8></td></tr>
</table>
<tr>
<td width="100%" align="center" valign="top" style="padding-top:10px;">
<input type=image id="btn_submit" src="<?=$board_skin_path?>/img/btn_write.gif" border=0 accesskey='s'></td>
</tr>
<tr><td height=8></td></tr>
</table>
</td></tr></table>
</form>
</form>
<script language="javascript">
with (document.fwrite) {
if (typeof(wr_subject) != "undefined")
wr_subject.focus();
else if (typeof(wr_content) != "undefined")
wr_content.focus();
else if (typeof(wr_name) != "undefined")
wr_name.focus();
if (typeof(wr_subject) != "undefined")
wr_subject.focus();
else if (typeof(wr_content) != "undefined")
wr_content.focus();
else if (typeof(wr_name) != "undefined")
wr_name.focus();
if (typeof(ca_name) != "undefined")
if (w.value == "u")
ca_name.value = "<?=$write[ca_name]?>";
}
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 = "";
}
if (obj.checked) {
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다.");
if (result)
obj.value = "html2";
else
obj.value = "html1";
}
else
obj.value = "";
}
function fwrite_check(f) {
var s = "";
if (s = word_filter_check(f.wr_subject.value)) {
alert("제목에 금지단어('"+s+"')가 포함되어있습니다");
return;
}
var s = "";
if (s = word_filter_check(f.wr_subject.value)) {
alert("제목에 금지단어('"+s+"')가 포함되어있습니다");
return;
}
if (s = word_filter_check(f.wr_content.value)) {
alert("내용에 금지단어('"+s+"')가 포함되어있습니다");
return;
}
alert("내용에 금지단어('"+s+"')가 포함되어있습니다");
return;
}
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;
}
else if (char_max > 0 && char_max < cnt) {
alert("내용은 "+char_max+"글자 이하로 쓰셔야 합니다.");
return;
}
}
}
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;
}
else if (char_max > 0 && char_max < cnt) {
alert("내용은 "+char_max+"글자 이하로 쓰셔야 합니다.");
return;
}
}
}
if (typeof(f.wr_key) != "undefined") {
if (hex_md5(f.wr_key.value) != md5_norobot_key) {
alert("자동등록방지용 빨간글자가 순서대로 입력되지 않았습니다.");
f.wr_key.focus();
return;
}
}
if (hex_md5(f.wr_key.value) != md5_norobot_key) {
alert("자동등록방지용 빨간글자가 순서대로 입력되지 않았습니다.");
f.wr_key.focus();
return;
}
}
<?
if ($is_dhtml_editor) {
echo cheditor3('wr_content');
echo "if (!document.getElementById('wr_content').value) { alert('내용을 입력하십시오.'); return; } ";
}
?>
if ($is_dhtml_editor) {
echo cheditor3('wr_content');
echo "if (!document.getElementById('wr_content').value) { alert('내용을 입력하십시오.'); return; } ";
}
?>
document.getElementById('btn_submit').disabled = true;
//document.getElementById('btn_list').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';";
?>
f.submit();
}
</script>
if ($g4[https_url])
echo "f.action = '$g4[https_url]/$g4[bbs]/write_update.php';";
else
echo "f.action = './write_update.php';";
?>
f.submit();
}
</script>
<script language="JavaScript" src="<?="$g4[path]/js/board.js"?>"></script>
<script language="JavaScript">
window.onload=function() {
drawFont();
}
</script>
<script language="JavaScript">
window.onload=function() {
drawFont();
}
</script>
=========================================================================================================
댓글 전체
editor관련 문제인듯한데요.
게시판 설정을 한번 더 확인해보시는 것은...
관리자와 일반인의 폼에 차이가 나는 곳이 어딘가 확인하시고 해당하는 부분의 소스를 검토하시는 것은...
if ($is_dhtml_editor) 이하가 의심이 가는군요.
체크할 대상이 없어서 나오는 것이 아닌가합니다만...
게시판 설정을 한번 더 확인해보시는 것은...
관리자와 일반인의 폼에 차이가 나는 곳이 어딘가 확인하시고 해당하는 부분의 소스를 검토하시는 것은...
if ($is_dhtml_editor) 이하가 의심이 가는군요.
체크할 대상이 없어서 나오는 것이 아닌가합니다만...
치에님 혹시 해결 하셨나요?
아직 해결못하셨다면
관련 화면의 URL과 테스트 계정하나 알주십시오.
아마도 로그인 사용자는 이상없고 비회원에 문제가 있다면 회원과 비회원의 구분에서 필드하나의 체크가 빠진듯 합니다.
그리고 오류 메세지에서 document.getElementById(...)에서 id 값이 ... 으로 되어있나요?
혹시 id 값이 있다면 어떤것이었는지도 알려주십시오. 그놈이 없어서 못찾는 것 같습니다.
아직 해결못하셨다면
관련 화면의 URL과 테스트 계정하나 알주십시오.
아마도 로그인 사용자는 이상없고 비회원에 문제가 있다면 회원과 비회원의 구분에서 필드하나의 체크가 빠진듯 합니다.
그리고 오류 메세지에서 document.getElementById(...)에서 id 값이 ... 으로 되어있나요?
혹시 id 값이 있다면 어떤것이었는지도 알려주십시오. 그놈이 없어서 못찾는 것 같습니다.
답변 감사합니다.
에디터 문제는 아닌거 같구..
basic이랑 비교해도 별다를건 없는거 같은데.. 오류가 생기네요.
아참.. 테스트 계정은 test/test 입니다..;;
에디터 문제는 아닌거 같구..
basic이랑 비교해도 별다를건 없는거 같은데.. 오류가 생기네요.
아참.. 테스트 계정은 test/test 입니다..;;
// 글숫자 검사
function check_byte(content, target)
{
var i = 0;
var cnt = 0;
var ch = '';
var cont = document.getElementById(content).value;
for (i=0; i<cont.length; i++) {
ch = cont.charAt(i);
if (escape(ch).length > 4) {
cnt += 2;
} else {
cnt += 1;
}
}
// 숫자를 출력
document.getElementById(target).innerHTML = cnt; <========== 에러 발생위치
return cnt;
}
에러는 위의 스크립터에서 발생하는것이며
위의 자바스크립터를 호출하는것은
치에님이 올려주신 소스중 다음 부분입니다.
<? if ($write_min || $write_max) { ?>onkeyup="check_byte('wr_content', 'char_count');"<?}?>><?=$content?></textarea>
<? if ($write_min || $write_max) { ?><script language="javascript"> check_byte('wr_content', 'char_count'); </script><?}?>
char_count 가 정의 되어있지 않아서 발생하는 에러입니다.
카운트를 보여주거나 설정할 char_count 라는 태그를 하나 설정하시면 될것 같습니다
function check_byte(content, target)
{
var i = 0;
var cnt = 0;
var ch = '';
var cont = document.getElementById(content).value;
for (i=0; i<cont.length; i++) {
ch = cont.charAt(i);
if (escape(ch).length > 4) {
cnt += 2;
} else {
cnt += 1;
}
}
// 숫자를 출력
document.getElementById(target).innerHTML = cnt; <========== 에러 발생위치
return cnt;
}
에러는 위의 스크립터에서 발생하는것이며
위의 자바스크립터를 호출하는것은
치에님이 올려주신 소스중 다음 부분입니다.
<? if ($write_min || $write_max) { ?>onkeyup="check_byte('wr_content', 'char_count');"<?}?>><?=$content?></textarea>
<? if ($write_min || $write_max) { ?><script language="javascript"> check_byte('wr_content', 'char_count'); </script><?}?>
char_count 가 정의 되어있지 않아서 발생하는 에러입니다.
카운트를 보여주거나 설정할 char_count 라는 태그를 하나 설정하시면 될것 같습니다
오오~~ 그렇군요. 말끔히 해결되었습니다.
숫자(char_count )를 텍스트에어리어 뒤쪽라인에서 보여줄려고 했는데.. 안나와서 지웠거든요.
역시 그게 말썽이었네요.
음화화~ 이제 아무 문제 없이 잘됩니다!!!!
감사합니다.
숫자(char_count )를 텍스트에어리어 뒤쪽라인에서 보여줄려고 했는데.. 안나와서 지웠거든요.
역시 그게 말썽이었네요.
음화화~ 이제 아무 문제 없이 잘됩니다!!!!
감사합니다.
저런 스크립터 오류날때는 파이어폭스 사용해보세요.
에러콘솔에서 자바스크립터 오류를 정확하게 잡아줍니다.
제가 파이어폭스를 사용하는 이유가 저런것 때문에 사용합니다. ^^
에러콘솔에서 자바스크립터 오류를 정확하게 잡아줍니다.
제가 파이어폭스를 사용하는 이유가 저런것 때문에 사용합니다. ^^