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


PHP Util::showIcons方法代码示例

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


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

示例1: PMA_getHtmlForChangeDatabaseCharset

/**
 * Get HTML snippet for change database charset
 *
 * @param string $db    database name
 * @param string $table table name
 *
 * @return string $html_output
 */
function PMA_getHtmlForChangeDatabaseCharset($db, $table)
{
    $html_output = '<div class="operations_half_width">' . '<form id="change_db_charset_form" ';
    $html_output .= 'class="ajax" ';
    $html_output .= 'method="post" action="db_operations.php">';
    $html_output .= PMA_URL_getHiddenInputs($db, $table);
    $html_output .= '<fieldset>' . "\n" . '    <legend>';
    if (PMA\libraries\Util::showIcons('ActionLinksMode')) {
        $html_output .= PMA\libraries\Util::getImage('s_asci.png') . '&nbsp';
    }
    $html_output .= '<label for="select_db_collation">' . __('Collation') . '</label>' . "\n" . '</legend>' . "\n" . PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'db_collation', 'select_db_collation', isset($_REQUEST['db_collation']) ? $_REQUEST['db_collation'] : '', false) . '</fieldset>' . '<fieldset class="tblFooters">' . '<input type="submit" name="submitcollation"' . ' value="' . __('Go') . '" />' . "\n" . '</fieldset>' . "\n" . '</form></div>' . "\n";
    return $html_output;
}
开发者ID:itgsod-philip-skalander,项目名称:phpmyadmin,代码行数:21,代码来源:operations.lib.php

示例2: _getTableNavigationButton

 /**
  * Get a navigation button
  *
  * @param string  $caption            iconic caption for button
  * @param string  $title              text for button
  * @param integer $pos                position for next query
  * @param string  $html_sql_query     query ready for display
  * @param boolean $back               whether 'begin' or 'previous'
  * @param string  $onsubmit           optional onsubmit clause
  * @param string  $input_for_real_end optional hidden field for special treatment
  * @param string  $onclick            optional onclick clause
  *
  * @return string                     html content
  *
  * @access  private
  *
  * @see     _getMoveBackwardButtonsForTableNavigation(),
  *          _getMoveForwardButtonsForTableNavigation()
  */
 private function _getTableNavigationButton($caption, $title, $pos, $html_sql_query, $back, $onsubmit = '', $input_for_real_end = '', $onclick = '')
 {
     $caption_output = '';
     if ($back) {
         if (Util::showIcons('TableNavigationLinksMode')) {
             $caption_output .= $caption;
         }
         if (Util::showText('TableNavigationLinksMode')) {
             $caption_output .= '&nbsp;' . $title;
         }
     } else {
         if (Util::showText('TableNavigationLinksMode')) {
             $caption_output .= $title;
         }
         if (Util::showIcons('TableNavigationLinksMode')) {
             $caption_output .= '&nbsp;' . $caption;
         }
     }
     $title_output = ' title="' . $title . '"';
     return '<td>' . '<form action="sql.php" method="post" ' . $onsubmit . '>' . PMA_URL_getHiddenInputs($this->__get('db'), $this->__get('table')) . '<input type="hidden" name="sql_query" value="' . $html_sql_query . '" />' . '<input type="hidden" name="pos" value="' . $pos . '" />' . '<input type="hidden" name="is_browse_distinct" value="' . $this->__get('is_browse_distinct') . '" />' . '<input type="hidden" name="goto" value="' . $this->__get('goto') . '" />' . $input_for_real_end . '<input type="submit" name="navig"' . ' class="ajax" ' . 'value="' . $caption_output . '" ' . $title_output . $onclick . ' />' . '</form>' . '</td>';
 }
开发者ID:rugbyprof,项目名称:phpmyadmin,代码行数:40,代码来源:DisplayResults.php

示例3: _getSelfLink

 /**
  * Renders the link to open a new page
  *
  * @param string $url The url of the page
  *
  * @return string
  */
 private function _getSelfLink($url)
 {
     $retval = '';
     $retval .= '<div id="selflink" class="print_ignore">';
     $retval .= '<a href="' . $url . '"' . ' title="' . __('Open new phpMyAdmin window') . '" target="_blank">';
     if (Util::showIcons('TabsMode')) {
         $retval .= Util::getImage('window-new.png', __('Open new phpMyAdmin window'));
     } else {
         $retval .= __('Open new phpMyAdmin window');
     }
     $retval .= '</a>';
     $retval .= '</div>';
     return $retval;
 }
开发者ID:flash1452,项目名称:phpmyadmin,代码行数:21,代码来源:Footer.php

示例4: PMA_getNavigationRow

/**
 * Returns the html for Navigation Row.
 *
 * @param Array $url_params     Links parameters
 * @param int   $pos            Position to display
 * @param int   $num_rows       Number of results row
 * @param bool  $dontlimitchars Whether limit chars
 *
 * @return string
 */
function PMA_getNavigationRow($url_params, $pos, $num_rows, $dontlimitchars)
{
    $html = "";
    // we do not know how much rows are in the binlog
    // so we can just force 'NEXT' button
    if ($pos > 0) {
        $this_url_params = $url_params;
        if ($pos > $GLOBALS['cfg']['MaxRows']) {
            $this_url_params['pos'] = $pos - $GLOBALS['cfg']['MaxRows'];
        }
        $html .= '<a href="server_binlog.php' . PMA_URL_getCommon($this_url_params) . '"';
        if (Util::showIcons('TableNavigationLinksMode')) {
            $html .= ' title="' . _pgettext('Previous page', 'Previous') . '">';
        } else {
            $html .= '>' . _pgettext('Previous page', 'Previous');
        }
        // end if... else...
        $html .= ' &lt; </a> - ';
    }
    $this_url_params = $url_params;
    if ($pos > 0) {
        $this_url_params['pos'] = $pos;
    }
    if ($dontlimitchars) {
        unset($this_url_params['dontlimitchars']);
        $tempTitle = __('Truncate Shown Queries');
        $tempImgMode = 'partial';
    } else {
        $this_url_params['dontlimitchars'] = 1;
        $tempTitle = __('Show Full Queries');
        $tempImgMode = 'full';
    }
    $html .= '<a href="server_binlog.php' . PMA_URL_getCommon($this_url_params) . '" title="' . $tempTitle . '">' . '<img src="' . $GLOBALS['pmaThemeImage'] . 's_' . $tempImgMode . 'text.png" alt="' . $tempTitle . '" /></a>';
    // we do not now how much rows are in the binlog
    // so we can just force 'NEXT' button
    if ($num_rows >= $GLOBALS['cfg']['MaxRows']) {
        $this_url_params = $url_params;
        $this_url_params['pos'] = $pos + $GLOBALS['cfg']['MaxRows'];
        $html .= ' - <a href="server_binlog.php' . PMA_URL_getCommon($this_url_params) . '"';
        if (Util::showIcons('TableNavigationLinksMode')) {
            $html .= ' title="' . _pgettext('Next page', 'Next') . '">';
        } else {
            $html .= '>' . _pgettext('Next page', 'Next');
        }
        // end if... else...
        $html .= ' &gt; </a>';
    }
    return $html;
}
开发者ID:netroby,项目名称:phpmyadmin,代码行数:59,代码来源:server_bin_log.lib.php

示例5: _getBreadcrumbs

 /**
  * Returns the breadcrumbs as HTML
  *
  * @return string HTML formatted breadcrumbs
  */
 private function _getBreadcrumbs()
 {
     $retval = '';
     $tbl_is_view = $GLOBALS['dbi']->getTable($this->_db, $this->_table)->isView();
     if (empty($GLOBALS['cfg']['Server']['host'])) {
         $GLOBALS['cfg']['Server']['host'] = '';
     }
     $server_info = !empty($GLOBALS['cfg']['Server']['verbose']) ? $GLOBALS['cfg']['Server']['verbose'] : $GLOBALS['cfg']['Server']['host'];
     $server_info .= empty($GLOBALS['cfg']['Server']['port']) ? '' : ':' . $GLOBALS['cfg']['Server']['port'];
     $separator = "<span class='separator item'>&nbsp;»</span>";
     $item = '<a href="%1$s%2$s" class="item">';
     if (Util::showText('TabsMode')) {
         $item .= '%4$s: ';
     }
     $item .= '%3$s</a>';
     $retval .= "<div id='floating_menubar'></div>";
     $retval .= "<div id='serverinfo'>";
     if (Util::showIcons('TabsMode')) {
         $retval .= Util::getImage('s_host.png', '', array('class' => 'item'));
     }
     $retval .= sprintf($item, Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabServer'], 'server'), URL::getCommon(), htmlspecialchars($server_info), __('Server'));
     if (strlen($this->_db) > 0) {
         $retval .= $separator;
         if (Util::showIcons('TabsMode')) {
             $retval .= Util::getImage('s_db.png', '', array('class' => 'item'));
         }
         $retval .= sprintf($item, Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database'), URL::getCommon(array('db' => $this->_db)), htmlspecialchars($this->_db), __('Database'));
         // if the table is being dropped, $_REQUEST['purge'] is set to '1'
         // so do not display the table name in upper div
         if (strlen($this->_table) > 0 && !(isset($_REQUEST['purge']) && $_REQUEST['purge'] == '1')) {
             include './libraries/tbl_info.inc.php';
             $retval .= $separator;
             if (Util::showIcons('TabsMode')) {
                 $icon = $tbl_is_view ? 'b_views.png' : 's_tbl.png';
                 $retval .= Util::getImage($icon, '', array('class' => 'item'));
             }
             $retval .= sprintf($item, Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabTable'], 'table'), URL::getCommon(array('db' => $this->_db, 'table' => $this->_table)), str_replace(' ', '&nbsp;', htmlspecialchars($this->_table)), $tbl_is_view ? __('View') : __('Table'));
             /**
              * Displays table comment
              */
             if (!empty($show_comment) && !isset($GLOBALS['avoid_show_comment'])) {
                 if (mb_strstr($show_comment, '; InnoDB free')) {
                     $show_comment = preg_replace('@; InnoDB free:.*?$@', '', $show_comment);
                 }
                 $retval .= '<span class="table_comment"';
                 $retval .= ' id="span_table_comment">&quot;';
                 $retval .= htmlspecialchars($show_comment);
                 $retval .= '&quot;</span>';
             }
             // end if
         } else {
             // no table selected, display database comment if present
             $cfgRelation = PMA_getRelationsParam();
             // Get additional information about tables for tooltip is done
             // in Util::getDbInfo() only once
             if ($cfgRelation['commwork']) {
                 $comment = PMA_getDbComment($this->_db);
                 /**
                  * Displays table comment
                  */
                 if (!empty($comment)) {
                     $retval .= '<span class="table_comment"' . ' id="span_table_comment">&quot;' . htmlspecialchars($comment) . '&quot;</span>';
                 }
                 // end if
             }
         }
     }
     $retval .= '<div class="clearfloat"></div>';
     $retval .= '</div>';
     return $retval;
 }
开发者ID:phpmyadmin,项目名称:phpmyadmin,代码行数:76,代码来源:Menu.php


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