후기 이름 * 처리 질문드립니다.

후기 이름 * 처리 질문드립니다.

QA

후기 이름 * 처리 질문드립니다.

본문

PC/ 모바일 적응형으로 만들어졌는데

 

PC버전은 후기 고객 이름이 별표처리가 잘되는데

모바일은 적용이안되어있습니다.

어떻게 적용해야될까요 ㅜㅜ

모바일 itemuse 코드 공유드립니다.

 

 

<?php

include_once('./_common.php');

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

 

$it_id = isset($_REQUEST['it_id']) ? safe_replace_regex($_REQUEST['it_id'], 'it_id') : '';

 

$itemuse_list = G5_SHOP_URL."/itemuselist.php";

$itemuse_form = G5_SHOP_URL."/itemuseform.php?it_id=".$it_id;

$itemuse_formupdate = G5_SHOP_URL."/itemuseformupdate.php?it_id=".$it_id;

 

$sql_common = " from `{$g5['g5_shop_item_use_table']}` where it_id = '{$it_id}' and is_confirm = '1' ";

 

// 테이블의 전체 레코드수만 얻음

$sql = " select COUNT(*) as cnt " . $sql_common;

$row = sql_fetch($sql);

$total_count = $row['cnt'];

 

$rows = $config['cf_mobile_pages'];

$total_page  = ceil($total_count / $rows); // 전체 페이지 계산

if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)

$from_record = ($page - 1) * $rows; // 시작 레코드 구함

 

$sql = "select * $sql_common order by is_id desc limit $from_record, $rows ";

$result = sql_query($sql);

 

$itemuse_skin = G5_MSHOP_SKIN_PATH.'/itemuse.skin.php';

 

if(!file_exists($itemuse_skin)) {

    echo str_replace(G5_PATH.'/', '', $itemuse_skin).' 스킨 파일이 존재하지 않습니다.';

} else {

    include_once($itemuse_skin);

}

 

2113630518_1665627448.32.jpg

 

위 모바일 아래 pc 버전 입니다.

 

2113630518_1665627491.0416.jpg

이 질문에 댓글 쓰기 :

답변 1

G5_MSHOP_SKIN_PATH.'/itemuse.skin.php';

여기 코드도 같이 보여주셔야할거같은데요 실제로 필터링하는 코드는 그 안에 있을것으로 보이네요

<?php
include_once('./_common.php');

$it_id = isset($_REQUEST['it_id']) ? safe_replace_regex($_REQUEST['it_id'], 'it_id') : '';

if( !isset($it) && !get_session("ss_tv_idx") ){
    if( !headers_sent() ){  //헤더를 보내기 전이면 검색엔진에서 제외합니다.
        echo '<meta name="robots" content="noindex, nofollow">';
    }
    /*
    if( !G5_IS_MOBILE ){    //PC 에서는 검색엔진 화면에 노출하지 않도록 수정
        return;
    }
    */
}

if (G5_IS_MOBILE) {
    include_once(G5_MSHOP_PATH.'/itemuse.php');
    return;
}

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

// 현재페이지, 총페이지수, 한페이지에 보여줄 행, URL
function itemuse_page($write_pages, $cur_page, $total_page, $url, $add="")
{
    //$url = preg_replace('#&amp;page=[0-9]*(&amp;page=)$#', '$1', $url);
    $url = preg_replace('#&amp;page=[0-9]*#', '', $url) . '&amp;page=';

    $str = '';
    if ($cur_page > 1) {
        $str .= '<a href="'.$url.'1'.$add.'" class="pg_page pg_start">처음</a>'.PHP_EOL;
    }

    $start_page = ( ( (int)( ($cur_page - 1 ) / $write_pages ) ) * $write_pages ) + 1;
    $end_page = $start_page + $write_pages - 1;

    if ($end_page >= $total_page) $end_page = $total_page;

    if ($start_page > 1) $str .= '<a href="'.$url.($start_page-1).$add.'" class="pg_page pg_prev">이전</a>'.PHP_EOL;

    if ($total_page > 1) {
        for ($k=$start_page;$k<=$end_page;$k++) {
            if ($cur_page != $k)
                $str .= '<a href="'.$url.$k.$add.'" class="pg_page">'.$k.'</a><span class="sound_only">페이지</span>'.PHP_EOL;
            else
                $str .= '<span class="sound_only">열린</span><strong class="pg_current">'.$k.'</strong><span class="sound_only">페이지</span>'.PHP_EOL;
        }
    }

    if ($total_page > $end_page) $str .= '<a href="'.$url.($end_page+1).$add.'" class="pg_page pg_next">다음</a>'.PHP_EOL;

    if ($cur_page < $total_page) {
        $str .= '<a href="'.$url.$total_page.$add.'" class="pg_page pg_end">맨끝</a>'.PHP_EOL;
    }

    if ($str)
        return "<nav class=\"pg_wrap\"><span class=\"pg\">{$str}</span></nav>";
    else
        return "";
}

$itemuse_list = G5_SHOP_URL."/mypage.php?mode=product_review";
$itemuse_form = G5_SHOP_URL."/itemuseform.php?it_id=".$it_id;
$itemuse_formupdate = G5_SHOP_URL."/itemuseformupdate.php?it_id=".$it_id;

$sql_common = " from `{$g5['g5_shop_item_use_table']}` where it_id = '{$it_id}' and is_confirm = '1' ";

// 테이블의 전체 레코드수만 얻음
$sql = " select COUNT(*) as cnt " . $sql_common;
$row = sql_fetch($sql);
$total_count = $row['cnt'];

$rows = 5;
$total_page  = ceil($total_count / $rows); // 전체 페이지 계산
if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 레코드 구함

$sql = "select * $sql_common order by is_id desc limit $from_record, $rows ";
$result = sql_query($sql);

$itemuse_skin = G5_SHOP_SKIN_PATH.'/itemuse.skin.php';

if(!file_exists($itemuse_skin)) {
    echo str_replace(G5_PATH.'/', '', $itemuse_skin).' 스킨 파일이 존재하지 않습니다.';
} else {
    include_once($itemuse_skin);
}


PC 는 이렇게되어있습니다! ㅜ

mypage 쪽 가져왔습니다 ㅜㅜ

 <!-- 전체 상품 사용후기 목록 시작 { -->
    <div id="sps">
        <h2>상품 리뷰</h2>
        <form method="get" action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" autocomplete="off">
            <input type="hidden" name="mode" value="<?php echo $mode?>">
            <div id="sps_sch">
                <div class="sch_wr">
                    <label for="sfl" class="sound_only">검색항목<strong class="sound_only"> 필수</strong></label>
                    <select name="sfl" id="sfl" required>
                        <option value="">선택</option>
                        <option value="b.it_name"  <?php echo get_selected($sfl, "b.it_name"); ?>>상품명</option>
                        <option value="a.it_id"    <?php echo get_selected($sfl, "a.it_id"); ?>>상품코드</option>
                        <option value="a.is_subject"<?php echo get_selected($sfl, "a.is_subject"); ?>>후기제목</option>
                        <option value="a.is_content"<?php echo get_selected($sfl, "a.is_content"); ?>>후기내용</option>
                        <option value="a.is_name"  <?php echo get_selected($sfl, "a.is_name"); ?>>작성자명</option>
                        <option value="a.mb_id"    <?php echo get_selected($sfl, "a.mb_id"); ?>>작성자아이디</option>
                    </select>
                    <label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
                    <input type="text" name="stx" value="<?php echo $stx; ?>" id="stx" required class="sch_input">
                    <button type="submit" value="검색" class="sch_btn"><i class="fa fa-search" aria-hidden="true"></i><span class="sound_only">검색</span></button>
                </div>
            </div>
        </form>
        <div class="tbl_head03 tbl_wrap">
            <table>
                <thead>
                <tr>
                    <th scope="col" width="8%">번호</th>
                    <th scope="col" width="10%">상품</th>
                    <th scope="col" width="40%">내용</th>
                    <th scope="col" width="8%">평점</th>
                    <th scope="col" width="10%">등록일</th>
                    <th scope="col" width="8%">승인여부</th>
                    <th scope="col" width="10%">관리</th>
                </tr>
                </thead>
                <tbody>
            <?php
            $thumbnail_width = 500;
            for ($i=0; $row=sql_fetch_array($review_result); $i++)
            {
                $num = $total_count - ($page - 1) * $rows - $i;
                $star = get_star($row['is_score']);

                $is_content = get_view_thumbnail(conv_content($row['is_content'], 1), $thumbnail_width);

                $row2 = get_shop_item($row['it_id'], true);
                $it_href = shop_item_url($row['it_id']);

                if ($row['is_confirm'] == 1) {
                    $iq_stats = '<span class=\'sit_qaa_done\'>승인</span>';
                } else {
                    $iq_stats = '<span class=\'sit_qaa_yet\'>대기</span>';
                }

                $hash = md5($row['is_id'].$row['is_time'].$row['is_ip']);

                $itemuse_list = G5_SHOP_URL."/mypage.php?mode=product_review";
                $itemuse_form = G5_SHOP_URL."/itemuseform.php?it_id=".$row['it_id'];
                $itemuse_formupdate = G5_SHOP_URL."/itemuseformupdate.php?it_id=".$row['it_id'];
                if ($i > 0) echo '<tr>';
                ?>
                <td align="center"><?php echo $num; ?></td>
                <td align="center">
                    <div class="sps_img">
                        <a href="<?php echo $it_href; ?>">
                            <?php echo get_it_image($row['it_id'], 100, 100); ?>
                            <span><?php echo $row2['it_name']; ?></span>
                        </a>
                    </div>
                </td>
                <td align="left">
                    <div class="sps_content_area">
                        <?php echo get_text($row['is_subject']); ?>
                        <div id="sps_con_<?php echo $i; ?>" style="display:none;">
                            <?php echo $is_content; // 사용후기 내용 ?>
                            <?php
                            if( !empty($row['is_reply_subject']) ){    //사용후기 답변이 있다면
                                $is_reply_content = get_view_thumbnail(conv_content($row['is_reply_content'], 1), $thumbnail_width);
                                ?>
                                <div class="sps_reply">
                                    <div class="sps_img">
                                        <a href="<?php echo $it_href; ?>">
                                            <?php echo get_itemuselist_thumbnail($row['it_id'], $row['is_reply_content'], 50, 50); ?>
                                            <span><?php echo $row2['it_name']; ?></span>
                                        </a>
                                    </div>
                                    <section>
                                        <h2 class="is_

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

회원로그인

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