| 1 |
<?php |
<?php |
| 2 |
// $Id: regcode.admin.php,v 1.1.2.15 2009/10/08 20:58:47 aidan Exp $ |
// $Id: regcode.admin.php,v 1.1.2.16 2009/10/09 12:08:07 aidan Exp $ |
| 3 |
|
|
| 4 |
require_once 'regcode.api.php'; |
require_once 'regcode.api.php'; |
| 5 |
|
|
| 394 |
|
|
| 395 |
$form = array(); |
$form = array(); |
| 396 |
|
|
| 397 |
|
// Pager heading text |
| 398 |
|
$visible = db_result(regcode_admin_list_getresource(true)); |
| 399 |
|
$total = regcode_count(); |
| 400 |
|
$description = t('Showing @visible records out of @total', |
| 401 |
|
array('@visible' => $visible, '@total' => $total)); |
| 402 |
|
|
| 403 |
$form['filter'] = array( |
$form['filter'] = array( |
| 404 |
'#type' => 'fieldset', |
'#type' => 'fieldset', |
| 405 |
'#title' => t('Filter results:'), |
'#title' => t('Filter results: ') . $description, |
| 406 |
'#attributes' => array('class' => 'container-inline'), |
'#attributes' => array('class' => 'container-inline'), |
| 407 |
); |
); |
| 408 |
|
|
| 409 |
// Load all of the available list filters |
// Load all of the available list filters |
| 414 |
|
|
| 415 |
// Let other modules modify the form |
// Let other modules modify the form |
| 416 |
$form = module_invoke_all('regcode_filters', $form); |
$form = module_invoke_all('regcode_filters', $form); |
| 417 |
|
|
| 418 |
// Display the filtered list |
// Display the filtered list |
| 419 |
$form['list'] = array( |
$form['list'] = array( |
| 420 |
'#type' => 'markup', |
'#type' => 'markup', |
| 598 |
if (empty($rows)) { |
if (empty($rows)) { |
| 599 |
$output = '<p>» ' . t('No codes found.') . '</p>'; |
$output = '<p>» ' . t('No codes found.') . '</p>'; |
| 600 |
} else { |
} else { |
| 601 |
$output .= theme('table', $header, $rows); |
$output = theme('table', $header, $rows); |
| 602 |
$output .= theme('pager'); |
$output .= theme('pager'); |
| 603 |
} |
} |
| 604 |
|
|