Beispiel #1
0
<?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();
}
Beispiel #2
0
// 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>