뭐가 문제인지 모르겠습니다.
본문
안녕하십니까 고수님들께 조심스럽게 도움을 받아보고자 이렇게 글을 쓰게되었습니다.
텍스트 입력하는 부분에서 00가0000 라고 입력하면 정상적으로 출력되는데.
숫자 1234 혹은 123 을 입력하면 출력화면에서 글자가 엄청 크게 떠서 나머지 테이블이 전체적으로 깨지게 됩니다..
아래는 입력 페이지 하는 소스입니다. ㅠ.ㅠ 뭐가 문제인지 모르겠씁니다.
한글로는 잘 써지는데 왜 숫자로만 쓰면 테이블이 깨지는지 모르겠습니다.
=====================================
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<tr>
<td class=write_head>차량번호 </td>
<td><input class=ed style="width:90px;" name=wr_3 itemname="차량번호" value="<?=$write[wr_3]?>" /><font color="gray"> (00가0000 형태로 입력해주세요)</font></td>
</tr>
=====================================
아래는 전체소스입니다.
=============================================================
<script language="JavaScript">
var page,wid,hit,nam;
function win(page,nam,wid,hit)
{
var windo = eval('window.open("'+page+'","'+nam+'","status=no,toolbar=no,resizable=no,scrollbars=no,menubar=no,width='+wid+',height='+hit+',top=100,left=350")');
}
</script>
</head>
<body>
<body oncontextmenu = "return false"
ondragstart = "return false"
onselectstart = "return false">
</body>
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if ($w == "u") {
$memo_body_1 = explode("|",substr($write[memo_1], 1));
$memo_body_2 = explode("|",substr($write[memo_2], 1));
$memo_body_3 = explode("|",substr($write[memo_3], 1));
}
//카테고리 ca_name
$arr = explode("|", $board[bo_category_list]); // 구분자가 | 로 되어 있음
$str = "";
for ($i=0; $i<count($arr); $i++){
if (trim($arr[$i]))
$categorys .= "<option value='$arr[$i]'>$arr[$i]</option>\n";
}
$arrayf = explode("|",$board[bo_category_list]);
$arrays1 = explode("|",$board[bo_10]);
if($w=="u"){
for($i=0; $i<count($arrayf); $i++){
if($ca_name==$arrayf[$i]){
$tu = $i+1;
}
}
}
function get_bo_n_option($bo_n='')
{
global $g4, $board;
$arr = explode("|", $board[$bo_n]); // 구분자가 | 로 되어 있음
$str = "";
for ($i=0; $i<count($arr); $i++)
if (trim($arr[$i]))
$str .= "<option value='$arr[$i]'>$arr[$i]</option>\n";
return $str;
}
// 2단계 분류 사용
if ($is_category = true) {
$bo_6_option = get_bo_n_option('bo_6'); // SELECT OPTION 태그로 넘겨받음
$bo_7_option = get_bo_n_option('bo_7'); // SELECT OPTION 태그로 넘겨받음
$bo_8_option = get_bo_n_option('bo_8'); // SELECT OPTION 태그로 넘겨받음
$bo_9_option = get_bo_n_option('bo_9'); // SELECT OPTION 태그로 넘겨받음
$bo_10_option = get_bo_n_option('bo_10'); // SELECT OPTION 태그로 넘겨받음
}
if ($is_dhtml_editor) {
include_once("$g4[path]/lib/cheditor.lib.php");
echo "<script src='$g4[editor_path]/cheditor.js'></script>";
echo cheditor1('wr_content', $content);
}
?>
<script>
function addRow() {
var oRow = dyntbl1.insertRow();
oRow.onmouseover=function(){dyntbl1.clickedRowIndex=this.rowIndex};
var oCell1 = oRow.insertCell();
var oCell2 = oRow.insertCell();
oCell1.innerHTML = "<input class=ed style='width:100%;' required name=memo_body_1[] itemname='내용'>";
oCell2.innerHTML = "<input type=button value=\" 삭제 \" onClick=\"delRow()\">";
document.recalc();
}
function delRow() {
dyntbl1.deleteRow(dyntbl1.clickedRowIndex);
}
function delRow_php(r)
{
var i=r.parentNode.parentNode.rowIndex;
document.getElementById('dyntbl2').deleteRow(i);
}
function fixscreen() {
var buffer = document.all.item(0).outerHTML;
document.open("text/html", "replace");
document.write(buffer);
document.close();
}
function addCol() {
var vCell,tmp;
for (var i=0; i<dyntbl1.rows.length; i++) {
tmp=dyntbl1.rows[i].cells[dyntbl1.rows[i].cells.length-1].cloneNode(true);
dyntbl1.rows[i].deleteCell();
vCell=dyntbl1.rows[i].insertCell();
vCell.innerHTML=i==0?"<input type=button value=' X ' onclick='delCol(parentNode.cellIndex)'>":" ";
vCell=dyntbl1.rows[i].insertCell();
vCell.innerHTML=tmp.innerHTML;
}
}
function delCol(idx) {
for (var i=0; i<=dyntbl1.rows.length; i++) {
dyntbl1.rows[i].cells[idx].removeNode();
}
}
</script>
<script language="javascript">
// 글자수 제한
var char_min = parseInt(<?=$write_min?>); // 최소
var char_max = parseInt(<?=$write_max?>); // 최대
</script>
<script language="JavaScript">
// 이메일 자동입력
<!--
function checkemailaddy(){
if (fwrite.email_select.value == '1') {
fwrite.email2.readOnly = false;
fwrite.email2.value = '';
fwrite.email2.focus();
}
else {
fwrite.email2.readOnly = true;
fwrite.email2.value = fwrite.email_select.value;
}
}
//-->
</script>
<script>
//전화번호 자동 하이픈적용
<!--
function OnCheckPhone(oTa) {
var oForm = oTa.form ;
var sMsg = oTa.value ;
var onlynum = "" ;
onlynum = RemoveDash2(sMsg);
if(event.keyCode != 8 ) {
if (GetMsgLen(onlynum) <= 2) oTa.value = onlynum ;
if (GetMsgLen(onlynum) == 3) oTa.value = onlynum + "-";
if (GetMsgLen(onlynum) == 4) oTa.value = onlynum.substring(0,3) + "-" + onlynum.substring(3,4) ;
if (GetMsgLen(onlynum) == 5) oTa.value = onlynum.substring(0,3) + "-" + onlynum.substring(3,5) ;
if (GetMsgLen(onlynum) == 6) oTa.value = onlynum.substring(0,3) + "-" + onlynum.substring(3,6) ;
if (GetMsgLen(onlynum) == 7) oTa.value = onlynum.substring(0,3) + "-" + onlynum.substring(3,7) ;
if (GetMsgLen(onlynum) == 8) oTa.value = onlynum.substring(0,4) + "-" + onlynum.substring(4,8) ;
if (GetMsgLen(onlynum) == 9) oTa.value = onlynum.substring(0,4) + "-" + onlynum.substring(4,9) ;
}
}
function RemoveDash2(sNo) {
var reNo = ""
for(var i=0; i<sNo.length; i++) {
if ( sNo.charAt(i) != "-" ) {
reNo += sNo.charAt(i)
}
}
return reNo
}
function GetMsgLen(sMsg) { // 0-127 1byte, 128~ 2byte
var count = 0
for(var i=0; i<sMsg.length; i++) {
if ( sMsg.charCodeAt(i) > 127 ) {
count += 2
}
else {
count++
}
}
return count
}
//-->
</script>
<style type="text/css">
.form_title{font-family:돋움;font-weight:bold;font-size:12px;color:#0042ff;pading-left:10px;}
.form_help{font-family:돋움;font-size:12px;color:#ff6600;}
.write_head { text-align:right; color:#8492A0; }
.field { border:1px solid #ccc; }
</style>
<link rel='stylesheet' type='text/css' href='<?=$board_skin_path?>/mstyle.css'> <!-- //ssh -->
<form name="fwrite" method="post" action="javascript:fwrite_check(document.fwrite);" enctype="multipart/form-data" style="margin:0px;">
<input type=hidden name=null>
<input type=hidden name=w value="<?=$w?>">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=wr_id value="<?=$wr_id?>">
<input type=hidden name=sca value="<?=$sca?>">
<input type=hidden name=sfl value="<?=$sfl?>">
<input type=hidden name=stx value="<?=$stx?>">
<input type=hidden name=spt value="<?=$spt?>">
<input type=hidden name=sst value="<?=$sst?>">
<input type=hidden name=sod value="<?=$sod?>">
<input type=hidden name=page value="<?=$page?>">
<input type="hidden" name=wr_name value="이름">
<input type=hidden maxlength=100 size=50 name=wr_content itemname="내용" value="<?=$content?>">
<input type=hidden name=set_name id="set_name" itemname="작성자" value="<?=$member[mb_name]?>">
<table width="<?=$width?>" border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="70%" valign="top"><div style="border:1px solid #ddd; background-color:#6289BB; height:34px;">
<div style="font-weight:bold; font-size:14px; margin:7px 0 0 10px;"><font style='font-family:돋움; font-size:11pt; font-weight:bold; color:#ffffff;'><?=$subject?> 방문객 정보
<font size=2 color="red">(*) </font><font size=2>는 필수입력 사항 입니다.</font></font></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" cellpadding="3" cellspacing="0">
<colgroup width=120>
<colgroup width=''>
<tr>
<td class=write_head>공장선택 <font color="red">(*)</font></td>
<td>
<label><input type="radio" name="wr_29" id="wr_29" value="평택" <?php if(htmlspecialchars($write[wr_29],ENT_QUOTES) == "평택" || !$write[wr_29]) echo "checked"; ?>> 평택 </label>
<label><input type="radio" name="wr_29" id="wr_29" value="아산" <?php if(htmlspecialchars($write[wr_29],ENT_QUOTES) == "아산") echo "checked"; ?>> 아산 </label>
</td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<tr>
<td class=write_head>방문장소 <font color="red">(*)</font></td>
<td>
<label><input type="radio" name="wr_30" id="wr_30" value="사무실" <?php if(htmlspecialchars($write[wr_30],ENT_QUOTES) == "사무실" || !$write[wr_30]) echo "checked"; ?>> 사무실 </label>
<label><input type="radio" name="wr_30" id="wr_30" value="현장" <?php if(htmlspecialchars($write[wr_30],ENT_QUOTES) == "현장") echo "checked"; ?>> 현장 </label>
</td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<tr>
<td class=write_head>방문자명 <font color="red">(*)</font></td>
<td>
<input class=ed style="width:200px;" name=wr_subject required itemname="방문자명" value="<?=$subject?>"/><font color="gray"> (000, 000, 000 형태로 입력해주세요)</font></td>
</tr>
<td class=write_head>방문날짜 <font color="red">(*)</font></td>
<td>
<select name=ca_name itemname="분류"><option value="">2016년</select>
<select class="ed" name="wr_7" itemname='<?=$board[bo_7_subj]?>' required value="<?=$write[wr_7]?>">
<?
if ($write[wr_7]){
echo "<option selected value='$write[wr_7]'>$write[wr_7]</option>";
} else {
echo "<option selected value=''>월</option>";
}
echo "$bo_7_option";
?>
</select>
<select class="ed" name="wr_8" itemname='<?=$board[bo_8_subj]?>' required value="<?=$write[wr_8]?>">
<?
if ($write[wr_8]){
echo "<option selected value='$write[wr_8]'>$write[wr_8]</option>";
} else {
echo "<option selected value=''>일</option>";
}
echo "$bo_8_option";
?>
</select>
<select class="ed" name="wr_10" itemname='<?=$board[bo_9_subj]?>' required value="<?=$write[wr_10]?>">
<?
if ($write[wr_10]){
echo "<option selected value='$write[wr_10]'>$write[wr_10]</option>";
} else {
echo "<option selected value=''>시간</option>";
}
echo "$bo_9_option";
?>
</select></td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<tr>
<td class=write_head>핸드폰 <font color="red">(*)</font></td>
<td><select class=box name='wr_11' itemname='휴대전화국번'>
<option value='010' <? if($write[wr_11] == "010") echo "selected"; ?>>010</option>
<option value='011' <? if($write[wr_11] == "011") echo "selected"; ?>>011</option>
<option value='016' <? if($write[wr_11] == "016") echo "selected"; ?>>016</option>
<option value='017' <? if($write[wr_11] == "017") echo "selected"; ?>>017</option>
<option value='018' <? if($write[wr_11] == "018") echo "selected"; ?>>018</option>
<option value='019' <? if($write[wr_11] == "019") echo "selected"; ?>>019</option>
</select>
-
<input name='wr_12' required value='<?=$write[wr_12]?>' type='text' onfocus="OnCheckPhone(this)" onKeyup="OnCheckPhone(this)" size=10 itemname='핸드폰 뒷번호' class=input /></td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<tr>
<td class=write_head>회사전화 </td>
<td><select name='wr_13' itemname='전화번호'>
<option value='033' <? if($write[wr_13] == "033") echo "selected"; ?>>033</option>
<option value='02' <? if($write[wr_13] == "02") echo "selected"; ?>>02</option>
<option value='031' <? if($write[wr_13] == "031") echo "selected"; ?>>031</option>
<option value='032' <? if($write[wr_13] == "032") echo "selected"; ?>>032</option>
<option value='041' <? if($write[wr_13] == "041") echo "selected"; ?>>041</option>
<option value='042' <? if($write[wr_13] == "042") echo "selected"; ?>>042</option>
<option value='043' <? if($write[wr_13] == "043") echo "selected"; ?>>043</option>
<option value='051' <? if($write[wr_13] == "051") echo "selected"; ?>>051</option>
<option value='052' <? if($write[wr_13] == "052") echo "selected"; ?>>052</option>
<option value='053' <? if($write[wr_13] == "053") echo "selected"; ?>>053</option>
<option value='054' <? if($write[wr_13] == "054") echo "selected"; ?>>054</option>
<option value='055' <? if($write[wr_13] == "055") echo "selected"; ?>>055</option>
<option value='061' <? if($write[wr_13] == "061") echo "selected"; ?>>061</option>
<option value='062' <? if($write[wr_13] == "062") echo "selected"; ?>>062</option>
<option value='063' <? if($write[wr_13] == "063") echo "selected"; ?>>063</option>
<option value='064' <? if($write[wr_13] == "064") echo "selected"; ?>>064</option>
</select>
-
<input name='wr_14' value='<?=$write[wr_14]?>' type='text' onfocus="OnCheckPhone(this)" onKeyup="OnCheckPhone(this)" size=10 itemname='회사전화 뒷번호' class=input></td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<tr>
<td class=write_head>이메일 </td>
<td><table width="116" border="0" cellspacing="1" cellpadding="1">
<tr>
<td><input class=ed style="ime-mode:inactive; width:80px;" name=wr_15 type="text" id="email1" size="15" itemname='이메일' value="<?=$write[wr_15]?>"></td>
<td>@</td>
<td><select name="email_select" class="box" id="email_select" onChange="checkemailaddy();">
<option value="" selected>선택</option>
<option value="daum.net">다음</option>
<option value="naver.com">네이버</option>
<option value="empal.com">엠파스</option>
<option value="yahoo.co.kr">야후</option>
<option value="dreamwiz.com">드림위즈</option>
<option value="hotmail.com">핫메일</option>
<option value="chollian.net">천리안</option>
<option value="freechal.com">프리챌</option>
<option value="hanafos.com">하나포스</option>
<option value="korea.com">코리아</option>
<option value="lycos.co.kr">라이코스</option>
<option value="netian.com">네티앙</option>
<option value="netsgo.com">넷츠고</option>
<option value="unitel.co.kr">유니텔</option>
<option value="1">직접입력</option>
</select></td>
<td><input style="ime-mode:inactive; width:100px;" name="wr_27" type="text" class=ed id="email2" size="20" itemname='이메일주소' value="<?=$write[wr_27]?>"></td>
</tr>
</table></td>
</tr>
<tr>
<td class=write_head>소속회사명칭 <font color="red">(*)</font></td>
<td><input class=ed type='text' style="width:275px;" name=wr_40 required size=4 itemname='소속회사명칭' value="<?=$write[wr_40]?>"></td>
</tr>
<tr>
<td class=write_head>생년월일 </td>
<td><input class=ed style="width:90px;" name=wr_4 itemname="생년월일" value="<?=$write[wr_4]?>" /><font color="gray"> (YYYY-MM-DD 형태로 입력해주세요)</font></td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<tr>
<td class=write_head>차량번호 </td>
<td><input class=ed style="width:90px;" name=wr_3 itemname="차량번호" value="<?=$write[wr_3]?>" /><font color="gray"> (00가0000 형태로 입력해주세요)</font></td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<tr>
<td class=write_head>노트북 반입여부 <font color="red">(*)</font></td>
<td>
<label><input type="radio" name="wr_39" id="wr_39" value="O" <?php if(htmlspecialchars($write[wr_39],ENT_QUOTES) == "O") echo "checked"; ?>> O </label>
<label><input type="radio" name="wr_39" id="wr_39" value="X" <?php if(htmlspecialchars($write[wr_39],ENT_QUOTES) == "X" || !$write[wr_39]) echo "checked"; ?>> X </label>
</td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<tr>
<td class=write_head>노트북 사용목적 </td>
<td><input class=ed style="width:275px;" name=wr_18 itemname="부서" value="<?=$write[wr_18]?>" /></td>
</tr>
<table width="<?=$width?>" border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="70%" valign="top"><div style="border:1px solid #ddd; background-color:#6289BB; height:34px;">
<div style="font-weight:bold; font-size:14px; margin:7px 0 0 10px;"><font style='font-family:돋움; font-size:11pt; font-weight:bold; color:#ffffff;'> 신청자 정보
</font></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" cellpadding="1" cellspacing="3">
<colgroup width=120>
<colgroup width=''>
<tr>
<td class=write_head>부 서 <font color="red">(*)</font></td>
<td><input class=ed style="width:100px;" name=wr_20 required itemname="부서" value="<?=$write[wr_20]?>" /></td>
<td class=write_head>
<strong>방문정보</strong>
</td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<tr>
<td class=write_head>이 름 <font color="red">(*)</font></td>
<td><input class=ed style="width:100px;" name=wr_47 required itemname="이름" value="<?=$write[wr_47]?>" itemname='핸드폰 두번째자리' class=input />
<script language="javascript">
function day(){
var today=new Date();
var h=today.getHours();
var m=today.getMinutes();
document.getElementById("wr_44").value = h+":"+m
}
</script>
<td class="write_head">
<input type="button" value="방문" onclick="day()" tabindex="-1" >
<input class="ed" style="width:50px;" id="wr_44" name="wr_44" itemname="복귀" value="<?=$write[wr_44]?>" itemname='핸드폰 두번째자리' class="input" tabindex="-1" />
</td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<tr>
<td class=write_head>직통전화 <font color="red">(*)</font></td>
<td><select name='wr_23' itemname='회사 전화 국번'>
<option value='031' <? if($write[wr_23] == "031") echo "selected"; ?>>031</option>
<option value='041' <? if($write[wr_23] == "041") echo "selected"; ?>>041</option>
</select>
-
<input name='wr_24' value='<?=$write[wr_24]?>' required type='text' onfocus="OnCheckPhone(this)" onKeyup="OnCheckPhone(this)" size=10 itemname='회사전화 번호' class=input></td>
<script language="javascript">
function day2(){
var today=new Date();
var h=today.getHours();
var m=today.getMinutes();
document.getElementById("wr_45").value = h+":"+m
}
</script>
<td class="write_head">
<input type="button" value="복귀" onclick="day2()" tabindex="-1" >
<input class="ed" style="width:50px;" id="wr_45" name="wr_45" itemname="복귀" value="<?=$write[wr_45]?>" itemname='핸드폰 두번째자리' class="input" tabindex="-1" />
</td>
</tr>
<tr><td colspan=2 height=1 bgcolor=#e7e7e7></td></tr>
<tr>
<td class=write_head>핸드폰 </td>
<td><select name='wr_25' itemname='회사 팩스 국번'>
<option value='010' <? if($write[wr_25] == "010") echo "selected"; ?>>010</option>
<option value='011' <? if($write[wr_25] == "011") echo "selected"; ?>>011</option>
<option value='019' <? if($write[wr_25] == "019") echo "selected"; ?>>019</option>
<option value='016' <? if($write[wr_25] == "016") echo "selected"; ?>>016</option>
</select>
-
<input name='wr_26' value='<?=$write[wr_26]?>' type='text' onfocus="OnCheckPhone(this)" onKeyup="OnCheckPhone(this)" size=10 itemname='핸드폰 두번째자리' class=input></td>
<body onload="javascript:pop2(); javascript:pop()">
<script language="javascript">
function day3(){
var today=new Date();
var h=today.getHours();
var m=today.getMinutes();
document.getElementById("wr_44").value ="미방문"
document.getElementById("wr_45").value ="미방문"
}
</script>
<td class="write_head">
<input type="button" value="미방문" onclick="day3()" style="width:90px; tabindex="-1" >
</td>
</tr>
</body>
</tr>
</table>
<tr>
<td width="100%" align="center" valign="top">
<input type=image id="btn_submit" src="<?=$board_skin_path?>/img/btn_write2.gif" border=0 accesskey='s'>
<a href="./board.php?bo_table=<?=$bo_table?>"><img id="btn_list" src="<?=$board_skin_path?>/img/btn_list2.gif" border=0></a>
<br>
</td>
</td>
</tr>
</table>
</form>
<script type="text/javascript"> var md5_norobot_key = ''; </script>
<script type="text/javascript" src="<?="$g4[path]/js/prototype.js"?>"></script>
<script type="text/javascript">
function imageClick() {
var url = "<?=$g4[bbs_path]?>/kcaptcha_session.php";
var para = "";
var myAjax = new Ajax.Request(
url,
{
method: 'post',
asynchronous: true,
parameters: para,
onComplete: imageClickResult
});
}
function imageClickResult(req) {
var result = req.responseText;
var img = document.createElement("IMG");
img.setAttribute("src", "<?=$g4[bbs_path]?>/kcaptcha_image.php?t=" + (new Date).getTime());
document.getElementById('kcaptcha_image').src = img.getAttribute('src');
md5_norobot_key = result;
}
<? if (!$is_member) { ?>Event.observe(window, "load", imageClick);<? } ?>
</script>
<script language="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_check(f) {
var s = "";
if (s = word_filter_check(f.wr_subject.value)) {
alert("제목에 금지단어('"+s+"')가 포함되어있습니다");
return;
}
if (s = word_filter_check(f.wr_content.value)) {
alert("내용에 금지단어('"+s+"')가 포함되어있습니다");
return;
}
if (document.getElementById('char_count')) {
if (char_min > 0 || char_max > 0) {
var cnt = parseInt(document.getElementById('char_count').innerHTML);
if (char_min > 0 && char_min > cnt) {
alert("내용은 "+char_min+"글자 이상 쓰셔야 합니다.");
return;
}
else if (char_max > 0 && char_max < cnt) {
alert("내용은 "+char_max+"글자 이하로 쓰셔야 합니다.");
return;
}
}
}
if (typeof(f.wr_key) != "undefined") {
if (hex_md5(f.wr_key.value) != md5_norobot_key) {
alert("자동등록방지용 빨간글자가 순서대로 입력되지 않았습니다.");
f.wr_key.focus();
return;
}
}
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';";
?>
f.submit();
}
</script>
<script language="JavaScript" src="<?="$g4[path]/js/board.js"?>"></script>
<? if ($is_dhtml_editor) {?><script language="JavaScript" src="<?="$g4[path]/geditor/geditor.js"?>"></script><?}?>
<script language="JavaScript">
window.onload=function() {
drawFont();
}
</script>
답변 4
echo "<span style='font-family:{$list[$i][wr_1]};color:{$list[$i][wr_2]};font-size:{$list[$i][wr_3]};'>{$list[$i][subject]}</span>"; //ssh 태그효과
를
echo "<span>{$list[$i][subject]}</span>"; //ssh 태그효과
로 고쳐보세요. font-size 에 숫자가 들어가니 글자가 커지는 거 같네요.
일단은 질문하기전에 천천히 한번 더 살펴 보시는게 좋을 것 같네요..
글자 크기 문제라면 해당 부분이 출력되는부분의 css 를 한번 살펴 보시길 바랍니다.
!-->!-->이건 출력되는 부분을 봐야 할거 같네요
출력되는 부분입니다 ㅠ.ㅠ
<meta http-equiv="Refresh" content="10">
<body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>
<head>
<script language="JavaScript">
var page,wid,hit,nam;
function win(page,nam,wid,hit)
{
var windo = eval('window.open("'+page+'","'+nam+'","status=no,toolbar=no,resizable=no,scrollbars=no,menubar=no,width='+wid+',height='+hit+',top=100,left=350")');
}
</script>
</head>
</body>
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$colspan = 5;
//if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;
include_once "$board_skin_path/skin.exe.php";
function get_bo_n_option($bo_n='')
{
global $g4, $board;
$arr = explode("|", $board[$bo_n]); // 구분자가 | 로 되어 있음
$str = "";
for ($i=0; $i<count($arr); $i++)
if (trim($arr[$i]))
$str .= "<option value='$arr[$i]'>$arr[$i]</option>\n";
return $str;
}
// 카테고리 분할
if ($is_category = true) {
$bo_6_option = get_bo_n_option('bo_6'); // SELECT OPTION 태그로 넘겨받음
$bo_7_option = get_bo_n_option('bo_7'); // SELECT OPTION 태그로 넘겨받음
$bo_8_option = get_bo_n_option('bo_8'); // SELECT OPTION 태그로 넘겨받음
$bo_9_option = get_bo_n_option('bo_9'); // SELECT OPTION 태그로 넘겨받음
$bo_10_option = get_bo_n_option('bo_10'); // SELECT OPTION 태그로 넘겨받음
}
// 이미지 보이기 전체 보이기는 0
$all_view = 0;
// 미리보기 이미지크기
$img_w = 80;
$img_h = 60;
// 넓이로 맞췄을때 높이의 중간지점에서 80%로 복구시킨다.
$Percent = 80;
?>
<style type="text/css">
<!--
.list_sort_title {font-family:돋움;font-size:12px;color:#567a9c;text-decoration:none;}
.list_sort_arrow {font-family:돋움;font-size:10px;color:#c3cfdf;}
-->
a.1:link, a.1:visited, a.1:active { font-size:12px; text-decoration:none; color:#000000; }
a.1:hover { font-size:12px; text-decoration:none; }
a.2:link, a.2:visited, a.2:active { font-size:12px; text-decoration:none; color:#000000; }
a.2:hover { font-size:12px; text-decoration:none; }
a.3:link, a.3:visited, a.3:active { font-size:12px; text-decoration:none; color:#000000; }
a.3:hover { font-size:12px; text-decoration:none; }
</style>
<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align=center cellpadding=0 cellspacing=0><tr><td><!-- 분류 셀렉트 박스, 게시물 몇건, 관리자화면 링크 -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<!-- 제목 -->
<table width="100%" border="0" cellpadding="0" cellspacing="2" bgcolor="#a2c0e7">
<tr>
<form name="fcategory" method="get">
<td style='padding:0px 5px 0px 10px;'>
<select name=wr_29 onChange="location='<?=$category_location?>&sca='+this.form.sca.value+'&wr_7='+this.form.wr_7.value+'&wr_8='+this.form.wr_8.value+'&wr_10='+this.form.wr_10.value+'&wr_29='+this.value;">
<option value=''><?=$board[bo_6_subj]?></option><?=$bo_6_option?></select>
<? if ($is_category) { ?>
<select name=sca onChange="location='<?=$category_location?>'+this.value;">
<?=$category_option?>
</select>
<? } ?>
<select name=wr_7 onChange="location='<?=$category_location?>&sca='+this.form.sca.value+'&wr_7='+this.value+'&wr_8='+this.form.wr_8.value+'&wr_10='+this.form.wr_10.value+'&wr_29='+this.form.wr_29.value;">
<option value=''><?=$board[bo_7_subj]?></option><?=$bo_7_option?></select>
<select name=wr_8 onChange="location='<?=$category_location?>&sca='+this.form.sca.value+'&wr_7='+this.form.wr_7.value+'&wr_8='+this.value+'&wr_10='+this.form.wr_10.value+'&wr_29='+this.form.wr_29.value;">
<option value=''><?=$board[bo_8_subj]?></option><?=$bo_8_option?></select>
<select name=wr_10 onChange="location='<?=$category_location?>&sca='+this.form.sca.value+'&wr_7='+this.form.wr_7.value+'&wr_8='+this.form.wr_8.value+'&wr_10='+this.value+'&wr_29='+this.form.wr_29.value;">
<option value=''><?=$board[bo_9_subj]?></option><?=$bo_9_option?></select>
<form name=fsearch method=get style="margin:0px;">
<td style='padding:0px 5px 0px 10px;'>
<div align="right">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=sca2 value="<?=$sca?>">
<input type=hidden name=wr_3 value="<?=$wr_3?>">
<input type=hidden name=wr_4 value="<?=$wr_4?>">
<select name=sfl>
<option value='wr_subject'>방문객이름</option>
<option value='wr_40'>소속회사명칭</option>
<option value='wr_3'>차량번호</option>
<option value='wr_20'>방문부서</option>
</select>
<input name=stx maxlength=15 size=20 itemname="검색어" value='<?=$stx?>'>
<input type=hidden name=sop value=and>
<input type=image src="<?=$board_skin_path?>/img/search_btn.gif" border=0 align=absmiddle>
</div></td></form>
</tr>
</table>
<div style="height:1px; line-height:1px; font-size:1px; background-color:#ddd; clear:both;"> </div>
<table background="<?=$board_skin_path?>/img/bar_bg.gif" width=100% border="0" cellpadding=0 cellspacing="0">
<tr align=center>
<td width=3><img src="<?=$board_skin_path?>/img/bar_line.gif" width="3" height="40"></td>
<td width=30><INPUT onClick="if (this.checked) all_checked(true); else all_checked(false);" type=checkbox></td>
<td width=3><img src="<?=$board_skin_path?>/img/bar_line.gif" width="3" height="40"></td>
<td width="30">공장</td>
<td width=3><img src="<?=$board_skin_path?>/img/bar_line.gif" width="3" height="40"></td>
<td width="180">방문객 이름</td>
<td width=3><img src="<?=$board_skin_path?>/img/bar_line.gif" width="3" height="40"></td>
<td width="150">방문날짜</td>
<td width=3><img src="<?=$board_skin_path?>/img/bar_line.gif" width="3" height="40"></td>
<td width="180">소속회사명칭</td>
<td width=3><img src="<?=$board_skin_path?>/img/bar_line.gif" width="3" height="40"></td>
<td width="80">노트북 반입</td>
<td width=3><img src="<?=$board_skin_path?>/img/bar_line.gif" width="3" height="40"></td>
<td>차량번호</td>
<td width=3><img src="<?=$board_skin_path?>/img/bar_line.gif" width="3" height="40"></td>
<td width="100">방문부서</td>
<td width=3><img src="<?=$board_skin_path?>/img/bar_line.gif" width="3" height="40"></td>
<td width="70">방문자</td>
<td width=3><img src="<?=$board_skin_path?>/img/bar_line.gif" width="3" height="40"></td>
<td width="90">직통전화</td>
<td width=3><img src="<?=$board_skin_path?>/img/bar_line.gif" width="3" height="40"></td>
<td width="50">출입시간</td>
<td width=3><img src="<?=$board_skin_path?>/img/bar_line.gif" width="3" height="40"></td>
<td width="50">복귀시간</td>
<td width=3><img src="<?=$board_skin_path?>/img/bar_right.gif" width="3" height="40"></td>
</tr>
</table>
<script language="javascript">
function fwrite_check(f)
{
var s = "";
if (typeof(f.wr_subject) != 'undefined') {
if (f.wr_subject.value == '') {
f.wr_subject.focus();
return;
}
}
f.action = "./write_update.php";
f.submit();
}
var v = document.fwrite;
function sendit() {
v.w.value = "";
v.wr_id.value = "";
if(!v.wr_content.value) v.wr_content.value = "_";
fwrite_check(v)
}
function FocusColor(This) { This.style.backgroundColor = "#FFF4DA"; }
function BlurColor(This) { This.style.backgroundColor = "#FFFFFF";}
//=====한영 체크 로직 끝=============
function text_check(text,total){
// text : 문자 필드명 , total : 총 문자길이
var obj = eval("document.forms[0]."+text)
var len = obj.value.length;
var count = 0;
var one_ch="";
var total2 = 0;
for (i = 0; i < len ; i++){
one_ch = obj.value.charAt(i); //한문자만 추출
if (escape(one_ch).length > 4) {
count = count + 2; //한글
}else {
count = count + 1; //영문
}
}
total2 = Math.floor(total/2);
if (count > total) {
alert("입력하신 내용은 한글 "+total2+", 영문 "+total+"자까지 쓰실 수 있습니다.\n\n문자 수를 확인하여 주시기 바랍니다.");
obj.value = obj.value.substring(0,total2);
obj.focus();
return false;
}
}
</script>
<form name="fboardlist" method="post" style="margin:0px;">
<input type='hidden' name='bo_table' value='<?=$bo_table?>'>
<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='page' value='<?=$page?>'>
<input type='hidden' name='sw' value=''>
<table width=100% height="23" border="0" cellpadding=0 cellspacing="0">
<!-- 목록 -->
<? for ($i=0; $i<count($list); $i++) {?>
<tr bgcolor=<? if ($list[$i]['ca_name'] == 'A') {
echo "ffe398";
}
else if ($list[$i]['ca_name'] == 'B') {
echo "ffeebf";
}
else if ($list[$i]['ca_name'] == 'C') {
echo "fff7e1";
}
else if ($list[$i]['ca_name'] == 'D') {
echo "fffdf9";
}
else if ($list[$i]['ca_name'] == '') {
echo "ffffff";
}
?>
onmouseover=this.style.backgroundColor='#DCF7FF' onmouseout=this.style.backgroundColor=''>
</div></td>
<td width=3><img src="<?=$board_skin_path?>/img/list_line.gif" width="3" height="23"></td>
<td width="30" align="center"><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"></td>
<td width=3><img src="<?=$board_skin_path?>/img/list_line.gif" width="3" height="23"></td>
<td width="30" ><center><a href="<?=$list[$i][href]?>" class="1"> <?=$list[$i][wr_29]?></a></td>
<td width=3><img src="<?=$board_skin_path?>/img/list_line.gif" width="3" height="23"></td>
<td width="180" align=center>
<a href="<?=$list[$i][href]?>" class="1">
<?
echo $nobr_begin;
echo $list[$i][reply];
echo $style = "";
if ($list[$i][is_notice]) $style = " style='font-weight:bold;'";
// echo $list[$i][subject];
echo "<span style='font-family:{$list[$i][wr_1]};color:{$list[$i][wr_2]};font-size:{$list[$i][wr_3]};'>{$list[$i][subject]}</span>"; //ssh 태그효과
if ($list[$i][wr_nogood]==-1) echo "<font color='#FF0000'>비승인</font>"; //ssh
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
//echo " " . $list[$i][icon_new];
//echo " " . $list[$i][icon_file];
//echo " " . $list[$i][icon_link];
//echo " " . $list[$i][icon_hot];
//echo " " . $list[$i][icon_secret];
echo $nobr_end;
?></a></td>
<td width=3><img src="<?=$board_skin_path?>/img/list_line.gif" width="3" height="23"></td>
<td width="150" ><center><a href="<?=$list[$i][href]?>" class="1"> <?=$category_option?> <?=$list[$i][wr_7]?> <?=$list[$i][wr_8]?> <?=$list[$i][wr_10]?></a></td>
<td width=3><img src="<?=$board_skin_path?>/img/list_line.gif" width="3" height="23"></td>
<td width="180" ><center><a href="<?=$list[$i][href]?>" class="1"><?=$list[$i][wr_40]?></a></td>
<td width=3><img src="<?=$board_skin_path?>/img/list_line.gif" width="3" height="23"></td>
<td width="80" ><center><a href="<?=$list[$i][href]?>" class="1"><?=$list[$i][wr_39]?></a></td>
<td width=3><img src="<?=$board_skin_path?>/img/list_line.gif" width="3" height="23"></td>
<td align=left style='word-break:break-all;'>
<center> <a href="<?=$list[$i][href]?>" class="1"><?=$list[$i][icon_file]?> <?=$list[$i][wr_3]?></a>
<?
if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:Tahoma;font-size:10px;color:#EE5A00;'>{$list[$i][comment_cnt]}</span></a>";
?>
</td>
<td width=3><img src="<?=$board_skin_path?>/img/list_line.gif" width="3" height="23"></td>
<td align=left style='word-break:break-all;' width="100" >
<center><a href="<?=$list[$i][href]?>" class="1"><?=$list[$i][wr_20]?></a></td>
<td width=3><img src="<?=$board_skin_path?>/img/list_line.gif" width="3" height="23"></td>
<td width="70" align=left style='word-break:break-all;'>
<center> <div align="center"><a href="<?=$list[$i][href]?>" class="1"><?=$list[$i][wr_47]?></a> </div></td>
<td width=3><img src="<?=$board_skin_path?>/img/list_line.gif" width="3" height="23"></td>
<td width="90" align=left style='word-break:break-all;'>
<center><div align="center"><a href="<?=$list[$i][href]?>" class="1"><?=$list[$i][wr_23]?>-<?=$list[$i][wr_24]?></a> </div></td>
<td width=3><img src="<?=$board_skin_path?>/img/list_line.gif" width="3" height="23"></td>
<td width="50" align=left style='word-break:break-all;'>
<center><div align="center"><a href="<?=$list[$i][href]?>" class="1"><?=$list[$i][wr_44]?></a> </div></td>
<td width=3><img src="<?=$board_skin_path?>/img/list_line.gif" width="3" height="23"></td>
<td width="50" align=left style='word-break:break-all;'>
<center><div align="center"><a href="<?=$list[$i][href]?>" class="1"><?=$list[$i][wr_45]?></a> </div></td>
<td width=2><img src="<?=$board_skin_path?>/img/list_right.gif" width="2" height="23"></td>
</tr>
<tr><td colspan="24" bgcolor="#EDEDED" height="1"></td></tr>
<? }?>
<? if (count($list) == 0) { echo "<tr><td colspan='$colspan' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
</table>
</form>
<!-- 페이지 -->
<div id="pagingNew"> <?=$write_pages?></div>
<div style="clear:both; margin-top:7px; height:31px;">
<div style="float:left;">
<? if ($list_href) { ?>
<a href="<?=$list_href?>"><img src="<?=$board_skin_path?>/img/btn_list.gif" align=absmiddle border="0"></a>
<? } ?>
<? if ($write_href) { ?><a href="<?=$write_href?>"><img src="<?=$board_skin_path?>/img/btn_write.gif" border="0"></a><? } ?>
<? if ($is_admin == "super") { ?>
<a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/btn_select_delete.gif" align=absmiddle border="0"></a><? } ?>
</div>
<div style="float:right;">
</div>
</div>
</td>
</tr></table>
</td>
</tr></table>
<script language="JavaScript">
if ('<?=$sca?>') document.fcategory.sca.value = '<?=$sca?>';
if ('<?=$wr_7?>') document.fcategory.wr_7.value = '<?=$wr_7?>';
if ('<?=$wr_8?>') document.fcategory.wr_8.value = '<?=$wr_8?>';
if ('<?=$wr_10?>') document.fcategory.wr_10.value = '<?=$wr_10?>';
if ('<?=$wr_29?>') document.fcategory.wr_29.value = '<?=$wr_29?>';
if ('<?=$stx?>') {
document.fsearch.sfl.value = '<?=$sfl?>';
document.fsearch.sop.value = '<?=$sop?>';
}
</script>
<? if ($is_checkbox) { ?>
<script language="JavaScript">
function all_checked(sw) {
var f = document.fboardlist;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]")
f.elements[i].checked = sw;
}
}
function check_confirm(str) {
var f = document.fboardlist;
var chk_count = 0;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
chk_count++;
}
if (!chk_count) {
alert(str + "할 게시물을 하나 이상 선택하세요.");
return false;
}
return true;
}
// 선택한 게시물 삭제
function select_delete() {
var f = document.fboardlist;
str = "삭제";
if (!check_confirm(str))
return;
if (!confirm("선택한 게시물을 정말 "+str+" 하시겠습니까?\n\n한번 "+str+"한 자료는 복구할 수 없습니다"))
return;
f.action = "./delete_all.php";
f.submit();
}
// 선택한 게시물 복사 및 이동
function select_copy(sw) {
var f = document.fboardlist;
if (sw == "copy")
str = "복사";
else
str = "이동";
if (!check_confirm(str))
return;
var sub_win = window.open("", "move", "left=50, top=50, width=500, height=550, scrollbars=1");
f.sw.value = sw;
f.target = "move";
f.action = "./move.php";
f.submit();
}
</script>
<? } ?>
<!-- 게시판 목록 끝 -->
<br><br>
정말 감사합니다.
개발자분들꼐서 올려주신 소스를 가지고 이해가 안된상태에서 맨땅에 해딩하듯이 하나하나씩 바꿔보면서 하고 있다보니, 뭔가 하나만 꼬인다고 그러면 정신을 못 차리겠습니다. 정말 감사합니다. 잘 해결되었습니다.