本文整理汇总了PHP中PMA_Util::showDocu方法的典型用法代码示例。如果您正苦于以下问题:PHP PMA_Util::showDocu方法的具体用法?PHP PMA_Util::showDocu怎么用?PHP PMA_Util::showDocu使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PMA_Util
的用法示例。
在下文中一共展示了PMA_Util::showDocu方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PMA_getHtmlForImportJS
/**
* Prints Html For Import Javascript
*
* @param int $upload_id The selected upload id
*
* @return string
*/
function PMA_getHtmlForImportJS($upload_id)
{
global $SESSION_KEY;
$html = '';
$html .= '<script type="text/javascript">';
$html .= ' //<![CDATA[';
//with "\n", so that the following lines won't be commented out by //<![CDATA[
$html .= "\n";
$html .= ' $( function() {';
// add event when user click on "Go" button
$html .= ' $("#buttonGo").bind("click", function() {';
// hide form
$html .= ' $("#upload_form_form").css("display", "none");';
if ($_SESSION[$SESSION_KEY]["handler"] != "UploadNoplugin") {
$html .= PMA_getHtmlForImportWithPlugin($upload_id);
} else {
// no plugin available
$image_tag = '<img src="' . $GLOBALS['pmaThemeImage'] . 'ajax_clock_small.gif" width="16" height="16" alt="ajax clock" /> ' . PMA_jsFormat(__('Please be patient, the file is being uploaded. ' . 'Details about the upload are not available.'), false) . PMA_Util::showDocu('faq', 'faq2-9');
$html .= " \$('#upload_form_status_info').html('" . $image_tag . "');";
$html .= ' $("#upload_form_status").css("display", "none");';
}
// else
// onclick
$html .= ' });';
// domready
$html .= ' });';
$html .= ' //]]>';
//with "\n", so that the following lines won't be commented out by //]]>
$html .= "\n";
$html .= '</script>';
return $html;
}
示例2: testShowDocu
function testShowDocu()
{
$anchor = "relation";
$expected = '<a href="Documentation.html#' . $anchor . '" target="documentation">'
. '<img src="themes/dot.gif" title="' . __('Documentation') . '" '
. 'alt="' . __('Documentation') . '" class="icon ic_b_help" /></a>';
$this->assertEquals(
$expected, PMA_Util::showDocu($anchor)
);
}
示例3: PMA_getLanguageSelectorHtml
/**
* 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
*/
function PMA_getLanguageSelectorHtml($use_fieldset = false, $show_doc = true)
{
global $lang;
$retval = '';
// Display language selection only if there
// is more than one language to choose from
if (count($GLOBALS['available_languages']) > 1) {
$retval .= '<form method="get" action="index.php" class="disableAjax">';
$_form_params = array('db' => $GLOBALS['db'], 'table' => $GLOBALS['table']);
$retval .= PMA_URL_getHiddenInputs($_form_params);
// 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 .= PMA_Util::showDocu('faq', 'faq7-2');
}
if ($use_fieldset) {
$retval .= '<fieldset><legend lang="en" dir="ltr">' . $language_title . '</legend>';
} else {
$retval .= '<bdo lang="en" dir="ltr"><label for="sel-lang">' . $language_title . ': </label></bdo>';
}
$retval .= '<select name="lang" class="autosubmit" lang="en"' . ' dir="ltr" id="sel-lang">';
uasort($GLOBALS['available_languages'], 'PMA_languageCmp');
foreach ($GLOBALS['available_languages'] as $id => $tmplang) {
$lang_name = PMA_languageName($tmplang);
//Is current one active?
if ($lang == $id) {
$selected = ' selected="selected"';
} else {
$selected = '';
}
$retval .= '<option value="' . $id . '"' . $selected . '>';
$retval .= $lang_name;
$retval .= '</option>';
}
$retval .= '</select>';
if ($use_fieldset) {
$retval .= '</fieldset>';
}
$retval .= '</form>';
}
return $retval;
}
示例4: PMA_Language_select
/**
* Displays for for language selection
*
* @param boolean $use_fieldset whether to use fieldset for selection
* @param boolean $show_doc whether to show documentation links
*
* @return void
*
* @access public
*/
function PMA_Language_select($use_fieldset = false, $show_doc = true)
{
if (count($GLOBALS['available_languages']) == 1) {
// no use in switching languages, there is only one available
return;
}
global $cfg, $lang;
echo '<form method="post" action="index.php" target="_parent">';
$_form_params = array('db' => $GLOBALS['db'], 'table' => $GLOBALS['table']);
echo PMA_generate_common_hidden_inputs($_form_params);
// 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 .= PMA_Util::showDocu('faq7_2');
}
if ($use_fieldset) {
echo '<fieldset><legend lang="en" dir="ltr">' . $language_title . '</legend>';
} else {
echo '<bdo lang="en" dir="ltr"><label for="sel-lang">' . $language_title . ':</label></bdo>';
}
echo '<select name="lang" class="autosubmit" lang="en" dir="ltr" id="sel-lang">';
uasort($GLOBALS['available_languages'], 'PMA_Language_cmp');
foreach ($GLOBALS['available_languages'] as $id => $tmplang) {
$lang_name = PMA_langName($tmplang);
//Is current one active?
if ($lang == $id) {
$selected = ' selected="selected"';
} else {
$selected = '';
}
echo ' ';
echo '<option value="' . $id . '"' . $selected . '>' . $lang_name . '</option>' . "\n";
}
echo '</select>';
if ($use_fieldset) {
echo '</fieldset>';
}
echo '</form>';
}
示例5: __
PMA_Message::notice(__('You have no saved settings!'))->display();
echo '</div>' . '</div>' . '<div class="localStorage-unsupported">';
PMA_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_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
示例6: PMA_pluginGetOneOption
//.........这里部分代码省略.........
// for subgroups
// each subgroup can have a header, which may also be a form element
$subgroup_header = $propertyItem->getSubgroupHeader();
if (isset($subgroup_header)) {
$ret .= PMA_pluginGetOneOption($section, $plugin_name, $subgroup_header);
}
$ret .= '<li class="subgroup"><ul';
if (isset($subgroup_header)) {
$ret .= ' id="ul_' . $subgroup_header->getName() . '">';
} else {
$ret .= '>';
}
$ret .= PMA_pluginGetOneOption($section, $plugin_name, $propertyItem, true);
} else {
// single property item
switch ($property_class) {
case "BoolPropertyItem":
$ret .= '<li>' . "\n";
$ret .= '<input type="checkbox" name="' . $plugin_name . '_' . $propertyItem->getName() . '"' . ' value="something" id="checkbox_' . $plugin_name . '_' . $propertyItem->getName() . '"' . ' ' . PMA_pluginCheckboxCheck($section, $plugin_name . '_' . $propertyItem->getName());
if ($propertyItem->getForce() != null) {
// Same code is also few lines lower, update both if needed
$ret .= ' onclick="if (!this.checked && ' . '(!document.getElementById(\'checkbox_' . $plugin_name . '_' . $propertyItem->getForce() . '\') ' . '|| !document.getElementById(\'checkbox_' . $plugin_name . '_' . $propertyItem->getForce() . '\').checked)) ' . 'return false; else return true;"';
}
$ret .= ' />';
$ret .= '<label for="checkbox_' . $plugin_name . '_' . $propertyItem->getName() . '">' . PMA_getString($propertyItem->getText()) . '</label>';
break;
case "DocPropertyItem":
echo "DocPropertyItem";
break;
case "HiddenPropertyItem":
$ret .= '<li><input type="hidden" name="' . $plugin_name . '_' . $propertyItem->getName() . '"' . ' value="' . PMA_pluginGetDefault($section, $plugin_name . '_' . $propertyItem->getName()) . '"' . ' /></li>';
break;
case "MessageOnlyPropertyItem":
$ret .= '<li>' . "\n";
$ret .= '<p>' . PMA_getString($propertyItem->getText()) . '</p>';
break;
case "RadioPropertyItem":
$default = PMA_pluginGetDefault($section, $plugin_name . '_' . $propertyItem->getName());
foreach ($propertyItem->getValues() as $key => $val) {
$ret .= '<li><input type="radio" name="' . $plugin_name . '_' . $propertyItem->getName() . '" value="' . $key . '" id="radio_' . $plugin_name . '_' . $propertyItem->getName() . '_' . $key . '"';
if ($key == $default) {
$ret .= ' checked="checked"';
}
$ret .= ' />' . '<label for="radio_' . $plugin_name . '_' . $propertyItem->getName() . '_' . $key . '">' . PMA_getString($val) . '</label></li>';
}
break;
case "SelectPropertyItem":
$ret .= '<li>' . "\n";
$ret .= '<label for="select_' . $plugin_name . '_' . $propertyItem->getName() . '" class="desc">' . PMA_getString($propertyItem->getText()) . '</label>';
$ret .= '<select name="' . $plugin_name . '_' . $propertyItem->getName() . '"' . ' id="select_' . $plugin_name . '_' . $propertyItem->getName() . '">';
$default = PMA_pluginGetDefault($section, $plugin_name . '_' . $propertyItem->getName());
foreach ($propertyItem->getValues() as $key => $val) {
$ret .= '<option value="' . $key . '"';
if ($key == $default) {
$ret .= ' selected="selected"';
}
$ret .= '>' . PMA_getString($val) . '</option>';
}
$ret .= '</select>';
break;
case "TextPropertyItem":
$ret .= '<li>' . "\n";
$ret .= '<label for="text_' . $plugin_name . '_' . $propertyItem->getName() . '" class="desc">' . PMA_getString($propertyItem->getText()) . '</label>';
$ret .= '<input type="text" name="' . $plugin_name . '_' . $propertyItem->getName() . '"' . ' value="' . PMA_pluginGetDefault($section, $plugin_name . '_' . $propertyItem->getName()) . '"' . ' id="text_' . $plugin_name . '_' . $propertyItem->getName() . '"' . ($propertyItem->getSize() != null ? ' size="' . $propertyItem->getSize() . '"' : '') . ($propertyItem->getLen() != null ? ' maxlength="' . $propertyItem->getLen() . '"' : '') . ' />';
break;
default:
}
}
}
}
if ($is_subgroup) {
// end subgroup
$ret .= '</ul></li>';
} else {
// end main group
if (!empty($not_subgroup_header)) {
$ret .= '</ul></div>';
}
}
if (method_exists($propertyGroup, "getDoc")) {
$doc = $propertyGroup->getDoc();
if ($doc != null) {
if (count($doc) == 3) {
$ret .= PMA_Util::showMySQLDocu($doc[0], $doc[1], false, $doc[2]);
} elseif (count($doc) == 1) {
$ret .= PMA_Util::showDocu('faq', $doc[0]);
} else {
$ret .= PMA_Util::showMySQLDocu($doc[0], $doc[1]);
}
}
}
// Close the list element after $doc link is displayed
if (isset($property_class)) {
if ($property_class == 'BoolPropertyItem' || $property_class == 'MessageOnlyPropertyItem' || $property_class == 'SelectPropertyItem' || $property_class == 'TextPropertyItem') {
$ret .= '</li>';
}
}
$ret .= "\n";
return $ret;
}
示例7: __
<label for="import_merge"><?php echo __('Merge with current configuration') ?></label>
<br /><br />
<input type="submit" name="submit_import" value="<?php echo __('Go'); ?>" />
</form>
</div>
<?php
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">', '</a>');
echo PMA_Util::showDocu('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
PMA_Message::rawSuccess(__('Configuration has been saved'))->display();
?>
</div>
示例8: PMA_RTN_getEditorForm
//.........这里部分代码省略.........
// parameter handling end
$retval .= "<tr class='routine_return_row" . $isfunction_class . "'>";
$retval .= " <td>" . __('Return type') . "</td>";
$retval .= " <td><select name='item_returntype'>";
$retval .= PMA_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_Util::showDocu('faq', 'faq6-39');
$retval .= "</td>";
if (!defined('PMA_DRIZZLE') || !PMA_DRIZZLE) {
if (isset($GLOBALS['proc_priv']) && $GLOBALS['proc_priv'] && isset($GLOBALS['flush_priv']) && $GLOBALS['flush_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;
}
示例9: PMA_getDefaultSqlQueryForBrowse
/**
* Function to get the default sql query for browsing page
*
* @param String $db the current database
* @param String $table the current table
*
* @return String $sql_query the default $sql_query for browse page
*/
function PMA_getDefaultSqlQueryForBrowse($db, $table)
{
include_once 'libraries/bookmark.lib.php';
$book_sql_query = PMA_Bookmark_get($db, '\'' . PMA_Util::sqlAddSlashes($table) . '\'', 'label', false, true);
if (!empty($book_sql_query)) {
$GLOBALS['using_bookmark_message'] = PMA_message::notice(__('Using bookmark "%s" as default browse query.'));
$GLOBALS['using_bookmark_message']->addParam($table);
$GLOBALS['using_bookmark_message']->addMessage(PMA_Util::showDocu('faq', 'faq6-22'));
$sql_query = $book_sql_query;
} else {
$defaultOrderByClause = '';
if (isset($GLOBALS['cfg']['TablePrimaryKeyOrder']) && $GLOBALS['cfg']['TablePrimaryKeyOrder'] !== 'NONE') {
$primaryKey = null;
$primary = PMA_Index::getPrimary($table, $db);
if ($primary !== false) {
$primarycols = $primary->getColumns();
foreach ($primarycols as $col) {
$primaryKey = $col->getName();
break;
}
if ($primaryKey != null) {
$defaultOrderByClause = ' ORDER BY ' . PMA_Util::backquote($table) . '.' . PMA_Util::backquote($primaryKey) . ' ' . $GLOBALS['cfg']['TablePrimaryKeyOrder'];
}
}
}
$sql_query = 'SELECT * FROM ' . PMA_Util::backquote($table) . $defaultOrderByClause;
}
unset($book_sql_query);
return $sql_query;
}
示例10: 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 = PMA_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;
}
}
/* Perform logout to custom URL */
if (!empty($_REQUEST['old_usr']) && !empty($GLOBALS['cfg']['Server']['LogoutURL'])) {
PMA_sendHeaderLocation($GLOBALS['cfg']['Server']['LogoutURL']);
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" 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)) {
PMA_Message::rawError($conn_error)->display();
} elseif (isset($_GET['session_expired']) && intval($_GET['session_expired']) == 1) {
PMA_Message::rawError(__('Your session has expired. Please log in again.'))->display();
}
echo "<noscript>\n";
PMA_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 PMA_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:');
//.........这里部分代码省略.........
示例11: __
</form>
</div>
<?php
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>');
echo PMA_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
示例12: PMA_Bookmark_get
exit;
}
}
$response = PMA_Response::getInstance();
$response->isSuccess($retval == true);
exit;
}
// Default to browse if no query set and we have table
// (needed for browsing from DefaultTabTable)
if (empty($sql_query) && strlen($table) && strlen($db)) {
include_once 'libraries/bookmark.lib.php';
$book_sql_query = PMA_Bookmark_get($db, '\'' . PMA_Util::sqlAddSlashes($table) . '\'', 'label', false, true);
if (!empty($book_sql_query)) {
$GLOBALS['using_bookmark_message'] = PMA_message::notice(__('Using bookmark "%s" as default browse query.'));
$GLOBALS['using_bookmark_message']->addParam($table);
$GLOBALS['using_bookmark_message']->addMessage(PMA_Util::showDocu('faq', 'faq6-22'));
$sql_query = $book_sql_query;
} else {
$sql_query = 'SELECT * FROM ' . PMA_Util::backquote($table);
}
unset($book_sql_query);
// set $goto to what will be displayed if query returns 0 rows
$goto = '';
} else {
// Now we can check the parameters
PMA_Util::checkParameters(array('sql_query'));
}
// instead of doing the test twice
$is_drop_database = preg_match('/DROP[[:space:]]+(DATABASE|SCHEMA)[[:space:]]+/i', $sql_query);
/**
* Check rights in case of DROP DATABASE
示例13: PMA_getDefaultSqlQueryForBrowse
/**
* Function to get the default sql query for browsing page
*
* @param String $db the current database
* @param String $table the current table
*
* @return String $sql_query the default $sql_query for browse page
*/
function PMA_getDefaultSqlQueryForBrowse($db, $table)
{
include_once 'libraries/bookmark.lib.php';
$book_sql_query = PMA_Bookmark_get($db, '\'' . PMA_Util::sqlAddSlashes($table) . '\'', 'label', false, true);
if (!empty($book_sql_query)) {
$GLOBALS['using_bookmark_message'] = PMA_message::notice(__('Using bookmark "%s" as default browse query.'));
$GLOBALS['using_bookmark_message']->addParam($table);
$GLOBALS['using_bookmark_message']->addMessage(PMA_Util::showDocu('faq', 'faq6-22'));
$sql_query = $book_sql_query;
} else {
$sql_query = 'SELECT * FROM ' . PMA_Util::backquote($table);
}
unset($book_sql_query);
return $sql_query;
}
示例14: testShowDocu
/**
* Test for showDocu
*
* @return void
*/
function testShowDocu()
{
$this->assertEquals('<a href="./url.php?url=http%3A%2F%2Fdocs.phpmyadmin.net%2Fen%2Flatest%2Fpage.html%23anchor" target="documentation"><img src="themes/dot.gif" title="Documentation" alt="Documentation" class="icon ic_b_help" /></a>', PMA_Util::showDocu('page', 'anchor'));
}
示例15: auth
/**
* Displays authentication form
*
* this function MUST exit/quit the application
*
* @global string the last connection error
*
* @return void
*/
public function auth()
{
global $conn_error;
$response = PMA_Response::getInstance();
if ($response->isAjax()) {
$response->isSuccess(false);
if (!empty($conn_error)) {
$response->addJSON('message', PMA_Message::error($conn_error));
} else {
$response->addJSON('message', PMA_Message::error(__('Your session has expired. Please login again.')));
}
exit;
}
/* Perform logout to custom URL */
if (!empty($_REQUEST['old_usr']) && !empty($GLOBALS['cfg']['Server']['LogoutURL'])) {
PMA_sendHeaderLocation($GLOBALS['cfg']['Server']['LogoutURL']);
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"';
}
$cell_align = $GLOBALS['text_dir'] == 'ltr' ? 'left' : 'right';
$response->getFooter()->setMinimal();
$header = $response->getHeader();
$header->setBodyId('loginform');
$header->setTitle('phpMyAdmin');
$header->disableMenu();
$header->disableWarnings();
if (file_exists(CUSTOM_HEADER_FILE)) {
include CUSTOM_HEADER_FILE;
}
echo '
<div class="container">
<a href="';
echo PMA_linkURL('http://www.phpmyadmin.net/');
echo '" target="_blank" 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)) {
PMA_Message::rawError($conn_error)->display();
}
echo "<noscript>\n";
PMA_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
PMA_Language_select(true, false);
}
echo '</div>
<br />
<!-- Login form -->
<form method="post" action="index.php" name="login_form"' . $autocomplete . ' target="_top" class="login hide js-show">
<fieldset>
<legend>';
echo __('Log in');
echo PMA_Util::showDocu('');
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.');
//.........这里部分代码省略.........