실시간 접속자 이름 질문좀 드립니다

실시간 접속자 이름 질문좀 드립니다

QA

실시간 접속자 이름 질문좀 드립니다

본문

실시간 접속자 아래의 스킨을 쓰는데요 별명이 나와야 하는데 이름이 자꾸 나오네요 어디를 어떻게 수정해야할까요? 초보라서 ㅜㅜ 쉽게 설명해주시면 감사드리겠습니다 답변좀 부탁드려요^^ ㅜㅜ
 
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
global $is_admin;
$color_1 = '#E8E7E5'; //외부 테두리 색
$color_2 = '#FCFCFC'; //배경 색
$color_3 = '#CACAFF'; //내부 테두리 색
$width_1 = '190'; //전체 테이블 크기
$width_2 = '178'; //내부 테이블 크기
$height_1 = '64'; //내부 테이블 높이

$list = array();
$sql = " select a.mb_id, b.mb_nick, b.mb_name, b.mb_email, b.mb_homepage, b.mb_open, b.mb_point, a.lo_ip, a.lo_location, a.lo_url
           from $g4[login_table] a left join $g4[member_table] b on (a.mb_id = b.mb_id)
          where a.mb_id <> '$config[cf_admin]'
          order by a.lo_datetime desc ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
    $list[$i] = $row;
    if ($row[mb_id])
        //$list[$i][name] = get_sideview($row[mb_id], $row[mb_nick], $row[mb_email], $row[mb_homepage]);
        $list[$i][name] = get_sideview($row[mb_id], cut_str($row[mb_nick], $config[cf_cut_name]), $row[mb_email], $row[mb_homepage]);
    else
    {
        if ($is_admin)
            $list[$i][name] = $row[lo_ip];
        else
            $list[$i][name] = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", "\\1.♡.\\3.\\4", $row[lo_ip]);
    }
    $list[$i][num] = sprintf("%03d",$i+1);
}

?>
<script>
 function hide_layer(url)
    {
        if (!url)
            url = g4_path + "/" + g4_bbs + "/memo_form.php?me_recv_mb_id=<?=$list[$i][mb_id]?>";
      win_open(url, "winMemo", "left=50,top=50,width=600,height=460,scrollbars=1");
      document.all["memo_pop"].style.visibility ="hidden"
    }
 function memowin(url)
    {
      url = g4_path + "/" + g4_bbs + "/memo_form.php?me_recv_mb_id="+url;
      win_open(url, "winMemo", "left=50,top=50,width=600,height=460,scrollbars=1");
    }
</script>
<script language="javascript" src="<?=$g4[path]?>/js/sideview.js"></script>
<style>
.tablebg { background-color:#DDDDDD; }
.subject { color:#315584; }
.subjectbg { background-color:#EFF3F7; }
.list { color:#222222; }
.list0 { background-color:#FFFFFF; }
.list1 { background-color:#F5F5F5; }
.ht { height:30px; }
</style>
 
<style type="text/css">
<!--
.co  { font-family:돋움; font-size: 8pt; color: #777777;}
.box  { font-family:돋움; font-size:9pt; color:#777777;  line-height: 12pt; }
.box2  { scrollbar-face-color: #f7f7f7; scrollbar-shadow-color: #f7f7f7; scrollbar-highlight-color: #f7f7f7; scrollbar-3dlight-color: #f7f7f7; scrollbar-darkshadow-color: #cccccc; scrollbar-track-color: #ffffff; scrollbar-arrow-color: #cccccc}
-->
</style>
<div style='height:5px;'></div>
<table cellpadding=0 cellspacing=1 bgcolor=<?=$color_1?> border=0>
<tr>
<td bgcolor=<?=$color_2?>>
<table width='<?=$width_1?>' cellpadding=0 cellspacing=0 border=0>
<tr>
 <td width='50%' height=29 style='padding-left:5px;'><img src='<?=$connect_skin_path?>/img/con_ti.gif' width=72 height=16 border=0 align='absmiddle'></td>
 <td width='50%' align=center style='padding-top:3px;' class='box'>
 <? if ($is_admin == "super") { ?>
       <a href='<?=$g4['bbs_path']?>/current_connect.php' onfocus='this.blur()' title='현재접속자'>on</a>
 <? } ?>
 </td>
</tr>
<tr>
 <td colspan=2 align=center>
 <table width='<?=$width_2?>' cellpadding=0 cellspacing=1 bgcolor=<?=$color_3?> border=0>
 <tr>
  <td height=<?=$height_1?> bgcolor=#FFFFFF class='box ' style='padding-top:3px; padding-left:5px;' background='<?=$connect_skin_path?>/img/back.jpg'>
        <div style="overflow-y:auto; width:100%;  height:<?=$height_1?>;" class='box2'>
<?
for ($i=0; $i<count($list); $i++) {
$sv_name = get_sideview($list[$i][mb_id], $list[$i][mb_name], $list[$i][mb_email], $list[$i][mb_homepage]);
    echo <<<HEREDOC
        <div> {$sv_name} {$list[$i][mb_id]} </div>
HEREDOC;
}
if ($i == 0)
    echo "<div align=center height=100%>현재 접속자가 없습니다.</div>";
?>
</div></td>
 </tr>
 </table></td>
</tr>
<tr>
 <td colspan=2 height=23 align=right style='padding-top:4px; padding-right:10px;' class='box'>
 접속자 <?=$row2['total_cnt']?>명 <span class=co>(M:<?=$row2['mb_cnt']?> / G:<?=$row2['total_cnt'] - $row2['mb_cnt']?>)</span></td>
</tr>
</table></td>
</tr>
</table>
 

이 질문에 댓글 쓰기 :

답변 4

$sv_name = get_sideview($list[$i][mb_id], $list[$i][mb_name], $list[$i][mb_email], $list[$i][mb_homepage]);
에서
$list[$i][mb_name]를   $list[$i][mb_nick] 으로 바꾸면 될꺼 같은데
체크해볼수 잇는 상황은 아닌지라.. 한번 테스트해보세요.
 
답변을 작성하시기 전에 로그인 해주세요.
전체 123,517 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT