Subversion Repositories computer_asset_manager_v2

Rev

Rev 5 | Blame | Last modification | View Log | Download | RSS feed

<?php 
   include_once( 'header.php' );
   // added a comment
   include_once( 'DBDatabase.class.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
  global $DATABASE_DEFINITION;
  $camp = new DBDatabase( 'camp', $DATABASE_DEFINITION );
  if ( isset( $_REQUEST['table'] ) ) {
     $table = $camp->getTable($_REQUEST['table']);
     if ( $_REQUEST['id'] ) {
        $record = new DBRecord( $table, array( 'id' => $_REQUEST['id'] ) );
        $record->loadFromDatabase();
        print $record->toHTML();
        //print "<pre>" . print_r($record, true) . "</pre>";
     } else {
        print $table->toHTML(  );
     }
   }  else {
     print $camp->toHTML();
  }
?>
</div>
</body>
</html>