Beispiel #1
0
    	<?php 
$plan = $_REQUEST["id"];
$findplan = Plan::find_by_id($id = $plan);
echo "\n    \t<h2 style='text-align: center;'>" . $findplan->plan_name . "</h2>\n    \t<h4>Description: " . $findplan->plan_description . "</h4>\n    \t<h4>Difficulty: " . $findplan->plan_difficulty . "</h4>";
?>

<div class="row">
	<div class="col-xs-6">
		
		<h3 style='text-align: center;'> Exercise Days: </h3>
		<br>
		
		<div id='sortable'>
			
	<?php 
$results = PlanDays::find_all_by_plan_id($id = $plan);
foreach ($results as $result) {
    echo "<div id='rcorners2'>";
    echo "<h3 style='text-align: center;'>";
    echo $result->day_name;
    echo "</h3>";
    echo "\n\t<table style='margin-left:auto; margin-right:auto;'>\n\t<tbody id='sortable2'>\n\t<tr class='ui-state-disabled'>\n\t<th>Exercise&nbsp;&nbsp;</th>\n\t<th>Duration&nbsp;&nbsp;</th>\n\t<th>&nbsp;&nbsp;&nbsp;&nbsp;</th>\n\t</tr> ";
    $resultados = ExerciseInstances::find_all_by_day_id($my_id = $result->id);
    foreach ($resultados as $resultado) {
        $fitness = Exercise::find_by_id($id = $resultado->exercise_id);
        echo "<tr>\n\t<td>" . $fitness->exercise_name . "&nbsp;&nbsp;</td>\n\t<td>" . $resultado->exercise_duration . " sec.&nbsp;&nbsp;</td>\n\t<td><div onclick='dltexercize()' style='display: inline'>\n\t<h5 style='display: inline; color: firebrick'> &nbsp; &nbsp; x</h5>\n\t</div></td></tr>";
    }
    echo "</tbody>";
    echo "</table>";
    echo "</div>";
}