Пример #1
0
function tzs_front_end_truck_handler($atts)
{
    ob_start();
    if (!is_user_logged_in()) {
        print_error("Вход в систему обязателен");
    } else {
        if ($_SERVER['REQUEST_METHOD'] == 'POST' && !empty($_POST['action']) && $_POST['action'] == 'addtruck' && $_POST['formName'] == 'truck') {
            tzs_edit_truck(0);
        } else {
            $duplicate = isset($_GET['duplicate']) && is_numeric($_GET['duplicate']) ? intval($_GET['duplicate']) : 0;
            if ($duplicate) {
                tzs_front_end_truck_get_record($duplicate, true);
            }
            tzs_print_truck_form(null);
        }
    }
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
Пример #2
0
function tzs_front_end_truck_handler($atts)
{
    ob_start();
    if (!is_user_logged_in()) {
        print_error("Вход в систему обязателен");
    } else {
        if ($_SERVER['REQUEST_METHOD'] == 'POST' && !empty($_POST['action']) && $_POST['action'] == 'addtruck' && $_POST['formName'] == 'truck') {
            tzs_edit_truck(0);
        } else {
            tzs_print_truck_form(null);
        }
    }
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}