-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstats.php
More file actions
64 lines (51 loc) · 1.38 KB
/
Copy pathstats.php
File metadata and controls
64 lines (51 loc) · 1.38 KB
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
<?php
// INCLUDES
include 'inc.php';
// ACTIONS
dbConnect($config[0]);
$do = getValue('do');
// Do: confirmDelete
if ($do == 'confirmDelete' && getValue('id')) {
if (checkLogin()) {
// Call function and set message
$message = setMessage(confirmDelete(getValue('id')));
}
else {
$message = msgNotAuthorized();
}
}
// Do: Delete
if ($do == 'delete' && getValue('id')) {
if (checkLogin()) {
// Call function and set message
$message = setMessage(deleteImage(getValue('id')));
}
else {
$message = msgNotAuthorized();
}
}
?>
<?php include 'inc.head.php'; ?>
<title>Stats | ImgRate</title>
</head>
<body>
<div class="container-fluid text-center">
<div class="row-fluid">
<div class="span12">
<header>
<?php include 'inc.nav.php'; ?>
</header>
<?php include 'inc.message.php'; ?>
<article>
<h1 class="title">Stats</h1>
<p>The rating of the images are calculated using the <a href="http://en.wikipedia.org/wiki/Elo_rating_system" title="Elo rating system">Elo rating system</a>.</p>
<div class="scores">
<?php print showStats(); ?>
<div class="clearfix"></div>
</div>
</article>
</div>
</div>
<?php include 'inc.footer.php'; ?>
</body>
</html>