Ejemplo n.º 1
0
                 $j1 = $j1 + 1;
             }
             //echo $dif." ".$j1." ".count($data1)."<br>";
         } else {
             $j1 = $j1 + 1;
             //echo $dif." ".$j1." ".count($data1)."<br>";
         }
         //exit;
     }
     // while
     $xml .= '<OtherData totPt="' . $totPath . '" geoData="" geoPointName="" totalDist="' . $totKm . '" />';
     $xml .= '</gps>';
     header('Content-Type: text/xml');
     echo $xml;
 } else {
     $z = GetDays($_GET[sDate], $_GET[eDate]);
     //print_r($z);
     $cont = 1;
     $xml = '<gps>';
     //echo count($z);
     for ($y = 0; $y < count($z); $y++) {
         if ($y == 0) {
             $strtTime = $_GET[sTime];
             $endTime = 1439;
         } elseif ($y == count($z) - 1) {
             $strtTime = 0;
             $endTime = $_GET[eTime];
         } elseif ($y < count($z) - 1) {
             $strtTime = 0;
             $endTime = 1439;
         }
Ejemplo n.º 2
0
    $aDays[] = $sStartDate;
    // Set a 'temp' variable, sCurrentDate, with
    // the start date - before beginning the loop
    $sCurrentDate = $sStartDate;
    // While the current date is less than the end date
    while ($sCurrentDate < $sEndDate) {
        // Add a day to the current date
        $sCurrentDate = gmdate("Y-m-d", strtotime("+1 day", strtotime($sCurrentDate)));
        // Add this new day to the aDays array
        $aDays[] = $sCurrentDate;
    }
    // Once the loop has finished, return the
    // array of days.
    return $aDays;
}
$daylist = GetDays($sd, $ed);
$_SESSION['daylist'] = $daylist;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Enter Data</title>
</head>
<body>
<form action="pro_2.php" method="get">
<table width="100%" border="1" cellspacing="0" cellpadding="0">
  <tr>
    <td height="37" colspan="5"><h1><center>Enter Data for days</center></h1>
<center>Total No. Of Days <?php 
echo dateDiff($sd, $ed);
Ejemplo n.º 3
0
         // else end
     } else {
         foreach ($destArr as $key => $value) {
             //echo "Key: $key; Value: $value<br />\n";
             if ($key == $tmpId) {
                 $tmpVal = $value;
                 $destArr[$key] = $value . ',' . $result_pt;
             }
         }
         // foreach end
     }
 } else {
     //echo $fetDevice[di_createDate]."<br>";
     $sdate = date("d-m-Y", strtotime($fetDevice[di_createDate]));
     $edate = date("d-m-Y", strtotime($_GET[date_offline]));
     $z = GetDays($sdate, $edate);
     for ($y = count($z); $y > 0; $y--) {
         $path = $GLOBALS[dataPath] . "src/data/" . date('d-m-Y', strtotime($z[$y])) . "/" . $fetDevice[di_imeiId] . ".txt";
         $fp_load = @fopen($path, "rb");
         if ($fp_load) {
             /*$path1 = $path;
             		$datDate1 = $z[$y];*/
             break;
         }
         @fclose($path);
     }
     //echo $path;
     //exit;
     if ($mydata = gpspathFun($path)) {
         $data1 = explode("#", $mydata);
         $data2 = explode("@", $data1[count($data1) - 2]);
 /**
  *
  * create booking
  *
  * @access protected
  * @param
  * @return
  */
 public function CreateBookingGuest($firstName, $lastName, $AddressLine, $cityName, $stateProv, $countryCode, $postalCode, $ratePlanCode, $roomTypeCode, $numberOfUnits, $adults, $children, $StartDate, $EndDate, $cardCode, $cardHolderName, $cardNumber, $expirationDate, $email, $Comments = "", $invBlockCode = "", $coporateCode = FALSE)
 {
     parent::load_model("OWS_rooms");
     $data = array();
     $data["firstName"] = xml_convert($firstName);
     $data["lastName"] = xml_convert($lastName);
     $data["AddressLine"] = xml_convert($AddressLine);
     $data["cityName"] = xml_convert($cityName);
     $data["stateProv"] = xml_convert($stateProv);
     $data["countryCode"] = $countryCode;
     $data["postalCode"] = $postalCode;
     $data["ratePlanCode"] = $ratePlanCode;
     $data["roomTypeCode"] = $roomTypeCode;
     $data["numberOfUnits"] = $numberOfUnits;
     $data["adults"] = $adults;
     $data["children"] = $children;
     $data["StartDate"] = $StartDate;
     $data["EndDate"] = $EndDate;
     $data["cardCode"] = $cardCode;
     $data["cardHolderName"] = xml_convert($cardHolderName);
     $data["cardNumber"] = $cardNumber;
     $data["expirationDate"] = $expirationDate;
     $data["Email"] = $email;
     $data["Comments"] = xml_convert($Comments);
     $data["invBlockCode"] = $invBlockCode;
     $data["qualifyingIdType"] = "";
     $data["qualifyingIdValue"] = "";
     if ($coporateCode) {
         $data["qualifyingIdType"] = "CORPORATE";
         $data["qualifyingIdValue"] = $ratePlanCode;
     }
     $resultArray = $this->CI->ows_reservation->CreateBookingGuest($data);
     if ($resultArray["success"]) {
         $resultArray["reservationsList"] = array();
         try {
             $reservation = $resultArray["response"]["HotelReservation"];
             $resultReservation["id"] = $reservation["UniqueIDList"]["UniqueID"]["0"];
             $resultReservation["TimeSpan"] = $reservation["RoomStays"]["RoomStay"]["TimeSpan"];
             $resultReservation["ratePlan"] = $reservation["RoomStays"]["RoomStay"]["RatePlans"]["RatePlan"];
             $resultReservation["Guest"] = $reservation["ResGuests"]["ResGuest"]["Profiles"]["Profile"];
             if (!key_exists("Customer", $resultReservation["Guest"])) {
                 $resultReservation["Guest"] = $reservation["ResGuests"]["ResGuest"]["Profiles"]["Profile"][0];
             }
             if (!empty($invBlockCode)) {
                 $resultReservation["ratePlan"]["RatePlanDescription"] = array("Text" => "Group Code: " . $invBlockCode);
             }
             if ($coporateCode) {
                 $resultReservation["ratePlan"]["AdditionalDetails"]["AdditionalDetail"][0]["AdditionalDetailDescription"]["Text"] = $resultReservation["ratePlan"]["AdditionalDetails"]["AdditionalDetail"][1]["AdditionalDetailDescription"]["Text"];
             }
             $resultReservation["Total"] = $reservation["RoomStays"]["RoomStay"]["Total"]["!"];
             $resultReservation["roomFee"] = $reservation["RoomStays"]["RoomStay"]["ExpectedCharges"]["!TotalRoomRateAndPackages"];
             $resultReservation["TaxesAndFees"] = $reservation["RoomStays"]["RoomStay"]["ExpectedCharges"]["!TotalTaxesAndFees"];
             $room = $reservation["RoomStays"]["RoomStay"]["RoomTypes"]["RoomType"];
             $resultReservation["GuestCounts"] = $reservation["RoomStays"]["RoomStay"]["GuestCounts"]["GuestCount"];
             $resultReservation["Room"] = new OWS_rooms($room["RoomTypeDescription"]["Text"], $room["!roomTypeCode"], '', '', '', '');
             $resultReservation["status"] = "RESERVED";
             $resultReservation["Payment"] = $reservation["RoomStays"]["RoomStay"]["Guarantee"]["GuaranteesAccepted"]["GuaranteeAccepted"]["GuaranteeCreditCard"];
             $resultReservation["Payment"]["cardNumber"] = "***" . substr($resultReservation["Payment"]["cardNumber"], -4, 4);
             $resultReservation["core_totals"] = $this->CI->ny_core->__get_total_tax($roomTypeCode, $resultReservation["roomFee"], $resultReservation["TaxesAndFees"], GetDays($StartDate, $EndDate));
             /*
             if(key_exists("CancelTerm", $reservation["RoomStays"]["RoomStay"]))
             	$resultReservation["cancelTerm"]	= $reservation["RoomStays"]["RoomStay"]["CancelTerm"];
             else
             	$resultReservation["cancelTerm"]    = "Please contact us for more info";
             */
             $resultArray["reservationsList"] = $resultReservation;
         } catch (Exception $ex) {
         }
     }
     unset($resultArray["response"]);
     return $resultArray;
 }