글쓴이 색깔이 안바뀌네요..ㅡ,.ㅡ 정보
글쓴이 색깔이 안바뀌네요..ㅡ,.ㅡ본문
아래 소스중에서
<td width="120" valign=middle><?=$list[$i][name]?>
<? if ($is_checkbox) { ?><input type=checkbox style="color:yellow;"name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"><? } ?></td>
~~~~~~~~~<?=$list[$i][name]?>~~~~~~~~요것이 앞에 테그를붙여도 style적용을 해도
색깔이 안바뀌네요...
전체 소스는 밑에 복사 해놨습니다.
도와주십쇼~~~(__)
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0" border=0>
<? if ($admin_href) { ?>
<tr>
<td align=right style='padding-right:10px; color:white'>
<a href='<?=$admin_href?>' target=_blink><font color="green">관리자</font></a>
</td>
</tr>
<tr><td height="2"></td></tr>
<tr><td height="3"></td></tr>
<?}?>
<tr><td><? include ("$board_skin_path/write.skin.php"); ?></td></tr>
<tr><td height="40"></td></tr>
<tr><td>
<!-- 게시판 리스트 시작 -->
<form name="fboardlist" method="post" action="" 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%" border="0" cellspacing="1" cellpadding="0">
<tr><td style="padding:10;">
<? for ($i=0; $i<count($list); $i++) { ?>
<table width='100%' cellpadding=0 cellspacing=0 border=0>
<tr>
<td width="120" valign=middle style="color:yellow;"><?=$list[$i][name]?>
<? if ($is_checkbox) { ?><input type=checkbox style="color:yellow;"name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"><? } ?></td>
<td></td>
<td>
<table width='100%' cellpadding=0 cellspacing=0 border=0>
<tr>
<td class="cont" valign='top' style="color:white;">
<?
echo $list[$i][reply];
echo $list[$i][icon_reply];
$cont = $list[$i][wr_content];
$cont2 = cut_str($list[$i][wr_content],300);
?>
<? $list[$i][wr_content] = conv_content($list[$i][wr_content], 0);?>
<? if ($member[mb_level] >= 7) { ?>
<a href="<?=$write_href?>&w=r&wr_id=<?=$list[$i][wr_id]?>&page=<?=$page?>" title='<?=$cont?>' onfocus='this.blur()'><?=$cont2?></a>
<? } else { ?>
<a title='<?=$cont?>' style='cursor:default;' onfocus='this.blur()'><font color=white><?=$cont2?></font></a>
<? } ?>
</td>
</tr>
</table></td>
<td width=11></td>
<td width="70" valign="middle" style="color:white;"><span class="no"><?=$list[$i][datetime]?></span>
<? if (($member[mb_id] && ($member[mb_id] == $list[$i][mb_id])) || $is_admin) { ?>
<br>
<a href="<?=$write_href?>&w=u&wr_id=<?=$list[$i][wr_id]?>&page=<?=$page?>"><font color="yellow">R</font></a>
<a href="javascript:if (confirm('삭제하시겠습니까?')) { location='./delete.php?w=d&bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>&page=<?=$page?>';}"><font color="red">D</font></a>
<? } ?>
</td>
</tr>
<tr>
<td height=20></td>
<td rowspan=3 valign='top'>
</td>
<td></td>
</tr>
</table>
<? } ?>
<? if (count($list) == 0) { ?>
<table width='100%' cellpadding=0 cellspacing=0 border=0>
<tr>
<td width=11 height=11></td>
<td></td>
<td width=11></td>
</tr>
<tr>
<td></td>
<td height=50 align=center>등록글이 없습니다.</td>
<td></td>
</tr>
<tr>
<td height=11></td>
<td></td>
<td></td>
</tr>
</table>
<? } ?>
</td>
</tr>
</table>
</form>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td height=3 colspan=3></td></tr>
<tr>
<? if ($is_checkbox) { ?>
<td height="18">
<INPUT onclick="if (this.checked) all_checked(true); else all_checked(false);" type=checkbox><font style="font-family:돋움; font-size:9pt; color:#FFFFFF;">선택</font>
<a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/delete.gif" align=absmiddle></a>
<a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/copy.gif" align=absmiddle></a>
<a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/move.gif" align=absmiddle></a>
</td>
<?}?>
<td height="15" align='center'>
<?
// 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
//echo $write_pages;
$write_pages = str_replace("처음", "■", $write_pages);
$write_pages = str_replace("이전", "■", $write_pages);
$write_pages = str_replace("다음", "■", $write_pages);
$write_pages = str_replace("맨끝", "■", $write_pages);
$write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "<b><font style=\"font-family:돋움; font-size:8pt; color:#797979\">$1</font></b>", $write_pages);
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><font style=\"font-family:돋움; font-size:8pt; color:orange;\">$1</font></b>", $write_pages);
?>
<?=$write_pages?>
</td>
</tr>
<tr>
<td height="20"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr></table>
<? 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=396, height=550, scrollbars=1");
f.sw.value = sw;
f.target = "move";
f.action = "./move.php";
f.submit();
}
</script>
<? } ?>
<td width="120" valign=middle><?=$list[$i][name]?>
<? if ($is_checkbox) { ?><input type=checkbox style="color:yellow;"name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"><? } ?></td>
~~~~~~~~~<?=$list[$i][name]?>~~~~~~~~요것이 앞에 테그를붙여도 style적용을 해도
색깔이 안바뀌네요...
전체 소스는 밑에 복사 해놨습니다.
도와주십쇼~~~(__)
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0" border=0>
<? if ($admin_href) { ?>
<tr>
<td align=right style='padding-right:10px; color:white'>
<a href='<?=$admin_href?>' target=_blink><font color="green">관리자</font></a>
</td>
</tr>
<tr><td height="2"></td></tr>
<tr><td height="3"></td></tr>
<?}?>
<tr><td><? include ("$board_skin_path/write.skin.php"); ?></td></tr>
<tr><td height="40"></td></tr>
<tr><td>
<!-- 게시판 리스트 시작 -->
<form name="fboardlist" method="post" action="" 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%" border="0" cellspacing="1" cellpadding="0">
<tr><td style="padding:10;">
<? for ($i=0; $i<count($list); $i++) { ?>
<table width='100%' cellpadding=0 cellspacing=0 border=0>
<tr>
<td width="120" valign=middle style="color:yellow;"><?=$list[$i][name]?>
<? if ($is_checkbox) { ?><input type=checkbox style="color:yellow;"name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"><? } ?></td>
<td></td>
<td>
<table width='100%' cellpadding=0 cellspacing=0 border=0>
<tr>
<td class="cont" valign='top' style="color:white;">
<?
echo $list[$i][reply];
echo $list[$i][icon_reply];
$cont = $list[$i][wr_content];
$cont2 = cut_str($list[$i][wr_content],300);
?>
<? $list[$i][wr_content] = conv_content($list[$i][wr_content], 0);?>
<? if ($member[mb_level] >= 7) { ?>
<a href="<?=$write_href?>&w=r&wr_id=<?=$list[$i][wr_id]?>&page=<?=$page?>" title='<?=$cont?>' onfocus='this.blur()'><?=$cont2?></a>
<? } else { ?>
<a title='<?=$cont?>' style='cursor:default;' onfocus='this.blur()'><font color=white><?=$cont2?></font></a>
<? } ?>
</td>
</tr>
</table></td>
<td width=11></td>
<td width="70" valign="middle" style="color:white;"><span class="no"><?=$list[$i][datetime]?></span>
<? if (($member[mb_id] && ($member[mb_id] == $list[$i][mb_id])) || $is_admin) { ?>
<br>
<a href="<?=$write_href?>&w=u&wr_id=<?=$list[$i][wr_id]?>&page=<?=$page?>"><font color="yellow">R</font></a>
<a href="javascript:if (confirm('삭제하시겠습니까?')) { location='./delete.php?w=d&bo_table=<?=$bo_table?>&wr_id=<?=$list[$i][wr_id]?>&page=<?=$page?>';}"><font color="red">D</font></a>
<? } ?>
</td>
</tr>
<tr>
<td height=20></td>
<td rowspan=3 valign='top'>
</td>
<td></td>
</tr>
</table>
<? } ?>
<? if (count($list) == 0) { ?>
<table width='100%' cellpadding=0 cellspacing=0 border=0>
<tr>
<td width=11 height=11></td>
<td></td>
<td width=11></td>
</tr>
<tr>
<td></td>
<td height=50 align=center>등록글이 없습니다.</td>
<td></td>
</tr>
<tr>
<td height=11></td>
<td></td>
<td></td>
</tr>
</table>
<? } ?>
</td>
</tr>
</table>
</form>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td height=3 colspan=3></td></tr>
<tr>
<? if ($is_checkbox) { ?>
<td height="18">
<INPUT onclick="if (this.checked) all_checked(true); else all_checked(false);" type=checkbox><font style="font-family:돋움; font-size:9pt; color:#FFFFFF;">선택</font>
<a href="javascript:select_delete();"><img src="<?=$board_skin_path?>/img/delete.gif" align=absmiddle></a>
<a href="javascript:select_copy('copy');"><img src="<?=$board_skin_path?>/img/copy.gif" align=absmiddle></a>
<a href="javascript:select_copy('move');"><img src="<?=$board_skin_path?>/img/move.gif" align=absmiddle></a>
</td>
<?}?>
<td height="15" align='center'>
<?
// 기본으로 넘어오는 페이지를 아래와 같이 변환하여 이미지로도 출력할 수 있습니다.
//echo $write_pages;
$write_pages = str_replace("처음", "■", $write_pages);
$write_pages = str_replace("이전", "■", $write_pages);
$write_pages = str_replace("다음", "■", $write_pages);
$write_pages = str_replace("맨끝", "■", $write_pages);
$write_pages = preg_replace("/<span>([0-9]*)<\/span>/", "<b><font style=\"font-family:돋움; font-size:8pt; color:#797979\">$1</font></b>", $write_pages);
$write_pages = preg_replace("/<b>([0-9]*)<\/b>/", "<b><font style=\"font-family:돋움; font-size:8pt; color:orange;\">$1</font></b>", $write_pages);
?>
<?=$write_pages?>
</td>
</tr>
<tr>
<td height="20"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr></table>
<? 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=396, height=550, scrollbars=1");
f.sw.value = sw;
f.target = "move";
f.action = "./move.php";
f.submit();
}
</script>
<? } ?>
댓글 전체
checkbox 선택시 이벤트에 대한 반응을 전달해야 하는데 그런 체크를 하지 못하는것 같습니다.
스크립터를 별도로 작성해야 하며 흔한 구조이니 쉽게 찾을수 있을겁니다.
검색을 해보시면 좋을것 같습니다.
스크립터를 별도로 작성해야 하며 흔한 구조이니 쉽게 찾을수 있을겁니다.
검색을 해보시면 좋을것 같습니다.

echo strip_tags($list[$i][name]);