當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Sessions::getClientId方法代碼示例

本文整理匯總了PHP中Sessions::getClientId方法的典型用法代碼示例。如果您正苦於以下問題:PHP Sessions::getClientId方法的具體用法?PHP Sessions::getClientId怎麽用?PHP Sessions::getClientId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Sessions的用法示例。


在下文中一共展示了Sessions::getClientId方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: onlinePayment

function onlinePayment()
{
    $reservation = new Reservations();
    $reservation->setReservationClientId(Sessions::getClientId());
    $reservation->setReservationHotelId(Sessions::getOnlinePaymentHotelId());
    $reservation->setReservationHotelRoomTypeId(Sessions::getOnlinePaymentRoomTypeId());
    $reservation->setReservationBedType(Sessions::getOnlinePaymentBedType());
    $reservation->setReservationMealType(Sessions::getOnlinePaymentMealType());
    $reservation->setReservationNoOfRoom(Sessions::getOnlinePaymentRoomCount());
    $reservation->setReservationTotalPrice(Sessions::getOnlinePaymentRate());
    //$reservation->setCurrencyType(Sessions::currSuffix());
    $reservation->setCurrencyType(Sessions::getDisplayRatesIn());
    $reservation->setReservationCheckInDate(Sessions::getOnlinePaymentCheckin());
    $reservation->setReservationCheckOutDate(Sessions::getOnlinePaymentCheckout());
    $reservation->setReservationOfferAvailable(Sessions::getOnlinePaymentOfferAvailable());
    $reservation->setReservationOfferData(Sessions::getOnlinePaymentOfferData());
    //$reservation_id = $reservation->newReservations();
    if ($reservation->newReservations()) {
        $reservation_id = mysql_insert_id();
        Sessions::setOnlinePaymentReservationId($reservation_id);
        $client_name = "";
        $client_email = "";
        $client_contact = "";
        $client = new Clients();
        $client->setClientId(Sessions::getClientId());
        $client->extractor($client->getClientFromId());
        $client_name = $client->clientFirstName() . ' ' . $client->clientLastName();
        $client_email = $client->clientEmail();
        $client_contact = $client->clientPhoneFixed();
        $hotels_name = "";
        $hotels = new Hotels();
        $hotels->setHotelId(Sessions::getOnlinePaymentHotelId());
        $hotels->extractor($hotels->getHotelFromId());
        $hotels_name = $hotels->hotelName();
        $hotel_room_type = "";
        $room = new HotelRoomType();
        $room->setRoomTypeId(Sessions::getOnlinePaymentRoomTypeId());
        $room->extractor($room->getHotelRoomTypeFromId());
        $hotel_room_type = $room->roomTypeName();
        $bed_type = Sessions::getOnlinePaymentBedType();
        $meal_type = Sessions::getOnlinePaymentMealType();
        $room_count = Sessions::getOnlinePaymentRoomCount();
        $room_rate = Sessions::getOnlinePaymentRate() . ' ' . Sessions::currSuffix();
        $check_in = Sessions::getOnlinePaymentCheckin();
        $check_out = Sessions::getOnlinePaymentCheckout();
        $mail_tmp = '<table width="560" border="0" align="center">
                          <tr>
                            <td width="173" style="font-weight:bold; font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> Reservation Id </td>
                            <td width="377" style="font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> :' . $reservation_id . ' </td>
                          </tr>
                          <tr>
                            <td width="173" style="font-weight:bold; font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> Hotel </td>
                            <td width="377" style="font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> :' . $hotels_name . ' </td>
                          </tr>
                          <tr>
                            <td width="173" style="font-weight:bold; font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> Customer&rsquo; Name </td>
                            <td width="377" style="font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> :' . $client_name . ' </td>
                          </tr>
                          <tr>
                            <td width="173" style="font-weight:bold; font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> Customer&rsquo; E-mail </td>
                            <td width="377" style="font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> :' . $client_email . ' </td>
                          </tr>
                          <tr>
                            <td width="173" style="font-weight:bold; font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> Customer&rsquo; Contact </td>
                            <td width="377" style="font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> :' . $client_contact . ' </td>
                          </tr>
                          <tr>
                            <td style="font-weight:bold; font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;">  Room Type </td>
                            <td style="font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> :' . $hotel_room_type . ' </td>
                          </tr>
                          <tr>
                            <td style="font-weight:bold; font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> Bed Type</td>
                            <td style="font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> :' . $bed_type . ' </td>
                          </tr>
                          <tr>
                            <td height="26" valign="top" style="font-weight:bold; font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> Meal Type </td>
                            <td valign="top" style="font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px; height:auto !important; min-height:10px; height:auto;"> :' . $meal_type . ' </td>
                          </tr>

                          <tr>
                            <td height="26" valign="top" style="font-weight:bold; font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> No of Rooms </td>
                            <td valign="top" style="font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px; height:auto !important; min-height:10px; height:auto;"> :' . $room_count . ' </td>
                          </tr>

                          <tr>
                            <td height="26" valign="top" style="font-weight:bold; font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> Total </td>
                            <td valign="top" style="font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px; height:auto !important; min-height:10px; height:auto;"> :' . $room_rate . ' </td>
                          </tr>

                          <tr>
                            <td height="26" valign="top" style="font-weight:bold; font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> Check In </td>
                            <td valign="top" style="font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px; height:auto !important; min-height:10px; height:auto;"> :' . $check_in . ' </td>
                          </tr>

                          <tr>
                            <td height="26" valign="top" style="font-weight:bold; font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px;"> Check Out </td>
                            <td valign="top" style="font-size:12px; text-align: left; font-family: Arial, Helvetica, sans-serif; color:#60919f; line-height: 19px; margin: 0 0 12px; padding: 4px 3px; height:auto !important; min-height:10px; height:auto;"> :' . $check_out . ' </td>
                          </tr>
                      </table>';
        $subject = "Reservation Details Roomista.com";
//.........這裏部分代碼省略.........
開發者ID:jcodesdotme,項目名稱:pp,代碼行數:101,代碼來源:reservations-controller.php


注:本文中的Sessions::getClientId方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。