Little code reorganistaion (RFE #957308), removed some remaining php3 compatibility code in SQL parser.
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2004-05-20 Michal Čihař <michal@cihar.com>
|
||||
* many files: Little code reorganistaion (RFE #957308), removed some
|
||||
remaining php3 compatibility code in SQL parser.
|
||||
|
||||
2004-05-20 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* pdf_schema.php: set contents page (first page)'s orientation
|
||||
to the same asked for the data dictionary
|
||||
|
@@ -153,7 +153,7 @@ if (isset($disp_row) && is_array($disp_row)) {
|
||||
$mysql_key_relrow = array();
|
||||
$mysql_val_relrow = array();
|
||||
$count = 0;
|
||||
foreach($disp_row AS $disp_row_key => $relrow) {
|
||||
foreach ($disp_row AS $disp_row_key => $relrow) {
|
||||
if ($foreign_display != FALSE) {
|
||||
$val = $relrow[$foreign_display];
|
||||
} else {
|
||||
|
@@ -224,7 +224,7 @@ button.mult_submit {
|
||||
|
||||
div.warning {
|
||||
border: 1px solid red;
|
||||
<?php if($cfg['ErrorIconic']) { ?>
|
||||
<?php if ($cfg['ErrorIconic']) { ?>
|
||||
background-image: url(../images/s_warn.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 10px 50%;
|
||||
|
@@ -183,7 +183,7 @@ if (!empty($cfg['UploadDir'])) {
|
||||
// showing UploadDir Error at the end of all option for SQL-Queries
|
||||
$strErrorUploadDir = ' <tr><td colspan="2"><img src="images/spacer.png" width="1" height="1" border="0" alt="" /></td></tr>' . "\n";
|
||||
$strErrorUploadDir.= ' <tr><td colspan="2" class="tblHeadError">';
|
||||
if($cfg['PropertiesIconic']){
|
||||
if ($cfg['PropertiesIconic']){
|
||||
$strErrorUploadDir.= '<img src="./images/s_error.png" border="0" width="16" height="16" hspace="2" align="absmiddle" />';
|
||||
}
|
||||
$strErrorUploadDir.= ' ' . $strError . '' . "\n";
|
||||
@@ -229,13 +229,13 @@ if ($cfg['Bookmark']['db'] && $cfg['Bookmark']['table']) {
|
||||
echo ' <b>' . $strBookmarkQuery . ':</b> ' . "\n";
|
||||
echo ' <select name="id_bookmark">' . "\n";
|
||||
echo ' <option value=""></option>' . "\n";
|
||||
foreach($bookmark_list AS $key => $value) {
|
||||
foreach ($bookmark_list AS $key => $value) {
|
||||
echo ' <option value="' . htmlspecialchars($value) . '">' . htmlspecialchars($key) . '</option>' . "\n";
|
||||
}
|
||||
echo ' </select>' . "\n";
|
||||
echo ' </td></tr><tr bgcolor="' . $cfg['BgcolorOne'] . '"><td colspan="2">';
|
||||
echo ' ' . $strVar . ' ';
|
||||
if($cfg['ReplaceHelpImg']){
|
||||
if ($cfg['ReplaceHelpImg']){
|
||||
echo '<a href="./Documentation.html#faqbookmark" target="documentation">'
|
||||
. '<img src="./images/b_help.png" border="0" width="11" height="11" align="absmiddle" alt="' . $strDocu . '" /></a>';
|
||||
}else{
|
||||
|
@@ -64,7 +64,7 @@ if (isset($cfg['docSQLDir']) && !empty($cfg['docSQLDir'])) {
|
||||
}
|
||||
|
||||
if (isset($lines) && is_array($lines) && count($lines) > 0) {
|
||||
foreach($lines AS $lkey => $line) {
|
||||
foreach ($lines AS $lkey => $line) {
|
||||
//echo '<p>' . $line . '</p>';
|
||||
$inf = explode('|',$line);
|
||||
if (!empty($inf[1]) && strlen(trim($inf[1])) > 0) {
|
||||
|
@@ -628,7 +628,7 @@ for ($x = 0; $x < $col; $x++) {
|
||||
<br />
|
||||
<select name="TableList[]" size="7" multiple="multiple">
|
||||
<?php
|
||||
foreach($tbl_names AS $key => $val) {
|
||||
foreach ($tbl_names AS $key => $val) {
|
||||
echo ' ';
|
||||
echo '<option value="' . htmlspecialchars($key) . '"' . $val . '>' . htmlspecialchars($key) . '</option>' . "\n";
|
||||
}
|
||||
@@ -729,7 +729,7 @@ if (isset($Field) && count($Field) > 0) {
|
||||
$fromclause = '';
|
||||
|
||||
// We only start this if we have fields, otherwise it would be dumb
|
||||
foreach($Field AS $value) {
|
||||
foreach ($Field AS $value) {
|
||||
$parts = explode('.', $value);
|
||||
if (!empty($parts[0]) && !empty($parts[1])) {
|
||||
$tab_raw = urldecode($parts[0]);
|
||||
@@ -781,7 +781,7 @@ if (isset($Field) && count($Field) > 0) {
|
||||
// the last db selected is not always the one where we need to work)
|
||||
PMA_DBI_select_db($db);
|
||||
|
||||
foreach($tab_all AS $tab) {
|
||||
foreach ($tab_all AS $tab) {
|
||||
$ind_rs = PMA_DBI_query('SHOW INDEX FROM ' . PMA_backquote($tab) . ';');
|
||||
while ($ind = PMA_DBI_fetch_assoc($ind_rs)) {
|
||||
$col1 = $tab . '.' . $ind['Column_name'];
|
||||
@@ -822,7 +822,7 @@ if (isset($Field) && count($Field) > 0) {
|
||||
// (that would mean that they were also found in the whereclauses
|
||||
// which would be great). if yes, we take only those
|
||||
if ($needsort == 1) {
|
||||
foreach($col_cand AS $col => $is_where) {
|
||||
foreach ($col_cand AS $col => $is_where) {
|
||||
$tab = explode('.', $col);
|
||||
$tab = $tab[0];
|
||||
if ($is_where == 'Y') {
|
||||
@@ -848,7 +848,7 @@ if (isset($Field) && count($Field) > 0) {
|
||||
if (count($col_cand) > 1) {
|
||||
// Of course we only want to check each table once
|
||||
$checked_tables = $col_cand;
|
||||
foreach($col_cand AS $tab) {
|
||||
foreach ($col_cand AS $tab) {
|
||||
if ($checked_tables[$tab] != 1 ) {
|
||||
$rows_qry = 'SELECT COUNT(1) AS anz '
|
||||
. 'FROM ' . PMA_backquote($tab);
|
||||
@@ -883,7 +883,7 @@ if (isset($Field) && count($Field) > 0) {
|
||||
*/
|
||||
function PMA_arrayShort($array, $key)
|
||||
{
|
||||
foreach($array AS $k => $v) {
|
||||
foreach ($array AS $k => $v) {
|
||||
if ($k != $key) {
|
||||
$reta[$k] = $v;
|
||||
}
|
||||
@@ -964,7 +964,7 @@ if (isset($Field) && count($Field) > 0) {
|
||||
$run++;
|
||||
if ($run > 5) {
|
||||
|
||||
foreach($tab_left AS $tab) {
|
||||
foreach ($tab_left AS $tab) {
|
||||
$emerg .= ', ' . $tab;
|
||||
$tab_left = PMA_arrayShort($tab_left, $tab);
|
||||
}
|
||||
|
@@ -272,7 +272,7 @@ else {
|
||||
$tables = $tables_temp;
|
||||
}
|
||||
|
||||
foreach($tables AS $keyname => $sts_data) {
|
||||
foreach ($tables AS $keyname => $sts_data) {
|
||||
$table = $sts_data['Name'];
|
||||
$table_encoded = urlencode($table);
|
||||
$table_name = htmlspecialchars($table);
|
||||
@@ -300,7 +300,7 @@ else {
|
||||
$click_mouse = ' onmousedown="document.getElementById(\'checkbox_tbl_' . $i . '\').checked = (document.getElementById(\'checkbox_tbl_' . $i . '\').checked ? false : true);" ';
|
||||
|
||||
$row_count++;
|
||||
if($num_columns > 0 && $num_tables > $num_columns && (($row_count % ($num_columns)) == 0)) {
|
||||
if ($num_columns > 0 && $num_tables > $num_columns && (($row_count % ($num_columns)) == 0)) {
|
||||
$bgcolor = $cfg['BgcolorTwo'];
|
||||
$row_count = 1;
|
||||
?>
|
||||
@@ -640,14 +640,14 @@ if ($num_tables > 0) {
|
||||
<table border="0" cellpadding="2" cellspacing="0">
|
||||
<tr><td nowrap="nowrap" colspan="3"><?php
|
||||
echo '<a href="db_printview.php?' . $url_query . '">';
|
||||
if($cfg['PropertiesIconic']){
|
||||
if ($cfg['PropertiesIconic']){
|
||||
echo '<img src="./images/b_print.png" border="0" width="16" height="16" hspace="2" align="absmiddle" />';
|
||||
}
|
||||
echo $strPrintView . '</a>';
|
||||
?>
|
||||
<?php
|
||||
echo '<a href="./db_datadict.php?' . $url_query . '">';
|
||||
if($cfg['PropertiesIconic']){
|
||||
if ($cfg['PropertiesIconic']){
|
||||
echo '<img src="./images/b_tblanalyse.png" border="0" width="16" height="16" hspace="2" align="absmiddle" />';
|
||||
}
|
||||
echo $strDataDict . '</a>';
|
||||
@@ -662,7 +662,7 @@ if ($num_tables > 0) {
|
||||
<tr>
|
||||
<td class="tblHeaders" colspan="3" nowrap="nowrap"><?php
|
||||
echo PMA_generate_common_hidden_inputs($db);
|
||||
if($cfg['PropertiesIconic']){ echo '<img src="images/b_newtbl.png" border="0" width="16" height="16" hspace="2" align="absmiddle" />'; }
|
||||
if ($cfg['PropertiesIconic']){ echo '<img src="images/b_newtbl.png" border="0" width="16" height="16" hspace="2" align="absmiddle" />'; }
|
||||
// if you want navigation:
|
||||
$strDBLink = '<a href="' . $GLOBALS['cfg']['DefaultTabDatabase'] . '?' . PMA_generate_common_url() . '&db=' . urlencode($GLOBALS['db']) . '">'
|
||||
. htmlspecialchars($GLOBALS['db']) . '</a>';
|
||||
@@ -698,7 +698,7 @@ if ($cfgRelation['commwork']) {
|
||||
|
||||
<tr>
|
||||
<td colspan="3" class="tblHeaders"><?php
|
||||
if($cfg['PropertiesIconic']){
|
||||
if ($cfg['PropertiesIconic']){
|
||||
echo '<img src="images/b_comment.png" border="0" width="16" height="16" hspace="2" align="absmiddle" />';
|
||||
}
|
||||
echo $strDBComment;
|
||||
@@ -718,7 +718,7 @@ if ($cfgRelation['commwork']) {
|
||||
<!-- Rename database -->
|
||||
<tr><td colspan="3"><img src="images/spacer.png" width="1" height="1" border="0" alt="" /></td></tr>
|
||||
<tr><td colspan="3" class="tblHeaders"><?php
|
||||
if($cfg['PropertiesIconic']){
|
||||
if ($cfg['PropertiesIconic']){
|
||||
echo '<img src="images/b_edit.png" border="0" width="16" height="16" hspace="2" align="absmiddle" />';
|
||||
}
|
||||
echo $strDBRename.': ';
|
||||
@@ -740,7 +740,7 @@ if (PMA_MYSQL_INT_VERSION >= 40101) {
|
||||
echo ' <!-- Change database charset -->' . "\n"
|
||||
. ' <tr><td colspan="3"><img src="images/spacer.png" width="1" height="1" border="0" alt="" /></td></tr>' . "\n"
|
||||
. ' <tr><td colspan="3" class="tblHeaders">';
|
||||
if($cfg['PropertiesIconic']){
|
||||
if ($cfg['PropertiesIconic']){
|
||||
echo '<img src="./images/s_asci.png" border="0" width="16" height="16" hspace="2" align="absmiddle" />';
|
||||
}
|
||||
echo ' <label for="select_db_collation">' . $strCollation . '</label>: ' . "\n"
|
||||
@@ -760,7 +760,7 @@ if ($num_tables > 0
|
||||
&& !$cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == FALSE) {
|
||||
echo ' <tr><td colspan="3"><img src="images/spacer.png" width="1" height="1" border="0" alt="" /></td></tr>' . "\n"
|
||||
. ' <tr><td colspan="3" class="tblHeadError">';
|
||||
if($cfg['PropertiesIconic']){
|
||||
if ($cfg['PropertiesIconic']){
|
||||
echo '<img src="./images/s_error.png" border="0" width="16" height="16" hspace="2" align="absmiddle" />';
|
||||
}
|
||||
echo ' ' . $strError . '' . "\n";
|
||||
@@ -789,13 +789,13 @@ if ($cfgRelation['pdfwork'] && $num_tables > 0) {
|
||||
<!-- Work on PDF Pages -->
|
||||
<tr><td colspan="3" class="tblHeaders">
|
||||
<?php
|
||||
if($cfg['PropertiesIconic']){
|
||||
if ($cfg['PropertiesIconic']){
|
||||
echo '<img src="./images/b_pdfdoc.png" border="0" width="16" height="16" hspace="2" align="absmiddle" />';
|
||||
}
|
||||
?>PDF</td></tr><tr bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
|
||||
<td colspan="3"><?php
|
||||
echo '<a href="pdf_pages.php?' . $takeaway . '">';
|
||||
if($cfg['PropertiesIconic']){
|
||||
if ($cfg['PropertiesIconic']){
|
||||
echo '<img src="./images/b_edit.png" border="0" width="16" height="16" hspace="2" align="absmiddle" />';
|
||||
}
|
||||
echo ''. $strEditPDFPages . '</a>';
|
||||
@@ -815,7 +815,7 @@ if ($cfgRelation['pdfwork'] && $num_tables > 0) {
|
||||
<tr bgcolor="<?php echo $cfg['BgcolorTwo']; ?>"><td colspan="3">
|
||||
<?php
|
||||
echo PMA_generate_common_hidden_inputs($db);
|
||||
if($cfg['PropertiesIconic']){
|
||||
if ($cfg['PropertiesIconic']){
|
||||
echo '<img src="./images/b_view.png" border="0" width="16" height="16" hspace="2" align="absmiddle" />';
|
||||
}
|
||||
?>
|
||||
@@ -865,7 +865,7 @@ if ($cfgRelation['pdfwork'] && $num_tables > 0) {
|
||||
<?php echo $strPaperSize; ?>
|
||||
<select name="paper">
|
||||
<?php
|
||||
foreach($cfg['PDFPageSizes'] AS $key => $val) {
|
||||
foreach ($cfg['PDFPageSizes'] AS $key => $val) {
|
||||
echo '<option value="' . $val . '"';
|
||||
if ($val == $cfg['PDFDefaultPageSize']) {
|
||||
echo ' selected="selected"';
|
||||
@@ -894,7 +894,7 @@ if ($num_tables > 0
|
||||
<!-- import docSQL files -->
|
||||
<tr bgcolor="<?php echo $cfg['BgcolorOne']; ?>"><td colspan="3"><?php
|
||||
echo '<a href="db_details_importdocsql.php?' . $takeaway . '">';
|
||||
if($cfg['PropertiesIconic']){
|
||||
if ($cfg['PropertiesIconic']){
|
||||
echo '<img src="./images/b_docsql.png" border="0" width="16" height="16" hspace="2" align="absmiddle" />';
|
||||
}
|
||||
echo $strImportDocSQL . '</a>';
|
||||
|
@@ -119,7 +119,7 @@ else {
|
||||
</tr>
|
||||
<?php
|
||||
$i = $sum_entries = $sum_size = 0;
|
||||
foreach($tables AS $keyname => $sts_data) {
|
||||
foreach ($tables AS $keyname => $sts_data) {
|
||||
$table = $sts_data['Name'];
|
||||
$bgcolor = ($i++ % 2) ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo'];
|
||||
echo "\n";
|
||||
|
@@ -366,7 +366,7 @@ if ($export_type == 'server') {
|
||||
$tmp_select = '|' . $tmp_select . '|';
|
||||
}
|
||||
// Walk over databases
|
||||
foreach($dblist AS $current_db) {
|
||||
foreach ($dblist AS $current_db) {
|
||||
if ((isset($tmp_select) && strpos(' ' . $tmp_select, '|' . $current_db . '|'))
|
||||
|| !isset($tmp_select)) {
|
||||
if (!PMA_exportDBHeader($current_db))
|
||||
|
@@ -184,14 +184,14 @@ if (empty($GLOBALS['is_header_sent'])) {
|
||||
)
|
||||
);
|
||||
if (isset($GLOBALS['db'])) {
|
||||
if($cfg['PropertiesIconic']){
|
||||
if ($cfg['PropertiesIconic']){
|
||||
$host_icon_img='<img src="./images/s_host.png" width="16" height="16" border="0" hspace="2" align="absmiddle" />';
|
||||
}
|
||||
echo '<td nowrap="nowrap">Server: </td>'
|
||||
. '<td nowrap="nowrap"><b>'
|
||||
. '<a href="' . $GLOBALS['cfg']['DefaultTabServer'] . $header_url_qry . '">' . $host_icon_img . htmlspecialchars($server_info) . '</a>'
|
||||
. '</b></td>';
|
||||
if($cfg['PropertiesIconic']){
|
||||
if ($cfg['PropertiesIconic']){
|
||||
$db_icon_img='<img src="./images/s_db.png" width="16" height="16" border="0" hspace="2" align="absmiddle" />';
|
||||
}
|
||||
echo '<td nowrap="nowrap"> > </td>';
|
||||
@@ -201,7 +201,7 @@ if (empty($GLOBALS['is_header_sent'])) {
|
||||
. $db_icon_img . htmlspecialchars($GLOBALS['db']) . '</a>'
|
||||
. '</b></td>';
|
||||
if (!empty($GLOBALS['table'])) {
|
||||
if($cfg['PropertiesIconic']){
|
||||
if ($cfg['PropertiesIconic']){
|
||||
$tbl_icon_img='<img src="./images/s_tbl.png" width="16" height="16" border="0" hspace="2" align="absmiddle" />';
|
||||
}
|
||||
echo '<td nowrap="nowrap"> > </td>';
|
||||
@@ -213,7 +213,7 @@ if (empty($GLOBALS['is_header_sent'])) {
|
||||
}
|
||||
|
||||
} else {
|
||||
if($cfg['PropertiesIconic']){
|
||||
if ($cfg['PropertiesIconic']){
|
||||
$host_icon_img='<img src="./images/s_host.png" width="16" height="16" border="0" hspace="2" align="absmiddle" />';
|
||||
}
|
||||
echo '<tr><td nowrap="nowrap">Server: </td>'
|
||||
|
18
left.php
18
left.php
@@ -114,7 +114,7 @@ function PMA_nestedSetHeader($baseid, $tablestack, $keyhistory, $indent, $indent
|
||||
$indent++;
|
||||
}
|
||||
|
||||
foreach($tablestack AS $key => $val) {
|
||||
foreach ($tablestack AS $key => $val) {
|
||||
if ($key != 'pma_name' && $key != 'pma_list_item') {
|
||||
if ($headerOut) {
|
||||
PMA_nestedSetHeaderParent($baseid, $key, $keyhistory, $indent, $indent_level, $val);
|
||||
@@ -164,11 +164,11 @@ function PMA_nestedSet($baseid, $tablestack, $key = '__protected__', $keyhistory
|
||||
$on_mouse = (($GLOBALS['cfg']['LeftPointerColor'] == '') ? '' : ' onmouseover="if (isDOM || isIE4) {hilightBase(\'el' . $keyhistory . $key . '\', \'' . $GLOBALS['cfg']['LeftPointerColor'] . '\')}" onmouseout="if (isDOM || isIE4) {hilightBase(\'el' . $keyhistory . $key . '\', \'' . $GLOBALS['cfg']['LeftBgColor'] . '\')}"');
|
||||
|
||||
$loops = 0;
|
||||
foreach($tablestack['pma_name'] AS $tkey => $tval) {
|
||||
foreach ($tablestack['pma_name'] AS $tkey => $tval) {
|
||||
|
||||
echo PMA_indent($indent * 5) . '<img src="images/spacer.gif" border="0" width="' . (($indent+$extra_indent) * $indent_level) . '" height="9" alt="" />';
|
||||
$items = explode("\n", $tablestack['pma_list_item'][$tkey]);
|
||||
foreach($items AS $ikey => $ival) {
|
||||
foreach ($items AS $ikey => $ival) {
|
||||
echo "\n";
|
||||
echo PMA_indent(($indent * 5)) . $ival;
|
||||
}
|
||||
@@ -345,7 +345,7 @@ if ($cfg['LeftDisplayServers']) {
|
||||
<?php
|
||||
}
|
||||
|
||||
foreach($cfg['Servers'] AS $key => $val) {
|
||||
foreach ($cfg['Servers'] AS $key => $val) {
|
||||
if (!empty($val['host'])) {
|
||||
|
||||
$selected = 0;
|
||||
@@ -548,7 +548,7 @@ if ($num_dbs > 1) {
|
||||
natcasesort($table_array);
|
||||
}
|
||||
|
||||
foreach($table_array as $table => $table_sortkey) {
|
||||
foreach ($table_array as $table => $table_sortkey) {
|
||||
$alias = (!empty($tooltip_name) && isset($tooltip_name[$table]))
|
||||
? htmlspecialchars($tooltip_name[$table])
|
||||
: '';
|
||||
@@ -574,7 +574,7 @@ if ($num_dbs > 1) {
|
||||
if (!empty($cfg['LeftFrameTableSeparator'])) {
|
||||
$_table = explode($cfg['LeftFrameTableSeparator'], str_replace('\'', '\\\'', $tablename));
|
||||
if (is_array($_table)) {
|
||||
foreach($_table AS $key => $val) {
|
||||
foreach ($_table AS $key => $val) {
|
||||
if ($val == '') {
|
||||
$_table[$key] = '__protected__';
|
||||
}
|
||||
@@ -644,7 +644,7 @@ if ($num_dbs > 1) {
|
||||
natsort($table_title);
|
||||
}
|
||||
|
||||
foreach($table_title as $each_key => $each_val) {
|
||||
foreach ($table_title as $each_key => $each_val) {
|
||||
$table_list .= ' ' . $table_array[$each_key];
|
||||
}
|
||||
} else {
|
||||
@@ -801,7 +801,7 @@ else if ($num_dbs == 1) {
|
||||
natcasesort($table_array);
|
||||
}
|
||||
|
||||
foreach($table_array as $table => $table_sortkey) {
|
||||
foreach ($table_array as $table => $table_sortkey) {
|
||||
$alias = (!empty($tooltip_name) && isset($tooltip_name[$table]))
|
||||
? htmlspecialchars($tooltip_name[$table])
|
||||
: '';
|
||||
@@ -836,7 +836,7 @@ else if ($num_dbs == 1) {
|
||||
if (!empty($cfg['LeftFrameTableSeparator'])) {
|
||||
$_table = explode($cfg['LeftFrameTableSeparator'], str_replace('\'', '\\\'', $tablename));
|
||||
if (is_array($_table)) {
|
||||
foreach($_table AS $key => $val) {
|
||||
foreach ($_table AS $key => $val) {
|
||||
if ($val == '') {
|
||||
$_table[$key] = '__protected__';
|
||||
}
|
||||
|
@@ -234,7 +234,7 @@ if (top != self) {
|
||||
echo "\n";
|
||||
|
||||
uasort($available_languages, 'PMA_cookie_cmp');
|
||||
foreach($available_languages AS $id => $tmplang) {
|
||||
foreach ($available_languages AS $id => $tmplang) {
|
||||
$lang_name = ucfirst(substr(strstr($tmplang[0], '|'), 1));
|
||||
if ($lang == $id) {
|
||||
$selected = ' selected="selected"';
|
||||
@@ -311,7 +311,7 @@ if (top != self) {
|
||||
<?php
|
||||
echo "\n";
|
||||
// Displays the MySQL servers choice
|
||||
foreach($cfg['Servers'] AS $key => $val) {
|
||||
foreach ($cfg['Servers'] AS $key => $val) {
|
||||
if (!empty($val['host']) || $val['auth_type'] == 'arbitrary') {
|
||||
echo ' <option value="' . $key . '"';
|
||||
if (!empty($server) && ($server == $key)) {
|
||||
|
@@ -144,7 +144,7 @@ function PMA_convert_display_charset($what) {
|
||||
}
|
||||
else if (is_array($what)) {
|
||||
$result = array();
|
||||
foreach($what AS $key => $val) {
|
||||
foreach ($what AS $key => $val) {
|
||||
if (is_string($val) || is_array($val)) {
|
||||
if (is_string($key)) {
|
||||
$result[PMA_convert_display_charset($key)] = PMA_convert_display_charset($val);
|
||||
|
@@ -436,28 +436,28 @@ if ($is_minimum_common == FALSE) {
|
||||
if (!empty($GLOBALS['cfg']['MySQLManualType'])) {
|
||||
switch ($GLOBALS['cfg']['MySQLManualType']) {
|
||||
case 'old':
|
||||
if($GLOBALS['cfg']['ReplaceHelpImg']){
|
||||
if ($GLOBALS['cfg']['ReplaceHelpImg']){
|
||||
return '<a href="' . $GLOBALS['cfg']['MySQLManualBase'] . '/' . $link[0] . '/' . $link[1] . '/' . $link . '.html" target="mysql_doc"><img src="images/b_help.png" width="11" height="11" border="0" alt="' . $GLOBALS['strDocu'] . '" hspace="2" align="absmiddle"></a>'; }else{
|
||||
return '[<a href="' . $GLOBALS['cfg']['MySQLManualBase'] . '/' . $link[0] . '/' . $link[1] . '/' . $link . '.html" target="mysql_doc">' . $GLOBALS['strDocu'] . '</a>]'; }
|
||||
case 'chapters':
|
||||
if($GLOBALS['cfg']['ReplaceHelpImg']){
|
||||
if ($GLOBALS['cfg']['ReplaceHelpImg']){
|
||||
return '<a href="' . $GLOBALS['cfg']['MySQLManualBase'] . '/manual_' . $chapter . '.html#' . $link . '" target="mysql_doc"><img src="images/b_help.png" width="11" height="11" border="0" alt="' . $GLOBALS['strDocu'] . '" hspace="2" align="absmiddle"></a>'; }else{
|
||||
return '[<a href="' . $GLOBALS['cfg']['MySQLManualBase'] . '/manual_' . $chapter . '.html#' . $link . '" target="mysql_doc">' . $GLOBALS['strDocu'] . '</a>]'; }
|
||||
case 'big':
|
||||
if($GLOBALS['cfg']['ReplaceHelpImg']){
|
||||
if ($GLOBALS['cfg']['ReplaceHelpImg']){
|
||||
return '<a href="' . $GLOBALS['cfg']['MySQLManualBase'] . '#' . $link . '" target="mysql_doc"><img src="images/b_help.png" width="11" height="11" border="0" alt="' . $GLOBALS['strDocu'] . '" hspace="2" align="absmiddle"></a>'; }else{
|
||||
return '[<a href="' . $GLOBALS['cfg']['MySQLManualBase'] . '#' . $link . '" target="mysql_doc">' . $GLOBALS['strDocu'] . '</a>]'; }
|
||||
case 'none':
|
||||
return '';
|
||||
case 'searchable':
|
||||
default:
|
||||
if($GLOBALS['cfg']['ReplaceHelpImg']){
|
||||
if ($GLOBALS['cfg']['ReplaceHelpImg']){
|
||||
return '<a href="' . $GLOBALS['cfg']['MySQLManualBase'] . '/' . $link . '.html" target="mysql_doc"><img src="images/b_help.png" width="11" height="11" border="0" alt="' . $GLOBALS['strDocu'] . '" hspace="2" align="absmiddle"></a>'; }else{
|
||||
return '[<a href="' . $GLOBALS['cfg']['MySQLManualBase'] . '/' . $link . '.html" target="mysql_doc">' . $GLOBALS['strDocu'] . '</a>]'; }
|
||||
}
|
||||
} else {
|
||||
// no Type defined, show the old one
|
||||
if($GLOBALS['cfg']['ReplaceHelpImg']){
|
||||
if ($GLOBALS['cfg']['ReplaceHelpImg']){
|
||||
return '<a href="' . $GLOBALS['cfg']['MySQLManualBase'] . '/' . $link[0] . '/' . $link[1] . '/' . $link . '.html" target="mysql_doc"><img src="images/b_help.png" width="11" height="11" border="0" alt="' . $GLOBALS['strDocu'] . '" hspace="2" align="absmiddle"></a>'; }else{
|
||||
return '[<a href="' . $GLOBALS['cfg']['MySQLManualBase'] . '/' . $link[0] . '/' . $link[1] . '/' . $link . '.html" target="mysql_doc">' . $GLOBALS['strDocu'] . '</a>]'; }
|
||||
}
|
||||
@@ -465,7 +465,7 @@ if ($is_minimum_common == FALSE) {
|
||||
// no URL defined
|
||||
if (!empty($GLOBALS['cfg']['ManualBaseShort'])) {
|
||||
// the old configuration
|
||||
if($GLOBALS['cfg']['ReplaceHelpImg']){
|
||||
if ($GLOBALS['cfg']['ReplaceHelpImg']){
|
||||
return '<a href="' . $GLOBALS['cfg']['MySQLManualBase'] . '/' . $link[0] . '/' . $link[1] . '/' . $link . '.html" target="mysql_doc"><img src="images/b_help.png" width="11" height="11" border="0" alt="' . $GLOBALS['strDocu'] . '" hspace="2" align="absmiddle"></a>'; }else{
|
||||
return '[<a href="' . $GLOBALS['cfg']['MySQLManualBase'] . '/' . $link[0] . '/' . $link[1] . '/' . $link . '.html" target="mysql_doc">' . $GLOBALS['strDocu'] . '</a>]'; }
|
||||
} else {
|
||||
@@ -685,7 +685,7 @@ function PMA_safe_db_list($only_db_check, $dbh, $dblist_cnt, $rs, $userlink, $cf
|
||||
$dblist[] = $uva_db;
|
||||
$uva_mydbs[$uva_db] = 0;
|
||||
} else if (!isset($dblist[$uva_db])) {
|
||||
foreach($uva_mydbs AS $uva_matchpattern => $uva_value) {
|
||||
foreach ($uva_mydbs AS $uva_matchpattern => $uva_value) {
|
||||
// loic1: fixed bad regexp
|
||||
// TODO: db names may contain characters
|
||||
// that are regexp instructions
|
||||
@@ -912,7 +912,7 @@ if ($is_minimum_common == FALSE) {
|
||||
/**
|
||||
* Gets the valid servers list and parameters
|
||||
*/
|
||||
foreach($cfg['Servers'] AS $key => $val) {
|
||||
foreach ($cfg['Servers'] AS $key => $val) {
|
||||
// Don't use servers with no hostname
|
||||
if ( ($val['connect_type'] == 'tcp') && empty($val['host'])) {
|
||||
unset($cfg['Servers'][$key]);
|
||||
@@ -1070,7 +1070,7 @@ if ($is_minimum_common == FALSE) {
|
||||
if ($dblist[$i] == '*' && $dblist_asterisk_bool == FALSE) {
|
||||
$dblist_asterisk_bool = TRUE;
|
||||
$dblist_full = PMA_safe_db_list(FALSE, $dbh, FALSE, $rs, $userlink, $cfg, $dblist);
|
||||
foreach($dblist_full AS $dbl_key => $dbl_val) {
|
||||
foreach ($dblist_full AS $dbl_key => $dbl_val) {
|
||||
if (!in_array($dbl_val, $dblist)) {
|
||||
$true_dblist[] = $dbl_val;
|
||||
}
|
||||
@@ -1228,7 +1228,7 @@ if ($is_minimum_common == FALSE) {
|
||||
|
||||
if (is_array($a_name)) {
|
||||
$result = array();
|
||||
foreach($a_name AS $key => $val) {
|
||||
foreach ($a_name AS $key => $val) {
|
||||
$result[$key] = '`' . $val . '`';
|
||||
}
|
||||
return $result;
|
||||
@@ -1516,7 +1516,7 @@ if (typeof(document.getElementById) != 'undefined'
|
||||
} else {
|
||||
$explain_link = '';
|
||||
}
|
||||
if(!empty($explain_link)) {
|
||||
if (!empty($explain_link)) {
|
||||
$explain_link .= '</a>]';
|
||||
}
|
||||
} else {
|
||||
@@ -1800,7 +1800,7 @@ if (typeof(document.getElementById) != 'undefined'
|
||||
$link_or_button = ' <form action="'
|
||||
. $edit_url_parts['path']
|
||||
. '" method="post">' . "\n";
|
||||
foreach($query_parts AS $query_pair) {
|
||||
foreach ($query_parts AS $query_pair) {
|
||||
list($eachvar, $eachval) = explode('=', $query_pair);
|
||||
$link_or_button .= ' <input type="hidden" name="' . str_replace('amp;', '', $eachvar) . '" value="' . htmlspecialchars(urldecode($eachval)) . '" />' . "\n";
|
||||
} // end while
|
||||
@@ -1910,7 +1910,7 @@ if (typeof(document.getElementById) != 'undefined'
|
||||
$found_error = FALSE;
|
||||
$error_message = '';
|
||||
|
||||
foreach($params AS $param) {
|
||||
foreach ($params AS $param) {
|
||||
if (!isset($GLOBALS[$param])) {
|
||||
$error_message .= $reported_script_name . ': Missing ' . $param . '<br />';
|
||||
$found_error = TRUE;
|
||||
@@ -1986,7 +1986,7 @@ if (typeof(document.getElementById) != 'undefined'
|
||||
// do not use an alias in a condition
|
||||
$column_for_condition = $meta->name;
|
||||
if (isset($analyzed_sql[0]['select_expr']) && is_array($analyzed_sql[0]['select_expr'])) {
|
||||
foreach($analyzed_sql[0]['select_expr'] AS $select_expr_position => $select_expr) {
|
||||
foreach ($analyzed_sql[0]['select_expr'] AS $select_expr_position => $select_expr) {
|
||||
$alias = $analyzed_sql[0]['select_expr'][$select_expr_position]['alias'];
|
||||
if (!empty($alias)) {
|
||||
$true_column = $analyzed_sql[0]['select_expr'][$select_expr_position]['column'];
|
||||
|
@@ -22,14 +22,14 @@
|
||||
*/
|
||||
function obj2xml($v, $indent = '') {
|
||||
$attr = '';
|
||||
foreach($v AS $key => $val) {
|
||||
foreach ($v AS $key => $val) {
|
||||
if (is_string($key) && ($key == '__attr')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check for __attr
|
||||
if (is_object($val->__attr)) {
|
||||
foreach($val->__attr AS $key2 => $val2) {
|
||||
foreach ($val->__attr AS $key2 => $val2) {
|
||||
$attr .= " $key2=\"$val2\"";
|
||||
}
|
||||
} else {
|
||||
|
@@ -34,7 +34,7 @@ if (isset($GLOBALS['DBG']) && $GLOBALS['DBG']
|
||||
'<td>' . $GLOBALS['strDBGContext'] . '</td>' . "\n" .
|
||||
'</tr></thead>' . "\n" .
|
||||
'<tbody style="vertical-align: top">' . "\n";
|
||||
foreach($dbg_prof_results['line_no'] AS $idx => $line_no) {
|
||||
foreach ($dbg_prof_results['line_no'] AS $idx => $line_no) {
|
||||
$mod_no = $dbg_prof_results['mod_no'][$idx];
|
||||
dbg_get_module_name($mod_no, &$mod_name);
|
||||
|
||||
@@ -64,7 +64,7 @@ if (isset($GLOBALS['DBG']) && $GLOBALS['DBG']
|
||||
if (($idx & 1) == 0)
|
||||
$bk = "#e0e0e0";
|
||||
|
||||
if($time_avg_hit > $GLOBALS['cfg']['DBG']['profile']['threshold'] ) {
|
||||
if ($time_avg_hit > $GLOBALS['cfg']['DBG']['profile']['threshold'] ) {
|
||||
echo '<tr style="background:' . $bk . '">' .
|
||||
'<td>' . $mod_name . '</td>' .
|
||||
'<td>' . $line_no . '</td>' .
|
||||
|
@@ -149,7 +149,7 @@ function PMA_mysql_fetch_array($result, $type = FALSE) {
|
||||
$ret = array();
|
||||
$num = mysql_num_fields($result);
|
||||
$i = 0;
|
||||
for($i = 0; $i < $num; $i++) {
|
||||
for ($i = 0; $i < $num; $i++) {
|
||||
$name = mysql_field_name($result, $i);
|
||||
$flags = mysql_field_flags($result, $i);
|
||||
/* Field is BINARY (either marked manually, or it is BLOB) => do not convert it */
|
||||
|
@@ -135,7 +135,7 @@ function PMA_mysqli_fetch_array($result, $type = FALSE) {
|
||||
$num = mysqli_num_fields($result);
|
||||
$fields = mysqli_fetch_fields($result);
|
||||
$i = 0;
|
||||
for($i = 0; $i < $num; $i++) {
|
||||
for ($i = 0; $i < $num; $i++) {
|
||||
if (!$meta) {
|
||||
/* No meta information available -> we guess that it should be converted */
|
||||
if (isset($data[$i])) $ret[$i] = PMA_convert_display_charset($data[$i]);
|
||||
@@ -255,7 +255,7 @@ function PMA_DBI_get_fields_meta($result) {
|
||||
$typeAr[MYSQLI_TYPE_GEOMETRY] = 'unknown';
|
||||
|
||||
$fields = mysqli_fetch_fields($result);
|
||||
foreach($fields as $k => $field) {
|
||||
foreach ($fields as $k => $field) {
|
||||
$fields[$k]->type = $typeAr[$fields[$k]->type];
|
||||
$fields[$k]->flags = PMA_DBI_field_flags($result, $k);
|
||||
|
||||
|
@@ -101,22 +101,22 @@ if (isset($sql_query)) {
|
||||
|
||||
<?php if (!$hide_sql) { ?>
|
||||
<!-- SQL -->
|
||||
<input type="radio" name="what" value="sql" id="radio_dump_sql" onclick="if(this.checked) { hide_them_all(); getElement('sql_options').style.display = 'block'; }; return true" <?php PMA_exportIsActive('format', 'sql'); ?> />
|
||||
<input type="radio" name="what" value="sql" id="radio_dump_sql" onclick="if (this.checked) { hide_them_all(); getElement('sql_options').style.display = 'block'; }; return true" <?php PMA_exportIsActive('format', 'sql'); ?> />
|
||||
<label for="radio_dump_sql"><?php echo $strSQL; ?></label>
|
||||
<br /><br />
|
||||
<?php } ?>
|
||||
|
||||
<!-- LaTeX table -->
|
||||
<input type="radio" name="what" value="latex" id="radio_dump_latex" onclick="if(this.checked) { hide_them_all(); getElement('latex_options').style.display = 'block'; }; return true" <?php PMA_exportIsActive('format', 'latex'); ?> />
|
||||
<input type="radio" name="what" value="latex" id="radio_dump_latex" onclick="if (this.checked) { hide_them_all(); getElement('latex_options').style.display = 'block'; }; return true" <?php PMA_exportIsActive('format', 'latex'); ?> />
|
||||
<label for="radio_dump_latex"><?php echo $strLaTeX; ?></label>
|
||||
<br /><br />
|
||||
|
||||
<!-- Excel CSV -->
|
||||
<input type="radio" name="what" value="excel" id="radio_dump_excel" onclick="if(this.checked) { hide_them_all(); getElement('excel_options').style.display = 'block'; }; return true" <?php PMA_exportIsActive('format', 'excel'); ?> />
|
||||
<input type="radio" name="what" value="excel" id="radio_dump_excel" onclick="if (this.checked) { hide_them_all(); getElement('excel_options').style.display = 'block'; }; return true" <?php PMA_exportIsActive('format', 'excel'); ?> />
|
||||
<label for="radio_dump_excel"><?php echo $strStrucExcelCSV; ?></label>
|
||||
<br /><br />
|
||||
<!-- General CSV -->
|
||||
<input type="radio" name="what" value="csv" id="radio_dump_csv" onclick="if(this.checked) { hide_them_all(); getElement('csv_options').style.display = 'block'; }; return true" <?php PMA_exportIsActive('format', 'csv'); ?> />
|
||||
<input type="radio" name="what" value="csv" id="radio_dump_csv" onclick="if (this.checked) { hide_them_all(); getElement('csv_options').style.display = 'block'; }; return true" <?php PMA_exportIsActive('format', 'csv'); ?> />
|
||||
<label for="radio_dump_csv"><?php echo $strStrucCSV;?></label>
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ if (isset($sql_query)) {
|
||||
<br /><br />
|
||||
|
||||
<!-- XML -->
|
||||
<input type="radio" name="what" value="xml" id="radio_dump_xml" onclick="if(this.checked) { hide_them_all(); getElement('none_options').style.display = 'block'; }; return true" <?php PMA_exportIsActive('format', 'xml'); ?> />
|
||||
<input type="radio" name="what" value="xml" id="radio_dump_xml" onclick="if (this.checked) { hide_them_all(); getElement('none_options').style.display = 'block'; }; return true" <?php PMA_exportIsActive('format', 'xml'); ?> />
|
||||
<label for="radio_dump_xml"><?php echo $strXML; ?></label>
|
||||
<?php } ?>
|
||||
</fieldset>
|
||||
@@ -159,7 +159,7 @@ if ($export_type == 'server') {
|
||||
<!-- For structure -->
|
||||
<fieldset>
|
||||
<legend>
|
||||
<input type="checkbox" name="sql_structure" value="structure" id="checkbox_sql_structure" <?php PMA_exportCheckboxCheck('sql_structure'); ?> onclick="if(!this.checked && !getElement('checkbox_sql_data').checked) return false; else return true;" />
|
||||
<input type="checkbox" name="sql_structure" value="structure" id="checkbox_sql_structure" <?php PMA_exportCheckboxCheck('sql_structure'); ?> onclick="if (!this.checked && !getElement('checkbox_sql_data').checked) return false; else return true;" />
|
||||
<label for="checkbox_sql_structure"><?php echo $strStructure; ?></label><br />
|
||||
</legend>
|
||||
|
||||
@@ -207,7 +207,7 @@ if ($cfgRelation['mimework']) {
|
||||
<!-- For data -->
|
||||
<fieldset>
|
||||
<legend>
|
||||
<input type="checkbox" name="sql_data" value="data" id="checkbox_sql_data" <?php PMA_exportCheckboxCheck('sql_data'); ?> onclick="if(!this.checked && (!getElement('checkbox_sql_structure') || !getElement('checkbox_sql_structure').checked)) return false; else return true;" />
|
||||
<input type="checkbox" name="sql_data" value="data" id="checkbox_sql_data" <?php PMA_exportCheckboxCheck('sql_data'); ?> onclick="if (!this.checked && (!getElement('checkbox_sql_structure') || !getElement('checkbox_sql_structure').checked)) return false; else return true;" />
|
||||
<label for="checkbox_sql_data"><?php echo $strData; ?></label><br />
|
||||
</legend>
|
||||
<input type="checkbox" name="showcolumns" value="yes" id="checkbox_dump_showcolumns" <?php PMA_exportCheckboxCheck('sql_columns'); ?> />
|
||||
@@ -245,7 +245,7 @@ if ($cfgRelation['mimework']) {
|
||||
<!-- For structure -->
|
||||
<fieldset>
|
||||
<legend>
|
||||
<input type="checkbox" name="latex_structure" value="structure" id="checkbox_latex_structure" <?php PMA_exportCheckboxCheck('latex_structure'); ?> onclick="if(!this.checked && !getElement('checkbox_latex_data').checked) return false; else return true;" />
|
||||
<input type="checkbox" name="latex_structure" value="structure" id="checkbox_latex_structure" <?php PMA_exportCheckboxCheck('latex_structure'); ?> onclick="if (!this.checked && !getElement('checkbox_latex_data').checked) return false; else return true;" />
|
||||
<label for="checkbox_latex_structure"><?php echo $strStructure; ?></label><br />
|
||||
</legend>
|
||||
<table border="0" cellspacing="1" cellpadding="0">
|
||||
@@ -302,7 +302,7 @@ if ($cfgRelation['mimework']) {
|
||||
<!-- For data -->
|
||||
<fieldset>
|
||||
<legend>
|
||||
<input type="checkbox" name="latex_data" value="data" id="checkbox_latex_data" <?php PMA_exportCheckboxCheck('latex_data'); ?> onclick="if(!this.checked && (!getElement('checkbox_latex_structure') || !getElement('checkbox_latex_structure').checked)) return false; else return true;" />
|
||||
<input type="checkbox" name="latex_data" value="data" id="checkbox_latex_data" <?php PMA_exportCheckboxCheck('latex_data'); ?> onclick="if (!this.checked && (!getElement('checkbox_latex_structure') || !getElement('checkbox_latex_structure').checked)) return false; else return true;" />
|
||||
<label for="checkbox_latex_data"><?php echo $strData; ?></label><br />
|
||||
</legend>
|
||||
<input type="checkbox" name="latex_showcolumns" value="yes" id="ch_latex_showcolumns" <?php PMA_exportCheckboxCheck('latex_columns'); ?> />
|
||||
|
@@ -548,10 +548,10 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
|
||||
echo $GLOBALS['strSortByKey'] . ': <select name="sql_query">' . "\n";
|
||||
$used_index = false;
|
||||
$local_order = (isset($sort_expression) ? $sort_expression : '');
|
||||
foreach($indexes_data AS $key => $val) {
|
||||
foreach ($indexes_data AS $key => $val) {
|
||||
$asc_sort = '';
|
||||
$desc_sort = '';
|
||||
foreach($val AS $key2 => $val2) {
|
||||
foreach ($val AS $key2 => $val2) {
|
||||
$asc_sort .= PMA_backquote($val2['Column_name']) . ' ASC , ';
|
||||
$desc_sort .= PMA_backquote($val2['Column_name']) . ' DESC , ';
|
||||
}
|
||||
@@ -725,7 +725,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
|
||||
|
||||
$wi = 0;
|
||||
if (isset($analyzed_sql[0]['where_clause_identifiers']) && is_array($analyzed_sql[0]['where_clause_identifiers'])) {
|
||||
foreach($analyzed_sql[0]['where_clause_identifiers'] AS $wci_nr => $wci) {
|
||||
foreach ($analyzed_sql[0]['where_clause_identifiers'] AS $wci_nr => $wci) {
|
||||
$highlight_columns[$wci] = 'true';
|
||||
}
|
||||
}
|
||||
@@ -1029,7 +1029,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql)
|
||||
echo ' <td> </td>' . "\n";
|
||||
}
|
||||
|
||||
foreach($vertical_display['desc'] AS $key => $val) {
|
||||
foreach ($vertical_display['desc'] AS $key => $val) {
|
||||
echo $val;
|
||||
}
|
||||
|
||||
@@ -1261,7 +1261,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql)
|
||||
$vertical_display['data'][$row_no][$i] = ' <td align="right" valign="top" ' . $column_style . ' bgcolor="' . $bgcolor . '" class="nowrap">';
|
||||
|
||||
if (isset($analyzed_sql[0]['select_expr']) && is_array($analyzed_sql[0]['select_expr'])) {
|
||||
foreach($analyzed_sql[0]['select_expr'] AS $select_expr_position => $select_expr) {
|
||||
foreach ($analyzed_sql[0]['select_expr'] AS $select_expr_position => $select_expr) {
|
||||
$alias = $analyzed_sql[0]['select_expr'][$select_expr_position]['alias'];
|
||||
if (!empty($alias)) {
|
||||
$true_column = $analyzed_sql[0]['select_expr'][$select_expr_position]['column'];
|
||||
@@ -1387,7 +1387,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql)
|
||||
$vertical_display['data'][$row_no][$i] = ' <td valign="top" ' . $column_style . ' bgcolor="' . $bgcolor . '"' . $nowrap . '>';
|
||||
|
||||
if (isset($analyzed_sql[0]['select_expr']) && is_array($analyzed_sql[0]['select_expr'])) {
|
||||
foreach($analyzed_sql[0]['select_expr'] AS $select_expr_position => $select_expr) {
|
||||
foreach ($analyzed_sql[0]['select_expr'] AS $select_expr_position => $select_expr) {
|
||||
$alias = $analyzed_sql[0]['select_expr'][$select_expr_position]['alias'];
|
||||
if (!empty($alias)) {
|
||||
$true_column = $analyzed_sql[0]['select_expr'][$select_expr_position]['column'];
|
||||
@@ -1531,7 +1531,7 @@ function PMA_displayVerticalTable()
|
||||
echo '<tr>' . "\n";
|
||||
echo $vertical_display['textbtn'];
|
||||
$foo_counter = 0;
|
||||
foreach($vertical_display['row_delete'] AS $key => $val) {
|
||||
foreach ($vertical_display['row_delete'] AS $key => $val) {
|
||||
if (($foo_counter != 0) && ($repeat_cells != 0) && !($foo_counter % $repeat_cells)) {
|
||||
echo '<td> </td>' . "\n";
|
||||
}
|
||||
@@ -1550,7 +1550,7 @@ function PMA_displayVerticalTable()
|
||||
echo $vertical_display['textbtn'];
|
||||
}
|
||||
$foo_counter = 0;
|
||||
foreach($vertical_display['edit'] AS $key => $val) {
|
||||
foreach ($vertical_display['edit'] AS $key => $val) {
|
||||
if (($foo_counter != 0) && ($repeat_cells != 0) && !($foo_counter % $repeat_cells)) {
|
||||
echo ' <td> </td>' . "\n";
|
||||
}
|
||||
@@ -1568,7 +1568,7 @@ function PMA_displayVerticalTable()
|
||||
echo $vertical_display['textbtn'];
|
||||
}
|
||||
$foo_counter = 0;
|
||||
foreach($vertical_display['delete'] AS $key => $val) {
|
||||
foreach ($vertical_display['delete'] AS $key => $val) {
|
||||
if (($foo_counter != 0) && ($repeat_cells != 0) && !($foo_counter % $repeat_cells)) {
|
||||
echo '<td> </td>' . "\n";
|
||||
}
|
||||
@@ -1581,7 +1581,7 @@ function PMA_displayVerticalTable()
|
||||
|
||||
// Displays data
|
||||
$row_no = 0;
|
||||
foreach($vertical_display['desc'] AS $key => $val) {
|
||||
foreach ($vertical_display['desc'] AS $key => $val) {
|
||||
$row_no++;
|
||||
|
||||
if (isset($GLOBALS['printview']) && ($GLOBALS['printview'] == '1')) {
|
||||
@@ -1605,7 +1605,7 @@ function PMA_displayVerticalTable()
|
||||
echo $val;
|
||||
|
||||
$foo_counter = 0;
|
||||
foreach($vertical_display['rowdata'][$key] AS $subkey => $subval) {
|
||||
foreach ($vertical_display['rowdata'][$key] AS $subkey => $subval) {
|
||||
if (($foo_counter != 0) && ($repeat_cells != 0) and !($foo_counter % $repeat_cells)) {
|
||||
echo $val;
|
||||
}
|
||||
@@ -1622,7 +1622,7 @@ function PMA_displayVerticalTable()
|
||||
echo '<tr>' . "\n";
|
||||
echo $vertical_display['textbtn'];
|
||||
$foo_counter = 0;
|
||||
foreach($vertical_display['row_delete'] AS $key => $val) {
|
||||
foreach ($vertical_display['row_delete'] AS $key => $val) {
|
||||
if (($foo_counter != 0) && ($repeat_cells != 0) && !($foo_counter % $repeat_cells)) {
|
||||
echo '<td> </td>' . "\n";
|
||||
}
|
||||
@@ -1641,7 +1641,7 @@ function PMA_displayVerticalTable()
|
||||
echo $vertical_display['textbtn'];
|
||||
}
|
||||
$foo_counter = 0;
|
||||
foreach($vertical_display['edit'] AS $key => $val) {
|
||||
foreach ($vertical_display['edit'] AS $key => $val) {
|
||||
if (($foo_counter != 0) && ($repeat_cells != 0) && !($foo_counter % $repeat_cells)) {
|
||||
echo '<td> </td>' . "\n";
|
||||
}
|
||||
@@ -1659,7 +1659,7 @@ function PMA_displayVerticalTable()
|
||||
echo $vertical_display['textbtn'];
|
||||
}
|
||||
$foo_counter = 0;
|
||||
foreach($vertical_display['delete'] AS $key => $val) {
|
||||
foreach ($vertical_display['delete'] AS $key => $val) {
|
||||
if (($foo_counter != 0) && ($repeat_cells != 0) && !($foo_counter % $repeat_cells)) {
|
||||
echo '<td> </td>' . "\n";
|
||||
}
|
||||
@@ -1789,7 +1789,7 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
|
||||
|
||||
$target=array();
|
||||
if (isset($analyzed_sql[0]['table_ref']) && is_array($analyzed_sql[0]['table_ref'])) {
|
||||
foreach($analyzed_sql[0]['table_ref'] AS $table_ref_position => $table_ref) {
|
||||
foreach ($analyzed_sql[0]['table_ref'] AS $table_ref_position => $table_ref) {
|
||||
$target[] = $analyzed_sql[0]['table_ref'][$table_ref_position]['table_true_name'];
|
||||
}
|
||||
}
|
||||
@@ -1801,7 +1801,7 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
|
||||
} else {
|
||||
$exist_rel = PMA_getForeigners($db, $table, '', 'both');
|
||||
if ($exist_rel) {
|
||||
foreach($exist_rel AS $master_field => $rel) {
|
||||
foreach ($exist_rel AS $master_field => $rel) {
|
||||
$display_field = PMA_getDisplayField($rel['foreign_db'],$rel['foreign_table']);
|
||||
$map[$master_field] = array($rel['foreign_table'],
|
||||
$rel['foreign_field'],
|
||||
|
@@ -18,7 +18,7 @@
|
||||
function PMA_texEscape($string) {
|
||||
$escape = array('$', '%', '{', '}', '&', '#', '_', '^');
|
||||
$cnt_escape = count($escape);
|
||||
for($k=0; $k < $cnt_escape; $k++) {
|
||||
for ($k=0; $k < $cnt_escape; $k++) {
|
||||
$string = str_replace($escape[$k], '\\' . $escape[$k], $string);
|
||||
}
|
||||
return $string;
|
||||
@@ -140,7 +140,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
|
||||
$buffer = $crlf . '%' . $crlf . '% ' . $GLOBALS['strData'] . ': ' . $table . $crlf . '%' . $crlf
|
||||
. ' \\begin{longtable}{|';
|
||||
|
||||
for($index=0;$index<$columns_cnt;$index++) {
|
||||
for ($index=0;$index<$columns_cnt;$index++) {
|
||||
$buffer .= 'l|';
|
||||
}
|
||||
$buffer .= '} ' . $crlf ;
|
||||
@@ -174,7 +174,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
|
||||
|
||||
$buffer = '';
|
||||
// print each row
|
||||
for($i = 0; $i < $columns_cnt; $i++) {
|
||||
for ($i = 0; $i < $columns_cnt; $i++) {
|
||||
if ( isset($record[$columns[$i]]) && (!function_exists('is_null') || !is_null($record[$columns[$i]]))) {
|
||||
$column_value = PMA_texEscape(stripslashes($record[$columns[$i]]));
|
||||
} else {
|
||||
@@ -182,7 +182,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
|
||||
}
|
||||
|
||||
// last column ... no need for & character
|
||||
if($i == ($columns_cnt - 1)) {
|
||||
if ($i == ($columns_cnt - 1)) {
|
||||
$buffer .= $column_value;
|
||||
} else {
|
||||
$buffer .= $column_value . " & ";
|
||||
@@ -226,7 +226,7 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
|
||||
$keys_query = 'SHOW KEYS FROM ' . PMA_backquote($table) . ' FROM '. PMA_backquote($db);
|
||||
$keys_result = PMA_DBI_query($keys_query);
|
||||
$unique_keys = array();
|
||||
while($key = PMA_DBI_fetch_assoc($keys_result)) {
|
||||
while ($key = PMA_DBI_fetch_assoc($keys_result)) {
|
||||
if ($key['Non_unique'] == 0) $unique_keys[] = $key['Column_name'];
|
||||
}
|
||||
PMA_DBI_free_result($keys_result);
|
||||
|
@@ -28,7 +28,7 @@ $comment_marker = '-- ';
|
||||
function PMA_fieldTypes($db, $table,$use_backquotes) {
|
||||
PMA_DBI_select_db($db);
|
||||
$table_def = PMA_DBI_query('SHOW FIELDS FROM ' . PMA_backquote($db) . '.' . PMA_backquote($table));
|
||||
while($row = PMA_DBI_fetch_assoc($table_def)) {
|
||||
while ($row = PMA_DBI_fetch_assoc($table_def)) {
|
||||
$types[PMA_backquote($row['Field'],$use_backquotes)] = ereg_replace('\\(.*', '', $row['Type']);
|
||||
}
|
||||
return $types;
|
||||
@@ -340,7 +340,7 @@ function PMA_getTableComments($db, $table, $crlf, $do_relation = false, $do_comm
|
||||
if (isset($comments_map) && count($comments_map) > 0) {
|
||||
$schema_create .= $crlf . $GLOBALS['comment_marker'] . $crlf
|
||||
. $GLOBALS['comment_marker'] . $GLOBALS['strCommentsForTable']. ' ' . PMA_backquote($table, $use_backquotes) . ':' . $crlf;
|
||||
foreach($comments_map AS $comment_field => $comment) {
|
||||
foreach ($comments_map AS $comment_field => $comment) {
|
||||
$schema_create .= $GLOBALS['comment_marker'] . ' ' . PMA_backquote($comment_field, $use_backquotes) . $crlf
|
||||
. $GLOBALS['comment_marker'] . ' ' . PMA_backquote($comment, $use_backquotes) . $crlf;
|
||||
}
|
||||
@@ -351,7 +351,7 @@ function PMA_getTableComments($db, $table, $crlf, $do_relation = false, $do_comm
|
||||
$schema_create .= $crlf . $GLOBALS['comment_marker'] . $crlf
|
||||
. $GLOBALS['comment_marker'] . $GLOBALS['strMIMETypesForTable']. ' ' . PMA_backquote($table, $use_backquotes) . ':' . $crlf;
|
||||
@reset($mime_map);
|
||||
foreach($mime_map AS $mime_field => $mime) {
|
||||
foreach ($mime_map AS $mime_field => $mime) {
|
||||
$schema_create .= $GLOBALS['comment_marker'] . ' ' . PMA_backquote($mime_field, $use_backquotes) . $crlf
|
||||
. $GLOBALS['comment_marker'] . ' ' . PMA_backquote($mime['mimetype'], $use_backquotes) . $crlf;
|
||||
}
|
||||
@@ -361,7 +361,7 @@ function PMA_getTableComments($db, $table, $crlf, $do_relation = false, $do_comm
|
||||
if ($have_rel) {
|
||||
$schema_create .= $crlf . $GLOBALS['comment_marker'] . $crlf
|
||||
. $GLOBALS['comment_marker'] . $GLOBALS['strRelationsForTable']. ' ' . PMA_backquote($table, $use_backquotes) . ':' . $crlf;
|
||||
foreach($res_rel AS $rel_field => $rel) {
|
||||
foreach ($res_rel AS $rel_field => $rel) {
|
||||
$schema_create .= $GLOBALS['comment_marker'] . ' ' . PMA_backquote($rel_field, $use_backquotes) . $crlf
|
||||
. $GLOBALS['comment_marker'] . ' ' . PMA_backquote($rel['foreign_table'], $use_backquotes)
|
||||
. ' -> ' . PMA_backquote($rel['foreign_field'], $use_backquotes) . $crlf;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
// vim: expandtab sw=4 ts=4 sts=4:
|
||||
for($i=0;$i<=255;$i++)
|
||||
for ($i=0;$i<=255;$i++)
|
||||
$fpdf_charwidths['courier'][chr($i)]=600;
|
||||
$fpdf_charwidths['courierB']=$fpdf_charwidths['courier'];
|
||||
$fpdf_charwidths['courierI']=$fpdf_charwidths['courier'];
|
||||
|
@@ -310,7 +310,7 @@ class FPDF
|
||||
{
|
||||
$nf = $this->n;
|
||||
|
||||
foreach($this->diffs AS $diff) {
|
||||
foreach ($this->diffs AS $diff) {
|
||||
// Encodings
|
||||
$this->_newobj();
|
||||
$this->_out('<</Type /Encoding /BaseEncoding /WinAnsiEncoding /Differences [' . $diff . ']>>');
|
||||
@@ -320,7 +320,7 @@ class FPDF
|
||||
$mqr = get_magic_quotes_runtime();
|
||||
set_magic_quotes_runtime(0);
|
||||
|
||||
foreach($this->FontFiles AS $file => $info) {
|
||||
foreach ($this->FontFiles AS $file => $info) {
|
||||
// Font file embedding
|
||||
$this->_newobj();
|
||||
$this->FontFiles[$file]['n'] = $this->n;
|
||||
@@ -347,7 +347,7 @@ class FPDF
|
||||
} // end while
|
||||
set_magic_quotes_runtime($mqr);
|
||||
|
||||
foreach($this->fonts AS $k => $font) {
|
||||
foreach ($this->fonts AS $k => $font) {
|
||||
// Font objects
|
||||
$this->_newobj();
|
||||
$this->fonts[$k]['n'] = $this->n;
|
||||
@@ -390,7 +390,7 @@ class FPDF
|
||||
// Descriptor
|
||||
$this->_newobj();
|
||||
$s = '<</Type /FontDescriptor /FontName /' . $name;
|
||||
foreach($font['desc'] AS $k => $v) {
|
||||
foreach ($font['desc'] AS $k => $v) {
|
||||
$s .= ' /' . $k . ' ' . $v;
|
||||
}
|
||||
$file = $font['file'];
|
||||
@@ -413,7 +413,7 @@ class FPDF
|
||||
{
|
||||
$filter = ($this->compress) ? '/Filter /FlateDecode ' : '';
|
||||
|
||||
foreach($this->images AS $file => $info) {
|
||||
foreach ($this->images AS $file => $info) {
|
||||
$this->_newobj();
|
||||
$this->images[$file]['n'] = $this->n;
|
||||
$this->_out('<</Type /XObject');
|
||||
@@ -472,13 +472,13 @@ class FPDF
|
||||
$this->_out('2 0 obj');
|
||||
$this->_out('<</ProcSet [/PDF /Text /ImageB /ImageC /ImageI]');
|
||||
$this->_out('/Font <<');
|
||||
foreach($this->fonts AS $font) {
|
||||
foreach ($this->fonts AS $font) {
|
||||
$this->_out('/F' . $font['i'] . ' ' . $font['n'] . ' 0 R');
|
||||
}
|
||||
$this->_out('>>');
|
||||
if (count($this->images)) {
|
||||
$this->_out('/XObject <<');
|
||||
foreach($this->images AS $image) {
|
||||
foreach ($this->images AS $image) {
|
||||
$this->_out('/I' . $image['i'] . ' ' . $image['n'] . ' 0 R');
|
||||
}
|
||||
$this->_out('>>');
|
||||
@@ -702,7 +702,7 @@ class FPDF
|
||||
if (!isset($a['channels']) || $a['channels'] == 3) {
|
||||
$colspace = 'DeviceRGB';
|
||||
}
|
||||
else if($a['channels'] == 4) {
|
||||
else if ($a['channels'] == 4) {
|
||||
$colspace = 'DeviceCMYK';
|
||||
}
|
||||
else {
|
||||
@@ -847,7 +847,7 @@ class FPDF
|
||||
else {
|
||||
fread($f, $n + 4);
|
||||
} // end if... else if... else
|
||||
} while($n); // end do
|
||||
} while ($n); // end do
|
||||
|
||||
if ($colspace == 'Indexed' && empty($pal)) {
|
||||
$this->Error('Missing palette in ' . $file);
|
||||
@@ -2206,7 +2206,7 @@ class FPDF
|
||||
if ($l > $wmax) {
|
||||
// Automatic line break
|
||||
if ($sep == -1) {
|
||||
if($this->x > $this->lMargin) {
|
||||
if ($this->x > $this->lMargin) {
|
||||
// Move to next line
|
||||
$this->x =$this->lMargin;
|
||||
$this->y +=$h;
|
||||
|
@@ -17,7 +17,7 @@ function PMA_gpc_extract($array, &$target) {
|
||||
return FALSE;
|
||||
}
|
||||
$is_magic_quotes = get_magic_quotes_gpc();
|
||||
foreach($array AS $key => $value) {
|
||||
foreach ($array AS $key => $value) {
|
||||
if (is_array($value)) {
|
||||
// there could be a variable coming from a cookie of
|
||||
// another application, with the same name as this array
|
||||
@@ -42,7 +42,7 @@ if (!empty($_POST)) {
|
||||
} // end if
|
||||
|
||||
if (!empty($_FILES)) {
|
||||
foreach($_FILES AS $name => $value) {
|
||||
foreach ($_FILES AS $name => $value) {
|
||||
$$name = $value['tmp_name'];
|
||||
${$name . '_name'} = $value['name'];
|
||||
}
|
||||
|
@@ -252,7 +252,7 @@ function PMA_allowDeny($type)
|
||||
'localhost' => '127.0.0.1/8'
|
||||
);
|
||||
|
||||
foreach($rules AS $rule) {
|
||||
foreach ($rules AS $rule) {
|
||||
// extract rule data
|
||||
$rule_data = explode(' ', $rule);
|
||||
|
||||
|
@@ -36,7 +36,7 @@ if (PMA_MYSQL_INT_VERSION >= 40100){
|
||||
|
||||
$mysql_collations_count = count($mysql_collations_flat);
|
||||
sort($mysql_collations_flat, SORT_STRING);
|
||||
foreach($mysql_collations AS $key => $value) {
|
||||
foreach ($mysql_collations AS $key => $value) {
|
||||
sort($mysql_collations[$key], SORT_STRING);
|
||||
reset($mysql_collations[$key]);
|
||||
}
|
||||
|
@@ -300,11 +300,11 @@ function PMA_getForeigners($db, $table, $column = '', $source = 'both') {
|
||||
|
||||
$analyzed_sql = PMA_SQP_analyze(PMA_SQP_parse($show_create_table));
|
||||
|
||||
foreach($analyzed_sql[0]['foreign_keys'] AS $one_key) {
|
||||
foreach ($analyzed_sql[0]['foreign_keys'] AS $one_key) {
|
||||
|
||||
// the analyzer may return more than one column name in the
|
||||
// index list or the ref_index_list
|
||||
foreach($one_key['index_list'] AS $i => $field) {
|
||||
foreach ($one_key['index_list'] AS $i => $field) {
|
||||
|
||||
// If a foreign key is defined in the 'internal' source (pmadb)
|
||||
// and in 'innodb', we won't get it twice if $source='both'
|
||||
@@ -614,7 +614,7 @@ function PMA_foreignDropdown($disp, $foreign_field, $foreign_display, $data, $ma
|
||||
|
||||
$reloptions = array('content-id' => array(), 'id-content' => array());
|
||||
|
||||
foreach($disp AS $disp_key => $relrow) {
|
||||
foreach ($disp AS $disp_key => $relrow) {
|
||||
$key = $relrow[$foreign_field];
|
||||
if (PMA_strlen($relrow[$foreign_display]) <= $cfg['LimitChars']) {
|
||||
$value = (($foreign_display != FALSE) ? htmlspecialchars($relrow[$foreign_display]) : '');
|
||||
|
@@ -173,7 +173,7 @@ function PMA_langDetect($str = '', $envType = '')
|
||||
global $available_languages;
|
||||
global $lang;
|
||||
|
||||
foreach($available_languages AS $key => $value) {
|
||||
foreach ($available_languages AS $key => $value) {
|
||||
// $envType = 1 for the 'HTTP_ACCEPT_LANGUAGE' environment variable,
|
||||
// 2 for the 'HTTP_USER_AGENT' one
|
||||
if (($envType == 1 && eregi('^(' . $value[0] . ')(;q=[0-9]\\.[0-9])?$', $str))
|
||||
@@ -221,7 +221,7 @@ if (!isset($cfg['DefaultLang']) && isset($cfgDefaultLang)) {
|
||||
if (!isset($cfg['AllowAnywhereRecoding']) || !$cfg['AllowAnywhereRecoding']) {
|
||||
$available_language_files = $available_languages;
|
||||
$available_languages = array();
|
||||
foreach($available_language_files AS $tmp_lang => $tmp_lang_data) {
|
||||
foreach ($available_language_files AS $tmp_lang => $tmp_lang_data) {
|
||||
if (substr($tmp_lang, -5) != 'utf-8') {
|
||||
$available_languages[$tmp_lang] = $tmp_lang_data;
|
||||
}
|
||||
|
@@ -669,12 +669,10 @@ if ($is_minimum_common == FALSE) {
|
||||
function PMA_SQP_typeCheck($toCheck, $whatWeWant)
|
||||
{
|
||||
$typeSeperator = '_';
|
||||
if(strcmp($whatWeWant, $toCheck) == 0) {
|
||||
if (strcmp($whatWeWant, $toCheck) == 0) {
|
||||
return TRUE;
|
||||
} else {
|
||||
//if(strpos($whatWeWant, $typeSeperator) === FALSE) {
|
||||
// PHP3 compatible (works unless there is a real ff character)
|
||||
if(!strpos("\xff" . $whatWeWant, $typeSeperator)) {
|
||||
if (strpos($whatWeWant, $typeSeperator) === FALSE) {
|
||||
return strncmp($whatWeWant, $toCheck , strpos($toCheck, $typeSeperator)) == 0;
|
||||
} else {
|
||||
return FALSE;
|
||||
@@ -2015,7 +2013,7 @@ function PMA_SQP_buildCssData()
|
||||
global $cfg;
|
||||
|
||||
$css_string = '';
|
||||
foreach($cfg['SQP']['fmtColor'] AS $key => $col) {
|
||||
foreach ($cfg['SQP']['fmtColor'] AS $key => $col) {
|
||||
$css_string .= PMA_SQP_buildCssRule('syntax_' . $key, 'color', $col);
|
||||
}
|
||||
|
||||
|
@@ -43,7 +43,7 @@ function PMA_getAvailableMIMEtypes() {
|
||||
|
||||
if (is_array($filestack)) {
|
||||
@ksort($filestack);
|
||||
foreach($filestack AS $key => $file) {
|
||||
foreach ($filestack AS $key => $file) {
|
||||
|
||||
if (preg_match('|^.*__.*\.inc\.php(3?)$|', trim($file), $match)) {
|
||||
// File contains transformation functions.
|
||||
|
@@ -28,7 +28,7 @@ $types = PMA_getAvailableMIMEtypes();
|
||||
|
||||
<h2><?php echo $strMIME_available_mime; ?></h2>
|
||||
<?php
|
||||
foreach($types['mimetype'] AS $key => $mimetype) {
|
||||
foreach ($types['mimetype'] AS $key => $mimetype) {
|
||||
|
||||
if (isset($types['empty_mimetype'][$mimetype])) {
|
||||
echo '<i>' . $mimetype . '</i><br />';
|
||||
@@ -54,7 +54,7 @@ foreach($types['mimetype'] AS $key => $mimetype) {
|
||||
<?php
|
||||
@reset($types);
|
||||
$i = 0;
|
||||
foreach($types['transformation'] AS $key => $transform) {
|
||||
foreach ($types['transformation'] AS $key => $transform) {
|
||||
$i++;
|
||||
$func = strtolower(preg_replace('@(\.inc\.php3?)$@i', '', $types['transformation_file'][$key]));
|
||||
$desc = 'strTransformation_' . $func;
|
||||
|
10
main.php
10
main.php
@@ -60,7 +60,7 @@ echo "\n";
|
||||
if ($server > 0) {
|
||||
// robbat2: Use the verbose name of the server instead of the hostname
|
||||
// if a value is set
|
||||
if(!empty($cfg['Server']['verbose'])) {
|
||||
if (!empty($cfg['Server']['verbose'])) {
|
||||
$server_info = $cfg['Server']['verbose'];
|
||||
} else {
|
||||
$server_info = $cfg['Server']['host'];
|
||||
@@ -118,7 +118,7 @@ if ($server == 0 || count($cfg['Servers']) > 1) {
|
||||
<select name="server">
|
||||
<?php
|
||||
echo "\n";
|
||||
foreach($cfg['Servers'] AS $key => $val) {
|
||||
foreach ($cfg['Servers'] AS $key => $val) {
|
||||
if (!empty($val['host'])) {
|
||||
echo ' <option value="' . $key . '"';
|
||||
if (!empty($server) && ($server == $key)) {
|
||||
@@ -452,7 +452,7 @@ if (empty($cfg['Lang'])) {
|
||||
<input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
|
||||
<input type="hidden" name="server" value="<?php echo $server; ?>" />
|
||||
Language <a href="./translators.html" target="documentation"><?php
|
||||
if($cfg['ReplaceHelpImg']){
|
||||
if ($cfg['ReplaceHelpImg']){
|
||||
echo '<img src="./images/b_info.png" border="0" width="11" height="11" alt="Info" hspace="1" vspace="1" />';
|
||||
}else{ echo '(*)'; }
|
||||
?></a>:
|
||||
@@ -476,7 +476,7 @@ if (empty($cfg['Lang'])) {
|
||||
} // end of the 'PMA_cmp()' function
|
||||
|
||||
uasort($available_languages, 'PMA_cmp');
|
||||
foreach($available_languages AS $id => $tmplang) {
|
||||
foreach ($available_languages AS $id => $tmplang) {
|
||||
$lang_name = ucfirst(substr(strstr($tmplang[0], '|'), 1));
|
||||
if ($lang == $id) {
|
||||
$selected = ' selected="selected"';
|
||||
@@ -507,7 +507,7 @@ if (isset($cfg['AllowAnywhereRecoding']) && $cfg['AllowAnywhereRecoding']
|
||||
<select name="convcharset" dir="ltr" onchange="this.form.submit();">
|
||||
<?php
|
||||
echo "\n";
|
||||
foreach($cfg['AvailableCharsets'] AS $id => $tmpcharset) {
|
||||
foreach ($cfg['AvailableCharsets'] AS $id => $tmpcharset) {
|
||||
if ($convcharset == $tmpcharset) {
|
||||
$selected = ' selected="selected"';
|
||||
} else {
|
||||
|
@@ -87,7 +87,7 @@ if (!empty($submit_mult) && !empty($what)) {
|
||||
$full_query = '';
|
||||
$selected_cnt = count($selected);
|
||||
$i = 0;
|
||||
foreach($selected AS $idx => $sval) {
|
||||
foreach ($selected AS $idx => $sval) {
|
||||
switch ($what) {
|
||||
case 'row_delete':
|
||||
$full_query .= htmlspecialchars(urldecode($sval))
|
||||
@@ -150,7 +150,7 @@ if (!empty($submit_mult) && !empty($what)) {
|
||||
} else {
|
||||
echo PMA_generate_common_hidden_inputs();
|
||||
}
|
||||
foreach($selected AS $idx => $sval) {
|
||||
foreach ($selected AS $idx => $sval) {
|
||||
echo ' <input type="hidden" name="selected[]" value="' . htmlspecialchars($sval) . '" />' . "\n";
|
||||
}
|
||||
?>
|
||||
|
@@ -105,9 +105,9 @@ if ($cfgRelation['pdfwork']) {
|
||||
// one table, and might be a master itself)
|
||||
|
||||
$foreign_tables = array();
|
||||
foreach($all_tables AS $master_table) {
|
||||
foreach ($all_tables AS $master_table) {
|
||||
$foreigners = PMA_getForeigners($db, $master_table);
|
||||
foreach($foreigners AS $foreigner) {
|
||||
foreach ($foreigners AS $foreigner) {
|
||||
if (!in_array($foreigner['foreign_table'], $foreign_tables)) {
|
||||
$foreign_tables[] = $foreigner['foreign_table'];
|
||||
}
|
||||
@@ -115,7 +115,7 @@ if ($cfgRelation['pdfwork']) {
|
||||
}
|
||||
|
||||
// then merge the arrays
|
||||
foreach($foreign_tables AS $foreign_table) {
|
||||
foreach ($foreign_tables AS $foreign_table) {
|
||||
if (!in_array($foreign_table, $all_tables)) {
|
||||
$all_tables[] = $foreign_table;
|
||||
}
|
||||
@@ -129,7 +129,7 @@ if ($cfgRelation['pdfwork']) {
|
||||
$delta = 50;
|
||||
$delta_mult = 1.34;
|
||||
$direction = "right";
|
||||
foreach($all_tables AS $current_table) {
|
||||
foreach ($all_tables AS $current_table) {
|
||||
|
||||
// save current table's coordinates
|
||||
$insert_query = 'INSERT INTO ' . PMA_backquote($cfgRelation['table_coords']) . ' '
|
||||
@@ -208,7 +208,7 @@ if ($cfgRelation['pdfwork']) {
|
||||
} // end for
|
||||
break;
|
||||
case 'deleteCrap':
|
||||
foreach($delrow AS $current_row) {
|
||||
foreach ($delrow AS $current_row) {
|
||||
$d_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['table_coords']) . ' ' . "\n"
|
||||
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'' . "\n"
|
||||
. ' AND table_name = \'' . PMA_sqlAddslashes($current_row) . '\'' . "\n"
|
||||
@@ -305,7 +305,7 @@ if ($cfg['WYSIWYG-PDF']) {
|
||||
</form>
|
||||
<div id="pdflayout" class="pdflayout" style="visibility: hidden;">
|
||||
<?php
|
||||
foreach($array_sh_page AS $key => $temp_sh_page) {
|
||||
foreach ($array_sh_page AS $key => $temp_sh_page) {
|
||||
$drag_x = $temp_sh_page['x'];
|
||||
$drag_y = $temp_sh_page['y'];
|
||||
|
||||
@@ -372,7 +372,7 @@ function resetDrag() {
|
||||
|
||||
|
||||
$i = 0;
|
||||
foreach($array_sh_page AS $dummy_sh_page => $sh_page) {
|
||||
foreach ($array_sh_page AS $dummy_sh_page => $sh_page) {
|
||||
$_mtab = $sh_page['table_name'];
|
||||
$tabExist[$_mtab] = FALSE;
|
||||
echo "\n" . ' <tr ';
|
||||
@@ -384,7 +384,7 @@ function resetDrag() {
|
||||
echo '>';
|
||||
echo "\n" . ' <td>'
|
||||
. "\n" . ' <select name="c_table_' . $i . '[name]">';
|
||||
foreach($selectboxall AS $key => $value) {
|
||||
foreach ($selectboxall AS $key => $value) {
|
||||
echo "\n" . ' <option value="' . $value . '"';
|
||||
if ($value == $sh_page['table_name']) {
|
||||
echo ' selected="selected"';
|
||||
@@ -416,7 +416,7 @@ function resetDrag() {
|
||||
echo '>';
|
||||
echo "\n" . ' <td>'
|
||||
. "\n" . ' <select name="c_table_' . $i . '[name]">';
|
||||
foreach($selectboxall AS $key => $value) {
|
||||
foreach ($selectboxall AS $key => $value) {
|
||||
echo "\n" . ' <option value="' . $value . '">' . $value . '</option>';
|
||||
}
|
||||
echo "\n" . ' </select>'
|
||||
@@ -445,7 +445,7 @@ function resetDrag() {
|
||||
$_strname = '';
|
||||
$shoot = FALSE;
|
||||
if (!empty($tabExist) && is_array($tabExist)) {
|
||||
foreach($tabExist AS $key => $value) {
|
||||
foreach ($tabExist AS $key => $value) {
|
||||
if (!$value) {
|
||||
$_strtrans .= '<input type="hidden" name="delrow[]" value="' . $key . '">' . "\n";
|
||||
$_strname .= '<li>' . $key . '</li>' . "\n";
|
||||
@@ -497,7 +497,7 @@ function resetDrag() {
|
||||
<?php echo $strPaperSize; ?>
|
||||
<select name="paper" <?php echo ($cfg['WYSIWYG-PDF'] ? 'onchange="refreshDragOption(\'pdflayout\');"' : ''); ?>>
|
||||
<?php
|
||||
foreach($cfg['PDFPageSizes'] AS $key => $val) {
|
||||
foreach ($cfg['PDFPageSizes'] AS $key => $val) {
|
||||
echo '<option value="' . $val . '"';
|
||||
if ($val == $cfg['PDFDefaultPageSize']) {
|
||||
echo ' selected="selected"';
|
||||
|
@@ -96,11 +96,11 @@ class PMA_PDF extends FPDF
|
||||
}
|
||||
function _putpages()
|
||||
{
|
||||
if(count($this->Alias) > 0)
|
||||
if (count($this->Alias) > 0)
|
||||
{
|
||||
$nb=$this->page;
|
||||
foreach($this->Alias AS $alias => $value) {
|
||||
for($n=1;$n<=$nb;$n++)
|
||||
foreach ($this->Alias AS $alias => $value) {
|
||||
for ($n=1;$n<=$nb;$n++)
|
||||
$this->pages[$n]=str_replace($alias,$value,$this->pages[$n]);
|
||||
}
|
||||
}
|
||||
@@ -336,14 +336,14 @@ class PMA_PDF extends FPDF
|
||||
$this->Outlines[0][]=$level;
|
||||
$this->Outlines[1][]=$txt;
|
||||
$this->Outlines[2][]=$this->page;
|
||||
if($y==-1)
|
||||
if ($y==-1)
|
||||
$y=$this->GetY();
|
||||
$this->Outlines[3][]=round($this->hPt-$y*$this->k,2);
|
||||
}
|
||||
|
||||
function _putbookmarks()
|
||||
{
|
||||
if(count($this->Outlines)>0)
|
||||
if (count($this->Outlines)>0)
|
||||
{
|
||||
//Save object number
|
||||
$memo_n = $this->n;
|
||||
@@ -352,29 +352,29 @@ function _putbookmarks()
|
||||
$first_level=array();
|
||||
$parent=array();
|
||||
$parent[0]=1;
|
||||
for( $i=0; $i<$nb_outlines; $i++)
|
||||
for ($i=0; $i<$nb_outlines; $i++)
|
||||
{
|
||||
$level=$this->Outlines[0][$i];
|
||||
$kids=0;
|
||||
$last=-1;
|
||||
$prev=-1;
|
||||
$next=-1;
|
||||
if( $i>0 )
|
||||
if ($i>0 )
|
||||
{
|
||||
$cursor=$i-1;
|
||||
//Take the previous outline in the same level
|
||||
while( $this->Outlines[0][$cursor] > $level && $cursor > 0)
|
||||
while ($this->Outlines[0][$cursor] > $level && $cursor > 0)
|
||||
$cursor--;
|
||||
if( $this->Outlines[0][$cursor] == $level)
|
||||
if ($this->Outlines[0][$cursor] == $level)
|
||||
$prev=$cursor;
|
||||
}
|
||||
if( $i<$nb_outlines-1)
|
||||
if ($i<$nb_outlines-1)
|
||||
{
|
||||
$cursor=$i+1;
|
||||
while( isset($this->Outlines[0][$cursor]) && $this->Outlines[0][$cursor] > $level)
|
||||
while (isset($this->Outlines[0][$cursor]) && $this->Outlines[0][$cursor] > $level)
|
||||
{
|
||||
//Take the immediate kid in level + 1
|
||||
if( $this->Outlines[0][$cursor] == $level+1)
|
||||
if ($this->Outlines[0][$cursor] == $level+1)
|
||||
{
|
||||
$kids++;
|
||||
$last=$cursor;
|
||||
@@ -383,24 +383,24 @@ function _putbookmarks()
|
||||
}
|
||||
$cursor=$i+1;
|
||||
//Take the next outline in the same level
|
||||
while( $this->Outlines[0][$cursor] > $level && ($cursor+1 < sizeof($this->Outlines[0])))
|
||||
while ($this->Outlines[0][$cursor] > $level && ($cursor+1 < sizeof($this->Outlines[0])))
|
||||
$cursor++;
|
||||
if( $this->Outlines[0][$cursor] == $level)
|
||||
if ($this->Outlines[0][$cursor] == $level)
|
||||
$next=$cursor;
|
||||
}
|
||||
$this->_newobj();
|
||||
$parent[$level+1]=$this->n;
|
||||
if( $level == 0)
|
||||
if ($level == 0)
|
||||
$first_level[]=$this->n;
|
||||
$this->_out('<<');
|
||||
$this->_out('/Title ('.$this->Outlines[1][$i].')');
|
||||
$this->_out('/Parent '.$parent[$level].' 0 R');
|
||||
if( $prev != -1)
|
||||
if ($prev != -1)
|
||||
$this->_out('/Prev '.($memo_n+$prev+1).' 0 R');
|
||||
if( $next != -1)
|
||||
if ($next != -1)
|
||||
$this->_out('/Next '.($this->n+$next-$i).' 0 R');
|
||||
$this->_out('/Dest ['.(1+(2*$this->Outlines[2][$i])).' 0 R /XYZ null '.$this->Outlines[3][$i].' null]');
|
||||
if( $kids > 0)
|
||||
if ($kids > 0)
|
||||
{
|
||||
$this->_out('/First '.($this->n+1).' 0 R');
|
||||
$this->_out('/Last '.($this->n+$last-$i).' 0 R');
|
||||
@@ -432,7 +432,7 @@ function _putresources()
|
||||
function _putcatalog()
|
||||
{
|
||||
parent::_putcatalog();
|
||||
if(count($this->Outlines)>0)
|
||||
if (count($this->Outlines)>0)
|
||||
{
|
||||
$this->_out('/Outlines '.$this->def_outlines.' 0 R');
|
||||
$this->_out('/PageMode /UseOutlines');
|
||||
@@ -449,7 +449,7 @@ function Row($data,$links)
|
||||
// line height
|
||||
$nb=0;
|
||||
$data_cnt = count($data);
|
||||
for($i=0;$i<$data_cnt;$i++)
|
||||
for ($i=0;$i<$data_cnt;$i++)
|
||||
$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));
|
||||
$il = $this->FontSize;
|
||||
$h=($il+1)*$nb;
|
||||
@@ -457,7 +457,7 @@ function Row($data,$links)
|
||||
$this->CheckPageBreak($h);
|
||||
// draw the cells
|
||||
$data_cnt = count($data);
|
||||
for($i=0;$i<$data_cnt;$i++)
|
||||
for ($i=0;$i<$data_cnt;$i++)
|
||||
{
|
||||
$w=$this->widths[$i];
|
||||
// save current position
|
||||
@@ -479,7 +479,7 @@ function Row($data,$links)
|
||||
function CheckPageBreak($h)
|
||||
{
|
||||
// if height h overflows, manual page break
|
||||
if($this->GetY()+$h>$this->PageBreakTrigger)
|
||||
if ($this->GetY()+$h>$this->PageBreakTrigger)
|
||||
$this->AddPage($this->CurOrientation);
|
||||
}
|
||||
|
||||
@@ -487,22 +487,22 @@ function NbLines($w,$txt)
|
||||
{
|
||||
// compute number of lines used by a multicell of width w
|
||||
$cw=&$this->CurrentFont['cw'];
|
||||
if($w==0)
|
||||
if ($w==0)
|
||||
$w=$this->w-$this->rMargin-$this->x;
|
||||
$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
|
||||
$s=str_replace("\r",'',$txt);
|
||||
$nb=strlen($s);
|
||||
if($nb>0 and $s[$nb-1]=="\n")
|
||||
if ($nb>0 and $s[$nb-1]=="\n")
|
||||
$nb--;
|
||||
$sep=-1;
|
||||
$i=0;
|
||||
$j=0;
|
||||
$l=0;
|
||||
$nl=1;
|
||||
while($i<$nb)
|
||||
while ($i<$nb)
|
||||
{
|
||||
$c=$s[$i];
|
||||
if($c=="\n")
|
||||
if ($c=="\n")
|
||||
{
|
||||
$i++;
|
||||
$sep=-1;
|
||||
@@ -511,14 +511,14 @@ function NbLines($w,$txt)
|
||||
$nl++;
|
||||
continue;
|
||||
}
|
||||
if($c==' ')
|
||||
if ($c==' ')
|
||||
$sep=$i;
|
||||
$l+=$cw[$c];
|
||||
if($l>$wmax)
|
||||
if ($l>$wmax)
|
||||
{
|
||||
if($sep==-1)
|
||||
if ($sep==-1)
|
||||
{
|
||||
if($i==$j)
|
||||
if ($i==$j)
|
||||
$i++;
|
||||
}
|
||||
else
|
||||
@@ -576,7 +576,7 @@ class PMA_RT_Table
|
||||
// there are fields that require wider cells than the name of the table?
|
||||
global $pdf;
|
||||
|
||||
foreach($this->fields AS $field) {
|
||||
foreach ($this->fields AS $field) {
|
||||
$this->width = max($this->width, $pdf->GetStringWidth($field));
|
||||
}
|
||||
$this->width += $pdf->GetStringWidth(' ');
|
||||
@@ -633,7 +633,7 @@ class PMA_RT_Table
|
||||
$pdf->SetTextColor(0);
|
||||
$pdf->SetFillColor(255);
|
||||
|
||||
foreach($this->fields AS $field) {
|
||||
foreach ($this->fields AS $field) {
|
||||
// loic1 : PHP3 fix
|
||||
// if (in_array($field, $this->primary)) {
|
||||
if ($setcolor) {
|
||||
@@ -994,7 +994,7 @@ class PMA_RT
|
||||
function PMA_RT_drawRelations($change_color)
|
||||
{
|
||||
$i = 0;
|
||||
foreach($this->relations AS $relation) {
|
||||
foreach ($this->relations AS $relation) {
|
||||
$relation->PMA_RT_Relation_draw($change_color, $i);
|
||||
$i++;
|
||||
} // end while
|
||||
@@ -1012,7 +1012,7 @@ class PMA_RT
|
||||
*/
|
||||
function PMA_RT_drawTables($show_info,$draw_color=0)
|
||||
{
|
||||
foreach($this->tables AS $table) {
|
||||
foreach ($this->tables AS $table) {
|
||||
$table->PMA_RT_Table_draw($show_info, $this->ff,$draw_color);
|
||||
}
|
||||
} // end of the "PMA_RT_drawTables()" method
|
||||
@@ -1138,12 +1138,12 @@ class PMA_RT
|
||||
|
||||
/* snip */
|
||||
|
||||
foreach($alltables AS $table) {
|
||||
foreach ($alltables AS $table) {
|
||||
if (!isset($this->tables[$table])) {
|
||||
$this->tables[$table] = new PMA_RT_Table($table, $this->ff, $this->tablewidth);
|
||||
}
|
||||
|
||||
if($this->same_wide){
|
||||
if ($this->same_wide){
|
||||
$this->tables[$table]->width = $this->tablewidth;
|
||||
}
|
||||
$this->PMA_RT_setMinMax($this->tables[$table]);
|
||||
@@ -1176,12 +1176,12 @@ class PMA_RT
|
||||
// and finding its foreigns is OK (then we can support innodb)
|
||||
|
||||
$seen_a_relation = FALSE;
|
||||
foreach($alltables AS $one_table) {
|
||||
foreach ($alltables AS $one_table) {
|
||||
|
||||
$exist_rel = PMA_getForeigners($db, $one_table, '', 'both');
|
||||
if ($exist_rel) {
|
||||
$seen_a_relation = TRUE;
|
||||
foreach($exist_rel AS $master_field => $rel) {
|
||||
foreach ($exist_rel AS $master_field => $rel) {
|
||||
// put the foreign table on the schema only if selected
|
||||
// by the user
|
||||
// (do not use array_search() because we would have to
|
||||
@@ -1223,7 +1223,7 @@ function PMA_RT_DOC($alltables ){
|
||||
$pdf->Cell(0,9, $GLOBALS['strTableOfContents'],1,0,'C');
|
||||
$pdf->Ln(15);
|
||||
$i = 1;
|
||||
foreach($alltables AS $table) {
|
||||
foreach ($alltables AS $table) {
|
||||
$pdf->PMA_links['doc'][$table]['-'] = $pdf->AddLink();
|
||||
$pdf->SetX(10);
|
||||
//$pdf->Ln(1);
|
||||
@@ -1248,7 +1248,7 @@ function PMA_RT_DOC($alltables ){
|
||||
$pdf->SetX(10);
|
||||
$pdf->Cell(0,6,$i.' '. $GLOBALS['strRelationalSchema'],0,1,'L',0,$pdf->PMA_links['RT']['-']);
|
||||
$z = 0;
|
||||
foreach($alltables AS $table) {
|
||||
foreach ($alltables AS $table) {
|
||||
$z++;
|
||||
$pdf->addpage($GLOBALS['orientation']);
|
||||
$pdf->Bookmark($table);
|
||||
|
@@ -161,7 +161,7 @@ if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) {
|
||||
|
||||
$temp_history = PMA_getHistory($cfg['Server']['user']);
|
||||
if (is_array($temp_history) && count($temp_history) > 0) {
|
||||
foreach($temp_history AS $history_nr => $history_array) {
|
||||
foreach ($temp_history AS $history_nr => $history_array) {
|
||||
if (!isset($dup_sql[$history_array['sqlquery']])) {
|
||||
$sql_history[] = '<li>'
|
||||
. '<a href="#" onclick="document.querywindow.querydisplay_tab.value = \'' . (isset($querydisplay_tab) && $querydisplay_tab != 'full' ? 'sql' : 'full') . '\'; document.querywindow.query_history_latest.value = \'' . preg_replace('/(\n)/i', ' ', addslashes(htmlspecialchars($history_array['sqlquery']))) . '\'; document.querywindow.auto_commit.value = \'false\'; document.querywindow.db.value = \'' . htmlspecialchars($history_array['db']) . '\'; document.querywindow.query_history_latest_db.value = \'' . htmlspecialchars($history_array['db']) . '\'; document.querywindow.table.value = \'' . (isset($history_array['table']) ? htmlspecialchars($history_array['table']) : '') . '\'; document.querywindow.query_history_latest_table.value = \'' . (isset($history_array['table']) ? htmlspecialchars($history_array['table']) : '') . '\'; document.querywindow.submit(); return false;">' . $titles['Change'] . '</a>'
|
||||
@@ -176,7 +176,7 @@ if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) {
|
||||
|
||||
if (isset($query_history) && is_array($query_history)) {
|
||||
$current_index = count($query_history);
|
||||
foreach($query_history AS $query_no => $query_sql) {
|
||||
foreach ($query_history AS $query_no => $query_sql) {
|
||||
if (!isset($dup_sql[$query_sql])) {
|
||||
|
||||
$input_query_history[] = '<input type="hidden" name="query_history[]" value="' . $query_sql . '" />';
|
||||
|
@@ -329,7 +329,7 @@ if (isset($my_die)) {
|
||||
$js_to_run = 'functions.js';
|
||||
require_once('./header.inc.php');
|
||||
if (is_array($my_die)) {
|
||||
foreach($my_die AS $key => $die_string) {
|
||||
foreach ($my_die AS $key => $die_string) {
|
||||
PMA_mysqlDie('', $die_string, '', $err_url, FALSE);
|
||||
echo '<hr />';
|
||||
}
|
||||
|
@@ -110,7 +110,7 @@ if (!empty($dbstats) && !$is_superuser) {
|
||||
* Prepares the statistics
|
||||
*/
|
||||
$statistics = array();
|
||||
foreach($dblist AS $current_db) {
|
||||
foreach ($dblist AS $current_db) {
|
||||
$tmp_array = array(
|
||||
'db_name' => $current_db,
|
||||
'tbl_cnt' => 0,
|
||||
|
@@ -39,7 +39,7 @@ if ($server > 0 && empty($dblist)) {
|
||||
$multi_values = '<div align="center"><select name="db_select[]" size="6" multiple="multiple">';
|
||||
$multi_values .= "\n";
|
||||
|
||||
foreach($dblist AS $current_db) {
|
||||
foreach ($dblist AS $current_db) {
|
||||
if (!empty($selectall) || (isset($tmp_select) && strpos(' ' . $tmp_select, '|' . $current_db . '|'))) {
|
||||
$is_selected = ' selected="selected"';
|
||||
} else {
|
||||
|
@@ -66,7 +66,7 @@ unset($row);
|
||||
</tr>
|
||||
<?php
|
||||
$useBgcolorOne = TRUE;
|
||||
foreach($serverProcesses AS $name => $value) {
|
||||
foreach ($serverProcesses AS $name => $value) {
|
||||
?>
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> <a href="./server_processlist.php?<?php echo $url_query . '&kill=' . $value['Id']; ?>"><?php echo $strKill; ?></a> </td>
|
||||
|
@@ -71,7 +71,7 @@ unset($res, $row);
|
||||
//Get query statistics
|
||||
$queryStats = array();
|
||||
$tmp_array = $serverStatus;
|
||||
foreach($tmp_array AS $name => $value) {
|
||||
foreach ($tmp_array AS $name => $value) {
|
||||
if (substr($name, 0, 4) == 'Com_') {
|
||||
$queryStats[str_replace('_', ' ', substr($name, 4))] = $value;
|
||||
unset($serverStatus[$name]);
|
||||
@@ -236,7 +236,7 @@ if (!empty($serverStatus)) {
|
||||
<?php
|
||||
$useBgcolorOne = TRUE;
|
||||
$countRows = 0;
|
||||
foreach($serverStatus AS $name => $value) {
|
||||
foreach ($serverStatus AS $name => $value) {
|
||||
?>
|
||||
<tr>
|
||||
<td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> <?php echo htmlspecialchars(str_replace('_', ' ', $name)); ?> </td>
|
||||
|
@@ -194,14 +194,14 @@ if (isset($submit_num_fields)) {
|
||||
|
||||
// garvin: Update comment table, if a comment was set.
|
||||
if (isset($field_comments) && is_array($field_comments) && $cfgRelation['commwork']) {
|
||||
foreach($field_comments AS $fieldindex => $fieldcomment) {
|
||||
foreach ($field_comments AS $fieldindex => $fieldcomment) {
|
||||
PMA_setComment($db, $table, $field_name[$fieldindex], $fieldcomment);
|
||||
}
|
||||
}
|
||||
|
||||
// garvin: Update comment table for mime types [MIME]
|
||||
if (isset($field_mimetype) && is_array($field_mimetype) && $cfgRelation['commwork'] && $cfgRelation['mimework'] && $cfg['BrowseMIME']) {
|
||||
foreach($field_mimetype AS $fieldindex => $mimetype) {
|
||||
foreach ($field_mimetype AS $fieldindex => $mimetype) {
|
||||
PMA_setMIME($db, $table, $field_name[$fieldindex], $mimetype, $field_transformation[$fieldindex], $field_transformation_options[$fieldindex]);
|
||||
}
|
||||
}
|
||||
|
@@ -90,14 +90,14 @@ if (isset($submit)) {
|
||||
|
||||
// garvin: Update comment table, if a comment was set.
|
||||
if (isset($field_comments) && is_array($field_comments) && $cfgRelation['commwork']) {
|
||||
foreach($field_comments AS $fieldindex => $fieldcomment) {
|
||||
foreach ($field_comments AS $fieldindex => $fieldcomment) {
|
||||
PMA_setComment($db, $table, $field_name[$fieldindex], $fieldcomment, $field_orig[$fieldindex]);
|
||||
}
|
||||
}
|
||||
|
||||
// garvin: Rename relations&display fields, if altered.
|
||||
if (($cfgRelation['displaywork'] || $cfgRelation['relwork']) && isset($field_orig) && is_array($field_orig)) {
|
||||
foreach($field_orig AS $fieldindex => $fieldcontent) {
|
||||
foreach ($field_orig AS $fieldindex => $fieldcontent) {
|
||||
if ($field_name[$fieldindex] != $fieldcontent) {
|
||||
if ($cfgRelation['displaywork']) {
|
||||
$table_query = 'UPDATE ' . PMA_backquote($cfgRelation['table_info'])
|
||||
@@ -135,7 +135,7 @@ if (isset($submit)) {
|
||||
|
||||
// garvin: Update comment table for mime types [MIME]
|
||||
if (isset($field_mimetype) && is_array($field_mimetype) && $cfgRelation['commwork'] && $cfgRelation['mimework'] && $cfg['BrowseMIME']) {
|
||||
foreach($field_mimetype AS $fieldindex => $mimetype) {
|
||||
foreach ($field_mimetype AS $fieldindex => $mimetype) {
|
||||
PMA_setMIME($db, $table, $field_name[$fieldindex], $mimetype, $field_transformation[$fieldindex], $field_transformation_options[$fieldindex]);
|
||||
}
|
||||
}
|
||||
|
@@ -88,7 +88,7 @@ if (isset($primary_key)) {
|
||||
|
||||
$row = array();
|
||||
$result = array();
|
||||
foreach($primary_key_array AS $rowcount => $primary_key) {
|
||||
foreach ($primary_key_array AS $rowcount => $primary_key) {
|
||||
$local_query = 'SELECT * FROM ' . PMA_backquote($table) . ' WHERE ' . $primary_key . ';';
|
||||
$result[$rowcount] = PMA_DBI_query($local_query, NULL, PMA_DBI_QUERY_STORE);
|
||||
$row[$rowcount] = PMA_DBI_fetch_assoc($result[$rowcount]);
|
||||
@@ -165,7 +165,7 @@ document.onkeydown = onKeyDownArrowsHandler;
|
||||
<input type="hidden" name="sql_query" value="<?php echo isset($sql_query) ? urlencode($sql_query) : ''; ?>" />
|
||||
<?php
|
||||
if (isset($primary_key_array)) {
|
||||
foreach($primary_key_array AS $primary_key) {
|
||||
foreach ($primary_key_array AS $primary_key) {
|
||||
?>
|
||||
<input type="hidden" name="primary_key[]" value="<?php echo urlencode($primary_key); ?>" />
|
||||
<?php
|
||||
@@ -215,7 +215,7 @@ $tab1 = +2;
|
||||
$tab2 = +1;
|
||||
$tab3 = 0;
|
||||
$o_rows = 0;
|
||||
foreach($loop_array AS $vrowcount => $vrow) {
|
||||
foreach ($loop_array AS $vrowcount => $vrow) {
|
||||
if ($vrow === FALSE) {
|
||||
unset($vrow);
|
||||
}
|
||||
|
@@ -192,14 +192,14 @@ if (isset($submit_num_fields)) {
|
||||
|
||||
// garvin: Update comment table, if a comment was set.
|
||||
if (isset($field_comments) && is_array($field_comments) && $cfgRelation['commwork']) {
|
||||
foreach($field_comments AS $fieldindex => $fieldcomment) {
|
||||
foreach ($field_comments AS $fieldindex => $fieldcomment) {
|
||||
PMA_setComment($db, $table, $field_name[$fieldindex], $fieldcomment);
|
||||
}
|
||||
}
|
||||
|
||||
// garvin: Update comment table for mime types [MIME]
|
||||
if (isset($field_mimetype) && is_array($field_mimetype) && $cfgRelation['commwork'] && $cfgRelation['mimework'] && $cfg['BrowseMIME']) {
|
||||
foreach($field_mimetype AS $fieldindex => $mimetype) {
|
||||
foreach ($field_mimetype AS $fieldindex => $mimetype) {
|
||||
PMA_setMIME($db, $table, $field_name[$fieldindex], $mimetype, $field_transformation[$fieldindex], $field_transformation_options[$fieldindex]);
|
||||
}
|
||||
}
|
||||
|
@@ -120,7 +120,7 @@ if (!defined('PMA_IDX_INCLUDED')) {
|
||||
|
||||
$fields_names = array();
|
||||
$fields_types = array();
|
||||
foreach($save_row AS $saved_row_key => $row) {
|
||||
foreach ($save_row AS $saved_row_key => $row) {
|
||||
$fields_names[] = $row['Field'];
|
||||
// loic1: set or enum types: slashes single quotes inside options
|
||||
if (preg_match('@^(set|enum)\((.+)\)$@i', $row['Type'], $tmp)) {
|
||||
@@ -189,7 +189,7 @@ if (!defined('PMA_IDX_INCLUDED')
|
||||
break;
|
||||
} // end switch
|
||||
$index_fields = '';
|
||||
foreach($column AS $i => $name) {
|
||||
foreach ($column AS $i => $name) {
|
||||
if ($name != '--ignore--') {
|
||||
$index_fields .= (empty($index_fields) ? '' : ',')
|
||||
. PMA_backquote($name)
|
||||
@@ -266,7 +266,7 @@ else if (!defined('PMA_IDX_INCLUDED')
|
||||
} // end for
|
||||
|
||||
// Restore entered values
|
||||
foreach($column AS $i => $name) {
|
||||
foreach ($column AS $i => $name) {
|
||||
if ($name != '--ignore--'){
|
||||
$edited_index_data[$i+1]['Column_name'] = $name;
|
||||
$edited_index_data[$i+1]['Sub_part'] = $sub_part[$i];
|
||||
@@ -300,7 +300,7 @@ else if (!defined('PMA_IDX_INCLUDED')
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td align="right"><?php
|
||||
if($cfg['ErrorIconic']){
|
||||
if ($cfg['ErrorIconic']){
|
||||
echo '<img src="./images/s_warn.png" width="16" height="16" border="0" alt="Attention" />';
|
||||
}
|
||||
?></td><td><?php echo $strPrimaryKeyWarning . "\n"; ?></td></tr>
|
||||
@@ -336,7 +336,7 @@ else if (!defined('PMA_IDX_INCLUDED')
|
||||
<th><?php echo $strSize; ?></th>
|
||||
</tr>
|
||||
<?php
|
||||
foreach($edited_index_info['Sequences'] AS $row_no => $seq_index) {
|
||||
foreach ($edited_index_info['Sequences'] AS $row_no => $seq_index) {
|
||||
$add_type = (is_array($fields_types) && count($fields_types) == count($fields_names));
|
||||
$selected = $edited_index_data[$seq_index]['Column_name'];
|
||||
if (!empty($edited_index_data[$seq_index]['Sub_part'])) {
|
||||
@@ -353,7 +353,7 @@ else if (!defined('PMA_IDX_INCLUDED')
|
||||
<option value="--ignore--"<?php if ('--ignore--' == $selected) echo ' selected="selected"'; ?>>
|
||||
-- <?php echo $strIgnore; ?> --</option>
|
||||
<?php
|
||||
foreach($fields_names AS $key => $val) {
|
||||
foreach ($fields_names AS $key => $val) {
|
||||
if ($index_type != 'FULLTEXT'
|
||||
|| preg_match('@^(varchar|text|tinytext|mediumtext|longtext)@i', $fields_types[$key])) {
|
||||
echo "\n" . ' '
|
||||
@@ -439,7 +439,7 @@ else if (!defined('PMA_IDX_INCLUDED')
|
||||
</tr>
|
||||
<?php
|
||||
echo "\n";
|
||||
foreach($indexes AS $index_no => $index_name) {
|
||||
foreach ($indexes AS $index_no => $index_name) {
|
||||
$cell_bgd = (($index_no % 2) ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']);
|
||||
$index_td = ' <td bgcolor="' . $cell_bgd . '" rowspan="' . count($indexes_info[$index_name]['Sequences']) . '">' . "\n";
|
||||
echo ' <tr>' . "\n";
|
||||
@@ -482,7 +482,7 @@ else if (!defined('PMA_IDX_INCLUDED')
|
||||
. ' <a href="sql.php?' . $url_query . '&sql_query=' . $local_query . '&zero_rows=' . $zero_rows . '" onclick="return confirmLink(this, \'' . $js_msg . '\')">' . $drop_link_text . '</a>' . "\n"
|
||||
. ' </td>' . "\n";
|
||||
|
||||
foreach($indexes_info[$index_name]['Sequences'] AS $row_no => $seq_index) {
|
||||
foreach ($indexes_info[$index_name]['Sequences'] AS $row_no => $seq_index) {
|
||||
if ($row_no > 0) {
|
||||
echo ' <tr>' . "\n";
|
||||
}
|
||||
@@ -510,7 +510,7 @@ else if (!defined('PMA_IDX_INCLUDED')
|
||||
else {
|
||||
// none indexes
|
||||
echo "\n" . ' <tr><td colspan=7" align="center">' . "\n";
|
||||
if($cfg['ErrorIconic']){
|
||||
if ($cfg['ErrorIconic']){
|
||||
echo '<img src="./images/s_warn.png" width="16" height="16" border="0" alt="Warning" hspace="2" align="absmiddle" />';
|
||||
}
|
||||
echo ' <b>' . $strNoIndex . '</b></td></tr>' . "\n\n";
|
||||
|
@@ -56,19 +56,19 @@ global $cfgRelation;
|
||||
if ($cfgRelation[$work]) {
|
||||
$select_parts = array();
|
||||
$row_fields = array();
|
||||
foreach($get_fields AS $nr => $get_field) {
|
||||
foreach ($get_fields AS $nr => $get_field) {
|
||||
$select_parts[] = PMA_backquote($get_field);
|
||||
$row_fields[$get_field] = 'cc';
|
||||
}
|
||||
|
||||
$where_parts = array();
|
||||
foreach($where_fields AS $_where => $_value) {
|
||||
foreach ($where_fields AS $_where => $_value) {
|
||||
$where_parts[] = PMA_backquote($_where) . ' = \'' . PMA_sqlAddslashes($_value) . '\'';
|
||||
}
|
||||
|
||||
$new_parts = array();
|
||||
$new_value_parts = array();
|
||||
foreach($new_fields AS $_where => $_value) {
|
||||
foreach ($new_fields AS $_where => $_value) {
|
||||
$new_parts[] = PMA_backquote($_where);
|
||||
$new_value_parts[] = PMA_sqlAddslashes($_value);
|
||||
}
|
||||
@@ -80,7 +80,7 @@ global $cfgRelation;
|
||||
|
||||
while ($table_copy_row = @PMA_DBI_fetch_assoc($table_copy_rs)) {
|
||||
$value_parts = array();
|
||||
foreach($table_copy_row AS $_key => $_val) {
|
||||
foreach ($table_copy_row AS $_key => $_val) {
|
||||
if (isset($row_fields[$_key]) && $row_fields[$_key] == 'cc') {
|
||||
$value_parts[] = PMA_sqlAddslashes($_val);
|
||||
}
|
||||
|
@@ -54,7 +54,7 @@ $multi_tables = (count($the_tables) > 1);
|
||||
|
||||
if ($multi_tables) {
|
||||
$tbl_list = '';
|
||||
foreach($the_tables AS $key => $table) {
|
||||
foreach ($the_tables AS $key => $table) {
|
||||
$tbl_list .= (empty($tbl_list) ? '' : ', ')
|
||||
. PMA_backquote(urldecode($table));
|
||||
}
|
||||
@@ -65,7 +65,7 @@ if ($multi_tables) {
|
||||
$tables_cnt = count($the_tables);
|
||||
$counter = 0;
|
||||
|
||||
foreach($the_tables AS $key => $table) {
|
||||
foreach ($the_tables AS $key => $table) {
|
||||
$table = urldecode($table);
|
||||
if ($counter + 1 >= $tables_cnt) {
|
||||
$breakstyle = '';
|
||||
@@ -311,7 +311,7 @@ foreach($the_tables AS $key => $table) {
|
||||
</tr>
|
||||
<?php
|
||||
echo "\n";
|
||||
foreach($indexes AS $index_no => $index_name) {
|
||||
foreach ($indexes AS $index_no => $index_name) {
|
||||
$cell_bgd = (($index_no % 2) ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']);
|
||||
$index_td = ' <td class="print" rowspan="' . count($indexes_info[$index_name]['Sequences']) . '">' . "\n";
|
||||
echo ' <tr>' . "\n";
|
||||
@@ -336,7 +336,7 @@ foreach($the_tables AS $key => $table) {
|
||||
. ' ' . (isset($indexes_info[$index_name]['Cardinality']) ? $indexes_info[$index_name]['Cardinality'] : $strNone) . "\n"
|
||||
. ' </td>' . "\n";
|
||||
|
||||
foreach($indexes_info[$index_name]['Sequences'] AS $row_no => $seq_index) {
|
||||
foreach ($indexes_info[$index_name]['Sequences'] AS $row_no => $seq_index) {
|
||||
if ($row_no > 0) {
|
||||
echo ' <tr>' . "\n";
|
||||
}
|
||||
|
@@ -49,7 +49,7 @@ if (isset($after_field)) {
|
||||
}
|
||||
|
||||
if (isset($selected) && is_array($selected)) {
|
||||
foreach($selected AS $o_fld_nr => $o_fld_val) {
|
||||
foreach ($selected AS $o_fld_nr => $o_fld_val) {
|
||||
?>
|
||||
<input type="hidden" name="selected[<?php echo $o_fld_nr; ?>]" value="<?php echo urlencode($o_fld_val); ?>" />
|
||||
<?php
|
||||
@@ -62,7 +62,7 @@ if (isset($selected) && is_array($selected)) {
|
||||
}
|
||||
|
||||
if (isset($true_selected) && is_array($true_selected)) {
|
||||
foreach($true_selected AS $o_fld_nr => $o_fld_val) {
|
||||
foreach ($true_selected AS $o_fld_nr => $o_fld_val) {
|
||||
?>
|
||||
<input type="hidden" name="true_selected[<?php echo $o_fld_nr; ?>]" value="<?php echo urlencode($o_fld_val); ?>" />
|
||||
<?php
|
||||
@@ -131,7 +131,7 @@ if (!$is_backup) {
|
||||
// the index as a value, not a key. Inserted here for easier maintaineance
|
||||
// and less code to change in existing files.
|
||||
if (isset($field_fulltext) && is_array($field_fulltext)) {
|
||||
foreach($field_fulltext AS $fulltext_nr => $fulltext_indexkey) {
|
||||
foreach ($field_fulltext AS $fulltext_nr => $fulltext_indexkey) {
|
||||
$submit_fulltext[$fulltext_indexkey] = $fulltext_indexkey;
|
||||
}
|
||||
}
|
||||
@@ -341,7 +341,7 @@ for ($i = 0 ; $i < $num_fields; $i++) {
|
||||
|
||||
$content_cells[$i][$ci] = '<select name="field_extra[]" id="field_' . $i . '_' . ($ci - $ci_offset) . '">';
|
||||
|
||||
if(!isset($row) || empty($row['Extra'])) {
|
||||
if (!isset($row) || empty($row['Extra'])) {
|
||||
$content_cells[$i][$ci] .= "\n";
|
||||
$content_cells[$i][$ci] .= '<option value=""></option>' . "\n";
|
||||
$content_cells[$i][$ci] .= '<option value="AUTO_INCREMENT">auto_increment</option>' . "\n";
|
||||
@@ -367,7 +367,7 @@ for ($i = 0 ; $i < $num_fields; $i++) {
|
||||
$content_cells[$i][$ci] .= ' <option value="auto">auto-detect</option>' . "\n";
|
||||
|
||||
if (is_array($available_mime['mimetype'])) {
|
||||
foreach($available_mime['mimetype'] AS $mimekey => $mimetype) {
|
||||
foreach ($available_mime['mimetype'] AS $mimekey => $mimetype) {
|
||||
$checked = (isset($row) && isset($row['Field']) && isset($mime_map[$row['Field']]['mimetype']) && ($mime_map[$row['Field']]['mimetype'] == str_replace('/', '_', $mimetype)) ? 'selected ' : '');
|
||||
$content_cells[$i][$ci] .= ' <option value="' . str_replace('/', '_', $mimetype) . '" ' . $checked . '>' . htmlspecialchars($mimetype) . '</option>';
|
||||
}
|
||||
@@ -379,7 +379,7 @@ for ($i = 0 ; $i < $num_fields; $i++) {
|
||||
$content_cells[$i][$ci] = '<select id="field_' . $i . '_' . ($ci - $ci_offset) . '" size="1" name="field_transformation[]">' . "\n";
|
||||
$content_cells[$i][$ci] .= ' <option value="" title="' . $strNone . '"></option>' . "\n";
|
||||
if (is_array($available_mime['transformation'])) {
|
||||
foreach($available_mime['transformation'] AS $mimekey => $transform) {
|
||||
foreach ($available_mime['transformation'] AS $mimekey => $transform) {
|
||||
$checked = (isset($row) && isset($row['Field']) && isset($mime_map[$row['Field']]['transformation']) && (preg_match('@' . preg_quote($available_mime['transformation_file'][$mimekey]) . '3?@i', $mime_map[$row['Field']]['transformation'])) ? 'selected ' : '');
|
||||
$tooltip = 'strTransformation_' . strtolower(preg_replace('@(\.inc\.php3?)$@', '', $available_mime['transformation_file'][$mimekey]));
|
||||
$tooltip = isset($$tooltip) ? $$tooltip : sprintf(str_replace('<br />', ' ', $strMIME_nodescription), 'PMA_transformation_' . $tooltip . '()');
|
||||
@@ -447,7 +447,7 @@ if ($cfg['DefaultPropDisplay'] == 'horizontal') {
|
||||
<tr>
|
||||
<?php
|
||||
if (is_array($header_cells)) {
|
||||
foreach($header_cells AS $header_nr => $header_val) {
|
||||
foreach ($header_cells AS $header_nr => $header_val) {
|
||||
?>
|
||||
<th><?php echo $header_val; ?></th>
|
||||
<?php
|
||||
@@ -458,14 +458,14 @@ if ($cfg['DefaultPropDisplay'] == 'horizontal') {
|
||||
<?php
|
||||
if (is_array($content_cells)) {
|
||||
$i = 0;
|
||||
foreach($content_cells AS $content_nr => $content_row) {
|
||||
foreach ($content_cells AS $content_nr => $content_row) {
|
||||
$i++;
|
||||
echo "\n" . '<tr>' . "\n";
|
||||
|
||||
$bgcolor = ($i % 2) ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo'];
|
||||
|
||||
if (is_array($content_row)) {
|
||||
foreach($content_row AS $content_row_nr => $content_row_val) {
|
||||
foreach ($content_row AS $content_row_nr => $content_row_val) {
|
||||
?>
|
||||
<td bgcolor="<?php echo $bgcolor; ?>"><?php echo $content_row_val; ?></td>
|
||||
<?php
|
||||
@@ -485,7 +485,7 @@ if ($cfg['DefaultPropDisplay'] == 'horizontal') {
|
||||
<?php
|
||||
if (is_array($header_cells)) {
|
||||
$i = 0;
|
||||
foreach($header_cells AS $header_nr => $header_val) {
|
||||
foreach ($header_cells AS $header_nr => $header_val) {
|
||||
echo "\n" . '<tr>' . "\n";
|
||||
?>
|
||||
<th align="right"><?php echo $header_val; ?></th>
|
||||
|
@@ -41,7 +41,7 @@ if (isset($sql_query)) {
|
||||
if (isset($primary_key)) {
|
||||
$sql_query .= ' WHERE ';
|
||||
$conj = '';
|
||||
foreach($primary_key AS $i => $key) {
|
||||
foreach ($primary_key AS $i => $key) {
|
||||
$sql_query .= $conj . '( ' . $key . ' ) ';
|
||||
$conj = 'OR ';
|
||||
}
|
||||
|
@@ -106,7 +106,7 @@ if (PMA_MYSQL_INT_VERSION >= 32334) {
|
||||
<select name="order_field" style="vertical-align: middle">
|
||||
<?php
|
||||
echo "\n";
|
||||
foreach($columns AS $junk => $fieldname) {
|
||||
foreach ($columns AS $junk => $fieldname) {
|
||||
echo ' <option value="' . htmlspecialchars($fieldname) . '">' . htmlspecialchars($fieldname) . '</option>' . "\n";
|
||||
}
|
||||
unset($columns);
|
||||
@@ -323,7 +323,7 @@ if ($cfgRelation['relwork'] && $tbl_type != "INNODB") {
|
||||
<?php echo $strReferentialIntegrity; ?><br />
|
||||
<?php
|
||||
echo "\n";
|
||||
foreach($foreign AS $master => $arr) {
|
||||
foreach ($foreign AS $master => $arr) {
|
||||
$join_query = 'SELECT ' . PMA_backquote($table) . '.* FROM '
|
||||
. PMA_backquote($table) . ' LEFT JOIN '
|
||||
. PMA_backquote($arr['foreign_table']);
|
||||
|
@@ -444,7 +444,7 @@ if ($cfg['PropertiesIconic']) {
|
||||
<tr><td>
|
||||
<!-- Printable view of the table -->
|
||||
<a href="tbl_printview.php?<?php echo $url_query; ?>"><?php
|
||||
if($cfg['PropertiesIconic']){
|
||||
if ($cfg['PropertiesIconic']){
|
||||
echo '<img src="./images/b_print.png" border="0" hspace="2" align="absmiddle" width="16" height="16" />';
|
||||
}
|
||||
echo $strPrintView;
|
||||
@@ -455,7 +455,7 @@ if ($cfg['Server']['relation']) {
|
||||
?>
|
||||
<!-- Work on Relations -->
|
||||
<a href="tbl_relation.php?<?php echo $url_query; ?>"><?php
|
||||
if($cfg['PropertiesIconic']){
|
||||
if ($cfg['PropertiesIconic']){
|
||||
echo '<img src="./images/b_relations.png" border="0" hspace="2" align="absmiddle" width="16" height="16" />';
|
||||
}
|
||||
echo $strRelationView;
|
||||
@@ -465,7 +465,7 @@ if ($cfg['Server']['relation']) {
|
||||
?>
|
||||
<!-- Let MySQL propose the optimal structure -->
|
||||
<a href="sql.php?<?php echo $url_query; ?>&session_max_rows=all&sql_query=<?php echo urlencode('SELECT * FROM ' . PMA_backquote($table) . ' PROCEDURE ANALYSE()'); ?>"><?php
|
||||
if($cfg['PropertiesIconic']){
|
||||
if ($cfg['PropertiesIconic']){
|
||||
echo '<img src="./images/b_tblanalyse.png" border="0" hspace="2" align="absmiddle" width="16" height="16" />';
|
||||
}
|
||||
echo $strStructPropose;
|
||||
@@ -490,7 +490,7 @@ if ($cfg['Server']['relation']) {
|
||||
<option value="--first--"><?php echo $strAtBeginningOfTable; ?></option>
|
||||
<optgroup label="<?php printf($strAfter, ''); ?>" title="<?php printf($strAfter, ''); ?>">
|
||||
<?php
|
||||
foreach($aryFields AS $junk => $fieldname) {
|
||||
foreach ($aryFields AS $junk => $fieldname) {
|
||||
echo ' <option value="' . htmlspecialchars($fieldname) . '">' . htmlspecialchars($fieldname) . '</option>' . "\n";
|
||||
}
|
||||
unset($aryFields);
|
||||
|
@@ -336,7 +336,7 @@ if (!isset($is_inside_querywindow) ||
|
||||
echo ' <div style="margin-bottom: 5px">' . "\n";
|
||||
echo ' <select name="id_bookmark" style="vertical-align: middle">' . "\n";
|
||||
echo ' <option value=""></option>' . "\n";
|
||||
foreach($bookmark_list AS $key => $value) {
|
||||
foreach ($bookmark_list AS $key => $value) {
|
||||
echo ' <option value="' . $value . '">' . htmlspecialchars($key) . '</option>' . "\n";
|
||||
}
|
||||
echo ' </select>' . "<br />\n";
|
||||
|
@@ -37,7 +37,7 @@ function PMA_generate_dropdown($dropdown_question,$radio_name,$choices,$selected
|
||||
echo '<select name="' . $radio_name . '" style="font-size: ' . $font_smallest . '">' . "\n";
|
||||
echo '<option value="nix" style="font-size: ' . $font_smallest . '" >--</option>' . "\n";
|
||||
|
||||
foreach($choices AS $one_value => $one_label) {
|
||||
foreach ($choices AS $one_value => $one_label) {
|
||||
echo '<option value="' . $one_value . '"';
|
||||
if ($selected_value == $one_value) {
|
||||
echo ' selected="selected" ';
|
||||
@@ -73,7 +73,7 @@ if ($cfgRelation['relwork']
|
||||
|
||||
// u p d a t e s f o r I n t e r n a l r e l a t i o n s
|
||||
|
||||
foreach($destination AS $master_field => $foreign_string) {
|
||||
foreach ($destination AS $master_field => $foreign_string) {
|
||||
if ($foreign_string != 'nix') {
|
||||
list($foreign_db, $foreign_table, $foreign_field) = explode('.', $foreign_string);
|
||||
if (!isset($existrel[$master_field])) {
|
||||
@@ -112,7 +112,7 @@ if ($cfgRelation['relwork']
|
||||
// ( for now, one index name; we keep the definitions if the
|
||||
// foreign db is not the same)
|
||||
if (isset($destination_innodb)) {
|
||||
foreach($destination_innodb AS $master_field => $foreign_string) {
|
||||
foreach ($destination_innodb AS $master_field => $foreign_string) {
|
||||
if ($foreign_string != 'nix') {
|
||||
list($foreign_db, $foreign_table, $foreign_field) = explode('.', $foreign_string);
|
||||
if (!isset($existrel_innodb[$master_field])) {
|
||||
@@ -229,7 +229,7 @@ if ($cfgRelation['displaywork']
|
||||
|
||||
if ($cfgRelation['commwork']
|
||||
&& isset($submit_comm) && $submit_comm == 'true') {
|
||||
foreach($comment AS $key => $value) {
|
||||
foreach ($comment AS $key => $value) {
|
||||
// garvin: I exported the snippet here to a function (relation.lib.php) , so it can be used multiple times throughout other pages where you can set comments.
|
||||
PMA_setComment($db, $table, $key, $value);
|
||||
} // end while (transferred data)
|
||||
@@ -391,7 +391,7 @@ if ($col_rs && PMA_DBI_num_rows($col_rs) > 0) {
|
||||
$foreign_field = FALSE;
|
||||
}
|
||||
$seen_key = FALSE;
|
||||
foreach($selectboxall AS $key => $value) {
|
||||
foreach ($selectboxall AS $key => $value) {
|
||||
echo ' '
|
||||
. '<option value="' . htmlspecialchars($key) . '"';
|
||||
if ($foreign_field && $key == $foreign_field) {
|
||||
@@ -428,7 +428,7 @@ if ($col_rs && PMA_DBI_num_rows($col_rs) > 0) {
|
||||
}
|
||||
|
||||
$found_foreign_field = FALSE;
|
||||
foreach($selectboxall_innodb AS $key => $value) {
|
||||
foreach ($selectboxall_innodb AS $key => $value) {
|
||||
echo ' '
|
||||
. '<option value="' . htmlspecialchars($key) . '"';
|
||||
if ($foreign_field && $key == $foreign_field) {
|
||||
@@ -505,7 +505,7 @@ if ($col_rs && PMA_DBI_num_rows($col_rs) > 0) {
|
||||
<option value="">---</option>
|
||||
<?php
|
||||
echo "\n";
|
||||
foreach($save_row AS $row) {
|
||||
foreach ($save_row AS $row) {
|
||||
echo ' <option value="' . htmlspecialchars($row['Field']) . '"';
|
||||
if (isset($disp) && $row['Field'] == $disp) {
|
||||
echo ' selected="selected"';
|
||||
|
@@ -44,7 +44,7 @@ if (isset($after_insert) && $after_insert == 'new_insert') {
|
||||
. '&dontlimitchars=' . $dontlimitchars
|
||||
. (empty($sql_query) ? '' : '&sql_query=' . urlencode($sql_query));
|
||||
if (isset($primary_key)) {
|
||||
foreach($primary_key AS $pk) {
|
||||
foreach ($primary_key AS $pk) {
|
||||
$goto .= '&primary_key[]=' . $pk;
|
||||
}
|
||||
}
|
||||
@@ -104,7 +104,7 @@ PMA_DBI_select_db($db);
|
||||
$query = array();
|
||||
$message = '';
|
||||
|
||||
foreach($loop_array AS $primary_key_index => $enc_primary_key) {
|
||||
foreach ($loop_array AS $primary_key_index => $enc_primary_key) {
|
||||
// skip fields to be ignored
|
||||
if (!$using_key && isset($GLOBALS['insert_ignore_' . $enc_primary_key])) continue;
|
||||
|
||||
@@ -122,7 +122,7 @@ foreach($loop_array AS $primary_key_index => $enc_primary_key) {
|
||||
$me_fields_type = isset($fields_type['multi_edit']) && isset($fields_type['multi_edit'][$enc_primary_key]) ? $fields_type['multi_edit'][$enc_primary_key] : null;
|
||||
$me_fields_null = isset($fields_null['multi_edit']) && isset($fields_null['multi_edit'][$enc_primary_key]) ? $fields_null['multi_edit'][$enc_primary_key] : null;
|
||||
|
||||
foreach($me_fields AS $encoded_key => $val) {
|
||||
foreach ($me_fields AS $encoded_key => $val) {
|
||||
$key = urldecode($encoded_key);
|
||||
$fieldlist .= PMA_backquote($key) . ', ';
|
||||
|
||||
@@ -199,7 +199,7 @@ $sql_query = implode(';', $query) . ';';
|
||||
$total_affected_rows = 0;
|
||||
$last_message = '';
|
||||
|
||||
foreach($query AS $query_index => $single_query) {
|
||||
foreach ($query AS $query_index => $single_query) {
|
||||
if ($cfg['IgnoreMultiSubmitErrors']) {
|
||||
$result = PMA_DBI_try_query($single_query);
|
||||
} else {
|
||||
|
@@ -72,7 +72,7 @@ if (!empty($submit_mult)) {
|
||||
$primary_key = array();
|
||||
// garvin: As we got the fields to be edited from the 'rows_to_delete' checkbox, we use the index of it as the
|
||||
// indicating primary key. Then we built the array which is used for the tbl_change.php script.
|
||||
foreach($rows_to_delete AS $i_primary_key => $del_query) {
|
||||
foreach ($rows_to_delete AS $i_primary_key => $del_query) {
|
||||
$primary_key[] = urldecode($i_primary_key);
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ if (!empty($submit_mult)) {
|
||||
$sql_query = urldecode($sql_query);
|
||||
// garvin: As we got the fields to be edited from the 'rows_to_delete' checkbox, we use the index of it as the
|
||||
// indicating primary key. Then we built the array which is used for the tbl_change.php script.
|
||||
foreach($rows_to_delete AS $i_primary_key => $del_query) {
|
||||
foreach ($rows_to_delete AS $i_primary_key => $del_query) {
|
||||
$primary_key[] = urldecode($i_primary_key);
|
||||
}
|
||||
|
||||
|
@@ -47,7 +47,7 @@ if ($cfgRelation['commwork'] && $cfgRelation['mimework']) {
|
||||
$mime_map = PMA_getMime($db, $table);
|
||||
$mime_options = PMA_transformation_getOptions((isset($mime_map[urldecode($transform_key)]['transformation_options']) ? $mime_map[urldecode($transform_key)]['transformation_options'] : ''));
|
||||
|
||||
foreach($mime_options AS $key => $option) {
|
||||
foreach ($mime_options AS $key => $option) {
|
||||
if (substr($option, 0, 10) == '; charset=') {
|
||||
$mime_options['charset'] = $option;
|
||||
}
|
||||
@@ -89,7 +89,7 @@ if (!isset($resize)) {
|
||||
$ratioWidth = $srcWidth/$newWidth;
|
||||
$ratioHeight = $srcHeight/$newHeight;
|
||||
|
||||
if( $ratioWidth < $ratioHeight){
|
||||
if ($ratioWidth < $ratioHeight){
|
||||
$destWidth = $srcWidth/$ratioHeight;
|
||||
$destHeight = $newHeight;
|
||||
}else{
|
||||
|
Reference in New Issue
Block a user