-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCloseTicket.php
More file actions
75 lines (49 loc) · 1.95 KB
/
CloseTicket.php
File metadata and controls
75 lines (49 loc) · 1.95 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
<!doctype html>
<html>
<head>
<link href="main.css" rel="stylesheet">
</head>
<body>
<div class="container">
<h2>Close ticket</h2>
<label class="label-form" for="ticket_id">Ticket ID: <label>
<select name="ticket_id">
<?php
include "Config.php";
$connectionInfo = array( "Database"=>DB_NAME, "UID"=>DB_USER, "PWD"=>DB_PASSWORD);
$conn = sqlsrv_connect( $serverName, $connectionInfo);
$userName = $_SERVER['LOGON_USER'];
if( $conn ) {
echo "Connection established.<br />";
}else{
echo "Connection could not be established.<br />";
die( print_r( sqlsrv_errors(), true));
}
$query = "
Select request_id
from dbo.request r
JOIN dbo.employee e
ON r.assigned_to = e.employee_id
JOIN dbo.employee s
ON s.employee_id = request_by
JOIN dbo.request_type rt
ON rt.request_type_id = r.request_type_id
Where e.userName = '".$userName."'";
$results = sqlsrv_query($conn,$query)
or die("Query Failed :" . sqlsrv_errors($conn));
while ($result = sqlsrv_fetch_array($results)){
echo "<option>" . $result['request_id'] . "</option>";
}
sqlsrv_free_stmt($results);
?>
</Select>
<br><br>
<div>
<label class="label-form" for="request_desc">Resolution Details: <label><br><br>
<textarea name="request_desc" style="width:250px;height:150px;"></textarea><br>
</div><br>
<div class="SubmitButton"> <input type ="Submit" value="Submit" name ="submit"> </div>
</form>
</div>
</body>
</html>