コード例 #1
0
ファイル: adminhotel.php プロジェクト: bogiesoft/hotelmis-ota
    Save_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);
}
// 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);
if ($latitude) {
    list($latdeg, $latmin, $latsec, $latdir) = sscanf($latitude, "%d.%d.%d%s");
}
if ($longitude) {
    list($londeg, $lonmin, $lonsec, $londir) = sscanf($longitude, "%d.%d.%d%s");
}
/** If not saved and the country code changed, then the change back to the new countrycode */
if (!$_POST['Save'] && $countrycode != $newcountrycode && $newcountrycode) {
    $countrycode = $newcountrycode;
}
// Retrieve the country name for the country code currently set.
$country = Get_Country($countrycode);
?>
<!--<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">-->
<!--<html xmlns="http://www.w3.org/1999/xhtml">-->
<!--<head>-->
<!--<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />-->
<!--<link href="css/new.css" rel="stylesheet" type="text/css" />-->
<!--<link href="css/styles2.css" rel="stylesheet" type="text/css">-->
<!--</head>-->
<!--<body class="tdbgcl">-->
					<form action="<?php 
$_SERVER['REQUEST_URI'];
?>
" name=adminhotel id=adminhotel method="post" enctype="multipart/form-data">
					      <table class="tdbgcl" width="100%" border="0" cellpadding="1" align="center">
					        <tr valign="top">
コード例 #2
0
ファイル: functions.php プロジェクト: bogiesoft/hotelmis-ota
/**
 * Get the booking detail by the guest id, first check any open reservation that is due today
 * if found, use this reservation, if not found then create a new booking filling in the guest
 * detail, but the booking will not be created like with a reservation.
 * @ingroup BOOKING_MANAGEMENT
 * @param $guestid [in] Guest ID
 * @param $booking [in/out] result array
 *
 * @return number of elements in booking
 * @todo complete this function.
 */
function get_booking_byguest($guestid, &$booking)
{
    global $conn;
    if (!$conn) {
        $conn = connect_Hotel_db(HOST, USER, PASS, DB, PORT);
    }
    if (!$conn) {
        return 0;
    }
    $todaystart = date("d/m/Y") . " 00:00";
    $todayend = date("d/m/Y") . " 23:59";
    $rightnow = date("d/m/Y H:i");
    $booking = array();
    $sql = "select book_id from booking where guestid=" . $guestid;
    $sql .= " and checkindate >= " . date_to_dbformat("DD/MM/YYYY HH:MI", 1, $todaystart);
    $sql .= " and checkoutdate <= " . date_to_dbformat("DD/MM/YYYY HH:MI", 1, $todayend);
    $stmt = $conn->prepare($sql);
    $results = $stmt->execute();
    if ($results && ($row = $stmt->fetch())) {
        return get_booking($row['book_id'], $booking);
    }
    $guest = array();
    if (findguestbyid($guestid, $guest)) {
        $booking['book_id'] = 0;
        $booking['guestid'] = $guestid;
        $booking['reservation_id'] = 0;
        $booking['bill_id'] = 0;
        $booking['no_adults'] = 1;
        $booking['no_child1_5'] = 0;
        $booking['no_child6_12'] = 0;
        $booking['no_babies'] = 0;
        $booking['checkindate'] = $rightnow;
        $booking['checkoutdate'] = '';
        $booking['checkedin_by'] = 0;
        $booking['checkedout_by'] = 0;
        $booking['checkedout_date'] = 0;
        $booking['checkedin_date'] = '';
        $booking['cctype'] = '';
        $booking['CCnum'] = '';
        $booking['expiry'] = '';
        $booking['CVV'] = '';
        $booking['pp_no'] = $guest['pp_no'];
        $booking['idno'] = $guest['idno'];
        $booking['address'] = $guest['address'];
        $booking['town'] = $guest['town'];
        $booking['postal_code'] = $guest['postal_code'];
        $booking['phone'] = $guest['phone'];
        $booking['email'] = $guest['email'];
        $booking['mobilephone'] = $guest['mobilephone'];
        $booking['eBridgeID'] = $guest['eBridgeID'];
        $booking['IM'] = $guest['IM'];
        $booking['nationality'] = $guest['nationality'];
        $booking['countrycode'] = $guest['countrycode'];
        $booking['nation'] = Get_Country($guest['nationality']);
        $booking['country'] = Get_Country($guest['countrycode']);
        $booking['instructions'] = '';
        $booking['guestname'] = trim(trim($guest['firstname']) . " " . trim($guest['middlename']) . " " . trim($guest['lastname']));
    }
    return sizeof($booking);
}