// strip $funct
###
### Submit Handler
###
## Check if there was a submission
if (isset($select)) {
    // go to the page for selection of an old report without storing the content of this page
    $url = REPGENDIR . "/repgen_select.php";
    $url = "http://{$HTTP_HOST}" . $url;
    header("Location: " . $url);
    // switches to repgen_select.php
    exit;
}
if (isset($store)) {
    // go to page for definition of String-items
    if (!check_short($short)) {
        $error = ID_ERROR_BLOCK;
    } else {
        if (stristr($funct, " " . $short . "(")) {
            // $short == functionname?
            $info = $short . "|" . $date_ . "|" . $author . "|" . $long . "|" . addslashes($funct);
            store($id_new, $info);
            $url = REPGENDIR . "/repgen_select.php";
            $url = "http://{$HTTP_HOST}" . $url;
            header("Location: " . $url);
            // switches to repgen_strings.php
        } else {
            $error = ERROR_FUNC . $short . "(){...}";
        }
    }
}
Пример #2
0
        $sql1 = str_replace("0_", TB_PREF, $sql);
        db_query($sql1, "SQL-Statement : '" . $sql . "' " . SQL_ERROR . ":<BR>" . NOTSTORED);
        $info = $short . "|" . $date_ . "|" . $author . "|" . $long . "|" . $print_format . "|" . $print_size . "|" . $report_type;
        store($id_new, $info, $sql, $group, $group_type);
        $url = REPGENDIR . "/repgen_strings.php";
        $url .= "?id_new=" . $id_new . "&long=" . urlencode($long) . "&report_type=" . $report_type . "&sql=" . urlencode($sql);
        header("Location: http://{$HTTP_HOST}" . $url);
        // switches to repgen_strings.php
        exit;
    } else {
        $error .= "<BR>" . NOTSTORED;
    }
}
if (isset($page_graphics)) {
    // go to page for definition of Line-items
    if (!check_short($short) || empty($sql) || trim($sql) == "") {
        $error = ID_ERROR;
    }
    if (empty($error)) {
        // switches to repgen_graphics.php (Definition of items of the report)
        // set_session_data();
        // test, if $sql is correct SQL Statement
        $sql = urldecode(stripslashes($sql));
        $sql1 = str_replace("0_", TB_PREF, $sql);
        db_query($sql1, "Entered values NOT saved!");
        $info = $short . "|" . $date_ . "|" . $author . "|" . $long . "|" . $print_format . "|" . $print_size . "|" . $report_type;
        store($id_new, $info, $sql, $group, $group_type);
        $url = REPGENDIR . "/repgen_graphics.php?id_new=" . $id_new . "&long=" . urlencode($long);
        header("Location: http://{$HTTP_HOST}" . $url);
        // switches to repgen_graphics.php
        exit;