미래의 날짜-오늘은 몇일 남았습니다. 구현이요. > SMS4 질문

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!

SMS4 질문

SMS4 베타테스트 기간 동안은 이 게시판에서 SMS4에 관련된 모든 사항을 처리합니다.

미래의 날짜-오늘은 몇일 남았습니다. 구현이요. 정보

질문 미래의 날짜-오늘은 몇일 남았습니다. 구현이요.

본문

유효기간의 날짜를 찍으면  20101107  이렇게 나타나는데요.
이날짜를 달력에서 찍으면 아래에  몇일남았습니다.에 유효기간-오늘날짜 해서
오늘로 부터 몇일남았습니다.
출력 할려는데  writ.php에서 바로  보이게 하려면 어떻게 짜야 할까요.
<tr height="30">
   <td bgcolor="#F7F7F7" width="15%" align="center">유효기간</td>
         <td bgcolor="white"> <input class=m_text type=text id=ext6_022 name='ext6_02' size=8 maxlength=8 minlength=8 required numeric itemname='유효기간' value="<?=$write['ext6_02']?>" readonly title='달력 - 날짜를 선택하세요.'>
                    <a href="javascript:win_calendar('ext6_02', document.getElementById('ext6_02').value, '');">
                    <img src='<?=$board_skin_path?>/img/calendar.gif' border=0 align=absmiddle title='달력 - 날짜를 선택하세요'></a> 
                                      </td>
   <td bgcolor="#F7F7F7" width="15%"  align="center">수량</td>
   <td bgcolor="white">
    <input class='field' style="width:20%;" name="ext6_03"  id="ext6_03" itemname="수량"  value="<?=$ext6_03?>" required> 개
   </td>
  </tr>
  <tr><td colspan=4 height=1 bgcolor=#e7e7e7></td></tr>
  
  <tr height="30">
   <td bgcolor="#F7F7F7" width="15%" align="center">남은기간</td>
         <td bgcolor="white">


     남은기간은 <font color=red><b><input class='field' style="width:60px;" name="ext6_04"  id="ext6_04" itemname="사용기간"  value="<?=$ext6_04?>" required readonly></b></font>일입니다. </td>

이부분입니다. view화면으로 안가고 바로 노출하려면 ajax 인크루트 해서 구현해야 하나요? 아래는 원문전체

=================================write.skin.php ==========
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

if ($is_dhtml_editor) {
    include_once("$g4[path]/lib/cheditor4.lib.php");
    echo "<script src='$g4[cheditor4_path]/cheditor.js'></script>";
    echo cheditor1('wr_content', '100%', '250');
}

$ex2_filed = explode("|",$write[wr_2]);
$ext2_00  = $ex2_filed[0]; // 전화번호
$ext2_01  = $ex2_filed[1]; // 전화번호
$ext2_02  = $ex2_filed[2]; // 전화번호
$ext2_03  = $ex2_filed[3]; // 휴대전화
$ext2_04  = $ex2_filed[4]; // 휴대전화
$ext2_05  = $ex2_filed[5]; // 휴대전화

$ex6_filed = explode("|",$write[wr_6]);
$ext6_00  = $ex6_filed[0]; // 업체명
$ext6_01  = $ex6_filed[1]; // 상세보기(GO)
$ext6_02  = $ex6_filed[2]; // 마감시한
$ext6_03  = $ex6_filed[3]; // 수량
$ext6_04  = $ex6_filed[4]; // 남은기간
$ext6_05  = $ex6_filed[5]; // 구입가격
$ext6_06  = $ex6_filed[6]; // 거래방법
$ext6_07  = $ex6_filed[7]; // 거래상황
$ext6_08  = $ex6_filed[8]; // 희망가격
?>

<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; }
</style>
<SCRIPT language=JavaScript src="<?=$g4['path']?>/js/common.js"></SCRIPT>
<script language="javascript">
// 글자수 제한
var char_min = parseInt(<?=$write_min?>); // 최소
var char_max = parseInt(<?=$write_max?>); // 최대
</script>

<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=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>

<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>


<table width="100%" border="0" cellspacing="0" cellpadding="0">
<colgroup width=90>
<colgroup width=''>
<tr><td colspan="2" style="background:url(<?=$board_skin_path?>/img/title_bg.gif) repeat-x; height:3px;"></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 bgcolor="#F7F7F7" align="center" width="15%">옵 션</td>
    <td bgcolor="white"><?=$option?></td></tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<? } ?>

<tr>
 <td colspan=2>

  <table width="100%" cellpadding="0" cellspacing="0" >
  <tr>
   <td height="40" valign="bottom" bgcolor="white"><img src="<?=$board_skin_path?>/img/icon_7.gif" align="absmiddle"> <b>작성자정보</b></td>
  </tr>
  </table>

  <table cellspacing="1" width="100%" bordercolor="#f9f9f9" cellpadding="4" bgcolor="#EAEAEA">
  <? if ($is_name) { ?>
  <tr>
   <td bgcolor="#F7F7F7" align="center" width="15%">작성자(상호)</td>
   <td colspan="3" bgcolor="white"><input class='field' maxlength=20 size=15 name=wr_name itemname="작성자(상호)" required value="<?=$name?>"></td>
  </tr>
  <? } ?>
  
  <? if ($is_password) { ?>
  <tr>
   <td bgcolor="#F7F7F7" width="15%" align="center">비밀번호</td>
   <td colspan="3" bgcolor="white"><input class='field' type=password maxlength=20 size=15 name=wr_password itemname="패스워드" <?=$password_required?>></td>
  </tr>
  <? } ?>
  
  <?// if ($is_email) { ?>
  <tr>
   <td bgcolor="#F7F7F7" width="15%" align="center">이메일</td>
   <td colspan="3" bgcolor="white"><input class='field' maxlength=60 size=50 name=wr_email email itemname="이메일" value="<?=$email?>"></td>
  </tr>
  </table>
  <?// } ?>
  
  <table cellspacing="1" width="100%" bordercolor="#f9f9f9" cellpadding="4" bgcolor="#EAEAEA">
  <tr>
   <td bgcolor="#F7F7F7" width="15%" align="center">전화번호</td>
   <td bgcolor="white" width="35%">
    <input name='ext2_00' class='field' value='<?=$ext2_00?>' type='text' size='4' maxlength='4' onkeydown='onlyNumber(this);' required itemname='전화번호' class=input>  -
    <input name='ext2_01' class='field' value='<?=$ext2_01?>' type='text' size='4' maxlength='4' onkeydown='onlyNumber(this);' required itemname='전화 두번째자리' class=input>  -
    <input name='ext2_02' class='field' value='<?=$ext2_02?>' type='text' size='4' maxlength='4' onkeydown='onlyNumber(this);' required itemname='전화 세번째자리' class=input>
   </td>
   <td bgcolor="#F7F7F7" width="15%" align="center">휴대폰</td>
   <td bgcolor="white" width="35%">
    <input name='ext2_03' class='field' value='<?=$ext2_03?>' type='text' size='4' maxlength='4' onkeydown='onlyNumber(this);' required itemname='휴대번호' class=input>  -
    <input name='ext2_04' class='field' value='<?=$ext2_04?>' type='text' size='4' maxlength='4' onkeydown='onlyNumber(this);' required itemname='번호 두번째자리' class=input>  -
    <input name='ext2_05' class='field' value='<?=$ext2_05?>' type='text' size='4' maxlength='4' onkeydown='onlyNumber(this);' required itemname='번호 세번째자리'>
   </td>
  </tr>
  </table>

  <table width="100%" cellpadding="0" cellspacing="0" >
  <tr><td height="40" valign="bottom" bgcolor="white"><img src="<?=$board_skin_path?>/img/icon_7.gif" align="absmiddle"> <b>상품정보</b></td></tr>
  </table>
  
  <table cellspacing="1" width="100%" bordercolor="#f9f9f9" cellpadding="4" bgcolor="#EAEAEA">
  <tr height="30">
   <td bgcolor="#F7F7F7" width="15%" align="center">제목</td>
   <td colspan="3" bgcolor="white"><input class='field' style="width:100%;" name=wr_subject  id="wr_subject" itemname="제목" required value="<?=$subject?>"></td>
  </tr>
  </table>
  
  <table width="100%" cellpadding="0" cellspacing="0" >
  <tr height="30">
   <td bgcolor="#F7F7F7" width="15%"  align="center">형태</td>
   <td bgcolor="white" width="35%">
    <input type=radio  name="wr_3" value="팝니다" <? if($write[wr_3] == "팝니다") echo "checked"; ?> required itemname="형태">팝니다  
    <input type=radio name="wr_3"  value="삽니다" <? if($write[wr_3] == "삽니다") echo "checked"; ?> required itemname="형태">삽니다  
    <input type=radio name="wr_3"  value="무료입니다" <? if($write[wr_3] == "무료제공") echo "checked"; ?> required itemname="형태">무료제공
   </td>
   <td bgcolor="#F7F7F7" width="15%" align="center">거래지역</td>
   <td bgcolor="white" width="35%">
    <select name=ca_name required itemname="거래지역"><option value="">거래지역선택<?=$category_option?></select>
   </td>
  </tr>
  <tr><td colspan=4 height=1 bgcolor=#e7e7e7></td></tr>

  <tr height="30">
   <td bgcolor="#F7F7F7" width="15%" align="center">상품명</td>
   <td bgcolor="white">
    <input class='field' style="width:100%;" name=wr_4 id="wr_4" itemname="상품명"  value="<?=$write[wr_4]?>" required>
   </td>
   <td bgcolor="#F7F7F7" width="15%" align="center">구분</td>
   <td bgcolor="white">
    <input type=radio required name="wr_5" value="신상품" <? if($write[wr_5] == "신상품")  echo "checked"; ?>>신상품  
    <input type=radio required name="wr_5" value="중고" <? if($write[wr_5] == "중고")  echo "checked"; ?>>중고  
    <input type=radio required name="wr_5" value="미사용티켓" <? if($write[wr_5] == "미사용티켓")  echo "checked"; ?>>
                    미사용 티켓</td>
  </tr>
  <tr><td colspan=4 height=1 bgcolor=#e7e7e7></td></tr>

          <tr height="30">
                  <td bgcolor="#F7F7F7" width="15%" align="center">업체명</td>
         <td bgcolor="white">
                    <!-- <input class='field' style="width:100%;" name="ext6_00"  id="ext6_00" itemname="제조사"  value="<?=$ext6_00?>" > -->
                    <select name="ext6_00" id="ext6_00" itemname="업체명" >
                      <option value='365팡팡'>365팡팡</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='타임11'>타임11</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='패밀리CEO'>패밀리CEO</option>
                      <option value='피컵'>피컵</option>
                      <option value='할인의추억'>할인의추억</option>
                      <option value='해피바이러스'>해피바이러스</option>
                      <option value='헬로디씨'>헬로디씨</option>
                      <option value='Kupon'>Kupon</option>
                      <option value='기타'>기타</option>
                    </select> </td>
         <td bgcolor="#F7F7F7" width="15%"  align="center">상세보기(URL)</td>
   <td bgcolor="white">
    <input class='field' style="width:100%;" name="ext6_01" id="ext6_01" itemname="모델명"  value="<?=$ext6_01?>">
                   </td>
  </tr>
  <tr><td colspan=4 height=1 bgcolor=#e7e7e7></td></tr>
  
  <tr height="30">
   <td bgcolor="#F7F7F7" width="15%" align="center">유효기간</td>
         <td bgcolor="white"> <input class=m_text type=text id=ext6_022 name='ext6_02' size=8 maxlength=8 minlength=8 required numeric itemname='유효기간' value="<?=$write['ext6_02']?>" readonly title='달력 - 날짜를 선택하세요.'>
                    <a href="javascript:win_calendar('ext6_02', document.getElementById('ext6_02').value, '');">
                    <img src='<?=$board_skin_path?>/img/calendar.gif' border=0 align=absmiddle title='달력 - 날짜를 선택하세요'></a> 
                                      </td>
   <td bgcolor="#F7F7F7" width="15%"  align="center">수량</td>
   <td bgcolor="white">
    <input class='field' style="width:20%;" name="ext6_03"  id="ext6_03" itemname="수량"  value="<?=$ext6_03?>" required> 개
   </td>
  </tr>
  <tr><td colspan=4 height=1 bgcolor=#e7e7e7></td></tr>
  
  <tr height="30">
   <td bgcolor="#F7F7F7" width="15%" align="center">남은기간</td>
         <td bgcolor="white">


     남은기간은 <font color=red><b><input class='field' style="width:60px;" name="ext6_04"  id="ext6_04" itemname="사용기간"  value="<?=$ext6_04?>" required readonly></b></font>일입니다. </td>
                 
   <td bgcolor="#F7F7F7" width="15%" align="center">구입가격</td>
   <td bgcolor="white">
    <input class='field' name=ext6_05 style="text-align:left; WIDTH: 100px;" onkeyup="document.fwrite.ext6_05.value=PointComma(document.fwrite.ext6_05.value)" itemname="구입가격" value="<?=$ext6_05?>"><input type="hidden" name="won"> 원(※숫자로만 입력)
   </td>
  </tr>
  <tr><td colspan=4 height=1 bgcolor=#e7e7e7></td></tr>

  <tr height="30">
   <td bgcolor="#F7F7F7" width="15%" align="center">거래방법</td>
   <td bgcolor="white">
    <input type=radio required name="ext6_06" value="직접전달" <? if($ext6_06 == "직접전달")  echo "checked"; ?>>
                    직접전달
                    <input type=radio required name="ext6_06" value="택배배송" <? if($ext6_06 == "택배배송")  echo "checked"; ?>>택배배송
    <input type=radio required name="ext6_06" value="휴대폰전송" <? if($ext6_06 == "휴대폰전송")  echo "checked"; ?>>휴대폰전송
    <input type=radio required name="ext6_06" value="우체국등기" <? if($ext6_06 == "우체국등기")  echo "checked"; ?>>우체국등기
    <input type=radio required name="ext6_06" value="이메일첨부" <? if($ext6_06 == "이메일첨부")  echo "checked"; ?>>이메일첨부
    <input type=radio required name="ext6_06" value="다운로드" <? if($ext6_06 == "다운로드")  echo "checked"; ?>>다운로드                               </td>
   <td bgcolor="#F7F7F7" width="15%" align="center">거래상황</td>
   <td bgcolor="white">
    <input type=radio required name="ext6_07" value="거래중" <? if($ext6_07 == "거래중")  echo "checked"; ?>><img src="<?=$board_skin_path?>/img/icon_03.gif" align="absmiddle"> 
    <input type=radio required name="ext6_07" value="거래완료" <? if($ext6_07 == "거래완료")  echo "checked"; ?>><img src="<?=$board_skin_path?>/img/icon_04.gif" align="absmiddle">
   </td>
  </tr>
  <tr><td colspan=4 height=1 bgcolor=#e7e7e7></td></tr>

  <tr height="30">
   <td bgcolor="#F7F7F7" width="15%" align="center">상품설명</td>
   <td colspan="3" bgcolor="white" style='padding:10,5,5,5;'>
    <? 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="<?=$board_skin_path?>/img/up.gif"></span>
      <span style="cursor: pointer;" onclick="textarea_original('wr_content', 10);"><img src="<?=$board_skin_path?>/img/start.gif"></span>
      <span style="cursor: pointer;" onclick="textarea_increase('wr_content', 10);"><img src="<?=$board_skin_path?>/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 language="javascript"> check_byte('wr_content', 'char_count'); </script><?}?>
    <? } ?>
   </td>
  </tr>
  <tr><td colspan=4 height=1 bgcolor=#e7e7e7></td></tr>
        </table>

        <table cellpadding="0" cellspacing="0" width="100%">
        <tr height="40">
   <td valign="bottom" bgcolor="white"><img src="<?=$board_skin_path?>/img/icon_7.gif" align="absmiddle"> <b>가격정보</b></td>
        </tr>
        </table>
  
  <table cellspacing="1" width="100%" bordercolor="#f9f9f9" cellpadding="4" bgcolor="#EAEAEA">
  <tr>
   <td bgcolor="#F7F7F7" width="15%" align="center">희망가격</td>
   <td bgcolor="white">
    <input class='field' name=ext6_08 style="text-align:left; WIDTH: 100px;" onkeyup="document.fwrite.ext6_08.value=PointComma(document.fwrite.ext6_08.value)" itemname="희망가격" required value="<?=$ext6_08?>"><input type="hidden" name="won"> 원(※숫자로만 입력)
   </td>
  </tr>
  <tr>
   <td bgcolor="#F7F7F7" width="15%" align="center">가격참조</td>
   <td bgcolor="white">
    <input type=radio required name="wr_8" value="가격절충" <? if($write[wr_8] == "가격절충")  echo "checked"; ?>><img src="<?=$board_skin_path?>/img/icon_05.gif" align="absmiddle">
   </td>
  </tr>
  </table>

  <table cellpadding="0" cellspacing="0" width="100%">
  <tr bgcolor="#e7e7e7">
   <td height="40" valign="bottom" bgcolor="white"><img src="<?=$board_skin_path?>/img/icon_7.gif" align="absmiddle"> <b>상품이미지</b></td>
  </tr>
  </table>

  <? if ($is_file) { ?>
  <table cellspacing="1" width="100%" bordercolor="#f9f9f9" cellpadding="4" bgcolor="#EAEAEA">
  <tr>
   <td bgcolor="#F7F7F7" width="15%">
    <table cellpadding=0 cellspacing=0>
    <tr>
     <td class=write_head style="padding-top:10px; line-height:20px;">
      파일첨부<br>
      <span onclick="add_file();" style="cursor:pointer;"><img src="<?=$board_skin_path?>/img/btn_file_add.gif"></span>
      <span onclick="del_file();" style="cursor:pointer;"><img src="<?=$board_skin_path?>/img/btn_file_minus.gif"></span>
     </td>
    </tr>
    </table>
   </td>
   <td bgcolor="white"><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"];

            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>
   </td>
  </tr>
        </table>
  <? } ?>

  <? if ($is_trackback) { ?>
  <table cellspacing="1" width="100%" bordercolor="#f9f9f9" cellpadding="4" bgcolor="#EAEAEA">
  <tr>
   <td bgcolor="#F7F7F7" width="15%">트랙백주소</td>
   <td bgcolor="white"><input class='ed' size=50 name=wr_trackback itemname="트랙백" value="<?=$trackback?>">
   <? if ($w=="u") { ?><input type=checkbox name="re_trackback" value="1">핑 보냄<? } ?>
   </td>
  </tr>
        </table>
  <? } ?>

  <? if ($is_guest) { ?>
  <table cellspacing="1" width="100%" bordercolor="#f9f9f9" cellpadding="4" bgcolor="#EAEAEA">
  <tr>
   <td bgcolor="#F7F7F7" width="15%"><img id='kcaptcha_image' /></td>
  <td bgcolor="white"><input class='ed' type=input size=10 name=wr_key itemname="자동등록방지" required>  왼쪽의 글자를 입력하세요.</td>
  </tr>
        </table>
  <? } ?>
 </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 LANGUAGE="JavaScript">
<!--
//숫자에 3 자리마다 콤마찍어 준다.
function PointComma(formnum) {
   
    num1 = formnum.length;//숫자의 길이를 구한다.       

        FirstNum = formnum.substr(0,1);//입력숫자의 첫번째를 잘라 낸다..
        FirstNum2 = formnum.substr(1,num1);//'0'다음의 숫자를 잘라낸다.
 
        if(FirstNum == "0"){ //만약 숫자가 "0"으로 시작되면 앞에 '0'을 뺀 숫자만큼 리턴 한다........
                alert("입력숫자는 0 으로 시작할 수 없습니다.");
        return FirstNum2;
                formnum = FirstNum2;
        }

        re = /^\$|,/g;
    formnum = formnum.replace(re, ""); //콤마를 제거 해 준다....

        document.fwrite.won.value=formnum;//힌드값에..콤마를 뺀 값을 넣어든다.
       
        var fieldnum = '' + formnum;   

  //여기서 부터 3자리마다 콤마를 찍어 준다.
        if (isNaN(fieldnum)) {//숫자인가 비교
      //  alert("숫자만 입력하실 수 있습니다.");       
    document.fwrite[0].wr_6.value == "";
        document.fwrite[0].wr_6.focus();
        return "";
        }
        else {
        var comma = new RegExp('([0-9])([0-9][0-9][0-9][,.])');
        var Po = fieldnum.split('.');
        Po[0] += '.';
          do {
            Po[0] = Po[0].replace(comma, '$1,$2');
            } while (comma.test(Po[0]));

          if (Po.length > 1) {
          return Po.join('');
          }
          else {
          return Po[0].split('.')[0];
                }
        }
}
//-->
</SCRIPT>

<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 ($is_dhtml_editor) echo cheditor3('wr_content');
    ?>

    if (document.getElementById('tx_wr_content')) {
        if (!ed_wr_content.outputBodyText()) {
            alert('내용을 입력하십시오.');
            ed_wr_content.returnFalse();
            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 language="JavaScript" src="<?="$g4[path]/js/board.js"?>"></script>
<script language="JavaScript"> window.onload=function() { drawFont(); } </script>
========================================끝===================================

댓글 전체

전체 0
SMS4 질문 내용 검색
  • 개별 목록 구성 번호 제목 작성자 작성일 조회
  • 게시물이 없습니다.

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT