You are here

function forena_user_reports in Forena Reports 6

Same name and namespace in other branches
  1. 8 forena.module \forena_user_reports()
  2. 6.2 forena.module \forena_user_reports()
  3. 7.5 forena.module \forena_user_reports()
  4. 7 forena.module \forena_user_reports()
  5. 7.2 forena.module \forena_user_reports()
  6. 7.3 forena.module \forena_user_reports()
  7. 7.4 forena.module \forena_user_reports()
1 string reference to 'forena_user_reports'
forena_menu in ./forena.module
Implementation of hook_menu.

File

./forena.module, line 349

Code

function forena_user_reports() {
  require_once 'forena.common.inc';
  $reports = forena_get_user_reports();
  if (!$reports) {
    $output = 'No Reports Found';
  }
  $report_repos = variable_get('forena_path', 'reports');
  foreach ($reports as $category => $reports) {
    $links .= '<li><a href="#' . urlencode($category) . '">' . $category . '</a></li> ';
    $output .= '<h3><a name="' . urlencode($category) . '"/>' . $category . '</h3>';
    $output .= '<ul>';
    foreach ($reports as $r) {
      $output .= '<li>' . l($r['title'], $report_repos . '/' . str_replace('/', '.', $r['report_name'])) . '</li>';
    }
    $output .= '</ul>';
  }
  return $output;
}