-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathassetdetails.php
More file actions
98 lines (77 loc) · 2.05 KB
/
assetdetails.php
File metadata and controls
98 lines (77 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
session_start();
include('header.php');
include_once("db_connect.php");
if (!empty($_GET)){
$aID = (int) $_GET['id'];
}
$result = mysqli_query($conn, "SELECT * FROM assets left OUTER join users using (user_id) WHERE asset_id = '" . $aID. "' ");
$row = mysqli_fetch_array($result);
$aSid = $row['asset_id'];
$serialnumber = $row['serialnumber'];
$userID = $row['user_id'];
$userType = $row['userType'];
$firstname = $row['firstname'];
$middle = $row['middle'];
$lastname = $row['lastname'];
$email = $row['email'];
$title = $row['title'];
$managed_byID = $row['managed_by'];
$dept_id = $row['dept_id'];
$location_id = $row['location_id'];
$primary_phone = $row['primary_phone'];
$price = $row['unit_price'];
$rental= $row['monthly_rental_price'];
$status = $row['asset_status'];
$assignto = $firstname." ".$lastname;
?>
<head>
<link rel="stylesheet" href="css/style.css">
</head>
<div class="main-page">
<div class="form">
<fieldset>
<legend>Asset Information</legend>
<table align=left>
<tr>
<td>Asset ID:</td>
<td><?php echo $aID ?></td>
</tr>
<tr>
<td>Asset Status:</td>
<td><?php echo $status ?></td>
</tr>
<tr>
<td>Serial Number:</td>
<td><?php echo $serialnumber ?></td>
</tr>
<tr>
<td>Unit Price:</td>
<td><?php echo $price ?></td>
</tr>
<tr>
<td>Rental Price:</td>
<td><?php echo $rental ?></td>
</tr>
<tr>
<td>Asset Assgined To:</td>
<td><?php echo "<a href=userdetails.php?id=".$userID.">".$assignto."</a>" ?></td>
</tr>
<tr>
<td>Email:</td>
<td><?php echo $email ?></td>
</tr>
<tr>
<td>Title:</td>
<td><?php echo $title ?></td>
</tr>
</table>
</fieldset>
<center>
<?php
if ((isset($_SESSION['user_id']) AND (($_SESSION['userType'])=="tech" ) )) {
echo "<a href=assetupdate.php?id=".$aID.">Edit Asset Assignment</a>";
}
?>
</center>
</div>