You are here

function imce_admin in IMCE 6

Same name and namespace in other branches
  1. 6.2 inc/imce.admin.inc \imce_admin()
  2. 7 inc/imce.admin.inc \imce_admin()

Admin main page.

2 string references to 'imce_admin'
imce_admin_form in inc/admin.inc
Admin form.
imce_menu in ./imce.module
Implementation of hook_menu().

File

inc/admin.inc, line 6

Code

function imce_admin() {
  $profiles = variable_get('imce_profiles', array());
  if (empty($profiles)) {
    imce_install_profiles();
  }
  $header = array(
    t('Profile name'),
    array(
      'data' => t('Operations'),
      'colspan' => 2,
    ),
  );
  $rows = array();
  foreach ($profiles as $pid => $profile) {
    $rows[] = array(
      $profile['name'],
      l(t('Edit'), 'admin/settings/imce/profile/edit/' . $pid),
      $pid == 1 ? '' : l(t('Delete'), 'admin/settings/imce/profile/delete/' . $pid),
    );
  }
  $rows[] = array(
    '',
    array(
      'data' => l(t('Add new profile'), 'admin/settings/imce/profile'),
      'colspan' => 2,
    ),
  );
  $output = '<h2 class="title">' . t('Configuration profiles') . '</h2>';
  $output .= theme('table', $header, $rows);
  $output .= drupal_get_form('imce_admin_form');
  return $output;
}