Example #1
0
    public function index()
    {
        $view_page = "fundview/index";
        include_once ROOT_PATH . "admin/views/admin/container.php";
    }
    public function donations()
    {
        $id = $_GET['id'];
        $thisFund = $this->fundrepository->get_by_id($id);
        $view_page = "fundview/donations";
        include_once ROOT_PATH . "admin/views/admin/container.php";
    }
}
//OBJECT OF adminusercontroller
$fund = new Fund();
//IF m IS SET, SET IT TO $method, ELSE DEFAULT IT TO index
if (isset($_GET['m'])) {
    $method = $_GET['m'];
} else {
    $method = "index";
}
switch ($method) {
    case "index":
        $fund->index();
        break;
    case "donations":
        $fund->donations();
        break;
    default:
        $fund->index();
}