41 |
rodolico |
1 |
<?php
|
46 |
rodolico |
2 |
include_once( '../../header.php' );
|
|
|
3 |
include_once( './functions.php' );
|
41 |
rodolico |
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>Computer Asset Management Program - MODULE NAME - PAGE NAME</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">
|
46 |
rodolico |
15 |
<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post" enctype="multipart/form-data">
|
|
|
16 |
<table border='1'>
|
|
|
17 |
<tr>
|
|
|
18 |
<td>Client</td>
|
|
|
19 |
<td>
|
|
|
20 |
<select name='client_id'>
|
|
|
21 |
<option value=-1 selected>All</option>
|
|
|
22 |
<?php print queryToSelect( 'select client_id,name from client where removed_date is null order by name'); ?>
|
|
|
23 |
</select>
|
|
|
24 |
</td>
|
|
|
25 |
</tr>
|
|
|
26 |
<tr>
|
|
|
27 |
<td>Machine</td>
|
|
|
28 |
<td>
|
|
|
29 |
<select name='device_id'>
|
|
|
30 |
<option value=-1 selected>All</option>
|
|
|
31 |
<?php print queryToSelect( "select device.device_id,device.name from device where device_type_id in (select device_type_id from device_type where show_as_system = 'Y') order by device.name"); ?>
|
|
|
32 |
</select>
|
|
|
33 |
</td>
|
|
|
34 |
</tr>
|
|
|
35 |
<tr>
|
|
|
36 |
<td>Product</td>
|
|
|
37 |
<td>
|
|
|
38 |
<select name='license_product_id'>
|
|
|
39 |
<option value=-1 selected>All</option>
|
|
|
40 |
<?php print queryToSelect( 'select license_product_id,name from license_product order by name'); ?>
|
|
|
41 |
</select>
|
|
|
42 |
</td>
|
|
|
43 |
</tr>
|
|
|
44 |
<tr>
|
|
|
45 |
<td>*Product</td>
|
|
|
46 |
<td><input type='text' name='product' width='20'></td>
|
|
|
47 |
</tr>
|
|
|
48 |
<tr>
|
|
|
49 |
<td>*License</td>
|
|
|
50 |
<td><input type='text' name='license' width='20'>
|
|
|
51 |
(<input type="checkbox" name="history" value="history"> show history)
|
|
|
52 |
</td>
|
|
|
53 |
</tr>
|
|
|
54 |
<tr>
|
|
|
55 |
<td colspan='2' align='center'><input type="submit" value="Show Results" name="submit"></td>
|
|
|
56 |
</tr>
|
|
|
57 |
</table>
|
|
|
58 |
<p>* These items will search for substrings</p>
|
|
|
59 |
<hr>
|
|
|
60 |
</form>
|
|
|
61 |
<?php
|
|
|
62 |
if ( $_POST["submit"] ) {
|
|
|
63 |
$filter = array();
|
|
|
64 |
if ( ! isset( $_REQUEST['history'] ) ) $filter[] = 'license.removed_date is null';
|
|
|
65 |
foreach ( array( 'client_id','device_id','license_product_id' ) as $field ) {
|
|
|
66 |
if ( $_REQUEST[$field] > -1 )
|
|
|
67 |
$filter[] = "$field = " . $_REQUEST[$field];
|
|
|
68 |
} // foreach
|
|
|
69 |
if ( $_REQUEST['product'] )
|
|
|
70 |
$filter[] = "license_product.name like '%" . $_REQUEST['product'] . "%'";
|
|
|
71 |
if ( $_REQUEST['license'] )
|
|
|
72 |
$filter[] = "license.license like '%" . $_REQUEST['license'] . "%'";
|
|
|
73 |
|
|
|
74 |
$query = insertValuesIntoQuery( SQL_SHOW_LICENSE,
|
|
|
75 |
array('whereClause' => implode( ' and ', $filter )
|
|
|
76 |
));
|
|
|
77 |
//print "<pre>$query</pre>";
|
|
|
78 |
print queryToTable( $query );
|
|
|
79 |
} elseif ( $_REQUEST['action'] == 'move' ) {
|
42 |
rodolico |
80 |
?>
|
46 |
rodolico |
81 |
<p>Moving license from current workstation to new machine. Select target machine below</p>
|
|
|
82 |
<pre><?php print getDescription( $_REQUEST['license_id'] ); ?></pre>
|
|
|
83 |
<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post" enctype="multipart/form-data">
|
|
|
84 |
<table>
|
|
|
85 |
<tr>
|
|
|
86 |
<td>Select new Machine</td>
|
|
|
87 |
<td>
|
|
|
88 |
<select name='new_device'>
|
|
|
89 |
<option value=-1 selected>Remove Only</option>
|
|
|
90 |
<?php print queryToSelect( "select device_id,name from view_device_systems where removed_date is null order by name"); ?>
|
|
|
91 |
</select>
|
|
|
92 |
</td>
|
|
|
93 |
</tr>
|
|
|
94 |
</table>
|
|
|
95 |
</form>
|
|
|
96 |
<?php
|
|
|
97 |
}
|
|
|
98 |
?>
|
41 |
rodolico |
99 |
</div>
|
|
|
100 |
</body>
|
|
|
101 |
</html>
|