示例#1
0
         $response['status_code'] = 200;
         $response['pickup_postcode'] = $pickupLocation["postcode"];
         $response['dropoff_postcode'] = $dropoffLocation["postcode"];
         $response['pickup_location']['lat'] = $pickupLocation["location"]["lat"];
         $response['pickup_location']['lng'] = $pickupLocation["location"]["lng"];
         $response['dropoff_location']['lat'] = $dropoffLocation["location"]["lat"];
         $response['dropoff_location']['lng'] = $dropoffLocation["location"]["lng"];
     } else {
         $response = array("message" => array("text" => "Call /quotes failed"), "status_code" => 400);
     }
     header('Content-type: application/json');
     echo json_encode($response);
     exit;
     break;
 case 'getDriversNearby':
     $td = new TripThru();
     $location = $_POST["location"];
     $radius = $_POST["radius"];
     $limit = $_POST["limit"];
     $drivers = $td->Get_drivers_nearby($location, $radius, $limit, '');
     if ($drivers) {
         $response = $drivers;
         $response['status_code'] = 200;
     } else {
         $response = array("message" => array("text" => "Call /drivers failed"), "status_code" => 400);
     }
     header('Content-type: application/json');
     echo json_encode($response);
     exit;
     break;
 default:
示例#2
0
 * Licensed under the GPL License, Version 3.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.gnu.org/licenses/gpl-3.0.html
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 ******************************************************************************
*/
defined('INDEX_CALL') or die('You cannot access this page directly.');
$td = new TripThru();
//Check if user already logged in
if (!$td->Account_checkLogin()) {
    header('Location:' . $td->getHomeUrl());
    exit;
}
?>
<style>
#trip-info {
margin-top: 10px;
margin-bottom: 10px;
text-indent: 15px;
font-size: 16px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
示例#3
0
 * limitations under the License.
 *
 ******************************************************************************
*/
require_once 'inc/tripthru/config.php';
ConfigTT::load();
ConfigTT::validateConfig();
ob_start();
session_start();
define('INDEX_CALL', 1);
if (isset($_POST['JSON'])) {
    include 'inc/request_json.php';
    exit;
}
require_once 'inc/tripthru/tripthru.php';
$td = new TripThru();
$page = 'home';
if (isset($_GET['p']) && $_GET['p'] != '') {
    $page = $_GET['p'];
}
ob_start();
include 'pages/header.php';
$header = ob_get_clean();
ob_start();
switch ($page) {
    case 'home':
        include 'pages/home.php';
        break;
    case 'about':
        include 'pages/about.php';
        break;