예제 #1
0
$oaSchema = new Openads_Schema_Manager($schemaFile, '', $schemaPath);
if (is_array($aErrs = OX_DevToolbox::checkFilePermissions(array(PATH_DEV, PATH_VAR, MAX_PATH . $pluginPath)))) {
    setcookie('schemaFile', '');
    setcookie('schemaPath', '');
    $errorMessage = join("<br />\n", $aErrs['errors']) . "<br /><br ><hr /><br />\n" . 'To fix, please execute the following commands:' . "<br /><br >\n" . join("<br />\n", $aErrs['fixes']);
    die($errorMessage);
}
require_once PATH_DEV . '/lib/xajax.inc.php';
if (array_key_exists('btn_copy_final', $_POST)) {
    $oaSchema->createTransitional();
} else {
    if (array_key_exists('btn_schema_new', $_POST)) {
        $oaSchema->createNew($_POST['new_schema_name']);
    } else {
        if (array_key_exists('btn_delete_trans', $_POST)) {
            $oaSchema->deleteTransitional();
        } else {
            if (array_key_exists('btn_compare_schemas', $_POST)) {
                setcookie('changesetFile', '');
                if ($oaSchema->createChangeset($oaSchema->changes_trans, $_POST['comments'])) {
                    header('Content-Type: application/xhtml+xml; charset=ISO-8859-1');
                    readfile($oaSchema->changes_trans);
                    exit;
                }
            } else {
                if (array_key_exists('btn_changeset_delete', $_POST)) {
                    $oaSchema->deleteChangesTrans();
                } else {
                    if (array_key_exists('btn_commit_final', $_POST)) {
                        $oaSchema->commitFinal($_POST['comments'], $_POST['version']);
                    } else {