Example #1
0
                }
            }
        }
    }
} else {
    if (array_key_exists('btn_table_new', $_POST) && isset($_POST['new_table_name'])) {
        $table = $_POST['new_table_name'];
        $oaSchema->tableNew($table);
        unset($table);
    } else {
        if (array_key_exists('btn_table_edit', $_POST)) {
            $table = $_POST['btn_table_edit'];
        }
    }
}
if (!$table) {
    header('Content-Type: application/xhtml+xml; charset=ISO-8859-1');
    readfile($oaSchema->working_file_schema);
    // echo $before.' - '.$after ;
    exit;
} else {
    $oaSchema->parseWorkingDefinitionFile();
    $aDD_definition = $oaSchema->aDD_definition;
    $aDB_definition = $oaSchema->aDB_definition;
    $aTbl_definition = $oaSchema->aDB_definition['tables'][$table];
    $aLinks = $oaSchema->readForeignKeys($table);
    $aTbl_links = $aLinks[$table];
    $aLink_targets = $oaSchema->getLinkTargets();
    include 'templates/schema_edit.html';
    exit;
}