コード例 #1
0
function main()
{
    echo "<br>In test driver<br>";
    echo "Database Host:  {$CHAPRDB_HOST}<br>";
    echo "Database Database:  {$CHAPRDB_DATABASE}<br>";
    //     $rows = dbGetPackages();
    //     $rows = dbGetPersonalities();
    //     $rows = dbGetOrder(24);
    //     $rows = dbGetItems(31);
    $rows = dbGetOrderCustomer(2);
    print_r($rows);
}
コード例 #2
0
$orderListLink = getSpecialVariable("orderListLink", $config);
$packingListLink = getSpecialVariable("packingListLink", $config);
//echo "to edit the order part, I'll call " . get_page_link("$editOrderLink"). "<P>";
//echo "to edit the customer part, I'll call " . get_page_link("$editCustomerLink"). "<P>";
//echo "to ship the order part, I'll call " . get_page_link("$shipOrderLink"). "<P>";
//echo "to go back to order list, I'll call " . get_page_link("$orderListLink"). "<P>";
//
// HERE'S WHERE THE ACTUAL GOOD STUFF IS!  Up to this point we have
// be doing a lot of setup.
//
// The plan is to paint a screen describing the order, in a non
// editable format.  Buttons will be available for working with
// the orders.
// first, retrieve the order, which has the side effect of validating it
$order = dbGetOrder($oid);
$customer = dbGetOrderCustomer($oid);
if ($message || $errorMessage) {
    echo "<script type='text/javascript'>";
    echo "setTimeout(function() {";
    echo "   var userBox = document.getElementById(\"userMessage\");\n";
    echo "   var errorBox = document.getElementById(\"errorMessage\");\n";
    // we could make the boxes just dissappear like this
    //     echo("   if(userBox) userBox.style.visibility='hidden';\n");
    //     echo("   if(errorBox) errorBox.style.visibility='hidden';\n");
    // instead they actually go away, moving all data up
    echo "   if(userBox) userBox.style.display='none';\n";
    // and we could ALSO cause error messages to go away, but we don't
    //     echo("   if(errorBox) errorBox.style.display='none';\n");
    echo "},5000);\n";
    echo "</script>\n";
}