}
        $column2 = null;
        if (isset($_POST['column2'])) {
            $column2 = $_POST['column2'];
        }
        $sortcolumn = null;
        if (isset($_POST['sortcolumn'])) {
            $sortcolumn = $_POST['sortcolumn'];
        }
        $type = preg_replace("#[\\s]#", '', $_POST['type']);
        $chart = new \reports\Chart();
        $chart->setTitle($title)->setAxisLabels($vAxis, $hAxis)->setColumnNames(array($column1, $column2))->setType($type);
        $report = new \reports\Report();
        $report->setTitle($title)->setQuery($query)->setChart($chart);
        if (isset($_POST['submit_type']) && $_POST['submit_type'] === 'save_report') {
            \reports\Report::add($report);
            header("Location: run_report.php?report={$title}");
        } else {
            $serial = $report->serialize();
            header("Location: run_report.php?serial={$serial}");
        }
        exit;
    }
}
$header = new \html\Header();
$header->title(\util\Config::$app->name)->css('css/style.min.css')->js('js/jquery.min.js', 'js/bootstrap.min.js');
$form = new \html\FormPanel("Import Spreadsheets", "form-panel", 'md-10', "form-horizontal", "");
foreach ($errors as $err) {
    $form->error($err);
}
echo "<header>" . \util\Html::genNavbar() . "</header>";