make use of PMA_showHint() in more places

This commit is contained in:
Sebastian Mendel
2007-10-05 14:06:27 +00:00
parent 4355a564d5
commit 872cadf60d
6 changed files with 39 additions and 56 deletions

View File

@@ -304,11 +304,13 @@ if (isset($_REQUEST['submit_search'])) {
<td><input type="radio" id="search_option_1" name="search_option" <td><input type="radio" id="search_option_1" name="search_option"
value="1"<?php if ($search_option == 1) echo ' checked="checked"'; ?> /> value="1"<?php if ($search_option == 1) echo ' checked="checked"'; ?> />
<label for="search_option_1"> <label for="search_option_1">
<?php echo $GLOBALS['strSearchOption1']; ?></label><sup>1</sup><br /> <?php echo $GLOBALS['strSearchOption1']; ?></label>
<?php echo PMA_showHint($GLOBALS['strSplitWordsWithSpace']); ?><br />
<input type="radio" id="search_option_2" name="search_option" <input type="radio" id="search_option_2" name="search_option"
value="2"<?php if ($search_option == 2) echo ' checked="checked"'; ?> /> value="2"<?php if ($search_option == 2) echo ' checked="checked"'; ?> />
<label for="search_option_2"> <label for="search_option_2">
<?php echo $GLOBALS['strSearchOption2']; ?></label><sup>1</sup><br /> <?php echo $GLOBALS['strSearchOption2']; ?></label>
<?php echo PMA_showHint($GLOBALS['strSplitWordsWithSpace']); ?><br />
<input type="radio" id="search_option_3" name="search_option" <input type="radio" id="search_option_3" name="search_option"
value="3"<?php if ($search_option == 3) echo ' checked="checked"'; ?> /> value="3"<?php if ($search_option == 3) echo ' checked="checked"'; ?> />
<label for="search_option_3"> <label for="search_option_3">
@@ -319,8 +321,7 @@ if (isset($_REQUEST['submit_search'])) {
<?php echo $GLOBALS['strSearchOption4']; ?></label> <?php echo $GLOBALS['strSearchOption4']; ?></label>
<?php echo PMA_showMySQLDocu('Regexp', 'Regexp'); ?><br /> <?php echo PMA_showMySQLDocu('Regexp', 'Regexp'); ?><br />
<br /> </td>
<sup>1</sup><?php echo $GLOBALS['strSplitWordsWithSpace']; ?></td>
</tr> </tr>
<tr><td align="right" valign="top"> <tr><td align="right" valign="top">
<?php echo $GLOBALS['strSearchInTables']; ?></td> <?php echo $GLOBALS['strSearchInTables']; ?></td>

View File

@@ -183,6 +183,8 @@ $odd_row = true;
$at_least_one_view_exceeds_max_count = false; $at_least_one_view_exceeds_max_count = false;
$sum_row_count_pre = ''; $sum_row_count_pre = '';
$max_exact_count_note = PMA_showHint(PMA_sanitize(sprintf($strViewMaxExactCount, PMA_formatNumber($cfg['MaxExactCountViews'], 0), '[a@./Documentation.html#cfg_MaxExactCountViews@_blank]', '[/a]')));
foreach ($tables as $keyname => $each_table) { foreach ($tables as $keyname => $each_table) {
if ($each_table['TABLE_ROWS'] === null || $each_table['TABLE_ROWS'] < $GLOBALS['cfg']['MaxExactCount']) { if ($each_table['TABLE_ROWS'] === null || $each_table['TABLE_ROWS'] < $GLOBALS['cfg']['MaxExactCount']) {
$each_table['TABLE_ROWS'] = PMA_Table::countRecords($db, $each_table['TABLE_ROWS'] = PMA_Table::countRecords($db,
@@ -352,7 +354,7 @@ foreach ($tables as $keyname => $each_table) {
$at_least_one_view_exceeds_max_count = true; $at_least_one_view_exceeds_max_count = true;
$row_count_pre = '~'; $row_count_pre = '~';
$sum_row_count_pre = '~'; $sum_row_count_pre = '~';
$show_superscript = '<sup>1</sup>'; $show_superscript = $max_exact_count_note;
} elseif($each_table['ENGINE'] == 'InnoDB') { } elseif($each_table['ENGINE'] == 'InnoDB') {
// InnoDB table: Row count is not accurate // InnoDB table: Row count is not accurate
$row_count_pre = '~'; $row_count_pre = '~';
@@ -490,13 +492,6 @@ echo ' <option value="' . $strAnalyzeTable . '" >'
</div> </div>
</form> </form>
<?php <?php
// Notice about row count for views
if ($at_least_one_view_exceeds_max_count && !$db_is_information_schema) {
echo '<div class="notice">' . "\n";
echo '<sup>1</sup>' . PMA_sanitize(sprintf($strViewMaxExactCount, PMA_formatNumber($cfg['MaxExactCountViews'], 0), '[a@./Documentation.html#cfg_MaxExactCountViews@_blank]', '[/a]')) . "\n";
echo '</div>' . "\n";
}
// display again the table list navigator // display again the table list navigator
PMA_listNavigator($total_num_tables, $pos, $_url_params, 'db_structure.php', 'frame_content', $GLOBALS['cfg']['MaxTableList']); PMA_listNavigator($total_num_tables, $pos, $_url_params, 'db_structure.php', 'frame_content', $GLOBALS['cfg']['MaxTableList']);
?> ?>

View File

@@ -432,7 +432,7 @@ function PMA_showMySQLDocu($chapter, $link, $big_icon = false)
* @return string html code for a footnote marker * @return string html code for a footnote marker
* @access public * @access public
*/ */
function PMA_showHint($hint_message, $type = 'notice') function PMA_showHint($hint_message, $bbcode = false, $type = 'notice')
{ {
$key = md5($hint_message); $key = md5($hint_message);
@@ -447,6 +447,10 @@ function PMA_showHint($hint_message, $type = 'notice')
$nr = $GLOBALS['footnotes'][$key]['nr']; $nr = $GLOBALS['footnotes'][$key]['nr'];
} }
if ($bbcode) {
return '[sup]' . $nr . '[/sup]';
}
return '<sup class="footnotemarker" name="footnote_' . $nr . '">' . $nr . '</sup>'; return '<sup class="footnotemarker" name="footnote_' . $nr . '">' . $nr . '</sup>';
} }

View File

@@ -142,8 +142,21 @@ echo PMA_pluginGetJavascript($export_list);
<?php } ?> <?php } ?>
<label for="filename_template"> <label for="filename_template">
<?php echo $strFileNameTemplate; ?> <?php
<sup>(1)</sup></label>: echo $strFileNameTemplate;
$trans = '__SERVER__/' . $strFileNameTemplateDescriptionServer;
if ($export_type == 'database' || $export_type == 'table') {
$trans .= ', __DB__/' . $strFileNameTemplateDescriptionDatabase;
}
if ($export_type == 'table') {
$trans .= ', __TABLE__/' . $strFileNameTemplateDescriptionTable;
}
echo PMA_showHint(sprintf($strFileNameTemplateDescription,
'<a href="http://www.php.net/strftime" target="documentation" title="'
. $strDocu . '">', '</a>', $trans));
?>
</label>:
<input type="text" name="filename_template" id="filename_template" <input type="text" name="filename_template" id="filename_template"
<?php <?php
echo ' value="'; echo ' value="';
@@ -252,18 +265,3 @@ if ($is_zip || $is_gzip || $is_bzip) { ?>
<input type="submit" value="<?php echo $strGo; ?>" id="buttonGo" /> <input type="submit" value="<?php echo $strGo; ?>" id="buttonGo" />
</fieldset> </fieldset>
</form> </form>
<div class="notice">
<sup id="FileNameTemplateHelp">(1)</sup>
<?php
$trans = '__SERVER__/' . $strFileNameTemplateDescriptionServer;
if ($export_type == 'database' || $export_type == 'table') {
$trans .= ', __DB__/' . $strFileNameTemplateDescriptionDatabase;
}
if ($export_type == 'table') {
$trans .= ', __TABLE__/' . $strFileNameTemplateDescriptionTable;
}
echo sprintf($strFileNameTemplateDescription,
'<a href="http://www.php.net/strftime" target="documentation" title="'
. $strDocu . '">', '</a>', $trans); ?>
</div>

View File

@@ -1825,7 +1825,7 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
|| $analyzed_sql[0]['where_clause'] == '1 ')) { || $analyzed_sql[0]['where_clause'] == '1 ')) {
// "j u s t b r o w s i n g" // "j u s t b r o w s i n g"
$pre_count = '~'; $pre_count = '~';
$after_count = '[sup]1[/sup]'; $after_count = PMA_showHint($GLOBALS['strApproximateCount'], true);
} else { } else {
$pre_count = ''; $pre_count = '';
$after_count = ''; $after_count = '';
@@ -1875,12 +1875,6 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
echo PMA_sanitize(sprintf($GLOBALS['strViewMaxExactCount'], PMA_formatNumber($GLOBALS['cfg']['MaxExactCount'], 0), '[a@./Documentation.html#cfg_MaxExactCount@_blank]', '[/a]')) . "\n"; echo PMA_sanitize(sprintf($GLOBALS['strViewMaxExactCount'], PMA_formatNumber($GLOBALS['cfg']['MaxExactCount'], 0), '[a@./Documentation.html#cfg_MaxExactCount@_blank]', '[/a]')) . "\n";
echo '</div>' . "\n"; echo '</div>' . "\n";
} }
if ($pre_count) {
echo '<div class="notice">' . "\n";
echo '<sup>1</sup>' . PMA_sanitize($GLOBALS['strApproximateCount']) . "\n";
echo '</div>' . "\n";
}
} elseif (!isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') { } elseif (!isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') {
PMA_showMessage($GLOBALS['strSQLQuery']); PMA_showMessage($GLOBALS['strSQLQuery']);
} }

View File

@@ -123,11 +123,11 @@ $content_cells = array();
$header_cells[] = $strField; $header_cells[] = $strField;
$header_cells[] = $strType . ($GLOBALS['cfg']['ReplaceHelpImg'] ? PMA_showMySQLDocu('SQL-Syntax', 'data-types') : '<br /><span style="font-weight: normal">' . PMA_showMySQLDocu('SQL-Syntax', 'data-types') . '</span>'); $header_cells[] = $strType . ($GLOBALS['cfg']['ReplaceHelpImg'] ? PMA_showMySQLDocu('SQL-Syntax', 'data-types') : '<br /><span style="font-weight: normal">' . PMA_showMySQLDocu('SQL-Syntax', 'data-types') . '</span>');
$header_cells[] = $strLengthSet . '<sup>1</sup>'; $header_cells[] = $strLengthSet . PMA_showHint($strSetEnumVal);
$header_cells[] = $strCollation; $header_cells[] = $strCollation;
$header_cells[] = $strAttr; $header_cells[] = $strAttr;
$header_cells[] = $strNull; $header_cells[] = $strNull;
$header_cells[] = $strDefault . '<sup>2</sup>'; $header_cells[] = $strDefault . PMA_showHint($strDefaultValueHelp);
$header_cells[] = $strExtra; $header_cells[] = $strExtra;
@@ -159,9 +159,16 @@ if ($cfgRelation['mimework'] && $cfg['BrowseMIME']) {
$mime_map = PMA_getMIME($db, $table); $mime_map = PMA_getMIME($db, $table);
$available_mime = PMA_getAvailableMIMEtypes(); $available_mime = PMA_getAvailableMIMEtypes();
$hint = '<p>' .
sprintf($strMIME_transformation_note,
'<a href="transformation_overview.php?'
. PMA_generate_common_url($db, $table) . '" target="_blank">',
'</a>') . '</p>';
$header_cells[] = $strMIME_MIMEtype; $header_cells[] = $strMIME_MIMEtype;
$header_cells[] = $strMIME_transformation; $header_cells[] = $strMIME_transformation;
$header_cells[] = $strMIME_transformation_options . '<sup>3</sup>'; $header_cells[] = $strMIME_transformation_options . PMA_showHint($strMIME_transformation_options_note . $hint);
} }
// garvin: workaround for field_fulltext, because its submitted indizes contain // garvin: workaround for field_fulltext, because its submitted indizes contain
@@ -675,20 +682,4 @@ if ($action == 'tbl_create.php') {
</form> </form>
<div class="notice">
<p> <a name="footnoote_setenumval"><sup>1</sup></a> <?php echo $strSetEnumVal; ?></p>
<p> <a name="footnoote_defaultvalue"><sup>2</sup></a> <?php echo $strDefaultValueHelp; ?></p>
<?php
if ($cfgRelation['commwork'] && $cfgRelation['mimework'] && $cfg['BrowseMIME']) {
echo '<p> <a name="footnoote_mime"><sup>3</sup></a> ' . $strMIME_transformation_options_note . '</p>';
echo '<p> ';
printf($strMIME_transformation_note,
'<a href="transformation_overview.php?'
. PMA_generate_common_url($db, $table) . '" target="_blank">',
'</a>');
echo '</p>';
}
?>
</div>
<center><?php echo PMA_showMySQLDocu('SQL-Syntax', 'CREATE_TABLE'); ?></center> <center><?php echo PMA_showMySQLDocu('SQL-Syntax', 'CREATE_TABLE'); ?></center>