Пример #1
0
    $firstname = isset($_POST['NewFirstName']) ? $_POST['NewFirstName'] : "";
    $lastname = isset($_POST['NewLastName']) ? $_POST['NewLastName'] : "";
    $countrycode = isset($_POST['NewCountryCode']) ? $_POST['NewCountryCode'] : "";
    $areacode = isset($_POST['NewAreaCode']) ? $_POST['NewAreaCode'] : "";
    $phone = isset($_POST['NewTelephone']) ? $_POST['NewTelephone'] : "";
    $pp_no = isset($_POST['NewDocID")']) ? $_POST['NewDocID'] : "";
    $email = isset($_POST['NewEmail']) ? $_POST['NewEmail'] : "";
    if (is_ebridgeCustomer()) {
        //echo "add new guest";
        include_once dirname(__FILE__) . "/OTA/advancedFeatures/adv_functions.php";
        //function modify_advProfile($id,$parentid,$salutation,$firstname ,$middlename ,
        //			$lastname ,$dob ,$gender,$lang ,$altlang ,$ebridgeid,$comments
        $profid = modify_advProfile(0, 0, '1', $firstname, '', $lastname, '1970-01-01', 'M', 'en', 'en', '', '');
        if ($profid) {
            modify_advPhone(0, 0, $profid, 0, 0, 0, $countrycode, $areacode, $telephone, '');
            modify_advEmail(0, 0, $profid, 0, 0, $email, '');
            modify_advDocument($docid, 0, $profid, $doctype, $validfrom, $validto, $issuer, $issuecountry, $nationality, $nameondoc, $docnum, $issuelocation);
        }
        $guestid = $profid;
    } else {
        $guestid = modify_guest(0, $lastname, $firstname, '', 1, $pp_no, '', '', '', '', '', '', '', $areacode, $phone, $email, '', '', '', '');
    }
    $reservation['guestid'] = $guestid;
}
$bill_id = get_billID_byResID($resid);
$booked_by_ebridgeid = get_ebridgeID_fromOperatorSetup();
if (isset($_POST['Submit']) || isset($_POST['remove_id']) && $_POST['remove_id'] != 0 || isset($_POST['add_id']) && $_POST['add_id'] != 0) {
    if (isset($_POST['remove_id'])) {
        $action = "remove_rate";
    }
    if (isset($_POST['add_id'])) {
Пример #2
0
     $book_status = BOOK_CHECKEDIN;
     $checkedout_by = 0;
 }
 // If the guest does not exist or was not selected, then create a new guest.
 if (!$guestid && $guestname && $address && $phone) {
     list($firstname, $middlename, $lastname) = preg_split('/\\s+/', $guestname, 3);
     if ($middlename && !$lastname) {
         $lastname = $middlename;
         $middlename = "";
     }
     if (is_ebridgeCustomer()) {
         include_once dirname(__FILE__) . "/OTA/advancedFeatures/adv_functions.php";
         $profileid = modify_advProfile(0, 0, 1, $firstname, $middlename, $lastname, '0000-00-00', 'M', 'en', 'en', '', 'Profile auto created from Guest Check-In');
         modify_advPhone(0, 0, $profileid, PTT_VOICE, PUT_CONTACT, PLT_DIRECT, "", "", $phone, "");
         modify_advDocument(0, 0, $profileid, DOC_NID, '0000-00-00', '000-00-00', "", "", $nationality, $guestname, $localid, "");
         modify_advEmail(0, 0, $profileid, 0, EAT_PERSONAL, $email, "");
         modify_advAddress(0, 0, $profileid, AUT_CONTACT, CLT_HOME, "", "", "", "", $address, $town, "", $countrycode, $postal_code);
         $guestid = $profileid;
     } else {
         $guestid = modify_guest(0, $lastname, $firstname, $middlename, '', $localid, '', $countrycode, $address, $town, $postal_code, $phone, $email, '', '', '', $nationality);
     }
 }
 if (!$guestid) {
     // break out of the loop if no guest ID set.
     break;
 }
 $book_id = modify_booking($book_id, $res_id, $bill_id, $guestid, $no_adults, $no_child6_12, $no_child1_5, $no_babies, $checkindate, $checkoutdate, $roomid, $roomtypeid, $ratesid, $instr, $checkedin_by, $checkedin_date, $checkedout_by, $checkedout_date, $cctype, $CCnum, $expiry, $CVV, $voucher_no, $book_status, $details_id);
 if (is_ebridgeCustomer()) {
     include_once dirname(__FILE__) . "/OTA/advancedFeatures/adv_functions.php";
     CustomPagesFormRead(HTL_PAGE_BOOK, $book_id);
 }