KCP 창업 지원, 수수료 국내최저 2.9% 제공 이벤트!

탭 관련 고수님들 도움 부탁드립다.

그누보드5
영카트5
스터디
Q & A
제작의뢰
컨텐츠몰
부가서비스
소모임
커뮤니티
부가서비스
KCP 이벤트!
탭 관련 고수님들 도움 부탁드립다.

QA

탭 관련 고수님들 도움 부탁드립다.

본문


스킨중에 쌍란님의 책소개 스킨이 있는데요.. 
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=151251&sca=&sfl=wr_subject%7C%7Cwr_content&stx=%EC%B1%85

 예전 버전

http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=80673&sca=&sfl=wr_subject%7C%7Cwr_content&stx=%EC%B1%85%EC%86%8C%EA%B0%9C

에서는  겨울천사 님의 도서정보 소개 게시판 을 응용해서 최근버전으로 만드셨던데, 예전 버전에는 Tab이 들어가서
분류할 수 있었는데, 이  Tab 부분이 맘에 들어서 해 보려니 현재 버전과 안 맞아 글쓰기나, 수정이 안되더라구요.

그래서  쌍란님의 책소개 스킨에 필드를 2개 추가 해서 만들어 봤습니다.

예를 들면 아래 그림 같이 말이죠..  그런데,그런데,그런데.. ㅜㅜ


1,2,3의 필드는 Content로 구분되는데 필드값을  content_a, content_b, content_c 바꿔주면


Parse error: syntax error, unexpected $end in C:\APM_Setup\htdocs\skin\board\ssangran.com\write.skin.php 와 같은 에러가 출력 됩니다.


현재 3일째 머리 쥐나고 잠도 안오고 검색 해봐도 없고, 만드신분들에게 쪽지 보냈는데도 아직 답도 없고 해서
이렇게 질문 해 봅니다.


고수님들 부탁 드립니다. 짧은 지식으로는 이해가 안가서리...

그럼 답변  기다립니다. 꾸~~뻑


neo.gif

 

이 글을 내 페이스북 계정으로 보내기 이 글을 내 트위터 계정으로 보내기

이 질문에 댓글 쓰기 :

답변 5

채택됨

히어1님의 답변

<?
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');
}
include_once "$board_skin_path/skin.lib.php";
if ($is_category) {
    $nc_category_location  = "./board.php?bo_table=$bo_table&sca=$sca&sfl=wr_10&stx=";
    $nc_category_option    = get_nc_category_option($bo_table, $sca);
}
$wr_7 = $write[wr_7];
$wr_10 = $write[wr_10];
?>
<script id="dynamic"></script>
<script language="javascript">
// 글자수 제한
var char_min = parseInt(<?=$write_min?>); // 최소
var char_max = parseInt(<?=$write_max?>); // 최대
function category_data(sel,target) {
var sca    = sel.options[sel.selectedIndex].value; // 첫번째 selectbox의 선택된 텍스트
var form    = sel.form.name;
dynamic.src = "<?=$board_skin_path?>/category.data.php?bo_table=<?=$bo_table?>&form=" + form + "&sca=" + sca + "&target=" + target;
}
</script>
<!-- 김선용 2005.4 - ff(불여우) 에서는 innerhtml 사용시 폼이 <table> 아래에 있으면 인식하지 못합니다. -->
<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 align=center>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr height="33">
    <td width="4" bgcolor="#7BB2D6"><img src="<?=$board_skin_path?>/img/top_01.gif" width="4" height="33"></td>
    <td width="110" align="center" bgcolor="#7BB2D6"> </td>
    <td width="5" align="center" bgcolor="#7BB2D6"><img src="<?=$board_skin_path?>/img/top_02.gif" width="5" height="33"></td>
    <td width="5" align="center" bgcolor="#EEEEEE"><img src="<?=$board_skin_path?>/img/top_03.gif" width="5" height="33"></td>
    <td width="" align="left" bgcolor="#EEEEEE"><font style="font-family:돋움; font-size:9pt; color:#7D7D7D"><strong>[ <?=$title_msg?> ]</strong></span></td>
    <td width="4" bgcolor="#EEEEEE"><img src="<?=$board_skin_path?>/img/top_04.gif" width="4" height="33"></td>
</tr>

<? if ($is_name) { ?>
<tr height="30">
    <td></td>
    <td align="center">이름</td>
    <td colspan=2></td>
    <td style='padding-left:5px;'><INPUT class=ed maxLength=20 size=15 name=wr_name itemname="이름" required value="<?=$name?>"></TD>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>
<? } ?>

<? if ($is_password) { ?>
<tr height="30">
    <td></td>
    <td align="center">패스워드</td>
    <td colspan=2></td>
    <td style='padding-left:5px;'><INPUT class=ed type=password maxLength=20 size=15 name=wr_password itemname="패스워드" <?=$password_required?>></TD>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>
<? } ?>

<? if ($is_email) { ?>
<tr height="30">
    <td></td>
    <td align="center">이메일</td>
    <td colspan=2></td>
    <td style='padding-left:5px;'><INPUT class=ed maxLength=100 size=50 name=wr_email email itemname="이메일" value="<?=$email?>"></TD>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>
<? } ?>

<? if ($is_homepage) { ?>
<tr height="30">
    <td></td>
    <td align="center">홈페이지</td>
    <td colspan=2></td>
    <td style='padding-left:5px;'><INPUT class=ed size=50 name=wr_homepage itemname="홈페이지" value="<?=$homepage?>"></TD>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>
<? } ?>

<tr height="30">
    <td></td>
    <td align="center">옵션</td>
    <td colspan=2></td>
    <td style='padding-left:5px;'>
        <? if ($is_notice) { ?><input type=checkbox name=notice value="1" <?=$notice_checked?>>공지 <? } ?>
        <? if ($is_html) { ?><INPUT onclick="html_auto_br(this);" type=checkbox value="<?=$html_value?>" name="html" <?=$html_checked?>><span class=w_title>HTML</span> <? } ?>
        <? if ($is_secret) { ?><INPUT type=checkbox value="secret" name="secret" <?=$secret_checked?>><span class=w_title>비밀글</span> <? } ?>
        </td>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>

<? if ($is_category) { ?>
<tr height="30">
    <td></td>
    <td align="center">분류</td>
    <td colspan=2></td>
    <td style='padding-left:5px;'><select name=ca_name required itemname="분류">
            <option value="">선택하세요<?=$category_option?></option>
        </select>
         </TD>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>
<? } ?>

<tr height="30">
    <td></td>
    <td align="center">도서명</td>
    <td colspan=2></td>
    <td style='padding-left:5px; padding-right:5px;'><INPUT class=ed style="width:100%;" name=wr_subject itemname="제목" required value="<?=$subject?>"></td>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>
<tr>
<td></td>
<td align=center>상세정보</td>
<td colspan=2></td>
<td>
<table width=100%>
<tr>
    <td align="right" width=20%>출판사</td>
    <td  width=30% ><INPUT class=ed style="width:100%;" name=wr_1 itemname="출판사" required value="<?=$write[wr_1]?>"></td>
    <td  width=20% align="right">지은이</td>
    <td width=30%><INPUT class=ed style="width:100%;" name=wr_2 itemname="지은이" required value="<?=$write[wr_2]?>"></td>
</tr>
<tr>
    <td align="right" width=20%>페이지</td>
    <td  width=30% ><INPUT class=ed style="width:100%;" name=wr_3 itemname="페이지" value="<?=$write[wr_3]?>"></td>
    <td  width=20% align="right">크기</td>
    <td width=30%><INPUT class=ed style="width:100%;" name=wr_4 itemname="크기" value="<?=$write[wr_4]?>"></td>
</tr>
<tr>
  <td align="right">발행일</td>
  <td ><input class=ed style="width:100%;" name=wr_5 itemname="발행일" value="<?=$write[wr_5]?>" /></td>
  <td align="right">ISBN</td>
  <td><input class=ed style="width:100%;" name=wr_6 itemname="ISBN" value="<?=$write[wr_6]?>" /></td>
</tr>
<tr>
    <td align="right" width=20%>연구소보유여부</td>
    <td  width=30% ><select class="ed" name="wr_7" itemname='연구소보유여부' value="<?=$write[wr_7]?>">
      <?
if ($wr_7){
echo "<option selected value='$wr_7'>$wr_7</option>";
} else {
echo "<option selected value=''>선택하세요</option>";
}
?>
      <option value='연구소 비치'>보유</option>
      <option value='구입예정'>구입예정</option>
      <option value='분실'>분실</option>
      <option value='품절'>품절</option>
      <option value='구입예정 없음'>구입예정 없음</option>
      <option value='기타'>기타 </option>
    </select></td>
    <td  width=20% align="right"> </td>
    <td width=30%> </td>
</tr>
</table>
</td></tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>
<tr>
    <td></td>
    <td align="center">내용</td>
    <td colspan=2></td>
    <td style='padding:5px;'>
 <? 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('content_a', 10);"><img src="<?=$board_skin_path?>/img/up.gif" width="16" height="16"></SPAN>
                <SPAN style="CURSOR: pointer;" onclick="textarea_original('content_a', 10);"><img src="<?=$board_skin_path?>/img/start.gif" width="16" height="16"></SPAN>
                <SPAN style="CURSOR: pointer;" onclick="textarea_increase('content_a', 10);"><img src="<?=$board_skin_path?>/img/down.gif" width="16" height="16"></SPAN></td>
    <td width=50% align=right><? if ($write_min || $write_max) { ?><span id=char_count></span>글자<?}?></td>
            <td width=50% align=right></td>
        </tr>
        </table>
        <TEXTAREA id=content_a name=content_a class=tx style='width:100%; word-break:break-all;' rows=10 itemname="내용" required
        <? if ($write_min || $write_max) { ?>onKEYUP="check_byte('content_a', 'char_count');"<?}?>><?=$content_a?>
        </TEXTAREA>
        <? if ($write_min || $write_max) { ?><script language="JavaScript"> check_byte('content_a', 'char_count'); </script><?}?></td>
   <? } ?>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>
<? if ($is_link) { ?>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>
<tr>
    <td></td>
    <td align="center">내용</td>
    <td colspan=2></td>
    <td style='padding:5px;'>
 <? 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('content_b', 10);"><img src="<?=$board_skin_path?>/img/up.gif" width="16" height="16"></SPAN>
                <SPAN style="CURSOR: pointer;" onclick="textarea_original('content_b', 10);"><img src="<?=$board_skin_path?>/img/start.gif" width="16" height="16"></SPAN>
                <SPAN style="CURSOR: pointer;" onclick="textarea_increase('content_b', 10);"><img src="<?=$board_skin_path?>/img/down.gif" width="16" height="16"></SPAN></td>
    <td width=50% align=right><? if ($write_min || $write_max) { ?><span id=char_count></span>글자<?}?></td>
            <td width=50% align=right></td>
        </tr>
        </table>
        <TEXTAREA id=content_b name=content_b class=tx style='width:100%; word-break:break-all;' rows=10 itemname="내용" required
        <? if ($write_min || $write_max) { ?>onKEYUP="check_byte('content_a', 'char_count');"<?}?>><?=$content_b?>
        </TEXTAREA>
        <? if ($write_min || $write_max) { ?><script language="JavaScript"> check_byte('content_a', 'char_count'); </script><?}?></td>
   <? } ?>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>
<? if ($is_link) { ?>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>
<tr>
    <td></td>
    <td align="center">내용</td>
    <td colspan=2></td>
    <td style='padding:5px;'>
 <? 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('content_c', 10);"><img src="<?=$board_skin_path?>/img/up.gif" width="16" height="16"></SPAN>
                <SPAN style="CURSOR: pointer;" onclick="textarea_original('content_c', 10);"><img src="<?=$board_skin_path?>/img/start.gif" width="16" height="16"></SPAN>
                <SPAN style="CURSOR: pointer;" onclick="textarea_increase('content_c', 10);"><img src="<?=$board_skin_path?>/img/down.gif" width="16" height="16"></SPAN></td>
    <td width=50% align=right><? if ($write_min || $write_max) { ?><span id=char_count></span>글자<?}?></td>
            <td width=50% align=right></td>
        </tr>
        </table>
        <TEXTAREA id=content_c name=content_c class=tx style='width:100%; word-break:break-all;' rows=10 itemname="내용" required
        <? if ($write_min || $write_max) { ?>onKEYUP="check_byte('content_a', 'char_count');"<?}?>><?=$content_c?>
        </TEXTAREA>
        <? if ($write_min || $write_max) { ?><script language="JavaScript"> check_byte('content_a', 'char_count'); </script><?}?></td>
   <? } ?>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>
<? if ($is_link) { ?>
<tr height="30">
    <td></td>
    <td align="center">관련사이트</td>
    <td colspan=2></td>
    <td style='padding-left:5px;'><INPUT type='text' class=ed size=50 name='wr_link1' itemname='관련사이트' value='<?=$write["wr_link1"]?>'></td>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>
<? } ?>
<? if ($is_file) { ?>
<tr height="30">
    <td></td>
    <td align="center" valign="top"><table cellpadding=0 cellspacing=0><tr><td style=" PADDING-TOP: 10px;">포스터 <span onclick="add_file();" style='cursor:pointer;'>+</span> <span onclick="del_file();" style='cursor:pointer;'>-</span></td></tr></table></td>
    <td colspan=2></td>
    <td style='padding-left:5px;'><table id="variableFiles" cellpadding=0 cellspacing=0></table><?// print_r2($file); ?>
        <script language="JavaScript">
        function add_file(delete_code)
        {
            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 size=32 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='업로드 이미지 파일에 해당 되는 내용을 입력하세요.'>";
                <? } ?>
                ;
            }
        }
        <?=$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);
        }
        </script></td>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>
<? } ?>

<? if ($is_trackback) { ?>
<tr height="30">
    <td></td>
    <td align="center">트랙백주소</td>
    <td colspan=2></td>
    <td style='padding-left:5px;'><INPUT class=ed size=50 name=wr_trackback itemname="트랙백" value="<?=$trackback?>">
        <? if ($w=="u") { ?><input type=checkbox name="re_trackback" value="1">핑 보냄<? } ?></td>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>
<? } ?>

<? if ($is_norobot) { ?>
<tr height="30">
    <td></td>
    <td align="center"><?=$norobot_str?></td>
    <td colspan=2></td>
    <td style='padding-left:5px;'><INPUT class=ed type=input size=10 name=wr_key itemname="자동등록방지" required>  * 왼쪽의 글자중 <FONT COLOR="red">빨간글자만</FONT> 순서대로 입력하세요.</TD>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>
<? } ?>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
    <td width="100%" height="30" background="<?=$board_skin_path?>/img/write_down_bg.gif"></td>
</tr>
<tr>
    <td width="100%" align="center" valign="top">
        <INPUT type=image id="btn_submit" src="<?=$board_skin_path?>/img/ok_btn.gif" border=0 accesskey='s'>    
        <a href="./board.php?bo_table=<?=$bo_table?>"><img id="btn_list" src="<?=$board_skin_path?>/img/list_btn.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;
        }
    }
    <?
    if ($is_dhtml_editor) echo cheditor3('wr_content');
    ?>
    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 (!check_kcaptcha(f.wr_key)) {
        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>
주소복사
채택됨
답변의 댓글

히어1님의 답변

content_a, content_b, content_c 3개 테이블을 새로 만드신건가요?
아님 wr_content 에서 나누신건가요?
주소복사
답변의 댓글

슈와이님의 답변

} 가 빠진거 같네요
주소복사
답변의 댓글

1NEO님의 답변

content_a, content_b, content_c 3개 테이블을 새로 만들었어요
주소복사
답변의 댓글

1NEO님의 답변

<?
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');
}

include_once "$board_skin_path/skin.lib.php";

if ($is_category) {
    $nc_category_location  = "./board.php?bo_table=$bo_table&sca=$sca&sfl=wr_10&stx=";
    $nc_category_option    = get_nc_category_option($bo_table, $sca);
}

$wr_7 = $write[wr_7];
$wr_10 = $write[wr_10];
?>
<script id="dynamic"></script>

<script language="javascript">
// 글자수 제한
var char_min = parseInt(<?=$write_min?>); // 최소
var char_max = parseInt(<?=$write_max?>); // 최대

function category_data(sel,target) {
var sca    = sel.options[sel.selectedIndex].value; // 첫번째 selectbox의 선택된 텍스트
var form    = sel.form.name;
dynamic.src = "<?=$board_skin_path?>/category.data.php?bo_table=<?=$bo_table?>&form=" + form + "&sca=" + sca + "&target=" + target;
}
</script>

<!-- 김선용 2005.4 - ff(불여우) 에서는 innerhtml 사용시 폼이 <table> 아래에 있으면 인식하지 못합니다. -->
<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 align=center>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr height="33">
    <td width="4" bgcolor="#7BB2D6"><img src="<?=$board_skin_path?>/img/top_01.gif" width="4" height="33"></td>
    <td width="110" align="center" bgcolor="#7BB2D6"> </td>
    <td width="5" align="center" bgcolor="#7BB2D6"><img src="<?=$board_skin_path?>/img/top_02.gif" width="5" height="33"></td>
    <td width="5" align="center" bgcolor="#EEEEEE"><img src="<?=$board_skin_path?>/img/top_03.gif" width="5" height="33"></td>
    <td width="" align="left" bgcolor="#EEEEEE"><font style="font-family:돋움; font-size:9pt; color:#7D7D7D"><strong>[ <?=$title_msg?> ]</strong></span></td>
    <td width="4" bgcolor="#EEEEEE"><img src="<?=$board_skin_path?>/img/top_04.gif" width="4" height="33"></td>
</tr>


<? if ($is_name) { ?>
<tr height="30">
    <td></td>
    <td align="center">이름</td>
    <td colspan=2></td>
    <td style='padding-left:5px;'><INPUT class=ed maxLength=20 size=15 name=wr_name itemname="이름" required value="<?=$name?>"></TD>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>
<? } ?>


<? if ($is_password) { ?>
<tr height="30">
    <td></td>
    <td align="center">패스워드</td>
    <td colspan=2></td>
    <td style='padding-left:5px;'><INPUT class=ed type=password maxLength=20 size=15 name=wr_password itemname="패스워드" <?=$password_required?>></TD>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>
<? } ?>


<? if ($is_email) { ?>
<tr height="30">
    <td></td>
    <td align="center">이메일</td>
    <td colspan=2></td>
    <td style='padding-left:5px;'><INPUT class=ed maxLength=100 size=50 name=wr_email email itemname="이메일" value="<?=$email?>"></TD>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>
<? } ?>


<? if ($is_homepage) { ?>
<tr height="30">
    <td></td>
    <td align="center">홈페이지</td>
    <td colspan=2></td>
    <td style='padding-left:5px;'><INPUT class=ed size=50 name=wr_homepage itemname="홈페이지" value="<?=$homepage?>"></TD>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>
<? } ?>


<tr height="30">
    <td></td>
    <td align="center">옵션</td>
    <td colspan=2></td>
    <td style='padding-left:5px;'>
        <? if ($is_notice) { ?><input type=checkbox name=notice value="1" <?=$notice_checked?>>공지 <? } ?>
        <? if ($is_html) { ?><INPUT onclick="html_auto_br(this);" type=checkbox value="<?=$html_value?>" name="html" <?=$html_checked?>><span class=w_title>HTML</span> <? } ?>
        <? if ($is_secret) { ?><INPUT type=checkbox value="secret" name="secret" <?=$secret_checked?>><span class=w_title>비밀글</span> <? } ?>
        </td>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>


<? if ($is_category) { ?>
<tr height="30">
    <td></td>
    <td align="center">분류</td>
    <td colspan=2></td>
    <td style='padding-left:5px;'><select name=ca_name required itemname="분류">
            <option value="">선택하세요<?=$category_option?></option>
        </select>
         </TD>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>
<? } ?>


<tr height="30">
    <td></td>
    <td align="center">도서명</td>
    <td colspan=2></td>
    <td style='padding-left:5px; padding-right:5px;'><INPUT class=ed style="width:100%;" name=wr_subject itemname="제목" required value="<?=$subject?>"></td>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>
<tr>
<td></td>
<td align=center>상세정보</td>
<td colspan=2></td>
<td>
<table width=100%>
<tr>
    <td align="right" width=20%>출판사</td>
    <td  width=30% ><INPUT class=ed style="width:100%;" name=wr_1 itemname="출판사" required value="<?=$write[wr_1]?>"></td>
    <td  width=20% align="right">지은이</td>
    <td width=30%><INPUT class=ed style="width:100%;" name=wr_2 itemname="지은이" required value="<?=$write[wr_2]?>"></td>
</tr>
<tr>
    <td align="right" width=20%>페이지</td>
    <td  width=30% ><INPUT class=ed style="width:100%;" name=wr_3 itemname="페이지" value="<?=$write[wr_3]?>"></td>
    <td  width=20% align="right">크기</td>
    <td width=30%><INPUT class=ed style="width:100%;" name=wr_4 itemname="크기" value="<?=$write[wr_4]?>"></td>
</tr>
<tr>
  <td align="right">발행일</td>
  <td ><input class=ed style="width:100%;" name=wr_5 itemname="발행일" value="<?=$write[wr_5]?>" /></td>
  <td align="right">ISBN</td>
  <td><input class=ed style="width:100%;" name=wr_6 itemname="ISBN" value="<?=$write[wr_6]?>" /></td>
</tr>
<tr>
    <td align="right" width=20%>연구소보유여부</td>
    <td  width=30% ><select class="ed" name="wr_7" itemname='연구소보유여부' value="<?=$write[wr_7]?>">
      <?
if ($wr_7){
echo "<option selected value='$wr_7'>$wr_7</option>";
} else {
echo "<option selected value=''>선택하세요</option>";
}
?>
      <option value='연구소 비치'>보유</option>
      <option value='구입예정'>구입예정</option>
      <option value='분실'>분실</option>
      <option value='품절'>품절</option>
      <option value='구입예정 없음'>구입예정 없음</option>
      <option value='기타'>기타 </option>
    </select></td>
    <td  width=20% align="right"> </td>
    <td width=30%> </td>
</tr>
</table>
</td></tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>

<tr>
    <td></td>
    <td align="center">내용</td>
    <td colspan=2></td>
    <td style='padding:5px;'>
 <? 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('content_a', 10);"><img src="<?=$board_skin_path?>/img/up.gif" width="16" height="16"></SPAN>
                <SPAN style="CURSOR: pointer;" onclick="textarea_original('content_a', 10);"><img src="<?=$board_skin_path?>/img/start.gif" width="16" height="16"></SPAN>
                <SPAN style="CURSOR: pointer;" onclick="textarea_increase('content_a', 10);"><img src="<?=$board_skin_path?>/img/down.gif" width="16" height="16"></SPAN></td>
    <td width=50% align=right><? if ($write_min || $write_max) { ?><span id=char_count></span>글자<?}?></td>
            <td width=50% align=right></td>
        </tr>
        </table>
        <TEXTAREA id=content_a name=content_a class=tx style='width:100%; word-break:break-all;' rows=10 itemname="내용" required
        <? if ($write_min || $write_max) { ?>ONKEYUP="check_byte('content_a', 'char_count');"<?}?>><?=$content_a?>
        </TEXTAREA>
        <? if ($write_min || $write_max) { ?><script language="JavaScript"> check_byte('content_a', 'char_count'); </script><?}?></td>
   <? } ?>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>

<? if ($is_link) { ?>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>

<tr>
    <td></td>
    <td align="center">내용</td>
    <td colspan=2></td>
    <td style='padding:5px;'>
 <? 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('content_b', 10);"><img src="<?=$board_skin_path?>/img/up.gif" width="16" height="16"></SPAN>
                <SPAN style="CURSOR: pointer;" onclick="textarea_original('content_b', 10);"><img src="<?=$board_skin_path?>/img/start.gif" width="16" height="16"></SPAN>
                <SPAN style="CURSOR: pointer;" onclick="textarea_increase('content_b', 10);"><img src="<?=$board_skin_path?>/img/down.gif" width="16" height="16"></SPAN></td>
    <td width=50% align=right><? if ($write_min || $write_max) { ?><span id=char_count></span>글자<?}?></td>
            <td width=50% align=right></td>
        </tr>
        </table>
        <TEXTAREA id=content_b name=content_b class=tx style='width:100%; word-break:break-all;' rows=10 itemname="내용" required
        <? if ($write_min || $write_max) { ?>ONKEYUP="check_byte('content_a', 'char_count');"<?}?>><?=$content_b?>
        </TEXTAREA>
        <? if ($write_min || $write_max) { ?><script language="JavaScript"> check_byte('content_a', 'char_count'); </script><?}?></td>
   <? } ?>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>

<? if ($is_link) { ?>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>

<tr>
    <td></td>
    <td align="center">내용</td>
    <td colspan=2></td>
    <td style='padding:5px;'>
 <? 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('content_c', 10);"><img src="<?=$board_skin_path?>/img/up.gif" width="16" height="16"></SPAN>
                <SPAN style="CURSOR: pointer;" onclick="textarea_original('content_c', 10);"><img src="<?=$board_skin_path?>/img/start.gif" width="16" height="16"></SPAN>
                <SPAN style="CURSOR: pointer;" onclick="textarea_increase('content_c', 10);"><img src="<?=$board_skin_path?>/img/down.gif" width="16" height="16"></SPAN></td>
    <td width=50% align=right><? if ($write_min || $write_max) { ?><span id=char_count></span>글자<?}?></td>
            <td width=50% align=right></td>
        </tr>
        </table>
        <TEXTAREA id=content_c name=content_c class=tx style='width:100%; word-break:break-all;' rows=10 itemname="내용" required
        <? if ($write_min || $write_max) { ?>ONKEYUP="check_byte('content_a', 'char_count');"<?}?>><?=$content_c?>
        </TEXTAREA>
        <? if ($write_min || $write_max) { ?><script language="JavaScript"> check_byte('content_a', 'char_count'); </script><?}?></td>
   <? } ?>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>

<? if ($is_link) { ?>
<tr height="30">
    <td></td>
    <td align="center">관련사이트</td>
    <td colspan=2></td>
    <td style='padding-left:5px;'><INPUT type='text' class=ed size=50 name='wr_link1' itemname='관련사이트' value='<?=$write["wr_link1"]?>'></td>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>
<? } ?>

<? if ($is_file) { ?>
<tr height="30">
    <td></td>
    <td align="center" valign="top"><table cellpadding=0 cellspacing=0><tr><td style=" PADDING-TOP: 10px;">포스터 <span onclick="add_file();" style='cursor:pointer;'>+</span> <span onclick="del_file();" style='cursor:pointer;'>-</span></td></tr></table></td>
    <td colspan=2></td>
    <td style='padding-left:5px;'><table id="variableFiles" cellpadding=0 cellspacing=0></table><?// print_r2($file); ?>
        <script language="JavaScript">
        function add_file(delete_code)
        {
            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 size=32 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='업로드 이미지 파일에 해당 되는 내용을 입력하세요.'>";
                <? } ?>
                ;
            }
        }

        <?=$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);
        }
        </script></td>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>
<? } ?>


<? if ($is_trackback) { ?>
<tr height="30">
    <td></td>
    <td align="center">트랙백주소</td>
    <td colspan=2></td>
    <td style='padding-left:5px;'><INPUT class=ed size=50 name=wr_trackback itemname="트랙백" value="<?=$trackback?>">
        <? if ($w=="u") { ?><input type=checkbox name="re_trackback" value="1">핑 보냄<? } ?></td>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>
<? } ?>


<? if ($is_norobot) { ?>
<tr height="30">
    <td></td>
    <td align="center"><?=$norobot_str?></td>
    <td colspan=2></td>
    <td style='padding-left:5px;'><INPUT class=ed type=input size=10 name=wr_key itemname="자동등록방지" required>  * 왼쪽의 글자중 <FONT COLOR="red">빨간글자만</FONT> 순서대로 입력하세요.</TD>
    <td></td>
</tr>
<tr><td height="1" background="<?=$board_skin_path?>/img/dot_bg.gif" colSpan=6></td></tr>
<? } ?>

</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
    <td width="100%" height="30" background="<?=$board_skin_path?>/img/write_down_bg.gif"></td>
</tr>
<tr>
    <td width="100%" align="center" valign="top">
        <INPUT type=image id="btn_submit" src="<?=$board_skin_path?>/img/ok_btn.gif" border=0 accesskey='s'>    
        <a href="./board.php?bo_table=<?=$bo_table?>"><img id="btn_list" src="<?=$board_skin_path?>/img/list_btn.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;
        }
    }

    <?
    if ($is_dhtml_editor) echo cheditor3('wr_content');
    ?>

    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 (!check_kcaptcha(f.wr_key)) {
        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>

주소복사
답변의 댓글
답변을 작성하시기 전에 로그인 해주세요.
전체 92,433 | RSS
고마운 분의 도움으로 질문을 해결하셨다면, 채택을 눌러서 감사의 마음을 전하세요.
어떻게 질문해야 할지 모른다면 질문하는 방법을 읽어 보신후 질문해 보세요.
QA 내용 검색

회원로그인

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

© SIRSOFT