..
if (isset ($_GET['submitMostRecent']))
{
// If the record count value is not a valid integer, display error
if ((string)(int)$_GET['recordCount'] == (string)$_GET['recordCount'])
{
$this->mRecordCount = (int)$_GET['recordCount'];
$this->mOrders = Orders::GetMostRecentOrders($this->mRecordCount);
}
else
$this->mErrorMessage = $_GET['recordCount'] . ' is not a number.';
}
/* If the "Show all records created between date_1 and date_2"
filter is in action ... */
if (isset ($_GET['submitBetweenDates']))
{
$this->mStartDate = $_GET['startDate'];
$this->mEndDate = $_GET['endDate'];
// Check if the start date is in accepted format
if (($this->mStartDate == '') ||
($timestamp = strtotime($this->mStartDate)) == -1)
$this->mErrorMessage = 'The start date is invalid. ';
else
// Transform date to YYYY/MM/DD HH:MM:SS format
$this->mStartDate =
strftime('%Y/%m/%d %H:%M:%S', strtotime($this->mStartDate));
// Check if the end date is in accepted format
if (($this->mEndDate == '') ||
($timestamp = strtotime($this->mEndDate)) == -1)
$this->mErrorMessage .= 'The end date is invalid.';
else
// Transform date to YYYY/MM/DD HH:MM:SS format
$this->mEndDate =
strftime('%Y/%m/%d %H:%M:%S', strtotime($this->mEndDate));
// Check if start date is more recent than the end date
if ((empty ($this->mErrorMessage)) &&
(strtotime($this->mStartDate) > strtotime($this->mEndDate)))
$this->mErrorMessage .
Pages:
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569