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


PHP Util::showDocu方法代码示例

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


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

示例1: PMA_getHtmlForCopytable

/**
 * Get HTML div for copy table
 *
 * @return string $html_output
 */
function PMA_getHtmlForCopytable()
{
    $html_output = '<div class="operations_half_width">';
    $html_output .= '<form method="post" action="tbl_operations.php" ' . 'name="copyTable" ' . 'id="copyTable" ' . ' class="ajax" ' . 'onsubmit="return emptyCheckTheField(this, \'new_name\')">' . PMA_URL_getHiddenInputs($GLOBALS['db'], $GLOBALS['table']) . '<input type="hidden" name="reload" value="1" />';
    $html_output .= '<fieldset>';
    $html_output .= '<legend>' . __('Copy table to (database<b>.</b>table)') . '</legend>';
    if (count($GLOBALS['pma']->databases) > $GLOBALS['cfg']['MaxDbList']) {
        $html_output .= '<input class="halfWidth" type="text" maxlength="100" ' . 'size="30" name="target_db" ' . 'value="' . htmlspecialchars($GLOBALS['db']) . '"/>';
    } else {
        $html_output .= '<select class="halfWidth" name="target_db">' . $GLOBALS['pma']->databases->getHtmlOptions(true, false) . '</select>';
    }
    $html_output .= '&nbsp;<strong>.</strong>&nbsp;';
    $html_output .= '<input class="halfWidth" type="text" required="required" ' . 'size="20" name="new_name" maxlength="64" ' . 'value="' . htmlspecialchars($GLOBALS['table']) . '"/><br />';
    $choices = array('structure' => __('Structure only'), 'data' => __('Structure and data'), 'dataonly' => __('Data only'));
    $html_output .= PMA\libraries\Util::getRadioFields('what', $choices, 'data', true);
    $html_output .= '<br />';
    $html_output .= '<input type="checkbox" name="drop_if_exists" ' . 'value="true" id="checkbox_drop" />' . '<label for="checkbox_drop">' . sprintf(__('Add %s'), 'DROP TABLE') . '</label><br />' . '<input type="checkbox" name="sql_auto_increment" ' . 'value="1" id="checkbox_auto_increment_cp" />' . '<label for="checkbox_auto_increment_cp">' . __('Add AUTO_INCREMENT value') . '</label><br />';
    // display "Add constraints" choice only if there are
    // foreign keys
    if (PMA_getForeigners($GLOBALS['db'], $GLOBALS['table'], '', 'foreign')) {
        $html_output .= '<input type="checkbox" name="add_constraints" ' . 'value="1" id="checkbox_constraints" checked="checked"/>';
        $html_output .= '<label for="checkbox_constraints">' . __('Add constraints') . '</label><br />';
    }
    // endif
    $html_output .= '<br />';
    if (isset($GLOBALS['table_priv']) && $GLOBALS['table_priv'] && isset($GLOBALS['col_priv']) && $GLOBALS['col_priv'] && isset($GLOBALS['flush_priv']) && $GLOBALS['flush_priv']) {
        $html_output .= '<input type="checkbox" name="adjust_privileges" ' . 'value="1" id="checkbox_adjust_privileges" checked="checked" />';
    } else {
        $html_output .= '<input type="checkbox" name="adjust_privileges" ' . 'value="1" id="checkbox_adjust_privileges" title="' . __('You don\'t have sufficient privileges to perform this ' . 'operation; Please refer to the documentation for more details') . '" disabled/>';
    }
    $html_output .= '<label for="checkbox_adjust_privileges">' . __('Adjust privileges') . Util::showDocu('faq', 'faq6-39') . '</label><br />';
    if (isset($_COOKIE['pma_switch_to_new']) && $_COOKIE['pma_switch_to_new'] == 'true') {
        $pma_switch_to_new = 'true';
    }
    $html_output .= '<input type="checkbox" name="switch_to_new" value="true"' . 'id="checkbox_switch"' . (isset($pma_switch_to_new) && $pma_switch_to_new == 'true' ? ' checked="checked"' : '' . '/>');
    $html_output .= '<label for="checkbox_switch">' . __('Switch to copied table') . '</label>' . '</fieldset>';
    $html_output .= '<fieldset class="tblFooters">' . '<input type="submit" name="submit_copy" value="' . __('Go') . '" />' . '</fieldset>' . '</form>' . '</div>';
    return $html_output;
}
开发者ID:itgsod-philip-skalander,项目名称:phpmyadmin,代码行数:44,代码来源:operations.lib.php

示例2: PMA_RTN_getEditorForm


//.........这里部分代码省略.........
    $retval .= "    </td>";
    $retval .= "</tr>";
    // parameter handling end
    $retval .= "<tr class='routine_return_row" . $isfunction_class . "'>";
    $retval .= "    <td>" . __('Return type') . "</td>";
    $retval .= "    <td><select name='item_returntype'>";
    $retval .= PMA\libraries\Util::getSupportedDatatypes(true, $routine['item_returntype']);
    $retval .= "    </select></td>";
    $retval .= "</tr>";
    $retval .= "<tr class='routine_return_row" . $isfunction_class . "'>";
    $retval .= "    <td>" . __('Return length/values') . "</td>";
    $retval .= "    <td><input type='text' name='item_returnlength'";
    $retval .= "        value='" . $routine['item_returnlength'] . "' /></td>";
    $retval .= "    <td class='hide no_len'>---</td>";
    $retval .= "</tr>";
    $retval .= "<tr class='routine_return_row" . $isfunction_class . "'>";
    $retval .= "    <td>" . __('Return options') . "</td>";
    $retval .= "    <td><div>";
    $retval .= PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_CHARSET, "item_returnopts_text", null, $routine['item_returnopts_text']);
    $retval .= "    </div>";
    $retval .= "    <div><select name='item_returnopts_num'>";
    $retval .= "        <option value=''></option>";
    foreach ($param_opts_num as $key => $value) {
        $selected = "";
        if (!empty($routine['item_returnopts_num']) && $routine['item_returnopts_num'] == $value) {
            $selected = " selected='selected'";
        }
        $retval .= "<option" . $selected . ">" . $value . "</option>";
    }
    $retval .= "    </select></div>";
    $retval .= "    <div class='hide no_opts'>---</div>";
    $retval .= "</td>";
    $retval .= "</tr>";
    $retval .= "<tr>";
    $retval .= "    <td>" . __('Definition') . "</td>";
    $retval .= "    <td><textarea name='item_definition' rows='15' cols='40'>";
    $retval .= $routine['item_definition'];
    $retval .= "</textarea></td>";
    $retval .= "</tr>";
    $retval .= "<tr>";
    $retval .= "    <td>" . __('Is deterministic') . "</td>";
    $retval .= "    <td><input type='checkbox' name='item_isdeterministic'" . $routine['item_isdeterministic'] . " /></td>";
    $retval .= "</tr>";
    if (isset($_REQUEST['edit_item']) && !empty($_REQUEST['edit_item'])) {
        $retval .= "<tr>";
        $retval .= "    <td>" . __('Adjust privileges');
        $retval .= PMA\libraries\Util::showDocu('faq', 'faq6-39');
        $retval .= "</td>";
        if ($GLOBALS['proc_priv'] && $GLOBALS['is_reload_priv']) {
            $retval .= "    <td><input type='checkbox' " . "name='item_adjust_privileges' value='1' checked /></td>";
        } else {
            $retval .= "    <td><input type='checkbox' " . "name='item_adjust_privileges' value='1' title='" . __("You do not have sufficient privileges to perform this " . "operation; Please refer to the documentation for more " . "details") . "' disabled/></td>";
        }
        $retval .= "</tr>";
    }
    $retval .= "<tr>";
    $retval .= "    <td>" . __('Definer') . "</td>";
    $retval .= "    <td><input type='text' name='item_definer'";
    $retval .= "               value='" . $routine['item_definer'] . "' /></td>";
    $retval .= "</tr>";
    $retval .= "<tr>";
    $retval .= "    <td>" . __('Security type') . "</td>";
    $retval .= "    <td><select name='item_securitytype'>";
    $retval .= "        <option value='DEFINER'" . $routine['item_securitytype_definer'] . ">DEFINER</option>";
    $retval .= "        <option value='INVOKER'" . $routine['item_securitytype_invoker'] . ">INVOKER</option>";
    $retval .= "    </select></td>";
    $retval .= "</tr>";
    $retval .= "<tr>";
    $retval .= "    <td>" . __('SQL data access') . "</td>";
    $retval .= "    <td><select name='item_sqldataaccess'>";
    foreach ($param_sqldataaccess as $key => $value) {
        $selected = "";
        if ($routine['item_sqldataaccess'] == $value) {
            $selected = " selected='selected'";
        }
        $retval .= "        <option" . $selected . ">" . $value . "</option>";
    }
    $retval .= "    </select></td>";
    $retval .= "</tr>";
    $retval .= "<tr>";
    $retval .= "    <td>" . __('Comment') . "</td>";
    $retval .= "    <td><input type='text' name='item_comment' maxlength='64'";
    $retval .= "    value='" . $routine['item_comment'] . "' /></td>";
    $retval .= "</tr>";
    $retval .= "</table>";
    $retval .= "</fieldset>";
    if ($GLOBALS['is_ajax_request']) {
        $retval .= "<input type='hidden' name='editor_process_" . $mode . "'";
        $retval .= "       value='true' />";
        $retval .= "<input type='hidden' name='ajax_request' value='true' />";
    } else {
        $retval .= "<fieldset class='tblFooters'>";
        $retval .= "    <input type='submit' name='editor_process_" . $mode . "'";
        $retval .= "           value='" . __('Go') . "' />";
        $retval .= "</fieldset>";
    }
    $retval .= "</form>";
    $retval .= "<!-- END " . mb_strtoupper($mode) . " ROUTINE FORM -->";
    return $retval;
}
开发者ID:wp-cloud,项目名称:phpmyadmin,代码行数:101,代码来源:rte_routines.lib.php

示例3: __

Message::notice(__('You have no saved settings!'))->display();
echo '</div>', '</div>', '<div class="localStorage-unsupported">';
Message::notice(__('This feature is not supported by your web browser'))->display();
echo '</div>', '</div>', '<input type="checkbox" id="import_merge" name="import_merge" />', '<label for="import_merge">', __('Merge with current configuration') . '</label>', '<br /><br />', '<input type="submit" name="submit_import" value="', __('Go') . '" />', '</form>', '</div>';
if (file_exists('setup/index.php')) {
    // show only if setup script is available, allows to disable this message
    // by simply removing setup directory
    ?>
            <div class="group">
            <h2><?php 
    echo __('More settings');
    ?>
</h2>
            <div class="group-cnt">
                <?php 
    echo sprintf(__('You can set more settings by modifying config.inc.php, eg. ' . 'by using %sSetup script%s.'), '<a href="setup/index.php" target="_blank">', '</a>'), PMA\libraries\Util::showDocu('setup', 'setup-script');
    ?>
            </div>
            </div>
        <?php 
}
?>
    </div>
    <div id="main_pane_right">
        <div class="group">
            <h2><?php 
echo __('Export');
?>
</h2>
            <div class="click-hide-message group-cnt" style="display:none">
                <?php 
开发者ID:Dhrumil1808,项目名称:phpmyadmin,代码行数:31,代码来源:prefs_manage.php

示例4: saveUiPrefsToDb

 /**
  * Save this table's UI preferences into phpMyAdmin database.
  *
  * @return true|Message
  */
 protected function saveUiPrefsToDb()
 {
     $cfgRelation = PMA_getRelationsParam();
     $pma_table = Util::backquote($cfgRelation['db']) . "." . Util::backquote($cfgRelation['table_uiprefs']);
     $secureDbName = Util::sqlAddSlashes($this->_db_name);
     $username = $GLOBALS['cfg']['Server']['user'];
     $sql_query = " REPLACE INTO " . $pma_table . " (username, db_name, table_name, prefs) VALUES ('" . $username . "', '" . $secureDbName . "', '" . Util::sqlAddSlashes($this->_name) . "', '" . Util::sqlAddSlashes(json_encode($this->uiprefs)) . "')";
     $success = $this->_dbi->tryQuery($sql_query, $GLOBALS['controllink']);
     if (!$success) {
         $message = Message::error(__('Could not save table UI preferences!'));
         $message->addMessage('<br /><br />');
         $message->addMessage(Message::rawError($this->_dbi->getError($GLOBALS['controllink'])));
         return $message;
     }
     // Remove some old rows in table_uiprefs if it exceeds the configured
     // maximum rows
     $sql_query = 'SELECT COUNT(*) FROM ' . $pma_table;
     $rows_count = $this->_dbi->fetchValue($sql_query);
     $max_rows = $GLOBALS['cfg']['Server']['MaxTableUiprefs'];
     if ($rows_count > $max_rows) {
         $num_rows_to_delete = $rows_count - $max_rows;
         $sql_query = ' DELETE FROM ' . $pma_table . ' ORDER BY last_update ASC' . ' LIMIT ' . $num_rows_to_delete;
         $success = $this->_dbi->tryQuery($sql_query, $GLOBALS['controllink']);
         if (!$success) {
             $message = Message::error(sprintf(__('Failed to cleanup table UI preferences (see ' . '$cfg[\'Servers\'][$i][\'MaxTableUiprefs\'] %s)'), Util::showDocu('config', 'cfg_Servers_MaxTableUiprefs')));
             $message->addMessage('<br /><br />');
             $message->addMessage(Message::rawError($this->_dbi->getError($GLOBALS['controllink'])));
             return $message;
         }
     }
     return true;
 }
开发者ID:ryanfmurphy,项目名称:phpmyadmin,代码行数:37,代码来源:Table.php

示例5: auth

 /**
  * Displays authentication form
  *
  * this function MUST exit/quit the application
  *
  * @global string $conn_error the last connection error
  *
  * @return boolean|void
  */
 public function auth()
 {
     global $conn_error;
     $response = Response::getInstance();
     if ($response->isAjax()) {
         $response->setRequestStatus(false);
         // redirect_flag redirects to the login page
         $response->addJSON('redirect_flag', '1');
         if (defined('TESTSUITE')) {
             return true;
         } else {
             exit;
         }
     }
     // No recall if blowfish secret is not configured as it would produce
     // garbage
     if ($GLOBALS['cfg']['LoginCookieRecall'] && !empty($GLOBALS['cfg']['blowfish_secret'])) {
         $default_user = $GLOBALS['PHP_AUTH_USER'];
         $default_server = $GLOBALS['pma_auth_server'];
         $autocomplete = '';
     } else {
         $default_user = '';
         $default_server = '';
         // skip the IE autocomplete feature.
         $autocomplete = ' autocomplete="off"';
     }
     $response->getFooter()->setMinimal();
     $header = $response->getHeader();
     $header->setBodyId('loginform');
     $header->setTitle('phpMyAdmin');
     $header->disableMenuAndConsole();
     $header->disableWarnings();
     if (@file_exists(CUSTOM_HEADER_FILE)) {
         include CUSTOM_HEADER_FILE;
     }
     echo '
 <div class="container">
 <a href="';
     echo PMA_linkURL('https://www.phpmyadmin.net/');
     echo '" target="_blank" rel="noopener noreferrer" class="logo">';
     $logo_image = $GLOBALS['pmaThemeImage'] . 'logo_right.png';
     if (@file_exists($logo_image)) {
         echo '<img src="', $logo_image, '" id="imLogo" name="imLogo" alt="phpMyAdmin" border="0" />';
     } else {
         echo '<img name="imLogo" id="imLogo" src="', $GLOBALS['pmaThemeImage'], 'pma_logo.png', '" ', 'border="0" width="88" height="31" alt="phpMyAdmin" />';
     }
     echo '</a>
    <h1>';
     echo sprintf(__('Welcome to %s'), '<bdo dir="ltr" lang="en">phpMyAdmin</bdo>');
     echo "</h1>";
     // Show error message
     if (!empty($conn_error)) {
         Message::rawError($conn_error)->display();
     } elseif (isset($_GET['session_expired']) && intval($_GET['session_expired']) == 1) {
         Message::rawError(__('Your session has expired. Please log in again.'))->display();
     }
     echo "<noscript>\n";
     Message::error(__("Javascript must be enabled past this point!"))->display();
     echo "</noscript>\n";
     echo "<div class='hide js-show'>";
     // Displays the languages form
     if (empty($GLOBALS['cfg']['Lang'])) {
         include_once './libraries/display_select_lang.lib.php';
         // use fieldset, don't show doc link
         echo PMA_getLanguageSelectorHtml(true, false);
     }
     echo '</div>
 <br />
 <!-- Login form -->
 <form method="post" action="index.php" name="login_form"', $autocomplete, ' class="disableAjax login hide js-show">
     <fieldset>
     <legend>';
     echo __('Log in');
     echo Util::showDocu('index');
     echo '</legend>';
     if ($GLOBALS['cfg']['AllowArbitraryServer']) {
         echo '
         <div class="item">
             <label for="input_servername" title="';
         echo __('You can enter hostname/IP address and port separated by space.');
         echo '">';
         echo __('Server:');
         echo '</label>
             <input type="text" name="pma_servername" id="input_servername"';
         echo ' value="';
         echo htmlspecialchars($default_server);
         echo '" size="24" class="textfield" title="';
         echo __('You can enter hostname/IP address and port separated by space.');
         echo '" />
         </div>';
     }
//.........这里部分代码省略.........
开发者ID:wp-cloud,项目名称:phpmyadmin,代码行数:101,代码来源:AuthenticationCookie.php

示例6: __

    , '</form>'
    , '</div>';
if (file_exists('setup/index.php')) {
            // show only if setup script is available, allows to disable this message
            // by simply removing setup directory
            ?>
            <div class="group">
            <h2><?php echo __('More settings') ?></h2>
            <div class="group-cnt">
                <?php
                echo sprintf(
                    __(
                        'You can set more settings by modifying config.inc.php, eg. '
                        . 'by using %sSetup script%s.'
                    ), '<a href="setup/index.php" target="_blank">', '</a>'
                ) , PMA\libraries\Util::showDocu('setup', 'setup-script');
                ?>
            </div>
            </div>
        <?php
}
        ?>
    </div>
    <div id="main_pane_right">
        <div class="group">
            <h2><?php echo __('Export'); ?></h2>
            <div class="click-hide-message group-cnt" style="display:none">
                <?php
                Message::rawSuccess(
                    __('Configuration has been saved.')
                )->display();
开发者ID:nijel,项目名称:phpmyadmin,代码行数:31,代码来源:prefs_manage.php

示例7: getSelectorDisplay

 /**
  * Returns HTML code for the language selector
  *
  * @param boolean $use_fieldset whether to use fieldset for selection
  * @param boolean $show_doc     whether to show documentation links
  *
  * @return string
  *
  * @access  public
  */
 public function getSelectorDisplay($use_fieldset = false, $show_doc = true)
 {
     $_form_params = array('db' => $GLOBALS['db'], 'table' => $GLOBALS['table']);
     // For non-English, display "Language" with emphasis because it's
     // not a proper word in the current language; we show it to help
     // people recognize the dialog
     $language_title = __('Language') . (__('Language') != 'Language' ? ' - <em>Language</em>' : '');
     if ($show_doc) {
         $language_title .= Util::showDocu('faq', 'faq7-2');
     }
     $available_languages = $this->sortedLanguages();
     return Template::get('select_lang')->render(array('language_title' => $language_title, 'use_fieldset' => $use_fieldset, 'available_languages' => $available_languages, '_form_params' => $_form_params));
 }
开发者ID:phpmyadmin,项目名称:phpmyadmin,代码行数:23,代码来源:LanguageManager.php


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