/[eiffelstudio]/trunk/Documentation/tools/web/trunk/drupal/sites/all/modules/isedoc/isedoc.report.inc
ViewVC logotype

Diff of /trunk/Documentation/tools/web/trunk/drupal/sites/all/modules/isedoc/isedoc.report.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 74841 by jfiat, Fri Sep 26 11:47:11 2008 UTC revision 74842 by jfiat, Fri Sep 26 13:05:31 2008 UTC
# Line 2  Line 2 
2    
3  require_once ("isedoc.lib.inc");  require_once ("isedoc.lib.inc");
4    
5  function isedoc_report($target,$a_op='') {  function isedoc_report($a_type='doc', $target,$a_op='') {
6    $output = '';    $output = '';
7  drupal_add_css(drupal_get_path('module', 'system') .'/system.css');  drupal_add_css(drupal_get_path('module', 'system') .'/system.css');
8  drupal_add_js('misc/collapse.js');  drupal_add_js('misc/collapse.js');
# Line 11  drupal_add_js('misc/collapse.js'); Line 11  drupal_add_js('misc/collapse.js');
11    if ($op == '') {    if ($op == '') {
12      $op = 'all';      $op = 'all';
13    }    }
14    if (user_access('admin isedoc')) {    if (user_access('admin isedoc') or user_access('query isedoc')) {
15      $books = array();      $books = array();
16      $all_books = book_get_books();      $all_books = book_get_books();
17      switch ($target) {      switch ($target) {
# Line 38  drupal_add_js('misc/collapse.js'); Line 38  drupal_add_js('misc/collapse.js');
38        } else {        } else {
39          $output .= "Report $target: completed.";          $output .= "Report $target: completed.";
40        }        }
41        $output .= "<br/>".l(t("Report other books"), "isedoc/report/_")."<br/>";        $output .= "<br/>".l(t("Report other books"), "isedoc/report/$a_type/_")."<br/>";
42      } else {      } else {
43          $output .= "<ul>";          $output .= "<ul>";
44          $output .= "<li><strong>".l(t("Report all the books"), "isedoc/report/all")."</strong></li>";          $output .= "<li><strong>".l(t("Report all the books"), "isedoc/report/$a_type/all")."</strong></li>";
45          foreach($all_books as $b) {          foreach($all_books as $b) {
46                  $bn = isedoc_book_title_to_book_name_id($b['title']);                  $bn = isedoc_book_title_to_book_name_id($b['title']);
47                  $output .= "<li>".l(t("Report only: ").$bn, "isedoc/report/$bn")."</li>";                  $output .= "<li>".l(t("Report only: ").$bn, "isedoc/report/$a_type/$bn")."</li>";
48          }          }
49          $output .= "</ul>";          $output .= "</ul>";
50      }      }
51    } else {    } else {
52      drupal_access_denied();      //drupal_access_denied();
53      $output .= "Report $target: access denied.";      $output .= "Report $target: access denied.";
54    }    }
55    return $output;    return $output;

Legend:
Removed from v.74841  
changed lines
  Added in v.74842

  ViewVC Help
Powered by ViewVC 1.1.23