This repository was archived by the owner on Apr 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
75 lines (63 loc) · 2.7 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
<?php
require_once(dirname(__FILE__) . "/includes/common/only_allow_logout.php");
require_once(dirname(__FILE__) . "/includes/common/defaults.php");
$PAGE["title"] .= " : Homepage";
require_once(dirname(__FILE__) . "/templates/common/header.php");
require_once(dirname(__FILE__) . "/includes/common/choose_navbar.php");
//load statistics
require_once(dirname(__FILE__) . "/classes/User.php");
require_once(dirname(__FILE__) . "/classes/TodoList.php");
require_once(dirname(__FILE__) . "/classes/Item.php");
require_once(dirname(__FILE__) . "/classes/Project.php");
require_once(dirname(__FILE__) . "/classes/Member.php");
$statistics = array(
"Users" => User::countAll(),
"Todo Lists" => TodoList::countAll(),
"Items" => Item::countAll(),
"Projects" => Project::countAll(),
"Members of Projects" => Member::countAll()
);
?>
<div class="container">
<h1 class="center strong">Welcome to 4Me2DO</h1>
<img alt="4Me2Do logo" class="center mainLogo" src="public/images/logo_ltw.png">
<h3 class="center">The ultimate todo list management tool!</h3>
<h2 class="center strong">Statistics</h2>
<div class="statistics">
<?php foreach ($statistics as $name => $value) : ?>
<ul class="statistics list">
<li class="statistics value"><?= $value ?></li>
<li class="statistics name"><?= $name ?></li>
</ul>
<?php endforeach ?>
</div>
<hr/>
<h2 class="center strong">Brought to you by:</h2>
<table class="center" id="broughtBy">
<tbody>
<tr>
<td>Afonso Ramos </td>
<td><a class="primaryLink" href="https://sigarra.up.pt/feup/pt/fest_geral.cursos_list?pv_num_unico=201506239" target="_blank">UP201506239</a></td>
</tr>
<tr>
<td>Daniel Silva </td>
<td><a class="primaryLink" href="https://sigarra.up.pt/feup/pt/fest_geral.cursos_list?pv_num_unico=201503212" target="_blank">UP201503212</a></td>
</tr>
<tr>
<td>Miguel Ramalho </td>
<td><a class="primaryLink" href="https://sigarra.up.pt/feup/pt/fest_geral.cursos_list?pv_num_unico=201403027" target="_blank">UP201403027</a></td>
</tr>
</tbody>
</table>
<a href="https://github.com/msramalho/feup-ltw#feup-ltw---group-1">
<img alt="Github logo" id="gitLogo" class="center" src="public/images/github.png">
</a>
<hr/>
<h2 class="center">We advise you to use <a class="strong primaryLink" href="https://xdebug.org/">XDebug</a> to see pretty dumps!</h2>
<h2 class="center">Here is a dump from our database users table, using <span class="strong">QueryBuilder</span> (this output is commented, but you can simply uncomment the 2 lines in index.php that show it):</h2>
<?php
// $query = new QueryBuilder(User::class);
// var_dump($query->select()->getAll());
?>
</div>
<?php require_once(dirname(__FILE__) . "/templates/common/footer.php"); ?>