Example #1
0
                if ($sql_revizia and $sql_porez) {
                    mysql_query("COMMIT");
                } else {
                    mysql_query("ROLLBACK");
                }
                unset($_SESSION["posted_form_edit_rev"]);
                header("location: ?vyber={$vyber}&order={$order}");
                echo "<div id=\"form_data\">úspešne odoslané";
                //var_dump($_SESSION["posted_form_edit_rev"]);
                echo "</div>";
            } else {
                echo "<div id=error_message>" . implode("<br>", $error_msg) . "</div>";
            }
        }
        //var_dump($form_data);
        formular_velkoobchod($fieldsets_c, $form_data);
        echo "</div>";
    }
}
function display_all($page, $vyber)
{
    echo "<div class=\"confirm_order\">\r\n        <a href=\"?vyber=formular_velkoobchod\">Vložiť novú položku</a>\r\n            </div>";
    echo "<div class=\"filter_obj clearfix\">";
    $filtbyst = array("bez_rozpracovanych" => "všetky bez rozpracovaných", "aj_rozpracovane" => "všetky + rozpracované", "iba_prijate" => "iba prijaté", "iba_rozpracovane" => "iba rozpracované");
    echo check_visibility("filter_by_status", select("filter_by_status_v", "Filtruj objednávky:", "", $_SESSION["search_status"], "", "", "", "NO", $filtbyst));
    echo "</div>";
    echo "<div id=\"list_of_all\">";
    $sec_code = "8975JK.!";
    include_once 'searchbyname_velkoobchod.php';
    echo "</div>";
}
        //var_dump($error_msg);
        //var_dump($error_msg);
        if (empty($error_msg)) {
            $_SESSION["posted_form"] = $form_data;
            header("location: ?vyber={$vyber}&page=2");
            exit;
        } else {
            echo "<div id=error_message>" . implode("<br>", $error_msg) . "</div>";
        }
    }
    //var_dump($form_data);
    unset($_SESSION['posted_form_from_cp']);
    if ($page == 1 and !isset($_POST[submit])) {
        $form_data = $_SESSION['posted_form'];
    }
    formular_velkoobchod($fieldsets_c, $form_data, $secure_key);
    //var_dump($_SESSION);
}
// ===========================================================
// prvá stránka formulára - koniec
if ($page == 2) {
    //var_dump($_SESSION["posted_form"]);
    if ($_POST[submit_confirm] or $_POST[submit_save]) {
        $data = $_SESSION["posted_form"];
        if (empty($error_msg)) {
            if (empty($_SESSION["posted_form"]) || !isset($_SESSION["posted_form"])) {
                die("nie su žiadne údaje na nahrávanie");
            }
            // vlozenie do objednávaok
            mysql_query("BEGIN");
            if ($_POST[submit_save]) {