-
Notifications
You must be signed in to change notification settings - Fork 0
/
Home.php
62 lines (62 loc) · 2.68 KB
/
Home.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
<div class="jumbotron" style="padding: 0px;">
<!-- This is the search bar-->
<div class="panel-body" style="padding: 5px;">
<div class="form-group" style="margin-bottom: 0px;">
<input placeholder="Search" class="form-control input-lg" type="text" id="inputLarge">
<a href="javascript:void(0)" class="btn btn-primary">Search</a>
</div>
</div>
</div>
<!-- This is supposed to be the ads-->
<div class="panel panel-warning">
<div class="panel-heading">
<h3 class="panel-title">Buy the new Audi!</h3>
</div>
<div class="panel-body">
Do you also like cars? Click here, and buy the new Audi
</div>
</div>
<div class="bs-example" style="margin-bottom: 60px;" data-example-id="contextual-table">
<table class="table table table-hover">
<thead>
<tr>
<th><h2>Organizations</h2></th>
</tr>
</thead>
<tbody>
<?php
include './configL.php';
$conn;
$organizationData = "SELECT ID, Name, ImgLink FROM Organizations ORDER BY Name ASC;";
$organizationsResult = $conn->query($organizationData);
if ($organizationsResult->num_rows > 0) {
// output data of each row
while ($oRow = $organizationsResult->fetch_assoc()) {
echo "<tr class='active'>";
echo "<td>"
. "<div class='row'>"
. "<h3 class='col-xs-7'>".$oRow['Name']."<img style='margin-left: 5%' src='Img/OrganizationLogos/".$oRow['ImgLink']."' height='30px' class='img-responsive' alt='Responsive image'></h3><a href='?page=Departments&Organization=".$oRow['ID']."' style='margin-top: 8px;' class='col-xs-offset-2 col-xs-2'><span style='font-size: 30px; color: black;' class='glyphicon glyphicon-chevron-right' aria-hidden='true'><p style='font-size: 12px;'></p></span></a><div class='col-xs-1'></div>"
. "</div>"
. "</td>"
. "</tr>";
}
} else {
echo "No Pepes has yet been added to this category... :(";
}
?>
</tbody>
</table>
</div>
</div>
<script>
window.onload = (function() {
document.getElementById('homeButton').style.backgroundColor = "rgba(255, 255, 255, 0.3)";
document.getElementById('backButton').href = "?page=Login"
var childs = document.getElementById('backButton').childNodes[0];
childs.className = "";
childs.childNodes[0].innerHTML = "Log out";
childs.childNodes[0].style.fontSize = "16px";
childs.childNodes[0].style.lineHeight = "21px";
childs.childNodes[0].style.fontWeight = "bold";
});
</script>