예제 #1
0
파일: index.php 프로젝트: apexJCL/mvc
    <link rel="stylesheet" type="text/css" href="view/css/style.css">
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="theme-color" content="#037995">
    <title>Librería Tecnológico</title>
</head>
<body>

<?php 
require_once 'controller/index.php';
// Load the controller
$index = new IndexController();
// Instantiate Index Controller
if (isset($_GET['action'])) {
    switch ($_GET['action']) {
        case 'books':
            $index->showBooks();
            break;
        case 'autors':
            $index->showAutors();
            break;
        case 'login':
            $index->showLoginScreen();
            break;
        case 'check':
            $index->checkLogin();
            break;
        case 'delete':
            break;
        case 'edit':
            if ($_SESSION['user_type'] == 1) {
                $index->showEditScreen();