Exemple #1
0
}
function doSubTree()
{
    global $misc, $data, $lang;
    $tabs = $misc->getNavTabs('schema');
    $items = $misc->adjustTabsForTree($tabs);
    $reqvars = $misc->getRequestVars('schema');
    $attrs = array('text' => field('title'), 'icon' => field('icon'), 'action' => url(field('url'), $reqvars, field('urlvars', array())), 'branch' => url(field('url'), $reqvars, field('urlvars'), array('action' => 'tree')));
    $misc->printTree($items, $attrs, 'schema');
    exit;
}
if ($action == 'tree') {
    doTree();
}
if ($action == 'subtree') {
    doSubTree();
}
$misc->printHeader($lang['strschemas']);
$misc->printBody();
if (isset($_POST['cancel'])) {
    $action = '';
}
switch ($action) {
    case 'create':
        if (isset($_POST['create'])) {
            doSaveCreate();
        } else {
            doCreate();
        }
        break;
    case 'alter':
            $items = $data->getFtsParsers(false);
            $urlvars = array('action' => 'viewparsers');
            break;
        default:
            exit;
    }
    $reqvars = $misc->getRequestVars('ftscfg');
    $attrs = array('text' => field('name'), 'icon' => $what, 'toolTip' => field('comment'), 'action' => url('fulltext.php', $reqvars, $urlvars), 'branch' => ifempty(field('branch'), '', url('fulltext.php', $reqvars, array('action' => 'subtree', 'ftscfg' => field('name')))));
    $misc->printTree($items, $attrs, strtolower($what));
    exit;
}
if ($action == 'tree') {
    doTree();
}
if ($action == 'subtree') {
    doSubTree($_REQUEST['what']);
}
$misc->printHeader($lang['strschemas']);
$misc->printBody();
if (isset($_POST['cancel'])) {
    if (isset($_POST['prev_action'])) {
        $action = $_POST['prev_action'];
    } else {
        $action = '';
    }
}
switch ($action) {
    case 'createconfig':
        if (isset($_POST['create'])) {
            doSaveCreateConfig();
        } else {