You are here

function fillpdf_admin in FillPDF 5

1 string reference to 'fillpdf_admin'
fillpdf_menu in ./fillpdf.module
Implementation of hook_menu().

File

./fillpdf.module, line 139
Allows mappings of PDFs to site content

Code

function fillpdf_admin() {
  $result = db_query("SELECT * FROM {fillpdf_forms} ORDER BY title");
  $header = array(
    t('Title'),
    array(
      'data' => t('Operations'),
      'colspan' => '4',
    ),
  );
  while ($pdf_form = db_fetch_object($result)) {
    $row = array();
    $row[] = check_plain($pdf_form->title);
    $row[] = l(t('Edit PDF'), "admin/content/fillpdf/form/{$pdf_form->fid}/edit");
    $row[] = l(t('Edit fields'), "admin/content/fillpdf/form/{$pdf_form->fid}/list");
    $row[] = l(t('Add field'), "admin/content/fillpdf/form/{$pdf_form->fid}/add");
    $row[] = l(t('Generate Fields From PDF'), "admin/content/fillpdf/form/{$pdf_form->fid}/generate");
    $rows[] = $row;
  }
  if (empty($rows)) {
    $rows[] = array(
      array(
        'data' => t('No PDFs available.'),
        'colspan' => '5',
        'class' => 'message',
      ),
    );
  }
  return theme('table', $header, $rows, array(
    'id' => 'fillpdf',
  ));
}