-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.php
102 lines (98 loc) · 3.66 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
<?php include_once 'includes/home.inc.php'; ?>
<!DOCTYPE html>
<html lang="pt">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="Darlan Santana Farias, Rafael Paravia">
<title>Home</title>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script type="text/Javascript">
function removeLP(lpID){
if(confirm('Are you sure you want to remove the Labeling Process with ID '+lpID+'?')) {
var row = document.getElementById('row'+lpID);
row.parentNode.removeChild(row);
$.ajax({
url: 'includes/home.inc.php',
type: 'POST',
data: {idToRemove:lpID},
success: function(response){alert(response);}
}
).send;
}
}
</script>
<link rel="stylesheet" href="styles/main.css" />
<link rel="stylesheet" href="styles/sticky-footer-navbar.css" />
</head>
<body>
<?php showAlert(); ?>
<?php if (login_check($mysqli) == true) : ?>
<header>
<nav class="navbar navbar-default">
<div class="container">
<div class="navbar-header navbar-left">
<br>
<img src="images/logo.png" alt="LABIC - Laboratório de Inteligência Computacional" height="50" width="93.5">
</div>
<div class="navbar-header navbar-left">
<br> <br>
<a class="navbar-brand" href="index.php">Opinion-meter</a>
</div>
<p class="navbar-text">
<br> <br>
-- Hello, <?php echo htmlentities($_SESSION['username']); ?>!
</p>
<div id="navbar" class="collapse navbar-collapse navbar-right">
<br> <br>
<ul class="nav navbar-nav">
<li><a href="profile.php">Profile</a></li>
<li><a href="help.php">Help</a></li>
<li><a href="includes/logout.php">Log out</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
</header>
<div align = "center">
<table id="homeTable">
<thead>
<tr>
<th>My Processes</th>
</tr>
</thead>
<tr>
<td><table id="tblAdmLP" ><?php getAdminLPs($mysqli) ?></table></td>
</tr>
</table>
</div><br>
<?php if (($_SESSION['user_role'] == 'processAdmin') ) : ?>
<div align="center">
<form action="newProcess.php">
<input type="submit" value="Start a new process">
</form>
</div>
<?php endif; ?>
<?php else : ?>
<p>
<span class="error">Access denied.</span>
Try <a href="index.php">logging in</a> first.
</p>
<?php endif; ?>
<footer class="footer">
<div class="container">
<p class="text-muted">
This work is from <a xmlns:cc="http://creativecommons.org/ns#" href="http://labic.icmc.usp.br/" property="cc:attributionName" rel="cc:attributionURL">LABIC | ICMC-USP</a>
and it is licensed by <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Atribuição 4.0 Internacional</a>.
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Licença Creative Commons" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/80x15.png" /></a>
</p>
</div>
</footer>
</body>
</html>