Exemplo n.º 1
0
        }
        $create_bundle = create_bundle($_POST['bundle_name'], $_POST['bundle_price'], $product_array, $bundle_image_url, $product_counter);
        if ($create_bundle == 1) {
            //$message = "Bundle has been created successfully.";
            header('Location:bundle.php');
        } else {
            $errormessage = "Something wrong. Please try again!!.";
        }
    } else {
        $errormessage = "Bundle Image is invalid. Please Try Again!!";
    }
}
/*******************************end create bundle****************************************/
/*******************************delete bundle********************************************/
if (!empty($_GET['delete'])) {
    $delete_bundle = delete_bundle($_GET['delete']);
    if ($delete_bundle == 1) {
        header('Location:bundle.php');
    } else {
        $errormessage = "Something wrong. Please try again!!.";
    }
    //echo "######".$_GET['delete'];
}
/*******************************end delete bundle****************************************/
?>



<div id="page-wrapper">
    <div class="row">
        <div class="col-lg-12">
Exemplo n.º 2
0
    $submod = $path[1];
    $page = $path[2];
    $tab = $path[3];
    $url = array();
    foreach (array('name', 'from', 'uuid', 'gid', 'bundle_id', 'hostname') as $post) {
        $url[$post] = $_POST[$post];
    }
    if (isset($tab)) {
        $url['tab'] = $tab;
    }
    if (isset($_POST['coh_id']) && $_POST['coh_id'] != "") {
        delete_command_on_host($_POST['coh_id']);
    } elseif (isset($_POST['cmd_id']) && $_POST['cmd_id'] != "") {
        delete_command($_POST['cmd_id']);
    } elseif (isset($_POST['bundle_id']) && $_POST['bundle_id'] != "") {
        delete_bundle($_POST['bundle_id']);
    }
    header("Location: " . urlStrRedirect("{$module}/{$submod}/{$page}", $url));
    exit;
}
/* Form displaying */
$f = new PopupForm(_T('Delete this command', 'msc'), 'deletePopupForm');
if (isset($_GET['coh_id'])) {
    $f->add(new HiddenTpl("coh_id"), array("value" => $_GET['coh_id'], "hide" => True));
}
if (isset($_GET['cmd_id'])) {
    $f->add(new HiddenTpl("cmd_id"), array("value" => $_GET['cmd_id'], "hide" => True));
}
if (isset($_GET['bundle_id'])) {
    $f->add(new HiddenTpl("bundle_id"), array("value" => $_GET['bundle_id'], "hide" => True));
}