ÿØÿà 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/hotel_calculate/ |
Upload File : |
<? include "../include/top_hotel.html"; //테이블명 $table = " TB_ACCOUNT_HOTEL "; // 호텔회원과 해당호텔을 Match해줌 $data_hotel = hotel_fetch(" and seller_id='$TO_MB[mb_id]' "); // 검색 설정 $sql_where = " "; if($hotel_s) $sql_where = " and a.{$hotel_s} like '%{$search_word}%' "; $hseq_str = ""; for( $i=0,$j=count($data_hotel)-1 ; $i<count($data_hotel) ; $i++){ $hseq_str .= " '".$data_hotel[$i]['hseq']."' "; if( $i < $j){ $hseq_str .= ","; } } if( count($data_hotel) > 0 ) $sql_where .= " and a.hseq in (".$hseq_str.") "; // 데이터갯수 $sql = "select count(*) as total from ( select a.res_no,a.hseq,a.hotel_nm from TB_RES_HOTEL_ROOM a,TB_RES_HOTEL b where 0=0 {$sql_where} and a.res_no=b.res_no and b.res_stat_cd='C' group by a.res_no,a.hseq ) tb_acc "; $row = db_fetch($sql); $total = $row['total']; // 페이지수 설정 if (!$page) $page = 1; // 페이지 번호 $line = 20; // 보여줄 갯수 $list = 10; // 블럭 갯수 $total_page = ceil($total / $line); // 총페이지 if ($total == 0) $total_page = 1; // 데이터가 하나도 없으면 총페이지 1 if ($page > $total_page) $page = $total_page; // 페이지가 전체 페이지보다 크면 페이지 번호를 바꿈 $total_list = intval($total_page / $list); if ($total_page % $list == 0) $total_list--; $curr_list = intval($page / $list); if ($page % $list == 0) $curr_list--; $start_page = $curr_list * $list + 1; $prev_list = $start_page - $list; $next_list = $start_page + $list; $olds = $line * ($page - 1); // 정렬 설정 $sql_order=""; if($sort_obj_s) $sql_order = " tb_acc.{$sort_obj_s} {$sort_s}"; // 배열에 저장 $data = array(); $data = account_res_complete_hotel($sql_where,$sql_order,$olds,$line); ?> <div class="contents_wrap"> <div class="contents_wrap_in"> <div class="title">정산조회</div> <div class="contents_detail"> <div class="top_txt_s"> <div class="bar_wrap"> <p class="search_result_txt lo_left"><span><?=$total?></span> 건이 검색되었습니다.</p> </div> </div> <div class="calculate_wrap"> <!-- 폼 --> <form name="frm_search" id="frm_search" method="get" style="margin:0px;padding:0px;"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="t_c_list" summary="호텔별 정산현황을 검색하실 수 있습니다."> <caption>호텔별 정산현황 검색</caption> <thead> <tr> <td colspan="2" class="t_top_line"></td> </tr> <tr> <td colspan="2" class="top_txt">호텔별 정산현황</td> </tr> </thead> <tbody> <tr> <th width="60" scope="row">검색</th> <td class="input_lo"> <div class="lo_left"> <input name="hotel_s" id="hotel_2" type="radio" value="hotel_code" <?=($hotel_s=="hotel_code")?"checked":""?> /><label for="hotel_2">코드번호</label> </div> <div class="lo_left"> <label for="search_word" class="v_none2">검색어 입력</label> <input class="search_box search_box_bg" id="search_word" name="search_word" type="text" value="<?=$search_word?>" /><input type="image" src="../image/btn/btn_search.gif" align="top" alt="검색" class="input_img" /> </div> </td> </tr> <tr> <th scope="row">정렬</th> <td class="input_lo"> <input name="sort_obj_s" id="sort_2" type="radio" value="hotel_code" <?=($sort_obj_s=="hotel_code")?"checked":""?> /><label for="sort_2">코드번호</label> <input name="sort_s" id="sort_3" type="radio" value="asc" <?=($sort_s=="asc")?"checked":""?> /><label for="sort_3">순방향</label> <input name="sort_s" id="sort_4" type="radio" value="desc" <?=($sort_s=="desc")?"checked":""?> /><label for="sort_4">역방향</label> </td> </tr> </tbody> </table> </form> <!-- /폼 --> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="t_c_list2 mt20" summary="호텔별 정산현황을 확인하실 수 있습니다."> <caption>호텔별 정산현황</caption> <colgroup> <col style=" width:100px" /> <col style=" width:150px" /> <col style=" width:140px" /> <col /> <col /> <col style=" width:50px" /> <col style=" width:50px" /> <col style=" width:50px" /> <col style=" width:50px" /> <col style=" width:80px" /> <col style=" width:80px" /> <col style=" width:80px" /> <col style=" width:60px" /> </colgroup> <thead> <tr> <td colspan="12" class="t_top_line"></td> </tr> <tr> <th scope="col">예약일</th> <th scope="col">예약번호</th> <th scope="col">호텔명</th> <th scope="col">룸타입</th> <th scope="col">바우처</th> <th scope="col">인원</th> <th scope="col">객실</th> <th scope="col">박</th> <th scope="col">계약가</th> <th scope="col">수금</th> <th scope="col">미수금</th> <th scope="col">정산</th> </tr> </thead> <tbody> <? for($i=0 ; $i < count($data) ; $i++){ $row = $data[$i]; $data_hotel = $row['hotel_info']; $vou_tot += $row['vou_cnt']; $inwon_tot += $row['inwon']; $room_tot += $row['room_cnt']; $lodg_tot += $row['lodg_cnt']; $cost_tot += $row[0]['price_cost']; $pay_tot += $row[0]['pay_money']; $pre_tot += $row[0]['pre_money']; ?> <tr <? if ( $row[0]['pre_money'] == 0 ) echo "style='font-weight:bold;'";?>> <td><?=$row['res_dt']?></td> <td><?=$row['res_no']?></td> <td class="t_contents"> <?for($j=0 ; $j < count($data_hotel) ; $j++ ){ echo $data_hotel[$j]['hotel_nm']."<br>"; }?> </td> <td class="t_contents"> <?for($j=0 ; $j < count($data_hotel) ; $j++ ){ echo $data_hotel[$j]['room_type']."<br>"; }?> </td> <td><?=$row['vou_cnt']?></td> <td><?=$row['inwon']?></td> <td><?=$row['room_cnt']?></td> <td><?=$row['lodg_cnt']?></td> <td><?=number_format($row[0]['price_cost'])?></td><!-- 총계약가 --> <td><?=number_format($row[0]['pay_money'])?></td><!-- 총지급금 --> <td><?=number_format($row[0]['pre_money'])?></td><!-- 총미지급금 --> <td> <? if ( $row[0]['pre_money'] == 0 ) echo "정산완료"; else echo "<font color='#FF0000'>미정산</font>"; ?> </td> </tr> <? } ?> <tr style='font-weight:bold;'> <td colspan="4" style="text-align:right;"> 계</td> <td><?=$vou_tot?></td> <td><?=$inwon_tot?></td> <td><?=$room_tot?></td> <td><?=$lodg_tot?></td> <td><?=number_format($cost_tot)?></td><!-- 총계약가 계 --> <td><?=number_format($pay_tot)?></td><!-- 총지급금 계 --> <td><?=number_format($pre_tot)?></td><!-- 총미지급금 계 --> <td></td> </tr> </tbody> </table> </div> <?=adm_get_paging($total_page, $page, $list, "?$href&page=", "")?> </div> </div> </div> <? include "../include/footer.html" ?>