비회원일때 게시물이 안보입니다 ㅜㅜ

비회원일때 게시물이 안보입니다 ㅜㅜ

QA

비회원일때 게시물이 안보입니다 ㅜㅜ

본문

2039043847_1656314404.3359.png

 

회원 로그인을 했을 경우에는 게시물이 다 보이는데

 

2039043847_1656314408.8782.png

비회원일때는 게시물이 없다고 나옵니다. 아래 코딩 중 가려놓은 부분이 있을까요?

 

<?
$sub_menu = "200100";
include_once("./_common.php");

//auth_check($auth[$sub_menu], "r");

$token = get_token();

$sql_common = " from $g5[member_table] ";

$sql_search = " where (1) and mb_status <> '삭제됨'";
if ($stx) {
    $sql_search .= " and ( ";
    switch ($sfl) {
        case "mb_point" :
            $sql_search .= " ($sfl >= '$stx') ";
            break;
        case "mb_level" :
            $sql_search .= " ($sfl = '$stx') ";
            break;
        case "mb_tel" :
        case "mb_hp" :
            $sql_search .= " ($sfl like '%$stx') ";
            break;
        default :
            $sql_search .= " ($sfl like '$stx%') ";
            break;
    }
    $sql_search .= " ) ";
}

//if ($is_admin == 'group') $sql_search .= " and mb_level = '$member[mb_level]' ";
if ($is_admin != 'super')
    $sql_search .= " and mb_level <= '$member[mb_level]' ";

if (!$sst) {
    $sst = "mb_datetime";
    $sod = "desc";
}

$sql_order = " order by $sst $sod ";

$sql = " select count(*) as cnt
         $sql_common
         $sql_search
         $sql_order ";
$row = sql_fetch($sql);
$total_count = $row[cnt];
//echo $sql;
$rows = $config[cf_page_rows];
$total_page  = ceil($total_count / $rows);  // 전체 페이지 계산
if (!$page) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함

$listall = "<a href='$_SERVER[PHP_SELF]' class=tt>처음</a>";

$g5[title] = "회원관리";
//include_once("./admin.head.php");
//include_once("../head.sub.php");
//include_once("../../member/unit.php");


if (G5_IS_MOBILE) {
    include_once(G5_THEME_MOBILE_PATH.'/head.php');
    //return;
    } else{
     include_once("../../member/unit.php");
}

$sql = " select *
          $sql_common
          $sql_search
          $sql_order
          limit $from_record, $rows ";
$result = sql_query($sql);
?>
<style>
.mem_op {width:100%; margin:30px auto 0; }
.mem_top {margin:25px auto 10px; font-size:24px; font-weight:bold; color:#383838; width:90%;}
.mem_btn {float:right; font-size:12px; padding:5px 10px 5px; background:#666; color:#fff; font-weight:normal; margin-top:3px;}

.mem_list td,.mem_list th{border-bottom:1px solid #d6d6d6; text-align:center; font-size:17px; line-height:50px; padding:5px 0 5px;}
.mem_list th{background:#f7f7f7}
.mem_list{width:100%; margin:0 auto 0; border-top:1px solid #d6d6d6;}

.mem_list1 td,.mem_list1 th{border-bottom:1px solid #d6d6d6; font-size:14px; line-height:25px; padding:5px 0 5px 10px;}
.mem_list1 th{background:#f7f7f7}
.mem_list1{width:90%; margin:0 auto 0; border-top:1px solid #d6d6d6;}
.mem_list1 .mem_right{text-align:right; padding-right:10px;}


.snb_btn2 { width:1200px; height:1px; margin:0 auto; position:relative;}
.snb_btn2 a { display:block;  line-height:38px; text-align:center; font-size:15px; color:#333; border:1px solid #ccc; position:absolute; top:-108px; transition:all .4s;}
.snb_btn2 a:hover { background:#555; color:#fff; }
.snb_btn2 a.left_a { padding:2px 40px 2px 60px; left:0; }
.snb_btn2 a.right_a { padding:2px 60px 2px 40px; right:0; }
.snb_btn2 a.left_a::after{ content:'<'; display:block; font-size:15px; color:#aaa; position:absolute; left:22px; top:3px;}
.snb_btn2 a.right_a::after{ content:'>'; display:block; font-size:15px; color:#aaa; position:absolute; right:22px; top:3px;}

.snb_btn3 {display:none;}

@media only screen and (max-width:769px) {
.snb_btn2 {display:none;}
.snb_btn3 {display:block; float:right;}

.mem_op {margin:25px auto 100px;}    
.mem_top { font-size:1.9rem; padding:25px 0; margin:0 auto;}
.mem_list { width:96%; border-top:2px solid #333;}
.mem_list td,.mem_list th { font-size:1.3rem;}

.mem_btn { font-size:1.2rem; }
    
}

@media only screen and (max-width:480px) {

.mem_op {margin:4px auto 50px;}
.mem_top {font-size:1.2em;}
.mem_list { width:92%; }
.mem_list td,.mem_list th { font-size:0.95em;}

/*.mem_list { background:#fff; width:90%; margin-bottom:100px; font-size:1.2em;}
.mem_list td,.mem_list th{border-bottom:1px solid #d6d6d6; text-align:center; font-size:1em; line-height:1.5em; padding:5px 0 5px;}
.mem_list th{background:#fff}*/

.mem_btn {font-size:0.6em;}

}
</style>
<div class="mem_op">
  <div class="snb_btn2">
      <ul>
        <li><a href='#' onclick='history.back(-1); return false;' class="left_a">뒤로가기</a></li>
        <li><a href="/board/bbs/board.php?bo_table=free<?=str_replace("기","",str_replace("1기","",$stx))?>" class="right_a">커뮤니티</a></li>
      </ul>
  </div>

<!--<div style="width:90%; margin:0 auto 0">
        <a href="./member_list1.php"><div style="width:50%; float:left; background:#e44848; color:#fff; text-align:center; font-weight:bold; padding:10px 0 10px;">기수별</div></a>
        <a href="./member_list2.php"><div style="width:50%; float:left; background:#ccc; color:#fff; text-align:center; font-weight:bold; padding:10px 0 10px;">업종별</div></a>
    <div class="enter"></div-->
<div class="mem_top">
    <? echo $stx ?>
    <a href='#' class="snb_btn3"onclick='history.back(-1); return false;'>
        <div class="mem_btn">뒤로가기</div>
      </a>
</div>


<table border='0' cellpadding='0' cellspacing='0' class='mem_list'>
<tr class='bgcol1 bold col1 ht center'>
    <th width="20%"><?=subject_sort_link('mb_1')?>기수 <span style="color:#666; font-size:11px;">↕</span></a></th>
    <th width="20%"><?=subject_sort_link('mb_name')?>이름 <span style="color:#666; font-size:11px;">↕</span></a></th>
    <th width="60%"><?=subject_sort_link('mb_2')?>업체명 <span style="color:#666; font-size:11px;">↕</span></a></th>
</tr>
<?
for ($i=0; $row=sql_fetch_array($result); $i++) {
    // 접근가능한 그룹수
    $sql2 = " select count(*) as cnt from $g5[group_member_table] where mb_id = '$row[mb_id]' ";
    $row2 = sql_fetch($sql2);
    $group = "";
    if ($row2[cnt])
        $group = "<a href='./boardgroupmember_form.php?mb_id=$row[mb_id]'>$row2[cnt]</a>";

    if ($is_admin == 'group')
    {
        $s_mod = "";
        $s_del = "";
    }
    else
    {
        $s_mod = "<a href=\"./member_form.php?$qstr&w=u&mb_id=$row[mb_id]\"><img src='img/icon_modify.gif' border=0 title='수정'></a>";
        //$s_del = "<a href=\"javascript:del('./member_delete.php?$qstr&w=d&mb_id=$row[mb_id]');\"><img src='img/icon_delete.gif' border=0 title='삭제'></a>";
        $s_del = "<a href=\"javascript:post_delete('member_delete.php', '$row[mb_id]');\"><img src='img/icon_delete.gif' border=0 title='삭제'></a>";
    }
    $s_grp = "<a href='./boardgroupmember_form.php?mb_id=$row[mb_id]'><img src='img/icon_group.gif' border=0 title='그룹'></a>";

    $leave_date = $row[mb_leave_date] ? $row[mb_leave_date] : date("Ymd", $g5[server_time]);
    $intercept_date = $row[mb_intercept_date] ? $row[mb_intercept_date] : date("Ymd", $g5[server_time]);

    $mb_nick = get_sideview($row[mb_id], $row[mb_nick], $row[mb_email], $row[mb_homepage]);

    $mb_id = $row[mb_id];
    if ($row[mb_leave_date])
        $mb_id = "<font color=crimson>$mb_id</font>";
    else if ($row[mb_intercept_date])
        $mb_id = "<font color=orange>$mb_id</font>";

    $list = $i%2;
        if($row[mb_level] < 10) {
            echo "
            <input type=hidden name=mb_id[$i] value='$row[mb_id]'>
            <tr class='list$list col1 ht center' onclick=win_profile2('$row[mb_id]');>
                <td title='$row[mb_id]'><nobr style='display:block; overflow:hidden;'>$row[mb_1]</nobr></td>
                <td><nobr style='display:block; overflow:hidden;'><a href='/board/bbs/profile2.php?mb_id=$row[mb_id]'>$row[mb_name]</a></nobr></td>
                <td><nobr style='display:block; overflow:hidden;'><a href='/board/bbs/profile2.php?mb_id=$row[mb_id]'>$row[mb_2]</a></nobr></td>
            </tr>
            ";}
        }

if ($i == 0)
    echo "<tr><td colspan='3' align=center height=100 class=contentbg>자료가 없습니다.</td></tr>";

echo "</table>";

if ($stx)
    echo "<script type='text/javascript'>document.fsearch.sfl.value = '$sfl';</script>\n";
?>
</form>
</div>
<?
//include_once ("./admin.tail.php");
//include_once ("../tail.sub.php");
//include_once("../../inc/foot_bo.php");

if (G5_IS_MOBILE) {
    include_once(G5_THEME_MOBILE_PATH.'/tail.php');
    //return;
    } else{
     include_once("../../inc/foot_bo.php");
}

?>
 

 

이 질문에 댓글 쓰기 :

답변 2

if ($is_admin != 'super')
    $sql_search .= " and mb_level <= '$member[mb_level]' ";

 

->

 

//if ($is_admin != 'super')
    //$sql_search .= " and mb_level <= '$member[mb_level]' ";

꼼꼼히 보기는 어려워서 if($row[mb_level] < 10) { 이부분 때문이 아닐까요?

로그인한 계정이 관리자 계정이라 10레벨이면 안보이실거같은데

이부분을 if($row[mb_level] <= 10) { 이렇게 하면 보이실까요?

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

회원로그인

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