コード例 #1
0
ファイル: search_controller.php プロジェクト: nopomi/abinet
 public function index()
 {
     $institutions = Institution::all();
     $degrees = Degree::all();
     self::makeInstitutionsStrings($degrees);
     $favorites = FavoriteController::getUserFavorites();
     View::make('search.html', array('degrees' => $degrees, 'institutions' => $institutions, 'favorites' => $favorites));
 }
コード例 #2
0
 public static function home()
 {
     $degrees = Degree::all();
     $degree1 = $degrees['0'];
     $degree2 = $degrees['1'];
     $degree3 = $degrees['2'];
     $degree1->institution = $degree1->institutions['0'];
     $degree2->institution = $degree2->institutions['0'];
     $degree3->institution = $degree3->institutions['0'];
     View::make('home.html', array('degree1' => $degree1, 'degree2' => $degree2, 'degree3' => $degree3));
 }
コード例 #3
0
ファイル: degree_controller.php プロジェクト: nopomi/abinet
 public static function index()
 {
     if (self::get_user_admin() == null) {
         Redirect::to('/home');
     }
     $allInstitutions = Institution::all();
     $degrees = Degree::all();
     foreach ($degrees as $degree) {
         $institutions = $degree->institutions;
         $institutionList = "";
         foreach ($institutions as $institution) {
             $institutionList = $institutionList . $institution->name;
             $institutionList = $institutionList . "\n";
         }
         $degree->institutions = $institutionList;
     }
     View::make('admin/degrees.html', array('degrees' => $degrees));
 }