donation/app/Config/Routes.php
2023-12-14 17:38:07 +05:30

179 lines
8.2 KiB
PHP

<?php
namespace Config;
// Create a new instance of our RouteCollection class.
$routes = Services::routes();
/*
* --------------------------------------------------------------------
* Router Setup
* --------------------------------------------------------------------
*/
$routes->setDefaultNamespace('App\Controllers');
$routes->setDefaultController('Authentication');
$routes->setDefaultMethod('index');
$routes->setTranslateURIDashes(false);
$routes->set404Override();
// The Auto Routing (Legacy) is very dangerous. It is easy to create vulnerable apps
// where controller filters or CSRF protection are bypassed.
// If you don't want to define all routes, please use the Auto Routing (Improved).
// Set `$autoRoutesImproved` to true in `app/Config/Feature.php` and set the following to true.
// $routes->setAutoRoute(false);
/*
* --------------------------------------------------------------------
* Route Definitions
* --------------------------------------------------------------------
*/
// We get a performance increase by specifying the default
// route since we don't have to scan directories.
# Authentication Routes
$routes->get('/', 'Authentication::index');
$routes->get('login/', 'Authentication::index');
$routes->post('authenticate/', 'Authentication::authenticate');//Routes For Authentication.
$routes->get('logout/', 'Authentication::logout');
$routes->get('auth_confirm_mail/', 'Authentication::auth_confirm_mail');//Routes For Confirmation Mail alert page.
$routes->get('auth_reset_password/', 'Authentication::auth_reset_password');//Routes For Load Reset password Page.
$routes->post('auth_reset_password_save/', 'Authentication::auth_reset_password_save');//Routes For update the Resetted password.
$routes->get('lockscreen/', 'Authentication::lockscreen');
$routes->get('lock/', 'Authentication::lock');
$routes->post('unlock/', 'Authentication::unlock');
# Dashboard Routes
$routes->get('dashboard/', 'Home::index');
# Users Routes
$routes->get("user_list/", "Users::index");
$routes->get("user_page/(:any)", "Users::user_page/$1");
$routes->post("insert_users", "Users::insert_users");
$routes->get("delete_user/(:any)", "Users::delete_user/$1");
# Causes Routes
$routes->get("causes_list/", "Books::index");
$routes->get("add_causes/(:any)", "Books::add_causes/$1");
$routes->post("insert_books", "Books::insert_books");
$routes->get("delete_books/(:any)", "Books::delete_books/$1");
# Site-Setting Routes
$routes->get("sitesetting_list/", "Settings::index");
$routes->get("sitesetting_page/(:any)", "Settings::sitesetting_page/$1");
$routes->post("sitesetting_synchronization", "Settings::sitesetting_synchronization");
$routes->get("delete_sitesetting/(:any)", "Books::delete_sitesetting/$1");
# Business Routes
$routes->get("business_list/", "Business::index");
$routes->get("new_bussiness/(:any)", "Business::new_bussiness/$1");
$routes->post("insert_business/", "Business::insert_business");
$routes->get("delete_business/(:any)", "Business::delete_business/$1");
# Donor Routes
$routes->get("Donor_list/", "Customer::index");
$routes->get("new_Donor/(:any)", "Customer::new_Donor/$1");
$routes->post("insert_customer", "Customer::insert_customer");
$routes->get("delete_customer/(:any)", "Customer::delete_customer/$1");
# Routes for Customer group
$routes->get('customer_group/', 'Customer::customer_group');
$routes->get('view_customer_group/(:any)', 'Customer::view_customer_group/$1');
$routes->get('preview_customer_group/(:any)', 'Customer::preview_customer_group/$1');
$routes->get('delete_customer_group/(:any)', 'Customer::delete_customer_group/$1');
$routes->post("insert_customer_group", "Customer::insert_customer_group");
# Scheme Routes
$routes->get("scheme_list/", "Scheme::index");
$routes->get("new_scheme/(:any)", "Scheme::new_scheme/$1");
$routes->post("insert_scheme/", "Scheme::insert_scheme");
$routes->get("delete_scheme/(:any)", "Scheme::delete_scheme/$1");
#subscription Routes
$routes->get("subscribers_list/", "Subscription::index");
$routes->get("new_subscription_invoice/(:any)", "Invoice::new_subscription_invoice/$1");
$routes->post("add_subscription/", "Subscription::add_subscription/");
$routes->post('subscription/download_details', 'Subscription::download_details');
#adres priknt
$routes->get('addressprint/', 'Address::index');
$routes->post('address/generatePdf', 'Address::generatePdf');
#evnts
$routes->get("campaign_list/", "Event::index");
$routes->get("new_campaign/(:any)", "Event::new_campaign/$1");
$routes->post("insert_event/", "Event::insert_event");
$routes->get('invoice_number_format/(:any)', 'Event::invoice_number_format/$1');
$routes->post("insert_invoice_number_format", "Event::insert_invoice_number_format");
#Receipt Routes
$routes->get("receipt_list/", "Invoice::index");
$routes->get("new_receipt/(:any)", "Invoice::new_receipt/$1");
// $routes->get("new_subscription_invoice/(:any)", "Invoice::new_subscription_invoice/$1");
$routes->post("load_details1/", "Invoice::load_details1/");
$routes->post("load_details2/", "Invoice::load_details2/");
$routes->post("save_invoice/", "Invoice::save_invoice/");
$routes->get("delete_invoice/(:any)", "Invoice::delete_invoice/$1");
$routes->add('approve_invoice/(:num)', 'Invoice::approve_invoice/$1');
$routes->get('generate_invoice_pdf/(:num)', 'Invoice::generate_invoice_pdf/$1');
$routes->get('print_address/(:num)', 'Invoice::print_address/$1');
$routes->get('print_address/(:num)', 'Invoice::print_address/$1');
$routes->match(['get','post'],'/general_inv_rp','Invoice::general_inv_rp');
$routes->match(['get','post'],'/mem_inv_rp','Invoice::general_membership_inv_rp');
$routes->match(['get','post'],'/itemwise_report','Invoice::itemwise_report');
# Notifications Routes
// $routes->get('controller/SubExpdetail/(:num)', 'YourController::SubExpdetail/$1');
$routes->cli("getExpCustomerDetail/(:num)",'Notifications::getExpCustomerDetail/$1');
$routes->get('send_whatsapp_message/', 'Notifications::send_whatsapp_message');
$routes->post('whatsapp_custom_notifications/', 'Notifications::whatsapp_custom_notifications');
$routes->match(['post', 'get'], 'mail_custom_notifications', 'Notifications::mail_custom_notifications');
// $routes->match(['post', 'get'], 'due_date_notifications', 'Notifications::due_date_notifications');
// $routes->get('due_date_notifications/(:any)', 'Notifications::due_date_notifications/$1');
$routes->get('due_date_notifications', 'Notifications::due_date_notifications');
$routes->get('template_creation/', 'Notifications::template_creation');
$routes->get('template_creation_form/(:any)', 'Notifications::template_creation_form/$1');
$routes->get('template_creation_delete/(:any)', 'Notifications::template_creation_delete/$1');
$routes->post("template_creation_insert", "Notifications::template_creation_insert");
$routes->get('campaign_creation/', 'Notifications::campaign_creation');
$routes->get('campaign_creation_form/(:any)', 'Notifications::campaign_creation_form/$1');
$routes->get('campaign_creation_delete/(:any)', 'Notifications::campaign_creation_delete/$1');
$routes->post("campaign_creation_insert", "Notifications::campaign_creation_insert");
# Api integration Routes
$routes->post('api/(:any)', 'ApiIntegration::api_integration/$1');
// $routes->group("api", function ($routes) {
// // $routes->post("create_products/", "ApiIntegration::save_book_details");
// // $routes->match(['put', 'post', 'get', 'delete'], 'products', 'ApiIntegration::book_api_integration');
// // $routes->match(['put', 'post', 'get', 'delete'], 'customers', 'ApiIntegration::customer_api_integration');
// // $routes->match(['put', 'post', 'get', 'delete'], 'orders', 'ApiIntegration::sales_api_integration');
// });
/*
* --------------------------------------------------------------------
* Additional Routing
* --------------------------------------------------------------------
*
* There will often be times that you need additional routing and you
* need it to be able to override any defaults in this file. Environment
* based routes is one such time. require() additional route files here
* to make that happen.
*
* You will have access to the $routes object within that file without
* needing to reload it.
*/
if (is_file(APPPATH . 'Config/' . ENVIRONMENT . '/Routes.php')) {
require APPPATH . 'Config/' . ENVIRONMENT . '/Routes.php';
}