Exemplo n.º 1
0
$smarty->assign('tpl_theotherend', $theotherend);
$smarty->assign('tpl_theend', $theend);
$smarty->assign('tpl_theotherstart', $theotherstart);
$smarty->assign('tpl_thestart', $thestart);
$smarty->assign('tpl_start1', $thestart1);
$smarty->assign('tpl_theotherstart1', $theotherstart1);
$smarty->assign('tpl_end1', $theend1);
$smarty->assign('tpl_theotherend1', $theotherend1);
if ($what == 'thedate') {
    list($day, $month, $year) = split('[.]', $thedate);
    $thestart = "{$year}-{$month}-{$day} 00:00:00";
    $theend = "{$year}-{$month}-{$day} 23:59:59";
    if ($request->GetVar('frm_display', 'post') !== $request->undefined) {
        $display = $request->GetVar('frm_display', 'post');
    }
    $smarty->assign('tpl_receipt', $receipt->getlist($thestart, $theend, $display));
} elseif ($what == 'timeline') {
    list($day, $month, $year) = split('[.]', $theend1);
    $theend1 = "{$year}-{$month}-{$day} 23:59:59";
    list($day, $month, $year) = split('[.]', $thestart1);
    $thestart1 = "{$year}-{$month}-{$day} 00:00:00";
    if ($request->GetVar('frm_display2', 'post') !== $request->undefined) {
        $display = $request->GetVar('frm_display2', 'post');
    }
    $smarty->assign('tpl_receipt', $receipt->getlist($thestart1, $theend1, $display));
} else {
    list($month, $year) = split('[/]', $theend);
    $theend = "{$year}-{$month}-01 00:00:00";
    list($month, $year) = split('[/]', $thestart);
    $thestart = "{$year}-{$month}-01 00:00:00";
    if ($request->GetVar('frm_display3', 'post') !== $request->undefined) {