아 왜이런지 모르겟어요 도움좀 부탁드립니다. 정보
아 왜이런지 모르겟어요 도움좀 부탁드립니다.
본문
아래는 하나의 화일입니다.
중간부분에 안되는부분은 주석처리햇어요......왜 그럴까요 ;;;;;;;;
<?
include_once("_common.php");
include_once("$g4[path]/lib/popular.lib.php");
$rankday = date("md"); //오늘 날짜(월일)
$sql_common = " from $g4[member_table] ";
$sql_where = " where mb_id <> '$config[cf_admin]' and mb_level > 1 and mb_leave_date = '' and mb_intercept_date = '' ";
$sql_order = " order by mb_point desc";
$sql = "select sum(mb_point) as total_point
$sql_common
$sql_where";
$row = sql_fetch($sql);
$total_point = number_format($row[total_point]);
$sql = "select count(*) as cnt
$sql_common
$sql_where
and mb_point > '$member[mb_point]'";
$row = sql_fetch($sql);
$my_rank = $row[cnt] + 1;
$sql = "select count(*) as cnt
$sql_common
$sql_where";
$row = sql_fetch($sql);
$total_count = $row[cnt];
$page = "";
$rows = 10;
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if (!$page) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = "select mb_id, mb_name, mb_nick, mb_email, mb_homepage, mb_point, mb_old_rank , mb_rank_gap
$sql_common
$sql_where
$sql_order
limit $from_record, $rows";
$qry = sql_query($sql);
$list = array();
for ($i=0; $row=sql_fetch_array($qry); $i++) {
$list[$i][rank] = number_format((($page - 1) * $rows) + $i + 1);
$list[$i][name] = get_sideview($row[mb_id], $row[mb_name], $row[mb_nick]);
$list[$i][point] = number_format($row[mb_point]);//총 적립 포인트
$list[$i][oldrank] = $row[mb_old_rank];
$list[$i][id] = $row[mb_id];
$list[$i][rankgap] = $row[mb_rank_gap];
}
$list_count = sizeof($list);
?>
<table border=0 cellpadding=0 cellspacing=0>
<? for ($i=0; $i<$list_count; $i++) { ?>
<? if (!is_array($list[$i])) continue; ?>
<? $rank_gap = $list[$i][oldrank] - $list[$i][rank]; ?>
<tr><td width=12 rowspan=4 height=44 align=center><img src="../img/rank-<?=sprintf("%02d", $i+1)?>.gif"></td>
<td width=54 rowspan=4 align=center>
<!--왜 안나올가요?;;;;;;;;;;;;-->
<!--회원사진 불러오기 시작-->
<?
$mb_dir2 = "$list[$i][id]";
$photo_file2 = "../memberimg/$mb_dir2.jpg";
if (file_exists($photo_file2)) {
echo "<img src='$photo_file2' align=absmiddle width=30 height=30 class=tx>"; //여기는 인식 못하는것 같음
}else{
echo "<img src='../img/noimg.gif' align=absmiddle width=30 height=30 class=tx>"; //이 부분만 나옴......;;;;
} ?>
<!--회원사진 불러오기 끝-->
<img src=../memberimg/<?=$list[$i][id]?>.jpg><!--회원사진 불러오기 이렇게하면 나오는데 위에처럼하면 안나오네요 ;-->
<!------------------------------------------------------------------------------------------------------------->
</td><td width=113 height=8></td></tr><tr><td height=14><?=$list[$i][name]?></td></tr>
<tr><td height=14>P : <font color=#ab0007><span style=font-size:11;><?=$list[$i][point]?></font></span>
<? if ($list[$i][rankgap] == 0){
$rankimg = nogap; }
elseif ($list[$i][rankgap] > 0) {
$rankimg = up; }
else
$rankimg = down ;
?>
<img src="../img/rank-<?=$rankimg?>.gif" align=absmiddle>
<? if ($list[$i][icon] != "new" && $list[$i][icon] != "nogap") { echo abs($list[$i][rankgap]); }?>
</td></tr><tr><td height=8></td>
<? if($config['cf_9'] != $rankday) { //하루에 한번씩만 순위검사
sql_query("update g4_member set mb_old_rank = '{$list[$i][rank]}',mb_rank_gap = '$rank_gap' where mb_id='{$list[$i][id]}'");
//여분필드10에 오늘날짜를 입력하여 하루에 한번씩만 실행되게^^
sql_query(" update {$g4['config_table']} set cf_9 = '{$rankhday}' ");
} ?>
</tr>
<? } ?>
</table>
<script type="text/javascript">
var phtime = null;
var kstime = null;
var d = 2000;
sl = document.getElementById("mw-scroll-layer");
ks = document.getElementById("mw-popular-scroll");
ph = document.getElementById("mw-popular-hidden");
ks.style.top = "0px";
function keyword_scroll() {
if (phtime) {
clearTimeout(phtime);
ph.style.display = "none";
phtime = null;
}
var h = 25;
var t = <?=$pop_cnt?>;
var kst = parseInt(ks.style.top) - 1;
ks.style.top = kst + "px";
if (kst <= (((h * t)-10) * -1)) {
kst = 20;
ks.style.top = kst + "px";
} else {
ks.style.top = kst + "px";
}
if (kst % h == 0) {
kstime = setTimeout("keyword_scroll()", d);
} else {
kstime = setTimeout("keyword_scroll()", 10);
}
}
function keyword_layer() {
clearTimeout(kstime);
clearTimeout(phtime);
kstime = phtime = null;
ph.style.display = "block";
ph.style.top = get_top_pos(sl);
}
function keyword_layer_on() {
clearTimeout(phtime);
clearTimeout(kstime);
kstime = phtime = null;
}
function keyword_layer_out() {
phtime = setTimeout("keyword_scroll()", 100);
}
setTimeout("keyword_scroll()", d);
ks.onmouseover = function() { keyword_layer(); }
ks.onmouseout = function() { keyword_layer_out(); }
ph.onmouseover = function() { keyword_layer_on(); }
ph.onmouseout = function() { keyword_layer_out(); }
</script>
중간부분에 안되는부분은 주석처리햇어요......왜 그럴까요 ;;;;;;;;
<?
include_once("_common.php");
include_once("$g4[path]/lib/popular.lib.php");
$rankday = date("md"); //오늘 날짜(월일)
$sql_common = " from $g4[member_table] ";
$sql_where = " where mb_id <> '$config[cf_admin]' and mb_level > 1 and mb_leave_date = '' and mb_intercept_date = '' ";
$sql_order = " order by mb_point desc";
$sql = "select sum(mb_point) as total_point
$sql_common
$sql_where";
$row = sql_fetch($sql);
$total_point = number_format($row[total_point]);
$sql = "select count(*) as cnt
$sql_common
$sql_where
and mb_point > '$member[mb_point]'";
$row = sql_fetch($sql);
$my_rank = $row[cnt] + 1;
$sql = "select count(*) as cnt
$sql_common
$sql_where";
$row = sql_fetch($sql);
$total_count = $row[cnt];
$page = "";
$rows = 10;
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if (!$page) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = "select mb_id, mb_name, mb_nick, mb_email, mb_homepage, mb_point, mb_old_rank , mb_rank_gap
$sql_common
$sql_where
$sql_order
limit $from_record, $rows";
$qry = sql_query($sql);
$list = array();
for ($i=0; $row=sql_fetch_array($qry); $i++) {
$list[$i][rank] = number_format((($page - 1) * $rows) + $i + 1);
$list[$i][name] = get_sideview($row[mb_id], $row[mb_name], $row[mb_nick]);
$list[$i][point] = number_format($row[mb_point]);//총 적립 포인트
$list[$i][oldrank] = $row[mb_old_rank];
$list[$i][id] = $row[mb_id];
$list[$i][rankgap] = $row[mb_rank_gap];
}
$list_count = sizeof($list);
?>
<table border=0 cellpadding=0 cellspacing=0>
<? for ($i=0; $i<$list_count; $i++) { ?>
<? if (!is_array($list[$i])) continue; ?>
<? $rank_gap = $list[$i][oldrank] - $list[$i][rank]; ?>
<tr><td width=12 rowspan=4 height=44 align=center><img src="../img/rank-<?=sprintf("%02d", $i+1)?>.gif"></td>
<td width=54 rowspan=4 align=center>
<!--왜 안나올가요?;;;;;;;;;;;;-->
<!--회원사진 불러오기 시작-->
<?
$mb_dir2 = "$list[$i][id]";
$photo_file2 = "../memberimg/$mb_dir2.jpg";
if (file_exists($photo_file2)) {
echo "<img src='$photo_file2' align=absmiddle width=30 height=30 class=tx>"; //여기는 인식 못하는것 같음
}else{
echo "<img src='../img/noimg.gif' align=absmiddle width=30 height=30 class=tx>"; //이 부분만 나옴......;;;;
} ?>
<!--회원사진 불러오기 끝-->
<img src=../memberimg/<?=$list[$i][id]?>.jpg><!--회원사진 불러오기 이렇게하면 나오는데 위에처럼하면 안나오네요 ;-->
<!------------------------------------------------------------------------------------------------------------->
</td><td width=113 height=8></td></tr><tr><td height=14><?=$list[$i][name]?></td></tr>
<tr><td height=14>P : <font color=#ab0007><span style=font-size:11;><?=$list[$i][point]?></font></span>
<? if ($list[$i][rankgap] == 0){
$rankimg = nogap; }
elseif ($list[$i][rankgap] > 0) {
$rankimg = up; }
else
$rankimg = down ;
?>
<img src="../img/rank-<?=$rankimg?>.gif" align=absmiddle>
<? if ($list[$i][icon] != "new" && $list[$i][icon] != "nogap") { echo abs($list[$i][rankgap]); }?>
</td></tr><tr><td height=8></td>
<? if($config['cf_9'] != $rankday) { //하루에 한번씩만 순위검사
sql_query("update g4_member set mb_old_rank = '{$list[$i][rank]}',mb_rank_gap = '$rank_gap' where mb_id='{$list[$i][id]}'");
//여분필드10에 오늘날짜를 입력하여 하루에 한번씩만 실행되게^^
sql_query(" update {$g4['config_table']} set cf_9 = '{$rankhday}' ");
} ?>
</tr>
<? } ?>
</table>
<script type="text/javascript">
var phtime = null;
var kstime = null;
var d = 2000;
sl = document.getElementById("mw-scroll-layer");
ks = document.getElementById("mw-popular-scroll");
ph = document.getElementById("mw-popular-hidden");
ks.style.top = "0px";
function keyword_scroll() {
if (phtime) {
clearTimeout(phtime);
ph.style.display = "none";
phtime = null;
}
var h = 25;
var t = <?=$pop_cnt?>;
var kst = parseInt(ks.style.top) - 1;
ks.style.top = kst + "px";
if (kst <= (((h * t)-10) * -1)) {
kst = 20;
ks.style.top = kst + "px";
} else {
ks.style.top = kst + "px";
}
if (kst % h == 0) {
kstime = setTimeout("keyword_scroll()", d);
} else {
kstime = setTimeout("keyword_scroll()", 10);
}
}
function keyword_layer() {
clearTimeout(kstime);
clearTimeout(phtime);
kstime = phtime = null;
ph.style.display = "block";
ph.style.top = get_top_pos(sl);
}
function keyword_layer_on() {
clearTimeout(phtime);
clearTimeout(kstime);
kstime = phtime = null;
}
function keyword_layer_out() {
phtime = setTimeout("keyword_scroll()", 100);
}
setTimeout("keyword_scroll()", d);
ks.onmouseover = function() { keyword_layer(); }
ks.onmouseout = function() { keyword_layer_out(); }
ph.onmouseover = function() { keyword_layer_on(); }
ph.onmouseout = function() { keyword_layer_out(); }
</script>
댓글 전체
echo "<img src=".$photo_file2." align=absmiddle width=30 height=30 class=tx>";
이렇게 바꿔 보세요.
이렇게 바꿔 보세요.

안되네요 ㅡㅜ 왜 이럴까요 ;;;;;

$mb_dir2 = "$list[$i][id]";
를 다음처럼 바꿔보세요.
$mb_dir2 = $list[$i]['id'];
를 다음처럼 바꿔보세요.
$mb_dir2 = $list[$i]['id'];

안되네요 ;;;;;; 희안하네요 ;;;;

전 잘되는데요? ^^;