-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
36 lines (34 loc) · 1.03 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
define("BASE_PATH",dirname(__DIR__)."\ProyectoMultientregaCompleto/");
include_once 'Config/conexion.php';
error_reporting(0);
session_start();
if (isset($_SESSION['id_tuser'])){
switch ( $_SESSION['id_tuser'] ) {
case 1://ADMIN CLIENTE
include_once 'Controller/clienteAdmControl.php';
break;
case 2://ADMIN REPARTIDOR
include_once 'Controller/repartidorAdmControl.php';
break;
case 3://ADMIN PEDIDO
include_once 'Controller/pedidoAdmControl.php';
break;
case 4://ADMIN EMPRESA
include_once 'Controller/gananciaAdmControl.php';
break;
case 5://ADMIN EMPRESA PROVEEDOR
include_once 'Controller/empresaAdmcontrol.php';
break;
}
}else{
include_once "View/v_login.php";
}
$Controller = new control();
if(!isset($_REQUEST['c'])){
$Controller->index();
}else{
$action = $_REQUEST['c'];
call_user_func(array($Controller,$action));
}
?>