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


PHP PMA_getPHPDocLink函数代码示例

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


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

示例1: testMissingExtentionWithExtra

 function testMissingExtentionWithExtra()
 {
     $ext = 'php_ext';
     $extra = 'Appended Extra String';
     $this->setExpectedException('PHPUnit_Framework_Error', 'The [a@' . PMA_getPHPDocLink('book.' . $ext . '.php') . '@Documentation][em]' . $ext . '[/em][/a] extension is missing. Please check your PHP configuration.' . ' ' . $extra);
     PMA_warnMissingExtension($ext, false, $extra);
     $this->assertTrue(true);
 }
开发者ID:bugyak,项目名称:phporadmin,代码行数:8,代码来源:PMA_warnMissingExtension_test.php

示例2: testMissingExtensionFatalWithExtra

 /**
  * Test for PMA_warnMissingExtension
  *
  * @return void
  */
 function testMissingExtensionFatalWithExtra()
 {
     $ext = 'php_ext';
     $extra = 'Appended Extra String';
     $warn = 'The <a href="' . PMA_getPHPDocLink('book.' . $ext . '.php') . '" target="Documentation"><em>' . $ext . '</em></a> extension is missing. Please check your PHP configuration.' . ' ' . $extra;
     ob_start();
     PMA_warnMissingExtension($ext, true, $extra);
     $printed = ob_get_contents();
     ob_end_clean();
     $this->assertGreaterThan(0, mb_strpos($printed, $warn));
 }
开发者ID:iShareLife,项目名称:phpmyadmin,代码行数:16,代码来源:PMA_warnMissingExtension_test.php

示例3: PMA_warnMissingExtension

/**
 * Warn or fail on missing extension.
 *
 * @param string $extension Extension name
 * @param bool   $fatal     Whether the error is fatal.
 * @param string $extra     Extra string to append to messsage.
 *
 * @return void
 */
function PMA_warnMissingExtension($extension, $fatal = false, $extra = '')
{
    /* Gettext does not have to be loaded yet here */
    if (function_exists('__')) {
        $message = __('The %s extension is missing. Please check your PHP configuration.');
    } else {
        $message = 'The %s extension is missing. Please check your PHP configuration.';
    }
    $doclink = PMA_getPHPDocLink('book.' . $extension . '.php');
    $message = sprintf($message, '[a@' . $doclink . '@Documentation][em]' . $extension . '[/em][/a]');
    if ($extra != '') {
        $message .= ' ' . $extra;
    }
    if ($fatal) {
        PMA_fatalError($message);
        return;
    }
    $GLOBALS['error_handler']->addError($message, E_USER_WARNING, '', '', false);
}
开发者ID:JohanArmando,项目名称:MaxCorpMedia,代码行数:28,代码来源:core.lib.php

示例4: PMA_showPHPDocu

/**
 * Displays a link to the PHP documentation
 *
 * @param string $target anchor in documentation
 *
 * @return string  the html link
 *
 * @access  public
 */
function PMA_showPHPDocu($target)
{
    $url = PMA_getPHPDocLink($target);
    if ($GLOBALS['cfg']['ReplaceHelpImg']) {
        return '<a href="' . $url . '" target="documentation">' . PMA_getImage('b_help.png', __('Documentation')) . '</a>';
    } else {
        return '[<a href="' . $url . '" target="documentation">' . __('Documentation') . '</a>]';
    }
}
开发者ID:AmberWish,项目名称:laba_web,代码行数:18,代码来源:common.lib.php

示例5: defineMessages

 /**
  * Define all messages
  *
  * @return array
  */
 protected static function defineMessages()
 {
     $sAllowArbitraryServerWarn = __('This %soption%s should be disabled as it allows attackers to bruteforce login to any MySQL server. If you feel this is necessary, use %srestrict login to MySQL server%s or %strusted proxies list%s. However, IP-based protection with trusted proxies list may not be reliable if your IP belongs to an ISP where thousands of users, including you, are connected to.');
     $sAllowArbitraryServerWarn = sprintf($sAllowArbitraryServerWarn, '[a@?page=form&amp;formset=Features#tab_Security]', '[/a]', '[a@?page=form&amp;formset=Features#tab_Security]', '[/a]', '[a@?page=form&amp;formset=Features#tab_Security]', '[/a]');
     $sBlowfishSecretMsg = __('You didn\'t have blowfish secret set and have enabled [kbd]cookie[/kbd] authentication, so a key was automatically generated for you. It is used to encrypt cookies; you don\'t need to remember it.');
     $sBZipDumpWarning = __('%sBzip2 compression and decompression%s requires functions (%s) which are unavailable on this system.');
     $sBZipDumpWarning = sprintf($sBZipDumpWarning, '[a@?page=form&amp;formset=Features#tab_Import_export]', '[/a]', '%s');
     $sDirectoryNotice = __('This value should be double checked to ensure that this directory is neither world accessible nor readable or writable by other users on your server.');
     $sForceSSLNotice = __('This %soption%s should be enabled if your web server supports it.');
     $sForceSSLNotice = sprintf($sForceSSLNotice, '[a@?page=form&amp;formset=Features#tab_Security]', '[/a]');
     $sGZipDumpWarning = __('%sGZip compression and decompression%s requires functions (%s) which are unavailable on this system.');
     $sGZipDumpWarning = sprintf($sGZipDumpWarning, '[a@?page=form&amp;formset=Features#tab_Import_export]', '[/a]', '%s');
     $sLoginCookieValidityWarn = __('%sLogin cookie validity%s greater than %ssession.gc_maxlifetime%s may cause random session invalidation (currently session.gc_maxlifetime is %d).');
     $sLoginCookieValidityWarn = sprintf($sLoginCookieValidityWarn, '[a@?page=form&amp;formset=Features#tab_Security]', '[/a]', '[a@' . PMA_getPHPDocLink('session.configuration.php#ini.session.gc-maxlifetime') . ']', '[/a]', ini_get('session.gc_maxlifetime'));
     $sLoginCookieValidityWarn2 = __('%sLogin cookie validity%s should be set to 1800 seconds (30 minutes) at most. Values larger than 1800 may pose a security risk such as impersonation.');
     $sLoginCookieValidityWarn2 = sprintf($sLoginCookieValidityWarn2, '[a@?page=form&amp;formset=Features#tab_Security]', '[/a]');
     $sLoginCookieValidityWarn3 = __('If using [kbd]cookie[/kbd] authentication and %sLogin cookie store%s is not 0, %sLogin cookie validity%s must be set to a value less or equal to it.');
     $sLoginCookieValidityWarn3 = sprintf($sLoginCookieValidityWarn3, '[a@?page=form&amp;formset=Features#tab_Security]', '[/a]', '[a@?page=form&amp;formset=Features#tab_Security]', '[/a]');
     $sSecurityInfoMsg = __('If you feel this is necessary, use additional protection settings - %shost authentication%s settings and %strusted proxies list%s. However, IP-based protection may not be reliable if your IP belongs to an ISP where thousands of users, including you, are connected to.');
     $sSecurityInfoMsg = sprintf($sSecurityInfoMsg, '[a@?page=servers&amp;mode=edit&amp;id=%1$d#tab_Server_config]', '[/a]', '[a@?page=form&amp;formset=Features#tab_Security]', '[/a]');
     $sServerAuthConfigMsg = __('You set the [kbd]config[/kbd] authentication type and included username and password for auto-login, which is not a desirable option for live hosts. Anyone who knows or guesses your phpMyAdmin URL can directly access your phpMyAdmin panel. Set %sauthentication type%s to [kbd]cookie[/kbd] or [kbd]http[/kbd].');
     $sServerAuthConfigMsg = sprintf($sServerAuthConfigMsg, '[a@?page=servers&amp;mode=edit&amp;id=%1$d#tab_Server]', '[/a]');
     $sZipDumpExportWarn = __('%sZip compression%s requires functions (%s) which are unavailable on this system.');
     $sZipDumpExportWarn = sprintf($sZipDumpExportWarn, '[a@?page=form&amp;formset=Features#tab_Import_export]', '[/a]', '%s');
     $sZipDumpImportWarn = __('%sZip decompression%s requires functions (%s) which are unavailable on this system.');
     $sZipDumpImportWarn = sprintf($sZipDumpImportWarn, '[a@?page=form&amp;formset=Features#tab_Import_export]', '[/a]', '%s');
     return array($sAllowArbitraryServerWarn, $sBlowfishSecretMsg, $sBZipDumpWarning, $sDirectoryNotice, $sForceSSLNotice, $sGZipDumpWarning, $sLoginCookieValidityWarn, $sLoginCookieValidityWarn2, $sLoginCookieValidityWarn3, $sSecurityInfoMsg, $sServerAuthConfigMsg, $sZipDumpExportWarn, $sZipDumpImportWarn);
 }
开发者ID:longquanwo,项目名称:dao-phpmyadmin,代码行数:33,代码来源:ServerConfigChecks.class.php

示例6: PMA_getHtmlForExportOptionsOutputFormat

/**
 * Prints Html For Export Options
 *
 * @param String $export_type Selected Export Type
 *
 * @return string
 */
function PMA_getHtmlForExportOptionsOutputFormat($export_type)
{
    $html = '<li>';
    $html .= '<label for="filename_template" class="desc">';
    $html .= __('File name template:');
    $trans = new PMA_Message();
    $trans->addMessage(__('@SERVER@ will become the server name'));
    if ($export_type == 'database' || $export_type == 'table') {
        $trans->addMessage(__(', @DATABASE@ will become the database name'));
        if ($export_type == 'table') {
            $trans->addMessage(__(', @TABLE@ will become the table name'));
        }
    }
    $msg = new PMA_Message(__('This value is interpreted using %1$sstrftime%2$s, ' . 'so you can use time formatting strings. ' . 'Additionally the following transformations will happen: %3$s. ' . 'Other text will be kept as is. See the %4$sFAQ%5$s for details.'));
    $msg->addParam('<a href="' . PMA_linkURL(PMA_getPHPDocLink('function.strftime.php')) . '" target="documentation" title="' . __('Documentation') . '">', false);
    $msg->addParam('</a>', false);
    $msg->addParam($trans);
    $doc_url = PMA_Util::getDocuLink('faq', 'faq6-27');
    $msg->addParam('<a href="' . $doc_url . '" target="documentation">', false);
    $msg->addParam('</a>', false);
    $html .= PMA_Util::showHint($msg);
    $html .= '</label>';
    $html .= '<input type="text" name="filename_template" id="filename_template" ';
    $html .= ' value="';
    if (isset($_GET['filename_template'])) {
        $html .= htmlspecialchars($_GET['filename_template']);
    } else {
        if ($export_type == 'database') {
            $html .= htmlspecialchars($GLOBALS['PMA_Config']->getUserValue('pma_db_filename_template', $GLOBALS['cfg']['Export']['file_template_database']));
        } elseif ($export_type == 'table') {
            $html .= htmlspecialchars($GLOBALS['PMA_Config']->getUserValue('pma_table_filename_template', $GLOBALS['cfg']['Export']['file_template_table']));
        } else {
            $html .= htmlspecialchars($GLOBALS['PMA_Config']->getUserValue('pma_server_filename_template', $GLOBALS['cfg']['Export']['file_template_server']));
        }
    }
    $html .= '"';
    $html .= '/>';
    $html .= '<input type="checkbox" name="remember_template" ';
    $html .= 'id="checkbox_remember_template" ';
    $html .= PMA_exportCheckboxCheck('remember_file_template');
    $html .= '/>';
    $html .= '<label for="checkbox_remember_template">';
    $html .= __('use this for future exports');
    $html .= '</label>';
    $html .= '</li>';
    return $html;
}
开发者ID:szepeviktor,项目名称:phpmyadmin,代码行数:54,代码来源:display_export.lib.php

示例7: showPHPDocu

 /**
  * Displays a link to the PHP documentation
  *
  * @param string $target anchor in documentation
  *
  * @return string  the html link
  *
  * @access  public
  */
 public static function showPHPDocu($target)
 {
     $url = PMA_getPHPDocLink($target);
     return self::showDocLink($url);
 }
开发者ID:altesien,项目名称:FinalProject,代码行数:14,代码来源:Util.class.php

示例8: PMA_showPHPDocu

/**
 * Displays a link to the PHP documentation
 *
 * @param string  anchor in documentation
 *
 * @return  string  the html link
 *
 * @access  public
 */
function PMA_showPHPDocu($target)
{
    $url = PMA_getPHPDocLink($target);
    if ($GLOBALS['cfg']['ReplaceHelpImg']) {
        return '<a href="' . $url . '" target="documentation"><img class="icon" src="' . $GLOBALS['pmaThemeImage'] . 'b_help.png" width="11" height="11" alt="' . __('Documentation') . '" title="' . __('Documentation') . '" /></a>';
    } else {
        return '[<a href="' . $url . '" target="documentation">' . __('Documentation') . '</a>]';
    }
}
开发者ID:davidmottet,项目名称:automne,代码行数:18,代码来源:common.lib.php

示例9: __

}
?>
                <li>
                    <label for="filename_template" class="desc">
                    <?php 
echo __('File name template:');
$trans = new PMA_Message();
$trans->addMessage(__('@SERVER@ will become the server name'));
if ($export_type == 'database' || $export_type == 'table') {
    $trans->addMessage(__(', @DATABASE@ will become the database name'));
    if ($export_type == 'table') {
        $trans->addMessage(__(', @TABLE@ will become the table name'));
    }
}
$message = new PMA_Message(__('This value is interpreted using %1$sstrftime%2$s, so you can use time formatting strings. Additionally the following transformations will happen: %3$s. Other text will be kept as is. See the %4$sFAQ%5$s for details.'));
$message->addParam('<a href="' . PMA_linkURL(PMA_getPHPDocLink('function.strftime.php')) . '" target="documentation" title="' . __('Documentation') . '">', false);
$message->addParam('</a>', false);
$message->addParam($trans);
$message->addParam('<a href="Documentation.html#faq6_27" target="documentation">', false);
$message->addParam('</a>', false);
echo PMA_showHint($message);
?>
                    </label>
                    <input type="text" name="filename_template" id="filename_template"
                    <?php 
echo ' value="';
if (isset($_GET['filename_template'])) {
    echo htmlspecialchars($_GET['filename_template']);
} else {
    if ($export_type == 'database') {
        echo htmlspecialchars($GLOBALS['PMA_Config']->getUserValue('pma_db_filename_template', $GLOBALS['cfg']['Export']['file_template_database']));
开发者ID:nicokaiser,项目名称:phpmyadmin,代码行数:31,代码来源:display_export.lib.php

示例10: perform_config_checks

/**
 * Performs various compatibility, security and consistency checks on current config
 *
 * Outputs results to message list, must be called between messages_begin()
 * and messages_end()
 */
function perform_config_checks()
{
    $cf = ConfigFile::getInstance();
    $blowfish_secret = $cf->get('blowfish_secret');
    $blowfish_secret_set = false;
    $cookie_auth_used = false;

    $strAllowArbitraryServerWarning = __('This %soption%s should be disabled as it allows attackers to bruteforce login to any MySQL server. If you feel this is necessary, use %strusted proxies list%s. However, IP-based protection may not be reliable if your IP belongs to an ISP where thousands of users, including you, are connected to.');
    $strAllowArbitraryServerWarning = sprintf($strAllowArbitraryServerWarning, '[a@?page=form&amp;formset=Features#tab_Security]', '[/a]', '[a@?page=form&amp;formset=Features#tab_Security]', '[/a]');
    $strBlowfishSecretMsg = __('You didn\'t have blowfish secret set and have enabled cookie authentication, so a key was automatically generated for you. It is used to encrypt cookies; you don\'t need to remember it.');
    $strBZipDumpWarning = __('%sBzip2 compression and decompression%s requires functions (%s) which are unavailable on this system.');
    $strBZipDumpWarning = sprintf($strBZipDumpWarning, '[a@?page=form&amp;formset=Features#tab_Import_export]', '[/a]', '%s');
    $strDirectoryNotice = __('This value should be double checked to ensure that this directory is neither world accessible nor readable or writable by other users on your server.');
    $strForceSSLNotice = __('This %soption%s should be enabled if your web server supports it.');
    $strForceSSLNotice = sprintf($strForceSSLNotice, '[a@?page=form&amp;formset=Features#tab_Security]', '[/a]');
    $strGZipDumpWarning = __('%sGZip compression and decompression%s requires functions (%s) which are unavailable on this system.');
    $strGZipDumpWarning = sprintf($strGZipDumpWarning, '[a@?page=form&amp;formset=Features#tab_Import_export]', '[/a]', '%s');
    $strLoginCookieValidityWarning = __('%sLogin cookie validity%s greater than 1440 seconds may cause random session invalidation if %ssession.gc_maxlifetime%s is lower than its value (currently %d).');
    $strLoginCookieValidityWarning = sprintf($strLoginCookieValidityWarning, '[a@?page=form&amp;formset=Features#tab_Security]', '[/a]', '[a@' . PMA_getPHPDocLink('session.configuration.php#ini.session.gc-maxlifetime') . ']', '[/a]', ini_get('session.gc_maxlifetime'));
    $strLoginCookieValidityWarning2 = __('%sLogin cookie validity%s should be set to 1800 seconds (30 minutes) at most. Values larger than 1800 may pose a security risk such as impersonation.');
    $strLoginCookieValidityWarning2 = sprintf($strLoginCookieValidityWarning2, '[a@?page=form&amp;formset=Features#tab_Security]', '[/a]');
    $strLoginCookieValidityWarning3 = __('If using cookie authentication and %sLogin cookie store%s is not 0, %sLogin cookie validity%s must be set to a value less or equal to it.');
    $strLoginCookieValidityWarning3 = sprintf($strLoginCookieValidityWarning3, '[a@?page=form&amp;formset=Features#tab_Security]', '[/a]', '[a@?page=form&amp;formset=Features#tab_Security]', '[/a]');
    $strSecurityInfoMsg = __('If you feel this is necessary, use additional protection settings - %shost authentication%s settings and %strusted proxies list%s. However, IP-based protection may not be reliable if your IP belongs to an ISP where thousands of users, including you, are connected to.');
    $strSecurityInfoMsg = sprintf($strSecurityInfoMsg, '[a@?page=servers&amp;mode=edit&amp;id=%1$d#tab_Server_config]', '[/a]', '[a@?page=form&amp;formset=Features#tab_Security]', '[/a]');
    $strServerAuthConfigMsg = __('You set the [kbd]config[/kbd] authentication type and included username and password for auto-login, which is not a desirable option for live hosts. Anyone who knows or guesses your phpMyAdmin URL can directly access your phpMyAdmin panel. Set %sauthentication type%s to [kbd]cookie[/kbd] or [kbd]http[/kbd].');
    $strServerAuthConfigMsg = sprintf($strServerAuthConfigMsg, '[a@?page=servers&amp;mode=edit&amp;id=%1$d#tab_Server]', '[/a]');
    $strZipDumpExportWarning = __('%sZip compression%s requires functions (%s) which are unavailable on this system.');
    $strZipDumpExportWarning = sprintf($strZipDumpExportWarning, '[a@?page=form&amp;formset=Features#tab_Import_export]', '[/a]', '%s');
    $strZipDumpImportWarning = __('%sZip decompression%s requires functions (%s) which are unavailable on this system.');
    $strZipDumpImportWarning = sprintf($strZipDumpImportWarning, '[a@?page=form&amp;formset=Features#tab_Import_export]', '[/a]', '%s');

    for ($i = 1, $server_cnt = $cf->getServerCount(); $i <= $server_cnt; $i++) {
        $cookie_auth_server = ($cf->getValue("Servers/$i/auth_type") == 'cookie');
        $cookie_auth_used |= $cookie_auth_server;
        $server_name = $cf->getServerName($i);
        if ($server_name == 'mysql.com') {
            $server_name .=  " [$i]";
        }
        $server_name = htmlspecialchars($server_name);

        if ($cookie_auth_server && $blowfish_secret === null) {
            $blowfish_secret = uniqid('', true);
            $blowfish_secret_set = true;
            $cf->set('blowfish_secret', $blowfish_secret);
        }

        //
        // $cfg['Servers'][$i]['ssl']
        // should be enabled if possible
        //
        if (!$cf->getValue("Servers/$i/ssl")) {
            $title = PMA_lang(PMA_lang_name('Servers/1/ssl')) . " ($server_name)";
            messages_set(
                'notice',
                "Servers/$i/ssl",
                $title,
                __('You should use SSL connections if your database server supports it.'));
        }

        //
        // $cfg['Servers'][$i]['extension']
        // warn about using 'mysql'
        //
        if ($cf->getValue("Servers/$i/extension") == 'mysql') {
            $title = PMA_lang(PMA_lang_name('Servers/1/extension')) . " ($server_name)";
            messages_set(
                'notice',
                "Servers/$i/extension",
                $title,
                __('You should use mysqli for performance reasons.'));
        }

        //
        // $cfg['Servers'][$i]['auth_type']
        // warn about full user credentials if 'auth_type' is 'config'
        //
        if ($cf->getValue("Servers/$i/auth_type") == 'config'
                && $cf->getValue("Servers/$i/user") != ''
                && $cf->getValue("Servers/$i/password") != '') {
            $title = PMA_lang(PMA_lang_name('Servers/1/auth_type')) . " ($server_name)";
            messages_set(
                'notice',
                "Servers/$i/auth_type",
                $title,
                PMA_lang($strServerAuthConfigMsg, $i) . ' ' .
                    PMA_lang($strSecurityInfoMsg, $i));
        }

        //
        // $cfg['Servers'][$i]['AllowRoot']
        // $cfg['Servers'][$i]['AllowNoPassword']
        // serious security flaw
        //
//.........这里部分代码省略.........
开发者ID:pf5512,项目名称:phpstudy,代码行数:101,代码来源:index.lib.php

示例11: PMA_showPHPDocu

/**
 * Displays a link to the PHP documentation
 *
 * @param string $target anchor in documentation
 *
 * @return string  the html link
 *
 * @access  public
 */
function PMA_showPHPDocu($target)
{
    $url = PMA_getPHPDocLink($target);
    return PMA_showDocLink($url);
}
开发者ID:rizwanaabbas,项目名称:phpmyadmin,代码行数:14,代码来源:common.lib.php

示例12: PMA_warnMissingExtension

/**
* Warn or fail on missing extension.
*
* @param string $extension Extension name
* @param bool $fatal Whether the error is fatal.
/ @param string $extra Extra string to append to messsage.
*/
function PMA_warnMissingExtension($extension, $fatal = false, $extra = '')
{
    $message = sprintf(__('The %s extension is missing. Please check your PHP configuration.'), '[a@' . PMA_getPHPDocLink('book.' . $extension . '.php') . '@Documentation][em]' . $extension . '[/em][/a]');
    if ($extra != '') {
        $message .= ' ' . $extra;
    }
    if ($fatal) {
        PMA_fatalError($message);
    } else {
        trigger_error($message, E_USER_WARNING);
    }
}
开发者ID:JimmyPez,项目名称:WHM,代码行数:19,代码来源:core.lib.php

示例13: showPHPDocu

 /**
  * Displays a link to the PHP documentation
  *
  * @param string $target anchor in documentation
  *
  * @return string  the html link
  *
  * @access  public
  */
 public function showPHPDocu($target)
 {
     $url = PMA_getPHPDocLink($target);
     return $this->showDocLink($url);
 }
开发者ID:rajatsinghal,项目名称:phpmyadmin,代码行数:14,代码来源:CommonFunctions.class.php


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