set('cardioexercises', $cardioexercises->find('id>0', array('order' => 'name ASC'), 7200)); $strengthexercises = new DB\SQL\Mapper($s3xDB, 'view_fitness_exercise_strength', null, 7200); $f3->set('strengthexercises', $strengthexercises->find('id>0', array('order' => 'name ASC'), 7200)); //sidebar stuff - end $plans = new DB\SQL\Mapper($s3xDB, 'view_fitness_plan', null, $ttl); $f3->set('plans', $plans->find(array('creatorid = ?', $profile['id']), null, $ttl)); $workouts = new DB\SQL\Mapper($s3xDB, 'view_fitness_workout', null, $ttl); $f3->set('workouts', $workouts->find(array('userid = ?', $profile['id']), null, $ttl)); $calorieweeks = new DB\SQL\Mapper($s3xDB, 'view_fitness_caloriesbyweek', null, $ttl); $f3->set('calorieweeks', $calorieweeks->find(array('userid = ?', $profile['id']), null, $ttl)); $f3->set('pageaction', 'fitness_workouts'); echo Template::instance()->render('workouts/index.htm'); } ?>