<?php
/* 
 * Copyright (C) 2016 Anto
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

/**
 * Class to connect the controller to the views of the application.
 */
class View {
	
    /**
     * Function to show the view with the information needed.
     * @param type $view It is the url of the view.
     * @param type $username It is the user's name.
     * @param type $usertype It is the user's type.
     * @param type $data It is the data needed in the view.
     * @param type $data2 It is more data needed in the view.
     */
	public static function show($view) {
		include ("templates/header.php");
		$listaVistas = explode(",", $view);
		for ($i = 0; $i < count($listaVistas); $i++) {
			include ("views/".$listaVistas[$i].".php");
		}
		include ("templates/footer.php");
	}
        
}

