ÿØÿà JFIF ` ` ÿþ
Server : Apache System : Linux ruga7-004.fmcity.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : tkt_travelbus ( 1137) PHP Version : 7.0.0p1 Disable Function : mysql_pconnect Directory : /tkt_travelbus/www/admin/res_good/ |
Upload File : |
<?php include_once $_SERVER['DOCUMENT_ROOT'].'/Lib/config.php'; include_once $_SERVER['DOCUMENT_ROOT'].'/admin/include/top_m.html'; /***** 달력 환경설정 (시작) *****/ // 달력 배경 설정 $cal_bg = "/js/ajaxcalendar/cal_bg.gif"; // 요일 영문 (기본) // 달력 글자 색상 $cal_day_color = "#464646"; // 평일 // $cal_day_color = "#fff"; // 평일 $cal_sat_color = "#0066CC"; // 토요일 $cal_sat_color = "#FF0000"; // 토요일 $cal_sun_color = "#FF0000"; // 일요일(공휴일) $cal_today_color = "#2C852C"; // 오늘 $cal_today_color = "#464646"; // 오늘 $cal_none_color = "#BBBBBB"; // 비활성일 // 마지막 날,요일 설정 $cal_lastday = array(1=>31,28,31,30,31,30,31,31,30,31,30,31); // 각 달의 마지막 날 지정 $yyoil = array("일","월","화","수","목","금","토"); // 요일명 지정 /***** 달력 초기화 *****/ // 오늘 $cal_now_yy = (int)date("Y"); $cal_now_mm = (int)date("m"); $cal_now_dd = (int)date("d"); // 파라메터 if (!$yy) $yy = (int)date("Y"); if (!$mm) $mm = (int)date("m"); $sdate = $sdate; // 달력 시작일 $edate = $edate; // 달력 종료일 $format = $format; // 출력 포멧 // 공통 파라메터 $cal_param = "&sdate={$sdate}&edate={$edate}&format={$format}"; // 윤년 계산을 통해 2월의 마지막 날 계산 if ($yy % 4 == 0 && $yy % 100 != 0 || $yy % 400 == 0) { $cal_lastday[2] = 29; } // 전해까지 평년 기준으로 날짜수 계산 및 윤년의 횟수를 더함 $cal_total = ($yy-1)*365+(int)(($yy-1)/4) - (int)(($yy-1)/100) + (int)(($yy-1)/400); // 해당월의 1일 for ($i=1; $i<$mm; $i++) { $cal_total += $cal_lastday[$i]; // 전달까지의 날짜수 더함 } $cal_total++; // 그 달의 1일 $cal_startday = $cal_total % 7; // 시작 요일을 구함 (0:일요일,...,6:토요일) // 해당월의 마지막 날짜 $cal_endday = $cal_lastday[$mm]; // DB용 년월 (YYYY-MM); $cur_month = $yy . "-" . str_pad($mm, 2, "0", STR_PAD_LEFT); /***** 이전달, 다음달 *****/ if ($mm == 12) { $cal_ny = $yy + 1; // 다음년 $cal_nm = 1; // 다음월 $cal_py = $yy; // 이전년 $cal_pm = $mm - 1; // 이전월 } elseif ($mm == 1) { $cal_ny = $yy; $cal_nm = $mm + 1; $cal_py = $yy - 1; $cal_pm = 12; } else { $cal_ny = $yy; $cal_nm = $mm + 1; $cal_py = $yy; $cal_pm = $mm - 1; } // 링크 $cal_prev_href = "document.location.href = '{$PHP_SELF}?mb_id={$mb_id}&yy={$cal_py}&mm={$cal_pm}&{$cal_param}&siteType={$siteType}';"; // 이전달 $cal_next_href = "document.location.href = '{$PHP_SELF}?mb_id={$mb_id}&yy={$cal_ny}&mm={$cal_nm}{$cal_param}&siteType={$siteType}';"; // 다음달 // 휴일 $sql = "SELECT * FROM TB_HOLIDAY ORDER BY holiday_date ASC"; $rs = db_query($sql); $holidayData = array(); $calendarHolidayData = array(); $calendayNationList = array(); while($row = db_fetch_array($rs)){ array_push($holidayData, $row); $calendarHolidayData[$row['holiday_date']][$row['nation']] = $row; array_push($calendayNationList, $row['nation']); } //한국 키값제거 $calendayNationList = array_unique($calendayNationList); $koKey = array_search( 'ko', $calendayNationList ); array_splice( $calendayNationList, $koKey, 1 ); //출발 데이터 $data_bc_tb = TO_get_bc("","N"," and b_lang='ko' and tab in ('P') AND b_uid NOT IN(162, 114)"); //162 픽업/샌딩, 114버스렌트 // $data_bc_tk = TO_get_bc("","N"," and b_lang IN ('en','cn','hk','ag') and tab in ('D','P') AND b_uid NOT IN(127,130,135,138,143,124)"); //127 Airport transfer, 130 Car rental, 135 机场接送, 138 客制化行程, 143 機場接送, 124 客製化行程 $data_bc_tk = TO_get_bc("","N"," and b_lang IN ('en','cn','hk','ag') and tab in ('D','P') AND b_uid NOT IN(127,135,143)"); //127 Airport transfer, 130 Car rental, 135 机场接送, 138 客制化行程, 143 機場接送, 124 客製化行程 //$data_bc_tk = TO_get_bc("","N"," and tab in ('D','P')"); //127 Airport transfer, 130 Car rental, 135 机场接送, 138 客制化行程, 143 機場接送, 124 客製化行程 $allBuid = ""; $tbBuid = ""; $tkBuid = ""; foreach($data_bc_tk as $item){ if(!$allBuid){ $allBuid .= $item['b_uid']; }else{ $allBuid .= ','.$item['b_uid']; } if(!$tkBuid){ $tkBuid .= $item['b_uid']; }else{ $tkBuid .= ','.$item['b_uid']; } } foreach($data_bc_tb as $item){ if(!$allBuid){ $allBuid .= $item['b_uid']; }else{ $allBuid .= ','.$item['b_uid']; } if(!$tbBuid){ $tbBuid .= $item['b_uid']; }else{ $tbBuid .= ','.$item['b_uid']; } } if(!$siteType){ $siteType = "all"; } $sqlWhere = ""; if($siteType == 'all'){ $sqlWhere = " AND b_uid IN ({$allBuid}) AND is_depart_schedule_show = 'Y' "; }else if($siteType == 'tk'){ //번체 간체 영어 $sqlWhere = " AND b_uid IN ({$tkBuid}) AND is_depart_schedule_show = 'Y' "; }else if($siteType == 'tb'){ $sqlWhere = " AND b_uid IN ({$tbBuid}) AND is_depart_schedule_show = 'Y' "; } $startDateList = array(); if(!$yy){ $yy = date("Y"); } if(!$mm){ $mm = date("m"); } $startDateTimeStamp = strtotime($yy.'-'.$mm.'-01'); $endDateTimeStamp = strtotime($yy.'-'.$mm.'-31'); if(!$endDateTimeStamp){ $endDateTimeStamp = strtotime($yy.'-'.$mm.'-30'); } if(!$endDateTimeStamp){ $endDateTimeStamp = strtotime($yy.'-'.$mm.'-29'); } if(!$endDateTimeStamp){ $endDateTimeStamp = strtotime($yy.'-'.$mm.'-28'); } if(!$endDateTimeStamp){ $endDateTimeStamp = strtotime($yy.'-'.$mm.'-27'); } $strDate = date("Y-m-d", $startDateTimeStamp); $startDateList[$strDate] = array(); while(true){ $startDateTimeStamp += 86400; $strDate = date("Y-m-d", $startDateTimeStamp); $startDateList[$strDate] = array(); if($startDateTimeStamp >= $endDateTimeStamp){ break; } } //셔틀버스 예약건만 나오게끔 $sqlWhere .= " AND m_uid NOT IN (389,449,300,383,321,395,448,296)"; $goodList = good_list($sqlWhere); $guidListIn = ""; $goodInfoData = array(); foreach($goodList as $item){ $goodInfoData[$item['g_uid']] = $item; if(!$guidListIn){ $guidListIn = $item['g_uid']; }else{ $guidListIn .= ",".$item['g_uid']; } } $d_startValue = $yy.'-'.$mm; $mmm = $mm; if(strlen($mm) == 1){ $mmm = '0'.$mm; $d_startValue = $yy.'-'.$mmm; } $sqlWhereDate = " AND ev_start LIKE '{$d_startValue}%'"; //행사 $goodDataDateList = array(); $sql = "SELECT * FROM TB_RES_GOOD WHERE g_uid IN ({$guidListIn}) {$sqlWhereDate} AND order_state IN ('B','F')"; $rs = db_query($sql); $resList = array(); // 예약목록 $resNoListIn = ""; //예약리스트 생성 $goodTitle = array(); while($row = db_fetch_array($rs)){ $goodTitle[$row['g_uid']] = array( 'g_title' => $row['g_title'], 'wait_depart' => $goodInfoData[$row['g_uid']]['wait_depart'], ); if(!$resNoListIn){ $resNoListIn = "'".$row['res_no']."'"; }else{ $resNoListIn .= ",'".$row['res_no']."'"; } } $dUidList = ""; if($resNoListIn){ $sql = "SELECT count(*) AS total, res_no, ev_start, g_uid, ev_uid FROM TB_RES_GOOD_PERSON WHERE res_no IN ({$resNoListIn}) GROUP BY res_no"; $rs = db_query($sql); while($row = db_fetch_array($rs)){ if(!isset($startDateList[$row['ev_start']][$row['g_uid']])){ $startDateList[$row['ev_start']][$row['g_uid']] = array( 'd_ok_A' => (int) $row['total'], 'g_title' => $goodTitle[$row['g_uid']]['g_title'], 'wait_depart' => $goodTitle[$row['g_uid']]['wait_depart'], 'g_uid' => $row['g_uid'], 'd_uid' => $row['ev_uid'], ); if(!$dUidList){ $dUidList = $row['ev_uid']; }else{ $dUidList .= ",".$row['ev_uid']; } }else{ $startDateList[$row['ev_start']][$row['g_uid']]['d_ok_A'] += (int) $row['total']; } } } $privateDepartData = array(); $mmm = $mm; if(strlen($mm) == 1){ $mmm = '0'.$mm; } $calendarDateFind = $yy.'-'.$mmm; $sql = "SELECT * FROM TB_PRIVATE_DEPART WHERE calendar_date LIKE '{$calendarDateFind}%' AND isShow = 'Y' AND site_type = '{$siteType}'"; $sql = "SELECT * FROM TB_PRIVATE_DEPART WHERE calendar_date LIKE '{$calendarDateFind}%' AND isShow = 'Y'"; $rs = db_query($sql); while ($row = db_fetch_array($rs)) { if(isset($privateDepartData[$row['calendar_date']])){ array_push($privateDepartData[$row['calendar_date']], $row); }else{ $privateDepartData[$row['calendar_date']] = array(); array_push($privateDepartData[$row['calendar_date']], $row); } } $getTourDepartResBusInfo = getTourDepartResBusInfo($dUidList); $iconName = "check"; $getValue = explode("?",$_SERVER['REQUEST_URI']); if($getValue){ $getValue = '?'.$getValue[1]; } ?> <script> $(window).load(function(){ $('.tourCalendarSearchBtn').click(function(){ if($('#searchInputArea').css('display') == 'none'){ $('#searchInputArea').slideDown('fast'); $('main').css('margin-top','91px'); }else{ $('#searchInputArea').slideUp(); $('main').css('margin-top','65px'); $('.ev_list').show(); } }) $('#searchInputAreaWrap button').click(function(){ $('#searchInputArea').slideUp(); $('main').css('margin-top','65px'); $('.ev_list').show(); }) //검색기능 $('#searchInput').keyup(function(){ $('.ev_list').show(); searchKeyword = $(this).val(); if(searchKeyword != ''){ document.getElementsByTagName('tbody')[0].getElementsByTagName('td').length for(i = 0; i < document.getElementsByTagName('tbody')[0].getElementsByTagName('td').length; i++){ for(n = 0; n < document.getElementsByTagName('tbody')[0].getElementsByTagName('td')[i].getElementsByClassName('ev_list').length; n++){ isRowView = false; if(document.getElementsByTagName('tbody')[0].getElementsByTagName('td')[i].getElementsByClassName('ev_list')[n].getElementsByClassName('g_title').length > 0){ if(document.getElementsByTagName('tbody')[0].getElementsByTagName('td')[i].getElementsByClassName('ev_list')[n].getElementsByClassName('g_title')[0].innerText.indexOf(searchKeyword) >= 0){ isRowView = true; }else{ isRowView = false; } if(!isRowView){ document.getElementsByTagName('tbody')[0].getElementsByTagName('td')[i].getElementsByClassName('ev_list')[n].style.display = 'none'; } } } } } }) }) </script> <style> </style> <header> <input type="hidden" id="mb_id" value="<?=$TK_MEMBER['mb_id']?>" /> <div id="yearControlArea"> <div class="year_wrap"> <i class="calendarMonthBeforeBtn xi-caret-up-circle xi-rotate-270" alt="이전달" title="이전달" style="" onclick="<?=$cal_prev_href?>" id="cal_pre_month"></i> <input class="cal_year" type="month" id="dateYear" name="" value="<?=$yy?>-<?=((strlen($mm) == 1) ? '0'.$mm : $mm)?>" /> <i class="calendarMonthNextBtn xi-caret-up-circle xi-rotate-90" alt="다음달" title="다음달" style="" onclick="<?=$cal_next_href?>" id="cal_next_month"></i> </div> <div id="calendarFuncBtnArea"> <i class="xi-magnifier tourCalendarSearchBtn"></i> <a href="/admin/res_good/res_cal_list_row_m.html<?=$getValue?>"><p class="viewType">월별</p></a> <a href="/admin/res_good/res_cal_list_row_m.html<?=$getValue?>"> <i class="xi-calendar-<?=$iconName?> tourCalendarDayListBtn" ></i> </a> </div> </div> <div id="searchInputArea"> <div id="searchInputAreaWrap"> <input type="text" name="" id="searchInput" placeholder="검색어를 입력하세요." /> <button>X</button> </div> </div> </header> <main> <div id="calendarArea"> <table id="calendarTable" cellspacing="1" style="table-layout:fixed; "> <thead> <tr> <?php $thWidth = "14.2%" ?> <!--<th width="<?/*=$thWidth*/?>">일</th> <th width="<?/*=$thWidth*/?>">월</th> <th width="<?/*=$thWidth*/?>">화</th> <th width="<?/*=$thWidth*/?>">수</th> <th width="<?/*=$thWidth*/?>">목</th> <th width="<?/*=$thWidth*/?>">금</th> <th width="<?/*=$thWidth*/?>">토</th>--> <th>일</th> <th>월</th> <th>화</th> <th>수</th> <th>목</th> <th>금</th> <th>토</th> </tr> </thead> <tbody> <?php // $day_num 변수 초기화 $day_num = 0; for ($i=1; $i<=6; $i++) { // 1주 ~ 마지막주 - 최대 6주까지 있음 echo "<tr>\n"; for ($j=0; $j<7; $j++) { // 요일 if ($i == 1 && $cal_startday > 0) { // 첫주의 빈공간 for ($k=0; $k<$cal_startday; $k++) { echo "<td> </td>\n"; // 첫주의 빈공간을 표시함 $j++; // 빈공간 만큼 요일 증가 } // 빈공간을 다 채었으므로 2주차부터는 일요일(0)부터 시작함, // 이렇게 안하면 첫주에는 날짜 사이마다 빈공간 입력됨 $cal_startday = 0; } // 일자 증가 $day_num++; // 달력 배경 색상 $cal_bgcolor = "#FFFFFF"; // 마우스 아웃 $cal_over_bgcolor = "#fffde1"; // 마우스 오버 $cal_over_bgcolor = "#FFFFFF"; // 마우스 오버 // 오늘 판단 $is_today = false; if ($yy == $cal_now_yy && $mm == $cal_now_mm && $day_num == $cal_now_dd) { $is_today = true; } // 요일별 출력 if ($j == 0) { // 일요일 $day_color = $cal_sun_color; } elseif ($j == 6) { // 토요일 $day_color = $cal_sat_color; } else { // 평일 $day_color = $cal_day_color; } $todayEffectClass = ""; // 오늘 설정 if ($is_today == true) { // 오늘 $day_color = $cal_today_color; $cal_bgcolor = "#fffde1"; $cal_bgcolor = "#fcfbe8"; $cal_bgcolor = "#f2d73d"; //오늘 배경 $cal_bgcolor = "#fffd76"; //오늘 배경 $cal_bgcolor = "#ffffff"; //오늘 배경 $cal_textColor = "#fff"; $todayEffectClass = "todayEffect"; } // full_day 설정 $full_day = date("Y-m-d", strtotime($yy . "-" . $mm . "-" . $day_num)); // 출력 포멧 설정 // 필요한 출력 포멧을 직접 추가하면됨 (20100419 ) $format_day = $full_day; switch ($format) { case "1": $format_day = $format_day; break; // YYYY-MM-DD case "2": $format_day = str_replace("-", "", $format_day); break; // YYYYMMDD } // 근무일 강조 표시 if($working[$full_day]){ if(isset($working[$full_day]['F'])){ $cal_bgcolor = "#e0fafb"; } else if(isset($working[$full_day]['H'])){ $cal_bgcolor = "#e0fafb"; } else { $cal_bgcolor = "#fffcdd"; } } // day_event 설정 // $day_event = " onmouseover=\"this.style.backgroundColor='{$cal_over_bgcolor}';addPrivateDate('{$full_day}'); \" onmouseout=\"this.style.backgroundColor='{$cal_bgcolor}'\" "; // $day_event = " onmouseover=\"this.style.backgroundColor='{$cal_over_bgcolor}';\" onmouseout=\"this.style.backgroundColor='{$cal_bgcolor}'\" "; // $day_event = " onmouseover=\"this.style.color='{$cal_textColor}';\" class=\"{$todayEffectClass}\" "; $day_event = " onmouseover=\"addPrivateDate('{$full_day}'); \" onmouseout=\"\" "; $day_event = " onmouseover=\"\" "; $day_event = " onmouseover=\"\" class=\"{$todayEffectClass}\" "; // $day_event = ""; // 날짜 기간 체크 (시작일) if ($sdate) { // 비활성 판단 if ($sdate > $full_day) { $day_color = $cal_none_color; $day_event = ""; } } // 날짜 기간 체크 (종료일) if ($edate) { if ($edate < $full_day) { $day_color = $cal_none_color; $day_event = ""; } } // 공휴일 $isCalendarHoliday = false; $idxMonth = $mm; $idxDay = $day_num; if(strlen($idxMonth) == 1){ $idxMonth = '0'.$idxMonth; } if(strlen($idxDay) == 1){ $idxDay = '0'.$idxDay; } $srchHolidayCalendarIdx = $yy.'-'.$idxMonth.'-'.$idxDay; if(isset($calendarHolidayData[$srchHolidayCalendarIdx]['ko'])){ $isCalendarHoliday = $calendarHolidayData[$srchHolidayCalendarIdx]['ko']; $day_color = "red"; } // 날짜 출력 echo "<td class='tdArea{$day_num}' align='center' " . $day_event . " style='background-color:" . $cal_bgcolor . "'>"; echo "<span class='dayNumWrap' style='color:" . $day_color . ";' onclick=\"thisDayPopup({$day_num})\">"; echo "<p style='color:{$day_color};' class='dayNum ".(($is_today) ? 'dayNumToday' : '')."'>".$day_num."</p>"; echo (($isCalendarHoliday) ? '<p class="koHoliday" style="width:unset">'.$isCalendarHoliday['holiday_name'].'</p>' : ''). "</span>"; foreach($calendayNationList as $nationName){ if(isset($calendarHolidayData[$srchHolidayCalendarIdx][$nationName])){ $isCalendarHoliday = $calendarHolidayData[$srchHolidayCalendarIdx][$nationName]; $day_color = $cal_sat_color; echo (($isCalendarHoliday) ? '<p class="holiday" style="color:'.$day_color.';">'.$isCalendarHoliday['holiday_name'].'</p>' : ''); } } echo "<div class='schedule2' style=''>"; ?> <div class="view_content" style='' date='<?=$full_day?>'> <?php $day_num2len = ((strlen($day_num) == 1) ? '0'.$day_num : $day_num); $mm = ((strlen($mm) == 1) ? '0'.$mm : $mm); $isBusTourViewSeq = 1; foreach($startDateList[$yy.'-'.$mm.'-'.$day_num2len] as $item2){ $titleCutStr = mb_substr($item2['g_title'], 0, 9); if($item2['d_ok_A'] >= $item2['confirmed_depart']){ ?> <div class="ev_list" id="ev_content_<?=$item2['d_uid']?>" seq="<?=$isBusTourViewSeq?>" style="<?=(($getTourDepartResBusInfo[$item2['d_uid']]['tourTypeColor']) ? "background:{$getTourDepartResBusInfo[$item2['d_uid']]['tourTypeColor']}" : '')?>"> <?php if($getTourDepartResBusInfo[$item2['d_uid']]['chk_res_bus'] == 'Y'){ ?> <i class="xi-bus busRed" onclick="evBusResWin('<?=$item2['d_uid']?>',<?=$isBusTourViewSeq?>)" id="busIco<?=$item2['d_uid']?>" ></i> <?php } else { ?> <i class="xi-bus busGray" onclick="evBusResWin('<?=$item2['d_uid']?>',<?=$isBusTourViewSeq?>)" id="busIco<?=$item2['d_uid']?>"></i> <?php } ?> <a class="tourResLink" onclick="to_dialog.iframe('/admin/res_good/cal_res_data_list.html?order_state_ss=B&search_box_s=simple&search_key_s=g_uid&search_word_s=<?=$item2['g_uid']?>&mode_period_s=ev_start&date_s1=<?=$full_day?>&date_s2=<?=$full_day?>','예약자정보','100%','600',true,true,'yes');return false" href="" class="ev_link ev_link_<?=$item2['g_uid']?>" gUid="<?=$item2['g_uid']?>" dUid="<?=$item2['d_uid']?>" target="_blank"> <p class="g_title" style="<?=(($getTourDepartResBusInfo[$item2['d_uid']]['tourTypeColor'] == '#4984d9' || $getTourDepartResBusInfo[$item2['d_uid']]['tourTypeColor'] == '#333333' || $getTourDepartResBusInfo[$item2['d_uid']]['tourTypeColor'] == '#ff9c71') ? "color:#eee" : "color:#000")?>"><?=$titleCutStr?></p> <p class="ev_people_res_info" style="<?=(($getTourDepartResBusInfo[$item2['d_uid']]['tourTypeColor'] == '#4984d9' || $getTourDepartResBusInfo[$item2['d_uid']]['tourTypeColor'] == '#333333' || $getTourDepartResBusInfo[$item2['d_uid']]['tourTypeColor'] == '#ff9c71') ? "color:#eee" : "color:#000")?>"> <?php echo " : ".$item2['d_ok_A']." / ".$item2['wait_depart']; // 행사 출발 데이터 ?> </p> </a> </div> <?php $isBusTourViewSeq += 1; } } ?> <?php $idx = 0; foreach($privateDepartData[$full_day] as $item){ $idx += 1; $titleCutStr = mb_substr(str_replace("_"," ",$item['title']), 0, 8) ?> <div class='ev_list' style='background:<?=$item['color']?>;<?=((count($privateDepartData[$full_day]) == $idx) ? 'margin-bottom:20px' : '')?>' onclick="to_dialog.iframe('privateDateOnly.php?seq=<?=$item['seq']?>','Private Tour','100%','600',true,true,'yes');return false"> <i class="xi-bus" style="color:<?=(($item['busResYN'] == 'Y') ? 'red' : '')?>"></i> <a class="tourResLink"> <p class="g_title" style="color:<?=(($item['color'] == '#ffec7f' || $item['color'] == '#ace1f0' || $item['color'] == '#cedf7f') ? '#000' : '#eee')?>"><?=$titleCutStr?></p> </a> </div> <?php } ?> </div> <?php echo "</div>"; //버스 예약끝 echo "</td>\n"; if ($day_num >= $cal_endday) { // 마지막 날짜 까지만 for ($h=$j; $h<6; $h++) { // 마지막 날짜 다음부터는 빈공간 출력 echo "<td> </td>\n"; // 마지막 날짜 다음부처 빈공간 } break; } } // 요일끝 echo "</tr>\n"; if ($day_num >= $cal_endday) { // 마지막 날짜 까지만, 이렇게 안하면 31일이 토요일인 경우 32일도 출력됨 break; } } // ~31 for 끝 ?> </tbody> </table> </div> <style> #resCalNormalPopup{} </style> <section id="resCalNormalPopup"> </section> <script> $(window).load(function(){ $('.modalBox button').click(function(){ closeModal(); }) $('#dateYear').change(function(){ dateYearValue = $(this).val(); console.log('dateYearValue is ' + dateYearValue); dateYearValue = dateYearValue.split("-"); dateYear = dateYearValue[0]; dateMonth = dateYearValue[1]; if(dateMonth.indexOf('0') >= 0){ dateMonth = dateMonth.replace("0",""); } console.log('/admin/res_good/res_cal_m.html?&yy='+dateYear+'&mm='+dateMonth); location.href = '/admin/res_good/res_cal_m.html?&yy='+dateYear+'&mm='+dateMonth; }) }) function resInfoPopup(){ } function thisDayPopup(day){ console.log(day); document.getElementById('tomoModal').setAttribute('class','workTomoModal'); $('#tomoModal .modalBox3 #modalContentsView').html($('.tdArea'+day+' .view_content').html()); $('#tomoModal').show(); $('#tomoModal .dateArea').text($('.cal_year').text() +' '+ day + '일'); } function closeModal(){ // document.getElementsByTagName('body')[0].style.overflow='auto'; document.getElementById('tomoModal').setAttribute('class',''); document.getElementById('tomoModal').style.display = 'none'; return; } </script> <style> #tomoModal.workTomoModal {display: none;position: fixed;width: 100%;height: 100%;left: 0;top: 0;z-index: 9999;background-color: rgba(0,0,0,.55);color: #fff;} .modalBox {text-align: center;position: absolute;top: 50%;left: 50%;-webkit-transform: translate(-50%,-50%);-ms-transform: translate(-50%,-50%);-o-transform: translate(-50%,-50%);transform: translate(-50%,-50%);width: 100%;overflow: hidden;} .modalBox button{float:right} .modalBox3 {background-color: #fff;color: #212121;position: relative;text-align: center;width: 80%;margin: 0 auto;padding: 10px;overflow: hidden;max-height: 100vh;overflow-y: scroll;} .modalBox3 .ev_list{clear:both;float:left;width:100%;min-height:12px;overflow:hidden; _background:skyblue;margin-bottom:2px;padding: 2px 0;border-radius: 4px;} .modalBox3 .ev_list .g_title{text-align:left;float:left;} .modalBox3 .ev_list .ev_people_res_info{float:left;} .modalBox3 .ev_list .xi-bus{float:left;} .modalBox3 button{float: right;background: #fff;border: 1px solid #ccc;padding: 4px 5px 2px;border-radius: 3px;} #modalContentsView{margin-top: 10px;float: left;width: 100%;clear: both;} #tomoModal .dateArea{text-align:left} </style> </main> <div id="tomoModal" class="workTomoModal"> <div class="modalBox"> <div class="modalBox3"> <button>X</button> <h2 class="dateArea"></h2> <div id="modalContentsView"> </div> </div> </div> </div> <footer></footer> </body> </html>