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


PHP PMA_Util::getTitleForTarget方法代码示例

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


在下文中一共展示了PMA_Util::getTitleForTarget方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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
  *
  * @return Node_Table
  */
 public function __construct($name, $type = Node::OBJECT, $is_group = false)
 {
     parent::__construct($name, $type, $is_group);
     $this->icon = array();
     $this->_addIcon(PMA_Util::getScriptNameForOption($GLOBALS['cfg']['NavigationTreeDefaultTabTable'], 'table'));
     $this->_addIcon(PMA_Util::getScriptNameForOption($GLOBALS['cfg']['NavigationTreeDefaultTabTable2'], 'table'));
     $title = PMA_Util::getTitleForTarget($GLOBALS['cfg']['DefaultTabTable']);
     $this->title = $title;
     $script_name = PMA_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(PMA_Util::getScriptNameForOption($GLOBALS['cfg']['NavigationTreeDefaultTabTable'], 'table') . '?server=' . $GLOBALS['server'] . '&db=%2$s&table=%1$s&token=' . $_SESSION[' PMA_token '], PMA_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:saisai,项目名称:phpmyadmin,代码行数:22,代码来源:Node_Table.class.php

示例2: 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';
     }
     return array('common_query' => PMA_URL_getCommon(array(), 'text'), 'opendb_url' => $GLOBALS['cfg']['DefaultTabDatabase'], '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' => PMA_Util::getTitleForTarget($GLOBALS['cfg']['DefaultTabTable']), 'pma_text_left_default_tab' => PMA_Util::getTitleForTarget($GLOBALS['cfg']['NavigationTreeDefaultTabTable']), 'pma_text_left_default_tab2' => PMA_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);
 }
开发者ID:sruthikudaravalli,项目名称:QuickCabs,代码行数:17,代码来源:Header.class.php

示例3: 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="' . PMA_Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database') . PMA_URL_getCommon(array('db' => $url_dbname, 'reload' => 1)) . '">' . htmlspecialchars($dbname) . ': ' . PMA_Util::getTitleForTarget($GLOBALS['cfg']['DefaultTabDatabase']) . "</a> ]\n";
    if (mb_strlen($tablename)) {
        $html_output .= ' [ ' . __('Table') . ' <a href="' . PMA_Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table') . PMA_URL_getCommon(array('db' => $url_dbname, 'table' => $tablename, 'reload' => 1)) . '">' . htmlspecialchars($tablename) . ': ' . PMA_Util::getTitleForTarget($GLOBALS['cfg']['DefaultTabTable']) . "</a> ]\n";
    }
    return $html_output;
}
开发者ID:siddhantsomani,项目名称:phpmyadmin,代码行数:17,代码来源:server_privileges.lib.php

示例4: 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="' . $GLOBALS['cfg']['DefaultTabDatabase'] . '?' . $GLOBALS['url_query'] . '&amp;db=' . $url_dbname . '&amp;reload=1">' . htmlspecialchars($dbname) . ': ' . PMA_Util::getTitleForTarget($GLOBALS['cfg']['DefaultTabDatabase']) . "</a> ]\n";
    if (strlen($tablename)) {
        $html_output .= ' [ ' . __('Table') . ' <a href="' . $GLOBALS['cfg']['DefaultTabTable'] . '?' . $GLOBALS['url_query'] . '&amp;db=' . $url_dbname . '&amp;table=' . htmlspecialchars(urlencode($tablename)) . '&amp;reload=1">' . htmlspecialchars($tablename) . ': ' . PMA_Util::getTitleForTarget($GLOBALS['cfg']['DefaultTabTable']) . "</a> ]\n";
    }
    return $html_output;
}
开发者ID:SashiAsakura,项目名称:AWS_QuikID_website,代码行数:17,代码来源:server_privileges.lib.php

示例5: testPMAGetLinkToDbAndTable

 /**
  * Test for PMA_getLinkToDbAndTable
  *
  * @return void
  */
 public function testPMAGetLinkToDbAndTable()
 {
     $url_dbname = "url_dbname";
     $dbname = "dbname";
     $tablename = "tablename";
     $html = PMA_getLinkToDbAndTable($url_dbname, $dbname, $tablename);
     //$dbname
     $this->assertContains(__('Database'), $html);
     $this->assertContains(PMA_Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database'), $html);
     $item = PMA_URL_getCommon(array('db' => $url_dbname, 'reload' => 1));
     $this->assertContains($item, $html);
     $this->assertContains(htmlspecialchars($dbname), $html);
     //$tablename
     $this->assertContains(__('Table'), $html);
     $this->assertContains(PMA_Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table'), $html);
     $item = PMA_URL_getCommon(array('db' => $url_dbname, 'table' => $tablename, 'reload' => 1));
     $this->assertContains($item, $html);
     $this->assertContains(htmlspecialchars($tablename), $html);
     $item = PMA_Util::getTitleForTarget($GLOBALS['cfg']['DefaultTabTable']);
     $this->assertContains($item, $html);
 }
开发者ID:jgkong,项目名称:phpmyadmin,代码行数:26,代码来源:PMA_server_privileges_test.php

示例6: 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'] : '';
     return array('common_query' => PMA_generate_common_url('', '', '&'), 'opendb_url' => $GLOBALS['cfg']['DefaultTabDatabase'], 'safari_browser' => PMA_USR_BROWSER_AGENT == 'SAFARI' ? 1 : 0, 'querywindow_height' => $GLOBALS['cfg']['QueryWindowHeight'], 'querywindow_width' => $GLOBALS['cfg']['QueryWindowWidth'], 'collation_connection' => $GLOBALS['collation_connection'], 'lang' => $GLOBALS['lang'], 'server' => $GLOBALS['server'], 'table' => $table, 'db' => $db, 'token' => $_SESSION[' PMA_token '], 'text_dir' => $GLOBALS['text_dir'], 'pma_absolute_uri' => $GLOBALS['cfg']['PmaAbsoluteUri'], 'pma_text_default_tab' => PMA_Util::getTitleForTarget($GLOBALS['cfg']['DefaultTabTable']), 'pma_text_left_default_tab' => PMA_Util::getTitleForTarget($GLOBALS['cfg']['NavigationTreeDefaultTabTable']), 'confirm' => $GLOBALS['cfg']['Confirm']);
 }
开发者ID:fanscky,项目名称:HTPMS,代码行数:12,代码来源:Header.class.php

示例7: PMA_displayTableList


//.........这里部分代码省略.........
                    return false;">
                <?php
                if ($GLOBALS['text_dir'] === 'rtl') {
                    echo ' <bdo dir="ltr">(' . $table['tab' . $sep . 'count'] . ')</bdo> ';
                }
                echo htmlspecialchars(substr($group, 0, strlen($group) - strlen($sep)));
                if ($GLOBALS['text_dir'] === 'ltr') {
                    echo ' <bdo dir="ltr">(' . $table['tab' . $sep . 'count'] . ')</bdo> ';
                }
                ?>
            </a>
            <?php

            unset($table['is' . $sep . 'group']);
            unset($table['tab' . $sep . 'group']);
            unset($table['tab' . $sep . 'count']);

            if ($visible
                && ((isset($_REQUEST['tbl_group'])
                && (strpos($_REQUEST['tbl_group'], $group) === 0
                || strpos($_REQUEST['tbl_group'], $sep . $group) !== false))
                || strpos($GLOBALS['table'], $group) === 0)
            ) {
                PMA_displayTableList(
                    $table, true, $tab_group_full . $group, $table_db
                );
            } else {
                PMA_displayTableList($table, false, '', $table_db);
            }
            echo '</li>' . "\n";
        } elseif (is_array($table)) {
            // the table was not grouped because it is the only one with its prefix
            while (isset($table['is' . $sep . 'group'])) {
                // get the array with the actual table information
                foreach ($table as $value) {
                    if (is_array($value)) {
                        $table = $value;
                    }
                }
            }
            $link_title = PMA_Util::getTitleForTarget(
                $GLOBALS['cfg']['LeftDefaultTabTable']
            );
            // quick access icon next to each table name
            echo '<li>' . "\n";
            echo '<a target="frame_content" class="tableicon" title="'
                . htmlspecialchars($link_title)
                . ': ' . htmlspecialchars($table['Comment'])
                .' ('
                . PMA_Util::formatNumber($table['Rows'], 0)
                . ' ' . __('Rows') . ')"'
                .' id="quick_' . htmlspecialchars($table_db . '.' . $table['Name']) . '"'
                .' href="' . $GLOBALS['cfg']['LeftDefaultTabTable'] . '?'
                . $GLOBALS['common_url_query']
                .'&amp;table=' . urlencode($table['Name'])
                .'&amp;goto=' . $GLOBALS['cfg']['LeftDefaultTabTable']
                . '" >';
            $attr = array(
                'id' => 'icon_' . htmlspecialchars($table_db . '.' . $table['Name'])
            );
            if (PMA_Table::isView($table_db, $table['Name'])) {
                echo PMA_Util::getImage(
                    's_views.png',
                    htmlspecialchars($link_title),
                    $attr
                );
            } else {
                echo PMA_Util::getImage(
                    'b_browse.png',
                    htmlspecialchars($link_title),
                    $attr
                );
            }
            echo '</a>';

            // link for the table name itself
            $href = $GLOBALS['cfg']['DefaultTabTable'] . '?'
                .$GLOBALS['common_url_query'] . '&amp;table='
                .urlencode($table['Name']) . '&amp;pos=0';
            echo '<a target="frame_content" href="' . $href . '" title="'
                . htmlspecialchars(
                    PMA_Util::getTitleForTarget(
                        $GLOBALS['cfg']['DefaultTabTable']
                    )
                    . ': ' . $table['Comment']
                    .' ('
                    . PMA_Util::formatNumber(
                        $table['Rows'], 0
                    )
                    . ' ' . __('Rows') . ')'
                )
                .'" id="' . htmlspecialchars($table_db . '.' . $table['Name']) . '">'
                // preserve spaces in table name
                . str_replace(' ', '&nbsp;', htmlspecialchars($table['disp_name']))
                . '</a>';
            echo '</li>' . "\n";
        }
    }
    echo '</ul>';
}
开发者ID:nhodges,项目名称:phpmyadmin,代码行数:101,代码来源:navigation.php

示例8: testGetTitleForTarget

 /**
  * Test for
  *
  * @param string $target Target
  * @param array  $result Expected value
  *
  * @return void
  *
  * @dataProvider dataProvider
  */
 function testGetTitleForTarget($target, $result)
 {
     $this->assertEquals($result, PMA_Util::getTitleForTarget($target));
 }
开发者ID:yonh,项目名称:php-mvc,代码行数:14,代码来源:PMA_getTitleForTarget_test.php

示例9: PMA_escapeJsString

?>
';
    var text_dir = '<?php 
echo PMA_escapeJsString($GLOBALS['text_dir']);
?>
';
    var pma_absolute_uri = '<?php 
echo PMA_escapeJsString($GLOBALS['cfg']['PmaAbsoluteUri']);
?>
';
    var pma_text_default_tab = '<?php 
echo PMA_escapeJsString(PMA_Util::getTitleForTarget($GLOBALS['cfg']['DefaultTabTable']));
?>
';
    var pma_text_left_default_tab = '<?php 
echo PMA_escapeJsString(PMA_Util::getTitleForTarget($GLOBALS['cfg']['LeftDefaultTabTable']));
?>
';

    // for content and navigation frames

    var frame_content = 0;
    var frame_navigation = 0;
    function getFrames()
    {
<?php 
if ($GLOBALS['text_dir'] === 'ltr') {
    ?>
        frame_content = window.frames[1];
        frame_navigation = window.frames[0];
<?php 
开发者ID:nhodges,项目名称:phpmyadmin,代码行数:31,代码来源:index.php

示例10: PMA_generate_common_url

 * DB search optimisation
 *
 * @package PhpMyAdmin
 */
require_once 'libraries/common.inc.php';
require_once 'libraries/Util.class.php';
$db = $_GET['db'];
$table_term = $_GET['table'];
$common_url_query = PMA_generate_common_url($GLOBALS['db']);
$tables_full = PMA_Util::getTableList($db);
$tables_response = array();
foreach ($tables_full as $key => $table) {
    if (strpos($key, $table_term) !== false) {
        $link = '<li class="ajax_table"><a class="tableicon" title="' . htmlspecialchars($link_title) . ': ' . htmlspecialchars($table['Comment']) . ' (' . PMA_Util::formatNumber($table['Rows'], 0) . ' ' . __('Rows') . ')"' . ' id="quick_' . htmlspecialchars($table_db . '.' . $table['Name']) . '"' . ' href="' . $GLOBALS['cfg']['LeftDefaultTabTable'] . '?' . $common_url_query . '&amp;table=' . urlencode($table['Name']) . '&amp;goto=' . $GLOBALS['cfg']['LeftDefaultTabTable'] . '" >';
        $attr = array('id' => 'icon_' . htmlspecialchars($table_db . '.' . $table['Name']));
        if (PMA_Table::isView($table_db, $table['Name'])) {
            $link .= PMA_Util::getImage('s_views.png', htmlspecialchars($link_title), $attr);
        } else {
            $link .= PMA_Util::getImage('b_browse.png', htmlspecialchars($link_title), $attr);
        }
        $link .= '</a>';
        // link for the table name itself
        $href = $GLOBALS['cfg']['DefaultTabTable'] . '?' . $common_url_query . '&amp;table=' . urlencode($table['Name']) . '&amp;pos=0';
        $link .= '<a href="' . $href . '" title="' . htmlspecialchars(PMA_Util::getTitleForTarget($GLOBALS['cfg']['DefaultTabTable']) . ': ' . $table['Comment'] . ' (' . PMA_Util::formatNumber($table['Rows'], 0) . ' ' . __('Rows') . ')') . '" id="' . htmlspecialchars($table_db . '.' . $table['Name']) . '">' . str_replace(' ', '&nbsp;', htmlspecialchars($table['disp_name'])) . '</a>';
        $link .= '</li>' . "\n";
        $table['line'] = $link;
        $tables_response[] = $table;
    }
}
$response = PMA_Response::getInstance();
$response->addJSON('tables', $tables_response);
开发者ID:nhodges,项目名称:phpmyadmin,代码行数:31,代码来源:db_tables_search.php


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