Prev | Current Page 558 | Next

Emilian Balanescu and Cristian Darie

"Beginning PHP and MySQL E-Commerce: From Novice to Professional, Second Edition"

=
'The start date should be more recent than the end date.';
CHAPTER 14 ?–  ACCEPTING CUSTOMER ORDERS 451
// If there are no errors, get the orders between the two dates
if (empty($this->mErrorMessage))
$this->mOrders = Orders::GetOrdersBetweenDates(
$this->mStartDate, $this->mEndDate);
}
// If "Show orders by status" filter is in action ...
if (isset ($_GET['submitOrdersByStatus']))
{
$this->mSelectedStatus = $_GET['status'];
$this->mOrders = Orders::GetOrdersByStatus($this->mSelectedStatus);
}
if (is_array($this->mOrders) && count($this->mOrders) == 0)
$this->mErrorMessage =
'No orders found matching your searching criteria!';
// Build View Details link
for ($i = 0; $i < count($this->mOrders); $i++)
{
$this->mOrders[$i]['link_to_order_details_admin'] =
Link::ToOrderDetailsAdmin($this->mOrders[$i]['order_id']);
}
}
}
?>
8. Load admin.php into the browser, and provide the username/password combination if asked. Click the
ORDERS ADMIN menu link, then click one of the Go buttons, and you should see results similar to those
shown in Figure 14-5.
How It Works: Retrieving Orders
Each of the Go buttons calls one of the business tier methods (in the Orders class) and populates the table with
the returned orders information.
When processing the request, we test the data the visitor entered to make sure it??™s valid. When the first Go button
is clicked, we verify that the entered value is a number (how many records to show).


Pages:
546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570
tani nocleg online loans for bad credit rating Wnętrza Poznań pozycjonowanie stron w google wanna poolspa