当前位置: 首页>>代码示例>>PHP>>正文


PHP doTree函数代码示例

本文整理汇总了PHP中doTree函数的典型用法代码示例。如果您正苦于以下问题:PHP doTree函数的具体用法?PHP doTree怎么用?PHP doTree使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了doTree函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: doTree

    $misc->setFocus('forms[0].query');
}
function doTree()
{
    global $misc, $data, $lang, $slony;
    $reqvars = $misc->getRequestVars('database');
    $tabs = $misc->getNavTabs('database');
    $items = $misc->adjustTabsForTree($tabs);
    $attrs = array('text' => noEscape(field('title')), 'icon' => field('icon'), 'action' => url(field('url'), $reqvars, field('urlvars', array())), 'branch' => url(field('url'), $reqvars, field('urlvars'), array('action' => 'tree')));
    $misc->printTreeXML($items, $attrs);
    exit;
}
require './admin.php';
/* shortcuts: these functions exit the script */
if ($action == 'tree') {
    doTree();
}
if ($action == 'refresh_locks') {
    currentLocks(true);
}
if ($action == 'refresh_processes') {
    currentProcesses(true);
}
/* normal flow */
if ($action == 'locks' or $action == 'processes') {
    $scripts = "<script src=\"libraries/js/jquery.js\" type=\"text/javascript\"></script>\n";
    $scripts .= "<script src=\"js/database.js\" type=\"text/javascript\"></script>";
    $refreshTime = $conf['ajax_refresh'] * 1000;
    $scripts .= "<script type=\"text/javascript\">\n";
    $scripts .= "var Database = {\n";
    $scripts .= "ajax_time_refresh: {$refreshTime},\n";
开发者ID:hardikk,项目名称:HNH,代码行数:31,代码来源:database.php

示例2: array_merge

            $nodes = array_merge($nodes, $misc->getServers(false, $group_id));
            include_once './classes/ArrayRecordSet.php';
            $nodes = new ArrayRecordSet($nodes);
        } else {
            $nodes = $misc->getServers(true, false);
        }
    }
    $reqvars = $misc->getRequestVars('server');
    $attrs = array('text' => field('desc'), 'icon' => field('icon'), 'toolTip' => field('id'), 'action' => field('action'), 'branch' => field('branch'));
    $misc->printTree($nodes, $attrs, 'servers');
    exit;
}
if ($action == 'tree') {
    if (isset($_GET['group'])) {
        doTree($_GET['group']);
    } else {
        doTree(false);
    }
}
$misc->printHeader($lang['strservers']);
$misc->printBody();
$misc->printTrail('root');
switch ($action) {
    case 'logout':
        doLogout();
        break;
    default:
        doDefault($msg);
        break;
}
$misc->printFooter();
开发者ID:netcon-source,项目名称:phppgadmin,代码行数:31,代码来源:servers.php

示例3: doTree

 private function doTree($roots, $i, $lvl)
 {
     $arr = array();
     while (count($roots) > $i) {
         $rec = array('text' => $roots[$i]['tnam'], 'hasChildren' => false);
         if (count($roots) > $i + 1) {
             if ($roots[$i + 1]['level'] > $lvl) {
                 $rec['hasChildren'] = true;
                 $rec['children'] = doTree($roots, $i + 1, $lvl + 1);
             } elseif ($roots[$i + 1]['level'] < $lvl) {
             }
         } else {
             $arr[] = $rec;
         }
     }
     return $arr;
 }
开发者ID:emisdb,项目名称:gena_0,代码行数:17,代码来源:ProductGroupController.php

示例4: elseif

} elseif ($action == 'nodes_top') {
    doTree('nodes_top');
} elseif ($action == 'paths') {
    doTree('paths');
} elseif ($action == 'listens') {
    doTree('listens');
} elseif ($action == 'sets') {
    doTree('sets');
} elseif ($action == 'sets_top') {
    doTree('sets_top');
} elseif ($action == 'subscriptions') {
    doTree('subscriptions');
} elseif ($action == 'sequences') {
    doTree('sequences');
} elseif ($action == 'tables') {
    doTree('tables');
}
$misc->printHeader('Slony');
$misc->printBody();
switch ($action) {
    case 'save_create_cluster':
        if (isset($_POST['cancel'])) {
            doClusters();
        } else {
            doCreateCluster(false);
        }
        break;
    case 'create_cluster':
        doCreateCluster(true);
        break;
    case 'drop_cluster':
开发者ID:hardikk,项目名称:HNH,代码行数:31,代码来源:plugin_slony.php


注:本文中的doTree函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。