forked from ormestad/publications
-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.php
105 lines (93 loc) · 2.82 KB
/
index.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
<?php
require 'lib/global.php';
if($USER->auth>0) {
$publications=new NGIpublications();
$year=date("Y");
$user_score=$publications->getScoreboard($year-1,$USER->data['user_email']);
$user_score_table=new htmlTable();
$user_score_table->addData($user_score);
$user_score_total=$publications->getScoreboard(FALSE,$USER->data['user_email']);
$user_score_total_table=new htmlTable();
$user_score_total_table->addData($user_score_total);
$score_total=$publications->getScoreboard(FALSE,FALSE);
$score_total_table=new htmlTable();
$score_total_table->addData($score_total);
$remaining_publications=$publications->remainingPublications($year-1, 8);
} else {
// Not logged in
header('Location:login.php');
}
// Render Page
//=================================================================================================
?>
<!doctype html>
<html class="no-js" lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?php echo $CONFIG['site']['name']; ?></title>
<link rel="stylesheet" href="css/foundation.css">
<link rel="stylesheet" href="css/app.css">
<link rel="stylesheet" href="css/icons/foundation-icons.css" />
</head>
<body>
<?php require '_menu.php'; ?>
<div class="row">
<br>
<div class="large-12 columns">
<ul class="stats-list">
<li>
<?php echo $remaining_publications["total"]?> <span class="stats-list-label">Publications</span>
</li>
<li class="stats-list-maybe">
<?php echo $remaining_publications["maybe"]?> <span class="stats-list-label">Maybe</span>
</li>
<li class="stats-list-pending">
<?php echo $remaining_publications["pending"]?> <span class="stats-list-label">Pending</span>
</li>
</ul>
</div>
</div>
<div class="row">
<div class="large-6 columns">
<div class="card">
<div class="card-divider">
Your score for <?php echo $year-1; ?> / <?php echo $year; ?>
</div>
<div class="card-section">
<?php echo $user_score_table->render(); ?>
<a href="publications_verify.php" class="button">Go get some!</a>
</div>
</div>
</div>
<div class="large-6 columns">
<div class="card">
<div class="card-divider">
Your total score
</div>
<div class="card-section">
<?php echo $user_score_total_table->render(); ?>
</div>
</div>
</div>
</div>
<div class="row">
<br>
<div class="large-12 columns">
<div class="card">
<div class="card-divider">
All-time hi-scores
</div>
<div class="card-section">
<?php echo $score_total_table->render(); ?>
</div>
</div>
</div>
</div>
<script src="js/vendor/jquery.js"></script>
<script src="js/vendor/what-input.js"></script>
<script src="js/vendor/foundation.js"></script>
<script src="js/app.js"></script>
</body>
</html>