Ejemplo n.º 1
0
    <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();