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

사이트 팝업이 안나옵니다 ㅠㅠ 도와주세요

아트파워 4년 전 조회 3,639

안녕하세요~!

그누보드를 이용하여 사이트가 만들어져 있는대 이전 디자이너 분이 퇴사를 하셔서 수정을 해야 되는대

막막 합니다 ㅠㅠ

 

관리자 페이지에서 팝업을 만들어도 사이트에 팝업이 나오지 않아 이렇게 질문을 해 봅니다 ㅠ

그누보드를 다운 받아서 소스도 비교해 봐도 똑같이 잘 되어 있는거 같은대

어떤게 문제일까요?

 

 

 ★ index.php 소스 ★

</strong></p>

<p><?php

include_once('./_common.php');</p>

<p>define('_INDEX_', true);

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

<p>if(defined('G5_THEME_PATH')) {

    require_once(G5_THEME_PATH.'/index.php');

    return;

}</p>

<p>if (G5_IS_MOBILE) {

    include_once(G5_MOBILE_PATH.'/index.php');

    return;

}</p>

<p>include_once(G5_PATH.'/head.php');

?></p>

<p><h2 class="sound_only">최신글</h2></p>

<p><div class="latest_top_wr">

    <?php

    // 이 함수가 바로 최신글을 추출하는 역할을 합니다.

    // 사용방법 : latest(스킨, 게시판아이디, 출력라인, 글자수);

    // 테마의 스킨을 사용하려면 theme/basic 과 같이 지정

    echo latest('pic_list', 'free', 4, 23);            // 최소설치시 자동생성되는 자유게시판

    echo latest('pic_list', 'qa', 4, 23);            // 최소설치시 자동생성되는 질문답변게시판

    echo latest('pic_list', 'notice', 4, 23);        // 최소설치시 자동생성되는 공지사항게시판

    ?>

</div>

<div class="latest_wr">

    <!-- 사진 최신글2 { -->

    <?php

    // 이 함수가 바로 최신글을 추출하는 역할을 합니다.

    // 사용방법 : latest(스킨, 게시판아이디, 출력라인, 글자수);

    // 테마의 스킨을 사용하려면 theme/basic 과 같이 지정

    echo latest('pic_block', 'gallery', 4, 23);        // 최소설치시 자동생성되는 갤러리게시판

    ?>

    <!-- } 사진 최신글2 끝 -->

</div></p>

<p><div class="latest_wr">

<!-- 최신글 시작 { -->

    <?php

    //  최신글

    $sql = " select bo_table

                from `{$g5['board_table']}` a left join `{$g5['group_table']}` b on (a.gr_id=b.gr_id)

                where a.bo_device <> 'mobile' ";

    if(!$is_admin)

    $sql .= " and a.bo_use_cert = '' ";

    $sql .= " and a.bo_table not in ('notice', 'gallery') ";     //공지사항과 갤러리 게시판은 제외

    $sql .= " order by b.gr_order, a.bo_order ";

    $result = sql_query($sql);

    for ($i=0; $row=sql_fetch_array($result); $i++) {

        $lt_style = '';

        if ($i%3 !== 0 ) $lt_style = "margin-left:2%";

    ?>

    <div style="float:left;<?php echo $lt_style ?>" class="lt_wr">

        <?php

        // 이 함수가 바로 최신글을 추출하는 역할을 합니다.

        // 사용방법 : latest(스킨, 게시판아이디, 출력라인, 글자수);

        // 테마의 스킨을 사용하려면 theme/basic 과 같이 지정

        echo latest('basic', $row['bo_table'], 6, 24);

        ?>

    </div>

    <?php

    }

    ?>

    <!-- } 최신글 끝 -->

</div>

<?php

include_once(G5_PATH.'/tail.php');

?></p>

<p><strong>

 

 

 

 

★ newwin.inc.php 소스 정보 ★

 

</strong></p>

<p><?php

if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가</p>

<p>if (!defined('_SHOP_')) {

    $pop_division = 'comm';

} else {

    $pop_division = 'shop';

}</p>

<p>$sql = " select * from {$g5['new_win_table']}

          where '".G5_TIME_YMDHIS."' between nw_begin_time and nw_end_time

            and nw_device IN ( 'both', 'pc' ) and nw_division IN ( 'both', '".$pop_division."' )

          order by nw_id asc ";

$result = sql_query($sql, false);

?></p>

<p><!-- 팝업레이어 시작 { -->

<div id="hd_pop">

    <h2>팝업레이어 알림</h2></p>

<p><?php

for ($i=0; $nw=sql_fetch_array($result); $i++)

{

    // 이미 체크 되었다면 Continue

    if (isset($_COOKIE["hd_pops_{$nw['nw_id']}"]) && $_COOKIE["hd_pops_{$nw['nw_id']}"])

        continue;

?></p>

<p>    <div id="hd_pops_<?php echo $nw['nw_id'] ?>" class="hd_pops" style="top:<?php echo $nw['nw_top']?>px;left:<?php echo $nw['nw_left']?>px">

        <div class="hd_pops_con" style="width:<?php echo $nw['nw_width'] ?>px;height:<?php echo $nw['nw_height'] ?>px">

            <?php echo conv_content($nw['nw_content'], 1); ?>

        </div>

        <div class="hd_pops_footer">

            <button class="hd_pops_reject hd_pops_<?php echo $nw['nw_id']; ?> <?php echo $nw['nw_disable_hours']; ?>"><strong><?php echo $nw['nw_disable_hours']; ?></strong>시간 동안 다시 열람하지 않습니다.</button>

            <button class="hd_pops_close hd_pops_<?php echo $nw['nw_id']; ?>">닫기 <i class="fa fa-times" aria-hidden="true"></i></button>

        </div>

    </div>

<?php }

if ($i == 0) echo '<span class="sound_only">팝업레이어 알림이 없습니다.</span>';

?>

</div></p>

<p><script>

$(function() {

    $(".hd_pops_reject").click(function() {

        var id = $(this).attr('class').split(' ');

        var ck_name = id[1];

        var exp_time = parseInt(id[2]);

        $("#"+id[1]).css("display", "none");

        set_cookie(ck_name, 1, exp_time, g5_cookie_domain);

    });

    $('.hd_pops_close').click(function() {

        var idb = $(this).attr('class').split(' ');

        $('#'+idb[1]).css('display','none');

    });

    $("#hd").css("z-index", 1000);

});

</script>

<!-- } 팝업레이어 끝 --></p>

<p><strong>

 

★ head.php 소스  ★ 

 

</strong></p>

<p><div id="hd">

    <h1 id="hd_h1"><?php echo $g5['title'] ?></h1>

    <div id="skip_to_container"><a href="#container">본문 바로가기</a></div></p>

<p>    <?php

    if(defined('_INDEX_')) { // index에서만 실행

        include G5_BBS_PATH.'/newwin.inc.php'; // 팝업레이어

    }

    ?>

<strong>

 

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

답변 1개

if (!defined('_SHOP_')) {
    $pop_division = 'comm';
} else {
    $pop_division = 'shop';
}
$sql = " select * from {$g5['new_win_table']}
          where '".G5_TIME_YMDHIS."' between nw_begin_time and nw_end_time
            and nw_device IN ( 'both', 'pc' ) and nw_division IN ( 'both', '".$pop_division."' )
          order by nw_id asc ";
$result = sql_query($sql, false);

$sql query문을 직접 DB에서 한번 실행해서 결과가 있는지 확인해 보세요.

 

아니면

$sql = " select * from {$g5['new_win_table']} ";

이렇게 해서 결과가 나온다면

기간, 디바이스, 페이지 조건 등이 맞는 것이 없어서 안 나오는 것입니다.

 

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

답변에 대한 댓글 2개

아트파워
4년 전
DB가 연결이 안되어 있을수 있다는걸까요? ㅠㅠ 죄송합니다 지식이 많이 없어서
팝업이 안나오는 이유가 DB때문이라고 말씀하신 거겠지요?
엑스엠엘
4년 전
팝업 만드실 때 여러가지 조건을 입력합니다.
그것과 해당페이지의 조건과 일치하는 것이 없을 경우도 나오지 않습니다.

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

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

로그인