style upgrade

This commit is contained in:
Sebastian Mendel
2006-04-25 12:14:34 +00:00
parent 9e725e08c6
commit 4a62967b0c
2 changed files with 250 additions and 249 deletions

View File

@@ -5,7 +5,11 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2006-03-24 Michal Čihař <michal@cihar.com> 2006-04-25 Sebastian Mendel <cybot_tm@users.sourceforge.net>
* db_details_qbe.php:
style upgrade
2006-04-24 Michal Čihař <michal@cihar.com>
* main.php: Fix logout link (bug #1474694). * main.php: Fix logout link (bug #1474694).
2006-04-21 Michal Čihař <michal@cihar.com> 2006-04-21 Michal Čihař <michal@cihar.com>

View File

@@ -9,9 +9,9 @@
/** /**
* requirements * requirements
*/ */
require_once('./libraries/common.lib.php'); require_once './libraries/common.lib.php';
require_once './libraries/Table.class.php'; require_once './libraries/Table.class.php';
require_once('./libraries/relation.lib.php'); require_once './libraries/relation.lib.php';
/** /**
@@ -28,14 +28,14 @@ if ( isset( $_REQUEST['submit_sql'] )
$goto = 'db_details.php'; $goto = 'db_details.php';
$zero_rows = htmlspecialchars($GLOBALS['strSuccess']); $zero_rows = htmlspecialchars($GLOBALS['strSuccess']);
$sql_query = urldecode($_REQUEST['encoded_sql_query']); $sql_query = urldecode($_REQUEST['encoded_sql_query']);
require('./sql.php'); require './sql.php';
exit(); exit;
} else { } else {
$sub_part = '_qbe'; $sub_part = '_qbe';
require('./libraries/db_details_common.inc.php'); require './libraries/db_details_common.inc.php';
$url_query .= '&amp;goto=db_details_qbe.php'; $url_query .= '&amp;goto=db_details_qbe.php';
$url_params['goto'] = 'db_details_qbe.php'; $url_params['goto'] = 'db_details_qbe.php';
require('./libraries/db_details_db_info.inc.php'); require './libraries/db_details_db_info.inc.php';
} }
if (isset($_REQUEST['submit_sql']) if (isset($_REQUEST['submit_sql'])
@@ -170,11 +170,9 @@ function showColumnSelectCell( $columns, $column_number, $selected = '' )
?> ?>
<form action="db_details_qbe.php" method="post"> <form action="db_details_qbe.php" method="post">
<table> <table class="data" style="width: 100%;">
<tr class="odd"> <tr class="odd noclick">
<th align="<?php echo $cell_align_right; ?>"> <th><?php echo $strField; ?>:</th>
<?php echo $strField; ?>:
</th>
<?php <?php
$z = 0; $z = 0;
for ($x = 0; $x < $col; $x++) { for ($x = 0; $x < $col; $x++) {
@@ -199,16 +197,14 @@ for ($x = 0; $x < $col; $x++) {
</tr> </tr>
<!-- Sort row --> <!-- Sort row -->
<tr class="even"> <tr class="even noclick">
<th align="<?php echo $cell_align_right; ?>"> <th><?php echo $strSort; ?>:</th>
<?php echo $strSort; ?>:
</th>
<?php <?php
$z = 0; $z = 0;
for ($x = 0; $x < $col; $x++) { for ($x = 0; $x < $col; $x++) {
if (!empty($ins_col) && isset($ins_col[$x]) && $ins_col[$x] == 'on') { if (!empty($ins_col) && isset($ins_col[$x]) && $ins_col[$x] == 'on') {
?> ?>
<td align="center" bgcolor="<?php echo $cfg['BgcolorTwo']; ?>"> <td align="center">
<select style="width: <?php echo $realwidth; ?>" name="Sort[<?php echo $z; ?>]" size="1"> <select style="width: <?php echo $realwidth; ?>" name="Sort[<?php echo $z; ?>]" size="1">
<option value=""></option> <option value=""></option>
<option value="ASC"><?php echo $strAscending; ?></option> <option value="ASC"><?php echo $strAscending; ?></option>
@@ -224,7 +220,7 @@ for ($x = 0; $x < $col; $x++) {
continue; continue;
} }
?> ?>
<td align="center" bgcolor="<?php echo $cfg['BgcolorTwo']; ?>"> <td align="center">
<select style="width: <?php echo $realwidth; ?>" name="Sort[<?php echo $z; ?>]" size="1"> <select style="width: <?php echo $realwidth; ?>" name="Sort[<?php echo $z; ?>]" size="1">
<option value=""></option> <option value=""></option>
<?php <?php
@@ -233,7 +229,8 @@ for ($x = 0; $x < $col; $x++) {
// If they have chosen all fields using the * selector, // If they have chosen all fields using the * selector,
// then sorting is not available // then sorting is not available
// Robbat2 - Fix for Bug #570698 // Robbat2 - Fix for Bug #570698
if (isset($Sort[$x]) && isset($Field[$x]) && (substr(urldecode($Field[$x]),-2) == '.*')) { if (isset($Sort[$x]) && isset($Field[$x])
&& substr(urldecode($Field[$x]), -2) == '.*') {
$Sort[$x] = ''; $Sort[$x] = '';
} //end if } //end if
@@ -264,16 +261,14 @@ for ($x = 0; $x < $col; $x++) {
</tr> </tr>
<!-- Show row --> <!-- Show row -->
<tr> <tr class="odd noclick">
<td class="tblHeaders" align="<?php echo $cell_align_right; ?>"> <th><?php echo $strShow; ?>:</th>
<b><?php echo $strShow; ?>:&nbsp;</b>
</td>
<?php <?php
$z = 0; $z = 0;
for ($x = 0; $x < $col; $x++) { for ($x = 0; $x < $col; $x++) {
if (!empty($ins_col) && isset($ins_col[$x]) && $ins_col[$x] == 'on') { if (!empty($ins_col) && isset($ins_col[$x]) && $ins_col[$x] == 'on') {
?> ?>
<td class="tblHeaders" align="center" bgcolor="<?php echo $cfg['BgcolorOne']; ?>"> <td align="center">
<input type="checkbox" name="Show[<?php echo $z; ?>]" /> <input type="checkbox" name="Show[<?php echo $z; ?>]" />
</td> </td>
<?php <?php
@@ -291,7 +286,7 @@ for ($x = 0; $x < $col; $x++) {
$checked = ''; $checked = '';
} }
?> ?>
<td class="tblHeaders" align="center" bgcolor="<?php echo $cfg['BgcolorOne']; ?>"> <td align="center">
<input type="checkbox" name="Show[<?php echo $z; ?>]"<?php echo $checked; ?> /> <input type="checkbox" name="Show[<?php echo $z; ?>]"<?php echo $checked; ?> />
</td> </td>
<?php <?php
@@ -302,16 +297,14 @@ for ($x = 0; $x < $col; $x++) {
</tr> </tr>
<!-- Criteria row --> <!-- Criteria row -->
<tr> <tr class="even noclick">
<td class="tblHeaders" align="<?php echo $cell_align_right; ?>"> <th><?php echo $strCriteria; ?>:</th>
<b><?php echo $strCriteria; ?>:&nbsp;</b>
</td>
<?php <?php
$z = 0; $z = 0;
for ($x = 0; $x < $col; $x++) { for ($x = 0; $x < $col; $x++) {
if (!empty($ins_col) && isset($ins_col[$x]) && $ins_col[$x] == 'on') { if (!empty($ins_col) && isset($ins_col[$x]) && $ins_col[$x] == 'on') {
?> ?>
<td align="center" bgcolor="<?php echo $cfg['BgcolorTwo']; ?>"> <td align="center">
<input type="text" name="criteria[<?php echo $z; ?>]" value="" class="textfield" style="width: <?php echo $realwidth; ?>" size="20" /> <input type="text" name="criteria[<?php echo $z; ?>]" value="" class="textfield" style="width: <?php echo $realwidth; ?>" size="20" />
</td> </td>
<?php <?php
@@ -334,7 +327,7 @@ for ($x = 0; $x < $col; $x++) {
$encoded_Criteria = $prev_criteria[$x]; $encoded_Criteria = $prev_criteria[$x];
} }
?> ?>
<td align="center" bgcolor="<?php echo $cfg['BgcolorTwo']; ?>"> <td align="center">
<input type="hidden" name="prev_criteria[<?php echo $z; ?>]" value="<?php echo $encoded_Criteria; ?>" /> <input type="hidden" name="prev_criteria[<?php echo $z; ?>]" value="<?php echo $encoded_Criteria; ?>" />
<input type="text" name="criteria[<?php echo $z; ?>]" value="<?php echo htmlspecialchars($stripped_Criteria); ?>" class="textfield" style="width: <?php echo $realwidth; ?>" size="20" /> <input type="text" name="criteria[<?php echo $z; ?>]" value="<?php echo htmlspecialchars($stripped_Criteria); ?>" class="textfield" style="width: <?php echo $realwidth; ?>" size="20" />
</td> </td>
@@ -348,16 +341,16 @@ for ($x = 0; $x < $col; $x++) {
<!-- And/Or columns and rows --> <!-- And/Or columns and rows -->
<?php <?php
$w = 0; $w = 0;
$odd_row = true;
for ($y = 0; $y <= $row; $y++) { for ($y = 0; $y <= $row; $y++) {
$bgcolor = ($y % 2) ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo'];
if (isset($ins_row[$y]) && $ins_row[$y] == 'on') { if (isset($ins_row[$y]) && $ins_row[$y] == 'on') {
$chk['or'] = ' checked="checked"'; $chk['or'] = ' checked="checked"';
$chk['and'] = ''; $chk['and'] = '';
?> ?>
<tr> <tr class="<?php echo $odd_row ? 'odd' : 'even'; ?> noclick">
<td align="<?php echo $cell_align_right; ?>" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"> <td align="<?php echo $cell_align_right; ?>" nowrap="nowrap">
<!-- Row controls --> <!-- Row controls -->
<table bgcolor="<?php echo $bgcolor; ?>" cellpadding="0" cellspacing="0" border="0"> <table cellpadding="0" cellspacing="0" border="0">
<tr> <tr>
<td align="<?php echo $cell_align_right; ?>" nowrap="nowrap"> <td align="<?php echo $cell_align_right; ?>" nowrap="nowrap">
<small><?php echo $strQBEIns; ?>:</small> <small><?php echo $strQBEIns; ?>:</small>
@@ -393,7 +386,7 @@ for ($y = 0; $y <= $row; $y++) {
echo "\n"; echo "\n";
$or = 'Or' . $w . '[' . $z . ']'; $or = 'Or' . $w . '[' . $z . ']';
?> ?>
<td align="center" bgcolor="<?php echo $bgcolor; ?>"> <td align="center">
<textarea cols="20" rows="2" style="width: <?php echo $realwidth; ?>" name="<?php echo $or; ?>" dir="<?php echo $text_dir; ?>"></textarea> <textarea cols="20" rows="2" style="width: <?php echo $realwidth; ?>" name="<?php echo $or; ?>" dir="<?php echo $text_dir; ?>"></textarea>
</td> </td>
<?php <?php
@@ -406,7 +399,7 @@ for ($y = 0; $y <= $row; $y++) {
echo "\n"; echo "\n";
$or = 'Or' . $w . '[' . $z . ']'; $or = 'Or' . $w . '[' . $z . ']';
?> ?>
<td align="center" bgcolor="<?php echo $bgcolor; ?>"> <td align="center">
<textarea cols="20" rows="2" style="width: <?php echo $realwidth; ?>" name="<?php echo $or; ?>" dir="<?php echo $text_dir; ?>"></textarea> <textarea cols="20" rows="2" style="width: <?php echo $realwidth; ?>" name="<?php echo $or; ?>" dir="<?php echo $text_dir; ?>"></textarea>
</td> </td>
<?php <?php
@@ -417,6 +410,7 @@ for ($y = 0; $y <= $row; $y++) {
?> ?>
</tr> </tr>
<?php <?php
$odd_row =! $odd_row;
} // end if } // end if
if (isset($del_row[$y]) && $del_row[$y] == 'on') { if (isset($del_row[$y]) && $del_row[$y] == 'on') {
@@ -435,10 +429,10 @@ for ($y = 0; $y <= $row; $y++) {
} }
echo "\n"; echo "\n";
?> ?>
<tr> <tr class="<?php echo $odd_row ? 'odd' : 'even'; ?> noclick">
<td align="<?php echo $cell_align_right; ?>" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap"> <td align="<?php echo $cell_align_right; ?>" nowrap="nowrap">
<!-- Row controls --> <!-- Row controls -->
<table bgcolor="<?php echo $bgcolor; ?>" border="0" cellpadding="0" cellspacing="0"> <table border="0" cellpadding="0" cellspacing="0">
<tr> <tr>
<td align="<?php echo $cell_align_right; ?>" nowrap="nowrap"> <td align="<?php echo $cell_align_right; ?>" nowrap="nowrap">
<small><?php echo $strQBEIns; ?>:</small> <small><?php echo $strQBEIns; ?>:</small>
@@ -472,7 +466,7 @@ for ($y = 0; $y <= $row; $y++) {
echo "\n"; echo "\n";
$or = 'Or' . $w . '[' . $z . ']'; $or = 'Or' . $w . '[' . $z . ']';
?> ?>
<td align="center" bgcolor="<?php echo $bgcolor; ?>"> <td align="center">
<textarea cols="20" rows="2" style="width: <?php echo $realwidth; ?>" name="<?php echo $or; ?>" dir="<?php echo $text_dir; ?>"></textarea> <textarea cols="20" rows="2" style="width: <?php echo $realwidth; ?>" name="<?php echo $or; ?>" dir="<?php echo $text_dir; ?>"></textarea>
</td> </td>
<?php <?php
@@ -493,7 +487,7 @@ for ($y = 0; $y <= $row; $y++) {
$stripped_or = ''; $stripped_or = '';
} }
?> ?>
<td align="center" bgcolor="<?php echo $bgcolor; ?>"> <td align="center">
<textarea cols="20" rows="2" style="width: <?php echo $realwidth; ?>" name="Or<?php echo $w . '[' . $z . ']'; ?>" dir="<?php echo $text_dir; ?>"><?php echo htmlspecialchars($stripped_or); ?></textarea> <textarea cols="20" rows="2" style="width: <?php echo $realwidth; ?>" name="Or<?php echo $w . '[' . $z . ']'; ?>" dir="<?php echo $text_dir; ?>"><?php echo htmlspecialchars($stripped_or); ?></textarea>
</td> </td>
<?php <?php
@@ -508,14 +502,12 @@ for ($y = 0; $y <= $row; $y++) {
</tr> </tr>
<?php <?php
echo "\n"; echo "\n";
$odd_row =! $odd_row;
} // end for } // end for
?> ?>
<!-- Modify columns --> <!-- Modify columns -->
<tr> <tr class="even noclick">
<td class="tblHeaders" align="<?php echo $cell_align_right; ?>"> <th><?php echo $strModify; ?>:</th>
<b><?php echo $strModify; ?>:&nbsp;</b>
</td>
<?php <?php
$z = 0; $z = 0;
for ($x = 0; $x < $col; $x++) { for ($x = 0; $x < $col; $x++) {
@@ -529,7 +521,7 @@ for ($x = 0; $x < $col; $x++) {
$chk['or'] = ''; $chk['or'] = '';
} }
?> ?>
<td align="center" bgcolor="<?php echo $cfg['BgcolorTwo']; ?>"> <td align="center">
<b><?php echo $strOr; ?>:</b> <b><?php echo $strOr; ?>:</b>
<input type="radio" name="and_or_col[<?php echo $z; ?>]" value="or"<?php echo $chk['or']; ?> /> <input type="radio" name="and_or_col[<?php echo $z; ?>]" value="or"<?php echo $chk['or']; ?> />
&nbsp;&nbsp;<b><?php echo $strAnd; ?>:</b> &nbsp;&nbsp;<b><?php echo $strAnd; ?>:</b>
@@ -560,7 +552,7 @@ for ($x = 0; $x < $col; $x++) {
$chk['or'] = ''; $chk['or'] = '';
} }
?> ?>
<td align="center" bgcolor="<?php echo $cfg['BgcolorTwo']; ?>"> <td align="center">
<b><?php echo $strOr; ?>:</b> <b><?php echo $strOr; ?>:</b>
<input type="radio" name="and_or_col[<?php echo $z; ?>]" value="or"<?php echo $chk['or']; ?> /> <input type="radio" name="and_or_col[<?php echo $z; ?>]" value="or"<?php echo $chk['or']; ?> />
&nbsp;&nbsp;<b><?php echo $strAnd; ?>:</b> &nbsp;&nbsp;<b><?php echo $strAnd; ?>:</b>
@@ -580,15 +572,17 @@ for ($x = 0; $x < $col; $x++) {
</table> </table>
<!-- Other controls --> <!-- Other controls -->
<?php echo PMA_generate_common_hidden_inputs(); ?>
<table border="0" cellpadding="2" cellspacing="1">
<tr>
<td nowrap="nowrap"><input type="hidden" value="<?php echo htmlspecialchars($db); ?>" name="db" />
<input type="hidden" value="<?php echo $z; ?>" name="col_cnt" />
<?php <?php
$w--; $w--;
$url_params['db'] = $db;
$url_params['col_cnt'] = $z;
$url_params['rows'] = $w;
echo PMA_generate_common_hidden_inputs($url_params);
?> ?>
<input type="hidden" value="<?php echo $w; ?>" name="rows" /> <fieldset class="tblFooters">
<table border="0" cellpadding="2" cellspacing="1">
<tr>
<td nowrap="nowrap">
<?php echo $strAddDeleteRow; ?>: <?php echo $strAddDeleteRow; ?>:
<select size="1" name="add_row" style="vertical-align: middle"> <select size="1" name="add_row" style="vertical-align: middle">
<option value="-3">-3</option> <option value="-3">-3</option>
@@ -616,16 +610,13 @@ for ($x = 0; $x < $col; $x++) {
<!-- Generates a query --> <!-- Generates a query -->
<td><input type="submit" name="modify" value="<?php echo $strUpdateQuery; ?>" /></td> <td><input type="submit" name="modify" value="<?php echo $strUpdateQuery; ?>" /></td>
</tr> </tr>
</table><br /> </table>
</fieldset>
<table border="0" cellpadding="2" cellspacing="1"> <table>
<tr> <tr><td>
<td class="tblHeaders">&nbsp;<?php echo $strUseTables; ?>:&nbsp;</td> <fieldset>
<td width="20">&nbsp;</td> <legend><?php echo $strUseTables; ?></legend>
<td class="tblHeaders">&nbsp;<?php echo sprintf($strQueryOnDb, htmlspecialchars($db)); ?>&nbsp;</td>
</tr>
<tr>
<td bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
<?php <?php
$strTableListOptions = ''; $strTableListOptions = '';
$numTableListOptions = 0; $numTableListOptions = 0;
@@ -635,14 +626,23 @@ foreach ($tbl_names AS $key => $val) {
$numTableListOptions++; $numTableListOptions++;
} }
?> ?>
<select name="TableList[]" size="<?php echo ($numTableListOptions > 30) ? '15' : '7'; ?>" multiple="multiple" id="listTable"> <select name="TableList[]" multiple="multiple" id="listTable"
size="<?php echo ($numTableListOptions > 30) ? '15' : '7'; ?>">
<?php echo $strTableListOptions; ?> <?php echo $strTableListOptions; ?>
</select> </select>
</fieldset>
<fieldset class="tblFooters">
<input type="submit" name="modify" value="<?php echo $strUpdateQuery; ?>" />
</fieldset>
</td> </td>
<td>&nbsp;&nbsp;</td> <td width="20">&nbsp;</td>
<!-- Displays the current query --> <td>
<td bgcolor="<?php echo $cfg['BgcolorOne']; ?>"> <fieldset>
<textarea cols="30" rows="<?php echo ($numTableListOptions > 30) ? '15' : '7'; ?>" name="sql_query" dir="<?php echo $text_dir; ?>" id="textSqlquery"> <legend><?php echo sprintf($strQueryOnDb, PMA_getDbLink($db)); ?>
</legend>
<textarea cols="30" name="sql_query" id="textSqlquery"
rows="<?php echo ($numTableListOptions > 30) ? '15' : '7'; ?>"
dir="<?php echo $text_dir; ?>">
<?php <?php
// 1. SELECT // 1. SELECT
$last_select = 0; $last_select = 0;
@@ -1014,20 +1014,17 @@ if (!empty($qry_orderby)) {
?> ?>
</textarea> </textarea>
<input type="hidden" name="encoded_sql_query" value="<?php echo $encoded_qry; ?>" /> <input type="hidden" name="encoded_sql_query" value="<?php echo $encoded_qry; ?>" />
</fieldset>
<fieldset class="tblFooters">
<input type="submit" name="submit_sql" value="<?php echo $strRunQuery; ?>" />
</fieldset>
</td> </td>
</tr> </tr>
<tr>
<!-- Generates a query -->
<td align="right" class="tblHeaders"><input type="submit" name="modify" value="<?php echo $strUpdateQuery; ?>" /></td>
<td>&nbsp;</td>
<!-- Execute a query -->
<td align="right" class="tblHeaders"><input type="submit" name="submit_sql" value="<?php echo $strRunQuery; ?>" /></td>
</tr>
</table> </table>
</form> </form>
<?php <?php
/** /**
* Displays the footer * Displays the footer
*/ */
require_once('./libraries/footer.inc.php'); require_once './libraries/footer.inc.php';
?> ?>