Subversion Repositories computer_asset_manager_v1

Rev

Rev 87 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 87 Rev 104
Line 1... Line 1...
1
<?php
1
<?php
2
 
2
 
3
   define(VERSION,'1.7.0');
3
   define(VERSION,'1.7.0');
4
   define(BUILD_DATE,'$Date: 2019-05-12 00:51:50 -0500 (Sun, 12 May 2019) $');
4
   define(BUILD_DATE,'$Date: 2020-01-19 22:53:26 -0600 (Sun, 19 Jan 2020) $');
5
   define(SVN_REV,'$Rev: 87 $' );
5
   define(SVN_REV,'$Rev: 104 $' );
6
 
6
 
7
   include_once("database.php");
7
   include_once("database.php");
8
   
8
   
9
   include_once("library.php");
9
   include_once("library.php");
10
   include_once('reports.php');
10
   include_once('reports.php');
Line 126... Line 126...
126
     Not all reports will use the above values, but if they are passed in to the parameters array, they will not cause problems with
126
     Not all reports will use the above values, but if they are passed in to the parameters array, they will not cause problems with
127
     the report
127
     the report
128
     
128
     
129
     NOTE: the reports will still run in interactive mode. In the above query, it will ask for the device.
129
     NOTE: the reports will still run in interactive mode. In the above query, it will ask for the device.
130
   */
130
   */
131
   function screenReports ( $screenName, $parameters = array(), $showTitle = false ) {
131
   function screenReports ( $screenName, $parameters = array(), $showTitle = false, $titleBlocks = array() ) {
132
      global $MODULE_REPORTS;
132
      global $MODULE_REPORTS;
133
      $result = '';
133
      $result = '';
134
      if ($MODULE_REPORTS[$screenName]) {
134
      if ($MODULE_REPORTS[$screenName]) {
135
         $sql = 'select report_id from report where screen_report = ' . $MODULE_REPORTS[$screenName];
135
         $sql = 'select report_id from report where screen_report = ' . $MODULE_REPORTS[$screenName];
136
         $reportIDs = sqlValuesToKeys ($sql);
136
         $reportIDs = sqlValuesToKeys ($sql);
137
         // print "<pre>"; print_r( $parameters ); print "</pre>";
137
         // print "<pre>"; print_r( $parameters ); print "</pre>";
138
         foreach ( $reportIDs as $thisReport => $data ) {
138
         foreach ( $reportIDs as $thisReport => $data ) {
139
            $report = new Report;
139
            $report = new Report;
140
            $report->loadFromDatabase ( $thisReport );
140
            $report->loadFromDatabase ( $thisReport );
141
            $result .= $report->run($parameters, '', $showTitle );
141
            $result .= $report->run($parameters, '', $showTitle, $titleBlocks );
142
         }
142
         }
143
      }
143
      }
144
      return $result;
144
      return $result;
145
   }
145
   }
146
   
146