当前位置: 首页>>代码示例>>PHP>>正文


PHP BFCHelper::setInfoRequest方法代码示例

本文整理汇总了PHP中BFCHelper::setInfoRequest方法的典型用法代码示例。如果您正苦于以下问题:PHP BFCHelper::setInfoRequest方法的具体用法?PHP BFCHelper::setInfoRequest怎么用?PHP BFCHelper::setInfoRequest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BFCHelper的用法示例。


在下文中一共展示了BFCHelper::setInfoRequest方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: inforequest_process

function inforequest_process()
{
    $formData = isset($_POST['form']) ? $_POST['form'] : $_POST;
    $checkin = isset($formData['CheckIn']['date']) ? $formData['CheckIn']['date'] : $formData['CheckIn'];
    $checkout = isset($formData['CheckOut']['date']) ? $formData['CheckOut']['date'] : $formData['CheckOut'];
    $customer = RSFormHelper::getCustomerData($formData);
    $suggestedStay = null;
    $redirect = $formData['Redirect'];
    $otherData = "persone:" . RSFormHelper::getOptionsFromSelect($formData, 'Totpersons') . "|" . "accettazione:" . RSFormHelper::getOptionsFromSelect($formData, 'accettazione');
    if (!empty($checkin) && !empty($checkout)) {
        $sStay = array('CheckIn' => DateTime::createFromFormat('d/m/Y', $checkin)->format('Y-m-d\\TH:i:sO'), 'CheckOut' => DateTime::createFromFormat('d/m/Y', $checkout)->format('Y-m-d\\TH:i:sO'));
        if ($formData['orderType'] == 'c') {
            //    $sStay['UnitId'] = '11' .$formData['resourceId'];
            $resourceid = 0;
            if (!empty($formData['resourceId'])) {
                $resourceid = $formData['resourceId'];
            }
            if (!empty($_REQUEST['resourceid'])) {
                $resourceid = $_REQUEST['resourceid'];
            }
            if (!empty($_POST['resourceid'])) {
                $resourceid = $_POST['resourceid'];
            }
            $sStay['UnitId'] = $resourceid;
        }
        $suggestedStay = new stdClass();
        foreach ($sStay as $key => $value) {
            $suggestedStay->{$key} = $value;
        }
        $otherData .= "|" . "CheckIn:" . DateTime::createFromFormat('d/m/Y', $checkin)->format('Y-m-d') . "|" . "CheckOut:" . DateTime::createFromFormat('d/m/Y', $checkout)->format('Y-m-d');
        if ($formData['orderType'] == 'c') {
            $resourceid = 0;
            if (!empty($formData['resourceId'])) {
                $resourceid = $formData['resourceId'];
            }
            if (!empty($_REQUEST['resourceid'])) {
                $resourceid = $_REQUEST['resourceid'];
            }
            if (!empty($_POST['resourceid'])) {
                $resourceid = $_POST['resourceid'];
            }
            $otherData = $otherData . "|" . "UnitId:" . $resourceid;
        }
    } else {
        if (!empty($formData['resourceId'])) {
            $sStay = array('UnitId' => $formData['resourceId']);
            $suggestedStay = new stdClass();
            foreach ($sStay as $key => $value) {
                $suggestedStay->{$key} = $value;
            }
            $otherData .= "|" . "UnitId:" . $formData['resourceId'];
        }
    }
    $orderData = BFCHelper::prepareOrderData($formData, $customer, $suggestedStay, $otherData, null);
    $orderData['processOrder'] = true;
    $orderData['label'] = $formData['label'];
    //echo '<PRE>';print_r($orderData);die();
    $return = BFCHelper::setInfoRequest($orderData['customerData'], $orderData['suggestedStay'], $orderData['otherNoteData'], $orderData['merchantId'], $orderData['orderType'], $orderData['userNotes'], $orderData['label'], $orderData['cultureCode'], $orderData['processOrder']);
    if (!empty($return)) {
        if ($orderData['orderType'] == 'c') {
            wp_redirect($redirect);
            exit;
        } else {
            wp_redirect($redirect);
            exit;
        }
    }
}
开发者ID:Bookingfor,项目名称:wordpress-plugin,代码行数:68,代码来源:bfi.php

示例2: sendOnSellrequest

 function sendOnSellrequest()
 {
     $formData = $_POST['form'];
     $customer = RSFormHelper::getCustomerData($formData);
     $suggestedStay = null;
     $redirect = $formData['Redirect'];
     $otherData = [];
     if (!empty($formData['resourceId'])) {
         $sStay = array('UnitId' => $formData['resourceId']);
         $suggestedStay = new stdClass();
         foreach ($sStay as $key => $value) {
             $suggestedStay->{$key} = $value;
         }
         $otherData["UnitId:"] = "UnitId:" . $formData['resourceId'];
     }
     if (!empty($formData['pageurl'])) {
         $otherData["pageurl:"] = "pageurl:" . $formData['pageurl'];
     }
     if (!empty($formData['title'])) {
         $otherData["title:"] = "title:" . $formData['title'];
     }
     if (!empty($formData['resourceId'])) {
         $otherData["onsellunitid:"] = "onsellunitid:" . $formData['resourceId'];
     }
     if (!empty($formData['accettazione'])) {
         $otherData["accettazione:"] = "accettazione:" . RSFormHelper::getOptionsFromSelect($formData, 'accettazione');
     }
     $orderData = BFCHelper::prepareOrderData($formData, $customer, $suggestedStay, implode("|", $otherData), null);
     $orderData['processOrder'] = true;
     $orderData['label'] = $this->formlabel;
     $return = BFCHelper::setInfoRequest($orderData['customerData'], $orderData['suggestedStay'], $orderData['otherNoteData'], $orderData['merchantId'], $orderData['orderType'], $orderData['userNotes'], $orderData['label'], $orderData['cultureCode'], $orderData['processOrder']);
     if (empty($return)) {
         $return = "";
     }
     echo json_encode($return);
     $app = JFactory::getApplication();
     $app->redirect($redirect, false);
     $app->close();
 }
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:39,代码来源:controller.php


注:本文中的BFCHelper::setInfoRequest方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。