You are here

function module_builder_home in Module Builder 6

Menu callback; home page

1 string reference to 'module_builder_home'
module_builder_menu in ./module_builder.module
Implementation of hook_menu().

File

./module_builder.pages.inc, line 8

Code

function module_builder_home() {
  $items = array();
  $new = l('New module!', 'admin/build/module_builder/new', array(
    'html' => TRUE,
  ));
  $query = db_query("SELECT name, mid FROM {module_builder_basic}");
  while ($result = db_fetch_array($query)) {
    $items[] = l($result['name'], 'admin/build/module_builder/edit/' . $result['mid']);
  }
  if (!count($items)) {
    $output = '<br /><h3>' . $new . '</h3>';
  }
  else {
    $items[] = '<strong>' . $new . '</strong>';
    $output = theme('item_list', $items);
  }
  return $output;
}