Subversion Repositories computer_asset_manager_v1

Rev

Rev 38 | Rev 49 | 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">
22
      <tr>
23
         <td>
24
            ID
25
         </td>
26
         <td>
27
            <?php print $data['ID']?>
28
         </td>
29
      </tr>
30
   <tr><td>Site</td><td><?php print $data['Site']?></td></tr>
31
   <tr><td>Type</td><td><?php print $data['Type']?></td></tr>
32
   <tr><td>Name</td><td><?php print $data['Name']?></td></tr>
48 rodolico 33
   <tr><td>Serial Number</td><td><?php print $data['Serial']?></td></tr>
1 rodolico 34
   <tr><td>Notes</td><td><?php print $data['Notes']?></td></tr>
37 rodolico 35
   <tr><td>Restrictions</td><td><?php print $data['Restrictions']?></td></tr>
1 rodolico 36
   <tr><td>Part Of</td><td><?php print $data['Part Of']?></td></tr>
37
   <tr><td>Added</td><td><?php print $data['Added']?></td></tr>
38
   <tr><td>Removed</td><td><?php print $data['Removed']?></td></tr>
39
   </table>
40
   <td>
41
   </tr>
42
   <tr>
43
   <td>
44
   <?php
48 rodolico 45
      $sql = insertValuesIntoQuery(SQL_GET_MODULES,array( 'screen' => 'device view'));
46
      $modules = queryDatabaseExtended( $sql );
47
      if ( $modules ) {
48
         $modules = $modules['data'];
49
         $parameters = array( 'device_id' => $device_id );
50
         foreach ( $modules as $report ) {
51
            $module = $report['module'];
52
            list($library, $function ) = explode (':', $report['path'] . $report['script']);
53
            //print "$library - $function<br />\n";
54
            require_once "$library";
55
            if ( is_callable( $function ) ) {
56
               $content = call_user_func( $function, $parameters );
57
               if ( $content )
58
                  print "<div><h4>$module</h4>$content</div>\n";
59
            }
60
         }
61
      }
62
 
63
 
38 rodolico 64
      print screenReports( 'main device screen', array(  'device_id' => $device_id, // the device ID
65
                                                         'device_name' => $data['Name'],  // name of machine
66
                                                         'added_date' => $data['Added'], // date added
67
                                                         'removed_date' => $data['Removed'], // date removed
68
                                                         'count' => 5 ), // number of backup reports to show
1 rodolico 69
                            false
48 rodolico 70
                                                   );
1 rodolico 71
 
72
      /* Physical Attributes */
38 rodolico 73
      //print queryToTable( 'select attrib.name,device_attrib.value from device_attrib join attrib using (attrib_id) where device_attrib.removed_date is null and device_id = ' . $device_id );
1 rodolico 74
   ?>
75
   </td>
76
   </tr>
77
   </table>
78
</div>
79
 
80
</body>
81
</html>
82