code cleanup; remove unneeded newlines in generated code; fix some XHTML errors

This commit is contained in:
Marc Delisle
2009-12-20 15:26:12 +00:00
parent 936472a758
commit 2e15e348ed
3 changed files with 211 additions and 203 deletions

View File

@@ -2733,11 +2733,13 @@ function PMA_getTitleForTarget($target) {
function PMA_js_mootools_domready($code, $print=true) function PMA_js_mootools_domready($code, $print=true)
{ {
$out = ''; $out = '';
$out .= '<script type="text/javascript">'."\n"; $out .= '<script type="text/javascript">';
$out .= 'window.addEvent(\'domready\',function() {'."\n"; $out .= '// <![CDATA[';
$out .= 'window.addEvent(\'domready\',function() {';
$out .= $code; $out .= $code;
$out .= '});'."\n"; $out .= '});';
$out .= '</script>'."\n"; $out .= '// ]]>';
$out .= '</script>';
if ($print) if ($print)
echo $out; echo $out;

View File

@@ -70,7 +70,6 @@ function PMA_replication_db_multibox()
{ {
$multi_values = ''; $multi_values = '';
$multi_values .= '<select name="db_select[]" size="6" multiple="multiple" id="db_select">'; $multi_values .= '<select name="db_select[]" size="6" multiple="multiple" id="db_select">';
$multi_values .= "\n";
foreach ($GLOBALS['pma']->databases as $current_db) { foreach ($GLOBALS['pma']->databases as $current_db) {
if (! empty($selectall) || (isset($tmp_select) && strpos(' ' . $tmp_select, '|' . $current_db . '|'))) { if (! empty($selectall) || (isset($tmp_select) && strpos(' ' . $tmp_select, '|' . $current_db . '|'))) {
@@ -79,10 +78,9 @@ function PMA_replication_db_multibox()
$is_selected = ''; $is_selected = '';
} }
$current_db = htmlspecialchars($current_db); $current_db = htmlspecialchars($current_db);
$multi_values .= ' <option value="' . $current_db . '" ' . $is_selected . '>' . $current_db . '</option>' . "\n"; $multi_values .= ' <option value="' . $current_db . '" ' . $is_selected . '>' . $current_db . '</option>';
} // end while } // end while
$multi_values .= "\n";
$multi_values .= '</select>'; $multi_values .= '</select>';
$multi_values .= '<br /><a href="#" id="db_reset_href">' . $GLOBALS['strUncheckAll'] . '</a>'; $multi_values .= '<br /><a href="#" id="db_reset_href">' . $GLOBALS['strUncheckAll'] . '</a>';
@@ -96,38 +94,37 @@ function PMA_replication_db_multibox()
*/ */
function PMA_replication_gui_changemaster($submitname) { function PMA_replication_gui_changemaster($submitname) {
global $username_length;
global $hostname_length;
echo '<form method="post" action="server_replication.php">'."\n"; list($username_length, $hostname_length) = PMA_replication_get_username_hostname_length();
echo '<form method="post" action="server_replication.php">';
echo PMA_generate_common_hidden_inputs('', ''); echo PMA_generate_common_hidden_inputs('', '');
echo ' <fieldset id="fieldset_add_user_login">'."\n"; echo ' <fieldset id="fieldset_add_user_login">';
echo ' <legend>' . $GLOBALS['strReplicationSlaveConfiguration']. ' - ' . $GLOBALS['strReplicationSlaveChangeMaster'] . '</legend>'."\n"; echo ' <legend>' . $GLOBALS['strReplicationSlaveConfiguration'] . ' - ' . $GLOBALS['strReplicationSlaveChangeMaster'] . '</legend>';
echo $GLOBALS['strSlaveConfigure'].'<br />'."\n"; echo $GLOBALS['strSlaveConfigure'] . '<br />';
echo '<pre>server-id='.time().'</pre>'."\n"; echo '<pre>server-id=' . time() . '</pre>';
echo ' <div class="item">'."\n"; echo ' <div class="item">';
echo ' <label for="text_username">'. $GLOBALS['strUserName'].':</label>'."\n"; echo ' <label for="text_username">' . $GLOBALS['strUserName'] . ':</label>';
echo ' <input type="text" name="username" id="text_username" maxlength="'. $username_length .'" title="'. $GLOBALS['strUserName'] .'" />'."\n"; echo ' <input type="text" name="username" id="text_username" maxlength="'. $username_length . '" title="' . $GLOBALS['strUserName'] . '" />';
echo ' </div>'."\n"; echo ' </div>';
echo ' <div class="item">'."\n"; echo ' <div class="item">';
echo ' <label for="text_pma_pw">'. $GLOBALS['strPassword'] .' :</label>'."\n"; echo ' <label for="text_pma_pw">' . $GLOBALS['strPassword'] .' :</label>';
echo ' <input type="password" id="text_pma_pw" name="pma_pw" title="'. $GLOBALS['strPassword'] .'" />'."\n"; echo ' <input type="password" id="text_pma_pw" name="pma_pw" title="' . $GLOBALS['strPassword'] . '" />';
echo ' </div>'."\n"; echo ' </div>';
echo ' <div class="item">'."\n"; echo ' <div class="item">';
echo ' <label for="text_hostname">'.$GLOBALS['strHost'].' :</label>'."\n"; echo ' <label for="text_hostname">' . $GLOBALS['strHost'] . ' :</label>';
echo ' <input type="text" id="text_hostname" name="hostname" maxlength="'. $hostname_length .'" value="" />'."\n"; echo ' <input type="text" id="text_hostname" name="hostname" maxlength="' . $hostname_length . '" value="" />';
echo ' </div>'."\n"; echo ' </div>';
echo ' <div class="item">'."\n"; echo ' <div class="item">';
echo ' <label for="text_port">'.$GLOBALS['strPort'].':</label>'."\n"; echo ' <label for="text_port">' . $GLOBALS['strPort'] . ':</label>';
echo ' <input type="text" id="text_port" name="port" maxlength="6" value="3306" />'."\n"; echo ' <input type="text" id="text_port" name="port" maxlength="6" value="3306" />';
echo ' </div>'."\n"; echo ' </div>';
echo ' </fieldset>'."\n"; echo ' </fieldset>';
echo ' <fieldset id="fieldset_user_privtable_footer" class="tblFooters">'."\n"; echo ' <fieldset id="fieldset_user_privtable_footer" class="tblFooters">';
echo ' <input type="hidden" name="sr_take_action" value="true" />'."\n"; echo ' <input type="hidden" name="sr_take_action" value="true" />';
echo ' <input type="submit" name="'.$submitname.'" id="confslave_submit" value="'. $GLOBALS['strGo'] .'" />'."\n"; echo ' <input type="submit" name="'.$submitname.'" id="confslave_submit" value="' . $GLOBALS['strGo'] . '" />';
echo ' </fieldset>'."\n"; echo ' </fieldset>';
echo '</form>'."\n"; echo '</form>';
} }
/** /**
@@ -151,58 +148,58 @@ function PMA_replication_print_status_table($type, $hidden = false, $title = tru
// //
//$server_id = PMA_DBI_fetch_value("SHOW VARIABLES LIKE 'server_id'", 0, 1); //$server_id = PMA_DBI_fetch_value("SHOW VARIABLES LIKE 'server_id'", 0, 1);
echo '<div id="replication_'. $type .'_section" style="'. ($hidden ? 'display: none' : '') .'"> '."\n"; echo '<div id="replication_' . $type . '_section" style="' . ($hidden ? 'display: none' : '') . '"> ';
if ($title) { if ($title) {
echo '<h4><a name="replication_'. $type .'"></a>'.${"strReplicationStatus_{$type}"} .'</h4>'."\n"; echo '<h4><a name="replication_' . $type . '"></a>' . ${"strReplicationStatus_{$type}"} . '</h4>';
} else { } else {
echo '<br />'."\n"; echo '<br />';
} }
echo ' <table id="server'. $type .'replicationsummary" class="data"> '."\n"; echo ' <table id="server' . $type . 'replicationsummary" class="data"> ';
echo ' <thead>'."\n"; echo ' <thead>';
echo ' <tr>'."\n"; echo ' <tr>';
echo ' <th>'. $GLOBALS['strVar'] .'</th>'."\n"; echo ' <th>' . $GLOBALS['strVar'] . '</th>';
echo ' <th>'. $GLOBALS['strValue'] .'</th>'."\n"; echo ' <th>' . $GLOBALS['strValue'] . '</th>';
echo ' </tr>'."\n"; echo ' </tr>';
echo ' </thead>'."\n"; echo ' </thead>';
echo ' <tbody>'."\n"; echo ' <tbody>';
$odd_row = true; $odd_row = true;
foreach (${"{$type}_variables"} as $variable) { foreach (${"{$type}_variables"} as $variable) {
echo ' <tr class="'. ($odd_row ? 'odd' : 'even') .'">'."\n"; echo ' <tr class="' . ($odd_row ? 'odd' : 'even') . '">';
echo ' <td class="name">'."\n"; echo ' <td class="name">';
echo $variable."\n"; echo $variable;
echo ' </td>'."\n"; echo ' </td>';
echo ' <td class="value">'."\n"; echo ' <td class="value">';
// TODO change to regexp or something, to allow for negative match // TODO change to regexp or something, to allow for negative match
if (isset(${"{$type}_variables_alerts"}[$variable]) if (isset(${"{$type}_variables_alerts"}[$variable])
&& ${"{$type}_variables_alerts"}[$variable] == ${"server_{$type}_replication"}[0][$variable] && ${"{$type}_variables_alerts"}[$variable] == ${"server_{$type}_replication"}[0][$variable]
) { ) {
echo '<span class="attention">'."\n"; echo '<span class="attention">';
} elseif (isset(${"{$type}_variables_oks"}[$variable]) } elseif (isset(${"{$type}_variables_oks"}[$variable])
&& ${"{$type}_variables_oks"}[$variable] == ${"server_{$type}_replication"}[0][$variable] && ${"{$type}_variables_oks"}[$variable] == ${"server_{$type}_replication"}[0][$variable]
) { ) {
echo '<span class="allfine">'."\n"; echo '<span class="allfine">';
} else { } else {
echo '<span>'."\n"; echo '<span>';
} }
echo ${"server_{$type}_replication"}[0][$variable]; echo ${"server_{$type}_replication"}[0][$variable];
echo '</span>'."\n"; echo '</span>';
echo ' </td>'."\n"; echo ' </td>';
echo ' </tr>'."\n"; echo ' </tr>';
$odd_row = ! $odd_row; $odd_row = ! $odd_row;
} }
echo ' </tbody>'."\n"; echo ' </tbody>';
echo ' </table>'."\n"; echo ' </table>';
echo ' <br />'."\n"; echo ' <br />';
echo '</div>'."\n"; echo '</div>';
} }
@@ -216,41 +213,43 @@ function PMA_replication_print_slaves_table($hidden = false) {
// Fetch data // Fetch data
$data = PMA_DBI_fetch_result('SHOW SLAVE HOSTS', null, null); $data = PMA_DBI_fetch_result('SHOW SLAVE HOSTS', null, null);
echo ' <br />' . "\n"; echo ' <br />';
echo ' <div id="replication_slaves_section" style="'. ($hidden ? 'display: none' : '') .'"> ' . "\n"; echo ' <div id="replication_slaves_section" style="' . ($hidden ? 'display: none' : '') . '"> ';
echo ' <table class="data"> ' . "\n"; echo ' <table class="data">';
echo ' <thead>' . "\n"; echo ' <thead>';
echo ' <tr>'."\n"; echo ' <tr>';
echo ' <th>' . $GLOBALS['strBinLogServerId'] . '</th>' . "\n"; echo ' <th>' . $GLOBALS['strBinLogServerId'] . '</th>';
echo ' <th>' . $GLOBALS['strHost'] . '</th>' . "\n"; echo ' <th>' . $GLOBALS['strHost'] . '</th>';
echo ' </tr>'."\n"; echo ' </tr>';
echo ' </thead>'."\n"; echo ' </thead>';
echo ' <tbody>'."\n"; echo ' <tbody>';
$odd_row = true; $odd_row = true;
foreach ($data as $slave) { foreach ($data as $slave) {
echo ' <tr class="'. ($odd_row ? 'odd' : 'even') .'">' . "\n"; echo ' <tr class="' . ($odd_row ? 'odd' : 'even') . '">';
echo ' <td class="value">' . $slave['Server_id'] . '</td>' . "\n"; echo ' <td class="value">' . $slave['Server_id'] . '</td>';
echo ' <td class="value">' . $slave['Host'] . '</td>' . "\n"; echo ' <td class="value">' . $slave['Host'] . '</td>';
echo ' </tr>' . "\n"; echo ' </tr>';
$odd_row = ! $odd_row; $odd_row = ! $odd_row;
} }
echo ' </tbody>'."\n"; echo ' </tbody>';
echo ' </table>'."\n"; echo ' </table>';
echo ' <br />'."\n"; echo ' <br />';
PMA_Message::notice('strReplicationShowConnectedSlavesNote')->display(); PMA_Message::notice('strReplicationShowConnectedSlavesNote')->display();
echo ' <br />'."\n"; echo ' <br />';
echo ' </div>'."\n"; echo ' </div>';
} }
/** /**
* Print code to add a replication slave user to the master * get the correct username and hostname lengths for this MySQL server
*
* @uses strtok()
* @return array username length, hostname length
*/ */
function PMA_replication_gui_master_addslaveuser() {
function PMA_replication_get_username_hostname_length() {
$fields_info = PMA_DBI_get_fields('mysql', 'user'); $fields_info = PMA_DBI_get_fields('mysql', 'user');
$username_length = 16; $username_length = 16;
$hostname_length = 41; $hostname_length = 41;
@@ -269,33 +268,41 @@ function PMA_replication_gui_master_addslaveuser() {
} }
} }
} }
unset($fields_info); return array($username_length, $hostname_length);
}
/**
* Print code to add a replication slave user to the master
*/
function PMA_replication_gui_master_addslaveuser() {
list($username_length, $hostname_length) = PMA_replication_get_username_hostname_length();
if (isset($GLOBALS['username']) && strlen($GLOBALS['username']) === 0) { if (isset($GLOBALS['username']) && strlen($GLOBALS['username']) === 0) {
$GLOBALS['pred_username'] = 'any'; $GLOBALS['pred_username'] = 'any';
} }
echo '<div id="master_addslaveuser_gui">'."\n"; echo '<div id="master_addslaveuser_gui">';
echo '<form autocomplete="off" method="post" action="server_privileges.php" onsubmit="return checkAddUser(this);">'."\n"; echo '<form autocomplete="off" method="post" action="server_privileges.php" onsubmit="return checkAddUser(this);">';
echo PMA_generate_common_hidden_inputs('', ''); echo PMA_generate_common_hidden_inputs('', '');
echo '<fieldset id="fieldset_add_user_login">' . "\n" echo '<fieldset id="fieldset_add_user_login">'
. '<legend>'.$GLOBALS['strReplicationAddSlaveUser'].'</legend>' . "\n" . '<legend>'.$GLOBALS['strReplicationAddSlaveUser'].'</legend>'
. '<input type="hidden" name="grant_count" value="25" />' . "\n" . '<input type="hidden" name="grant_count" value="25" />'
. '<input type="hidden" name="createdb" id="createdb_0" value="0" />' . "\n" . '<input type="hidden" name="createdb" id="createdb_0" value="0" />'
. '<input id="checkbox_Repl_slave_priv" type="hidden" title="Needed for the replication slaves." value="Y" name="Repl_slave_priv"/>'. "\n" . '<input id="checkbox_Repl_slave_priv" type="hidden" title="Needed for the replication slaves." value="Y" name="Repl_slave_priv"/>'
. '<input id="checkbox_Repl_client_priv" type="hidden" title="Needed for the replication slaves." value="Y" name="Repl_client_priv"/>'. "\n" . '<input id="checkbox_Repl_client_priv" type="hidden" title="Needed for the replication slaves." value="Y" name="Repl_client_priv"/>'
. '' . "\n" . ''
. '<input type="hidden" name="sr_take_action" value="true" />'. "\n" . '<input type="hidden" name="sr_take_action" value="true" />'
. '<div class="item">' . "\n" . '<div class="item">'
. '<label for="select_pred_username">' . "\n" . '<label for="select_pred_username">'
. ' ' . $GLOBALS['strUserName'] . ':' . "\n" . ' ' . $GLOBALS['strUserName'] . ':'
. '</label>' . "\n" . '</label>'
. '<span class="options">' . "\n" . '<span class="options">'
. ' <select name="pred_username" id="select_pred_username" title="' . $GLOBALS['strUserName'] . '"' . "\n" . ' <select name="pred_username" id="select_pred_username" title="' . $GLOBALS['strUserName'] . '"'
. ' onchange="if (this.value == \'any\') { username.value = \'\'; } else if (this.value == \'userdefined\') { username.focus(); username.select(); }">' . "\n" . ' onchange="if (this.value == \'any\') { username.value = \'\'; } else if (this.value == \'userdefined\') { username.focus(); username.select(); }">'
. ' <option value="any"' . ((isset($GLOBALS['pred_username']) && $GLOBALS['pred_username'] == 'any') ? ' selected="selected"' : '') . '>' . $GLOBALS['strAnyUser'] . '</option>' . "\n" . ' <option value="any"' . ((isset($GLOBALS['pred_username']) && $GLOBALS['pred_username'] == 'any') ? ' selected="selected"' : '') . '>' . $GLOBALS['strAnyUser'] . '</option>'
. ' <option value="userdefined"' . ((!isset($GLOBALS['pred_username']) || $GLOBALS['pred_username'] == 'userdefined') ? ' selected="selected"' : '') . '>' . $GLOBALS['strUseTextField'] . ':</option>' . "\n" . ' <option value="userdefined"' . ((! isset($GLOBALS['pred_username']) || $GLOBALS['pred_username'] == 'userdefined') ? ' selected="selected"' : '') . '>' . $GLOBALS['strUseTextField'] . ':</option>'
. ' </select>' . "\n" . ' </select>'
. '</span>' . "\n" . '</span>'
. '<input type="text" name="username" maxlength="' . '<input type="text" name="username" maxlength="'
. $username_length . '" title="' . $GLOBALS['strUserName'] . '"' . $username_length . '" title="' . $GLOBALS['strUserName'] . '"'
. (empty($GLOBALS['username']) . (empty($GLOBALS['username'])
@@ -303,14 +310,14 @@ function PMA_replication_gui_master_addslaveuser() {
: ' value="' . (isset($GLOBALS['new_username']) : ' value="' . (isset($GLOBALS['new_username'])
? $GLOBALS['new_username'] ? $GLOBALS['new_username']
: $GLOBALS['username']) . '"') : $GLOBALS['username']) . '"')
. ' onchange="pred_username.value = \'userdefined\';" />' . "\n" . ' onchange="pred_username.value = \'userdefined\';" />'
. '</div>' . "\n" . '</div>'
. '<div class="item">' . "\n" . '<div class="item">'
. '<label for="select_pred_hostname">' . "\n" . '<label for="select_pred_hostname">'
. ' ' . $GLOBALS['strHost'] . ':' . "\n" . ' ' . $GLOBALS['strHost'] . ':'
. '</label>' . "\n" . '</label>'
. '<span class="options">' . "\n" . '<span class="options">'
. ' <select name="pred_hostname" id="select_pred_hostname" title="' . $GLOBALS['strHost'] . '"' . "\n"; . ' <select name="pred_hostname" id="select_pred_hostname" title="' . $GLOBALS['strHost'] . '"';
$_current_user = PMA_DBI_fetch_value('SELECT USER();'); $_current_user = PMA_DBI_fetch_value('SELECT USER();');
if (! empty($_current_user)) { if (! empty($_current_user)) {
$thishost = str_replace("'", '', substr($_current_user, (strrpos($_current_user, '@') + 1))); $thishost = str_replace("'", '', substr($_current_user, (strrpos($_current_user, '@') + 1)));
@@ -341,75 +348,74 @@ function PMA_replication_gui_master_addslaveuser() {
echo ' <option value="any"' echo ' <option value="any"'
. ((isset($GLOBALS['pred_hostname']) && $GLOBALS['pred_hostname'] == 'any') . ((isset($GLOBALS['pred_hostname']) && $GLOBALS['pred_hostname'] == 'any')
? ' selected="selected"' : '') . '>' . $GLOBALS['strAnyHost'] ? ' selected="selected"' : '') . '>' . $GLOBALS['strAnyHost']
. '</option>' . "\n" . '</option>'
. ' <option value="localhost"' . ' <option value="localhost"'
. ((isset($GLOBALS['pred_hostname']) && $GLOBALS['pred_hostname'] == 'localhost') . ((isset($GLOBALS['pred_hostname']) && $GLOBALS['pred_hostname'] == 'localhost')
? ' selected="selected"' : '') . '>' . $GLOBALS['strLocalhost'] ? ' selected="selected"' : '') . '>' . $GLOBALS['strLocalhost']
. '</option>' . "\n"; . '</option>';
if (!empty($thishost)) { if (!empty($thishost)) {
echo ' <option value="thishost"' echo ' <option value="thishost"'
. ((isset($GLOBALS['pred_hostname']) && $GLOBALS['pred_hostname'] == 'thishost') . ((isset($GLOBALS['pred_hostname']) && $GLOBALS['pred_hostname'] == 'thishost')
? ' selected="selected"' : '') . '>' . $GLOBALS['strThisHost'] ? ' selected="selected"' : '') . '>' . $GLOBALS['strThisHost']
. '</option>' . "\n"; . '</option>';
} }
unset($thishost); unset($thishost);
echo ' <option value="hosttable"' echo ' <option value="hosttable"'
. ((isset($GLOBALS['pred_hostname']) && $GLOBALS['pred_hostname'] == 'hosttable') . ((isset($GLOBALS['pred_hostname']) && $GLOBALS['pred_hostname'] == 'hosttable')
? ' selected="selected"' : '') . '>' . $GLOBALS['strUseHostTable'] ? ' selected="selected"' : '') . '>' . $GLOBALS['strUseHostTable']
. '</option>' . "\n" . '</option>'
. ' <option value="userdefined"' . ' <option value="userdefined"'
. ((isset($GLOBALS['pred_hostname']) && $GLOBALS['pred_hostname'] == 'userdefined') . ((isset($GLOBALS['pred_hostname']) && $GLOBALS['pred_hostname'] == 'userdefined')
? ' selected="selected"' : '') ? ' selected="selected"' : '')
. '>' . $GLOBALS['strUseTextField'] . ':</option>' . "\n" . '>' . $GLOBALS['strUseTextField'] . ':</option>'
. ' </select>' . "\n" . ' </select>'
. '</span>' . "\n" . '</span>'
. '<input type="text" name="hostname" maxlength="' . '<input type="text" name="hostname" maxlength="'
. $hostname_length . '" value="' . $hostname_length . '" value="'
. (isset($GLOBALS['hostname']) ? $GLOBALS['hostname'] : '') . (isset($GLOBALS['hostname']) ? $GLOBALS['hostname'] : '')
. '" title="' . $GLOBALS['strHost'] . '" title="' . $GLOBALS['strHost']
. '" onchange="pred_hostname.value = \'userdefined\';" />' . "\n" . '" onchange="pred_hostname.value = \'userdefined\';" />'
. PMA_showHint($GLOBALS['strHostTableExplanation']) . PMA_showHint($GLOBALS['strHostTableExplanation'])
. '</div>' . "\n" . '</div>'
. '<div class="item">' . "\n" . '<div class="item">'
. '<label for="select_pred_password">' . "\n" . '<label for="select_pred_password">'
. ' ' . $GLOBALS['strPassword'] . ':' . "\n" . ' ' . $GLOBALS['strPassword'] . ':'
. '</label>' . "\n" . '</label>'
. '<span class="options">' . "\n" . '<span class="options">'
. ' <select name="pred_password" id="select_pred_password" title="' . ' <select name="pred_password" id="select_pred_password" title="'
. $GLOBALS['strPassword'] . '"' . "\n" . $GLOBALS['strPassword'] . '"'
. ' onchange="if (this.value == \'none\') { pma_pw.value = \'\'; pma_pw2.value = \'\'; } else if (this.value == \'userdefined\') { pma_pw.focus(); pma_pw.select(); }">' . "\n" . ' onchange="if (this.value == \'none\') { pma_pw.value = \'\'; pma_pw2.value = \'\'; } else if (this.value == \'userdefined\') { pma_pw.focus(); pma_pw.select(); }">'
. ' <option value="none"'; . ' <option value="none"';
if (isset($GLOBALS['username']) && $mode != 'change') { if (isset($GLOBALS['username']) && $mode != 'change') {
echo ' selected="selected"'; echo ' selected="selected"';
} }
echo '>' . $GLOBALS['strNoPassword'] . '</option>' . "\n" echo '>' . $GLOBALS['strNoPassword'] . '</option>'
. ' <option value="userdefined"' . (isset($GLOBALS['username']) ? '' : ' selected="selected"') . '>' . $GLOBALS['strUseTextField'] . ':</option>' . "\n" . ' <option value="userdefined"' . (isset($GLOBALS['username']) ? '' : ' selected="selected"') . '>' . $GLOBALS['strUseTextField'] . ':</option>'
. ' </select>' . "\n" . ' </select>'
. '</span>' . "\n" . '</span>'
. '<input type="password" id="text_pma_pw" name="pma_pw" title="' . $GLOBALS['strPassword'] . '" onchange="pred_password.value = \'userdefined\';" />' . "\n" . '<input type="password" id="text_pma_pw" name="pma_pw" title="' . $GLOBALS['strPassword'] . '" onchange="pred_password.value = \'userdefined\';" />'
. '</div>' . "\n" . '</div>'
. '<div class="item">' . "\n" . '<div class="item">'
. '<label for="text_pma_pw2">' . "\n" . '<label for="text_pma_pw2">'
. ' ' . $GLOBALS['strReType'] . ':' . "\n" . ' ' . $GLOBALS['strReType'] . ':'
. '</label>' . "\n" . '</label>'
. '<span class="options">&nbsp;</span>' . "\n" . '<span class="options">&nbsp;</span>'
. '<input type="password" name="pma_pw2" id="text_pma_pw2" title="' . $GLOBALS['strReType'] . '" onchange="pred_password.value = \'userdefined\';" />' . "\n" . '<input type="password" name="pma_pw2" id="text_pma_pw2" title="' . $GLOBALS['strReType'] . '" onchange="pred_password.value = \'userdefined\';" />'
. '</div>' . "\n" . '</div>'
. '<div class="item">' . "\n" . '<div class="item">'
. '<label for="button_generate_password">' . "\n" . '<label for="button_generate_password">'
. ' ' . $GLOBALS['strGeneratePassword'] . ':' . "\n" . ' ' . $GLOBALS['strGeneratePassword'] . ':'
. '</label>' . "\n" . '</label>'
. '<span class="options">' . "\n" . '<span class="options">'
. ' <input type="button" id="button_generate_password" value="' . $GLOBALS['strGenerate'] . '" onclick="suggestPassword(this.form)" />' . "\n" . ' <input type="button" id="button_generate_password" value="' . $GLOBALS['strGenerate'] . '" onclick="suggestPassword(this.form)" />'
. '</span>' . "\n" . '</span>'
. '<input type="text" name="generated_pw" id="generated_pw" />' . "\n" . '<input type="text" name="generated_pw" id="generated_pw" />'
. '</div>' . "\n" . '</div>'
. '</fieldset>' . "\n"; . '</fieldset>';
echo '<fieldset id="fieldset_user_privtable_footer" class="tblFooters">' . "\n" echo '<fieldset id="fieldset_user_privtable_footer" class="tblFooters">'
. ' <input type="submit" name="adduser_submit" id="adduser_submit" value="' . $GLOBALS['strGo'] . '" />' . "\n" . ' <input type="submit" name="adduser_submit" id="adduser_submit" value="' . $GLOBALS['strGo'] . '" />'
. '</fieldset>' . "\n"; . '</fieldset>';
echo '</form>'."\n"; echo '</form>';
echo '</div>'."\n"; echo '</div>'";
} }
?> ?>

View File

@@ -229,7 +229,7 @@ if (isset($GLOBALS['mr_configure'])) {
echo PMA_replication_db_multibox(); echo PMA_replication_db_multibox();
echo '<br /><br />'; echo '<br /><br />';
echo $GLOBALS['strReplicationAddLines'] . '<br />'; echo $GLOBALS['strReplicationAddLines'] . '<br />';
echo '<pre><div id="rep">server-id='. $serverid . '<br />log-bin=mysql-bin<br />log-error=mysql-bin.err<br /></div></pre>'; echo '<pre>server-id='. $serverid . '<br />log-bin=mysql-bin<br />log-error=mysql-bin.err<br /></pre>';
echo $GLOBALS['strReplicationRestartServer']; echo $GLOBALS['strReplicationRestartServer'];
echo '</fieldset>'; echo '</fieldset>';
echo '<fieldset class="tblFooters">'; echo '<fieldset class="tblFooters">';