일정이 표시가 안됩니다.

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!
일정이 표시가 안됩니다.

QA

일정이 표시가 안됩니다.

본문

 

988667759_1692632398.8657.png

위에 이미지처럼 일정등록 하면 체크가 되어야하는데 

988667759_1692632432.9453.png

체크가 사라졌습니다.

 

<div style="display:<?php if(is_mobile())echo 'none';?>;width:<?php echo is_mobile() ? 0 : 50?>%;float:left;">  이 부분을 수정했더니 체크표시가 안보이네요. display:<?php if(is_mobile())echo 'none';?>;width:<?php echo is_mobile() ? 0 : 50?를 수정하면 

988667759_1692632654.6565.png

이렇게 일요일에 대한 내용이 보여지구요...

 


<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("$latest_skin_path/moonday.php");
/*
// 사용방법
<?php
//echo latest("theme/스킨명", "게시판명", 1, 1, 1,"넓이");
echo latest("theme/hp5_calendar", "schedule", 1, 1, 1,"200");
?>
*/
//옵션분리
list($n_table_width,$cellw,$cellh) = explode(",", $options);
if (!$cellw) {
/*    $cellh  = 21;
    $cellw  = 22 + 20;*/
    $cellh  = 39;
    $cellw  = 39 + 20;
}
?>
<style type="text/css">
    .cal {margin-bottom:15px; padding:7px 0; /*border-left:solid 1px #628bc5;  border-right:solid 1px #628bc5;  border-bottom:solid 1px #628bc5;*/ background:#f8f8f8;}
td.title    { text-align: center; height: <?php echo $cellh; ?>px; font-weight: bold; }
td.invalid  { text-align: center; padding-top: 2px; height: <?php echo $cellh; ?>px; width: <?php echo $cellw; ?>px; /*background: url(<?php echo $latest_skin_url; ?>/img/mini2.gif) no-repeat bottom;*/ }
td.valid    { text-align: center; height: <?php echo $cellh; ?>px; width: <?php echo $cellw; ?>px; /*background:#fff;*//*border:1px solid #e5e5e5;*/ }
td.today    { text-align: center; /*background: #eee; border: 1px solid #e5e5e5;*/ height: <?php echo $cellh ?>px; width: <?php echo $cellw; ?>px; font-weight: bold; }
/*.bgsun    {text-align: center; color: #fff;background:#ff5151; font-weight:bold; height:<?php echo $cellh; ?>px; width:<?php echo $cellw; ?>px; }
.bgsat  {text-align: center; color: #fff;font-weight:bold;background:#3862ff;  height:<?php echo $cellh?>px; width:<?php echo $cellw; ?>px; }
.bgweek   {text-align: center;color: #fff;font-weight:bold;background:#666;  height:<?php echo $cellh?>px; width:<?php echo $cellw; ?>px; }*/
.bgsun    { font-size: 17px; text-align: center; color: #ff5151; font-weight: bold; height: <?php echo $cellh;?>px; width: <?php echo $cellw; ?>px; }
.bgsat    { font-size: 17px; text-align: center; color: #3862ff; font-weight :bold; height: <?php echo $cellh?>px; width: <?php echo $cellw; ?>px; }
.bgweek   { font-size: 17px; text-align: center; color: #333; font-weight: bold; height: <?php echo $cellh?>px; width: <?php echo $cellw; ?>px; }
/*.selDay { background: #FF8040; height: <?php echo $cellh?>px; line-height: 200%; overflow: hidden; }*/
.selDay { background: #FF8040; width: 29px; height: 29px; line-height: 240%; overflow: hidden; border-radius: 19px; padding: 0; margin: auto; }
.selDay a.writeday { color: #fff !important; font-size: 17px; display: block; width: 100%; height: 100%; }
p.title     { font-size: 1em; font-weight:bold; }
p.sunday    { text-align: center; color: #FF0000; font-size: 17px; }
p.saturday  { text-align: center; color: #3366CC; font-size: 17px; }
p.weekday   { text-align: center; color: #333; font-size: 17px; }
a:link.writeday, a:visited.writeday  {text-align: center;  color: #0000FF;}
img {border:0}
@media(max-width:767px){
        .cal {margin-bottom: 0px; padding:13px 0; /*border-left:solid 1px #628bc5;  border-right:solid 1px #628bc5;  border-bottom:solid 1px #628bc5;*/ background:#f8f8f8;}
        td.title    { text-align: center; height: <?php echo $cellh; ?>px; font-weight: bold; }
        td.invalid  { text-align: center; padding-top: 2px; height: 25px; width: 53px;}
        td.valid    { text-align: center; height: 25px; width: 53px; }
        td.today    { text-align: center; height: 25px; width: 53px; font-weight: bold; }
        .bgsun    { font-size: 13px; text-align: center; color: #ff5151; font-weight: bold; height: 25px; width: 53px; }
        .bgsat    { font-size: 13px; text-align: center; color: #3862ff; font-weight :bold; height: 25px; width: 53px; }
        .bgweek   { font-size: 13px; text-align: center; color: #333; font-weight: bold; height: 25px; width: 53px; }
        .selDay { background: #FF8040; width: 19px; height: 19px; line-height: 150%; overflow: hidden; border-radius: 19px; padding: 0; margin: auto; }
        .selDay a.writeday { color: #fff !important; font-size: 11px; display: block; width: 100%; height: 100%; }
        p.title     { font-size: 1em; font-weight:bold; }
        p.sunday    { text-align: center; color: #FF0000; font-size: 13px; }
        p.saturday  { text-align: center; color: #3366CC; font-size: 13px; }
        p.weekday   { text-align: center; color: #333; font-size: 13px; }
}
</style>
<?php
$hp_latest_skin = explode("skin/latest/",$latest_skin_url);
//echo $hp_latest_skin[1];
$latest_dir = $hp_latest_skin[1];
$today = getdate();
$b_mon = $today['mon'];
$b_day = $today['mday'];
$b_year = $today['year'];
if ($year < 1) {
   $month = $b_mon;
   $mday = $b_day;
   $year = $b_year;
}
if ($_GET["year"]) {
    $year = $_GET["year"];
}
if ($_GET["month"]) {
    $month = $_GET["month"];
}
$lastday=array(0,31,28,31,30,31,30,31,31,30,31,30,31);
if ($year%4 == 0) $lastday[2] = 29;
$dayoftheweek = date("w", mktime (0,0,0,$month,1,$year));
?>
<div style="display:<?php if(is_mobile())echo 'none';?>;width:<?php echo is_mobile() ? 0 : 50?>%;float:left;">
    <div class="cal" style="">
        <table width= "100%" cellSpacing="2" cellPadding="0" border="0" align="center">
            <tr style="border-bottom: 1px solid #ccc;">
                <td align="center" class="bgsun">일</td>
                <td align="center" class="bgweek">월</td>
                <td align="center" class="bgweek">화</td>
                <td align="center" class="bgweek">수</td>
                <td align="center" class="bgweek">목</td>
                <td align="center" class="bgweek">금</td>
                <td align="center" class="bgsat">토</td>
            </tr>
            <tr>
                <td colspan="7" bgcolor="#DDDDDD"></td>
            </tr>
            <?php
            $cday = 1;
            $sel_mon = sprintf("%02d", $month);
            $query = "SELECT * FROM " . $g5['write_prefix'] . $bo_table . " WHERE LEFT(wr_1, 6) <= '" . $year . $sel_mon . "' AND LEFT(wr_2, 6) >= '" . $year . $sel_mon . "' ORDER BY wr_id ASC";
            $result = sql_query($query);
            // Reset arrays
            $html_day = array_fill(1, 31, false);
            $start_day = array_fill(1, 31, 1);
            $end_day = array_fill(1, 31, 1);
            while ($row = sql_fetch_array($result)) {
                $start_date = substr($row['wr_1'], 0, 6);
                $end_date = substr($row['wr_2'], 0, 6);
                for ($i = max($start_date, $year . $sel_mon); $i <= min($end_date, $year . $sel_mon); $i++) {
                    $day = (int)substr($i, 6, 2);
                    $html_day[$day] = true;
                }
            }
            $temp = 7 - (($lastday[$month] + $dayoftheweek) % 7);
            if ($temp == 7) {
                $temp = 0;
            }
            $lastcount = $lastday[$month] + $dayoftheweek + $temp;
            for ($iz = 1; $iz <= $lastcount; $iz++) {
                $offset = $iz % 7;
                if ($offset == 1) {
                    echo ("<tr>\n");
                }
                if ($dayoftheweek < $iz && $iz <= $lastday[$month] + $dayoftheweek) {
                    $cstyle = 'valid';
                    $dstyle = 'weekday';
                    if ($b_year == $year && $b_mon == $month && $b_day == $cday) {
                        $cstyle = 'today';
                    }
                    if ($offset === 1) {
                        $dstyle = 'sunday';
                    } elseif ($offset === 0) {
                        $dstyle = 'saturday';
                    }
                    $daytext = "$cday";
                    echo ("<td class='" . $cstyle . "'>");
                    if ($html_day[$cday]) {
                        echo ("<p class='selDay'>");
                        echo ("<a href=\"javascript:nowDayList('{$bo_table}','{$year}','{$month}','{$cday}','{$options["mobile"]}')\" class='writeday'>");
                        echo ("<b>" . $daytext . "</b>");
                        echo ("</a>");
                        echo ("</p>");
                    } else {
                        echo ("<p class='" . $dstyle . "'>" . $daytext . "</p>");
                    }
                    echo ("</td>\n");
                    $cday++;
                } else {
                    echo ("<td class='invalid'> </td>\n");
                }
                if (($iz % 7) === 0) {
                    echo ("</tr>\n");
                }
            }
            ?>
        </table>
    </div>
</div>
<style>
    #changeNowListBox { padding: 12px 12px; height: 254px; width: 100%; }
    #changeNowListBox .NowListBoxYear { font-size: 19px; font-weight: 600; color: #f9aa83; text-align: left; padding: 0px 0px 2px; }
    #changeNowListBox .NowListBoxYear::after { content: "\f073"; font-family: "Font Awesome 5 Free"; font-size: 50px; position: relative; top: 25px; right: -133px; }
    #changeNowListBox .NowListBoxMonthDay { font-size: 21px; font-weight: 600; color: #ff8040; text-align: left; padding: 0px 0px 5px; border-bottom: 3px solid #ff8040; }
    #changeNowListBox table {  padding: 3px 0 0 0; /* width: 260px; */ table-layout: fixed; }
    #changeNowListBox table tr {  }
    #changeNowListBox table tr td { width: 260px;  font-size: 15px; font-weight: 600; color: #ff8040; text-align: left; padding: 5px 0px 3px; /* white-space: nowrap; */ text-overflow: ellipsis; overflow: hidden; }
    .NowListUl {margin-left: 15px;}
    .NowListUl li {list-style: disc;font-size: 15px; font-weight: 600; color: #00000; text-align: left;padding: 5px 0px 3px;}
    .more_ { position: absolute; top: 53px; right: 25px; }
    .more_ a { font-size: 31px; font-weight: 700; color: #ff8040; }
    @media(max-width:767px){
        #changeNowListBox { padding: 12px 12px; height: 178px; width: 100%; position: relative; }
        #changeNowListBox .NowListBoxYear { font-size: 11px; font-weight: 600; color: #ff8040; text-align: left; padding: 0px 0px 2px; }
        /*#changeNowListBox .NowListBoxYear::after { content: "\f073"; font-family: "Font Awesome 5 Free"; font-size: 32px; position: absolute; top: 408px; right: 32px; }*/
        #changeNowListBox .NowListBoxYear::after { content: "\f073"; font-family: "Font Awesome 5 Free"; font-size: 23px; position: absolute; top: 22px; right: 18px; }
        #changeNowListBox .NowListBoxMonthDay { font-size: 13px; font-weight: 600; color: #ff8040; text-align: left; padding: 0px 0px 5px; border-bottom: 3px solid #ff8040; }
        #changeNowListBox table {  padding: 3px 0 0 0; width: 152px; table-layout: fixed; }
        #changeNowListBox table tr {  }
        #changeNowListBox table tr td { width: 152px; font-size: 10px; font-weight: 600; color: #ff8040; text-align: left; padding: 2px 0px 1px; /* white-space: nowrap; */ text-overflow: ellipsis; overflow: hidden; }
        .more_ { position: absolute; top: -5px; right: 5px; }
        .more_ a { font-size: 21px; font-weight: 700; color: #ff8040; }
    }
</style>
<div class="" style="width: <?php echo is_mobile() ? 100 : 50 ?>%; float: left;;overflow: auto;background: #ffffff; ">
    <div id="changeNowListBox">
        <div class="NowListBoxYear"><?= date("Y년"); ?><div class="more_"><a href="/bbs/board.php?bo_table=0403<?= $options["mobile"] ? "&mode=week" : "" ?>"> + </a></div></div>
        <div class="NowListBoxMonthDay"><?= date("m월 d일")?> <?php $yoil_text_set = array("일요일","월요일","화요일","수요일","목요일","금요일","토요일"); $yoil = $yoil_text_set[date('w', strtotime(date("Y-m-d")))]; echo $yoil; ?></div>
        <?php
        $myListSql = "select * from ".$g5['write_prefix'].$bo_table." where left(wr_1,8) <= '".$year.$sel_mon[i].sprintf("%02d",$mday)."'  and left(wr_2,8) >= '".$year.$sel_mon[i].sprintf("%02d",$mday)."'  order by wr_id asc";
        $myListRes = sql_query($myListSql);
        ?>
        <ul class="NowListUl">
    <?php if (sql_num_rows($myListRes) > 0) : ?>
        <?php while($row = sql_fetch_array($myListRes)) :
            switch ($row["wr_9"])
            {
                case "background:rgb(243,80,85)":
                    $tmpName = "[이천IL]";
                  break;
                case "background:rgb(131,183,48);":
                    $tmpName = "[서비스지원국]";
                  break;
                case "background:rgb(249, 188, 35);":
                    $tmpName = "[여성장애인교육팀]";
                  break;
                case "background:rgb(66,174,220);":
                    $tmpName = "[체험홈]";
                  break;
                case "background:rgb(128, 65, 217);":
                    $tmpName = "[주간활동]";
                  break;
                case "background:rgb(1, 0, 225);":
                    $tmpName = "[방과후활동]";
                  break;
            }
        ?>
        <li>
            <div style="display: inline;"><?= $tmpName ?><?= $row["wr_subject"] ?></div>
        </li>
        <?php endwhile ?>
    <?php else : ?>
        <li>
            <div style="display: inline;">오늘은 일정이 없습니다.</div>
        </li>
    <?php endif; ?>
</ul>
    </div>
</div>
<script>
function nowDayList(bo_table, tmpYear, tmpMonth, tmpDay, tmpMobile)
{
    $.post("<?= $latest_skin_url ?>/nowDayList.php", {"bo_table" : bo_table, "tmpYear" : tmpYear, "tmpMonth" : tmpMonth, "tmpDay" : tmpDay, "tmpMobile" : tmpMobile},function(res){
        $("#changeNowListBox").html(res);
    });
}
</script>

 

이 질문에 댓글 쓰기 :

답변 1

<div style="width: <?php echo is_mobile() ? '0' : '50%'; ?>; float: left;">

해보시겠나요

PC에선 체크박스 보이게 하면서 일정 내용도 보이게 하며, 모바일에선 일정내용만 보이게 작업을 했는데 일정내용은 등록이 되어있는데 주황색 동그라미 체크표시가 안뜨는거에요.

<?php if (!is_mobile()): ?>
    <div style="display:block;width:50%;float:left;">
PC
    </div>
<?php endif; ?>

<div style="display:block;width:<?php echo is_mobile() ? '100%' : '50%'; ?>;float:left;">
모바일
</div>

이런식으로 나누셔야할듯해요

모두 무시하시고, 원본에서 아래 부분만 바꾸세요.
<div style="width:<?php echo is_mobile() ? 0 : 50?>%;float:left;">
이 부분을


<?php if(is_mobile()){ ?>
<div style="display:none">
<?php } else { ?>
<div style="width:50%;float:left;">
<?php } ?>

이미 고쳐드렸고 제가 휴대폰으로 답변드리느라 잘못봤는데, 간단하게 CSS만 수정하면 되던 부분이였으며 모바일의 경우 cal 클라스를 숨겼고 changeNowListBox 의 parent 의 길이를 100% 로 해서 해결했습니다.

<?php if(is_mobile()){ ?>
<div style="display:none">
<?php } else { ?>
<div style="width:50%;float:left;">
<?php } ?>

이렇게 하시면 달력뿐만 아니라 일정까지 안보이게 됩니다.

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

회원로그인

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