Exemple #1
0
         $middlename = $_POST["middlename"];
         $lastname = $_POST["lastname"];
         $countrycode = $_POST["countrycode"];
         $nationality = $_POST["nationality"];
         $pp_no = $_POST["identification_no"] == "ppno" ? $_POST["pp_id_no"] : '';
         $idno = $_POST["identification_no"] == "idno" ? $_POST["pp_id_no"] : 0;
         $address = $_POST["address"];
         $town = $_POST["town"];
         $postal_code = $_POST["postal_code"];
         $phone = $_POST["phone"];
         $email = $_POST["email"];
         $mobilephone = $_POST["mobilephone"];
         $ebridgeid = $_POST["eBridgeID"];
         $IM = $_POST["IM"];
         $salutation = $_POST['salutation'];
         $guestid = modify_guest($guestid, $lastname, $firstname, $middlename, $salutation, $pp_no, $idno, $countrycode, '', $address, $town, $postal_code, 0, 0, $phone, $email, $mobilephone, $ebridgeid, $IM, $nationality);
         /*
         				if(!$guestid){
         					echo "<div align=\"center\"><h1>".$_L['GST_err']."</h1></div>";
         				}
         				else{
         					echo "<div align=\"center\"><h1>".$_L['GST_success']."</h1></div>";
         				}
         */
     }
     break;
 case 'List':
     break;
 case 'Find':
     // check if user is searching using name, payrollno, national id number or other fields
     $guestid = $_POST["search"];
    $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'])) {
        $action = "add_rate";
    }
    if (isset($_POST['Submit'])) {
        $action = $_POST['Submit'];
    }
Exemple #3
0
 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);
 }
 if (!$book_id) {
     echo "<div align=\"center\"><h1>" . $_L['REG_error1'] . "</h1></div>";
 } else {
     if ($action == $_L['REG_checkinbox']) {