function theme_dba_database_overview_form in Database Administration 5
File
- ./
dba.module, line 450 - Allows administrators direct access to their Drupal database. Written by Jeremy Andrews <jeremy@kerneltrap.org>, June 2004. PostgreSQL functionality provided by AAM <aam@ugpl.de> Major security audit, porting, and maintenance by Derek…
Code
function theme_dba_database_overview_form($form) {
$output = '';
$rows = array();
$database = dba_get_database();
drupal_set_title(t('View database %database', array(
'%database' => $database,
)));
// It'd be great to use the pager and tablesort, but doesn't appear possible.
$header = array(
'',
t('Tables'),
t('Rows'),
);
$tables = dba_get_tables();
foreach ($tables as $table) {
$count = dba_get_row_count($table);
$checkbox = drupal_render($form['tables'][$table]);
$rows[] = array(
$checkbox,
l($table, "admin/build/database/table/{$table}/view"),
$count,
);
}
$output .= dba_select_all_js();
$output .= theme('table', $header, $rows);
$output .= dba_select_all_js();
$output .= drupal_render($form);
drupal_set_html_head(checkoff_head());
return $output;
}