示例#1
0
            var check_out_date='" . $check_out_date . "';
            var room_type_id='" . $room_type_id . "';
            var room_bed_type='" . $room_bed_type . "';
            var room_meal_type='" . $_SESSION['room_meal_type'] . "';
            var num_rooms='" . $no_of_room . "';
        </script>
    ");

    $hotel_room_type = new HotelRoomType();
    $hotel = new Hotels();
    $country = new country();

    $hotel->setHotelId($hotels_id);
    $hotel->extractor($hotel->getHotelFromId());

    $country->setCountryId($_SESSION['country_id']);

    $hotel_room_type->setRoomTypeId($room_type_id);

    $hotel_room_type->extractor($hotel_room_type->getHotelRoomTypeFromId());

    if ($hotels_id != $hotel_room_type->roomTypeHotelId()) {
        echo "Error";
        die();
    }

    $villa_type_id = 5;
?>
<!DOCTYPE html><!--[if lt IE 7]>
<html dir="ltr" lang="en-US" class="ie6"> <![endif]--><!--[if IE 7]>
<html dir="ltr" lang="en-US" class="ie7"> <![endif]--><!--[if IE 8]>
$merchantReferenceNo = $session->getMerchantReferenceNo();
$reservations->setReservationId($merchantReferenceNo);
$pay_data = $reservations->getReservationsFromId();
$reservations->extractor($pay_data);
$reservation_link_id = $reservations->reservationFromBookingLink();
$reservations_status = $reservations->reservationPaymentStatus();
$hotels->setHotelId($reservations->reservationHotelId());
$hotels->extractor($hotels->getHotelFromId());
$date = date("Y-m-d");
// current date
$new_date = strtotime(date("Y-m-d", strtotime($date)) . " +3 month");
$expire_date = date("Y-m-d", $new_date);
$bookingclient->setId($reservations->reservationClientId());
$bookingclient->extractor($bookingclient->getClientsFromId());
$country = new country();
$country->setCountryId($bookingclient->country());
$country->extractor($country->getCountryFromId());
$rooms->setRoomTypeId($reservations->reservationHotelRoomTypeId());
$rooms->extractor($rooms->getHotelRoomTypeFromId());
$client_name = $bookingclient->name();
$client_mobile = $bookingclient->contactno();
$client_email = $bookingclient->email();
$client_message = $bookingclient->message();
$hotel_name = $hotels->hotelName();
$hotel_url = $hotels->hotelSeoUrl();
$room_type = $rooms->roomTypeName();
if ($reservations->reservationBedType() == "sgl") {
    $bed_type = "Single Bed";
}
if ($reservations->reservationBedType() == "dbl") {
    $bed_type = "Double Bed";
示例#3
0
        function orderCreate($orderId)
        {

            $systemSetting = new systemSetting();
            $order = new order();
            $customer = new customer();
            $currency_object = new CurrencyWord();
            $currency = new currency();
            $orderProduct = new orderProduct();
            $payment = new payment();
            $country = new country();

            $order->setOrderId($orderId);
            $order->extractor($order->getOrderById());

            $orderProduct->setOrderPOrderId($order->orderId());
            $orderProduct_rows = $orderProduct->getProductsByOrderId();

            $payment->setPaymentOrderId($order->orderId());
            $result = $orderProduct->getTotalDetailByOrderId();

            $systemSetting->extractor($systemSetting->getSettings());

            $customer->setCustomerId($order->orderCustomerId());
            $customer->extractor($customer->getCustomerById());

            $currency->setCurrId(1);
            $currencyName = $currency->getCurrencyNameById();

            $country->setCountryId($order->orderDeliveryCity());
            $countryName = $country->getCountryNameById();

            $filename = $systemSetting->sySettingDocumentName() . 'Invoice_' . $order->orderInvoiceRefNumber() . '.pdf';

            $subject = $systemSetting->sySettingCompanyName() . " -  New Order Place....!";
            $strContent = '
<table width="800" border="0" style="font-family:Arial, Helvetica, sans-serif; background:#eee; font-size:12px; color:#333333;">
<tr>
<td colspan="3" rowspan="8" align="left" valign="top">
<img src="' . DOC_ROOT . 'uplode-img/company-logo/' . $systemSetting->sySettingCompanyLogo() . '"  />
</br>

<div style="padding-left:20px;font-size:16px; font-weight:bold; margin-bottom:8px;margin-top:20px;">' . $systemSetting->sySettingCompanyName() . ' </div>
<div style="padding-left:30px;margin-bottom:5px;font-size:10px;font-size:13px;">' . $systemSetting->sySettingCompanyAddress() . '</div>
<div style="padding-left:30px;margin-bottom:5px;font-size:10px;font-size:13px;">Telephone &nbsp; : &nbsp;&nbsp;' . $systemSetting->sySettingCompanyPhon() . '</div>
<div style="padding-left:30px;margin-bottom:5px;font-size:10px;font-size:13px;">Email &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : &nbsp;&nbsp; ' . $systemSetting->sySettingCompanyEmail() . '</div>



</td>

<td colspan="3" bgcolor="#CC0000" style="color:#FFF; font-size:14px; padding:5px; text-align:right; font-weight:700; letter-spacing:1px;">C u s t o m e r &nbsp; I n v o i c e</td>
</tr>

<tr>
<td >&nbsp;</td>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td >&nbsp;</td>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td style="padding:3px; border-bottom:1px #484848 dotted;"><div style=" width:80px;background-color:#ddd; float:left; margin-top:2px; padding:2px 5px;">Date</div></td>
<td colspan="2" style="padding:3px; border-bottom:1px #484848 dotted;text-align:right;">' . date('l jS \of F Y ', strtotime($order->orderCreatedDate())) . '</td>
</tr>
<tr>
<td style="padding:3px; border-bottom:1px #484848 dotted;"><div style=" width:80px;background-color:#ddd; float:left; margin-top:2px; padding:2px 5px;">Invoice No</div></td>
<td colspan="2" style="padding:3px; border-bottom:1px #484848 dotted;text-align:right;">' . $order->orderInvoiceRefNumber() . '</td>
</tr>
<tr>
<td style="padding:3px; border-bottom:1px #484848 dotted;"><div style=" width:80px;background-color:#ddd; float:left; margin-top:2px; padding:2px 5px;">Order No</div></td>
<td colspan="2" style="padding:3px; border-bottom:1px #484848 dotted;text-align:right;">' . $order->orderRefNumber() . '</td>
</tr>



<tr>
<td colspan="3" >&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="6" bgcolor="#333333" style="color:#fff; padding:3px 0 3px 8px; font-weight:bold; font-size:13px;">To</td>
</tr>
<tr>
  <td colspan="6" style="padding:3px; border-bottom:1px #484848 dotted;">
    <div style="margin-bottom:5px; margin-top:5px; font-weight:700;">' . $customer->customerName() . ' </div>
    <div style="font-size:10px;font-size:10px;">' . $customer->customerAddress() . '</div></td>
  </tr>
<tr>
  <td colspan="6">&nbsp;</td>
</tr>
<tr>
<td width="19%" align="center" bgcolor="#333333" style="color:#fff; padding:3px 0 3px 8px; font-weight:bold; font-size:13px; width:5%;">No</td>
<td width="11%" align="center" bgcolor="#333333" style="color:#fff; padding:3px 0 3px 8px; font-weight:bold; font-size:13px; width:15%">Item Code</td>
<td width="11%" align="center" bgcolor="#333333" style="color:#fff; padding:3px 0 3px 8px; font-weight:bold; font-size:13px; width:35%">Description</td>
<td align="center" bgcolor="#333333" style="color:#fff; padding:3px 0 3px 8px; font-weight:bold; font-size:13px; width:10%">Quantity</td>
<td width="22%" align="center" bgcolor="#333333" style="color:#fff; padding:3px 0 3px 8px; font-weight:bold; font-size:13px; width:15%">Unit Price</td>
<td width="23%" align="center" bgcolor="#333333" style="color:#fff; padding:3px 0 3px 8px; font-weight:bold; font-size:13px; width:20%">Total Price</td>
</tr>';
            $count = 1;
            for ($i = 0; $i < count($orderProduct_rows); $i++) {
                $orderProduct->extractor($orderProduct_rows, $i);
                $strContent .= '
<tr>
<td align="center" style="padding:3px; border-bottom:1px #484848 dotted;">' . $count . '</td>
<td align="center" style="padding:3px; border-bottom:1px #484848 dotted;">' . $orderProduct->orderPProductCode() . '</td>
<td align="center" style="padding:3px; border-bottom:1px #484848 dotted;">' . $orderProduct->orderPProductName() . '</td>
<td align="center" valign="bottom" style="padding:3px; border-bottom:1px #484848 dotted;">' . $orderProduct->orderPProductQuantity() . '</td>
<td align="right" valign="bottom" style="padding:3px; border-bottom:1px #484848 dotted;">' . $currency->convetNumberFormatDefault($orderProduct->orderPProductUnitPrice()) . '</td>
<td align="right" valign="bottom" style="padding:3px; border-bottom:1px #484848 dotted;">' . $currency->convetNumberFormatDefault($orderProduct->orderPProductTotalPrice()) . '</td>
</tr>
';
                $count++;
            }
            $strContent .= '
<tr>
<td colspan="5" style="padding:3px; border-bottom:1px #484848 dotted;">';
            $TOTAL_VAL = $result[0]['PRI'];
            $strContent .=
                $currency_object->get_bd_amount_in_text($result[0]['PRI'], 'Say &nbsp;&nbsp; &nbsp; ' . $currencyName . '&nbsp;&nbsp;&nbsp;', '&nbsp;Cents&nbsp;');
            $strContent .= '
</td>
<td style="padding:3px; border-bottom:2px #000 double;" align="right"><span style="border-bottom:1px #909090 dashed; float:right; text-align:right;">
' . $currency->convetNumberFormatDefault($TOTAL_VAL) . '</span></td>
</tr>



<tr>
<td>&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="6" bgcolor="#333333" style="font-size:12px; color:#FFF; padding:5px;" >General Terms And Conditions</td>
</tr>
<tr>
<td colspan="2" style="padding:3px; border-bottom:1px #484848 dotted;"><div style="padding:3px 10px; width:200px; float:left; font-weight:700;">Invoice Price Currency</div></td>
<td colspan="4" style="padding:3px; border-bottom:1px #484848 dotted;">' . $currencyName . '</td>
</tr>
<tr>
<td colspan="2" style="padding:3px; border-bottom:1px #484848 dotted;"><div style="padding:3px 10px; width:200px; float:left; font-weight:700;">Validity of Price Till</div></td>
<td colspan="4" style="padding:3px; border-bottom:1px #484848 dotted;">&nbsp;</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
<td colspan="4">&nbsp;</td>
</tr>
<tr>
<td colspan="6">&nbsp;</td>
</tr>

<tr>
<td colspan="6" bgcolor="#333333" style="font-size:12px; color:#FFF; padding:5px;" >Product Preferences</td>
</tr>
<tr>
<td colspan="6" style="padding:3px; border-bottom:1px #484848 dotted;">' . $order->orderClientNote() . '</td>

</tr>

<tr>
<td colspan="2">&nbsp;</td>
<td colspan="4">&nbsp;</td>
</tr>


<tr>
<td colspan="6" bgcolor="#333333" style="font-size:12px; color:#FFF; padding:5px;" >Delivery Details</td>
</tr>
<tr>
<td colspan="2" style="padding:3px; border-bottom:1px #484848 dotted;"><div style="padding:3px 10px; width:200px; float:left; font-weight:700;">Delivery Address</div></td>
<td colspan="4" style="padding:3px; border-bottom:1px #484848 dotted;">' . $order->orderDeliveryAddress() . '</td>
</tr>
<tr>
<td colspan="2" style="padding:3px; border-bottom:1px #484848 dotted;"><div style="padding:3px 10px; width:200px; float:left; font-weight:700;">Delivery Note</div></td>
<td colspan="4" style="padding:3px; border-bottom:1px #484848 dotted;">' . $order->orderDeliveryNote() . '</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
<td colspan="4">&nbsp;</td>
</tr>
<tr>
<td colspan="6">&nbsp;</td>
</tr>
<tr>
<td colspan="6"> <br>
<p>
Looking forward to see you online<br/>
' . $systemSetting->sySettingCompanyName() . '<br/><br/>
Best Regards,<br/>
Web Admin Team<br/>
<strong>' . $systemSetting->sySettingCompanyName() . ' - on ' . date('Y-m-d h:i a') . '</strong><br/>
</p>
<hr/>
<span style="color:#666; font-size:11px; font-family:Arial, Helvetica, sans-serif;">You are receiving this email, because an account has been registered at the ' . $systemSetting->sySettingCompanyName() . ' Online Shoping cart portal. If you have not made any registration or unaware of the same, please email administrator at ' . $systemSetting->sySettingCompanyEmail() . ' to remove you from this panel.</span></td>
</tr>
</table>
';

            $mail = new PHPMailer();
            $mail->IsSMTP();
            $mail->SMTPAuth = true; // enable SMTP authentication
            $mail->SMTPSecure = "ssl"; // sets the prefix to the servier
            $mail->Host = $systemSetting->sySettingHost(); // sets GMAIL as the SMTP server
            $mail->Port = $systemSetting->sySettingPort(); // set the SMTP port

            $mail->Username = $systemSetting->sySettingSmtpUsername(); // GMAIL username
            $mail->Password = $systemSetting->sySettingSmtpPassword(); // GMAIL password

            $mail->From = $systemSetting->sySettingSmtpUsername();
            $mail->FromName = $systemSetting->sySettingFromName();
            $mail->Subject = $subject;
            $mail->WordWrap = 50; // set word wrap

            $mail->MsgHTML($strContent);
            $mail->AddAddress($customer->customerEmail(), $systemSetting->sySettingCompanyName());
            $mail->AddCC($systemSetting->sySettingCompanyEmail(), $systemSetting->sySettingCompanyName());
            $mail->IsHTML(true); // send as HTML
            $mail->AddAttachment(DOC_ROOT . "my-account/invoice-pdf/" . $filename);
            $mail->Send();
            unlink(DOC_ROOT . "my-account/invoice-pdf/" . $filename);
            return true;

        }
示例#4
0
    $client_name = $client->clientFirstName() . " " . $client->clientLastName();
    $client_mobile = $client->clientPhoneMobile();
    $client_email = $client->clientEmail();
    $client_message = "";
    $client_city = $client->clientCity();
    $client_country = $client->clientCountry();
    $client_address = $client->clientAddress();
}
$hotels->setHotelId($reservations->reservationHotelId());
$hotels->extractor($hotels->getHotelFromId());
$date = date("Y-m-d");
// current date
$new_date = strtotime(date("Y-m-d", strtotime($date)) . " +3 month");
$expire_date = date("Y-m-d", $new_date);
$country = new country();
$country->setCountryId($client_country);
$country->extractor($country->getCountryFromId());
$rooms->setRoomTypeId($reservations->reservationHotelRoomTypeId());
$rooms->extractor($rooms->getHotelRoomTypeFromId());
$hotel_name = $hotels->hotelName();
$hotel_url = $hotels->hotelSeoUrl();
$room_type = $rooms->roomTypeName();
if ($reservations->reservationBedType() == "sgl") {
    $bed_type = "Single Bed";
}
if ($reservations->reservationBedType() == "dbl") {
    $bed_type = "Double Bed";
}
if ($reservations->reservationBedType() == "tpl") {
    $bed_type = "Tripple Bed";
}