관리자만 사이드뷰 보이게 할수있나요? 정보
관리자만 사이드뷰 보이게 할수있나요?본문
관리자만 사이드뷰 보이게 할수있나요?ㅠㅠ
아니면 관리자만 아이콘 보여지게요..ㅠㅠ
여기를 어떻게 하면될것같은데..ㅠㅠ
function get_sideview($mb_id, $name="", $email="", $homepage="")
{
global $config;
global $g4;
$email = base64_encode($email);
$homepage = set_http($homepage);
$name = preg_replace("/\'/", "", $name);
$name = preg_replace("/\'/", "", $name);
$name = preg_replace("/\"/", """, $name);
$title_name = $name;
if ($mb_id) {
$tmp_name = "<span class='member'>$name</span>";
if ($config['cf_use_member_icon']) {
$mb_dir = substr($mb_id,0,2);
$icon_file = "$g4[path]/data/member/$mb_dir/$mb_id.gif";
//if (file_exists($icon_file) && is_file($icon_file)) {
if (file_exists($icon_file)) {
//$size = getimagesize($icon_file);
//$width = $size[0];
//$height = $size[1];
$width = $config['cf_member_icon_width'];
$height = $config['cf_member_icon_height'];
$tmp_name = "<img src='$icon_file' width='$width' height='$height' align='absmiddle' border='0'>";
if ($config['cf_use_member_icon'] == 2) // 회원아이콘+이름
$tmp_name = $tmp_name . " <span class='member'>$name</span>";
}
}
$title_mb_id = "[$mb_id]";
} else {
$tmp_name = "<span class='guest'>$name</span>";
$title_mb_id = "[비회원]";
}
return "<a href=\"javascript:;\" onClick=\"showSideView(this, '$mb_id', '$name', '$email', '$homepage');\" title=\"{$title_mb_id}{$title_name}\">$tmp_name</a>";
}
아니면 관리자만 아이콘 보여지게요..ㅠㅠ
여기를 어떻게 하면될것같은데..ㅠㅠ
function get_sideview($mb_id, $name="", $email="", $homepage="")
{
global $config;
global $g4;
$email = base64_encode($email);
$homepage = set_http($homepage);
$name = preg_replace("/\'/", "", $name);
$name = preg_replace("/\'/", "", $name);
$name = preg_replace("/\"/", """, $name);
$title_name = $name;
if ($mb_id) {
$tmp_name = "<span class='member'>$name</span>";
if ($config['cf_use_member_icon']) {
$mb_dir = substr($mb_id,0,2);
$icon_file = "$g4[path]/data/member/$mb_dir/$mb_id.gif";
//if (file_exists($icon_file) && is_file($icon_file)) {
if (file_exists($icon_file)) {
//$size = getimagesize($icon_file);
//$width = $size[0];
//$height = $size[1];
$width = $config['cf_member_icon_width'];
$height = $config['cf_member_icon_height'];
$tmp_name = "<img src='$icon_file' width='$width' height='$height' align='absmiddle' border='0'>";
if ($config['cf_use_member_icon'] == 2) // 회원아이콘+이름
$tmp_name = $tmp_name . " <span class='member'>$name</span>";
}
}
$title_mb_id = "[$mb_id]";
} else {
$tmp_name = "<span class='guest'>$name</span>";
$title_mb_id = "[비회원]";
}
return "<a href=\"javascript:;\" onClick=\"showSideView(this, '$mb_id', '$name', '$email', '$homepage');\" title=\"{$title_mb_id}{$title_name}\">$tmp_name</a>";
}
댓글 전체

function get_sideview($mb_id, $name="", $email="", $homepage="")
{
global $config;
global $g4, $is_admin;
if( empty( $is_admin) return '';
...
..
.
{
global $config;
global $g4, $is_admin;
if( empty( $is_admin) return '';
...
..
.
해결했습니다.
if ($board['bo_use_sideview'])
$list['name'] = get_sideview($list['mb_id'], $tmp_name, $list['wr_email'], $list['wr_homepage']);
else
if ($list['mb_id'] == "admin") $admin_icon = "<img src='$g4[path]/data/member/ad/admin.gif' align='absmiddle' border='0'> ";
$list['name'] = "<span class='".($list['mb_id']?'member':'guest')."'>$admin_icon$tmp_name</span>";
if ($board['bo_use_sideview'])
$list['name'] = get_sideview($list['mb_id'], $tmp_name, $list['wr_email'], $list['wr_homepage']);
else
if ($list['mb_id'] == "admin") $admin_icon = "<img src='$g4[path]/data/member/ad/admin.gif' align='absmiddle' border='0'> ";
$list['name'] = "<span class='".($list['mb_id']?'member':'guest')."'>$admin_icon$tmp_name</span>";
이럼 사이트 뷰 체크 안해도 관리자만 아이콘이 나와요..
관리자 아이콘 표시.
사이드뷰 해제해도
사이드뷰 해제해도