문의드립니다.
본문
아래 사진과같이 글쓰기에서 단어가 겹치면 박스처리해서 텍스트를 입력할수있게 만들었습니다.
그런데 type란 단어만 들어가면 다른박스까지 속성이 다보이네요
뿌려질때 input type 이 type이란 정답하고 겹쳐서 그런것같은데 방법이 없을까요
아래는 소스 입니다.
view.skin.php
에
<div class="lab-tab-content">
<div class="dictation">
<? $question = $view[wr_8]; if($view[wr_9]) { $len = strlen($view[wr_9]); ?>
<? $question = str_replace(trim($view[wr_9]), "<input type=text name=anwser1 id=anwser1 size=$len>", $question)?>
<?}?>
<? if($view[wr_10]) { $len = strlen($view[wr_10]); ?>
<? $question = str_replace(trim($view[wr_10]), "<input type=text name=anwser2 id=anwser2 size=$len>", $question)?>
<?}?>
<? if($view[wr_11]) { $len = strlen($view[wr_11]); ?>
<? $question = str_replace(trim($view[wr_11]), "<input type=text name=anwser3 id=anwser3 size=$len>", $question)?>
<?}?>
<? if($view[wr_12]) { $len = strlen($view[wr_12]); ?>
<? $question = str_replace(trim($view[wr_12]), "<input type=text name=anwser4 id=anwser4 size=$len>", $question)?>
<?}?>
<? if($view[wr_13]) { $len = strlen($view[wr_13]); ?>
<? $question = str_replace(trim($view[wr_13]), "<input type=text name=anwser5 id=anwser5 size=$len>", $question)?>
<?}
echo $question;
?>
<input type="button" id="show_anwser" name="show_anwser" value="정답" style="background:#3197C7;color:#ffffff;"><input type="button" id="reset_test" name="reset_test" value="다시시작" style="background:#d6d6d6;color:#222222;">
</div>
------------write.skin.php에----------------
<tr>
<td class=write_head>받아쓰기지문</td>
<td><textarea type='text' class='ed' name='wr_8' itemname='받아쓰기지문' class=tx style='width:99%; word-break:break-all;' rows=10 required><?=$write["wr_8"]?></textarea></td></tr>
<tr><td colspan=2 height=1 bgcolor=#dddddd></td></tr>
<tr>
<td class=write_head>정답1</td>
<td><input type='text' class='ed' name='wr_9' itemname='정답1' class=ed style='width:20%;' value='<?=$write["wr_9"]?>' required></td></tr>
<tr><td colspan=2 height=1 bgcolor=#dddddd></td></tr>
<tr>
<td class=write_head>정답2</td>
<td><input type='text' class='ed' name='wr_10' itemname='정답2' class=ed style='width:20%;' value='<?=$write["wr_10"]?>'></td></tr>
<tr><td colspan=2 height=1 bgcolor=#dddddd></td></tr>
<tr>
<td class=write_head>정답3</td>
<td><input type='text' class='ed' name='wr_11' itemname='정답3' class=ed style='width:20%;' value='<?=$write["wr_11"]?>'></td></tr>
<tr><td colspan=2 height=1 bgcolor=#dddddd></td></tr>
<tr>
<td class=write_head>정답4</td>
<td><input type='text' class='ed' name='wr_12' itemname='정답4' class=ed style='width:20%;' value='<?=$write["wr_12"]?>'></td></tr>
<tr><td colspan=2 height=1 bgcolor=#dddddd></td></tr>
<tr>
<td class=write_head>정답5</td>
<td><input type='text' class='ed' name='wr_13' itemname='정답5' class=ed style='width:20%;' value='<?=$write["wr_13"]?>'></td></tr>
<tr><td colspan=2 height=1 bgcolor=#dddddd></td></tr>
답변 3
따옴표가 제대로 닫히지 않았거나 하는 코딩오류가 있었을것 같네요.
한번 꺽쇠가 제대로 닫혔는지, 따옴표가 제대로 닫혔는지등을 보시면 해결이 될 것 같네요.
해당 코드를 올려주시면 봐드리겠습니다.
view.skin.php
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$level = Array();
$level[1]['level'] = "초급";
$level[2]['level'] = "초중급";
$level[3]['level'] = "중급";
$level[4]['level'] = "중고급";
$level[5]['level'] = "고급";
$level[1]['link'] = $g4[path]."/images/1btn9.gif";
$level[2]['link'] = $g4[path]."/images/1btn10.gif";
$level[3]['link'] = $g4[path]."/images/1btn11.gif";
$level[4]['link'] = $g4[path]."/images/1btn12.gif";
$level[5]['link'] = $g4[path]."/images/1btn13.gif";
$category = Array();
$category['n'] = "News";
$category['be'] = "Business&Economy";
$category['et'] = "Entertainment";
$category['it'] = "IT&New Technology";
$category['cl'] = "Culture&Life";
$category['se'] = "Science&Ecology";
$category['t'] = "Travel";
$category['is'] = "Interview&Speech";
?>
<style type="text/css">
.view { width:<?=$width?>px; }
.view td.movie-holder { width:<?=$width?>px; }
.movie-holder .movie { width:395px; height:339px; float:left; }
.movie-holder .movie-desc { width:418px; height:339px; margin-left:14px; float:left; }
.movie-holder .movie-desc .caption-tab-holder { width:418px; height:35px; }
.caption-tab { width:96px; height:35px; float:left; }
.movie-holder .movie-desc .caption-tab-content-holder { width:418px; height:300px; overflow:hidden; border-top:2px solid #838383; border-bottom:2px solid #838383; }
.caption-tab-content-holder .caption-tab-content { width:418px; height:300px; display:none; }
.caption-tab-content-holder .caption-tab-content .cation { width:378px; height:270px; background:red; line-height:20px; position:relative; margin-left:20px; }
.view td.lab-holder { width:<?=$width?>px; }
.view td.lab-holder .lab-tab-holder { width:<?=$width?>px; height:35px; font-size:0; position:relative; top:1px; }
.lab-tab-holder .lab-tab { width:129px; height:35px; float:left; }
.view td.lab-holder .lab-tab-content-holder { width:<?=$width?>px; height:324px; border:1px solid #c0c0c0; }
.view td.lab-holder .lab-tab-content-holder .lab-tab-content { width:<?=$width?>px; height:324px; display:none; }
.view td.lab-holder .lab-tab-content-holder .lab-tab-content .lab-keypoint { width:787px; height:314px; margin-top:10px; margin-left:20px; }
.view td.lab-holder .lab-tab-content-holder .lab-tab-content .dictation { width:787px; height:116px; border-bottom:1px dotted #878787; margin-top:10px; margin-left:20px; }
.view td.lab-holder .lab-tab-content-holder .lab-tab-content .anwser-holder { width:787px; height:177px; font-size:12px; margin-top:10px; margin-left:20px; }
.view td.lab-holder .lab-tab-content-holder .lab-tab-content .anwser-holder #answer { width:787px; height:177px; line-height:30px; font-size:12px; font-weight:700; display:none; }
</style>
<div style="height:12px; line-height:1px; font-size:1px;"> </div>
<!-- 게시글 보기 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td>
<?if($is_admin) {?>
<div style="clear:both;height:30px;">
<div style="float:left; margin-top:6px;"> </div>
<!-- 링크 버튼 -->
<div style="float:right;">
<?
ob_start();
?>
<? if ($search_href) { echo "<a href=\"$search_href\"><img src='$board_skin_path/img/btn_list_search.gif' border='0' align='absmiddle'></a> "; } ?>
<? echo "<a href=\"$list_href\"><img src='$board_skin_path/img/btn_list.gif' border='0' align='absmiddle'></a> "; ?>
<? if ($update_href) { echo "<a href=\"$update_href\"><img src='$board_skin_path/img/btn_modify.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($delete_href) { echo "<a href=\"$delete_href\"><img src='$board_skin_path/img/btn_delete.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($write_href) { echo "<a href=\"$write_href\"><img src='$board_skin_path/img/btn_write.gif' border='0' align='absmiddle'></a> "; } ?>
<?
$link_buttons = ob_get_contents();
ob_end_flush();
?>
</div>
</div>
<?}?>
<table border=0 cellpadding=0 cellspacing=0 width=<?=$width?> class="view">
<tr>
<td class="movie-holder">
<div class="movie"><iframe height="339" src="<?=$view[wr_link1]?>" frameBorder="0" width="395" allowfullscreen=""></iframe></div>
<div class="movie-desc">
<div class="caption-tab-holder">
<div class="caption-tab" style="background:url(<?=$board_skin_path?>/img/2btn1_on.gif) no-repeat;"><img src="<?=$board_skin_path?>/img/2btn1_off.gif" width="96" height="35" border="0" alt=""></div>
<div class="caption-tab" style="background:url(<?=$board_skin_path?>/img/2btn2_on.gif) no-repeat;"><img src="<?=$board_skin_path?>/img/2btn2_off.gif" width="103" height="35" border="0" alt=""></div>
<div class="caption-tab" style="background:url(<?=$board_skin_path?>/img/2btn3_on.gif) no-repeat;"><img src="<?=$board_skin_path?>/img/2btn3_off.gif" width="103" height="35" border="0" alt=""></div>
<div class="caption-tab" style="background:url(<?=$board_skin_path?>/img/2btn4_on.gif) no-repeat;"><img src="<?=$board_skin_path?>/img/2btn4_off.gif" width="95" height="35" border="0" alt=""></div>
</div>
<div class="caption-tab-content-holder">
<div class="caption-tab-content">
<table border=0 cellpadding=0 cellspacing=0 width=418>
<col width="75" />
<col width="10" />
<col width="334" />
<tr>
<td height="30"><img src="<?=$board_skin_path?>/img/ca1.gif" width="75" height="30" border="0" alt=""></td>
<td height="30"></td>
<td height="30"><?=$category[$view['ca_name']]?></td>
</tr>
<tr>
<td height="30"><img src="<?=$board_skin_path?>/img/ca2.gif" width="75" height="30" border="0" alt=""></td>
<td height="30"></td>
<td height="30"><?=$level[$view[wr_1]]['level']?></td>
</tr>
<tr>
<td height="30" style="background:#f9f9f9;"><img src="<?=$board_skin_path?>/img/ca3.gif" width="75" height="30" border="0" alt=""></td>
<td height="30"></td>
<td height="30"><?=$view['wr_2']?></td>
</tr>
<tr>
<td height="210" valign="top" style="background:#f9f9f9;"><img src="<?=$board_skin_path?>/img/ca4.gif" width="75" height="30" border="0" alt=""></td>
<td height="210"></td>
<td height="210" valign="top" style="line-height:20px;overflow:hidden;">
<strong><?=$view['wr_subject']?></strong><br>
<?=$view['wr_content']?></td>
</tr>
</table>
</div>
<div align="center" class="caption-tab-content">
<div style="width:100%;height:20px;line-height:20px;font-size:1px;"> </div>
<div align="left" class="caption">
<?=nl2br(stripslashes($view[wr_3]))?>
</div>
</div>
<div align="center" class="caption-tab-content">
<div style="width:100%;height:20px;line-height:20px;font-size:1px;"> </div>
<div align="left" class="caption">
<?=nl2br(stripslashes($view[wr_4]))?>
</div>
</div>
<div align="center" class="caption-tab-content">
<div style="width:100%;height:20px;line-height:20px;font-size:1px;"> </div>
<div align="left" class="caption">
<?=nl2br(stripslashes($view[wr_5]))?>
</div>
</div>
</div>
</div>
</td>
</tr>
<tr>
<td height="49"> </td>
</tr>
<tr>
<td class="lab-holder">
<div class="lab-tab-holder">
<div class="lab-tab" style="background:url(<?=$board_skin_path?>/img/3btn1_on.gif) no-repeat;">
<img src="<?=$board_skin_path?>/img/3btn1_off.gif" width="129" height="35" border="0" alt="">
</div>
<div class="lab-tab" style="background:url(<?=$board_skin_path?>/img/3btn2_on.gif) no-repeat;">
<img src="<?=$board_skin_path?>/img/3btn2_off.gif" width="129" height="35" border="0" alt="">
</div>
<div class="lab-tab" style="background:url(<?=$board_skin_path?>/img/3btn3_on.gif) no-repeat;">
<img src="<?=$board_skin_path?>/img/3btn3_off.gif" width="129" height="35" border="0" alt="">
</div>
</div>
<div class="lab-tab-content-holder">
<div class="lab-tab-content">
<div class="lab-keypoint">
<?=nl2br(stripslashes($view[wr_6]))?>
</div>
</div>
<div class="lab-tab-content">
<div class="lab-keypoint">
<?=nl2br(stripslashes($view[wr_7]))?>
</div>
</div>
<div class="lab-tab-content">
<div class="dictation">
<? $question = $view[wr_8]; if($view[wr_9]) { $len = strlen($view[wr_9]); ?>
<? $question = str_replace(trim($view[wr_9]), "<input type=text name=anwser1 id=anwser1 size=$len>", $question)?>
<?}?>
<? if($view[wr_10]) { $len = strlen($view[wr_10]); ?>
<? $question = str_replace(trim($view[wr_10]), "<input type=text name=anwser2 id=anwser2 size=$len>", $question)?>
<?}?>
<? if($view[wr_11]) { $len = strlen($view[wr_11]); ?>
<? $question = str_replace(trim($view[wr_11]), "<input type=text name=anwser3 id=anwser3 size=$len>", $question)?>
<?}?>
<? if($view[wr_12]) { $len = strlen($view[wr_12]); ?>
<? $question = str_replace(trim($view[wr_12]), "<input type=text name=anwser4 id=anwser4 size=$len>", $question)?>
<?}?>
<? if($view[wr_13]) { $len = strlen($view[wr_13]); ?>
<? $question = str_replace(trim($view[wr_13]), "<input type=text name=anwser5 id=anwser5 size=$len>", $question)?>
<?}
echo $question;
?>
<input type="button" id="show_anwser" name="show_anwser" value="정답" style="background:#3197C7;color:#ffffff;"><input type="button" id="reset_test" name="reset_test" value="다시시작" style="background:#d6d6d6;color:#222222;">
</div>
<div class="anwser-holder">
<div id="answer">
<? if($view[wr_9]) { $str = trim($view[wr_9]);?>
<? $view[wr_8] = str_replace($str, "<span style='color:red;'>$str</span>", $view[wr_8])?>
<?}?>
<? if($view[wr_10]) { $str = trim($view[wr_10]);?>
<? $view[wr_8] = str_replace($str, "<span style='color:red;'>$str</span>", $view[wr_8])?>
<?}?>
<? if($view[wr_11]) { $str = trim($view[wr_11]);?>
<? $view[wr_8] = str_replace($str, "<span style='color:red;'>$str</span>", $view[wr_8])?>
<?}?>
<? if($view[wr_12]) { $str = trim($view[wr_12]);?>
<? $view[wr_8] = str_replace($str, "<span style='color:red;'>$str</span>", $view[wr_8])?>
<?}?>
<? if($view[wr_13]) { $str = trim($view[wr_13]);?>
<? $view[wr_8] = str_replace($str, "<span style='color:red;'>$str</span>", $view[wr_8])?>
<?}
echo $view[wr_8];
?>
</div>
</div>
</div>
</div>
</td>
</tr>
</table>
<br>
<script language="javascript">
<!--
$("#show_anwser").click(function(e){
e.stopPropagation();
if($(".anwser-holder #answer").css("display")=="none"){ $(this).val("취소");$(".anwser-holder #answer").show(); }
else { $(this).val("정답");$(".anwser-holder #answer").hide(); }
});
$("#reset_test").click(function(e){
e.stopPropagation();
$(".dictation input[type='text']").val('');
});
//
var pi1=0,
tab1= $(".movie-desc>.caption-tab-holder"),
tab1_img = $(".movie-desc>.caption-tab-holder>.caption-tab>img");
tab1_img.click(function(e){
e.stopPropagation();
tab1_img.animate({opacity:1},10);
$(this).animate({opacity:0},100);
var i=($(".movie-desc>.caption-tab-holder>.caption-tab")).index($(this).parent());
$(".movie-desc>.caption-tab-content-holder>.caption-tab-content").filter(":visible").hide();
$(".movie-desc>.caption-tab-content-holder>.caption-tab-content").eq(i).show();
pi1=i;
});
tab1_img.mouseenter(function(e){
e.stopPropagation();
tab1_img.animate({opacity:1},10);
$(this).animate({opacity:0},100);
});
tab1.mouseleave(function(e){
e.stopPropagation();
if($(".movie-desc>.caption-tab-holder>.caption-tab:eq("+pi1+")>img").css("opacity")!=0) $(".movie-desc>.caption-tab-holder>.caption-tab:eq("+pi1+")>img").trigger("click");
});
$(".movie-desc>.caption-tab-holder>.caption-tab:eq(0)>img").trigger("click");
var pi2=0,
tab2= $(".lab-holder>.lab-tab-holder"),
tab2_img = $(".lab-holder>.lab-tab-holder>.lab-tab>img");
tab2_img.click(function(e){
e.stopPropagation();
tab2_img.animate({opacity:1},10);
$(this).animate({opacity:0},100);
var i=($(".lab-holder>.lab-tab-holder>.lab-tab")).index($(this).parent());
$(".lab-holder>.lab-tab-content-holder>.lab-tab-content").filter(":visible").hide();
$(".lab-holder>.lab-tab-content-holder>.lab-tab-content").eq(i).show();
pi2=i;
});
tab2_img.mouseenter(function(e){
e.stopPropagation();
tab2_img.animate({opacity:1},10);
$(this).animate({opacity:0},100);
});
tab2.mouseleave(function(e){
e.stopPropagation();
if($(".lab-holder>.lab-tab-holder>.lab-tab:eq("+pi2+")>img").css("opacity")!=0) $(".lab-holder>.lab-tab-holder>.lab-tab:eq("+pi2+")>img").trigger("click");
});
$(".lab-holder>.lab-tab-holder>.lab-tab:eq(0)>img").trigger("click");
//-->
</script>
<?
// 코멘트 입출력
//include_once("./view_comment.php");
?>
<div style="height:1px; line-height:1px; font-size:1px; background-color:#ddd; clear:both;"> </div>
<?if($is_admin) {?>
<div style="clear:both; height:43px;">
<div style="float:left; margin-top:10px;"> </div>
<!-- 링크 버튼 -->
<div style="float:right; margin-top:10px;">
<?=$link_buttons?>
</div>
</div>
<div style="height:2px; line-height:1px; font-size:1px; background-color:#dedede; clear:both;"> </div>
<?}?>
<p> </p>
<p> </p>
</td></tr></table><br>
<script type="text/javascript">
function file_download(link, file) {
<? if ($board[bo_download_point] < 0) { ?>if (confirm("'"+decodeURIComponent(file)+"' 파일을 다운로드 하시면 포인트가 차감(<?=number_format($board[bo_download_point])?>점)됩니다.\n\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\n\n그래도 다운로드 하시겠습니까?"))<?}?>
document.location.href=link;
}
</script>
<script type="text/javascript" src="<?="$g4[path]/js/board.js"?>"></script>
<script type="text/javascript">
window.onload=function() {
resizeBoardImage(<?=(int)$board[bo_image_width]?>);
drawFont();
var oBody = document.body;
var minHeight = 915; //document의 최소높이
var tmpHeight = oBody.scrollHeight; // + (oBody.offsetHeight-oBody.clientHeight);
if(tmpHeight < minHeight) tmpHeight = window.innerHeight;
if(tmpHeight < minHeight) tmpHeight = minHeight;
$("#page").css("height",tmpHeight+"px");
$("#left").css("height",tmpHeight+"px");
$("#wrap3").css("height",tmpHeight+"px");
}
</script>
<!-- 게시글 보기 끝 -->
-----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');
echo cheditor1('wr_3', '100%', '100');
}
$title_msg = "동영상올리기";
?>
<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 type="text/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?>">
<input type=hidden value='html1' name='html'>
<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>
<? if ($is_name) { ?>
<tr>
<td class=write_head>이 름</td>
<td><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 class=write_head>패스워드</td>
<td><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_category) {
$category_option = str_replace(">n</option>",">News</option>", $category_option);
$category_option = str_replace(">be</option>",">Business&Economy</option>", $category_option);
$category_option = str_replace(">et</option>",">Entertainment</option>", $category_option);
$category_option = str_replace(">it</option>",">IT&New Technology</option>", $category_option);
$category_option = str_replace(">cl</option>",">Culture&Life</option>", $category_option);
$category_option = str_replace(">se</option>",">Science&Ecology</option>", $category_option);
$category_option = str_replace(">t</option>",">Travel</option>", $category_option);
$category_option = str_replace(">is</option>",">Interview&Speech</option>", $category_option);
?>
<tr>
<td class=write_head>분 류</td>
<td><select name=ca_name required itemname="분류"><option value="">선택하세요<?=$category_option?></select></td></tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<? } ?>
<tr>
<td class=write_head>제 목</td>
<td><input class='ed' style="width:99%;" name=wr_subject id="wr_subject" itemname="제목" required value="<?=$subject?>"></td></tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<tr>
<td class='write_head' style='padding:5 0 5 10;' colspan='2'>
<? 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 type="text/javascript"> check_byte('wr_content', 'char_count'); </script><?}?>
<? } ?>
</td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#dddddd></td></tr>
<tr>
<td class=write_head>동영상링크</td>
<td><input type='text' class='ed' size=100 name='wr_link1' itemname='링크 #1' value='<?=$write["wr_link{$i}"]?>'></td></tr>
<tr><td colspan=2 height=1 bgcolor=#dddddd></td></tr>
<tr>
<td class=write_head>레벨</td>
<td><input type='text' class='ed' size=5 name='wr_1' itemname='레벨' value='<?=$write["wr_1"]?>'></td></tr>
<tr><td colspan=2 height=1 bgcolor=#dddddd></td></tr>
<tr>
<td class=write_head>재생시간</td>
<td><input type='text' class='ed' size=20 name='wr_2' itemname='재생시간' value='<?=$write["wr_2"]?>'></td></tr>
<tr><td colspan=2 height=1 bgcolor=#dddddd></td></tr>
<tr>
<td class=write_head>한글자막</td>
<td><? if ($is_dhtml_editor) { ?>
<?=cheditor2('wr_content', $content);?>
<?=cheditor2('wr_3', $write[wr_3]);?>
</td></tr>
<tr><td colspan=2 height=1 bgcolor=#dddddd></td></tr>
<tr>
<td class=write_head>영어자막</td>
<td><textarea type='text' class='ed' name='wr_4' itemname='영어자막' class=tx style='width:99%; word-break:break-all;' rows=10 required><?=$write["wr_4"]?></textarea></td></tr>
<tr><td colspan=2 height=1 bgcolor=#dddddd></td></tr>
<tr>
<td class=write_head>한+영자막</td>
<td><textarea type='text' class='ed' name='wr_5' itemname='한영자막' class=tx style='width:99%; word-break:break-all;' rows=10 required><?=$write["wr_5"]?></textarea></td></tr>
<tr><td colspan=2 height=1 bgcolor=#dddddd></td></tr>
<tr>
<td class=write_head>Voca&Idioms</td>
<td><textarea type='text' class='ed' name='wr_6' itemname='Voca Idioms' class=tx style='width:99%; word-break:break-all;' rows=10 required><?=$write["wr_6"]?></textarea></td></tr>
<tr><td colspan=2 height=1 bgcolor=#dddddd></td></tr>
<tr>
<td class=write_head>주요표현</td>
<td><textarea type='text' class='ed' name='wr_7' itemname='주요표현' class=tx style='width:99%; word-break:break-all;' rows=10 required><?=$write["wr_7"]?></textarea></td></tr>
<tr><td colspan=2 height=1 bgcolor=#dddddd></td></tr>
<tr>
<td class=write_head>받아쓰기지문</td>
<td><textarea type='text' class='ed' name='wr_8' itemname='받아쓰기지문' class=tx style='width:99%; word-break:break-all;' rows=10 required><?=$write["wr_8"]?></textarea></td></tr>
<tr><td colspan=2 height=1 bgcolor=#dddddd></td></tr>
<tr>
<td class=write_head>정답1</td>
<td><input type='text' class='ed' name='wr_9' itemname='정답1' class=ed style='width:20%;' value='<?=$write["wr_9"]?>' required></td></tr>
<tr><td colspan=2 height=1 bgcolor=#dddddd></td></tr>
<tr>
<td class=write_head>정답2</td>
<td><input type='text' class='ed' name='wr_10' itemname='정답2' class=ed style='width:20%;' value='<?=$write["wr_10"]?>'></td></tr>
<tr><td colspan=2 height=1 bgcolor=#dddddd></td></tr>
<tr>
<td class=write_head>정답3</td>
<td><input type='text' class='ed' name='wr_11' itemname='정답3' class=ed style='width:20%;' value='<?=$write["wr_11"]?>'></td></tr>
<tr><td colspan=2 height=1 bgcolor=#dddddd></td></tr>
<tr>
<td class=write_head>정답4</td>
<td><input type='text' class='ed' name='wr_12' itemname='정답4' class=ed style='width:20%;' value='<?=$write["wr_12"]?>'></td></tr>
<tr><td colspan=2 height=1 bgcolor=#dddddd></td></tr>
<tr>
<td class=write_head>정답5</td>
<td><input type='text' class='ed' name='wr_13' itemname='정답5' class=ed style='width:20%;' value='<?=$write["wr_13"]?>'></td></tr>
<tr><td colspan=2 height=1 bgcolor=#dddddd></td></tr>
<? if ($is_file) { ?>
<tr>
<td class=write_head>
<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 style='padding:5 0 5 0;'><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></td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<? } ?>
<? if ($is_guest) { ?>
<tr>
<td class=write_head><img id='kcaptcha_image' /></td>
<td><input class='ed' type=input size=10 name=wr_key itemname="자동등록방지" required> 왼쪽의 글자를 입력하세요.</td>
</tr>
<tr><td colspan=2 height=1 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="<?=$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>
<p> </p>
<p> </p>
</td></tr></table>
</form>
<script type="text/javascript" src="<?="$g4[path]/js/jquery.kcaptcha.js"?>"></script>
<script type="text/javascript">
with (document.fwrite)
{
if (typeof(wr_name) != "undefined")
wr_name.focus();
else if (typeof(wr_subject) != "undefined")
wr_subject.focus();
else if (typeof(wr_content) != "undefined")
wr_content.focus();
if (typeof(ca_name) != "undefined")
if (w.value == "u")
ca_name.value = "<?=$write[ca_name]?>";
}
function html_auto_br(obj)
{
if (obj.checked) {
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다.");
if (result)
obj.value = "html2";
else
obj.value = "html1";
}
else
obj.value = "";
}
function fwrite_submit(f)
{
/*
var s = "";
if (s = word_filter_check(f.wr_subject.value)) {
alert("제목에 금지단어('"+s+"')가 포함되어있습니다");
return false;
}
if (s = word_filter_check(f.wr_content.value)) {
alert("내용에 금지단어('"+s+"')가 포함되어있습니다");
return false;
}
*/
if (document.getElementById('char_count')) {
if (char_min > 0 || char_max > 0) {
var cnt = parseInt(document.getElementById('char_count').innerHTML);
if (char_min > 0 && char_min > cnt) {
alert("내용은 "+char_min+"글자 이상 쓰셔야 합니다.");
return false;
}
else if (char_max > 0 && char_max < cnt) {
alert("내용은 "+char_max+"글자 이하로 쓰셔야 합니다.");
return false;
}
}
}
if (document.getElementById('tx_wr_content')) {
if (!ed_wr_content.outputBodyText()) {
alert('내용을 입력하십시오.');
ed_wr_content.returnFalse();
return false;
}
}
var subject = "";
var content = "";
$.ajax({
url: "<?=$board_skin_path?>/ajax.filter.php",
type: "POST",
data: {
"subject": f.wr_subject.value,
"content": f.wr_content.value
},
dataType: "json",
async: false,
cache: false,
success: function(data, textStatus) {
subject = data.subject;
content = data.content;
}
});
if (subject) {
alert("제목에 금지단어('"+subject+"')가 포함되어있습니다");
f.wr_subject.focus();
return false;
}
if (content) {
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
if (typeof(ed_wr_content) != "undefined")
ed_wr_content.returnFalse();
else
f.wr_content.focus();
return false;
}
if (!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();
var oBody = document.body;
var minHeight = 915; //document의 최소높이
var tmpHeight = oBody.scrollHeight; // + (oBody.offsetHeight-oBody.clientHeight);
if(tmpHeight < minHeight) tmpHeight = window.innerHeight;
if(tmpHeight < minHeight) tmpHeight = minHeight;
$("#page").css("height",tmpHeight+"px");
$("#left").css("height",tmpHeight+"px");
$("#wrap3").css("height",tmpHeight+"px");
}
<?if($w=='u') {
echo "$(\"select[name=\'ca_name\']\").val('$write[ca_name]');";
}?>
<?
if ($is_dhtml_editor) echo cheditor3('wr_content');
if ($is_dhtml_editor) echo cheditor3('wr_3'); //추가
?>
</script>
$question = str_replace(trim($view[wr_13]), "<input type=text name=anwser5 id=anwser5 size=$len>", $question)
요 구문에 문제가 있는것 같습니다.
str_replace(찾을문자, 변경할문자, 원본 문자)
이런것인데
str_replace('type', '<input type=text ...', $question)
이런형식이 되어버리면 <input type=text 의 type도 모두 치환되어버리기 때문에
<input type=text ...>
<input type=text ...>
이런 문자열들은
<input <input <input type=text ...>>>
이런식으로 되어버립니다.
저 구문을 좀 수정하셔야겠네요.
!-->!-->!-->