You are here

function certificate_sets_checks_page in Certificate 6

Page to show certificate type criteria.

1 string reference to 'certificate_sets_checks_page'
certificate_menu in ./certificate.module
Implementation of hook_menu().

File

./certificate.admin.inc, line 140
Administrative pages for the module.

Code

function certificate_sets_checks_page($type) {
  $out = '';
  $out .= "<h3>Editing criteria for <em>\"{$type->name}\"</em></h3>";
  $out .= "<p>The <em>\"{$type->title}\"</em> template will show when all of the criteria are met.</p>";
  $sql = 'select * from {certificate_criteria}
    where type_id = %d';
  $query = db_query($sql, $type->type_id);
  while ($row = db_fetch_array($query)) {
    $row['check_key'] = unserialize($row['check_key']);
    $row['check_key'] = $row['check_key'][1];
    $row['operations'] = certificate_sets_checks_links($row);
    $rows[] = $row;
  }
  $out .= theme('table', array(
    'Type ID',
    'Criteria ID',
    'Check Type',
    'Check Key',
    'Check Value',
    'Operations',
  ), $rows);
  $out .= drupal_get_form('certificate_sets_checks_form', $type);
  return $out;
}