리스트에서 한줄로 나오는 내용을 여러 줄 나오게 하고 싶습니다. 정보
리스트에서 한줄로 나오는 내용을 여러 줄 나오게 하고 싶습니다.본문
이미지 처럼요 내용 입력을 할때요 엔터를 쳐서 두줄로 입력을해도
한줄로만 나오는데요
이걸 엔터를 쳐서 입력한 글은 두줄로 나오게끔 하고 싶습니다.
조언 좀 부탁 드릴게요
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
//if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;
// 제목이 두줄로 표시되는 경우 이 코드를 사용해 보세요.
// <nobr style='display:block; overflow:hidden; width:000px;'>제목</nobr>
?>
<style>
.board_top { clear:both; }
.board_list { clear:both; width:100%; table-layout:fixed; margin:0 0 0 0; }
.board_list th { font-weight:bold; font-size:12px; }
.board_list th { background:url(<?=$board_skin_path?>/img/title_bg.gif) repeat-x; }
.board_list th { white-space:nowrap; height:100px; overflow:hidden; text-align:center; }
.board_list th { border-top:1px solid #ddd; border-bottom:1px solid #ddd; }
.board_list tr.bg0 { background-color:#fafafa; }
.board_list tr.bg1 { background-color:#ffffff; }
.board_list td { padding:.5em; }
.board_list td { border-bottom:1px solid #ddd;}
.board_list td.num { color:#999999; text-align:center; }
.board_list td.checkbox { text-align:center; }
.board_list td.cate { text-align:left; font:Verdana, Arial, Helvetica, sans-serif;}
.board_list td.subject { overflow:hidden; padding-left:10px;}
.board_list td.content { font:normal 12px 굴림,tahoma; color:#333333; letter-spacing:0.5px; line-height:20px; padding:10}
.board_list td.name { padding:0 0 0 0px; text-align:center; }
.board_list td.datetime { font:normal 11px tahoma; color:#BABABA; text-align:center; }
.board_list td.hit { font:normal 11px tahoma; color:#BABABA; text-align:center; }
.board_list td.good { font:normal 11px tahoma; color:#BABABA; text-align:center; }
.board_list td.nogood { font:normal 11px tahoma; color:#BABABA; text-align:center; }
.board_button { clear:both; margin:10px 0 0 0; }
.board_page { clear:both; text-align:center; margin:3px 0 0 0; }
.board_page a:link { color:#777; }
.board_search { text-align:center; margin:10px 0 0 0; }
.board_search .stx { height:21px; border:1px solid #9A9A9A; border-right:1px solid #D8D8D8; border-bottom:1px solid #D8D8D8; }
</style>
<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><br>
<td>
<!-- 한줄 카테고리 삽입 -->
<? include "_inc_category.php"; ?>
<br style="line-height:5px ">
<!-- 제목 -->
<form name="fboardlist" method="post">
<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=''>
<?
for ($i=0; $i<count($list); $i++) {
$bg = $i%2 ? 0 : 0;
?>
<table cellspacing="0" cellpadding="0" class="board_list" BORDER=0 >
<col width="30"/>
<? if ($is_checkbox) { ?><col width="30" /><? } ?>
<col width="100"/>
<col />
<? if ($is_admin) { ?> <col width="90"/><? } ?>
<tr class="bg<?=$bg?>" onMouseOver="this.style.backgroundColor='#ededed'" onMouseOut="this.style.backgroundColor=''">
<td class="num">
<img src="<?=$board_skin_path?>/img/icon_q.gif" border=0>
</td>
<? if ($is_checkbox) { ?><td class="checkbox"><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"></td><? } ?>
<td class="cate">
[<b><? if ($is_category && $list[$i][ca_name]) {
$cat_color = "#2c2c2c";
echo " <a href='{$list[$i][ca_name_href]}'><font color='{$cat_color}'>{$list[$i][ca_name]}</font></a> ";
} ?></b>]
</td>
<td class="subject">
<a onclick=view(<?=$list[$i][num]?>) style='cursor:hand'><?=$list[$i][subject]?></a>
</td>
<? if ($is_admin == "super" || $is_admin == "group") { ?>
<td>
<a href="<?=$write_href?>&w=u&wr_id=<?=$list[$i][wr_id]?>&page=<?=$page?>">
</a>
<a href="javascript:del('./delete.php?bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>&page=');"></a>
</td>
<? } ?>
</tr>
</table>
<div id="view_<?=$list[$i][num]?>" style="display:none">
<table class="board_list" cellpadding=5 width=100% style='border:0px solid #ccc; background-color:#ffffff;'>
<col width="30"/>
<col />
<tr>
<td valign='top' style='border:0px solid #ffffff; padding-top:11px' >
<img src="<?=$board_skin_path?>/img/icon_a.gif" border=0></td>
<td class='content' style='border:0px solid #ffffff;'>
<?=trim($list[$i][wr_content])?></td>
</tr>
</table>
</div>
<? } // end for ?>
<? if (count($list) == 0) { echo "<table width='100%'><tr><td height=100 align=center>게시물이 없습니다.</td></tr></table>"; } ?>
</form>
<div style="padding-top:10px;">
<? if(!$frame) { ?>
<? if ($is_checkbox) { ?>
<? if ($rss_href || $amina[search_skin] != "none") { ?><? } ?>
<a href="javascript:select_delete();"><font color="#888888">선택삭제</font></a>
<? } ?>
<? if ($admin_href) { ?>
|
<a href="<?=$admin_href?>"><font color="#888888">기본설정</font></a>
<a href="javascript:popup_window('<?=$board_skin_path?>/amina.php?bo_table=<?=$bo_table?>','amina','scrollbars=yes,width=400,height=700,top=20,left=20');">
<font color="#888888"></font>
</a>
<?}?>
</div>
<? } ?>
<div style="float:right;">
<? if ($write_href) { if($sca) $write_href .= "&sca=".urlencode($sca); ?>
<a href="<?=$write_href?><?=$frame_opt?><?=$search_opt?>"><img src="<?=$btn_skin_path?>/btn_write.gif" border='0' align='absmiddle'></a>
<? } else { ?>
<a href="javascript:alert('로그인을 하지 않았거나 권한이 없는 레벨입니다.')"><img src="<?=$btn_skin_path?>/btn_write.gif" border='0' align='absmiddle'></a>
<? } ?>
</div>
<div style="clear:both;"></div>
</div>
<script language="JavaScript">
if ('<?=$sca?>') document.fcategory.sca.value = '<?=$sca?>';
if ('<?=$stx?>') {
document.fsearch.sfl.value = '<?=$sfl?>';
if ('<?=$sop?>' == 'and')
document.fsearch.sop[0].checked = true;
if ('<?=$sop?>' == 'or')
document.fsearch.sop[1].checked = true;
} else {
document.fsearch.sop[0].checked = true;
}
</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>
<? } ?>
<!-- 게시판 목록 끝 -->
<!-- view화면 출력 스크립트-->
<script>
var old_i; // 전에 클릭했던 글의 번호값 저장
function view(i) { // 답변 표시여부 조정하는 js함수
if (old_i==i) {
var mode=document.getElementById('view_'+i).style.display;
if (mode=='inline') document.getElementById('view_'+i).style.display='none';
else document.getElementById('view_'+i).style.display='inline';
}
else {
if (old_i) document.getElementById('view_'+old_i).style.display='none';
document.getElementById('view_'+i).style.display='inline';
}
old_i=i;
}
</script>
한줄로만 나오는데요
이걸 엔터를 쳐서 입력한 글은 두줄로 나오게끔 하고 싶습니다.
조언 좀 부탁 드릴게요
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
//if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;
// 제목이 두줄로 표시되는 경우 이 코드를 사용해 보세요.
// <nobr style='display:block; overflow:hidden; width:000px;'>제목</nobr>
?>
<style>
.board_top { clear:both; }
.board_list { clear:both; width:100%; table-layout:fixed; margin:0 0 0 0; }
.board_list th { font-weight:bold; font-size:12px; }
.board_list th { background:url(<?=$board_skin_path?>/img/title_bg.gif) repeat-x; }
.board_list th { white-space:nowrap; height:100px; overflow:hidden; text-align:center; }
.board_list th { border-top:1px solid #ddd; border-bottom:1px solid #ddd; }
.board_list tr.bg0 { background-color:#fafafa; }
.board_list tr.bg1 { background-color:#ffffff; }
.board_list td { padding:.5em; }
.board_list td { border-bottom:1px solid #ddd;}
.board_list td.num { color:#999999; text-align:center; }
.board_list td.checkbox { text-align:center; }
.board_list td.cate { text-align:left; font:Verdana, Arial, Helvetica, sans-serif;}
.board_list td.subject { overflow:hidden; padding-left:10px;}
.board_list td.content { font:normal 12px 굴림,tahoma; color:#333333; letter-spacing:0.5px; line-height:20px; padding:10}
.board_list td.name { padding:0 0 0 0px; text-align:center; }
.board_list td.datetime { font:normal 11px tahoma; color:#BABABA; text-align:center; }
.board_list td.hit { font:normal 11px tahoma; color:#BABABA; text-align:center; }
.board_list td.good { font:normal 11px tahoma; color:#BABABA; text-align:center; }
.board_list td.nogood { font:normal 11px tahoma; color:#BABABA; text-align:center; }
.board_button { clear:both; margin:10px 0 0 0; }
.board_page { clear:both; text-align:center; margin:3px 0 0 0; }
.board_page a:link { color:#777; }
.board_search { text-align:center; margin:10px 0 0 0; }
.board_search .stx { height:21px; border:1px solid #9A9A9A; border-right:1px solid #D8D8D8; border-bottom:1px solid #D8D8D8; }
</style>
<!-- 게시판 목록 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><br>
<td>
<!-- 한줄 카테고리 삽입 -->
<? include "_inc_category.php"; ?>
<br style="line-height:5px ">
<!-- 제목 -->
<form name="fboardlist" method="post">
<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=''>
<?
for ($i=0; $i<count($list); $i++) {
$bg = $i%2 ? 0 : 0;
?>
<table cellspacing="0" cellpadding="0" class="board_list" BORDER=0 >
<col width="30"/>
<? if ($is_checkbox) { ?><col width="30" /><? } ?>
<col width="100"/>
<col />
<? if ($is_admin) { ?> <col width="90"/><? } ?>
<tr class="bg<?=$bg?>" onMouseOver="this.style.backgroundColor='#ededed'" onMouseOut="this.style.backgroundColor=''">
<td class="num">
<img src="<?=$board_skin_path?>/img/icon_q.gif" border=0>
</td>
<? if ($is_checkbox) { ?><td class="checkbox"><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"></td><? } ?>
<td class="cate">
[<b><? if ($is_category && $list[$i][ca_name]) {
$cat_color = "#2c2c2c";
echo " <a href='{$list[$i][ca_name_href]}'><font color='{$cat_color}'>{$list[$i][ca_name]}</font></a> ";
} ?></b>]
</td>
<td class="subject">
<a onclick=view(<?=$list[$i][num]?>) style='cursor:hand'><?=$list[$i][subject]?></a>
</td>
<? if ($is_admin == "super" || $is_admin == "group") { ?>
<td>
<a href="<?=$write_href?>&w=u&wr_id=<?=$list[$i][wr_id]?>&page=<?=$page?>">
</a>
<a href="javascript:del('./delete.php?bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>&page=');"></a>
</td>
<? } ?>
</tr>
</table>
<div id="view_<?=$list[$i][num]?>" style="display:none">
<table class="board_list" cellpadding=5 width=100% style='border:0px solid #ccc; background-color:#ffffff;'>
<col width="30"/>
<col />
<tr>
<td valign='top' style='border:0px solid #ffffff; padding-top:11px' >
<img src="<?=$board_skin_path?>/img/icon_a.gif" border=0></td>
<td class='content' style='border:0px solid #ffffff;'>
<?=trim($list[$i][wr_content])?></td>
</tr>
</table>
</div>
<? } // end for ?>
<? if (count($list) == 0) { echo "<table width='100%'><tr><td height=100 align=center>게시물이 없습니다.</td></tr></table>"; } ?>
</form>
<div style="padding-top:10px;">
<? if(!$frame) { ?>
<? if ($is_checkbox) { ?>
<? if ($rss_href || $amina[search_skin] != "none") { ?><? } ?>
<a href="javascript:select_delete();"><font color="#888888">선택삭제</font></a>
<? } ?>
<? if ($admin_href) { ?>
|
<a href="<?=$admin_href?>"><font color="#888888">기본설정</font></a>
<a href="javascript:popup_window('<?=$board_skin_path?>/amina.php?bo_table=<?=$bo_table?>','amina','scrollbars=yes,width=400,height=700,top=20,left=20');">
<font color="#888888"></font>
</a>
<?}?>
</div>
<? } ?>
<div style="float:right;">
<? if ($write_href) { if($sca) $write_href .= "&sca=".urlencode($sca); ?>
<a href="<?=$write_href?><?=$frame_opt?><?=$search_opt?>"><img src="<?=$btn_skin_path?>/btn_write.gif" border='0' align='absmiddle'></a>
<? } else { ?>
<a href="javascript:alert('로그인을 하지 않았거나 권한이 없는 레벨입니다.')"><img src="<?=$btn_skin_path?>/btn_write.gif" border='0' align='absmiddle'></a>
<? } ?>
</div>
<div style="clear:both;"></div>
</div>
<script language="JavaScript">
if ('<?=$sca?>') document.fcategory.sca.value = '<?=$sca?>';
if ('<?=$stx?>') {
document.fsearch.sfl.value = '<?=$sfl?>';
if ('<?=$sop?>' == 'and')
document.fsearch.sop[0].checked = true;
if ('<?=$sop?>' == 'or')
document.fsearch.sop[1].checked = true;
} else {
document.fsearch.sop[0].checked = true;
}
</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>
<? } ?>
<!-- 게시판 목록 끝 -->
<!-- view화면 출력 스크립트-->
<script>
var old_i; // 전에 클릭했던 글의 번호값 저장
function view(i) { // 답변 표시여부 조정하는 js함수
if (old_i==i) {
var mode=document.getElementById('view_'+i).style.display;
if (mode=='inline') document.getElementById('view_'+i).style.display='none';
else document.getElementById('view_'+i).style.display='inline';
}
else {
if (old_i) document.getElementById('view_'+old_i).style.display='none';
document.getElementById('view_'+i).style.display='inline';
}
old_i=i;
}
</script>
댓글 전체