コード例 #1
0
ファイル: cooking_select.php プロジェクト: emircg/UCPMv3.0
<section class="index">
	<?php 
$preptime = minutesToNextApp($userID);
if ($preptime > 20 && $preptime < 100) {
    echo '<p class="center">You got <strong>' . $preptime . ' minutes </strong> to cook, eat &amp; get to your next appointment. Here are some recipes:</p>';
    getRecipes($preptime);
} else {
    if ($preptime > 100) {
        echo '<p class="center">You got plenty of time to cook &amp; eat.<br/> Here are some recipes:</p>';
        getRecipes($preptime);
    } else {
        echo '<p class="center">It seems that you only got <strong>' . $preptime . ' minutes </strong> to cook &amp; eat.<br/> Maybe you want to order something online?</p>';
        getDeliveries();
    }
}
?>
	
	
		
</section>
コード例 #2
0
<?php

require_once __DIR__ . '/carbon/core.ini.php';
require_once __DIR__ . '/carbon/requests/requests.inc.php';
require_once __DIR__ . '/carbon/responses/responses.inc.php';
require_once __DIR__ . '/carbon/formats/formats.inc.php';
require_once __DIR__ . '/src/restaurant/restaurant.php';
$db = $config->getDefaultDatabase()->open();
$restaurant_id = $_GET['restaurant_id'];
$deliveries = null;
$response = getDeliveries($db, $restaurant_id);
if ($response->getType() == Response::SUCCESS) {
    $deliveries = $response->getData();
}
$deliveryMen = null;
$response = getDeliveryMen($db, $restaurant_id);
if ($response->getType() == Response::SUCCESS) {
    $deliveryMen = $response->getData();
}
$restaurantInfo = null;
$response = getRestaurantByIdWithoutLogo($db, $restaurant_id);
if ($response->getType() == Response::SUCCESS) {
    $restaurantInfo = $response->getData();
}
?>
<!DOCTYPE html>
<html>
    <head>
        <title>Admin | Deliveries</title>
        <meta charset='UTF-8' />
        <meta name='viewport' content='width=device-width, initial-scale=1' />