-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathhome.php
executable file
·162 lines (162 loc) · 6.87 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
<?php
session_start();
if (!isset($_SESSION["usercode"])) {
header("Location: index.php");
}
$year = $_SESSION["year"];
if ($year - 1 == 2015) {
header("Location: questionnaire.php");
}
?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.9/c3.min.css">
<link rel="stylesheet" type="text/css" href="css/common.css">
<link rel="stylesheet" type="text/css" href="css/home.css">
<title>Retirement portfolio simulator</title>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="page-header">
<h1>Retirement portfolio simulator</h1>
<button data-toggle="modal" data-target="#modal1" class="btn btn-primary pull-right" type="button">Allocate savings for this year</button>
<p class="lead">Current year: <?php echo $year - 1 + 35; ?>. Retiring in 2050. Current amount saved: <strong class="total-balance">$0</strong>.</p>
</div>
</div>
</div>
<?php if ($year != 1981) { ?>
<div class="row">
<div class="col-md-6 center">
<h3>Current portfolio asset mix</h3>
<div id="currentChart" class="pie chart"></div>
</div>
<div class="col-md-6 center">
<h3>Balances over time</h3>
<div id="balanceChart" class="chart"></div>
<div class="btn-group" role="group">
<button type="button" class="btn btn-active balance-btn" value="99">All Years</button>
<button type="button" class="btn btn-default balance-btn" value="2">1 Year</button>
<button type="button" class="btn btn-default balance-btn" value="4">3 Years</button>
<button type="button" class="btn btn-default balance-btn" value="6">5 Years</button>
<button type="button" class="btn btn-default balance-btn" value="11">10 Years</button>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h3>Transaction history</h3>
<p>The most recent transactions.</p>
<table id="transaction-table" class="table table-striped">
<tr>
<thead>
<th>Date</th>
<th>Transaction</th>
<th>Amount</th>
</thead>
<tbody></tbody>
</tr>
</table>
<div class="center">
<a data-toggle="modal" style="display:none;" data-target="#modal2" class="all-transactions clickable">View All Transactions</a>
</div>
</div>
<?php } ?>
</div>
<div class="row">
<div class="col-md-12 footer"></div>
</div>
<div class="modal fade" id="modal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">All transactions</h4>
</div>
<div class="modal-body">
<table id="transaction-table2" class="table table-striped">
<thead>
<th>Date</th>
<th>Transaction</th>
<th>Amount</th>
</thead>
<tbody></tbody>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Modals -->
<div class="modal fade" id="modal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">Change Savings</h4>
</div>
<div class="modal-body">
<div class="options">
<h2 class="modal-title center">Select a transaction</h2>
<p class="center">Use "Set this year's savings" to determine how to allocate your savings for this year.</p>
<?php if ($year != 1981) { ?>
<p class="center">Optionally, use "Rebalance your entire savings" to redistribute how your current savings to date are allocated.</p>
<?php } ?>
<div class="option-container center">
<ul class="option-list">
<div class="option-block">
<li class="select-option">
<a href="contribution.php">
<div class="inner-option">
<div class="option-card"><i class="fa fa-arrow-up fa-5x"></i>
<p>Set this year's savings mix</p>
</div>
</div>
</a>
<div class="option-details">
<p>
Change how new contributions are saved for this year.
</p>
</div>
</li>
</div>
<div class="option-block block-padding"<?php if ($year == 1981) echo "style=\"display: none;\""; ?> >
<li class="select-option second-option">
<a class="option-block" href="entire.php">
<div class="inner-option">
<div class="option-card"><i class="fa fa-pie-chart fa-5x"></i>
<p>Rebalance your entire savings (optional)</p>
</div>
</div>
</a>
<div class="option-details">
<p>
Change how your entire account balance is divided between funds.
</p>
</div>
</li>
</div>
</ul>
<div class="clear"></div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="bower_components/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="bower_components/d3/d3.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.9/c3.js"></script>
<script charset="utf-8" src="js/home.js"></script>
</body>
</html>