-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwplanner.php
More file actions
196 lines (187 loc) · 5.71 KB
/
wplanner.php
File metadata and controls
196 lines (187 loc) · 5.71 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
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<!DOCTYPE HTML>
<html>
<head>
<title>LivFit - Workout Planner</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="shortcut icon" href="images/ui/favicon.ico">
</head>
<body>
<?php include ("header.php"); ?>
<?php include ("nav.php"); ?>
<div id=content>
<?php
//session_start(); // ?? Must be included in all pages using sessions?
if(isset($_SESSION['sid']) && isset($_SESSION['current_user']))
{
include("db.php");
$conn = mysql_connect($servername, $username, $password);
if (!$conn)
{
die('Could not connect: ' . mysql_error());
}
$db=mysql_select_db($dbname, $conn);
$sql = "select difficulty from users where username='".$_SESSION['current_user']."'";
//$sql = "select * from users where username=$sessionvariable";
$result = mysql_query($sql);
while($row=mysql_fetch_array($result))
{
$diff=$row[0];
}
//find week
$sql = "select week from users where username='".$_SESSION['current_user']."'";
//$sql = "select * from users where username=$sessionvariable";
$result = mysql_query($sql);
while($row=mysql_fetch_array($result))
{
$week=$row[0];
}
}
else
die('Error (not logged in?)');
?>
<h1>Plan Your Workout</h1>
<div id=seldif>
<form class=formwhite>
<br/>
<a href="selectDifficulty.php">
<div class=buttonsmall><center>Select Difficulty Level</center></div></a>
<p>Current Level
<input type=text class=bmioutput value="<?php echo $diff?>" readonly></p>
<p>Current Week
<input type=text class=bmioutput value="<?php echo $week?>" readonly></p>
<center>
<a href="wp_dec.php"><img src="images/ui/minus.png"></img></a>
<span id=changeweek>Change week</span>
<a href="wp_inc.php"><img src="images/ui/plus.png"></img></a>
</center>
</form>
</div>
<div>
<p>Use this page to understand your current workout plan.</p>
<p>Pick a <b>difficulty level</b> by using the select difficulty level button on the right. Then, depending on how many weeks you've been working out, you can also advance the <b>week number.</b> After 4 weeks of the same difficulty level, you can crank it up a notch, if you like.</p><p> The number of reps and sets per exercise changes accordingly. You also unlock more workouts at higher levels.</p>
<div class=clear></div>
<h2>This Week</h2>
<table id=week1 class=week>
<tr>
<td>
<div class=day>
<div id=day_title>
<p>Day 1</p>
</div>
<div id=day_desc>
<form class=formwhite id="chest" name="chest">
<p><b>Chest</p></b>
<img src="images/icons/chest.jpg" alt="Workout">
<input class=button onclick=location.href='wp_chest.php'; type=button value="Know More">
</form>
</div>
</div>
</td>
<td>
<div class=day>
<div id=day_title>
<p>Day 2</p>
</div>
<div id=day_desc>
<form class=formwhite id="back" name="back">
<p><b>Back</b></p>
<img src="images/icons/back.jpg" alt="Workout">
<input class=button onclick=location.href='wp_back.php'; type=button value="Know More">
</form>
</div>
</div>
</td>
<td>
<div class=day>
<div id=day_title>
<p>Day 3</p>
</div>
<div id=day_desc>
<form class=formwhite id="rest" name="rest">
<p><b>Rest</b></p>
<img src="images/icons/rest.jpg" alt="Workout">
<input class=button onclick=location.href='wp_rest.php'; type=button value="Know More">
</form>
</div>
</div>
</td>
<td>
<div class=day>
<div id=day_title>
<p>Day 4</p>
</div>
<div id=day_desc>
<form class=formwhite id="arms" name="arms">
<p><b>Arms</b></p>
<img src="images/icons/arms.jpg" alt="Workout">
<input class=button onclick=location.href='wp_arms.php'; type=button value="Know More">
</form>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class=day>
<div id=day_title>
<p>Day 5</p>
</div>
<div id=day_desc>
<form class=formwhite id="legs" name="legs">
<p><b>Legs</b></p>
<img src="images/icons/legs.jpg" alt="Workout">
<input class=button onclick=location.href='wp_legs.php'; type=button value="Know More">
</form>
</div>
</div>
</td>
<td>
<div class=day>
<div id=day_title>
<p>Day 6</p>
</div>
<div id=day_desc>
<form class=formwhite id="chest" name="chest">
<p><b>Chest</b></p>
<img src="images/icons/chest2.jpg" alt="Workout">
<input class=button onclick=location.href='wp_chest.php'; type=button value="Know More">
</form>
</div>
</div>
</td>
<td>
<div class=day>
<div id=day_title>
<p>Day 7</p>
</div>
<div id=day_desc>
<form class=formwhite id="abc" name="abc">
<p><b>Cardio</b></p>
<img src="images/icons/cardio.jpg" alt="Workout">
<input class=button onclick=location.href='wp_cardio.php'; type=button value="Know More">
</form>
</div>
</div>
</td>
<!--
<td>
<div class=day>
<div id=day_title>
</p>Extra
</div>
<div id=day_desc>
Know More!
</div>
</div>
</td>
-->
</tr>
</table>
<!--
<h2>Next Week</h2>
-->
</div>
</div>
<?php include ("footer.php"); ?>
</body>
</html>