| 1 |
<?php |
<?php |
| 2 |
//$Id$ |
//$Id: valuelist.module,v 1.2 2008/02/26 15:39:56 usonian Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 167 |
* Edit access is required. Create/Delete access optional. |
* Edit access is required. Create/Delete access optional. |
| 168 |
*/ |
*/ |
| 169 |
function valuelist_dashboard() { |
function valuelist_dashboard() { |
|
if (!user_access('create value lists')) { |
|
|
drupal_access_denied(); |
|
|
} |
|
| 170 |
|
|
| 171 |
$content = ''; |
$content = ''; |
| 172 |
|
|
| 173 |
/* Retrieve a list of all items in the variable table whose `name` begins with 'valuelist_': */ |
/* Retrieve a list of all items in the variable table whose `name` begins with 'valuelist_': */ |
| 174 |
$result = db_query("SELECT `name` FROM {variable} WHERE `name` like 'valuelist_%' ORDER BY `name` ASC"); |
$result = db_query("SELECT `name` FROM {variable} WHERE `name` like 'valuelist_%' ORDER BY `name` ASC"); |
|
|
|
|
|
|
| 175 |
|
|
| 176 |
if (db_num_rows($result) == 0) { |
if (db_num_rows($result) == 0) { |
| 177 |
$content .= t("No value lists found."); |
$content .= t("No value lists found."); |
| 190 |
$header = array( |
$header = array( |
| 191 |
t('Name'), |
t('Name'), |
| 192 |
t('Value List'), |
t('Value List'), |
| 193 |
t(' ') |
t(' ') |
| 194 |
); |
); |
| 195 |
|
|
| 196 |
$content .= theme('table', $header, $rows); |
$content .= theme('table', $header, $rows); |