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


PHP PMA_getString函数代码示例

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


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

示例1: PMA_pluginGetOptions

/**
 * Returns html div with editable options for plugin
 *
 * @param string $section name of config section in $GLOBALS['cfg'][$section]
 * @param array  &$list   array with plugin instances
 *
 * @return string  html fieldset with plugin options
 */
function PMA_pluginGetOptions($section, &$list)
{
    $ret = '';
    // Options for plugins that support them
    foreach ($list as $plugin) {
        $properties = $plugin->getProperties();
        if ($properties != null) {
            $text = $properties->getText();
            $options = $properties->getOptions();
        }
        $elem = explode('\\', get_class($plugin));
        $plugin_name = array_pop($elem);
        unset($elem);
        $plugin_name = mb_strtolower(mb_substr($plugin_name, mb_strlen($section)));
        $ret .= '<div id="' . $plugin_name . '_options" class="format_specific_options">';
        $ret .= '<h3>' . PMA_getString($text) . '</h3>';
        $no_options = true;
        if ($options != null && count($options) > 0) {
            foreach ($options->getProperties() as $propertyMainGroup) {
                // check for hidden properties
                $no_options = true;
                foreach ($propertyMainGroup->getProperties() as $propertyItem) {
                    if (strcmp('PMA\\libraries\\properties\\options\\items\\HiddenPropertyItem', get_class($propertyItem))) {
                        $no_options = false;
                        break;
                    }
                }
                $ret .= PMA_pluginGetOneOption($section, $plugin_name, $propertyMainGroup);
            }
        }
        if ($no_options) {
            $ret .= '<p>' . __('This format has no options') . '</p>';
        }
        $ret .= '</div>';
    }
    return $ret;
}
开发者ID:phpmyadmin,项目名称:phpmyadmin,代码行数:45,代码来源:plugin_interface.lib.php

示例2: PMA_pluginGetOptions

/**
 * string PMA_pluginGetOptions(string $section, array &$list)
 *
 * return html fieldset with editable options for plugin
 *
 * @uses    PMA_getString()
 * @uses    PMA_pluginGetOneOption()
 * @param   string  $section    name of config section in $GLOBALS['cfg'][$section]
 * @param   array   &$list      array with plugin configuration defined in plugin file
 * @return  string              html fieldset with plugin options
 */
function PMA_pluginGetOptions($section, &$list)
{
    $ret = '';
    // Options for plugins that support them
    foreach ($list as $plugin_name => $val) {
        $ret .= '<fieldset id="' . $plugin_name . '_options" class="options">';
        $ret .= '<legend>' . PMA_getString($val['options_text']) . '</legend>';
        $count = 0;
        if (isset($val['options']) && count($val['options']) > 0) {
            foreach ($val['options'] as $id => $opt) {
                if ($opt['type'] != 'hidden') {
                    $count++;
                }
                $ret .= PMA_pluginGetOneOption($section, $plugin_name, $id, $opt);
            }
        }
        if ($count == 0) {
            $ret .= $GLOBALS['strNoOptions'];
        }
        $ret .= '</fieldset>';
    }
    return $ret;
}
开发者ID:johangas,项目名称:moped,代码行数:34,代码来源:plugin_interface.lib.php

示例3: PMA_pluginGetOptions

/**
 * Returns html div with editable options for plugin
 *
 * @param string $section name of config section in $GLOBALS['cfg'][$section]
 * @param array &$list array with plugin instances
 *
 * @return string  html fieldset with plugin options
 */
function PMA_pluginGetOptions($section, &$list)
{
    $ret = '';
    $default = PMA_pluginGetDefault('Export', 'format');
    // Options for plugins that support them
    foreach ($list as $plugin) {
        $properties = $plugin->getProperties();
        if ($properties != null) {
            $text = $properties->getText();
            $options = $properties->getOptions();
        }
        $plugin_name = strtolower(substr(get_class($plugin), strlen($section)));
        $ret .= '<div id="' . $plugin_name . '_options" class="format_specific_options">';
        $ret .= '<h3>' . PMA_getString($text) . '</h3>';
        $no_options = true;
        if ($options != null && count($options) > 0) {
            foreach ($options->getProperties() as $propertyMainGroup) {
                // check for hidden properties
                $no_options = true;
                foreach ($propertyMainGroup->getProperties() as $propertyItem) {
                    if (strcmp("HiddenPropertyItem", get_class($propertyItem))) {
                        $no_options = false;
                        break;
                    }
                }
                $ret .= PMA_pluginGetOneOption($section, $plugin_name, $propertyMainGroup);
            }
        }
        if ($no_options) {
            $ret .= '<p>' . __('This format has no options') . '</p>';
        }
        $ret .= '</div>';
    }
    return $ret;
}
开发者ID:dram1008,项目名称:gleb,代码行数:43,代码来源:plugin_interface.lib.php

示例4: foreach

<?php 
}
?>
    </fieldset>
<?php 
// Options for imports that support them
foreach ($import_list as $key => $val) {
    if (isset($val['options'])) {
        echo '<fieldset id="' . $key . '_options" class="options">';
        echo '<legend>' . PMA_getString($val['options_text']) . '</legend>';
        foreach ($val['options'] as $id => $opt) {
            if ($opt['type'] == 'bool') {
                echo '<input type="checkbox" name="' . $key . '_' . $opt['name'] . '" value="something" id="checkbox_' . $key . '_' . $opt['name'] . '" ' . PMA_importCheckboxCheck($key . '_' . $opt['name']) . '/>';
                echo '<label for="checkbox_' . $key . '_' . $opt['name'] . '">' . PMA_getString($opt['text']) . '</label>';
            } elseif ($opt['type'] == 'text') {
                echo '<label for="text_' . $key . '_' . $opt['name'] . '" style="float: left; width: 20%;">' . PMA_getString($opt['text']) . '</label>';
                echo '<input type="text" name="' . $key . '_' . $opt['name'] . '" value="' . PMA_importGetDefault($key . '_' . $opt['name']) . '" id="text_' . $key . '_' . $opt['name'] . '" ' . (isset($opt['size']) ? 'size="' . $opt['size'] . '"' : '') . (isset($opt['len']) ? 'maxlength="' . $opt['len'] . '"' : '') . '/>';
            } else {
                /* This should be seen only by plugin writers, so I do not thing this needs translation. */
                echo 'UNKNOWN OPTION IN IMPORT PLUGIN ' . $key . '!';
            }
            echo '<br />';
        }
        echo '</fieldset>';
    }
}
?>
    <fieldset id="none_options" class="options">
        <legend><?php 
echo $strNoOptions;
?>
开发者ID:BackupTheBerlios,项目名称:vhcs-svn,代码行数:31,代码来源:display_import.lib.php

示例5: PMA_pluginGetOptions

/**
 * string PMA_pluginGetOptions(string $section, array &$list)
 *
 * return html fieldset with editable options for plugin
 *
 * @uses    PMA_getString()
 * @uses    PMA_pluginGetOneOption()
 * @param   string  $section    name of config section in $GLOBALS['cfg'][$section]
 * @param   array   &$list      array with plugin configuration defined in plugin file
 * @return  string              html fieldset with plugin options
 */
function PMA_pluginGetOptions($section, &$list)
{
    $ret = '';
    // Options for plugins that support them
    foreach ($list as $plugin_name => $val) {
        $ret .= '<fieldset id="' . $plugin_name . '_options" class="options">';
        $ret .= '<legend>' . PMA_getString($val['options_text']) . '</legend>';
        if (isset($val['options'])) {
            $ret .= '<table class="form">';
            $ret .= '<tbody>';
            foreach ($val['options'] as $id => $opt) {
                $ret .= PMA_pluginGetOneOption($section, $plugin_name, $id, $opt);
            }
            $ret .= '</tbody>';
            $ret .= '</table>';
        } else {
            $ret .= $GLOBALS['strNoOptions'];
        }
        $ret .= '</fieldset>';
    }
    return $ret;
}
开发者ID:hoogle,项目名称:ttt,代码行数:33,代码来源:plugin_interface.lib.php

示例6: PMA_pluginGetOptions

/**
 * string PMA_pluginGetOptions(string $section, array &$list)
 *
 * return html div with editable options for plugin
 *
 * @uses    PMA_getString()
 * @uses    PMA_pluginGetOneOption()
 * @uses    PMA_pluginGetDefault();
 * @param   string  $section    name of config section in $GLOBALS['cfg'][$section]
 * @param   array   &$list      array with plugin configuration defined in plugin file
 * @return  string              html fieldset with plugin options
 */
function PMA_pluginGetOptions($section, &$list)
{
    $ret = '';
    $default = PMA_pluginGetDefault('Export', 'format');
    // Options for plugins that support them
    foreach ($list as $plugin_name => $val) {
        $ret .= '<div id="' . $plugin_name . '_options" class="format_specific_options">';
        $count = 0;
        $ret .= '<h3>' . PMA_getString($val['text']) . '</h3>';
        if (isset($val['options']) && count($val['options']) > 0) {
            foreach ($val['options'] as $id => $opt) {
                if ($opt['type'] != 'hidden' && $opt['type'] != 'begin_group' && $opt['type'] != 'end_group' && $opt['type'] != 'begin_subgroup' && $opt['type'] != 'end_subgroup') {
                    $count++;
                }
                $ret .= PMA_pluginGetOneOption($section, $plugin_name, $id, $opt);
            }
        }
        if ($count == 0) {
            $ret .= '<p>' . __('This format has no options') . '</p>';
        }
        $ret .= '</div>';
    }
    return $ret;
}
开发者ID:BGCX262,项目名称:zuozhenshi-prego-svn-to-git,代码行数:36,代码来源:plugin_interface.lib.php


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