<?php
session_start();
$ruta=explode("?",$_SERVER['REQUEST_URI']);
$m=$ruta[1];
if($_SESSION['permisos_acceso'] == 'Super Admin'){
    //Inicio
    if($m=='inicio'){
        include ('view/inicio/view.html');
        include ('view/inicio/detalles_info.html');
        include ('view/inicio/fecha_filtro.html');
    }
    //Articulos
    elseif($m=='articulos'){
         include ('view/articulos/view.html');
         include ('view/articulos/nuevo_articulo.html');
         include ('view/articulos/editar_articulo.html');
    }
    //Ordenes
    elseif($m=='ordenes'){
        include ('view/ordenes/view.html');
        if($_SESSION['permisos_acceso']=='Comercial' || $_SESSION['permisos_acceso']=='Super Admin'){include ('view/ordenes/nueva_orden.html');}
        include ('view/ordenes/detalle_orden.html');
        include ('view/ordenes/asignar.html');
        include ('view/ordenes/fecha_orden1.html');
        include ('view/ordenes/fecha_orden2.html');
        include ('view/ordenes/fecha_orden3.html');
        include ('view/ordenes/fecha_orden4.html');
        include ('view/ordenes/fecha_orden5.html');
        include ('view/ordenes/of_mp_orden.html');
        include ('view/ordenes/rev_aseg_orden.html');
        include ('view/ordenes/of_ee_orden.html');
        include ('view/ordenes/seguimiento_orden.html');
    }
    //Entradas
    elseif($m=='guias'){
        include ('view/guias/view.html');
        include ('view/guias/detalle_guia.html');
        include ('view/guias/nueva_guia.html');
    }
    elseif($m=='asignar'){ 
        include ('view/guias/asignar.html');
        include ('view/guias/list_user.html');
    }
    
    //Clientes
    elseif($m=='clientes'){ 
        include ('view/clientes/view.html');
    }
    
    //Usuarios
    elseif($m=='usuarios'){ 
        include ('view/usuarios/view.html');
    }
    
    //Seguimiento
    elseif($m=='seguimiento'){ 
        include ('view/seguimiento/view.html');
        include ('view/seguimiento/nuevo_registro.html');
        include ('view/seguimiento/fecha_filtro.html');
    }
    
    //Mapa
    elseif($m=='mapa'){ 
        include ('view/mapa/view.html');
    }
    elseif($m=='mapa_user'){ 
        include ('view/mapa/mapa_user.html');
    }
    
    //Importacion de datos
    elseif($m=='importacion'){ 
        include ('view/guias/importacion.html');
    }
    elseif($m=='impo_guias'){ 
        include ('view/guias/importacion.php');
    }
    
    //Informes 
    elseif($m=='informes'){ 
        include ('view/informes/view.html');
    }
    
    //RNDC terceros
    elseif($m=='rndc_terceros'){ 
        include ('view/rndc/terceros/view.html');
        include ('view/rndc/terceros/nuevo_tercero.html');
    }
    //RNDC Vehiculos
    elseif($m=='rndc_vehiculos'){ 
        include ('view/rndc/vehiculos/view.html');
        //include ('view/rndc/vehiculos/nuevo_vehiculo.html');
    }
    //RNDC remesas
    elseif($m=='rndc_remesas'){ 
        include ('view/rndc/remesas/view.html');
        include ('view/rndc/remesas/nueva_remesa.html');
        include ('view/rndc/remesas/nuevo_tercero.html');
    }
}
if($_SESSION['permisos_acceso'] == 'Administrador'){
    if($m=='inicio'){
        include ('view/guias/view.html');
        include ('view/guias/detalle_guia.html');
        include ('view/guias/nueva_guia.html');
    }
    elseif($m=='guias'){
        include ('view/guias/view.html');
        include ('view/guias/detalle_guia.html');
        include ('view/guias/nueva_guia.html');
    }
    //Informes 
    elseif($m=='informes'){ 
        include ('view/informes/view.html');
    }
}
//$('#success').html('Gracias por ordenar las ciudades!').slideDown('slow').delay(1000).slideUp('slow');