-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfinalhomepage.php
130 lines (120 loc) · 5.03 KB
/
finalhomepage.php
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Home Page</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<link rel="stylesheet" type="text/css" href="home.css">
<style>
.list-group-item{
background-color:#5f0071
}
</style>
</head>
<body style="background-image:url('https://www.thebalancecareers.com/thmb/gRT3S9WVI4HEFF4NNyx2KymWtBw=/2000x1335/filters:fill(auto,1)/call_center-549596335-589a79fd3df78caebcbf2e5f.jpg')">
<!-- NAVBAR -->
<nav class="navbar navbar-dark bg-primary">
<a class="navbar-brand" href="#">Make-It-All</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="logCall.html">Log Call</a>
</li>
<li class="nav-item">
<a class="nav-link" href="allProblems.html">Live Jobs</a>
</li>
<li class="nav-item">
<a class="nav-link" href="reports.php">Analytics</a>
</li>
</ul>
<ul>
<ul class="nav navbar-nav" style="float: right">
<button class="btn btn btn-danger" type="button" onclick="location.href = 'index.html'">Sign Out</button>
</ul>
</ul>
</div>
</nav>
<!-- END NAVBAR -->
<div style="margin-top: 4%;">
<p style="text-align:center;"><img src="logo.png" width="500" height="175" alt="Logo"></p>
</div>
<br>
<div style="padding-left:32.5%">
<div class="row">
<div class="col">
<button type="button" class="btn btn-primary btn-lg" onclick="location.href = 'logCall.html'">Log Call</button>
</div>
<div class="col">
<button type="button" class="btn btn-primary btn-lg" onclick="location.href = 'allProblems.html'">Live Jobs</button>
</div>
<div class="col">
<button type="button" class="btn btn-primary btn-lg" onclick="location.href = 'reports.php'">Analytics</button>
</div>
<div class="col">
</div>
<div class="col">
</div>
</div>
</div>
<br>
<div class="row">
<div class="col">
<div class=login-container>
<div style="width: 50%; margin:auto; background-color:#5f0071">
<div class="card-body">
<h5 class="font-weight-bold mb-3" style="color:white; text-align:center;">Current Queries</h5>
</div>
<ul class="list-group list-group-flush", style="color:white">
<?php
$servername = "localhost";
$username = "root";
$password = "SIpnz0Sjel";
// Create connection
$conn = mysqli_connect($servername, $username, $password, 'team018');
$sql = "SELECT * FROM problem ORDER BY problem_no LIMIT 3";
$res = mysqli_query($conn, $sql);
echo '<style>';
echo 'table { border-collapse: collapse;}';
echo '</style>';
echo '<table cellpadding="0", border="0">';
echo '<thead>';
echo '<tr>';
echo '<th>'."Problem Number".'</th>';
echo '<th>'."Type".'</th>';
echo '<th>'."Description".'</th>';
echo '<th>'."Personnel ID".'</th>';
echo '</tr>';
if (mysqli_num_rows($res) > 0) {
// output data of each row
while($row = mysqli_fetch_assoc($res)) {
echo "<tr>";
echo "<td><li class='list-group-item'>".$row['problem_no']."</li></td>";
echo "<td><li class='list-group-item'>".$row['type']."</li></td>";
echo "<td><li class='list-group-item'>".$row['description']."</li></td>";
echo "<td><li class='list-group-item'>".$row['personnel_id']."</li></td>";
echo "<td><li class='list-group-item'>"."<button type='button' class='btn btn-primary btn-xs'" .'onclick='.'"location.href='. "'resolvedForm.html'".'">Resolve</button>';
echo "</tr>";
}
}
?>
</ul>
</table>
<div class="card-body">
<a href="allProblems.html" style="text-align:center;" class="card-link">View full list</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>