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


PHP Util::getTitleForTarget方法代码示例

本文整理汇总了PHP中PMA\libraries\Util::getTitleForTarget方法的典型用法代码示例。如果您正苦于以下问题:PHP Util::getTitleForTarget方法的具体用法?PHP Util::getTitleForTarget怎么用?PHP Util::getTitleForTarget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PMA\libraries\Util的用法示例。


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

示例1: __construct

 /**
  * 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 = array();
     $this->_addIcon(Util::getScriptNameForOption($GLOBALS['cfg']['NavigationTreeDefaultTabTable'], 'table'));
     $this->_addIcon(Util::getScriptNameForOption($GLOBALS['cfg']['NavigationTreeDefaultTabTable2'], 'table'));
     $title = Util::getTitleForTarget($GLOBALS['cfg']['DefaultTabTable']);
     $this->title = $title;
     $script_name = Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table');
     $this->links = array('text' => $script_name . '?server=' . $GLOBALS['server'] . '&db=%2$s&table=%1$s' . '&pos=0&token=' . $_SESSION[' PMA_token '], 'icon' => array(Util::getScriptNameForOption($GLOBALS['cfg']['NavigationTreeDefaultTabTable'], 'table') . '?server=' . $GLOBALS['server'] . '&db=%2$s&table=%1$s&token=' . $_SESSION[' PMA_token '], Util::getScriptNameForOption($GLOBALS['cfg']['NavigationTreeDefaultTabTable2'], 'table') . '?server=' . $GLOBALS['server'] . '&db=%2$s&table=%1$s&token=' . $_SESSION[' PMA_token ']), 'title' => $this->title);
     $this->classes = 'table';
 }
开发者ID:itgsod-philip-skalander,项目名称:phpmyadmin,代码行数:20,代码来源:NodeTable.php

示例2: PMA_getLinkToDbAndTable

/**
 * Provide a line with links to the relevant database and table
 *
 * @param string $url_dbname url database name that urlencode() string
 * @param string $dbname     database name
 * @param string $tablename  table name
 *
 * @return string HTML snippet
 */
function PMA_getLinkToDbAndTable($url_dbname, $dbname, $tablename)
{
    $html_output = '[ ' . __('Database') . ' <a href="' . Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database') . PMA_URL_getCommon(array('db' => $url_dbname, 'reload' => 1)) . '">' . htmlspecialchars($dbname) . ': ' . Util::getTitleForTarget($GLOBALS['cfg']['DefaultTabDatabase']) . "</a> ]\n";
    if (mb_strlen($tablename)) {
        $html_output .= ' [ ' . __('Table') . ' <a href="' . Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table') . PMA_URL_getCommon(array('db' => $url_dbname, 'table' => $tablename, 'reload' => 1)) . '">' . htmlspecialchars($tablename) . ': ' . Util::getTitleForTarget($GLOBALS['cfg']['DefaultTabTable']) . "</a> ]\n";
    }
    return $html_output;
}
开发者ID:itgsod-philip-skalander,项目名称:phpmyadmin,代码行数:17,代码来源:server_privileges.lib.php

示例3: getJsParams

 /**
  * Returns, as an array, a list of parameters
  * used on the client side
  *
  * @return array
  */
 public function getJsParams()
 {
     $db = !empty($GLOBALS['db']) ? $GLOBALS['db'] : '';
     $table = !empty($GLOBALS['table']) ? $GLOBALS['table'] : '';
     $pftext = !empty($_SESSION['tmpval']['pftext']) ? $_SESSION['tmpval']['pftext'] : '';
     // not sure when this happens, but it happens
     if (!isset($GLOBALS['collation_connection'])) {
         $GLOBALS['collation_connection'] = 'utf8_general_ci';
     }
     $params = array('common_query' => PMA_URL_getCommon(array(), 'text'), 'opendb_url' => Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database'), 'safari_browser' => PMA_USR_BROWSER_AGENT == 'SAFARI' ? 1 : 0, 'collation_connection' => $GLOBALS['collation_connection'], 'lang' => $GLOBALS['lang'], 'server' => $GLOBALS['server'], 'table' => $table, 'db' => $db, 'token' => $_SESSION[' PMA_token '], 'text_dir' => $GLOBALS['text_dir'], 'show_databases_navigation_as_tree' => $GLOBALS['cfg']['ShowDatabasesNavigationAsTree'], 'pma_absolute_uri' => $GLOBALS['cfg']['PmaAbsoluteUri'], 'pma_text_default_tab' => Util::getTitleForTarget($GLOBALS['cfg']['DefaultTabTable']), 'pma_text_left_default_tab' => Util::getTitleForTarget($GLOBALS['cfg']['NavigationTreeDefaultTabTable']), 'pma_text_left_default_tab2' => Util::getTitleForTarget($GLOBALS['cfg']['NavigationTreeDefaultTabTable2']), 'LimitChars' => $GLOBALS['cfg']['LimitChars'], 'pftext' => $pftext, 'confirm' => $GLOBALS['cfg']['Confirm'], 'LoginCookieValidity' => $GLOBALS['cfg']['LoginCookieValidity'], 'logged_in' => isset($GLOBALS['userlink']) ? true : false, 'PMA_VERSION' => PMA_VERSION);
     if (isset($GLOBALS['cfg']['Server']) && isset($GLOBALS['cfg']['Server']['auth_type'])) {
         $params['auth_type'] = $GLOBALS['cfg']['Server']['auth_type'];
     }
     return $params;
 }
开发者ID:iShareLife,项目名称:phpmyadmin,代码行数:21,代码来源:Header.php


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