Get_HotelSettings($hotel, $altname, $company, $register, $ebridgeid, $tax1, $tax2, $phone, $fax, $IM, $street, $city, $citycode, $state, $postcode, $countrycode, $country, $logo, $latitude, $longitude, $language, $email, $web, $ota, $chaincode); ?> <table height="500" class="listing-table"> <tbody> <tr> <?php if (accessNew('reports') && $menu == 'shiftReport') { print_rightMenu_reports(); } elseif ($menu == 'myShift') { print_rightMenu_mySettings(); } ?> <td valign="top"> <?php if (is_ebridgeCustomer() && accessNew('reports') || is_ebridgeCustomer() && $menu == 'myShift') { include dirname(__FILE__) . "/../OTA/reports/shift_rpt.php"; } else { ?> <form action="<?php echo $_SERVER['REQUEST_URI']; ?> " name="reportres" id="reportres" method="post" enctype="multipart/form-data"> <table width=100%> <tr class="tdbgcl"> <td align="left"></td> </tr> <tr class="tdbgcl"> <td> <table>
load_language($lang); $logofile = Get_LogoFile(); date_default_timezone_set(TIMEZONE); // Get the current settings Get_HotelSettings($hotel, $altname, $company, $register, $ebridgeid, $tax1, $tax2, $phone, $fax, $IM, $street, $city, $citycode, $state, $postcode, $countrycode, $country, $logo, $latitude, $longitude, $language, $email, $web, $ota, $chaincode); ?> <table height="500" class="listing-table"> <tbody> <tr> <?php print_rightMenu_reports(); ?> <td valign="top"> <?php if (is_ebridgeCustomer() && accessNew('reports')) { include dirname(__FILE__) . "/../OTA/reports/hotel_receipt_rpt.php"; } else { ?> <form action="<?php echo $_SERVER['REQUEST_URI']; ?> " name="reportres" id="reportres" method="post" enctype="multipart/form-data"> <table width=100%> <tr class="tdbgcl"> <td align="left"></td> </tr> <tr class="tdbgcl"> <td>
</td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td colspan="2" style='padding:3'> <div class="scroll" id="Requests" > <?php //display the list from advanced profile for e-Bridge customers if (is_ebridgeCustomer()) { include_once dirname(__FILE__) . "/OTA/advancedFeatures/adv_pagefuncs.php"; $sname = ""; $sphone = ""; $sid = ""; $semail = ""; if ($search && $stype) { if ($stype == 1) { $sname = $search; } if ($stype == 4) { $sid = $search; } if ($stype == 5) { $sphone = $search; }
/** * Get the list of reservations * @ingroup RES_MANAGEMENT * @param $start [in] Start window date for reservations * @param $end [in] End window date for reservations * @param $name [in] guest name to search * @param $rlist [in/out] list of reservations * @param $active [in] open * @note results rlist has form:<br/> * $rlist[$i]['guestname']<br/> * $rlist[$i]['checkindate']<br/> * $rlist[$i]['checkoutdate']<br/> * $rlist[$i]['no_pax']<br/> * $rlist[$i]['voucher_no']<br/> * $rlist[$i]['no_nights']<br/> * $rlist[$i]['status']<br/> * $rlist[$i]['reservation_id']<br/> * $rlist[$i]['booked_by_ebridgeid']<br/> * $rlist[$i]['cancelled_by_ebridgeid']<br/> * $rlist[$i]['cancelled_date']<br/> * $rlist[$i]['reservation_by']<br/> */ function get_all_reservations($start, $end, $name, &$rlist, $active) { global $conn; if (!$conn) { $conn = connect_Hotel_db(HOST, USER, PASS, DB, PORT); } if (!$conn) { return 0; } if (is_ebridgeCustomer()) { include_once dirname(__FILE__) . "/OTA/advancedFeatures/adv_functions.php"; get_reservationlist_advProfile($start, $end, $name, $rlist, $active); } else { if ($name) { $name = strip_specials($name); } $sql = "select src, reservation.guestid, reservation_id,reservation_by,\n\t\t\t\tDATE_FORMAT(checkindate, '%d/%m/%Y %H:%i') as checkin, DATE_FORMAT(checkoutdate, '%d/%m/%Y %H:%i') as checkout, no_adults,\n\t\t no_child1_5, no_child6_12, no_babies, roomid, roomtypeid, ratesid, voucher_no, \n\t\t\t\treserved_by, DATE_FORMAT(reserved_date, '%d/%m/%Y') as resdate, confirmed_by, DATE_FORMAT(confirmed_date, '%d/%m/%Y') as conf_date, \n\t\t\t\tDATE_FORMAT(reserve_time, '%d/%m/%Y %H:%i') as restime, \n\t\t\t\tbook_id, status, firstname, middlename, lastname, loginname, DATEDIFF(checkoutdate, checkindate) AS no_nights,\n\t\t\t\tbooked_by_ebridgeid, cancelled_by_ebridgeid, cancelled_date \n\t\t\t\tfrom reservation, guests, users \n\t\t\t\twhere reservation.guestid = guests.guestid and users.userid = reservation.reserved_by "; if ($name) { $sql .= " and ( firstname like '%" . $name . "%' or lastname like '%" . $name . "%' or reservation_by like '%" . $name . "%' )"; } if ($start) { $sql .= " and checkindate >= " . date_to_dbformat("DD/MM/YYYY", 1, $start); } if ($end) { $sql .= " and checkoutdate <= " . date_to_dbformat("DD/MM/YYYY", 1, $end); } if ($active && $active == 1) { $sql .= " and `status` = " . RES_QUOTE; } if ($active && $active == 2) { $sql .= " and `status` = " . RES_ACTIVE; } if ($active && $active == 3) { $sql .= " and `status` = " . RES_CANCEL; } if ($active && $active == 4) { $sql .= " and `status` = " . RES_EXPIRE; } if ($active && $active == 5) { $sql .= " and `status` = " . RES_CHECKIN; } if ($active && $active == 6) { $sql .= " and `status` = " . RES_VOID; } if ($active && $active == 7) { $sql .= " and `status` = " . RES_CLOSE; } $sql .= " order by checkindate asc"; //print $sql."<br/>"; //echo $sql; $stmt = $conn->prepare($sql); $results = $stmt->execute(); $rlist = array(); $i = 0; if ($results) { while ($row = $stmt->fetch()) { $rlist[$i]['guestname'] = trim(trim($row['firstname']) . " " . trim($row['middlename']) . " " . trim($row['lastname'])); $rlist[$i]['checkindate'] = $row['checkin']; $rlist[$i]['checkoutdate'] = $row['checkout']; $rlist[$i]['no_pax'] = $row['no_adults'] + $row['no_child1_5'] + $row['no_child6_12'] + $row['no_babies']; $rlist[$i]['voucher_no'] = $row['voucher_no']; $rlist[$i]['no_nights'] = $row['no_nights']; $rlist[$i]['status'] = $row['status']; $rlist[$i]['reservation_id'] = $row['reservation_id']; $rlist[$i]['reservation_by'] = $row['reservation_by']; $rlist[$i]['booked_by_ebridgeid'] = $row['booked_by_ebridgeid']; $rlist[$i]['cancelled_by_ebridgeid'] = $row['cancelled_by_ebridgeid']; $rlist[$i]['cancelled_date'] = $row['cancelled_date']; $rlist[$i]['ratesid'] = $row['ratesid']; $i++; } } } //print_r($rlist); return sizeof($rlist); }