Subversion Repositories computer_asset_manager_v1

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 rodolico 1
<?php
2
   include_once( './maintenance_library.php' );
3
   include_once( '../../header.php' ); 
4
?>
5
<?xml version="1.0" encoding="utf-8"?>
6
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
7
<html xmlns="http://www.w3.org/1999/xhtml">
8
<head>
9
  <title>Daily Data - Computer Asset Management Program</title>
10
  <link rel="stylesheet" type="text/css" href="../../camp.css">
11
</head>
12
<body>
13
<?php include_once('../../menu.php'); ?>
14
<div id="content">
15
   <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" enctype="multipart/form-data">
16
      <table border="1">
17
         <tr>
18
            <td colspan="2" align="center">
19
            <?php
20
               if ( $_POST['postmaintenance'] ) {
21
                  postMaintenance( $_POST['device'], $_POST['task'], $_POST['notes'], $_POST['technician'], $_POST['date']  );
22
                  print "Device " . $_POST['device'] . 'Updated';
23
               }
24
            ?>
25
            </td>
26
         </tr>
27
         <tr>
28
            <td>Device</td>
29
            <td>
30
               <select name="device">
31
                  <?php print queryToSelect("select device.device_id,concat(device.name, ', ', client.name,' - ', site.name) 
32
                                             from device join site using (site_id) 
33
                                                  join client using (client_id) 
34
                                                  join device_type using (device_type_id)
35
                                             where device_type.show_as_system = 'Y'
36
                                                   and device.removed_date is null
37
                                             order by client.name,site.name,device.name", $_POST['device'] ); ?>
38
               </select>
39
            </td>
40
         </tr>
41
         <tr>
42
            <td>
43
               Task
44
            </td>
45
            <td>
46
               <select name="task">
47
                  <?php print queryToSelect('select maintenance_task_id,description from maintenance_task order by description', $_POST['task'] ); ?>
48
               </select>
49
            </td>
50
         </tr>
51
         <tr>
52
            <td>
53
               Notes
54
            </td>
55
            <td>
56
               <textarea name="notes" rows="10" cols="50"><?php print $_POST['notes']; ?></textarea>
57
            </td>
58
         </tr>
59
         <tr>
60
            <td>
61
               Performed By
62
            </td>
63
            <td valign='top'>
64
               <select name="technician">
65
                  <?php print queryToSelect('select login_id,email from login order by email', "select " . $_SESSION['login_id'] ); ?>
66
               </select>
67
            </td>
68
         </tr>
69
         <tr>
70
            <td>
71
               Date
72
            </td>
73
            <td>
74
               <input type='text' name='date' size="9" value="<?php print $_POST['date'] ? $_POST['date'] : date('Ymd'); ?>">
75
            </td>
76
         </tr>
77
         <tr>
78
            <td colspan="20" align="center">
79
               <input type="submit" name="postmaintenance" value="Post Maintenance" />
80
            </td>
81
         </tr>
82
      </table>
83
   </form>
84
</div>
85
 
86
</body>
87
</html>
88