<?php
defined('BASEPATH') OR exit('No direct script access allowed');

/*
| -------------------------------------------------------------------------
| URI ROUTING
| -------------------------------------------------------------------------
| This file lets you re-map URI requests to specific controller functions.
|
| Typically there is a one-to-one relationship between a URL string
| and its corresponding controller class/method. The segments in a
| URL normally follow this pattern:
|
|	example.com/class/method/id/
|
| In some instances, however, you may want to remap this relationship
| so that a different class/function is called than the one
| corresponding to the URL.
|
| Please see the user guide for complete details:
|
|	http://codeigniter.com/user_guide/general/routing.html
|
| -------------------------------------------------------------------------
| RESERVED ROUTES
| -------------------------------------------------------------------------
|
| There are three reserved routes:
|
|	$route['default_controller'] = 'welcome';
|
| This route indicates which controller class should be loaded if the
| URI contains no data. In the above example, the "welcome" class
| would be loaded.
|
|	$route['404_override'] = 'errors/page_missing';
|
| This route will tell the Router which controller/method to use if those
| provided in the URL cannot be matched to a valid route.
|
|	$route['translate_uri_dashes'] = FALSE;
|
| This is not exactly a route, but allows you to automatically route
| controller and method names that contain dashes. '-' isn't a valid
| class or method name character, so it requires translation.
| When you set this option to TRUE, it will replace ALL dashes in the
| controller and method URI segments.
|
| Examples:	my-controller/index	-> my_controller/index
|		my-controller/my-method	-> my_controller/my_method
*/
$route['default_controller'] = 'home';
$route['404_override'] = '';
$route['translate_uri_dashes'] = TRUE;
$route['login'] = 'admin/users/login';
$route['logout'] = 'admin/users/logout';
$route['login/dologin'] = 'admin/users/dologin';

//amenidades
$route['amenidad'] = 'admin/amenidad';
$route['amenidad/page/(:num)'] = 'admin/amenidad/index/$1';
$route['amenidad/page'] = 'admin/amenidad';
$route['amenidad/add'] = 'admin/amenidad/add';
$route['amenidad/edit/(:num)'] = 'admin/amenidad/edit/$1';
$route['amenidad/remove/(:num)'] = 'admin/amenidad/remove/$1';

//avisos
$route['aviso'] = 'admin/aviso';
$route['aviso/page/(:num)'] = 'admin/aviso/index/$1';
$route['aviso/page'] = 'admin/aviso';
$route['aviso/add'] = 'admin/aviso/add';
$route['aviso/edit/(:num)'] = 'admin/aviso/edit/$1';
$route['aviso/remove/(:num)'] = 'admin/aviso/remove/$1';

//casetas de vigilancia
$route['caseta'] = 'admin/caseta';
$route['caseta/page/(:num)'] = 'admin/caseta/index/$1';
$route['caseta/page'] = 'admin/caseta';
$route['caseta/add'] = 'admin/caseta/add';
$route['caseta/edit/(:num)'] = 'admin/caseta/edit/$1';
$route['caseta/remove/(:num)'] = 'admin/caseta/remove/$1';

//categorias de proveedor
$route['categoriaproveedor'] = 'admin/categoriaproveedor';
$route['categoriaproveedor/page/(:num)'] = 'admin/categoriaproveedor/index/$1';
$route['categoriaproveedor/page'] = 'admin/categoriaproveedor';
$route['categoriaproveedor/add'] = 'admin/categoriaproveedor/add';
$route['categoriaproveedor/edit/(:num)'] = 'admin/categoriaproveedor/edit/$1';
$route['categoriaproveedor/remove/(:num)'] = 'admin/categoriaproveedor/remove/$1';

//condominios
$route['condominio'] = 'admin/condominio';
$route['condominio/page/(:num)'] = 'admin/condominio/index/$1';
$route['condominio/page'] = 'admin/condominio';
$route['condominio/add'] = 'admin/condominio/add';
$route['condominio/edit/(:num)'] = 'admin/condominio/edit/$1';
$route['condominio/remove/(:num)'] = 'admin/condominio/remove/$1';

//incidentes
$route['incidente'] = 'admin/incidente';
$route['incidente/page/(:num)'] = 'admin/incidente/index/$1';
$route['incidente/page'] = 'admin/incidente';
$route['incidente/add'] = 'admin/incidente/add';
$route['incidente/edit/(:num)'] = 'admin/incidente/edit/$1';
$route['incidente/remove/(:num)'] = 'admin/incidente/remove/$1';

//reservas
$route['reserva'] = 'admin/reserva';
$route['reserva/page/(:num)'] = 'admin/reserva/index/$1';
$route['reserva/page'] = 'admin/reserva';
$route['reserva/detail/(:num)'] = 'admin/reserva/detail/$1';

//visitas
$route['visita'] = 'admin/visita';
$route['visita/page/(:num)'] = 'admin/visita/index/$1';
$route['visita/page'] = 'admin/visita';
$route['visita/detail/(:num)'] = 'admin/visita/detail/$1';

//quejas
$route['queja'] = 'admin/queja';
$route['queja/page/(:num)'] = 'admin/queja/index/$1';
$route['queja/page'] = 'admin/queja';
$route['queja/detail/(:num)'] = 'admin/queja/detail/$1';
$route['queja/edit/(:num)'] = 'admin/queja/edit/$1';

//comentarios por quejas
$route['comentarioqueja/add/(:num)'] = 'admin/comentarioqueja/add/$1';
$route['comentarioqueja/detail/(:num)'] = 'admin/comentarioqueja/detail/$1';
$route['comentarioqueja/edit/(:num)'] = 'admin/comentarioqueja/edit/$1';

//inquilinos
$route['inquilino'] = 'admin/inquilino';
$route['inquilino/page/(:num)'] = 'admin/inquilino/index/$1';
$route['inquilino/page'] = 'admin/inquilino';
$route['inquilino/add'] = 'admin/inquilino/add';
$route['inquilino/edit/(:num)'] = 'admin/inquilino/edit/$1';
$route['inquilino/remove/(:num)'] = 'admin/inquilino/remove/$1';

//propiedades
$route['propiedad'] = 'admin/propiedad';
$route['propiedad/page/(:num)'] = 'admin/propiedad/index/$1';
$route['propiedad/page'] = 'admin/propiedad';
$route['propiedad/add'] = 'admin/propiedad/add';
$route['propiedad/edit/(:num)'] = 'admin/propiedad/edit/$1';
$route['propiedad/remove/(:num)'] = 'admin/propiedad/remove/$1';

//eventos
$route['evento'] = 'admin/evento';
$route['evento/page/(:num)'] = 'admin/evento/index/$1';
$route['evento/page'] = 'admin/evento';
$route['evento/add'] = 'admin/evento/add';
$route['evento/edit/(:num)'] = 'admin/evento/edit/$1';
$route['evento/remove/(:num)'] = 'admin/evento/remove/$1';

//proveedores
$route['proveedor'] = 'admin/proveedor';
$route['proveedor/page/(:num)'] = 'admin/proveedor/index/$1';
$route['proveedor/page'] = 'admin/proveedor';
$route['proveedor/add'] = 'admin/proveedor/add';
$route['proveedor/edit/(:num)'] = 'admin/proveedor/edit/$1';
$route['proveedor/remove/(:num)'] = 'admin/proveedor/remove/$1';


$route['admin/users'] = 'admin/users/index';
$route['admin/users/new'] = 'admin/users/new_user';
$route['admin/users/save'] = 'admin/users/save';
$route['admin/users/activate/(:num)'] = 'admin/users/activate/$1';
$route['admin/users/deactivate/(:num)'] = 'admin/users/deactivate/$1';
$route['admin/users/edit/(:num)'] = 'admin/users/edit/$1';
$route['admin/users/update/(:num)'] = 'admin/users/update/$1';

$route['admin/profile'] = 'admin/users/profile/';
$route['admin/users/updateprofile'] = 'admin/users/updateprofile/';
$route['admin/changepassword'] = 'admin/users/changepassword/';
$route['admin/updatepassword'] = 'admin/users/updatepassword/';


