execute it, else display the headers */ if (isset($submit_sql) && preg_match('@^SELECT@i', $encoded_sql_query)) { $goto = 'db_details.php'; $zero_rows = htmlspecialchars($strSuccess); $sql_query = urldecode($encoded_sql_query); require('./sql.php'); exit(); } else { $sub_part = '_qbe'; require('./db_details_common.php'); $url_query .= '&goto=db_details_qbe.php'; require('./db_details_db_info.php'); } if (isset($submit_sql) && !preg_match('@^SELECT@i', $encoded_sql_query)) { echo '

' . $strHaveToShow . '

'; } /** * Initialize some variables */ if (empty($Columns)) { $Columns = 3; // Initial number of columns } if (!isset($Add_Col)) { $Add_Col = ''; } if (!isset($Add_Row)) { $Add_Row = ''; } if (!isset($Rows)) { $Rows = ''; } if (!isset($InsCol)) { $InsCol = ''; } if (!isset($DelCol)) { $DelCol = ''; } if (!isset($prev_Criteria)) { $prev_Criteria = ''; } // workaround for a PHP3 problem if (!isset($Criteria)) { //$Criteria = ''; $Criteria = array(); for ($i = 0; $i < $Columns; $i++) { $Criteria[$i] = ''; } } if (!isset($InsRow)) { // $InsRow = ''; $InsRow = array(); for ($i = 0; $i < $Columns; $i++) { $InsRow[$i] = ''; } } if (!isset($DelRow)) { // $DelRow = ''; $DelRow = array(); for ($i = 0; $i < $Columns; $i++) { $DelRow[$i] = ''; } } if (!isset($AndOrRow)) { // $AndOrRow = ''; $AndOrRow = array(); for ($i = 0; $i < $Columns; $i++) { $AndOrRow[$i] = ''; } } if (!isset($AndOrCol)) { // $AndOrCol = ''; $AndOrCol = array(); for ($i = 0; $i < $Columns; $i++) { $AndOrCol[$i] = ''; } } // minimum width $wid = 12; $col = $Columns + $Add_Col; if ($col < 0) { $col = 0; } $row = $Rows + $Add_Row; if ($row < 0) { $row = 0; } /** * Prepares the form */ $tbl_result = PMA_mysql_list_tables($db); $tbl_result_cnt = mysql_num_rows($tbl_result); $i = 0; $k = 0; // The tables list sent by a previously submitted form if (!empty($TableList)) { $cnt_table_list = count($TableList); for ($x = 0; $x < $cnt_table_list; $x++) { $tbl_names[urldecode($TableList[$x])] = ' selected="selected"'; } } // end if // The tables list gets from MySQL while ($i < $tbl_result_cnt) { $tbl = PMA_mysql_tablename($tbl_result, $i); $fld_results = @PMA_mysql_list_fields_alternate($db, $tbl) or PMA_mysqlDie(PMA_mysql_error(), 'PMA_mysql_list_fields_alternate(' . $db . ', ' . $tbl . ')', FALSE, $err_url); $fld_results_cnt = ($fld_results) ? count($fld_results) : 0; $j = 0; if (empty($tbl_names[$tbl]) && !empty($TableList)) { $tbl_names[$tbl] = ''; } else { $tbl_names[$tbl] = ' selected="selected"'; } // end if // The fields list per selected tables if ($tbl_names[$tbl] == ' selected="selected"') { $fld[$k++] = PMA_backquote($tbl) . '.*'; while ($j < $fld_results_cnt) { $fld[$k] = PMA_convert_display_charset($fld_results[$j]['Field']); $fld[$k] = PMA_backquote($tbl) . '.' . PMA_backquote($fld[$k]); // increase the width if necessary if (strlen($fld[$k]) > $wid) { $wid = strlen($fld[$k]); } //end if $k++; $j++; } // end while } // end if $i++; } // end if mysql_free_result($tbl_result); // largest width found $realwidth = $wid . 'ex'; /** * Displays the form */ ?>
 : 
 : 
 :  />
 : 
 :  : />  
 :  : />  
 :  : />
 :  : />
 :   : />    : />
  
 : />    : />
  
 :
 :
 :