forked from dareyio/tooling
-
Notifications
You must be signed in to change notification settings - Fork 0
/
environment.php
237 lines (204 loc) · 8.23 KB
/
environment.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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
<?php
include('db_conn.php');
include('logout_popup.php');
include('insert_environment.php');
session_start();
if(!isset($_SESSION['sess_user'])) {
header ("Location: login.php");
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Environment</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/dashboard.css">
<link href='https://fonts.googleapis.com/css?family=IBM Plex Mono' rel='stylesheet'>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel="stylesheet">
<script src="https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
</head>
<body>
<div class="container-fluid dashboard-content">
<div class="row">
<div class="col-md-2 sidebar">
<div class="logo">
<img class="logo-img" src="images/Darey_1.png" alt="" >
</div>
<div class="sidebar-menus">
<ul>
<li ><a href="home.php"><img src="images/dashboard.png"><span class="menu-title">Dashboard</span></a></li>
<li class="active"><a href="#"><img src="images/environment.png"><span class="menu-title">Environment</span></a></li>
<li><a href="dev_tools.php"><img src="images/tools.png"><span class="menu-title">Devops Tools</span></a></li>
<li><a href="analytics.php"><img src="images/analytics.png"><span class="menu-title">Analytics</span></a></li>
<li><a onclick="popupOpen();"><img src="images/logout.png"><span class="menu-title">Log Out</span></a></li>
</ul>
</div>
</div>
<div class="col-md-10 main-content">
<div class="titles">
<h4>Environment</h4>
</div>
<div class="inner-content">
<div class="row">
<div class="accordion-container">
<div class="set">
<a href="#" class="tab-a">
SIT
<!-- <i class="fa fa-plus"></i> -->
<a class="edit" href="edit_environment.php"> Edit</a>
</a>
<div class="content">
<?php
$eviron_records = mysqli_query($conn, "SELECT environment_name,ip_address From environments Where environment_type ='SIT'"); // Use select query here
echo "<div class='row content-div '>";
while($row = mysqli_fetch_array($eviron_records)){
echo "<div class=' col-md-6 environ_div '>";
echo " " . $row["environment_name"]. "</br> ";
echo " " . $row["ip_address"]. " ";
echo "</div>";
}
echo "</div>";
?>
</div>
</div>
<div class="set">
<a href="#" class="tab-a">
UAT
<!-- <i class="fa fa-plus"></i> -->
<a class="edit" href="edit_environment.php"> Edit</a>
</a>
<div class="content">
<?php
$eviron_records = mysqli_query($conn, "SELECT environment_name,ip_address From environments Where environment_type ='UAT'"); // Use select query here
echo "<div class='row content-div '>";
while($row = mysqli_fetch_array($eviron_records)){
echo '<div class="col-md-6 environ_div">';
echo " " . $row["environment_name"]. "</br> ";
echo " " . $row["ip_address"]. " ";
echo "</div>";
}
echo "</div>";
?>
</div>
</div>
<div class="set">
<a href="#" class="tab-a">
Pentest
<!-- <i class="fa fa-plus"></i> -->
<a class="edit" href="edit_environment.php"> Edit</a>
</a>
<div class="content">
<?php
$eviron_records = mysqli_query($conn, "SELECT environment_name,ip_address From environments Where environment_type ='Pentest'"); // Use select query here
echo "<div class='row content-div '>";
while($row = mysqli_fetch_array($eviron_records)){
echo "<div class='col-md-6 environ_div '>";
echo " " . $row["environment_name"]. "</br> ";
echo " " . $row["ip_address"]. " ";
echo "</div>";
}
echo "</div>";
?>
</div>
</div>
<div class="set">
<a href="#" class="tab-a">
Pre Prod
<!-- <i class="fa fa-plus"></i> -->
<a class="edit" href="edit_environment.php"> Edit</a>
</a>
<div class="content">
<?php
$eviron_records = mysqli_query($conn, "SELECT environment_name,ip_address From environments Where environment_type ='Pre Prod'"); // Use select query here
echo "<div class='row content-div '>";
while($row = mysqli_fetch_array($eviron_records)){
echo "<div class='col-md-6 environ_div '>";
echo " " . $row["environment_name"]. "</br> ";
echo " " . $row["ip_address"]. " ";
echo "</div>";
}
echo "</div>";
?>
</div>
</div>
<div class="set">
<a href="#" class="tab-a">
Prod
<!-- <i class="fa fa-plus"></i> -->
<a class="edit" href="edit_environment.php"> Edit</a>
</a>
<div class="content">
<?php
$eviron_records = mysqli_query($conn, "SELECT environment_name,ip_address From environments Where environment_type ='Prod'"); // Use select query here
echo "<div class='row content-div '>";
while($row = mysqli_fetch_array($eviron_records)){
echo "<div class='col-md-6 environ_div '>";
echo " " . $row["environment_name"]. "</br> ";
echo " " . $row["ip_address"]. " ";
echo "</div>";
}
echo "</div>";
?>
</div>
</div>
<div class="set">
<a href="#" class="tab-a">
QA
<!-- <i class="fa fa-plus"></i> -->
<a class="edit" href="edit_environment.php"> Edit</a>
</a>
<div class="content">
<?php
$eviron_records = mysqli_query($conn, "SELECT environment_name,ip_address From environments Where environment_type ='QA'"); // Use select query here
echo "<div class='row content-div '>";
while($row = mysqli_fetch_array($eviron_records)){
echo "<div class='col-md-6 environ_div '>";
echo " " . $row["environment_name"]. "</br> ";
echo " " . $row["ip_address"]. " ";
echo "</div>";
}
echo "</div>";
?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script >
/*accordion js*/
jQuery(document).ready(function() {
jQuery(".set > a").on("click", function() {
if (jQuery(this).hasClass("active")) {
jQuery(this).removeClass("active");
jQuery(this)
.siblings(".content")
.slideUp(200);
jQuery(".set > a i")
.removeClass("fa-minus")
.addClass("fa-plus");
} else {
jQuery(".set > a i")
.removeClass("fa-minus")
.addClass("fa-plus");
jQuery(this)
.find("i")
.removeClass("fa-plus")
.addClass("fa-minus");
jQuery(".set > a").removeClass("active");
jQuery(this).addClass("active");
jQuery(".content").slideUp(200);
jQuery(this)
.siblings(".content")
.slideDown(200);
}
});
});
</script>
</body>
</html>