Subversion Repositories computer_asset_manager_v1

Rev

Rev 85 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 85 Rev 86
Line 6... Line 6...
6
    */
6
    */
7
    
7
    
8
   include_once( './maintenance_database.php' );
8
   include_once( './maintenance_database.php' );
9
   include_once( './database.php' );
9
   include_once( './database.php' );
10
 
10
 
11
   /*
-
 
12
    * returns an SQL query to get all available devices
-
 
13
    */
-
 
14
   function getAllDevices () {
-
 
15
      $sql = "select distinct device_id,concat(Device, ' - ', Client, '(', Site, ')' )
-
 
16
              from view_client_site_device";
-
 
17
      $sql .= ' where ' . $_SESSION['where_clause'];
-
 
18
      $sql .= ' order by view_client_site_device.Device';
-
 
19
      return $sql;
-
 
20
   }
-
 
21
   
-
 
22
   /*
-
 
23
    * Simply returns an SQL with the client_id and the client
-
 
24
    */
-
 
25
   function getClients () {
-
 
26
      return 'select distinct client_id,Client
-
 
27
               from
-
 
28
                  view_client_site_device
-
 
29
                  join maintenance_schedule using ( device_id )
-
 
30
               where maintenance_schedule.removed_date is null 
-
 
31
                     and ' . $_SESSION['where_clause'] .
-
 
32
               ' order by Client';
-
 
33
   }
-
 
34
 
-
 
35
   function getTechs () {
-
 
36
      return 'select login_id,email from login where removed_date is null order by email';
-
 
37
   }
-
 
38
 
-
 
39
   /* function will take all eoln ("\n") and convert to <br /> if $makeHTML
11
   /* function will take all eoln ("\n") and convert to <br /> if $makeHTML
40
    * is true, otherwise will replace all <br /> with \n.
12
    * is true, otherwise will replace all <br /> with \n.
41
    * Will then remove duplicates IF THEY ARE EXACTLY NEXT TO EACH OTHER
13
    * Will then remove duplicates IF THEY ARE EXACTLY NEXT TO EACH OTHER
42
    * ie, with no intervening spaces.
14
    * ie, with no intervening spaces.
43
    */
15
    */