Subversion Repositories computer_asset_manager_v1

Rev

Rev 48 | Rev 62 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 rodolico 1
<?php include_once( 'header.php' ); ?>
2
<?xml version="1.0" encoding="utf-8"?>
3
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
<html xmlns="http://www.w3.org/1999/xhtml">
5
<head>
6
  <title>Daily Data - Computer Asset Management Program</title>
7
  <link rel="stylesheet" type="text/css" href="camp.css">
8
</head>
9
<body>
10
<?php include_once('menu.php'); ?>
11
<div id="content">
12
   <?php 
13
      $device_id = $_GET['device_id']; 
14
      $data = queryDatabaseExtended(insertValuesIntoQuery(SQL_SHOW_DEVICE,array( 'device_id' => $device_id)));
15
      $data = $data['data'][0];
16
   ?>
17
 
18
<table>
19
   <tr>
20
      <td>
21
   <table border="1">
49 rodolico 22
      <?php
23
         foreach ( $data as $key => $value ) {
24
            print "<tr><td>$key</td><td>$value</td></tr>\n";
25
         }
26
      ?>
1 rodolico 27
   </table>
28
   <td>
29
   </tr>
30
   <tr>
31
   <td>
32
   <?php
49 rodolico 33
      print screenReports( 'main device screen', array(  'device_id' => $device_id, // the device ID
34
                                                         'device_name' => $data['Name'],  // name of machine
35
                                                         'added_date' => $data['Added'], // date added
36
                                                         'removed_date' => $data['Removed'], // date removed
37
                                                         'count' => 5 ), // number of backup reports to show
38
                            false
39
                                                   );
40
 
48 rodolico 41
      $sql = insertValuesIntoQuery(SQL_GET_MODULES,array( 'screen' => 'device view'));
42
      $modules = queryDatabaseExtended( $sql );
43
      if ( $modules ) {
44
         $modules = $modules['data'];
45
         $parameters = array( 'device_id' => $device_id );
46
         foreach ( $modules as $report ) {
47
            $module = $report['module'];
48
            list($library, $function ) = explode (':', $report['path'] . $report['script']);
49
            //print "$library - $function<br />\n";
50
            require_once "$library";
51
            if ( is_callable( $function ) ) {
52
               $content = call_user_func( $function, $parameters );
53
               if ( $content )
54
                  print "<div><h4>$module</h4>$content</div>\n";
55
            }
56
         }
57
      }
58
 
1 rodolico 59
   ?>
60
   </td>
61
   </tr>
62
   </table>
63
</div>
64
 
65
</body>
66
</html>
67