<?
if (isset($command) && $command == 'delete') {
        include('deletekontoauszug.php');
} else {
    if (isset($submit)) {
        include('kontoauszug.php');
    }
    if (!isset($submit) || isset($error)) {
        /* get last day of last month */
        $today = date('Y-m-d', time());
        List($year, $month, $day) = explode('-', $today);
        $refDate = "$year-$month-15";
        $refTimestamp = strtotime('+1 months ago', strtotime($refDate));
        $daysinmonth = date("t", $refTimestamp);
        //$enddate = date('Y-m-' . $daysinmonth,$refTimestamp);
        $enddate = date('Y-m-15',$refTimestamp);

        $startdate = date('Y-m-16' , strtotime('+3 months ago', $refTimestamp));
        if (!$error) {
            /* Zum ersten mal aufgerufen. Set default fuer plusnurverfaller */
            $plusnurverfaller = 1;
        }
        include('kontoauszugform.php');
    }
}
include('kontoauszugstatus.php');
?>
