extend/level.extend.php 때문에 자동등록 방지코드가 액박입니다.
아래는 level.extend.php 입니다.
어떤 이유인지 모르나 자동등록 방지코드가 액박입니다.
사용하지 않을 때는 정상출력이 됩니다.
혹시 잘 못된 부분에 대해 지적해 주시면 감사하겠습니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
function get_member_level($mb_id,$mb_point) {
global $g4;
$is_admin = is_admin($mb_id);
$point = $mb_point;
$level = ceil($point / 275000); //반올림을 하여 레벨을 구함.
if($mb_id)if($level <= 1) $level = 1; // 위 반올림에서 렙1미만 회원에게 레벨1을 줌, (비회원은 0)
if ($level > 74) $level = 74; // 최대 레벨 설정
if($is_admin == 'super') $level = 75; //관리자는 최고 레벨
$no = sprintf("%03d", $level);
return "<img src='$g4[path]/img/level_img/{$no}.gif' align=absmiddle hspace=1 title='등급 {$level} / ".number_format($mb_point)."점'>";
}
//포인트 상태바
function exp_bar($mb_id,$mb_point,$option) {
global $g4;
$is_admin = is_admin($mb_id);
$point = $mb_point;
$level = ceil($point / 55000); //반올림을 하여 레벨을 구함.
if($mb_id)if($level <= 1){$level = 1;} // 반올림에서 렙1미만 회원에게 레벨1을 줌, (비회원은 0)
if ($level > 74){$level = 74;} //최대 레벨 설정
if($is_admin == 'super'){$level = 75;} //관리자는 최고 레벨
$no = sprintf("%03d", $level);
$max = $level * 55000;
if(!$level){$max=55000; $a_max=55000; $a_min=0;}else{$a_max = (int)($max / $level);$a_min = (int)($point - (55000 * ($level-1)));} //레벨이 없으면 최대값, 있으면 레벨에 맞는 최대값을 구함
if($is_admin == 'super'){$max=275000; $a_max=275000; $a_min=0;} //관리자는 기본세팅
$bar = (int)($a_min / $a_max * 100);
if($bar > 100) $bar = 0;
$graph = $bar."%"; //등급, 경험치바 표시
if($level == 0){$level = "--";} // 레벨값을 이용해 레벨대신 표시
//if($level == 75){$level = "75";} // 레벨값을 이용해 레벨대신 표시
if($option == 1){
echo "<table border='0' cellspacing='0' cellpadding='0'><tr><td><table width='62' border='0' cellspacing='0' cellpadding='0' background='$g4[path]/img/exp_bar.gif'><tr height='1'><td colspan='3'></td></tr><tr height='5'><td width='1'></td><td width='60'><img src='$g4[path]/img/exp_in.gif' width='$graph' height='5'></td><td width='1'></td></tr><tr height='1'><td colspan='3'></td></tr></table></td><td> <span style='color:#479b11; font-size:10px; font-family:돋음; vertical-align:1px;'><span style='font-size:11px;font-weight:bold;'>$level</span>-$graph</span><td></tr></table>";
}
}
function level_icon($mb_level) {
global $g4;
$tmp =($mb_lebel<10)? "00{$mb_lebel}.gif" : "0{$mb_lebel}.gif";
if($is_admin == 'super') $icon="$g4[path]/img/level_img/075.gif";
else $icon="$g4[path]/img/level_img/{$tmp}";
echo "<img src='$icon'> ";
}
?>
어떤 이유인지 모르나 자동등록 방지코드가 액박입니다.
사용하지 않을 때는 정상출력이 됩니다.
혹시 잘 못된 부분에 대해 지적해 주시면 감사하겠습니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
function get_member_level($mb_id,$mb_point) {
global $g4;
$is_admin = is_admin($mb_id);
$point = $mb_point;
$level = ceil($point / 275000); //반올림을 하여 레벨을 구함.
if($mb_id)if($level <= 1) $level = 1; // 위 반올림에서 렙1미만 회원에게 레벨1을 줌, (비회원은 0)
if ($level > 74) $level = 74; // 최대 레벨 설정
if($is_admin == 'super') $level = 75; //관리자는 최고 레벨
$no = sprintf("%03d", $level);
return "<img src='$g4[path]/img/level_img/{$no}.gif' align=absmiddle hspace=1 title='등급 {$level} / ".number_format($mb_point)."점'>";
}
//포인트 상태바
function exp_bar($mb_id,$mb_point,$option) {
global $g4;
$is_admin = is_admin($mb_id);
$point = $mb_point;
$level = ceil($point / 55000); //반올림을 하여 레벨을 구함.
if($mb_id)if($level <= 1){$level = 1;} // 반올림에서 렙1미만 회원에게 레벨1을 줌, (비회원은 0)
if ($level > 74){$level = 74;} //최대 레벨 설정
if($is_admin == 'super'){$level = 75;} //관리자는 최고 레벨
$no = sprintf("%03d", $level);
$max = $level * 55000;
if(!$level){$max=55000; $a_max=55000; $a_min=0;}else{$a_max = (int)($max / $level);$a_min = (int)($point - (55000 * ($level-1)));} //레벨이 없으면 최대값, 있으면 레벨에 맞는 최대값을 구함
if($is_admin == 'super'){$max=275000; $a_max=275000; $a_min=0;} //관리자는 기본세팅
$bar = (int)($a_min / $a_max * 100);
if($bar > 100) $bar = 0;
$graph = $bar."%"; //등급, 경험치바 표시
if($level == 0){$level = "--";} // 레벨값을 이용해 레벨대신 표시
//if($level == 75){$level = "75";} // 레벨값을 이용해 레벨대신 표시
if($option == 1){
echo "<table border='0' cellspacing='0' cellpadding='0'><tr><td><table width='62' border='0' cellspacing='0' cellpadding='0' background='$g4[path]/img/exp_bar.gif'><tr height='1'><td colspan='3'></td></tr><tr height='5'><td width='1'></td><td width='60'><img src='$g4[path]/img/exp_in.gif' width='$graph' height='5'></td><td width='1'></td></tr><tr height='1'><td colspan='3'></td></tr></table></td><td> <span style='color:#479b11; font-size:10px; font-family:돋음; vertical-align:1px;'><span style='font-size:11px;font-weight:bold;'>$level</span>-$graph</span><td></tr></table>";
}
}
function level_icon($mb_level) {
global $g4;
$tmp =($mb_lebel<10)? "00{$mb_lebel}.gif" : "0{$mb_lebel}.gif";
if($is_admin == 'super') $icon="$g4[path]/img/level_img/075.gif";
else $icon="$g4[path]/img/level_img/{$tmp}";
echo "<img src='$icon'> ";
}
?>
|
댓글을 작성하시려면 로그인이 필요합니다.
댓글 7개
처음 처음 이렇게 시작해야 하는데...
<?php
<?php <--- 이런식으로 빈칸을 있다면 ajax 연동시 빈칸을 인식하여 엑박이 나옵니다.. 저는 이게 원인있었습니다.. ^^
bbs/kcaptcha 파일 4개를 다 수정했으나 역시 액박입니다.
바깥쪽에 공백이 없어야 합니다.
공백 <?
공백 ?>
?>
위의 것도 문제가 되나요 ?