Subversion Repositories computer_asset_manager_v1

Rev

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

Rev 84 Rev 86
Line 1... Line 1...
1
<?php
1
<?php
2
 
2
 
3
   define(VERSION,'1.6.2');
3
   define(VERSION,'1.6.2');
4
   define(BUILD_DATE,'$Date: 2019-05-11 03:08:46 -0500 (Sat, 11 May 2019) $');
4
   define(BUILD_DATE,'$Date: 2019-05-11 19:10:30 -0500 (Sat, 11 May 2019) $');
5
   define(SVN_REV,'$Rev: 84 $' );
5
   define(SVN_REV,'$Rev: 86 $' );
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 192... Line 192...
192
            }
192
            }
193
         }
193
         }
194
      }
194
      }
195
      return $result;
195
      return $result;
196
   } // callableOutput
196
   } // callableOutput
-
 
197
 
-
 
198
   /*
-
 
199
    * returns an SQL query to get all available devices
-
 
200
    */
-
 
201
   function getAllDevices () {
-
 
202
      $sql = "select distinct device_id,concat(Device, ' - ', Client, '(', Site, ')' )
-
 
203
              from view_client_site_device";
-
 
204
      $sql .= ' where ' . $_SESSION['where_clause'];
-
 
205
      $sql .= ' order by view_client_site_device.Device';
-
 
206
      return $sql;
-
 
207
   }
-
 
208
   
-
 
209
   /*
-
 
210
    * Simply returns an SQL with the client_id and the client
-
 
211
    */
-
 
212
   function getClients () {
-
 
213
      return 'select distinct client_id,Client
-
 
214
               from
-
 
215
                  view_client_site_device
-
 
216
                  join maintenance_schedule using ( device_id )
-
 
217
               where maintenance_schedule.removed_date is null 
-
 
218
                     and ' . $_SESSION['where_clause'] .
-
 
219
               ' order by Client';
-
 
220
   }
-
 
221
 
-
 
222
   /*
-
 
223
    * Return query selecting available sites
-
 
224
    */
-
 
225
   function getSites () {
-
 
226
      return 'select distinct site_id,Site from view_client_site_device where ' . $_SESSION['where_clause'] . ' order by Client,Site';
-
 
227
   }
-
 
228
      
-
 
229
 
-
 
230
   function getTechs () {
-
 
231
      return 'select login_id,email from login where removed_date is null order by email';
-
 
232
   }
-
 
233
 
-
 
234
   
197
      
235
      
198
 
236
 
199
?>
237
?>