<?php require "app/controller/controller.php"; $mvc = new controller(); if (empty($_GET['action'])) { $_GET['action'] = "home"; } if ($_GET["action"] == "home") { $mvc->home(); } elseif ($_GET['action'] == "login") { $mvc->pageLogin(); } elseif ($_GET['action'] == "contenido") { $mvc->content(); } elseif ($_GET['action'] == "auscultacion") { $mvc->panel2(); } elseif ($_GET['action'] == "diagnostico") { $mvc->panel3(); } elseif ($_GET['action'] == "panel") { $mvc->panel_admin(); } else { $mvc->error(); }
// include file require 'controller/index.php'; //variable define for HTML content $title = 'Slider'; $heading = 'This is Slider application using php.'; // URl Splitting $url = $_SERVER['REQUEST_URI']; $url = explode("/", $url); $url = array_filter($url); $url = array_merge($url, array()); $index_url = $url[1]; echo $index_url; //controller Object $controller = new controller(); $controller->home($index_url); ?> <!DOCTYPE html> <html> <head> <title><?php echo $title; ?> </title> <link rel="stylesheet" href="css/style.css" /> </head> <body> <header> <nav id="top-nav"> <ul> <li><a href="home">Home</a></li>