XHTML compl.

This commit is contained in:
Sebastian Mendel
2005-10-13 09:34:56 +00:00
parent d1346a3c2d
commit 7dd2e62d3d
4 changed files with 87 additions and 76 deletions

View File

@@ -9,6 +9,8 @@ $Source$
* left.php: preselect db if only one db
* server_privileges.php:
XHTML compl., NOTICE, Icons for Edit/Revoke Links
* server_processlist.php, libraries/display_import.lib.php,
css/phpmyadmin.css.php: XHTML compl.
2005-10-12 Sebastian Mendel <cybot_tm@users.sourceforge.net>
* css/phpmyadmin.css.php, libraries/common.lib.php,

View File

@@ -182,7 +182,7 @@ div#queryboxcontainer div#bookmarkoptions {
}
fieldset .formelement {
line-height: 2.3em;
line-height: 2.4em;
float: left;
margin-right: 0.5em;
/* IE */

View File

@@ -72,7 +72,7 @@ echo ' <input type="hidden" name="import_type" value="' . $import_type . '" /
?>
<script type="text/javascript">
<!--
//<![CDATA[
function hide_them_all() {
<?php
foreach($import_list as $key => $val) {
@@ -118,21 +118,23 @@ foreach($import_list as $key => $val) {
}
}
}
//-->
//]]>
</script>
<h2><?php echo $strImport; ?></h2>
<!-- File name, and some other common options -->
<fieldset class="options">
<legend>
<?php echo $strFileToImport; ?>
</legend>
<legend><?php echo $strFileToImport; ?></legend>
<div class="formelement">
<label for="input_import_file"><?php echo $strLocationTextfile; ?></label>
<input style="margin: 5px" type="file" name="import_file" id="input_import_file" onchange="match_file(this.value);" />
<?php
</div>
<?php
echo '<div class="formelement">' . "\n";
echo PMA_displayMaximumUploadSize($max_upload_size);
echo '</div>' . "\n";
// some browsers should respect this :)
echo PMA_generateHiddenMaxFileSize($max_upload_size) . "\n";
@@ -145,7 +147,7 @@ if (!empty($cfg['UploadDir'])) {
$matcher = '@\.(' . $extensions . ')(\.(' . PMA_supportedDecompressions() . '))?$@';
$files = PMA_getFileSelectOptions($cfg['UploadDir'], $matcher, (isset($timeout_passed) && $timeout_passed && isset($local_import_file)) ? $local_import_file : '');
echo '<div class="formelement">' . "\n";
if ($files === FALSE) {
echo ' <div style="margin-bottom: 5px">' . "\n";
echo ' <font color="red">' . $strError . '</font><br />' . "\n";
@@ -159,34 +161,34 @@ if (!empty($cfg['UploadDir'])) {
echo $files;
echo ' </select>' . "\n";
}
echo '</div>' . "\n";
} // end if (web-server upload directory)
// charset of file
echo '<div class="formelement">' . "\n";
if (PMA_MYSQL_INT_VERSION < 40100 && $cfg['AllowAnywhereRecoding'] && $allow_recoding) {
echo '<br /><br /><label for="charset_of_file">' . $strCharsetOfFile . '</label>';
echo "\n";
echo '<label for="charset_of_file">' . $strCharsetOfFile . '</label>' . "\n";
$temp_charset = reset($cfg['AvailableCharsets']);
echo '&nbsp;' . $strCharsetOfFile . "\n"
. ' <select name="charset_of_file" size="1">' . "\n"
. ' <option value="' . $temp_charset . '"';
echo $strCharsetOfFile . "\n"
. ' <select id="charset_of_file" name="charset_of_file" size="1">' . "\n"
. ' <option value="' . htmlentities( $temp_charset ) . '"';
if ($temp_charset == $charset) {
echo ' selected="selected"';
}
echo '>' . $temp_charset . '</option>' . "\n";
echo '>' . htmlentities( $temp_charset ) . '</option>' . "\n";
while ($temp_charset = next($cfg['AvailableCharsets'])) {
echo ' <option value="' . $temp_charset . '"';
echo ' <option value="' . htmlentities( $temp_charset ) . '"';
if ($temp_charset == $charset) {
echo ' selected="selected"';
}
echo '>' . $temp_charset . '</option>' . "\n";
echo '>' . htmlentities( $temp_charset ) . '</option>' . "\n";
}
echo ' </select><br />' . "\n" . ' ';
} elseif (PMA_MYSQL_INT_VERSION >= 40100) {
echo '<br /><br /><label for="charset_of_file">' . $strCharsetOfFile . '</label>';
echo "\n";
echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_CHARSET, 'charset_of_file', NULL, 'utf8', FALSE);
echo '<label for="charset_of_file">' . $strCharsetOfFile . '</label>' . "\n";
echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_CHARSET, 'charset_of_file', 'charset_of_file', 'utf8', FALSE);
} // end if (recoding)
echo "\n";
echo '</div>' . "\n";
// zip, gzip and bzip2 encode features
$compressions = $strNone;
@@ -197,25 +199,34 @@ if ($cfg['ZipDump'] && @function_exists('gzinflate')) $compressions .= ', zip';
// We don't have show anything about compression, when no supported
if ($compressions != $strNone) {
printf('<br/>' . $strCompressionWillBeDetected, $compressions);
echo '<div class="formelement">' . "\n";
printf( $strCompressionWillBeDetected, $compressions);
echo '</div>' . "\n";
}
echo "\n";
?>
</fieldset>
<fieldset class="options">
<legend>
<?php echo $strPartialImport; ?>
</legend>
<legend><?php echo $strPartialImport; ?></legend>
<?php
if (isset($timeout_passed) && $timeout_passed) {
echo '<div class="formelement">' . "\n";
echo '<input type="hidden" name="skip" value="' . $offset . '" />';
echo sprintf($strTimeoutInfo, $offset) . '<br />';
echo sprintf($strTimeoutInfo, $offset) . '';
echo '</div>' . "\n";
}
?>
<input type="checkbox" name="allow_interrupt" value="yes" id="checkbox_allow_interrupt" <?php echo PMA_importCheckboxCheck('allow_interrupt'); ?>/><label for="checkbox_allow_interrupt"><?php echo $strAllowInterrupt; ?></label><br />
<label for="text_skip_queries" style="float: left; width: 20%;"><?php echo $strSkipQueries; ?></label>
<div class="formelement">
<input type="checkbox" name="allow_interrupt" value="yes"
id="checkbox_allow_interrupt" <?php echo PMA_importCheckboxCheck('allow_interrupt'); ?>/>
<label for="checkbox_allow_interrupt"><?php echo $strAllowInterrupt; ?></label><br />
</div>
<div class="formelement">
<label for="text_skip_queries"><?php echo $strSkipQueries; ?></label>
<input type="text" name="skip_queries" value="<?php echo PMA_importGetDefault('skip_queries');?>" id="text_skip_queries" />
</div>
</fieldset>
<fieldset style="float: left;" class="options">
@@ -271,10 +282,12 @@ if (function_exists('PMA_set_enc_form')) {
}
echo "\n";
?>
<input type="submit" value="<?php echo $strGo; ?>" id="buttonGo" style="clear: both; display: block;"/>
<fieldset class="tblFooters">
<input type="submit" value="<?php echo $strGo; ?>" id="buttonGo" />
</fieldset>
</form>
<script type="text/javascript">
<!--
//<![CDATA[
init_options();
//-->
//]]>
</script>

View File

@@ -31,71 +31,67 @@ require('./server_links.inc.php');
* Displays the sub-page heading
*/
echo '<h2>' . "\n"
. ($cfg['MainPageIconic'] ? '<img src="' . $pmaThemeImage . 's_process.png" width="16" height="16" border="0" hspace="2" align="middle" />' : '' )
. ' ' . $strProcesslist . "\n"
. ($cfg['MainPageIconic'] ? '<img class="icon" src="' . $pmaThemeImage . 's_process.png" width="16" height="16" alt="" />' : '' )
. $strProcesslist . "\n"
. '</h2>' . "\n";
/**
* Sends the query and buffers the result
*/
$serverProcesses = array();
$sql_query = 'SHOW' . (empty($full) ? '' : ' FULL') . ' PROCESSLIST';
$res = PMA_DBI_query($sql_query);
while ($row = PMA_DBI_fetch_assoc($res)) {
$serverProcesses[] = $row;
}
@PMA_DBI_free_result($res);
unset($res);
unset($row);
$sql_query = 'SHOW' . ( empty( $full ) ? '' : ' FULL' ) . ' PROCESSLIST';
$serverProcesses = PMA_DBI_fetch_result( $sql_query );
PMA_showMessage($GLOBALS['strSuccess']);
PMA_showMessage( $GLOBALS['strSuccess'] );
/**
* Displays the page
*/
?>
<table border="0" cellpadding="2" cellspacing="1">
<tr>
<td><a href="./server_processlist.php?<?php echo $url_query . (empty($full) ? '&amp;full=1' : ''); ?>" title="<?php echo empty($full) ? $strShowFullQueries : $strTruncateQueries; ?>"><img src="<?php echo $pmaThemeImage . 's_' . (empty($full) ? 'full' : 'partial'); ?>text.png" width="50" height="20" border="0" alt="<?php echo empty($full) ? $strShowFullQueries : $strTruncateQueries; ?>" /></a></td>
<th>&nbsp;<?php echo $strId; ?>&nbsp;</th>
<th>&nbsp;<?php echo $strUser; ?>&nbsp;</th>
<th>&nbsp;<?php echo $strHost; ?>&nbsp;</th>
<th>&nbsp;<?php echo $strDatabase; ?>&nbsp;</th>
<th>&nbsp;<?php echo $strCommand; ?>&nbsp;</th>
<th>&nbsp;<?php echo $strTime; ?>&nbsp;</th>
<th>&nbsp;<?php echo $strStatus; ?>&nbsp;</th>
<th>&nbsp;<?php echo $strSQLQuery; ?>&nbsp;</th>
</tr>
<table id="tableprocesslist" class="data">
<thead>
<tr><td><a href="./server_processlist.php?<?php echo $url_query . (empty($full) ? '&amp;full=1' : ''); ?>"
title="<?php echo empty($full) ? $strShowFullQueries : $strTruncateQueries; ?>">
<img src="<?php echo $pmaThemeImage . 's_' . (empty($full) ? 'full' : 'partial'); ?>text.png"
width="50" height="20" alt="<?php echo empty($full) ? $strShowFullQueries : $strTruncateQueries; ?>" />
</a></td>
<th><?php echo $strId; ?></th>
<th><?php echo $strUser; ?></th>
<th><?php echo $strHost; ?></th>
<th><?php echo $strDatabase; ?></th>
<th><?php echo $strCommand; ?></th>
<th><?php echo $strTime; ?></th>
<th><?php echo $strStatus; ?></th>
<th><?php echo $strSQLQuery; ?></th>
</tr>
</thead>
<tbody>
<?php
$useBgcolorOne = TRUE;
foreach ($serverProcesses AS $name => $value) {
?>
<tr>
<td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<a href="./server_processlist.php?<?php echo $url_query . '&amp;kill=' . $value['Id']; ?>"><?php echo $strKill; ?></a>&nbsp;</td>
<td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align="right">&nbsp;<?php echo $value['Id']; ?>&nbsp;</td>
<td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo $value['User']; ?>&nbsp;</td>
<td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo $value['Host']; ?>&nbsp;</td>
<td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo (empty($value['db']) ? '<i>' . $strNone . '</i>' : $value['db']); ?>&nbsp;</td>
<td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo $value['Command']; ?>&nbsp;</td>
<td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align="right">&nbsp;<?php echo $value['Time']; ?>&nbsp;</td>
<td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo (empty($value['State']) ? '---' : $value['State']); ?>&nbsp;</td>
<td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo (empty($value['Info']) ? '---' : PMA_SQP_formatHtml(PMA_SQP_parse($value['Info']))); ?>&nbsp;</td>
</tr>
<?php
$useBgcolorOne = !$useBgcolorOne;
$odd_row = true;
foreach ( $serverProcesses AS $process ) {
?>
<tr class="<?php echo $odd_row ? 'odd' : 'even'; ?>">
<td><a href="./server_processlist.php?<?php echo $url_query . '&amp;kill=' . $process['Id']; ?>"><?php echo $strKill; ?></a></td>
<td class="value"><?php echo $process['Id']; ?></td>
<td><?php echo $process['User']; ?></td>
<td><?php echo $process['Host']; ?></td>
<td><?php echo (empty($process['db']) ? '<i>' . $strNone . '</i>' : $process['db']); ?></td>
<td><?php echo $process['Command']; ?></td>
<td class="value"><?php echo $process['Time']; ?></td>
<td><?php echo (empty($process['State']) ? '---' : $process['State']); ?></td>
<td><?php echo (empty($process['Info']) ? '---' : PMA_SQP_formatHtml(PMA_SQP_parse($process['Info']))); ?></td>
</tr>
<?php
$odd_row = ! $odd_row;
}
?>
<?php
?>
</tbody>
</table>
<?php
/**
* Sends the footer
*/
require_once('./footer.inc.php');
?>
?>