You are here

function epub_admin_overview in Epub 6

Returns an administrative overview of all ePubs.

Return value

The html representation of the ePub admin section.

1 string reference to 'epub_admin_overview'
epub_menu in ./epub.module
Implementation of hook_menu().

File

./epub.admin.inc, line 14
Admin page callbacks for the book module.

Code

function epub_admin_overview() {
  $result = db_query(db_rewrite_sql("SELECT * FROM {node} WHERE type = 'epub' ORDER BY title"));
  $headers = array(
    t('ePub'),
    t('Operations'),
    '',
    '',
  );
  $rows = array();
  while ($epub = db_fetch_object($result)) {
    $rows[] = array(
      l($epub->title, "node/{$epub->nid}"),
      l(t('Download'), "node/{$epub->nid}/epub"),
      l(t('Edit'), "node/{$epub->nid}/edit"),
      l(t('Delete'), "node/{$epub->nid}/delete"),
    );
  }
  return theme('table', $headers, $rows);
}