묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
레벨이 10일때 그룹아이콘 안보이게..
2003.01.31 10:41
제가.. 혼자 소스 이리저리 해서..
그룹아이콘이.. 딴 그룹에서도 보이게 했는데..
레벨이 10일 경우는.. 블릭리스트가 되서..
레벨아이콘이며 전부 바껴서..
그렇게 할려고 합니다.
래밸이 10일때는 그룹아이콘이 안나오게.. 어떡해 안되나요?
// 이름 앞에 붙는 얼굴 아이콘
function get_face($data, $check=0) {
global $group;
if(!$connect) $connect=dbconn();
// 이름앞에 붙는 아이콘 정의;;
if($group[use_icon]==0) {
if($data[ismember]) {
$level_temp=mysql_fetch_row(mysql_query("select level from zetyx_member_table where no={$data[ismember]}"));
$level=$level_temp[0];
if($level==10) $face_image="<img src=images/admin10_face.gif border=0 align=absmiddle>";
elseif($level==9) $face_image="<img src=images/admin9_face.gif border=0 align=absmiddle>";
elseif($level==8) $face_image="<img src=images/admin8_face.gif border=0 align=absmiddle>";
elseif($level==7) $face_image="<img src=images/admin7_face.gif border=0 align=absmiddle>";
elseif($level==6) $face_image="<img src=images/admin6_face.gif border=0 align=absmiddle>";
elseif($level==5) $face_image="<img src=images/admin5_face.gif border=0 align=absmiddle>";
elseif($level==4) $face_image="<img src=images/admin4_face.gif border=0 align=absmiddle>";
elseif($level==3) $face_image="<img src=images/admin3_face.gif border=0 align=absmiddle>";
elseif($level==2) $face_image="<img src=images/admin3_face.gif border=0 align=absmiddle>";
elseif($level==1) $face_image="";
$group_temp=mysql_fetch_row(mysql_query("select group_no from zetyx_member_table where no={$data[ismember]}"));
$group_no=$group_temp[0];
if($group_no==1) $face_image="".$face_image;
elseif($group_no==2) $face_image="".$face_image;
elseif($group_no==3) $face_image="<img src=icon/group_gryffindor.gif border=0 align=absmiddle>".$face_image;
elseif($group_no==4) $face_image="<img src=icon/group_hufflepuff.gif border=0 align=absmiddle>".$face_image;
elseif($group_no==5) $face_image="<img src=icon/group_ravenclaw.gif border=0 align=absmiddle>".$face_image;
elseif($group_no==6) $face_image="<img src=icon/group_slytherin.gif border=0 align=absmiddle>".$face_image;
}
else $face_image="<img src=images/blank_face.gif border=0 align=absmiddle>";
}
$temp_name = get_private_icon($data[ismember], "1");
if($temp_name) $face_image="<img src='$temp_name' border=0 align=absmiddle>";
if($group[use_icon]<2&&$data[ismember]) $face_image .= "";
//if($data[ismember]&&$data[parent]) $face_image="<b>";
//elseif($data[parent]) $face_image="";
return $face_image;
}
여기서 보시면..
DB를 두번 불래내요 -_-
위에껀 레벨아이콘.. 밑에껀 그룹아이콘요..
레벨이 10일땐 그룹아이콘이 안보이게 하려면 어떡해 하나요 ;;
그룹아이콘이.. 딴 그룹에서도 보이게 했는데..
레벨이 10일 경우는.. 블릭리스트가 되서..
레벨아이콘이며 전부 바껴서..
그렇게 할려고 합니다.
래밸이 10일때는 그룹아이콘이 안나오게.. 어떡해 안되나요?
// 이름 앞에 붙는 얼굴 아이콘
function get_face($data, $check=0) {
global $group;
if(!$connect) $connect=dbconn();
// 이름앞에 붙는 아이콘 정의;;
if($group[use_icon]==0) {
if($data[ismember]) {
$level_temp=mysql_fetch_row(mysql_query("select level from zetyx_member_table where no={$data[ismember]}"));
$level=$level_temp[0];
if($level==10) $face_image="<img src=images/admin10_face.gif border=0 align=absmiddle>";
elseif($level==9) $face_image="<img src=images/admin9_face.gif border=0 align=absmiddle>";
elseif($level==8) $face_image="<img src=images/admin8_face.gif border=0 align=absmiddle>";
elseif($level==7) $face_image="<img src=images/admin7_face.gif border=0 align=absmiddle>";
elseif($level==6) $face_image="<img src=images/admin6_face.gif border=0 align=absmiddle>";
elseif($level==5) $face_image="<img src=images/admin5_face.gif border=0 align=absmiddle>";
elseif($level==4) $face_image="<img src=images/admin4_face.gif border=0 align=absmiddle>";
elseif($level==3) $face_image="<img src=images/admin3_face.gif border=0 align=absmiddle>";
elseif($level==2) $face_image="<img src=images/admin3_face.gif border=0 align=absmiddle>";
elseif($level==1) $face_image="";
$group_temp=mysql_fetch_row(mysql_query("select group_no from zetyx_member_table where no={$data[ismember]}"));
$group_no=$group_temp[0];
if($group_no==1) $face_image="".$face_image;
elseif($group_no==2) $face_image="".$face_image;
elseif($group_no==3) $face_image="<img src=icon/group_gryffindor.gif border=0 align=absmiddle>".$face_image;
elseif($group_no==4) $face_image="<img src=icon/group_hufflepuff.gif border=0 align=absmiddle>".$face_image;
elseif($group_no==5) $face_image="<img src=icon/group_ravenclaw.gif border=0 align=absmiddle>".$face_image;
elseif($group_no==6) $face_image="<img src=icon/group_slytherin.gif border=0 align=absmiddle>".$face_image;
}
else $face_image="<img src=images/blank_face.gif border=0 align=absmiddle>";
}
$temp_name = get_private_icon($data[ismember], "1");
if($temp_name) $face_image="<img src='$temp_name' border=0 align=absmiddle>";
if($group[use_icon]<2&&$data[ismember]) $face_image .= "";
//if($data[ismember]&&$data[parent]) $face_image="<b>";
//elseif($data[parent]) $face_image="";
return $face_image;
}
여기서 보시면..
DB를 두번 불래내요 -_-
위에껀 레벨아이콘.. 밑에껀 그룹아이콘요..
레벨이 10일땐 그룹아이콘이 안보이게 하려면 어떡해 하나요 ;;
elseif($group_no==2 and $level != 10) $face_image="".$face_image;
...............
elseif($group_no==6 and $level != 10) $face_image="<img src=icon/group_slytherin.gif border=0 align=absmiddle>".$face_image;
이렇게 if문마다 and $level != 10를 추가해 주세요.