Exemplo n.º 1
0
// Delete file
if ($step == 5 && $action == 'confirm_deletefile' && $confirm == 'yes') {
    $file = $upload_dir . "/" . GETPOST('file');
    // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
    $ret = dol_delete_file($file);
    if ($ret) {
        setEventMessage($langs->trans("FileWasRemoved", GETPOST('file')));
    } else {
        setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('file')), 'errors');
    }
    header('Location: ' . $_SERVER["PHP_SELF"] . '?step=' . $step . '&datatoexport=' . $datatoexport);
    exit;
}
if ($action == 'deleteprof') {
    if ($_GET["id"]) {
        $objexport->fetch($_GET["id"]);
        $result = $objexport->delete($user);
    }
}
// TODO The export for filter is not yet implemented (old code created conflicts with step 2). We must use same way of working and same combo list of predefined export than step 2.
if ($action == 'add_export_model') {
    if ($export_name) {
        asort($array_selected);
        // Set save string
        $hexa = '';
        foreach ($array_selected as $key => $val) {
            if ($hexa) {
                $hexa .= ',';
            }
            $hexa .= $key;
        }