팁과노하우

2026.06.01 14:14

오늘 출석 안하셨어요. 스티커 코드

Uploaded Image



리빌더 공홈 우측에 뜨는
오늘 출석 안하셨어요 스티커 코드입니다.

출석부 부가기능이 설치되어있어야 하며
로그인 한 상태이고, 오늘 출석을 하지않았다면 표기 됩니다.

https://rebuilder.co.kr/item/573
  • Preview Image


  • 닫기버튼을 클릭하는 경우 쿠키적용으로
    12시간동안 표기되지 않습니다.

    theme/테마명/tail.php 파일의 하기 코드 위쪽에 넣어주세요.
    편의상 CSS는 인라인으로 포함되어있습니다.

    <?php // 오늘 날짜 및 출석 여부 확인
    ...

    <?php
    include_once(G5_THEME_PATH."/tail.sub.php");


    <?php
    // 오늘 날짜 및 출석 여부 확인
    $_att_today = date('Ymd');
    $_att_done = false;
    if (!empty($member['mb_id'])) {
    $chk = sql_fetch("
    SELECT at_id FROM rb_attendance
    WHERE mb_id='".sql_real_escape_string($member['mb_id'])."'
    AND REPLACE(ymd,'-','')='{$_att_today}'
    LIMIT 1
    ");
    $_att_done = !empty($chk['at_id']);
    }
    ?>

    <?php if (!$_att_done && $is_member): ?>
    <div id="rb-att-float" style="
    position: fixed;
    right: -220px;
    top: 30%;
    transform: translateY(-50%);
    z-index: 97;
    transition: right 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    ">
    <button onclick="rbAttFloatClose()" style="
    position: absolute;
    top: 17px;
    left: 17px;
    border: none;
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    "><svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><title>close_line</title><g id="close_line" fill='none' fill-rule='evenodd'><path d='M24 0v24H0V0zM12.593 23.258l-.011.002-.071.035-.02.004-.014-.004-.071-.035c-.01-.004-.019-.001-.024.005l-.004.01-.017.428.005.02.01.013.104.074.015.004.012-.004.104-.074.012-.016.004-.017-.017-.427c-.002-.01-.009-.017-.017-.018m.265-.113-.013.002-.185.093-.01.01-.003.011.018.43.005.012.008.007.201.093c.012.004.023 0 .029-.008l.004-.014-.034-.614c-.003-.012-.01-.02-.02-.022m-.715.002a.023.023 0 0 0-.027.006l-.006.014-.034.614c0 .012.007.02.017.024l.015-.002.201-.093.01-.008.004-.011.017-.43-.003-.012-.01-.01z'/><path fill='#ffffff' d='m12 13.414 5.657 5.657a1 1 0 0 0 1.414-1.414L13.414 12l5.657-5.657a1 1 0 0 0-1.414-1.414L12 10.586 6.343 4.929A1 1 0 0 0 4.93 6.343L10.586 12l-5.657 5.657a1 1 0 1 0 1.414 1.414z'/></g></svg></button>
    <a href="<?php echo G5_URL ?>/rb/attend.php" style="
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: #fff;
    text-decoration: none;
    padding: 16px 20px;
    border-radius: 16px 0 0 16px;
    box-shadow: -4px 4px 20px rgba(0,0,0,0.2);
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
    width: 180px;
    ">
    <span style="display:block; width:36px; height:36px;">
    <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
    <rect x="3" y="4" width="18" height="17" rx="3" stroke="white" stroke-width="1.8" fill="none"/>
    <path d="M3 9h18" stroke="white" stroke-width="1.8" stroke-linecap="round"/>
    <path d="M8 2v3M16 2v3" stroke="white" stroke-width="1.8" stroke-linecap="round"/>
    <path d="M7.5 14l3 3 6-6" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
    </svg>
    </span>
    <span class="font-14 font-B" style="display:block; margin-top:10px;">오늘 출석 안하셨어요!</span>
    <span style="opacity:0.85;">출석체크 하러가기</span>
    </a>
    </div>
    <script>
    (function() {
    // 쿠키 확인 후 숨김 여부 결정
    function rbAttGetCookie(name) {
    var v = document.cookie.match('(^|;)\\s*' + name + '\\s*=\\s*([^;]+)');
    return v ? v.pop() : '';
    }
    function rbAttSetCookie(name, value, hours) {
    var d = new Date();
    d.setTime(d.getTime() + hours * 3600 * 1000);
    document.cookie = name + '=' + value + ';expires=' + d.toUTCString() + ';path=/';
    }
    window.rbAttFloatClose = function() {
    var el = document.getElementById('rb-att-float');
    if (el) el.style.right = '-220px';
    rbAttSetCookie('rb_att_float_hide', '1', 12);
    };
    if (!rbAttGetCookie('rb_att_float_hide')) {
    setTimeout(function() {
    var el = document.getElementById('rb-att-float');
    if (el) el.style.right = '0px';
    }, 600);
    }
    })();
    </script>
    <?php endif; ?>


    • 공유링크 복사
    • profile_image
      리빌더미니홈 1:1 대화하기 @master 구독자 42
    • 그누보드 리빌더는, 그누보드의 기능을 모두 그대로 사용하면서 폴더의 추가만으로 손쉽게 웹사이트를 완성하고 다양한 편의기능을 사용할 수 있습니다. 고도화는 계속 진행됩니다.
      미니홈 쪽지 구독하기
      구독하고 알림받기

      댓글목록

      profile_image
      no_profile 민트다이어리미니홈 1:1 대화하기  3일 전

      감사합니다 ^^

      2026-06-01 14:47

      profile_image
      no_profile 에이치엔미니홈 1:1 대화하기  3일 전

      감사합니다

      2026-06-01 16:17