/**
  *
  */
 function _getReportSettings($reportId)
 {
     $html = '';
     $um =& UserManager::instance();
     $user = $um->getCurrentUser();
     $dpm =& Docman_PermissionsManager::instance($this->groupId);
     $isAdmin = $dpm->userCanAdmin($user);
     $reportFactory = new Docman_ReportFactory($this->groupId);
     $r = $reportFactory->getReportById($reportId);
     if ($r != null && $r->getGroupId() == $this->groupId) {
         $txts = array($GLOBALS['Language']->getText('plugin_docman', 'report_scope_I'), $GLOBALS['Language']->getText('plugin_docman', 'report_scope_P'));
         $vals = array('I', 'P');
         $html .= '<p>' . $GLOBALS['Language']->getText('plugin_docman', 'report_settings_report_info') . '</p>';
         $html .= '<form name="docman_report_update" method="post" action="?" class="docman_form">';
         $html .= '<input type="hidden" name="group_id" value="' . $this->groupId . '">';
         $html .= '<input type="hidden" name="action" value="report_upd">';
         $html .= '<input type="hidden" name="report_id" value="' . $r->getId() . '">';
         $html .= '<table>';
         // Scope
         if ($dpm->userCanAdmin($user)) {
             $html .= '<tr>';
             $html .= '<td>' . $GLOBALS['Language']->getText('plugin_docman', 'report_settings_report_scope') . '</td>';
             $html .= '<td>';
             $html .= html_build_select_box_from_arrays($vals, $txts, 'scope', $r->getScope(), false);
             $html .= '</td>';
             $html .= '</tr>';
         }
         // Description
         $html .= '<tr>';
         $html .= '<td>' . $GLOBALS['Language']->getText('plugin_docman', 'report_settings_report_description') . '</td>';
         $html .= '<td>';
         $html .= '<textarea name="description">' . $r->getDescription() . '</textarea>';
         $html .= '</td>';
         $html .= '</tr>';
         // Title
         $title = "";
         if ($r->getTitle() !== null) {
             $title = $r->getTitle();
         }
         $html .= '<tr>';
         $html .= '<td>' . $GLOBALS['Language']->getText('plugin_docman', 'report_settings_report_title') . '</td>';
         $html .= '<td>';
         $html .= '<input type="text" name="title" value="' . $title . '" class="text_field" />';
         $html .= '</td>';
         $html .= '</tr>';
         // Image
         $image = "";
         if ($r->getImage() !== null) {
             $image = $r->getImage();
         }
         $html .= '<tr>';
         $html .= '<td>' . $GLOBALS['Language']->getText('plugin_docman', 'report_settings_report_image') . '</td>';
         $html .= '<td>';
         $html .= '<input type="text" name="image" value="' . $image . '" />';
         $html .= ' ' . $GLOBALS['Language']->getText('plugin_docman', 'report_settings_report_image_help');
         $html .= '</td>';
         $html .= '</tr>';
         // Current image
         $html .= '<tr>';
         $html .= '<td>';
         $html .= $GLOBALS['Language']->getText('plugin_docman', 'report_settings_report_image_current');
         $html .= '</td>';
         $reportHtml = new Docman_ReportHtml($r, $this, $this->defaultUrl);
         $html .= '<td>';
         $html .= $reportHtml->getReportImage();
         $html .= '</td>';
         $html .= '</tr>';
         // Submit
         $html .= '<tr>';
         $html .= '<td colspan="2">';
         $html .= '<input type="submit" name="sub" value="' . $GLOBALS['Language']->getText('global', 'btn_update') . '">';
         $html .= '</td>';
         $html .= '</tr>';
         $html .= '</table>';
         $html .= '</form>';
     }
     return $html;
 }