이전달 목록보기 소스

이전달 목록보기 소스

QA

이전달 목록보기 소스

본문

출석부를 사용중입니다.

아래 그림의 화살표 부분에

◀ 이전     이후 ▶

이런 식으로 적용시키려고 하는데요.

현재는 앞달이나 뒷달을 볼 수가 없는 상태입니다.

1707055753_1593583185.1618.png

 

그림 우하단에 있는 문구처럼

가입일까지 열람이 가능하도록

소스를 변경하려면 아래 소스에서 어디를 어떻게 추가해야 할지 알려주시면 감사하겠습니다.

 

<div class="sat" style="position:relative"> 
  <table width="100%" class="media table table-bordered">
    <tr> 
      <th>출석점수</th>
      <td style="font-weight:bold; color:#F33; text-align:left"> 
        <?php echo number_format($attend[point]) ?>
        포인트 </td>
      <th>개근점수</th>
      <td style="position:relative"> <span id="rank_on" style="display:block" ><a href="#" onclick="toggle('rank_on'); toggle('rank_off');return false;">자세히보기 
        <i class="fa fa-caret-down"></i></a></span> <span id="rank_off" style="display:none;"><a href="#" onclick="toggle('rank_on'); toggle('rank_off');return false;" >자세히보기 
        <i class="fa fa-caret-up"></i></a> 
        <div class="popover bottom arrow"> 
          <div class="popover-title">개근점수</div>
          <div class="popover-content" style="width:100px"> <span class="label label-info"> 
            <?php echo number_format($attend[week_point]) ?>
            <span class="label label-info">주</span> </span> <span class="label label-success"> 
            <?php echo number_format($attend[month_point]) ?>
            <span class="label label-success">월</span> </span> <span class="label label-warning"> 
            <?php echo number_format($attend[year_point]) ?>
            <span class="label label-warning">년</span> </span> </div>
          <!-- .popover-content -->
        </div>
        <!-- .popover -->
        </span> 
        <!-- #rank_off -->
      </td>
      <th>랭킹점수</th>
      <td style="position:relative"> <span id="point_on" style="display:block" ><a href="#" onclick="toggle('point_on'); toggle('point_off');return false;" >자세히보기 
        <i class="fa fa-caret-down"></i></a></span> <span id="point_off" style="display:none;" ><a href="#" onclick="toggle('point_on'); toggle('point_off');return false;">자세히보기 
        <i class="fa fa-caret-up"></i></a> 
        <div class="popover bottom arrow"> 
          <div class="popover-title">랭킹점수</div>
          <div class="popover-content"> <span class="label label-important"> 1등 
            가산점 
            <?php echo number_format($attend[first_point]) ?>
            </span> <span class="label label-inverse">2등 가산점 
            <?php echo number_format($attend[second_point]) ?>
            </span> <span class="label">3등 가산점 
            <?php echo $attend[third_point] ?>
            </span> </div>
        </div>
        </span> </td>
      <th>출석권한</th>
      <? if($attend[power] == 0){ ?>
      <td><span class="label label-success">불가능</span></td>
      <? }elseif($attend[power] == 1){ ?>
      <td><span class="label label-success">로그인 사용자</span></td>
      <? }elseif($attend[power] == 2){ ?>
      <td><span class="label label-success">관리 권한</span></td>
      <? } ?>
    </tr>
    오늘 날짜 
    <? $today = date("Y-m-d"); echo $today; ?>
    ​ 
    <tr> 
      <th>출석시간</th>
      <td style="text-align:left; font-size:10px"> <span class="label label-success "> 
        <?php echo $attend[sta] ?>
        ~ 
        <?php echo $attend[eta] ?>
        </span> </td>
      <th>진행상태</th>
      <? if (date("H:i:s") < $attend[sta] || date("H:i:s") > $attend[eta]) { ?>
      <td><span class="label label-warning">출석불가능</span></td>
      <? }else{ ?>
      <td><span class="label label-success">출석가능</span></td>
      <? } ?>
      <th>출석여부</th>
      <td> 
        <?php if($at){ ?>
        <span class="label label-success">출석완료</span> 
        <?php }else{ ?>
        <span class="label label-warning">출석안함</span> 
        <?php } ?>
      </td>
      <th>개근분류</th>
      <td style="position:relative"> <span id="point_7" style="display:block"><a href="#" onclick="toggle('point_7'); toggle('point_8');return false;" >자세히보기 
        <i class="fa fa-caret-down"></i></a></span> <span id="point_8" style="display:none;"><a href="#" onclick="toggle('point_7'); toggle('point_8');return false;" >자세히보기 
        <i class="fa fa-caret-up"></i></a> 
        <div class="popover bottom arrow"> 
          <div class="popover-title">개근분류</div>
          <div class="popover-content"> <span class="label label-info">주</span> 
            <span class="label label-success">월</span> <span class="label label-warning">년</span> 
            <br/>
            <font color="#FF0000" size="-2">최근만 표시</font> </div>
          <!-- .popover-content -->
        </div>
        <!-- .popover -->
        </span> </td>
    </tr>
  </table>
</div>
<?php
$year = date('Y'); 
$month = date('m'); 

$time = strtotime($year.'-'.$month.'-01'); 
list($tday, $sweek) = explode('-', date('t-w', $time));  // 총 일수, 시작요일 
$tweek = ceil(($tday + $sweek) / 7);  // 총 주차 
$lweek = date('w', strtotime($year.'-'.$month.'-'.$tday));  // 마지막요일 
?> 
  <table cellspacing="0" class="listTable hidden" width="100%">
    <tr>
<?php
for ($n=0,$i=0; $i<$tweek; $i++):
  for ($k=0; $k<7; $k++): 
  if($k == 0){
    $dayname = ' class="sunday"';
  }elseif($k == 6){
    $dayname = ' class="saturday"';
  }else{
    $dayname = ' ';
  }
  if (!(($i == 0 && $k < $sweek) || ($i == $tweek-1 && $k > $lweek))):
  $datetime = $year."-".$month."-".str_pad($n+++1, 2, 0, STR_PAD_LEFT);
        // 출석했나?
        $sql = " select idx from g5_attendance where mb_id = '$member[mb_id]' and substring(datetime,1,10) = '$datetime' ";
        $check = sql_fetch($sql);

        // 출석
        if ($check['idx']) {
?>
      <td height="35px;" class="stamp1">
        <a href="javascript:;" onclick="attendday(<?php echo str_pad($n, 2, 0, STR_PAD_LEFT); ?>);"><span<?php echo $dayname ?>><?php echo $n ?></span></a>
        <span class="check" style="width:100%; text-align:center; position:relative; margin-bottom:-10px; padding:0; padding-top:5px; display:block;">
          <img src="<?php echo G5_PLUGIN_URL ?>/attendance/css/check.gif" alt="" />
        </span>
      </td>
<?php
        } else if (G5_TIME_YMD < $datetime) {
?>
      <td height="35px;" class="stamp1">
        <a href="javascript:;" onclick="attendday(<?php echo str_pad($n, 2, 0, STR_PAD_LEFT); ?>);"><span<?php echo $dayname ?>><?php echo $n ?></span></a>
      </td>
<?php
        } else if (!$check['idx'] && G5_TIME_YMD == $datetime) {
?>
      <td height="35px;" class="stamp">
        <a href="javascript:;" onclick="attendday(<?php echo str_pad($n, 2, 0, STR_PAD_LEFT); ?>);">
          <span>
          <span style="background:#F66; color:#fff;"<?php echo $dayname ?>><?php echo $n ?></span>
          
      <div style="width:100%;text-align:center; position:relative; margin:0; margin-bottom:-10px; padding:0;; padding-top:5px;"> 
        <img src="<?php echo G5_PLUGIN_URL ?>/attendance/css/day.gif" alt="" /> 
      </div>
          </span>
        </a>
      </td>

<?php
        } else {
?>
      <td height="35px;" class="stamp">
        <a href="javascript:;" onclick="attendday(<?php echo str_pad($n, 2, 0, STR_PAD_LEFT); ?>);"><span<?php echo $dayname ?>><?php echo $n ?></span></a>
      </td>
<?php
        }
    endif; 
  endfor;
endfor;
?>
    </tr>
  </table>
  <div class="cal_info">
    <table border="0" cellpadding="0" cellspacing="0" class="hidden">
      <tr>
        <td>
          <span class="c1">결석</span>
          <span class="c2">출석</span>
          <span class="c3">미출석</span>
        </td>
        <td width="100%">
          <span style="color:#999; float:right">* 이전달은 가입일까지 열람이 가능합니다.</span>
        </td>
      </tr>
    </table>
  </div>
<?php
// 출석했나?
$sql = " select idx from g5_attendance where mb_id = '$member[mb_id]' and substring(datetime,1,10) = '".G5_TIME_YMD."' ";
$check = sql_fetch($sql);

// 출석
if ($check['idx']) {


$sql = " select count(*) as cnt from g5_attendance where ip = '$_SERVER[REMOTE_ADDR]' and substring(datetime,1,10) like '%".G5_TIME_YMD."%' ";
$ip_check = sql_fetch($sql);
?>
  <div class="sat" style="margin:10px 1px">
    <div class="alert alert-success">
      <h4>출석이 완료되었습니다.</h4>출석은 하루 1회만 참여하실 수 있습니다. 내일 다시 출석해 주세요.^^ <br>하루 중복 IP 출석제한 (현재 : <?php echo $ip_check[cnt] ?> / 제한 : <?php echo $attend[ip_check] ?>)회 입니다.
    </div>
<?php }else{ ?>
  <div class="sat" style="margin:10px 1px">
    <form method="post" id="click_button" style="text-align:center" class="write_author">
    <input type="hidden" name="attend_checked" value="ok">
    <span class="input-append" style="width:100%; display:inline-block">
    <input type="text" name="subject" id="subject" required class="input_media iText required" style="<?php echo (G5_IS_MOBILE?'width:65%':'width:85%') ?>" value="<?php if($attend[option] == "1") echo $subject[rand(1, $attend[num])] ?>" />
    <input type="submit" class="sm-btn" value="출석 도장!">
    </span>
    </form>
  </div>
<?php } ?>
  <div class="sat">
    <ul class="lulu-list left cfix clarity-font">
      <div id="ajax_list"><img src="<?php echo G5_PLUGIN_URL ?>/attendance/img/ajax_loading.gif" style="margin:10% 30%;text-align:center;"></div>
    <ul>
  </div>
 
  </section>
</div>
 

 

이 질문에 댓글 쓰기 :

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

회원로그인

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