-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathHome.php
201 lines (163 loc) · 6.97 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
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
<?php
session_start();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script type="text/javascript" src="/jquery/jquery-latest.js"></script>
<script type="text/javascript" src="/jquery/jquery.tablesorter.js"></script>
<script src="sorttable.js"></script>
<style>
/* Sortable tables */
table.sortable thead {
background: rgba(54, 25, 25, .2);
font-weight: bold;
cursor: default;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<img src="images/123.png"class="img-rounded" width="300" height="130"/>
<style>.img-rounded</style>
<!-- CSS -->
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:400,100,300,500">
<!--<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">-->
<link rel="stylesheet" href="assets/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="assets/css/form-elements.css">
<link rel="stylesheet" href="assets/css/style.css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- Favicon and touch icons -->
<link rel="shortcut icon" href="assets/ico/favicon.png">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png">
<title>Home</title>
<?php
if ((isset($_SESSION["csir"])))
{
$logged_in_person = $_SESSION["csir"];
}
$FileID= "";
$servername = "127.0.0.1";
$username = "root";
$password = "";
$dbname = "academycity";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
?>
</head>
<body>
<div class ="top-content">
<div class ="inner-bg" style = "padding: 12px 100px 50px 100px;">
<div class ="row">
<div class ="description">
<p>
<h1 style = "font : normal 25px/25px Georgia, sans-serif; color : white ;">Web Defacement Monitoring Tool</h1>
</p>
</div>
</div>
<div class ="container">
<div class="row">
<div class="col-sm-5">
<div class="form-box">
<div class="form-top">
<div class = "form-top-left">
<h3>Activities for <b><?php echo $logged_in_person?> </b></h3>
</div>
<div class="form-top-right">
<!--<i class="fa fa-info-circle"></i>-->
<a href="/WDMS/Home.php"><i class="fa fa-refresh"></i></a>
</div>
</div>
<div class="form-bottom">
<form name="home" action="/WDMS/API/Logout" class="login-form" method="POST">
<table style = "border: inset 1px black; width: 100%" name="myTable" class="sortable">
<thead>
<tr style = "color: #00bfff ; width: 100%; font-weight: 200%">
<th>Domain Name</th>
<th>File Name</th>
<th>File Status</th>
<th>Last Modified</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$conn2 = new mysqli($servername, $username, $password, $dbname);
$query2 ="SELECT * FROM USERFILE WHERE user_email = '".$GLOBALS['logged_in_person']."' ";
$result = mysqli_query($conn2,$query2);
while (@$row = mysqli_fetch_row($result)){
//var_dump($row[2])."\r\n";
//taking data from database to views the form table
$FileID=$row[0];
$field=$row[4];
//$colour=$row[11];
echo "<tr class ='' style = 'color : #f5f4c4 ;font-size: 14px;'>";
echo"<th>";
echo $row[11];
echo"</th><th>";
echo $row[1];
echo"</th><th>";
if($field == "0")
{
echo '<img src="images/circle-xxl.png" alt="" width="15" height="15"/>';
}
if($field == "1")
{
echo '<img src="images/yellow.png" alt="" width="15" height="15"/>';
}
if($field == "2")
{
echo '<img src="images/red.png" alt="" width="15" height="15"/>';
}
//echo $row[4];
echo"</th><th>";
echo $row[6];
echo"</th><th>";
echo"<a href=moreinfo.php?UserFileID=$FileID>More Info</a>";
echo "</th></tr>";
}
$conn->close();
?>
</tbody>
</table>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<form action="/WDMS/API/Logout" method="POST">
<button type="submit" class="btn" style = "padding: 5px 100px 2px 100px;">Log Out</button>
</form>
</div>
<footer>
<div class="container">
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
<div class="footer-border"></div>
<p>By CSIR VACWORK STUDENTS at <a href="http://defsec.csir.co.za/" target="_blank"><strong>CCIW UNIT</strong></a>
<i class="fa fa-smile-o"></i></p>
</div>
</div>
</div>
</footer>
<!-- Javascript -->
<script src="assets/js/jquery-1.11.1.min.js"></script>
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script src="assets/js/jquery.backstretch.min.js"></script>
<script src="assets/js/scripts.js"></script>
</body>
</html>