Subversion Repositories computer_asset_manager_v1

Rev

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

<?php include_once( 'header.php' ); ?>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Daily Data - Computer Asset Management Program</title>
  <link rel="stylesheet" type="text/css" href="camp.css">
</head>
<body>
<?php include_once('menu.php'); ?>
<div id="content">
   <?php 
      $device_id = $_GET['device_id']; 
      $data = queryDatabaseExtended(insertValuesIntoQuery(SQL_SHOW_DEVICE,array( 'device_id' => $device_id)));
      $data = $data['data'][0];
   ?>
   
<table>
   <tr>
      <td>
   <table border="1">
      <?php
         foreach ( $data as $key => $value ) {
            print "<tr><td>$key</td><td>$value</td></tr>\n";
         }
      ?>
   </table>
   <td>
   </tr>
   <tr>
   <td>
   <?php
      print screenReports( 'main device screen', array(  'device_id' => $device_id, // the device ID
                                                         'device_name' => $data['Name'],  // name of machine
                                                         'added_date' => $data['Added'], // date added
                                                         'removed_date' => $data['Removed'], // date removed
                                                         'count' => 5 ), // number of backup reports to show
                            false
                                                   );
      
      $sql = insertValuesIntoQuery(SQL_GET_MODULES,array( 'screen' => 'device view'));
      $modules = queryDatabaseExtended( $sql );
      if ( $modules ) {
         $modules = $modules['data'];
         $parameters = array( 'device_id' => $device_id );
         foreach ( $modules as $report ) {
            $module = $report['module'];
            list($library, $function ) = explode (':', $report['path'] . $report['script']);
            //print "$library - $function<br />\n";
            require_once "$library";
            if ( is_callable( $function ) ) {
               $content = call_user_func( $function, $parameters );
               if ( $content )
                  print "<div><h4>$module</h4>$content</div>\n";
            }
         }
      }
      
   ?>
   </td>
   </tr>
   </table>
</div>

</body>
</html>