추천인의 정보 검색

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!
추천인의 정보 검색

QA

추천인의 정보 검색

본문

https://sir.kr/g5_tip/2453

 

여기추천인의 하위 단계별 추천 리스트를 수정 하려고 하는데,

실행에 오류가 있습니다. 자꾸 바꾸는데도 안되네요. 페이지 로딩이 안되는데, 혹시 어디 부분을 더 손봐야 하나요? 

 

기존 소스


<?
include_once("./_common.php");
include_once("./_head.php");
if (!$member[mb_id]) {
alert("회원만 볼 수 있습니다.");
} else { //회원만 보게...
?>
<style type="text/css">
<!--
.small {font-family:돋움;font-size:8pt;}
.Rnum { font-family:돋움;font-size:8pt;color:coral;font-weight:bold; }
-->
</style>
<?
echo "<div style='margin:0 0 10 0;'>";
echo "<a href='$g5[path]/member_group.php'><b>:: 내 그룹</b></a>";
if ($mbrecommend) {
$profileRc = get_member("$mbrecommend");
echo " >> <b>$profileRc[mb_name]</b>($profileRc[mb_nick], $profileRc[mb_id])님의 하위그룹입니다.";
                  }
echo "<p>※ <span class='Rnum'>(숫자)</span>를 클릭하면 하위그룹으로 이동합니다. (현재 페이지당 2대까지 보임)";
echo "<table width=100% cellpadding=2 cellspacing=1 border=0 bgcolor=#bbbbbb>";
echo "<colgroup><colgroup><colgroup><colgroup><colgroup><colgroup width=50><colgroup width=50>";
echo "<tr bgcolor=#dddddd align=center><td width=10><td class='small'>아이디<td class='small'>이름<td><td class='small'>연락처";
echo "<td class='small'>최종접속<td class='small'>가입날짜";
 
if ($mbrecommend == "") { $memberid = $member[mb_id]; } else { $memberid = $mbrecommend; }
 
$sql = " select
mb_id, mb_name, mb_email, mb_homepage, mb_open, mb_recommend from $g5[member_table]
where mb_recommend = '$memberid' and mb_level >= '2' order by mb_datetime desc ";
$result = sql_query($sql);
 
if(_num_rows($result)>0) {
 
for ($i=0,$j=1; $row=mysql_fetch_array($result); $i++,$j++) {
$tmp_id = $row[mb_id];
$profile = get_member("$tmp_id");
 
$sqlRnum = "select count(*) as Rnum from $g5[member_table] where mb_recommend = '$tmp_id' and mb_level >= '2'";
$rowRnum = sql_fetch($sqlRnum);
 
echo "<tr bgcolor=#eeeeee align=center>";
echo "<td class='small'>$j";
echo "<td class='small'>$profile[mb_id]";
echo "<td><b>$profile[mb_name]</b>($profile[mb_nick])";
if ($profile[mb_level] >= 4) { echo "<span style='color:red;'>★</span>"; }
echo "<td><a href='$g5[path]/member_group.php?mbrecommend=$profile[mb_id]'><span class='Rnum'>($rowRnum[Rnum])</span></a>";
echo "<td class='small'>";
if ($profile[mb_hp]) { echo "$profile[mb_hp]"; }
if ($profile[mb_tel]) { echo "<br />$profile[mb_tel]"; }
if ($profile[mb_email]) { echo "<br />$profile[mb_email]"; }
echo "<td class='small'>$profile[mb_today_login]";
echo "<td class='small'>$profile[mb_datetime]";
 
$sql2 = "select
mb_id, mb_name, mb_email, mb_homepage, mb_open, mb_recommend from $g5[member_table]
where mb_recommend = '$tmp_id' and mb_level >= '2' order by mb_datetime desc ";
$result2 = sql_query($sql2);
 
if(_num_rows($result2)>0) {
 
echo "<tr><td colspan=10 style='padding:5 5 10 5;background:#ffffff;'>";
echo "<table width=98% cellpadding=2 cellspacing=1 border=0 bgcolor=#cccccc align=right>";
echo "<colgroup><colgroup><colgroup><colgroup><colgroup><colgroup width=80><colgroup width=80>";
echo "<tr bgcolor=#dddddd align=center><td width=10><td class='small'>아이디<td class='small'>이름<td><td class='small'>연락처";
echo "<td class='small'>최종접속<td class='small'>가입날짜";
 
for ($k=0,$l=1; $row2=mysql_fetch_array($result2); $k++,$l++) {
$tmp2_id = $row2[mb_id];
$profile2 = get_member("$tmp2_id");
 
$sqlRnum2 = "select count(*) as Rnum2 from $g5[member_table] where mb_recommend = '$tmp2_id' and mb_level >= '2'";
$rowRnum2 = sql_fetch($sqlRnum2);
 
echo "<tr bgcolor=#eeeeee align=center>";
echo "<td class='small'>$l";
echo "<td class='small'>$profile2[mb_id]";
echo "<td><b>$profile2[mb_name]</b>($profile2[mb_nick])";
if ($profile2[mb_level] >= 4) { echo "<span style='color:red;'>★</span>"; }
echo "<td><a href='$g5[path]/member_group.php?mbrecommend=$profile2[mb_id]'><span class='Rnum'>($rowRnum2[Rnum2])</span></a>";
echo "<td class='small'>";
if ($profile[mb_hp]) { echo "$profile[mb_hp]"; }
if ($profile[mb_tel]) { echo "<br />$profile[mb_tel]"; }
if ($profile[mb_email]) { echo "<br />$profile[mb_email]"; }
echo "<td class='small'>$profile2[mb_today_login]";
echo "<td class='small'>$profile2[mb_datetime]";
}
echo "</table>";
}
 
} }
echo "</table>";
echo "</div>";

 
} //회원만 보게...
include_once("./_tail.php");
?>

 

수정한 부분은 

- $ 안에 [' '] 작은 따움표 추가 

- echo 링크 $g5[path]  => ".G5_BBS_URL." 변경

 echo "<td><a href='$g5[path]/member_group.php?mbrecommend=$profile[mb_id]'><span class='Rnum'>($rowRnum[Rnum])</span></a>";

=>

echo "<td><a href='".G5_BBS_URL."/member_group.php?mb_recommend=$profile[mb_id]'><span class='Rnum'>($rowRnum[Rnum])</span></a>";

- mbrecommend => mb_recommend

- $memberid => $member_id

 


<?
include_once("./_common.php");
include_once("./_head.php");
if (!$member['mb_id']) {
alert("회원만 볼 수 있습니다.");
} else { //회원만 보게...
?>
<style type="text/css">
<!--
.small {font-family:돋움;font-size:8pt;}
.Rnum { font-family:돋움;font-size:8pt;color:coral;font-weight:bold; }
-->
</style>
<?
echo "<div style='margin:0 0 10 0;'>";
echo "<a href=".G5_BBS_URL."/member_group.php'><b>:: 내 그룹</b></a>";
if ($mb_recommend) {
$profileRc = get_member("$mb_recommend");
echo " >> <b>$profileRc['mb_name']</b>($profileRc['mb_nick'], $profileRc['mb_id'])님의 하위그룹입니다.";
                  }
echo "<p>※ <span class='Rnum'>(숫자)</span>를 클릭하면 하위그룹으로 이동합니다. (현재 페이지당 2대까지 보임)";
echo "<table width=100% cellpadding=2 cellspacing=1 border=0 bgcolor=#bbbbbb>";
echo "<colgroup><colgroup><colgroup><colgroup><colgroup><colgroup width=50><colgroup width=50>";
echo "<tr bgcolor=#dddddd align=center><td width=10><td class='small'>아이디<td class='small'>이름<td><td class='small'>연락처";
echo "<td class='small'>최종접속<td class='small'>가입날짜";
 
if ($mb_recommend == "") { $member_id = $member['mb_id']; } else { $member_id = $mb_recommend; }
 
$sql = " select
mb_id, mb_name, mb_email, mb_homepage, mb_open, mb_recommend from $g5['member_table']
where mb_recommend = '$member_id' and mb_level >= '2' order by mb_datetime desc ";
$result = sql_query($sql);
 
if(_num_rows($result)>0) {
 
for ($i=0,$j=1; $row=mysql_fetch_array($result); $i++,$j++) {
$tmp_id = $row[mb_id];
$profile = get_member("$tmp_id");
 
$sqlRnum = "select count(*) as Rnum from $g5['member_table'] where mb_recommend = '$tmp_id' and mb_level >= '2'";
$rowRnum = sql_fetch($sqlRnum);
 
echo "<tr bgcolor=#eeeeee align=center>";
echo "<td class='small'>$j";
echo "<td class='small'>$profile['mb_id']";
echo "<td><b>$profile['mb_name']</b>($profile['mb_nick'])";
if ($profile['mb_level'] >= 4) { echo "<span style='color:red;'>★</span>"; }
echo "<td><a href='".G5_BBS_URL."/member_group.php?mb_recommend=$profile['mb_id']'><span class='Rnum'>($rowRnum['Rnum'])</span></a>";
echo "<td class='small'>";
if ($profile[mb_hp]) { echo "$profile['mb_hp']"; }
if ($profile[mb_tel]) { echo "<br />$profile['mb_tel']"; }
if ($profile[mb_email]) { echo "<br />$profile['mb_email']"; }
echo "<td class='small'>$profile['mb_today_login']";
echo "<td class='small'>$profile['mb_datetime']";
 
$sql2 = "select
mb_id, mb_name, mb_email, mb_homepage, mb_open, mb_recommend from $g5['member_table']
where mb_recommend = '$tmp_id' and mb_level >= '2' order by mb_datetime desc ";
$result2 = sql_query($sql2);
 
if(_num_rows($result2)>0) {
 
echo "<tr><td colspan=10 style='padding:5 5 10 5;background:#ffffff;'>";
echo "<table width=98% cellpadding=2 cellspacing=1 border=0 bgcolor=#cccccc align=right>";
echo "<colgroup><colgroup><colgroup><colgroup><colgroup><colgroup width=80><colgroup width=80>";
echo "<tr bgcolor=#dddddd align=center><td width=10><td class='small'>아이디<td class='small'>이름<td><td class='small'>연락처";
echo "<td class='small'>최종접속<td class='small'>가입날짜";
 
for ($k=0,$l=1; $row2=mysql_fetch_array($result2); $k++,$l++) {
$tmp2_id = $row2['mb_id'];
$profile2 = get_member("$tmp2_id");
 
$sqlRnum2 = "select count(*) as Rnum2 from $g5['member_table'] where mb_recommend = '$tmp2_id' and mb_level >= '2'";
$rowRnum2 = sql_fetch($sqlRnum2);
 
echo "<tr bgcolor=#eeeeee align=center>";
echo "<td class='small'>$l";
echo "<td class='small'>$profile2['mb_id']";
echo "<td><b>$profile2['mb_name']</b>($profile2['mb_nick'])";
if ($profile2['mb_level'] >= 4) { echo "<span style='color:red;'>★</span>"; }
echo "<td><a href='".G5_BBS_URL."/member_group.php?mbrecommend=$profile2['mb_id']'><span class='Rnum'>($rowRnum2['Rnum2'])</span></a>";
echo "<td class='small'>";
if ($profile['mb_hp']) { echo "$profile['mb_hp']"; }
if ($profile['mb_tel']) { echo "<br />$profile['mb_tel']"; }
if ($profile['mb_email']) { echo "<br />$profile['m'b_email']"; }
echo "<td class='small'>$profile2['mb_today_login']";
echo "<td class='small'>$profile2['mb_datetime']";
}
echo "</table>";
}
 
} }
echo "</table>";
echo "</div>";

 
} //회원만 보게...
include_once("./_tail.php");
?>

 

 

이 질문에 댓글 쓰기 :

답변 1

백지로 나온다면 php 오류일가능성이 많습니다.

 

페이지 상단에


error_reporting( E_ALL );
ini_set( "display_errors", 1 );

 

넣어보고 오류메세지 확인하세요.

위 코드 추가해서 나오는 오류메세지는 전부 수정하고 나니, css 쪽에 문제가 있지만 리스트는 출력되네요. 기존의 URL등 바꾸지 않아도 출력이 됩니다. 옛날 방식의 코드도 작동이 되는 것 같습니다.

답변을 작성하시기 전에 로그인 해주세요.
전체 15
QA 내용 검색

회원로그인

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