/** * Initialises the class * * @param string $name An identifier for the new node * @param int $type Type of node, may be one of CONTAINER or OBJECT * @param bool $is_group Whether this object has been created * while grouping nodes */ public function __construct($name, $type = Node::OBJECT, $is_group = false) { parent::__construct($name, $type, $is_group); $this->icon = PMA\libraries\Util::getImage('b_index.png', __('Index')); $this->links = array('text' => 'tbl_indexes.php?server=' . $GLOBALS['server'] . '&db=%3$s&table=%2$s&index=%1$s' . '&token=' . $_SESSION[' PMA_token '], 'icon' => 'tbl_indexes.php?server=' . $GLOBALS['server'] . '&db=%3$s&table=%2$s&index=%1$s' . '&token=' . $_SESSION[' PMA_token ']); $this->classes = 'index'; }
/** * Initialises the class * * @param string $name An identifier for the new node * @param int $type Type of node, may be one of CONTAINER or OBJECT * @param bool $is_group Whether this object has been created * while grouping nodes */ public function __construct($name, $type = Node::OBJECT, $is_group = false) { parent::__construct($name, $type, $is_group); $this->icon = PMA\libraries\Util::getImage('b_triggers.png'); $this->links = array('text' => 'db_triggers.php?server=' . $GLOBALS['server'] . '&db=%3$s&item_name=%1$s&edit_item=1' . '&token=' . $_SESSION[' PMA_token '], 'icon' => 'db_triggers.php?server=' . $GLOBALS['server'] . '&db=%3$s&item_name=%1$s&export_item=1' . '&token=' . $_SESSION[' PMA_token ']); $this->classes = 'trigger'; }
/** * Initialises the class * * @param string $name An identifier for the new node * @param int $type Type of node, may be one of CONTAINER or OBJECT * @param bool $is_group Whether this object has been created * while grouping nodes */ public function __construct($name, $type = Node::OBJECT, $is_group = false) { parent::__construct($name, $type, $is_group); $this->icon = Util::getImage('s_db.png', __('Database operations')); $script_name = Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database'); $this->links = array('text' => $script_name . '?server=' . $GLOBALS['server'] . '&db=%1$s&token=' . $_SESSION[' PMA_token '], 'icon' => 'db_operations.php?server=' . $GLOBALS['server'] . '&db=%1$s&token=' . $_SESSION[' PMA_token '], 'title' => __('Structure')); $this->classes = 'database'; }
/** * Initialises the class * * @param string $name An identifier for the new node */ public function __construct($name) { parent::__construct($name, Node::CONTAINER); if ($GLOBALS['is_create_db_priv'] && $GLOBALS['cfg']['ShowCreateDb'] !== false) { $new = NodeFactory::getInstance('Node', _pgettext('Create new database', 'New')); $new->isNew = true; $new->icon = PMA\libraries\Util::getImage('b_newdb.png', ''); $new->links = array('text' => 'server_databases.php?server=' . $GLOBALS['server'], 'icon' => 'server_databases.php?server=' . $GLOBALS['server']); $new->classes = 'new_database italics'; $this->addChild($new); } }
/** * Initialises the class */ public function __construct() { parent::__construct(__('Triggers'), Node::CONTAINER); $this->icon = PMA\libraries\Util::getImage('b_triggers.png'); $this->links = array('text' => 'db_triggers.php?server=' . $GLOBALS['server'] . '&db=%2$s&table=%1$s&token=' . $_SESSION[' PMA_token '], 'icon' => 'db_triggers.php?server=' . $GLOBALS['server'] . '&db=%2$s&table=%1$s&token=' . $_SESSION[' PMA_token ']); $this->real_name = 'triggers'; $new = NodeFactory::getInstance('Node', _pgettext('Create new trigger', 'New')); $new->isNew = true; $new->icon = PMA\libraries\Util::getImage('b_trigger_add.png', ''); $new->links = array('text' => 'db_triggers.php?server=' . $GLOBALS['server'] . '&db=%3$s&token=' . $_SESSION[' PMA_token '] . '&add_item=1', 'icon' => 'db_triggers.php?server=' . $GLOBALS['server'] . '&db=%3$s&token=' . $_SESSION[' PMA_token '] . '&add_item=1'); $new->classes = 'new_trigger italics'; $this->addChild($new); }
/** * Initialises the class */ public function __construct() { parent::__construct(__('Columns'), Node::CONTAINER); $this->icon = Util::getImage('pause.png', __('Columns')); $this->links = array('text' => 'tbl_structure.php?server=' . $GLOBALS['server'] . '&db=%2$s&table=%1$s' . '&token=' . $_SESSION[' PMA_token '], 'icon' => 'tbl_structure.php?server=' . $GLOBALS['server'] . '&db=%2$s&table=%1$s' . '&token=' . $_SESSION[' PMA_token ']); $this->real_name = 'columns'; $new_label = _pgettext('Create new column', 'New'); $new = NodeFactory::getInstance('Node', $new_label); $new->isNew = true; $new->icon = Util::getImage('b_column_add.png', $new_label); $new->links = array('text' => 'tbl_addfield.php?server=' . $GLOBALS['server'] . '&db=%3$s&table=%2$s' . '&field_where=last&after_field=' . '&token=' . $_SESSION[' PMA_token '], 'icon' => 'tbl_addfield.php?server=' . $GLOBALS['server'] . '&db=%3$s&table=%2$s' . '&field_where=last&after_field=' . '&token=' . $_SESSION[' PMA_token ']); $new->classes = 'new_column italics'; $this->addChild($new); }
/** * Initialises the class */ public function __construct() { parent::__construct(__('Indexes'), Node::CONTAINER); $this->icon = PMA\libraries\Util::getImage('b_index.png', __('Indexes')); $this->links = array('text' => 'tbl_structure.php?server=' . $GLOBALS['server'] . '&db=%2$s&table=%1$s' . '&token=' . $_SESSION[' PMA_token '], 'icon' => 'tbl_structure.php?server=' . $GLOBALS['server'] . '&db=%2$s&table=%1$s' . '&token=' . $_SESSION[' PMA_token ']); $this->real_name = 'indexes'; $new_label = _pgettext('Create new index', 'New'); $new = NodeFactory::getInstance('Node', $new_label); $new->isNew = true; $new->icon = PMA\libraries\Util::getImage('b_index_add.png', $new_label); $new->links = array('text' => 'tbl_indexes.php?server=' . $GLOBALS['server'] . '&create_index=1&added_fields=2' . '&db=%3$s&table=%2$s&token=' . $_SESSION[' PMA_token '], 'icon' => 'tbl_indexes.php?server=' . $GLOBALS['server'] . '&create_index=1&added_fields=2' . '&db=%3$s&table=%2$s&token=' . $_SESSION[' PMA_token ']); $new->classes = 'new_index italics'; $this->addChild($new); }
/** * Generates the HTML code for displaying the list pagination * * @param Node $node The node for whose children the page * selector will be created * * @return string */ private function _getPageSelector($node) { $retval = ''; if ($node === $this->_tree) { $retval .= Util::getListNavigator($this->_tree->getPresence('databases', $this->_searchClause), $this->_pos, array('server' => $GLOBALS['server']), 'navigation.php', 'frame_navigation', $GLOBALS['cfg']['FirstLevelNavigationItems'], 'pos', array('dbselector')); } else { if ($node->type == Node::CONTAINER && !$node->is_group) { $paths = $node->getPaths(); $level = isset($paths['aPath_clean'][4]) ? 3 : 2; $_url_params = array('aPath' => $paths['aPath'], 'vPath' => $paths['vPath'], 'pos' => $this->_pos, 'server' => $GLOBALS['server'], 'pos2_name' => $paths['aPath_clean'][2]); if ($level == 3) { $pos = $node->pos3; $_url_params['pos2_value'] = $node->pos2; $_url_params['pos3_name'] = $paths['aPath_clean'][4]; } else { $pos = $node->pos2; } $num = $node->realParent()->getPresence($node->real_name, $this->_searchClause2); $retval .= Util::getListNavigator($num, $pos, $_url_params, 'navigation.php', 'frame_navigation', $GLOBALS['cfg']['MaxNavigationItems'], 'pos' . $level . '_value'); } } return $retval; }
/** * Initialises the class * * @param string $name An identifier for the new node * @param int $type Type of node, may be one of CONTAINER or OBJECT * @param bool $is_group Whether this object has been created * while grouping nodes */ public function __construct($name, $type = Node::OBJECT, $is_group = false) { parent::__construct($name, $type, $is_group); $this->icon = PMA\libraries\Util::getImage('pause.png', __('Column')); $this->links = array('text' => 'tbl_structure.php?server=' . $GLOBALS['server'] . '&db=%3$s&table=%2$s&field=%1$s' . '&change_column=1' . '&token=' . $_SESSION[' PMA_token '], 'icon' => 'tbl_structure.php?server=' . $GLOBALS['server'] . '&db=%3$s&table=%2$s&field=%1$s' . '&change_column=1' . '&token=' . $_SESSION[' PMA_token '], 'title' => __('Structure')); }