Exemplo n.º 1
0
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;
        }
        $hexafiltervalue = '';
Exemplo n.º 2
0
<?php
	// save configuration
	define('ROOT', '../..');
	include ROOT . '/lib/includeForAjax.php';

	requireStrictRoute();

	$response = array();
	$response['error'] = 1;
	$response['message'] = '';
	
	if (!isAdmin()) {
		$response['error'] = 1;
		$response['message'] = _t('관리자만이 이 기능을 사용할 수 있습니다.');
	} else {
		$domainName = $_POST['domainName'];
		
		requireComponent('Bloglounge.Model.Exports');
		$export = new Export;

		if ($export->delete($domainName))
			$response['error'] = 0;
	}

	func::printRespond($response);
?>