게시판 리스트에서 관리자 닉네임만 붉은색으로 나오게 할려면,,, 음 정보
게시판 리스트에서 관리자 닉네임만 붉은색으로 나오게 할려면,,, 음
본문
게시판에서 관리자 닉네임만 색상 변경 할려면,,
어디를 손봐야 할까요??
부탁 드려요 고수님들 ...
리스트 페이지 소스 입니다,,
<?
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 type="text/css">
.field {border:1px solid #555;background:#40403B;color:white;padding-top:2px;}
.board_list{table-layout:fixed;border:1px #555 solid;}
.board_list th{height:27px;padding-top:3px;color:white;background:url("../../../img/HEAD_NOTICE_BG.gif");}
.board_list .left{padding:0;}
.board_list th{letter-spacing:-1;}
.board_list .list0{background:#000;}
.board_list .list1{background:#111;}
.paginate { padding:6px 0; text-align:center;}
.paginate *{ margin:0; padding:0;}
.paginate a,.paginate strong{ _position:relative; margin-left:-9px; font-weight:bold; display:inline-block; padding:3px 8px 1px 7px; color:white; border-left:1px solid #555; border-right:1px solid #555; text-decoration:none; line-height:normal; font:bold 12px 굴림, Gulim, 돋움, Dotum, AppleGothic, Sans-serif; background:#000;}
.paginate strong{ color:#575C76 !important;}
.paginate a:hover{ background:#3F4C6B; }
.paginate a.pre{ padding:3px 8px 1px 16px; background:url("") no-repeat 8px 6px !important; border:none; font-weight:normal; }
.paginate a.pre_end{ padding:3px 8px 1px 16px; background:url("") no-repeat 4px 6px !important; border:none; border-right:1px solid #555; font-weight:normal;}
.paginate a.next{ padding:3px 16px 1px 8px; background:url("") no-repeat 37px 6px !important; border:none; font-weight:normal; }
.paginate a.next_end{ padding:3px 16px 1px 8px; background:url("") no-repeat 37px 6px !important; border:none; border-left:1px solid #555; font-weight:normal;}
</style>
<!-- 게시판 목록 시작 -->
<table width="100%" align=center cellpadding=0 cellspacing=0><tr><td>
<!-- 제목 -->
<form name="fboardlist" method="post" style="margin:0;">
<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=<?=$width?> border=0 cellpadding=0 cellspacing=0 class="board_list" align="center">
<tr align=center>
<th width=60>번호</th>
<? if ($is_checkbox) { ?><th width=40><input onclick="if (this.checked) all_checked(true); else all_checked(false);" type=checkbox></th><?}?>
<th class="gray">제 목</th>
<th width=110>글쓴이</th>
<th width=100>날짜</th>
<th width=50>조회</th>
</tr>
</table>
<table width=<?=$width?> border=0 cellpadding=0 cellspacing=1 bgcolor="333333" class="board_list" align="center">
<col width="60">
<? if ($is_checkbox) { ?><col width="40"><?}?>
<col width="">
<col width="110">
<col width="100">
<col width="50">
<!-- 목록 -->
<? for ($i=0; $i<count($list); $i++) {
if ($list[$i][is_notice]) { // 공지사항
$num = "공지";
$background = "0";
}else if ($wr_id == $list[$i][wr_id]) // 현재위치
$num = "".($list[$i][num]+69127)."";
else{
$num = "".($list[$i][num]+69127)."";
$background = "1";
}
?>
<tr height=29 align=center class="list<?=$background?>">
<td width=60>
<?
$xmb = get_member($list[$i]['mb_id'],'mb_level');
$gicon = $g4['path']."/data/member/gicon".$xmb['mb_level'].".gif";
if( file_exists($gicon) )
{
$list[$i][name] = "<img src='".$gicon."' /> ".$list[$i][name]."";
}
// if($config['cf_admin'] == $list[$i]['mb_id']) $list[$i][name] = "<img src='$g4[path]/img/level9.gif' /> ".$list[$i][name]."";
echo $num;
?>
</td>
<? if ($is_checkbox) { ?><td width=40><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"></td><? } ?>
<td align=left style='word-break:break-all;'>
<?
echo $nobr_begin;
echo $list[$i][reply];
echo $list[$i][icon_reply];
if ($is_category && $list[$i][ca_name]) {
echo "<span class=small><font color=gray>[<a href='{$list[$i][ca_name_href]}'>{$list[$i][ca_name]}</a>]</font></span> ";
}
$style = "";
if ($list[$i][is_notice]) $style = " style='font-weight:bold;'";
echo "<a href='{$list[$i][href]}' $style>";
if( $list[$i][wr_1] ) $list[$i][subject] .= " <img src='{$board_skin_path}/img/new_betting.png' align='absmiddle' border='0' alt='내역추가'/>";
if( $list[$i][wr_2] ) echo "<span style='color:{$list[$i][wr_2]};'> ".$list[$i][subject]."</span>";
else echo $list[$i][subject];
echo "</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>";
echo $nobr_end;
?>
</td>
<td align=left width=100><nobr style='display:block; overflow:hidden; width:105px;' class="bold"> <?=$list[$i][name]?></nobr></td>
<? if( !$list[$i][is_notice] ) { ?>
<td width="100"><?=$list[$i][datetime]?></td>
<td width="50" align="center"><?=$list[$i][wr_hit]?></td>
<?}else{ ?>
<td width=150 colspan="2"></td>
<? }?>
</tr>
<?}?>
<? if (count($list) == 0) { echo "<tr><td colspan='$colspan' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
</table>
</form>
<br />
<table width="<?=$width?>" cellpadding="" cellspacing="0" align="center">
<tr><td>
<? if ($list_href) { ?>
<a href="<?=$list_href?>"><img src="<?=$g4[path]?>/img/bbs/list_25.gif" border="0" /></a>
<? } ?>
<? if ($is_checkbox) { ?>
<span class="button black"><input type="button" value="선택삭제" onClick="select_delete();" ></span>
<span class="button black"><input type="button" value="선택복사" onClick="select_copy('copy');" ></span>
<span class="button black"><input type="button" value="선택이동" onClick="select_copy('move');" ></span>
<? } ?>
<? if ($admin_href) { ?><a href="<?=$admin_href?>">관리자</a><?}?>
</div>
</td>
<td>
<div style="float:right;">
<? if ($write_href) { ?><span class="button black"><input type="button" value="글쓰기" onClick="location.href='<?=$write_href?>'" ></span><? } ?>
</div>
</td>
</table>
<!-- 페이지 -->
<div class="paginate">
<? if ($prev_part_href) { echo "<a href='$prev_part_href'>이전</a>"; } ?>
<?=$write_pages?>
<? if ($next_part_href) { echo "<a href='$next_part_href'>다음</a>"; } ?>
</div>
<!-- 링크 버튼, 검색 -->
<div style="text-align:center;">
<form name=fsearch method=get style="margin:0px;">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=sca value="<?=$sca?>">
</form>
</div>
</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=500, height=550, scrollbars=1");
f.sw.value = sw;
f.target = "move";
f.action = "./move.php";
f.submit();
}
</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 type="text/css">
.field {border:1px solid #555;background:#40403B;color:white;padding-top:2px;}
.board_list{table-layout:fixed;border:1px #555 solid;}
.board_list th{height:27px;padding-top:3px;color:white;background:url("../../../img/HEAD_NOTICE_BG.gif");}
.board_list .left{padding:0;}
.board_list th{letter-spacing:-1;}
.board_list .list0{background:#000;}
.board_list .list1{background:#111;}
.paginate { padding:6px 0; text-align:center;}
.paginate *{ margin:0; padding:0;}
.paginate a,.paginate strong{ _position:relative; margin-left:-9px; font-weight:bold; display:inline-block; padding:3px 8px 1px 7px; color:white; border-left:1px solid #555; border-right:1px solid #555; text-decoration:none; line-height:normal; font:bold 12px 굴림, Gulim, 돋움, Dotum, AppleGothic, Sans-serif; background:#000;}
.paginate strong{ color:#575C76 !important;}
.paginate a:hover{ background:#3F4C6B; }
.paginate a.pre{ padding:3px 8px 1px 16px; background:url("") no-repeat 8px 6px !important; border:none; font-weight:normal; }
.paginate a.pre_end{ padding:3px 8px 1px 16px; background:url("") no-repeat 4px 6px !important; border:none; border-right:1px solid #555; font-weight:normal;}
.paginate a.next{ padding:3px 16px 1px 8px; background:url("") no-repeat 37px 6px !important; border:none; font-weight:normal; }
.paginate a.next_end{ padding:3px 16px 1px 8px; background:url("") no-repeat 37px 6px !important; border:none; border-left:1px solid #555; font-weight:normal;}
</style>
<!-- 게시판 목록 시작 -->
<table width="100%" align=center cellpadding=0 cellspacing=0><tr><td>
<!-- 제목 -->
<form name="fboardlist" method="post" style="margin:0;">
<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=<?=$width?> border=0 cellpadding=0 cellspacing=0 class="board_list" align="center">
<tr align=center>
<th width=60>번호</th>
<? if ($is_checkbox) { ?><th width=40><input onclick="if (this.checked) all_checked(true); else all_checked(false);" type=checkbox></th><?}?>
<th class="gray">제 목</th>
<th width=110>글쓴이</th>
<th width=100>날짜</th>
<th width=50>조회</th>
</tr>
</table>
<table width=<?=$width?> border=0 cellpadding=0 cellspacing=1 bgcolor="333333" class="board_list" align="center">
<col width="60">
<? if ($is_checkbox) { ?><col width="40"><?}?>
<col width="">
<col width="110">
<col width="100">
<col width="50">
<!-- 목록 -->
<? for ($i=0; $i<count($list); $i++) {
if ($list[$i][is_notice]) { // 공지사항
$num = "공지";
$background = "0";
}else if ($wr_id == $list[$i][wr_id]) // 현재위치
$num = "".($list[$i][num]+69127)."";
else{
$num = "".($list[$i][num]+69127)."";
$background = "1";
}
?>
<tr height=29 align=center class="list<?=$background?>">
<td width=60>
<?
$xmb = get_member($list[$i]['mb_id'],'mb_level');
$gicon = $g4['path']."/data/member/gicon".$xmb['mb_level'].".gif";
if( file_exists($gicon) )
{
$list[$i][name] = "<img src='".$gicon."' /> ".$list[$i][name]."";
}
// if($config['cf_admin'] == $list[$i]['mb_id']) $list[$i][name] = "<img src='$g4[path]/img/level9.gif' /> ".$list[$i][name]."";
echo $num;
?>
</td>
<? if ($is_checkbox) { ?><td width=40><input type=checkbox name=chk_wr_id[] value="<?=$list[$i][wr_id]?>"></td><? } ?>
<td align=left style='word-break:break-all;'>
<?
echo $nobr_begin;
echo $list[$i][reply];
echo $list[$i][icon_reply];
if ($is_category && $list[$i][ca_name]) {
echo "<span class=small><font color=gray>[<a href='{$list[$i][ca_name_href]}'>{$list[$i][ca_name]}</a>]</font></span> ";
}
$style = "";
if ($list[$i][is_notice]) $style = " style='font-weight:bold;'";
echo "<a href='{$list[$i][href]}' $style>";
if( $list[$i][wr_1] ) $list[$i][subject] .= " <img src='{$board_skin_path}/img/new_betting.png' align='absmiddle' border='0' alt='내역추가'/>";
if( $list[$i][wr_2] ) echo "<span style='color:{$list[$i][wr_2]};'> ".$list[$i][subject]."</span>";
else echo $list[$i][subject];
echo "</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>";
echo $nobr_end;
?>
</td>
<td align=left width=100><nobr style='display:block; overflow:hidden; width:105px;' class="bold"> <?=$list[$i][name]?></nobr></td>
<? if( !$list[$i][is_notice] ) { ?>
<td width="100"><?=$list[$i][datetime]?></td>
<td width="50" align="center"><?=$list[$i][wr_hit]?></td>
<?}else{ ?>
<td width=150 colspan="2"></td>
<? }?>
</tr>
<?}?>
<? if (count($list) == 0) { echo "<tr><td colspan='$colspan' height=100 align=center>게시물이 없습니다.</td></tr>"; } ?>
</table>
</form>
<br />
<table width="<?=$width?>" cellpadding="" cellspacing="0" align="center">
<tr><td>
<? if ($list_href) { ?>
<a href="<?=$list_href?>"><img src="<?=$g4[path]?>/img/bbs/list_25.gif" border="0" /></a>
<? } ?>
<? if ($is_checkbox) { ?>
<span class="button black"><input type="button" value="선택삭제" onClick="select_delete();" ></span>
<span class="button black"><input type="button" value="선택복사" onClick="select_copy('copy');" ></span>
<span class="button black"><input type="button" value="선택이동" onClick="select_copy('move');" ></span>
<? } ?>
<? if ($admin_href) { ?><a href="<?=$admin_href?>">관리자</a><?}?>
</div>
</td>
<td>
<div style="float:right;">
<? if ($write_href) { ?><span class="button black"><input type="button" value="글쓰기" onClick="location.href='<?=$write_href?>'" ></span><? } ?>
</div>
</td>
</table>
<!-- 페이지 -->
<div class="paginate">
<? if ($prev_part_href) { echo "<a href='$prev_part_href'>이전</a>"; } ?>
<?=$write_pages?>
<? if ($next_part_href) { echo "<a href='$next_part_href'>다음</a>"; } ?>
</div>
<!-- 링크 버튼, 검색 -->
<div style="text-align:center;">
<form name=fsearch method=get style="margin:0px;">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=sca value="<?=$sca?>">
</form>
</div>
</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=500, height=550, scrollbars=1");
f.sw.value = sw;
f.target = "move";
f.action = "./move.php";
f.submit();
}
</script>
<? } ?>
<!-- 게시판 목록 끝 -->
고수님들 도와주세요~~
실력이 미천하지라 생각처럼 안되네요 ㅡ..ㅡ
댓글 전체
글쓴이 사이드뷰 기능이 활성화 되어있다는 가정하에...
<td align=left width=100><nobr style='display:block; overflow:hidden; width:105px;' class="bold"> <?=$list[$i][name]?></nobr></td>
이 부분을...
<td align=left width=100>
<?
if(is_admin($list[$i][mb_id])) $list[$i][name] = str_replace("<span class='member'>","<span style='color:#ff0000;font-weight:bold'>",$list[$i][name]);
?>
<nobr style='display:block; overflow:hidden; width:105px;' class="bold"> <?=$list[$i][name]?></nobr></td>
이렇게 바꾸면 될것 같네요. 스킨 특성에 따라서 적용이 안될수도 있습니다...
<td align=left width=100><nobr style='display:block; overflow:hidden; width:105px;' class="bold"> <?=$list[$i][name]?></nobr></td>
이 부분을...
<td align=left width=100>
<?
if(is_admin($list[$i][mb_id])) $list[$i][name] = str_replace("<span class='member'>","<span style='color:#ff0000;font-weight:bold'>",$list[$i][name]);
?>
<nobr style='display:block; overflow:hidden; width:105px;' class="bold"> <?=$list[$i][name]?></nobr></td>
이렇게 바꾸면 될것 같네요. 스킨 특성에 따라서 적용이 안될수도 있습니다...

너무 너무 감사 드려요 한방에 해결 되었습니다,,^^