Exemplo n.º 1
0
function tzs_front_end_shipment_handler($atts)
{
    ob_start();
    if (!is_user_logged_in()) {
        print_error("Вход в систему обязателен");
    } else {
        if ($_SERVER['REQUEST_METHOD'] == 'POST' && !empty($_POST['action']) && $_POST['action'] == 'addshipment' && $_POST['formName'] == 'shipment') {
            tzs_edit_shipment(0);
        } else {
            tzs_print_shipment_form(null);
        }
    }
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
Exemplo n.º 2
0
function tzs_front_end_shipment_handler($atts)
{
    ob_start();
    if (!is_user_logged_in()) {
        print_error("Вход в систему обязателен");
    } else {
        if ($_SERVER['REQUEST_METHOD'] == 'POST' && !empty($_POST['action']) && $_POST['action'] == 'addshipment' && $_POST['formName'] == 'shipment') {
            tzs_edit_shipment(0);
        } else {
            $duplicate = isset($_GET['duplicate']) && is_numeric($_GET['duplicate']) ? intval($_GET['duplicate']) : 0;
            if ($duplicate) {
                tzs_front_end_shipment_get_record($duplicate, true);
            }
            tzs_print_shipment_form(null);
        }
    }
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}