ÿØÿà 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/toadmin/agent_calculate/ |
Upload File : |
<? include "../include/top_agent.html"; //테이블명 $table = " TB_RES_HOTEL "; // 검색 설정 if(!$key_date2_s) $key_date2_s = date("Y-m-")."01"; if(!$key_date3_s) $key_date3_s = date("Y-m-d"); $date_between = count(date_to_date($key_date2_s , $key_date3_s)); if($date_between > 100) { echo("<script>alert('2달 이상 차이가남니다.');</script>"); $key_date2_s = date("Y-m-")."01"; $key_date3_s = date("Y-m-d"); } $sql_where = " "; $sql_where .= " and b.res_stat_cd not in('D') and b.agent_id='{$TO_MB[mb_id]}' "; if($key_date2_s and $key_date3_s) $sql_where .= " and b.res_dt between '{$key_date2_s}' and '{$key_date3_s}' "; // 리스트 수 가져옴 $sql = "select count(*) as total from TB_RES_HOTEL_ROOM a, TB_RES_HOTEL b where a.res_no=b.res_no {$sql_where} "; $row = db_fetch($sql); $total = $row[total]; // 정렬 설정 $sql_order=""; //배열에 저장 $data = array(); $data = res_hotel_roomdate($sql_where); ?> <div class="contents_wrap"> <div class="contents_wrap_in"> <div class="title">기간별 매출조회</div> <div class="contents_detail"> <div class="c_top_bar"> </div> <div class="reserve_wrap"> <!-- 폼 --> <form name="frm_search" id="frm_search" method="get" style="margin:0px;padding:0px;"> <input type="hidden" name="mode" value="<?=$mode?>"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="t_r_register"> <thead> <tr> <td colspan="2" class="t_top_line"></td> </tr> <tr> <td colspan="2" class="top_txt2">예약검색</td> </tr> </thead> <tbody> <tr> <th width="80">기간</th> <td class="input_lo"> <ul class="btn_day"> <li style="cursor:pointer;" onClick="$('#key_date2_s').val('<?=date("Y-m")?>-01');$('#key_date3_s').val('<?=date("Y-m-d")?>');">이번달</li> <li style="cursor:pointer;" onClick="$('#key_date2_s').val('<?=date("Y-m",strtotime(" -1 month"))?>-01');$('#key_date3_s').val('<?=date("Y-m",strtotime(" -1 month"))?>-31');">지난달</li> </ul> <div class="lo_left"> <div class="lo_left calendar_wrap"> <input name="key_date2_s" id="key_date2_s" type="text" class="calendar_input" size="12" onclick="AjaxCal(this,event);" value="<?=$key_date2_s?>" readonly/> </div> <span class="lo_left prl5">~</span> <div class="lo_left calendar_wrap"> <input name="key_date3_s" id="key_date3_s" type="text" class="calendar_input" size="12" onclick="AjaxCal(this,event);" value="<?=$key_date3_s?>" readonly/> </div> <input type="image" src="../image/btn/btn_search.gif" align="top" alt="검색" class="input_img" /> </div> </td> </tr> </tbody> </table> </form> <!-- /폼 --> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="t_r_list mt20"> <thead> <tr> <td colspan="13" class="t_top_line"></td> </tr> <tr> <th width="100">예약일</th> <th width="200">예약번호</th> <th>호텔명</th> <th width="150">룸타입</th> <th width="70">인원(성/아)</th> <th width="50">룸수</th> <th width="50">일수</th> <th width="120">판매가</th> </tr> </thead> <tbody> <? $inwon = 0; $room_cnt = 0; $lodg_cnt = 0; $price_total = 0; for($i=0 ; $i < count($data) ; $i++){ $row = $data[$i]; $num = $total - ($page - 1) * $line - $i; $inwon += $row['adult_num']+$row['child_num']; $room_cnt += $row['room_cnt']; $lodg_cnt += $row['lodg_day']; $price_total += $row['price_total']; ?> <tr height="30"> <td><?=$row['res_dt']?></td> <td><?=$row['res_no']?></td> <td><?=$row['hotel_nm']?></td> <td><?=$row['room_type']?></td> <td><?=($row['adult_num']+$row['child_num'])?>명 (<?=$row['adult_num']?>/<?=$row['child_num']?>)</td> <td><?=$row['room_cnt']?></td> <td><?=$row['lodg_day']?></td> <td><?=number_format($row['price_total'])?>원</td> </tr> <?}?> <tr height="30" style="font-weight:bold;"> <td colspan="4" style="text-align:right;padding-right:20px;"> 계</td> <td><?=$inwon?></td> <td><?=$room_cnt?></td> <td><?=$lodg_cnt?></td> <td><?=number_format($price_total)?>원</td> </tr> </tbody> </table> </div> </div> </div> </div> <? include "../include/footer.html" ?>