本文整理汇总了PHP中PMA_generate_common_hidden_inputs函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_generate_common_hidden_inputs函数的具体用法?PHP PMA_generate_common_hidden_inputs怎么用?PHP PMA_generate_common_hidden_inputs使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PMA_generate_common_hidden_inputs函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display_form_top
/**
* Displays top part of the form
*
* @uses PMA_generate_common_hidden_inputs()
* @uses PMA_getHiddenFields()
* @param string $action default: $_SERVER['REQUEST_URI']
* @param string $method 'post' or 'get'
* @param array $hidden_fields array of form hidden fields (key: field name)
*/
function display_form_top($action = null, $method = 'post', $hidden_fields = null)
{
static $has_check_page_refresh = false;
if ($action === null) {
$action = $_SERVER['REQUEST_URI'];
}
if ($method != 'post') {
$method = 'get';
}
?>
<form method="<?php
echo $method;
?>
" action="<?php
echo htmlspecialchars($action);
?>
" class="config-form">
<input type="hidden" name="tab_hash" value="" />
<?php
// we do validation on page refresh when browser remembers field values,
// add a field with known value which will be used for checks
if (!$has_check_page_refresh) {
$has_check_page_refresh = true;
echo '<input type="hidden" name="check_page_refresh" id="check_page_refresh"' . ' value="" />' . "\n";
}
echo PMA_generate_common_hidden_inputs('', '', 0, 'server') . "\n";
echo PMA_getHiddenFields((array) $hidden_fields);
}
示例2: PMA_getHtmlForDisplayIndexes
/**
* Get HTML for display indexes
*
* @return string $html_output
*/
function PMA_getHtmlForDisplayIndexes()
{
$html_output = PMA_Util::getDivForSliderEffect('indexes', __('Indexes'));
$html_output .= PMA_Index::getView($GLOBALS['table'], $GLOBALS['db']);
$html_output .= '<fieldset class="tblFooters" style="text-align: left;">' . '<form action="tbl_indexes.php" method="post">';
$html_output .= PMA_generate_common_hidden_inputs($GLOBALS['db'], $GLOBALS['table']) . sprintf(__('Create an index on %s columns'), '<input type="text" size="2" name="added_fields" value="1" />');
$html_output .= '<input type="hidden" name="create_index" value="1" />' . '<input class="add_index ajax"' . ' type="submit" value="' . __('Go') . '" />';
$html_output .= '</form>' . '</fieldset>' . '</div>' . '</div>';
return $html_output;
}
示例3: PMA_select_language
/**
* Displays for for language selection
*
* @access public
*/
function PMA_select_language($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;
?>
<form method="post" action="index.php" target="_parent">
<?php
$_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_CommonFunctions::getInstance()->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>';
}
?>
<select name="lang" class="autosubmit" lang="en" dir="ltr" id="sel-lang">
<?php
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";
}
?>
</select>
<?php
if ($use_fieldset) {
echo '</fieldset>';
}
?>
</form>
<?php
}
示例4: PMA_getHtmlForChangePassword
/**
* Get HTML for the Change password dialog
*
* @param string $username username
* @param string $hostname hostname
*
* @return string html snippet
*/
function PMA_getHtmlForChangePassword($username, $hostname)
{
/**
* autocomplete feature of IE kills the "onchange" event handler and it
* must be replaced by the "onpropertychange" one in this case
*/
$chg_evt_handler = PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5 && PMA_USR_BROWSER_VER < 7 ? 'onpropertychange' : 'onchange';
$html = '<form method="post" id="change_password_form" ' . 'action="' . $GLOBALS['PMA_PHP_SELF'] . '" ' . 'name="chgPassword" ' . 'class="ajax" >';
$html .= PMA_generate_common_hidden_inputs();
if (strpos($GLOBALS['PMA_PHP_SELF'], 'server_privileges') !== false) {
$html .= '<input type="hidden" name="username" ' . 'value="' . htmlspecialchars($username) . '" />' . '<input type="hidden" name="hostname" ' . 'value="' . htmlspecialchars($hostname) . '" />';
}
$html .= '<fieldset id="fieldset_change_password">' . '<legend>' . __('Change password') . '</legend>' . '<table class="data noclick">' . '<tr class="odd">' . '<td colspan="2">' . '<input type="radio" name="nopass" value="1" id="nopass_1" ' . 'onclick="pma_pw.value = \'\'; pma_pw2.value = \'\'; ' . 'this.checked = true" />' . '<label for="nopass_1">' . __('No Password') . '</label>' . '</td>' . '</tr>' . '<tr class="even vmiddle">' . '<td>' . '<input type="radio" name="nopass" value="0" id="nopass_0" ' . 'onclick="document.getElementById(\'text_pma_pw\').focus();" ' . 'checked="checked " />' . '<label for="nopass_0">' . __('Password') . ': </label>' . '</td>' . '<td>' . '<input type="password" name="pma_pw" id="text_pma_pw" size="10" ' . 'class="textfield"' . $chg_evt_handler . '="nopass[1].checked = true" />' . ' ' . __('Re-type') . ': ' . '<input type="password" name="pma_pw2" id="text_pma_pw2" size="10" ' . 'class="textfield"' . $chg_evt_handler . '="nopass[1].checked = true" />' . '</td>' . '</tr>' . '<tr class="vmiddle">' . '<td>' . __('Password Hashing') . ':' . '</td>' . '<td>' . '<input type="radio" name="pw_hash" id="radio_pw_hash_new" ' . 'value="new" checked="checked" />' . '<label for="radio_pw_hash_new">MySQL 4.1+</label>' . '</td>' . '</tr>' . '<tr id="tr_element_before_generate_password">' . '<td> </td>' . '<td>' . '<input type="radio" name="pw_hash" id="radio_pw_hash_old" ' . 'value="old" />' . '<label for="radio_pw_hash_old">' . __('MySQL 4.0 compatible') . '</label>' . '</td>' . '</tr>' . '</table>' . '</fieldset>' . '<fieldset id="fieldset_change_password_footer" class="tblFooters">' . '<input type="submit" name="change_pw" value="' . __('Go') . '" />' . '</fieldset>' . '</form>';
return $html;
}
示例5: 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_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('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_langName($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;
}
示例6: PMA_generate_common_hidden_inputs
echo "\n" . '<!-- Table character set -->' . "\n" . ' <form method="post" action="tbl_properties_operations.php">' . "\n" . ' <tr>' . "\n" . ' <th colspan="2" class="tblHeaders" align="left">' . "\n" . PMA_generate_common_hidden_inputs($db, $table, 3) . ' ' . $strCollation . ': ' . "\n" . ' </th>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td bgcolor="' . $cfg['BgcolorOne'] . '">' . "\n" . PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'tbl_collation', NULL, $tbl_collation, FALSE, 3) . ' </td>' . "\n" . ' <td bgcolor="' . $cfg['BgcolorOne'] . '" align="right">' . "\n" . ' <input type="submit" name="submitcollation" value="' . $strGo . '" style="vertical-align: middle" />' . "\n" . ' </td>' . "\n" . ' </tr>' . "\n" . ' </form>' . "\n" . ' <tr><td colspan="2" height="5"></td></tr>' . "\n";
}
// PACK_KEYS: MyISAM or ISAM
// DELAY_KEY_WRITE, CHECKSUM, AUTO_INCREMENT: MyISAM only
if ($tbl_type == 'MYISAM' || $tbl_type == 'ISAM') {
?>
<!-- Table options -->
<form method="post" action="tbl_properties_operations.php">
<tr>
<th colspan="2" class="tblHeaders" align="left">
<?php
echo $strTableOptions;
?>
:
<?php
echo PMA_generate_common_hidden_inputs($db, $table);
?>
</th>
</tr>
<tr>
<td bgcolor="<?php
echo $cfg['BgcolorOne'];
?>
">
<input type="checkbox" name="pack_keys" id="pack_keys_opt"
<?php
echo isset($pack_keys) && $pack_keys == 1 ? ' checked="checked"' : '';
?>
style="vertical-align: middle" /><label for="pack_keys_opt">pack_keys</label><br />
<?php
if ($tbl_type == 'MYISAM') {
示例7: PMA_RTN_getExecuteForm
/**
* Creates the HTML code that shows the routine execution dialog.
*
* @param array $routine Data for the routine returned by
* PMA_RTN_getDataFromName()
*
* @return string HTML code for the routine execution dialog.
*/
function PMA_RTN_getExecuteForm($routine)
{
global $db, $cfg;
// Escape special characters
$routine['item_name'] = htmlentities($routine['item_name'], ENT_QUOTES);
for ($i = 0; $i < $routine['item_num_params']; $i++) {
$routine['item_param_name'][$i] = htmlentities($routine['item_param_name'][$i], ENT_QUOTES);
}
// Create the output
$retval = "";
$retval .= "<!-- START ROUTINE EXECUTE FORM -->\n\n";
$retval .= "<form action='db_routines.php' method='post' class='rte_form'>\n";
$retval .= "<input type='hidden' name='item_name'\n";
$retval .= " value='{$routine['item_name']}' />\n";
$retval .= "<input type='hidden' name='item_type'\n";
$retval .= " value='{$routine['item_type']}' />\n";
$retval .= PMA_generate_common_hidden_inputs($db) . "\n";
$retval .= "<fieldset>\n";
if ($GLOBALS['is_ajax_request'] != true) {
$retval .= "<legend>{$routine['item_name']}</legend>\n";
$retval .= "<table class='rte_table'>\n";
$retval .= "<caption class='tblHeaders'>\n";
$retval .= __('Routine parameters');
$retval .= "</caption>\n";
} else {
$retval .= "<legend>" . __('Routine parameters') . "</legend>\n";
$retval .= "<table class='rte_table' style='width: 100%;'>\n";
}
$retval .= "<tr>\n";
$retval .= "<th>" . __('Name') . "</th>\n";
$retval .= "<th>" . __('Type') . "</th>\n";
if ($cfg['ShowFunctionFields']) {
$retval .= "<th>" . __('Function') . "</th>\n";
}
$retval .= "<th>" . __('Value') . "</th>\n";
$retval .= "</tr>\n";
// Get a list of data types that are not yet supported.
$no_support_types = PMA_Util::unsupportedDatatypes();
for ($i = 0; $i < $routine['item_num_params']; $i++) {
// Each parameter
if ($routine['item_type'] == 'PROCEDURE' && $routine['item_param_dir'][$i] == 'OUT') {
continue;
}
$rowclass = $i % 2 == 0 ? 'even' : 'odd';
$retval .= "\n<tr class='{$rowclass}'>\n";
$retval .= "<td>{$routine['item_param_name'][$i]}</td>\n";
$retval .= "<td>{$routine['item_param_type'][$i]}</td>\n";
if ($cfg['ShowFunctionFields']) {
$retval .= "<td>\n";
if (stristr($routine['item_param_type'][$i], 'enum') || stristr($routine['item_param_type'][$i], 'set') || in_array(strtolower($routine['item_param_type'][$i]), $no_support_types)) {
$retval .= "--\n";
} else {
$field = array('True_Type' => strtolower($routine['item_param_type'][$i]), 'Type' => '', 'Key' => '', 'Field' => '', 'Default' => '', 'first_timestamp' => false);
$retval .= "<select name='funcs[{$routine['item_param_name'][$i]}]'>";
$retval .= PMA_Util::getFunctionsForField($field, false);
$retval .= "</select>";
}
$retval .= "</td>\n";
}
// Append a class to date/time fields so that
// jQuery can attach a datepicker to them
$class = '';
if ($routine['item_param_type'][$i] == 'DATETIME' || $routine['item_param_type'][$i] == 'TIMESTAMP') {
$class = 'datetimefield';
} else {
if ($routine['item_param_type'][$i] == 'DATE') {
$class = 'datefield';
}
}
$retval .= "<td class='nowrap'>\n";
if (in_array($routine['item_param_type'][$i], array('ENUM', 'SET'))) {
$tokens = PMA_SQP_parse($routine['item_param_length'][$i]);
if ($routine['item_param_type'][$i] == 'ENUM') {
$input_type = 'radio';
} else {
$input_type = 'checkbox';
}
for ($j = 0; $j < $tokens['len']; $j++) {
if ($tokens[$j]['type'] != 'punct_listsep') {
$tokens[$j]['data'] = htmlentities(PMA_Util::unquote($tokens[$j]['data']), ENT_QUOTES);
$retval .= "<input name='params[{$routine['item_param_name'][$i]}][]' " . "value='{$tokens[$j]['data']}' type='{$input_type}' />" . "{$tokens[$j]['data']}<br />\n";
}
}
} else {
if (in_array(strtolower($routine['item_param_type'][$i]), $no_support_types)) {
$retval .= "\n";
} else {
$retval .= "<input class='{$class}' type='text' name='params[{$routine['item_param_name'][$i]}]' />\n";
}
}
$retval .= "</td>\n";
$retval .= "</tr>\n";
//.........这里部分代码省略.........
示例8: PMA_generate_common_hidden_inputs
document.onkeydown = onKeyDownArrowsHandler;
// ]]>
</script>
<form id="<?php
echo $action == 'tbl_create.php' ? 'create_table' : 'append_fields';
?>
_form" method="post" action="<?php
echo $action;
?>
" <?php
echo $GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax"' : '';
?>
>
<?php
echo PMA_generate_common_hidden_inputs($_form_params);
unset($_form_params);
if ($action == 'tbl_create.php') {
?>
<table>
<tr valign="top">
<th><?php
echo __('Table name');
?>
: </th>
</tr>
<tr><td><input type="text" name="table" size="40" maxlength="80"
value="<?php
echo isset($_REQUEST['table']) ? htmlspecialchars($_REQUEST['table']) : '';
?>
"
示例9: PMA_displayTableHeaders
/**
* Displays the headers of the results table
*
* @param array which elements to display
* @param array the list of fields properties
* @param integer the total number of fields returned by the sql query
* @param array the analyzed query
*
* @return boolean always true
*
* @global string $db the database name
* @global string $table the table name
* @global string $goto the url to go back in case of errors
* @global boolean $dontlimitchars whether to limit the number of displayed
* characters of text type fields or not
* @global string $sql_query the sql query
* @global integer $num_rows the total number of rows returned by the
* sql query
* @global integer $pos the current position in results
* @global integer $session_max_rows the maximum number of rows per page
* @global array $vertical_display informations used with vertical display
* mode
* @global string $disp_direction the display mode
* (horizontal/vertical/horizontalflipped)
* @global integer $repeat_cellsthe number of row to display between two
* table headers
*
* @access private
*
* @see PMA_displayTable()
*/
function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $analyzed_sql = '')
{
global $db, $table, $goto, $dontlimitchars;
global $sql_query, $num_rows, $pos, $session_max_rows;
global $vertical_display, $disp_direction, $repeat_cells, $highlight_columns;
if ($analyzed_sql == '') {
$analyzed_sql = array();
}
// can the result be sorted?
if ($is_display['sort_lnk'] == '1') {
// Just as fallback
$unsorted_sql_query = $sql_query;
if (isset($analyzed_sql[0]['unsorted_query'])) {
$unsorted_sql_query = $analyzed_sql[0]['unsorted_query'];
}
// we need $sort_expression and $sort_expression_nodir
// even if there are many table references
$sort_expression = trim(str_replace(' ', ' ', $analyzed_sql[0]['order_by_clause']));
// Get rid of ASC|DESC (TODO: analyzer)
preg_match('@(.*)([[:space:]]*(ASC|DESC))@si', $sort_expression, $matches);
$sort_expression_nodir = isset($matches[1]) ? trim($matches[1]) : $sort_expression;
// sorting by indexes, only if it makes sense (only one table ref)
if (isset($analyzed_sql) && isset($analyzed_sql[0]) && isset($analyzed_sql[0]['querytype']) && $analyzed_sql[0]['querytype'] == 'SELECT' && isset($analyzed_sql[0]['table_ref']) && count($analyzed_sql[0]['table_ref']) == 1) {
// grab indexes data:
PMA_DBI_select_db($db);
if (!defined('PMA_IDX_INCLUDED')) {
$ret_keys = PMA_get_indexes($table);
}
$prev_index = '';
foreach ($ret_keys as $row) {
if ($row['Key_name'] != $prev_index) {
$indexes[] = $row['Key_name'];
$prev_index = $row['Key_name'];
}
$indexes_info[$row['Key_name']]['Sequences'][] = $row['Seq_in_index'];
$indexes_info[$row['Key_name']]['Non_unique'] = $row['Non_unique'];
if (isset($row['Cardinality'])) {
$indexes_info[$row['Key_name']]['Cardinality'] = $row['Cardinality'];
}
// I don't know what does the following column mean....
// $indexes_info[$row['Key_name']]['Packed'] = $row['Packed'];
$indexes_info[$row['Key_name']]['Comment'] = isset($row['Comment']) ? $row['Comment'] : '';
$indexes_info[$row['Key_name']]['Index_type'] = isset($row['Index_type']) ? $row['Index_type'] : '';
$indexes_data[$row['Key_name']][$row['Seq_in_index']]['Column_name'] = $row['Column_name'];
if (isset($row['Sub_part'])) {
$indexes_data[$row['Key_name']][$row['Seq_in_index']]['Sub_part'] = $row['Sub_part'];
}
}
// end while
// do we have any index?
if (isset($indexes_data)) {
if ($disp_direction == 'horizontal' || $disp_direction == 'horizontalflipped') {
$span = $fields_cnt;
if ($is_display['edit_lnk'] != 'nn') {
$span++;
}
if ($is_display['del_lnk'] != 'nn') {
$span++;
}
if ($is_display['del_lnk'] != 'kp' && $is_display['del_lnk'] != 'nn') {
$span++;
}
} else {
$span = $num_rows + floor($num_rows / $repeat_cells) + 1;
}
echo '<form action="sql.php" method="post">' . "\n";
echo PMA_generate_common_hidden_inputs($db, $table, 5);
echo '<input type="hidden" name="pos" value="' . $pos . '" />' . "\n";
echo '<input type="hidden" name="session_max_rows" value="' . $session_max_rows . '" />' . "\n";
//.........这里部分代码省略.........
示例10: PMA_displayTableHeaders
/**
* Displays the headers of the results table
*
* @uses $_SESSION['tmp_user_values']['disp_direction']
* @uses $_SESSION['tmp_user_values']['repeat_cells']
* @uses $_SESSION['tmp_user_values']['max_rows']
* @uses $_SESSION['tmp_user_values']['display_text']
* @uses $_SESSION['tmp_user_values']['display_binary']
* @uses $_SESSION['tmp_user_values']['display_binary_as_hex']
* @param array which elements to display
* @param array the list of fields properties
* @param integer the total number of fields returned by the SQL query
* @param array the analyzed query
*
* @return boolean $clause_is_unique
*
* @global string $db the database name
* @global string $table the table name
* @global string $goto the URL to go back in case of errors
* @global string $sql_query the SQL query
* @global integer $num_rows the total number of rows returned by the
* SQL query
* @global array $vertical_display informations used with vertical display
* mode
*
* @access private
*
* @see PMA_displayTable()
*/
function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $analyzed_sql = '', $sort_expression, $sort_expression_nodirection, $sort_direction)
{
global $db, $table, $goto;
global $sql_query, $num_rows;
global $vertical_display, $highlight_columns;
if ($analyzed_sql == '') {
$analyzed_sql = array();
}
// can the result be sorted?
if ($is_display['sort_lnk'] == '1') {
// Just as fallback
$unsorted_sql_query = $sql_query;
if (isset($analyzed_sql[0]['unsorted_query'])) {
$unsorted_sql_query = $analyzed_sql[0]['unsorted_query'];
}
// Handles the case of multiple clicks on a column's header
// which would add many spaces before "ORDER BY" in the
// generated query.
$unsorted_sql_query = trim($unsorted_sql_query);
// sorting by indexes, only if it makes sense (only one table ref)
if (isset($analyzed_sql) && isset($analyzed_sql[0]) && isset($analyzed_sql[0]['querytype']) && $analyzed_sql[0]['querytype'] == 'SELECT' && isset($analyzed_sql[0]['table_ref']) && count($analyzed_sql[0]['table_ref']) == 1) {
// grab indexes data:
$indexes = PMA_Index::getFromTable($table, $db);
// do we have any index?
if ($indexes) {
if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal' || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') {
$span = $fields_cnt;
if ($is_display['edit_lnk'] != 'nn') {
$span++;
}
if ($is_display['del_lnk'] != 'nn') {
$span++;
}
if ($is_display['del_lnk'] != 'kp' && $is_display['del_lnk'] != 'nn') {
$span++;
}
} else {
$span = $num_rows + floor($num_rows / $_SESSION['tmp_user_values']['repeat_cells']) + 1;
}
echo '<form action="sql.php" method="post">' . "\n";
echo PMA_generate_common_hidden_inputs($db, $table);
echo $GLOBALS['strSortByKey'] . ': <select name="sql_query" onchange="this.form.submit();">' . "\n";
$used_index = false;
$local_order = isset($sort_expression) ? $sort_expression : '';
foreach ($indexes as $index) {
$asc_sort = '`' . implode('` ASC, `', array_keys($index->getColumns())) . '` ASC';
$desc_sort = '`' . implode('` DESC, `', array_keys($index->getColumns())) . '` DESC';
$used_index = $used_index || $local_order == $asc_sort || $local_order == $desc_sort;
echo '<option value="' . htmlspecialchars($unsorted_sql_query . ' ORDER BY ' . $asc_sort) . '"' . ($local_order == $asc_sort ? ' selected="selected"' : '') . '>' . htmlspecialchars($index->getName()) . ' (' . $GLOBALS['strAscending'] . ')</option>';
echo '<option value="' . htmlspecialchars($unsorted_sql_query . ' ORDER BY ' . $desc_sort) . '"' . ($local_order == $desc_sort ? ' selected="selected"' : '') . '>' . htmlspecialchars($index->getName()) . ' (' . $GLOBALS['strDescending'] . ')</option>';
}
echo '<option value="' . htmlspecialchars($unsorted_sql_query) . '"' . ($used_index ? '' : ' selected="selected"') . '>' . $GLOBALS['strNone'] . '</option>';
echo '</select>' . "\n";
echo '<noscript><input type="submit" value="' . $GLOBALS['strGo'] . '" /></noscript>';
echo '</form>' . "\n";
}
}
}
$vertical_display['emptypre'] = 0;
$vertical_display['emptyafter'] = 0;
$vertical_display['textbtn'] = '';
// Display options (if we are not in print view)
if (!(isset($GLOBALS['printview']) && $GLOBALS['printview'] == '1')) {
echo '<form method="post" action="sql.php" name="displayOptionsForm" id="displayOptionsForm">';
$url_params = array('db' => $db, 'table' => $table, 'sql_query' => $sql_query, 'goto' => $goto, 'display_options_form' => 1);
echo PMA_generate_common_hidden_inputs($url_params);
echo '<br />';
PMA_generate_slider_effect('displayoptions', $GLOBALS['strOptions']);
echo '<fieldset>';
echo '<div class="formelement">';
$choices = array('P' => $GLOBALS['strPartialText'], 'F' => $GLOBALS['strFullText']);
//.........这里部分代码省略.........
示例11: PMA_auth
//.........这里部分代码省略.........
<?php
}
?>
<div class="item">
<label for="input_username"><?php
echo __('Username:');
?>
</label>
<input type="text" name="pma_username" id="input_username" value="<?php
echo htmlspecialchars($default_user);
?>
" size="24" class="textfield"/>
</div>
<div class="item">
<label for="input_password"><?php
echo __('Password:');
?>
</label>
<input type="password" name="pma_password" id="input_password" value="" size="24" class="textfield" />
</div>
<?php
if (count($GLOBALS['cfg']['Servers']) > 1) {
?>
<div class="item">
<label for="select_server"><?php
echo __('Server Choice');
?>
:</label>
<select name="server" id="select_server"
<?php
if ($GLOBALS['cfg']['AllowArbitraryServer']) {
echo ' onchange="document.forms[\'login_form\'].elements[\'pma_servername\'].value = \'\'" ';
}
echo '>';
include_once './libraries/select_server.lib.php';
PMA_select_server(false, false);
echo '</select></div>';
} else {
echo ' <input type="hidden" name="server" value="' . $GLOBALS['server'] . '" />';
}
// end if (server choice)
?>
</fieldset>
<fieldset class="tblFooters">
<input value="<?php
echo __('Go');
?>
" type="submit" id="input_go" />
<?php
$_form_params = array();
if (!empty($GLOBALS['target'])) {
$_form_params['target'] = $GLOBALS['target'];
}
if (!empty($GLOBALS['db'])) {
$_form_params['db'] = $GLOBALS['db'];
}
if (!empty($GLOBALS['table'])) {
$_form_params['table'] = $GLOBALS['table'];
}
// do not generate a "server" hidden field as we want the "server"
// drop-down to have priority
echo PMA_generate_common_hidden_inputs($_form_params, '', 0, 'server');
?>
</fieldset>
</form>
<?php
// BEGIN Swekey Integration
Swekey_login('input_username', 'input_go');
// END Swekey Integration
// show the "Cookies required" message only if cookies are disabled
// (we previously tried to set some cookies)
if (empty($_COOKIE)) {
trigger_error(__('Cookies must be enabled past this point.'), E_USER_NOTICE);
}
if ($GLOBALS['error_handler']->hasDisplayErrors()) {
echo '<div>';
$GLOBALS['error_handler']->dispErrors();
echo '</div>';
}
?>
</div>
<?php
if (file_exists(CUSTOM_FOOTER_FILE)) {
include CUSTOM_FOOTER_FILE;
}
?>
<script type="text/javascript">
//<![CDATA[
// show login form in top frame.
if (top != self || document.body.className != 'loginform') {
window.top.location.href=location;
}
//]]>
</script>
</body>
</html>
<?php
exit;
}
示例12: checkPassword
}
if (!isset($dbname) && !$user_does_not_exists) {
include_once './libraries/display_change_password.lib.php';
echo '<form action="server_privileges.php" method="post" onsubmit="return checkPassword(this);">' . "\n" . PMA_generate_common_hidden_inputs('', '') . '<input type="hidden" name="old_username" value="' . htmlspecialchars($username) . '" />' . "\n" . '<input type="hidden" name="old_hostname" value="' . htmlspecialchars($hostname) . '" />' . "\n" . '<fieldset id="fieldset_change_copy_user">' . "\n" . ' <legend>' . __('Change Login Information / Copy User') . '</legend>' . "\n";
PMA_displayLoginInformationFields('change');
echo ' <fieldset>' . "\n" . ' <legend>' . __('Create a new user with the same privileges and ...') . '</legend>' . "\n";
$choices = array('4' => __('... keep the old one.'), '1' => __('... delete the old one from the user tables.'), '2' => __('... revoke all active privileges from the old one and delete it afterwards.'), '3' => __('... delete the old one from the user tables and reload the privileges afterwards.'));
PMA_display_html_radio('mode', $choices, '4', true);
unset($choices);
echo ' </fieldset>' . "\n" . '</fieldset>' . "\n" . '<fieldset id="fieldset_change_copy_user_footer" class="tblFooters">' . "\n" . ' <input type="submit" name="change_copy" value="' . __('Go') . '" />' . "\n" . '</fieldset>' . "\n" . '</form>' . "\n";
}
}
} elseif (isset($_REQUEST['adduser'])) {
// Add user
$GLOBALS['url_query'] .= '&adduser=1';
echo '<h2>' . "\n" . PMA_getIcon('b_usradd.png') . __('Add user') . "\n" . '</h2>' . "\n" . '<form name="usersForm" id="addUsersForm_' . $random_n . '" action="server_privileges.php" method="post">' . "\n" . PMA_generate_common_hidden_inputs('', '');
PMA_displayLoginInformationFields('new');
echo '<fieldset id="fieldset_add_user_database">' . "\n" . '<legend>' . __('Database for user') . '</legend>' . "\n";
$default_choice = 0;
$choices = array('0' => _pgettext('Create none database for user', 'None'), '1' => __('Create database with same name and grant all privileges'), '2' => __('Grant all privileges on wildcard name (username\\_%)'));
if (!empty($dbname)) {
$choices['3'] = sprintf(__('Grant all privileges on database "%s"'), htmlspecialchars($dbname));
$default_choice = 3;
echo '<input type="hidden" name="dbname" value="' . htmlspecialchars($dbname) . '" />' . "\n";
}
// 4th parameter set to true to add line breaks
// 5th parameter set to false to avoid htmlspecialchars() escaping in the label
// since we have some HTML in some labels
PMA_display_html_radio('createdb', $choices, $default_choice, true, false);
unset($choices);
unset($default_choice);
示例13: checkPassword
}
echo ' <input type="text" id="text_tablename" name="tablename" />' . "\n";
}
echo '</fieldset>' . "\n";
echo '<fieldset class="tblFooters">' . "\n" . ' <input type="submit" value="' . $GLOBALS['strGo'] . '" />' . '</fieldset>' . "\n" . '</form>' . "\n";
}
if (empty($dbname) && !$user_does_not_exists) {
echo '<form action="server_privileges.php" method="post" onsubmit="return checkPassword(this);">' . "\n" . PMA_generate_common_hidden_inputs('', '', 3) . '<input type="hidden" name="username" value="' . htmlspecialchars($username) . '" />' . "\n" . '<input type="hidden" name="hostname" value="' . htmlspecialchars($hostname) . '" />' . "\n" . '<fieldset id="fieldset_change_password">' . "\n" . ' <legend>' . $GLOBALS['strChangePassword'] . '</legend>' . "\n" . ' <table class="data">' . "\n" . ' <tr class="odd">' . "\n" . ' <td><input type="radio" name="nopass" value="1" id="radio_nopass_1" onclick="pma_pw.value=\'\'; pma_pw2.value=\'\';" /></td>' . "\n" . ' <td colspan="2"><label for="radio_nopass_1">' . $GLOBALS['strNoPassword'] . '</label></td>' . "\n" . ' </tr>' . "\n" . ' <tr class="even">' . "\n" . ' <td><input type="radio" name="nopass" value="0" id="radio_nopass_0" onclick="document.getElementById(\'pw_pma_pw\').focus();" /></td>' . "\n" . ' <td><label for="radio_nopass_0">' . $GLOBALS['strPassword'] . ':</label></td>' . "\n" . ' <td><input type="password" name="pma_pw" id="pw_pma_pw" onchange="nopass[1].checked = true;" /></td>' . "\n" . ' </tr>' . "\n" . ' <tr class="odd">' . "\n" . ' <td></td>' . "\n" . ' <td><label for="pw_pma_pw2">' . $GLOBALS['strReType'] . ':</label></td>' . "\n" . ' <td><input type="password" name="pma_pw2" id="pw_pma_pw2" onchange="nopass[1].checked = true;" /></td>' . "\n" . ' </tr>' . "\n" . ' </table>' . "\n" . '</fieldset>' . "\n" . '<fieldset id="fieldset_change_password_footer" class="tblFooters">' . "\n" . ' <input type="submit" name="change_pw" value="' . $GLOBALS['strGo'] . '" />' . "\n" . '</fieldset>' . "\n" . '</form>' . "\n" . '<form action="server_privileges.php" method="post" onsubmit="return checkPassword(this);">' . "\n" . PMA_generate_common_hidden_inputs('', '', 3) . '<input type="hidden" name="old_username" value="' . htmlspecialchars($username) . '" />' . "\n" . '<input type="hidden" name="old_hostname" value="' . htmlspecialchars($hostname) . '" />' . "\n" . '<fieldset id="fieldset_change_copy_user">' . "\n" . ' <legend>' . $GLOBALS['strChangeCopyUser'] . '</legend>' . "\n";
PMA_displayLoginInformationFields('change', 3);
echo ' <fieldset>' . "\n" . ' <legend>' . $GLOBALS['strChangeCopyMode'] . '</legend>' . "\n" . ' <input type="radio" name="mode" value="4" id="radio_mode_4" checked="checked" /><label for="radio_mode_4">' . "\n" . ' ' . $GLOBALS['strChangeCopyModeCopy'] . "\n" . ' </label><br />' . "\n" . ' <input type="radio" name="mode" value="1" id="radio_mode_1" /><label for="radio_mode_1">' . "\n" . ' ' . $GLOBALS['strChangeCopyModeJustDelete'] . "\n" . ' </label><br />' . "\n" . ' <input type="radio" name="mode" value="2" id="radio_mode_2" /><label for="radio_mode_2">' . "\n" . ' ' . $GLOBALS['strChangeCopyModeRevoke'] . "\n" . ' </label><br />' . "\n" . ' <input type="radio" name="mode" value="3" id="radio_mode_3" /><label for="radio_mode_3">' . "\n" . ' ' . $GLOBALS['strChangeCopyModeDeleteAndReload'] . "\n" . ' </label>' . "\n" . ' </fieldset>' . "\n" . '</fieldset>' . "\n" . '<fieldset id="fieldset_change_copy_user_footer" class="tblFooters">' . "\n" . ' <input type="submit" name="change_copy" value="' . $GLOBALS['strGo'] . '" />' . "\n" . '</fieldset>' . "\n" . '</form>' . "\n";
}
}
} elseif (!empty($adduser)) {
// Add a new user
$GLOBALS['url_query'] .= '&adduser=1';
echo '<h2>' . "\n" . ($GLOBALS['cfg']['PropertiesIconic'] ? '<img class="icon" src="' . $pmaThemeImage . 'b_usradd.png" width="16" height="16" alt="" />' : '') . ' ' . $GLOBALS['strAddUser'] . "\n" . '</h2>' . "\n" . '<form name="usersForm" id="usersForm" action="server_privileges.php" method="post" onsubmit="return checkAddUser(this);">' . "\n" . PMA_generate_common_hidden_inputs('', '', 1);
PMA_displayLoginInformationFields('new', 2);
PMA_displayPrivTable('*', '*', FALSE, 1);
echo ' <fieldset id="fieldset_add_user_footer" class="tblFooters">' . "\n" . ' <input type="submit" name="adduser_submit" value="' . $GLOBALS['strGo'] . '" />' . "\n" . ' </fieldset>' . "\n" . '</form>' . "\n";
} else {
// check the privileges for a particular database.
echo '<table id="tablespecificuserrights" class="data">' . "\n" . '<caption class="tblHeaders">' . "\n" . ($GLOBALS['cfg']['PropertiesIconic'] ? ' <img class="icon" src="' . $pmaThemeImage . 'b_usrcheck.png" width="16" height="16" alt="" />' . "\n" : '') . ' ' . sprintf($GLOBALS['strUsersHavingAccessToDb'], '<a href="' . $GLOBALS['cfg']['DefaultTabDatabase'] . '?' . PMA_generate_common_url($checkprivs) . '">' . htmlspecialchars($checkprivs) . '</a>') . "\n" . '</caption>' . "\n" . '<thead>' . "\n" . ' <tr><th>' . $GLOBALS['strUser'] . '</th>' . "\n" . ' <th>' . $GLOBALS['strHost'] . '</th>' . "\n" . ' <th>' . $GLOBALS['strType'] . '</th>' . "\n" . ' <th>' . $GLOBALS['strPrivileges'] . '</th>' . "\n" . ' <th>' . $GLOBALS['strGrantOption'] . '</th>' . "\n" . ' <th>' . $GLOBALS['strAction'] . '</th>' . "\n" . ' </tr>' . "\n" . '<t/head>' . "\n" . '<tbody>' . "\n";
$odd_row = TRUE;
unset($row);
unset($row1);
unset($row2);
// now, we build the table...
if (PMA_MYSQL_INT_VERSION >= 40000) {
// Starting with MySQL 4.0.0, we may use UNION SELECTs and this makes
// the job much easier here!
$no = PMA_convert_using('N', 'quoted');
示例14: PMA_printListItem
require_once './libraries/check_user_privileges.lib.php';
if (!PMA_DRIZZLE) {
// Logout for advanced authentication
if ($cfg['Server']['auth_type'] != 'config') {
if ($cfg['ShowChgPassword']) {
if ($GLOBALS['cfg']['AjaxEnable']) {
$conditional_class = 'ajax';
} else {
$conditional_class = null;
}
PMA_printListItem(__('Change password'), 'li_change_password', './user_password.php?' . $common_url_query, null, null, 'change_password_anchor', null, $conditional_class);
}
}
// end if
echo ' <li id="li_select_mysql_collation">';
echo ' <form method="post" action="index.php" target="_parent">' . "\n" . PMA_generate_common_hidden_inputs(null, null, 4, 'collation_connection') . ' <label for="select_collation_connection">' . "\n" . ' ' . __('MySQL connection collation') . "\n" . PMA_showMySQLDocu('MySQL_Database_Administration', 'Charset-connection') . ': ' . "\n" . ' </label>' . "\n" . PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'collation_connection', 'select_collation_connection', $collation_connection, true, 4, true) . ' <noscript><input type="submit" value="' . __('Go') . '" /></noscript>' . "\n" . ' </form>' . "\n" . ' </li>' . "\n";
}
// not Drizzle
}
// end of if ($server > 0)
echo '</ul>';
echo '</div>';
}
echo '<div class="group">';
echo '<h2>' . __('Appearance Settings') . '</h2>';
echo ' <ul>';
// Displays language selection combo
if (empty($cfg['Lang'])) {
echo '<li id="li_select_lang">';
require_once './libraries/display_select_lang.lib.php';
PMA_select_language();
示例15: PMA_generate_common_hidden_inputs
<?php
$z++;
echo "\n";
}
// end for
?>
</tr>
</table>
<!-- Other controls -->
<?php
$w--;
$url_params['db'] = $db;
$url_params['col_cnt'] = $z;
$url_params['rows'] = $w;
echo PMA_generate_common_hidden_inputs($url_params);
?>
<fieldset class="tblFooters">
<table border="0" cellpadding="2" cellspacing="1">
<tr>
<td nowrap="nowrap">
<?php
echo $strAddDeleteRow;
?>
:
<select size="1" name="add_row" style="vertical-align: middle">
<option value="-3">-3</option>
<option value="-2">-2</option>
<option value="-1">-1</option>
<option value="0" selected="selected">0</option>
<option value="1">1</option>