-
Notifications
You must be signed in to change notification settings - Fork 0
/
plandetail.php
128 lines (86 loc) · 2.6 KB
/
plandetail.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
<?php
ob_start();
require('includes/database.php');
require('includes/plandays.php');
require('includes/plan.php');
require('includes/exercise_instances.php');
require('includes/exercise.php');
session_start();
?>
<style>
* {font-family: arial, verdana, helvetica, sans-serif}
input { width: 250px; height: 40px; font-size: 20px; border: 1px solid #999999; padding: 5px; }
::-webkit-input-placeholder {
font-size: 20px;
}
:-moz-placeholder {font-size: 20px;}
:-ms-input-placeholder {font-size: 20px;}
</style>
<?php
$day_id = $_REQUEST["set"];
$day = PlanDays::find_by_id($id=$day_id);
$plan_id = $day->plan_id;
$plan = Plan::find_by_id($id=$plan_id);
$results = ExerciseInstances::find_all_by_day_id($my_id=$day_id);
$fitness = Exercise::find_by_id($id=4);
?>
<h2>Plan Name:</h2>
<input placeholder="<?php echo $plan->plan_name; ?>" />
<h2>Day Name:</h2>
<input placeholder="<?php echo $day->day_name; ?>" />
<br>
<br>
<form>
<select id="dayorder">
<option></option>
<option selected="selected">Day Order: <?php echo $day->order; ?></option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</form>
<br>
<h2>Exercises:</h2>
<?php
foreach($results as $result):
$fitness = Exercise::find_by_id($id=$result->exercise_id);
echo "<h3 style='display: inline'>" .$fitness->exercise_name. "</h3>";
echo "<div onclick='dltexercize()' style='display: inline'><h5 style='display: inline; color: firebrick'> x</h5></div><br><br>";
endforeach;
?>
<form>
<select id="addexercize">
<option></option>
<option selected="selected">Add Exercise</option>
<option>Crunch</option>
<option>Air squat</option>
<option>Windmill</option>
<option>Push-up</option>
<option>Rowing Machine</option>
<option>Walking</option>
<option>Running</option>
</select>
</form>
<br>
<h2>Exercise Information:</h2>
<?php
echo "<table><tr>";
//echo "<td> id <td />";
echo "<td>Name <td />";
//echo "<td> exercise_id <td />";
//echo "<td> day_id <td />";
echo "<td>Duration <td />";
echo "<td>Order <td />";
echo "</tr>";
foreach($results as $result):
$fitness = Exercise::find_by_id($id=$result->exercise_id);
echo "<tr>
<td><a href='3danimation.php'>" .$fitness->exercise_name. "</a> <td />
<td>" .$result->exercise_duration. " sec. <td />
<td>" .$result->order. " <td /></tr>";
endforeach;
echo "</table>";
?>
<hr />