function ReportPeriodList($Choice, $Options = array('t', 'l', 'n')) {
$Periods = array();
if (in_array('t', $Options)) {
$Periods[] = _('This Month');
$Periods[] = _('This Quarter');
$Periods[] = _('This Year');
$Periods[] = _('This Financial Year');
}
if (in_array('l', $Options)) {
$Periods[] = _('Last Month');
$Periods[] = _('Last Quarter');
$Periods[] = _('Last Year');
$Periods[] = _('Last Financial Year');
}
if (in_array('n', $Options)) {
$Periods[] = _('Next Month');
$Periods[] = _('Next Quarter');
$Periods[] = _('Next Year');
$Periods[] = _('Next Financial Year');
}
$Count = count($Periods);
$HTML = '<select name="Period">
<option value=""></option>';
for ($x = 0;$x < $Count;++$x) {
if (!empty($Choice) && $Choice == $Periods[$x]) {
$HTML.= '<option value="' . $Periods[$x] . '" selected>' . $Periods[$x] . '</option>';
} else {
$HTML.= '<option value="' . $Periods[$x] . '">' . $Periods[$x] . '</option>';
}
}
$HTML.= '</select>';
return $HTML;
}