Esempio n. 1
0
$smarty->assign('tpl_type', 'lists');
include_once "receiptclass.inc.php";
$receipt = new Receipt();
$todaydate = getdate();
$day = $todaydate['mday'];
$month = $todaydate['mon'];
$year = $todaydate['year'];
$thedate = "{$day}.{$month}.{$year}";
$theotherdate = "{$day}-{$month}-{$year}";
$threeweeksago = getdate(strtotime("-3 weeks"));
$threeweeksagoday = $threeweeksago['mday'];
$threeweeksagomonth = $threeweeksago['mon'];
$threeweeksagoyear = $threeweeksago['year'];
$threeweeksagothedate = "{$threeweeksagoday}.{$threeweeksagomonth}.{$threeweeksagoyear}";
$threeweeksagotheotherdate = "{$threeweeksagoday}-{$threeweeksagomonth}-{$threeweeksagoyear}";
$smarty->assign('tpl_dates', $receipt->getdates());
if ($request->GetVar('frm_start', 'post') !== $request->undefined) {
    $thestart = $request->GetVar('frm_start', 'post');
} else {
    $thestart = $month . '/' . $year;
}
$theotherstart = str_replace('/', '-', $thestart);
if ($request->GetVar('frm_end', 'post') !== $request->undefined) {
    $theend = $request->GetVar('frm_end', 'post');
} else {
    if ($month == 12) {
        $year = $year + 1;
        $month = 1;
    } else {
        $month = $month + 1;
    }