테스트 사이트 - 개발 중인 베타 버전입니다

등급별 가격 채택완료

jp 5년 전 조회 2,780

맨 아래 점선 아래부분은 최신글입니다.

붉은색 부분은 멤버 등급이 5등급 이하는 소비자가격, 5등급 이상은 대리점가격이 보이게끔 했습니다.

 

이것을 메인페이지(그누보드 페이지 아닙니다.)에서 불러오는데 안되네요.

메인페이지 상단에는

<?php 

include_once('./board/common.php'); 

include_once(G5_PATH.'/lib/latest.lib.php');

include_once(G5_PATH.'/lib/common.lib.php');

include_once(G5_PATH.'/lib/outlogin.lib.php'); 

include_once(G5_PATH.'/lib/visit.lib.php');

?>

요렇게 들어가 있으며, <?php echo latest_main('gallery_viewbig', 'products1', 8, 20); ?>

요렇게 불러왔습니다.

 

참고로 해당 게시판에서는 잘됩니다.(products1)

해당 게시판소스 입니다.

<?php

if ($member[mb_level] <= 5){

echo "<font color=red>(소비자가격:{$list[$i][wr_2]}원)</font>";   // 제목

}

if ($member[mb_level] >= 5){

echo "<font color=red>(대리점가격:{$list[$i][wr_3]}원)</font>";   // 제목   

}

?>          

-------------------------------------------------------------------------------------------------------------

 

<?php

if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가

include_once(G5_LIB_PATH.'/thumbnail.lib.php');

 

// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨

add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);

$thumb_width = 245;

$thumb_height = 322;

?>

 

<div class="pic_lt">

    <ul>

    <?php

    for ($i=0; $i<count($list); $i++) {

    $thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $thumb_width, $thumb_height, false, true);

 

    if($thumb['src']) {

        $img = $thumb['src'];

    } else {

        $img = G5_IMG_URL.'/no_img.png';

        $thumb['alt'] = '이미지가 없습니다.';

    }

    $img_content = '<img src="'.$img.'" alt="'.$thumb['alt'].'" >';

    ?>

        <li style="margin-right:73px; nth-child(4):margin-right:0px;margin-bottom:50px;">

            <a href="<?php echo $list[$i]['href'] ?>" class="lt_img"><?php echo $img_content; ?></a>

            <?php       

 

 

            echo "<p style=\"text-align:center;padding-top:10px;\"><a href=\"".$list[$i]['href']."\"> ";

            if ($list[$i]['is_notice'])

                echo "<strong>".$list[$i]['subject']."</strong>";

            else

                //echo $list[$i]['subject'];

                echo "<font color=\"#000\">".$list[$i]['subject']."</font><br>";      

                echo "</a></p>";           

            ?>


 

            <?php

               

                if($member[mb_level] <= 5){

                    echo "<font color=red>(소비자가격:{$list[$i][wr_2]}원)</font>";   // 제목

                } else if($member[mb_level] >= 5) {

                    echo "<font color=red>(대리점가격:{$list[$i][wr_3]}원)</font>";   // 제목   

                } else {

                }

           

            ?>

 

        </li>

    <?php }  ?>

    <?php if (count($list) == 0) { //게시물이 없을 때  ?>

    <li class="empty_li">게시물이 없습니다.</li>

    <?php }  ?>

    </ul>

 

</div>

댓글을 작성하려면 로그인이 필요합니다.

답변 2개

채택된 답변
+20 포인트
e
5년 전

latest_main 함수를 만드신 것 같은데.. 

아래 빨간 부분을 추가해보세요.

function latest_main ()

{

  global $g5, $member;

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

j
5년 전

감사합니다.

잘되네요.

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인