예제 #1
0
 public static function viewUpdate($id)
 {
     self::check_logged_in();
     $catchers = CatchModel::catchers($id);
     $catch = CatchModel::find($id);
     $attributes = array('catch_id' => $catch->catch_id, 'date' => $catch->date, 'time' => $catch->time, 'species' => $catch->species, 'count' => $catch->count, 'length' => $catch->length, 'weight' => $catch->weight, 'water_sys' => $catch->water_sys, 'location' => $catch->location, 'wind_speed' => $catch->wind_speed, 'wind_dir' => $catch->wind_dir, 'air_temp' => $catch->air_temp, 'water_temp' => $catch->water_temp, 'cloudiness' => $catch->cloudiness, 'notes' => $catch->notes, 'picture_url' => $catch->picture_url, 'trap_id' => $catch->trap_id, 'trap_type' => $catch->trap_type, 'friends' => $catchers);
     $traps = Trap::all();
     $trap_types = Trap::types();
     View::make('catch/updateCatch.html', array('attributes' => $attributes, 'traps' => $traps, 'trap_types' => $trap_types, 'friend_of' => $_SESSION['friend_of']));
 }
예제 #2
0
 public static function trapList()
 {
     self::check_logged_in();
     $traps = Trap::all();
     View::make('trap/trapList.html', array('traps' => $traps));
 }