g4스킨을 g5로 바꾸고 있습니다. write.php 검토 문의드립니다.
본문
<?php
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if ($is_dhtml_editor) {
echo cheditor1('wr_content', '100%', '250');
}
if(!$write[wr_link1]) $write[wr_link1] = date("Ymd");
?>
<link rel="stylesheet" href="<?php echo $board_skin_url ?>/style.css">
<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; }
.table1 { border:0px solid #f1f1f1; }
.w1 { font-weight:bold; height:30px; background:#fbfbfb; padding:5px 25px 5px 20px; }
.w2 { height:30px; color:#888888; background:#fbfbfb; padding:7px 5px 0px 5px; }
.w3 { font-weight:bold; height:30px; background:#fbfbfb; padding:5px 0px 5px 5px; }
.w_input { font-family:굴림; font-size:9pt; color:#454545; border-top:1px solid #ababab; border-bottom:1px solid #dfdfdf; border-left:0px solid #ababab; border-right:0px solid #dfdfdf; height:21px;}
</style>
<script type="text/javascript">
// 글자수 제한
var char_min = parseInt(<?=$write_min?>); // 최소
var char_max = parseInt(<?=$write_max?>); // 최대
</script>
<form name="fwrite" id="fwrite" action="<?php echo $action_url ?>" onsubmit="return fwrite_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off" style="width:<?php echo $width; ?>">
<input type="hidden" name="uid" value="<?php echo get_uniqid(); ?>">
<input type="hidden" name="w" value="<?php echo $w ?>">
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
<input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">
<input type="hidden" name="sca" value="<?php echo $sca ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="spt" value="<?php echo $spt ?>">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<?php
$option = '';
$option_hidden = '';
if ($is_notice || $is_html || $is_secret || $is_mail) {
$option = '';
if ($is_notice) {
$option .= "\n".'<input type="checkbox" id="notice" name="notice" value="1" '.$notice_checked.'>'."\n".'<label for="notice">공지</label>';
}
if ($is_html) {
if ($is_dhtml_editor) {
$option_hidden .= '<input type="hidden" value="html1" name="html">';
} else {
$option .= "\n".'<input type="checkbox" id="html" name="html" onclick="html_auto_br(this);" value="'.$html_value.'" '.$html_checked.'>'."\n".'<label for="html">html</label>';
}
}
if ($is_secret) {
if ($is_admin || $is_secret==1) {
$option .= "\n".'<input type="checkbox" id="secret" name="secret" value="secret" '.$secret_checked.'>'."\n".'<label for="secret">비밀글</label>';
} else {
$option_hidden .= '<input type="hidden" name="secret" value="secret">';
}
}
if ($is_mail) {
$option .= "\n".'<input type="checkbox" id="mail" name="mail" value="mail" '.$recv_email_checked.'>'."\n".'<label for="mail">답변메일받기</label>';
}
}
echo $option_hidden;
?>
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td>
<!-- 제목 시작 -->
</td></tr>
<tr><td>
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr>
<td width="30"><img src="<?php echo $board_skin_url ?>/img/board_viewSUB.gif" width="30" height="55" align="absmiddle" border='0'></td>
<td background="<?php echo $board_skin_url ?>/img/board_viewC.gif">
<div style="width:100%; padding-top:1px; font-size:13px; font-weight:bold;line-height:15px;">
<?=$title_msg?>
</div>
</td>
<td width="8"><img src="<?php echo $board_skin_url ?>/img/board_viewR.gif" width="8" height="55" align="absmiddle" border='0'></td>
</tr>
</table>
<!-- 제목 끝 -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table1">
<colgroup width=100>
<colgroup width=''>
<tr><td colspan="2" style="height:3px;"></td></tr>
<? if ($is_name) { ?>
<tr>
<td width="55" align="left" class="w1">이 름</td>
<td align="left"><input class='ed' maxlength=20 size=15 name=wr_name itemname="이름" required value="<?=$name?>"></td></tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<? } ?>
<? if ($is_password) { ?>
<tr>
<td width="55" align="left" class="w1">패스워드</td>
<td align="left"><input class='ed' type=password maxlength=20 size=15 name=wr_password itemname="패스워드" <?=$password_required?>></td></tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<? } ?>
<? if ($is_email) { ?>
<tr>
<td width="55" align="left" class="w1">이메일</td>
<td align="left"><input class='ed' maxlength=100 size=50 name=wr_email email itemname="이메일" value="<?=$email?>"></td></tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<? } ?>
<? if ($is_homepage) { ?>
<tr>
<td width="55" align="left" class="w1">홈페이지</td>
<td align="left"><input class='ed' size=50 name=wr_homepage itemname="홈페이지" value="<?=$homepage?>"></td></tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<? } ?>
<tr>
<td width="55" align="left" class="w1">날 짜</td>
<td align="left"><input class=bbs_ft type=text id="indate" name='wr_link1' size=8 maxlength=8 minlength=8 required numeric itemname='날짜' value="<?=$write[wr_link1]?>" readonly title="옆의 달력 아이콘을 클릭하여 날짜를 입력하세요.">
<a href="javascript:win_calendar('indate', document.getElementById('indate').value, '');">
<img src="<?=$board_skin_url?>/img/calendar.gif" border="0" align="absmiddle" title="날짜를 선택하세요"></a>
</td></tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<?
$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) {
?>
<tr>
<td width="55" align="left"class="w1">옵 션</td>
<td align="left"><?=$option?></td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<? } ?>
<tr>
<td width="55" align="left" class="w1">행 사 명</td>
<td align="left"><INPUT class=bbs_ft style="width:60%;" name=wr_subject itemname="제목" required value="<?=$subject?>"></td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<tr>
<td width="55" align="left" class="w1">주 관</td>
<td align="left"><input class="ed" style="width:60%;" name="wr_5" id="wr_5" itemname="내용" value="<?=$wr_5?>" /></td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<tr>
<td width="55" align="left" class="w1">시 간</td>
<td align="left"><select name='wr_6' itemname='시간'>
<option value=''></option>
<option value='00:00' <? if($wr_6 == "00:00") echo "selected"; ?>>00:00</option>
<option value='00:30' <? if($wr_6 == "00:30") echo "selected"; ?>>00:30</option>
<option value='01:00' <? if($wr_6 == "01:00") echo "selected"; ?>>01:00</option>
<option value='01:30' <? if($wr_6 == "01:30") echo "selected"; ?>>01:30</option>
<option value='02:00' <? if($wr_6 == "02:00") echo "selected"; ?>>02:00</option>
<option value='02:30' <? if($wr_6 == "02:30") echo "selected"; ?>>02:30</option>
<option value='03:00' <? if($wr_6 == "03:00") echo "selected"; ?>>03:00</option>
<option value='03:30' <? if($wr_6 == "03:30") echo "selected"; ?>>03:30</option>
<option value='04:00' <? if($wr_6 == "04:00") echo "selected"; ?>>04:00</option>
<option value='04:30' <? if($wr_6 == "04:30") echo "selected"; ?>>04:30</option>
<option value='05:00' <? if($wr_6 == "05:00") echo "selected"; ?>>05:00</option>
<option value='05:30' <? if($wr_6 == "07:00") echo "selected"; ?>>05:30</option>
<option value='06:00' <? if($wr_6 == "06:00") echo "selected"; ?>>06:00</option>
<option value='06:30' <? if($wr_6 == "06:30") echo "selected"; ?>>06:30</option>
<option value='07:00' <? if($wr_6 == "07:00") echo "selected"; ?>>07:00</option>
<option value='07:30' <? if($wr_6 == "07:30") echo "selected"; ?>>07:30</option>
<option value='08:00' <? if($wr_6 == "08:00") echo "selected"; ?>>08:00</option>
<option value='08:30' <? if($wr_6 == "08:30") echo "selected"; ?>>08:30</option>
<option value='09:00' <? if($wr_6 == "09:00") echo "selected"; ?>>09:00</option>
<option value='09:30' <? if($wr_6 == "09:30") echo "selected"; ?>>09:30</option>
<option value='10:00' <? if($wr_6 == "10:00") echo "selected"; ?>>10:00</option>
<option value='10:30' <? if($wr_6 == "10:30") echo "selected"; ?>>10:30</option>
<option value='11:00' <? if($wr_6 == "11:00") echo "selected"; ?>>11:00</option>
<option value='11:30' <? if($wr_6 == "11:30") echo "selected"; ?>>11:30</option>
<option value='12:00' <? if($wr_6 == "12:00") echo "selected"; ?>>12:00</option>
<option value='12:30' <? if($wr_6 == "12:30") echo "selected"; ?>>12:30</option>
<option value='13:00' <? if($wr_6 == "13:00") echo "selected"; ?>>13:00</option>
<option value='13:30' <? if($wr_6 == "13:30") echo "selected"; ?>>13:30</option>
<option value='14:00' <? if($wr_6 == "14:00") echo "selected"; ?>>14:00</option>
<option value='14:30' <? if($wr_6 == "14:30") echo "selected"; ?>>14:30</option>
<option value='15:00' <? if($wr_6 == "15:00") echo "selected"; ?>>15:00</option>
<option value='15:30' <? if($wr_6 == "15:30") echo "selected"; ?>>15:30</option>
<option value='16:00' <? if($wr_6 == "16:00") echo "selected"; ?>>16:00</option>
<option value='16:30' <? if($wr_6 == "16:30") echo "selected"; ?>>16:30</option>
<option value='17:00' <? if($wr_6 == "17:00") echo "selected"; ?>>17:00</option>
<option value='17:30' <? if($wr_6 == "17:30") echo "selected"; ?>>17:30</option>
<option value='18:00' <? if($wr_6 == "18:00") echo "selected"; ?>>18:00</option>
<option value='18:30' <? if($wr_6 == "18:30") echo "selected"; ?>>18:30</option>
<option value='19:00' <? if($wr_6 == "19:00") echo "selected"; ?>>19:00</option>
<option value='19:30' <? if($wr_6 == "19:30") echo "selected"; ?>>19:30</option>
<option value='20:00' <? if($wr_6 == "20:00") echo "selected"; ?>>20:00</option>
<option value='20:30' <? if($wr_6 == "20:30") echo "selected"; ?>>20:30</option>
<option value='21:00' <? if($wr_6 == "21:00") echo "selected"; ?>>21:00</option>
<option value='21:30' <? if($wr_6 == "21:30") echo "selected"; ?>>21:30</option>
<option value='22:00' <? if($wr_6 == "22:00") echo "selected"; ?>>22:00</option>
<option value='22:30' <? if($wr_6 == "22:30") echo "selected"; ?>>22:30</option>
<option value='23:00' <? if($wr_6 == "23:00") echo "selected"; ?>>23:00</option>
<option value='23:30' <? if($wr_6 == "23:30") echo "selected"; ?>>23:30</option>
</select>
일정분류 : <select name='wr_3' itemname='일정분류'>
<option value=''></option>
<option value='1' <? if($write[wr_3] == "1") echo "selected"; ?>>일기</option>
<option value='2' <? if($write[wr_3] == "2") echo "selected"; ?>>기념</option>
<option value='3' <? if($write[wr_3] == "3") echo "selected"; ?>>일정</option>
<option value='4' <? if($write[wr_3] == "4") echo "selected"; ?>>메모</option>
</select></td>
</tr>
<tr>
<td width="55" align="left" class="w1">장 소</td>
<td align="left"><input class="ed" style="width:60%;" name="wr_7" id="wr_7" itemname="내용" value="<?=$wr_7?>" /></td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<tr>
<td width="55" align="left" class="w1">연락처</td>
<td align="left"><input class="ed" style="width:60%;" name="wr_8" id="wr_8" itemname="내용" value="<?=$wr_8?>" /></td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr height="6"><td></td></tr></table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table1">
<tr><td colspan="2" align="center" valign=top >
<tr><td colspan='2' align="left" class='write_head' style='padding:5 0 5 10;'>
<? if ($is_dhtml_editor) { ?>
<?=cheditor2('wr_content', $content);?>
<? } else { ?>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td width=50% align=left valign=bottom>
<span style="cursor: pointer;" onclick="textarea_decrease('wr_content', 10);"><img src="<?php echo $board_skin_url ?>/img/up.gif"></span>
<span style="cursor: pointer;" onclick="textarea_original('wr_content', 10);"><img src="<?php echo $board_skin_url ?>/img/start.gif"></span>
<span style="cursor: pointer;" onclick="textarea_increase('wr_content', 10);"><img src="<?php echo $board_skin_url ?>/img/down.gif"></span></td>
<td width=50% align=right><? if ($write_min || $write_max) { ?><span id=char_count></span>글자<?}?></td>
</tr>
</table>
<textarea id="wr_content" name="wr_content" class=tx style='width:100%; word-break:break-all;' rows=10 itemname="내용" required
<? if ($write_min || $write_max) { ?>onkeyup="check_byte('wr_content', 'char_count');"<?}?>><?=$content?></textarea>
<? if ($write_min || $write_max) { ?><script type="text/javascript"> check_byte('wr_content', 'char_count'); </script><?}?>
<? } ?></td>
</tr>
<tr align="center"><td height=10 colspan=2></td>
</tr>
<tr align="center"><td colspan=2 class=bbs_line1></td>
</tr>
<? if ($is_link) { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr height="6"><td></td></tr></table>
<? for ($i=1; $i<=$g4[link_count]; $i++) { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="2" class="w3"></td>
<td width="60" class="w3">링크 #<?=$i?></td>
<td class="w1"><input type='text' class=bbs_ft size=50 name='wr_link<?=$i?>' itemname='링크 #<?=$i?>' value='<?=$write["wr_link{$i}"]?>'></td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<? } ?>
<? } ?>
</table>
<? if ($is_file) { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="70" class="w1">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="60" class="w3">
파일첨부<br>
<span onclick="add_file();" style="cursor:pointer;"><img src="<?php echo $board_skin_url ?>/img/btn_file_add.gif"></span>
<span onclick="del_file();" style="cursor:pointer;"><img src="<?php echo $board_skin_url ?>/img/btn_file_minus.gif"></span>
</td>
</tr>
</table>
</td>
<td class="w1" align="left"><table id="variableFiles" cellpadding=0 cellspacing=0></table><?// print_r2($file); ?>
<script type="text/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"];
objRow = objTbl.insertRow(objTbl.rows.length);
objCell = objRow.insertCell(0);
objCell.innerHTML = "<input type='file' class='ed' 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='업로드 이미지 파일에 해당 되는 내용을 입력하세요.'>";
<? } ?>
;
}
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>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<? } ?>
<? if ($is_trackback) { ?>
<tr>
<td height="30" align="center" class="bbs_pl">
트랙백주소 </td>
<td align="left">
<INPUT class=bbs_ft size=50 name=wr_trackback itemname="트랙백" value="<?=$trackback?>">
<? if ($w=="u") { ?>
<input type=checkbox name="re_trackback" value="1">핑 보냄
<? } ?> </TD>
</tr>
<tr align="center"><td colspan=2 class=bbs_line1></td>
</tr>
<? } ?>
<? if ($is_trackback) { ?>
<tr>
<td class=write_head>트랙백주소</td>
<td align="left"><input class='ed' size=50 name=wr_trackback itemname="트랙백" value="<?=$trackback?>">
<? if ($w=="u") { ?><input type=checkbox name="re_trackback" value="1">핑 보냄<? } ?></td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<? } ?>
<? if ($is_guest) { ?>
<tr><td width="125" rowspan="2" class="w1"><img id='kcaptcha_image' border='0' width=120 height=60 onclick="imageClick();" style="cursor:pointer;" title="글자가 잘안보이는 경우 클릭하시면 새로운 글자가 나옵니다."></td>
<td align="left"><input class='ed' type=input size=10 name=wr_key itemname="자동등록방지" required> 왼쪽의 글자를 입력하세요.</td></tr>
<tr><td height=1 colspan=2 bgcolor=#e7e7e7></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="<?php echo $board_skin_url ?>/img/btn_write.gif" border=0 accesskey='s'>
<a href="./board.php?bo_table=<?=$bo_table?>"><img id="btn_list" src="<?php echo $board_skin_url ?>/img/btn_list.gif" border=0></a></td>
</tr>
</table>
</form>
</td></td></table>
<script type="text/javascript" src="<?="php echo G5_IMG_URL/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;
}
}
<?
if ($is_dhtml_editor) echo cheditor3('wr_content');
?>
var subject = "";
var content = "";
$.ajax({
url: "<?php echo G5_IMG_URL ?>/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 (!check_kcaptcha(f.wr_key)) {
return false;
}
document.getElementById('btn_submit').disabled = true;
document.getElementById('btn_list').disabled = true;
return true;
}
</script>
<script type="text/javascript" src="<?="G5_JS_URL/js/board.js"?>"></script>
<script type="text/javascript"> window.onload=function() { drawFont(); } </script>
소스는 이러합니다.
어느순간부터 해당날짜를 클릭했을때 그 날짜에 입력이 되지 않고 자꾸 당일 날짜에 입력이 되네요..
기존의 g4 스킨을 처음 설치했을땐 글쓰기조차 안되었는데 초기화 하려고 g4스킨을 설치하고 수정을 해도 원하는 날짜를
클릭하고 글쓰기를 하면 결국 글쓴 당일날짜에 입력이 됩니다.
달력도 클릭이 안되네요 ㅠㅠ
분명 write.php쪽에서 에러가 나는거 같은데 가르침 부탁드립니다.(__)
답변 1
글쓰기 하면 당일날짜가 입력되는 이유는 위의 소스에서 wr_link1 기본값으로
if(!$write[wr_link1]) $write[wr_link1] = date("Ymd");
지정되어 있어서 그렇습니다.
위의 php 소스상에는 큰 이상이 없는 것 같은데,
날짜를 입력받아 wr_link1 필드에 넣어주는 역할을 하는 win_calendar() 함수에 문제가 있는듯 합니다.
달력 클릭해도 아무반응 없다고 하시니 win_calendar() 함수가 맞게 include 되어 있는지 확인해보시고 해당 스크립트가 포함된 js 파일을 찾아 올바르게 동작하는지 확인해보세요.
jquey ui의 datepicker라면
$("#wr_link1").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd", showButtonPanel: true, yearRange: "c-99:c+99", maxDate: "+0d" });
이런식으로 호출하셔도 됩니다.
!-->!-->