Beispiel #1
0
//-----------------------------------------------------
if (isset($_GET['viewsearch'])) {
    // Navigation bar
    $step = $_SESSION['g_pagesize'];
    $page = isset($_GET['offset']) ? $_GET['page'] : 1;
    $offset = isset($_GET['offset']) ? $_GET['offset'] : 0;
    if (count($_GET) == 0) {
        $array = null;
    } else {
        $array = $_GET;
    }
    $array['p_action'] = 'ALL';
    list($sql, $where) = $ledger->build_search_sql($array);
    // Count nb of line
    $max_line = $cn->count_sql($sql);
    list($count, $a) = $ledger->list_operation($sql, $offset, 0);
    $bar = navigation_bar($offset, $max_line, $step, $page);
    echo $bar;
    echo $a;
    echo $bar;
    /*
     * Export to csv
     */
    $r = HtmlInput::get_to_hidden(array('l', 'date_start', 'date_end', 'desc', 'amount_min', 'amount_max', 'qcode', 'accounting', 'unpaid', 'gDossier', 'ledger_type'));
    if (isset($_GET['r_jrn'])) {
        foreach ($_GET['r_jrn'] as $k => $v) {
            $r .= HtmlInput::hidden('r_jrn[' . $k . ']', $v);
        }
    }
    echo '<form action="export.php" method="get">';
    echo $r;