<?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:
|
|	https://codeigniter.com/userguide3/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'] = 'catalog_admin';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;

$route['catalog/admin'] = 'catalog_admin/index';
$route['catalog/admin/dashboard'] = 'catalog_admin/dashboard';
$route['catalog/admin/links'] = 'catalog_admin/links';
$route['catalog/admin/orders'] = 'catalog_admin/orders';
$route['catalog/admin/employees'] = 'catalog_admin/employees';
$route['catalog/admin/inventory'] = 'catalog_admin/inventory';
$route['catalog/admin/inventory/(:num)/ecommerce'] = 'catalog_admin/inventory_update_ecommerce/$1';
$route['catalog/admin/inventory/(:num)/upload-image'] = 'catalog_admin/inventory_upload_image/$1';
$route['catalog/admin/inventory/(:num)/image/(:num)/delete'] = 'catalog_admin/inventory_delete_image/$1/$2';
$route['catalog/admin/inventory/(:num)/images/reorder'] = 'catalog_admin/inventory_reorder_images/$1';
$route['catalog/admin/catalog'] = 'catalog_admin/catalog';
$route['catalog/admin/settings'] = 'catalog_admin/settings';
$route['catalog/admin/preview'] = 'catalog_admin/preview';
$route['catalog/admin/preview_disabled_page'] = 'catalog_admin/preview_disabled_page';
$route['catalog/admin/preview_thanks_page'] = 'catalog_admin/preview_thanks_page';
$route['catalog/admin/templates'] = 'catalog_admin/templates';
$route['catalog/admin/templates/edit/(:num)'] = 'catalog_admin/templates/$1';
$route['catalog/admin/templates/create'] = 'catalog_admin/create_template';
$route['catalog/admin/templates/update/(:num)'] = 'catalog_admin/update_template/$1';
$route['catalog/admin/templates/activate/(:num)'] = 'catalog_admin/activate_template/$1';
$route['catalog/admin/templates/delete/(:num)'] = 'catalog_admin/delete_template/$1';
$route['catalog/admin/settings/save'] = 'catalog_admin/save_catalog_settings';
$route['catalog/admin/create'] = 'catalog_admin/create_link';
$route['catalog/admin/links/delete/(:num)'] = 'catalog_admin/delete_link/$1';
$route['catalog/admin/permissions/save'] = 'catalog_admin/save_permissions';
$route['catalog/admin/orders/(:num)/csv'] = 'catalog_admin/export_order_csv/$1';
$route['catalog/admin/orders/(:num)/pdf'] = 'catalog_admin/export_order_pdf/$1';
$route['catalog/admin/orders/(:num)/process'] = 'catalog_admin/process_order/$1';
$route['catalog/admin/orders/(:num)/assign-customer'] = 'catalog_admin/assign_order_customer/$1';
$route['catalog/admin/orders/(:num)/delete'] = 'catalog_admin/delete_order/$1';
$route['catalog/admin/orders/(:num)'] = 'catalog_admin/order_detail/$1';
$route['catalog/login'] = 'catalog_login/index';
$route['catalog/login/submit'] = 'catalog_login/submit';
$route['catalog/logout'] = 'catalog_login/logout';
$route['catalog/image/(:num)'] = 'catalog/image/$1';
$route['catalog/l/(:any)'] = 'catalog/view/$1';
$route['catalog/l/(:any)/buy'] = 'catalog/checkout/$1';
$route['catalog/l/(:any)/confirm'] = 'catalog/confirm/$1';
$route['catalog/l/(:any)/thanks/(:num)'] = 'catalog/thanks/$1/$2';
$route['catalog/l/(:any)/download/(:num)'] = 'catalog/download_receipt/$1/$2';
