<?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/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/index';
$route['404_override'] = 'home/error_404';
$route['translate_uri_dashes'] = FALSE;
$route['index'] = 'home/index';


$route['login'] = 'admin/home/index';
$route['logout'] = 'admin/home/logout';
$route['users'] = 'home/users';
$route['contacts'] = 'home/contact';
$route['payment-success'] = 'payment/success/';
$route['payment-post'] = 'stripe/payment';
$route['dashboard'] = 'admin/dashboard';
$route['setup-admin'] = 'admin/home/create_admin';

$route['admin'] = 'admin/home/index';
$route['terms-conditions'] = 'home/terms';
$route['cookies-privacy'] = 'home/privacy';
$route['review'] = 'home/review';


$route['create-profile/(:any)'] = 'home/create/$1';	



$route['error-404'] = 'home/error_404';
$route['error-404'] = 'profile/error_404';


$route['create-profile-(:any)'] = 'home/create/$1';

$route['new-update/(:any)'] = 'admin/home/update_version/$1';



$route['save-qr/(:any)'] = 'admin/home/qrcode/$1';

/*  profile with " - "
================================================== */


$route['all-post-(:any)'] = 'profile/all_posts/$1';
$route['category-post-(:any)-(:any)'] = 'profile/all_posts_by_category/$1/$2';
$route['tag-post-(:any)-(:any)'] = 'profile/get_single_post_by_tag/$1/$2';
$route['post-(:any)-(:any)'] = 'profile/get_single_post_by_slug/$1/$2';

/*  Profile with " / "
================================================== */


$route['about/(:any)'] = 'profile/about/$1';
$route['portfolio/(:any)'] = 'profile/portfolio/$1';
$route['resume/(:any)'] = 'profile/resume/$1';
$route['services/(:any)'] = 'profile/services/$1';
$route['appointment/(:any)'] = 'profile/appointment/$1';
$route['blog/(:any)'] = 'profile/blog/$1';
$route['contact/(:any)'] = 'profile/contact/$1';
$route['contacts/(:any)'] = 'profile/contact/$1';
$route['single-service/(:any)/(:any)'] = 'profile/single_service/$1/$2';


$route['all-post/(:any)'] = 'profile/all_posts/$1';
$route['category-post/(:any)/(:any)'] = 'profile/all_posts_by_category/$1/$2';
$route['tag-post/(:any)/(:any)'] = 'profile/get_single_post_by_tag/$1/$2';
$route['post/(:any)/(:any)'] = 'profile/get_single_post_by_slug/$1/$2';

/* user payment method
================================================== */
$route['payment-method/(:any)/(:any)'] = 'admin/home/payment_method/$1/$2';


/* Payment method paypal
================================================== */

$route['paypal-payment/(:any)/(:any)'] = 'payment/paypal_payment/$1/$2';;



/* Payment method Stripe
================================================== */

$route['stripe-payment/(:any)/(:any)'] = 'stripe/index/$1/$2';

$route['stripe-payment-success/(:any)/(:any)'] = 'stripe/stripe_success/$1/$2';

/* Offline payment
================================================== */
$route['offline-payment/(:any)/(:any)'] = 'stripe/offline_payment/$1/$2';

/* home section
================================================== */






/*  blog
================================================== */

$route['admin/categories'] = 'admin/blog/categories';
$route['admin/categories/add'] = 'admin/blog/add_category';
$route['admin/tags'] = 'admin/blog/tags';
$route['change-status/(:any)/(:any)/(:any)'] = 'admin/blog/change_status/$1/$2/$3';
$route['admin/post'] = 'admin/blog/index';
$route['admin/post-add'] = 'admin/blog/add_post';

$route['delete-item/(:any)/(:any)'] = 'admin/profile/item_delete/$1/$2';
$route['delete-icon/(:any)/(:any)'] = 'admin/dashboard/item_delete/$1/$2';
$route['pages/(:any)'] = 'home/pages/$1';


/* blog
================================================== */

$route['save-vcard/(:any)'] = 'admin/vcard/load_vcard/$1';
$route['preview-vcard'] = 'profile/preview_vcard';
$route['profile/(:any)'] = 'profile/profile/$1';
$route['(:any)'] = 'profile/my_info/$1';
$route['-(:any)'] = 'profile/my_info/$1';