echo "<HR>";
// before we do anything useful, make sure that user is logged
// in.  Anyone that is logged in can SEE orders...
// check to see if th euesr is logged in - if not, this routine DOES NOT return
checkUserLoggedIn();
// here's where it gets interesting...
//  - if a previous button has been pressed, then we process a bit differently
//  - otherwise, the order is presented
if ($request) {
    if ($confirmed) {
        processRequestConfirmed($order, $page_id, $oid, $request, get_page_link($orderListLink), get_page_link($packingListLink), get_page_link($shipOrderLink));
    } else {
        processRequest($order, $page_id, $oid, $request, get_page_link($orderListLink), get_page_link($packingListLink), get_page_link($shipOrderLink));
    }
} else {
    showOrder($order, $customer, $page_id, $oid, get_page_link($editOrderLink), get_page_link($editCustomerLink), get_page_link($shipOrderLink) . "&edit");
    echo "<HR><H3>Payment</H3>\n";
    showPayment($order, $page_id, $oid);
    echo "<HR><H3> Shipping</H3>\n";
    showShipping($order, $page_id, $oid, get_page_link($shipOrderLink));
    echo "<HR><H3>Overrides</h3>\n";
    echo prettyButton($page_id, $oid, "DELETE", "delete");
    if ($order["WasCanceled"]) {
        echo prettyButton($page_id, $oid, "UN-CANCEL", "uncancel");
    } else {
        echo prettyButton($page_id, $oid, "CANCEL", "cancel");
    }
    echo prettyButton($page_id, $oid, "DUPLICATE", "dup", false, current_user_can("can_duplicate_orders"));
}
echo "<HR>\n";
?>
Example #2
0
<?php

// Bookstore in AMP
//
// Author: Min Xu <*****@*****.**>
//
// This page shows order details given an order_id from HTTP GET request.
require_once 'shared_functions.php';
require_once 'order_functions.php';
requireLogin();
function showOrder()
{
    $connection = connect();
    showOrderFromOrderId($connection, $_GET['order_id']);
    mysql_close($connection);
}
showHeader('Order Details');
showOrder();
showFooter();