getHeader(); $scripts = $header->getScripts(); $scripts->addFile('jquery/jquery.uitablefilter.js'); $scripts->addFile('jquery/jquery.tablesorter.js'); $scripts->addFile('db_central_columns.js'); $cfgCentralColumns = PMA_centralColumnsGetParams(); $pmadb = $cfgCentralColumns['db']; $pmatable = $cfgCentralColumns['table']; $max_rows = $GLOBALS['cfg']['MaxRows']; if (isset($_POST['delete_save'])) { $col_name = array(); $col_name[] = $_REQUEST['col_name']; $tmp_msg = PMA_deleteColumnsFromList($col_name, false); } if (isset($_REQUEST['total_rows']) && $_REQUEST['total_rows']) { $total_rows = $_REQUEST['total_rows']; } else { $result = PMA_getColumnsList($db, 0, 0); $total_rows = count($result); } if (isset($_REQUEST['pos'])) { $pos = $_REQUEST['pos']; } else { $pos = 0; } if ($total_rows <= 0) { $response->addHTML( '
There are no columns in central list to display for the ' . 'current database.
' ); $columnAdd = PMA_getHTMLforAddCentralColumn($total_rows, $pos, $db); $response->addHTML($columnAdd); exit; } $table_navigation_html = PMA_getHTMLforTableNavigation($total_rows, $pos, $db); $response->addHTML($table_navigation_html); $columnAdd = PMA_getHTMLforAddCentralColumn($total_rows, $pos, $db); $response->addHTML($columnAdd); $deleteRowForm = '
' . PMA_URL_getHiddenInputs( $db ) . '' . '' . '
'; $response->addHTML($deleteRowForm); $table_struct = '
' . ''; $response->addHTML($table_struct); $tableheader = PMA_getCentralColumnsTableHeader(); $response->addHTML($tableheader); $result = PMA_getColumnsList($db, $pos, $max_rows); $odd_row = false; $row_num=0; foreach ($result as $row) { $tableHtmlRow = PMA_getHTMLforCentralColumnsTableRow( $row, $odd_row, $row_num, $db ); $response->addHTML($tableHtmlRow); $odd_row = !$odd_row; $row_num++; } $response->addHTML('
'); $message = PMA_Message::success( sprintf(__('Showing row(s) %1$s - %2$s'), ($pos + 1), ($pos + count($result))) ); if (isset($tmp_msg) && $tmp_msg != true) { $message->addMessage($tmp_msg); } ?>