|
Server : Apache System : Linux server.mata-lashes.com 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64 User : matalashes ( 1004) PHP Version : 8.1.29 Disable Function : NONE Directory : /home/matalashes/www/configHZQ/Jump/0-matalashes/simulasikite.mata-lashes.com/app/Config/ |
Upload File : |
<?php
namespace Config;
// Create a new instance of our RouteCollection class.
$routes = Services::routes();
// Load the system's routing file first, so that the app and ENVIRONMENT
// can override as needed.
if (file_exists(SYSTEMPATH . 'Config/Routes.php')) {
require SYSTEMPATH . 'Config/Routes.php';
}
/*
* --------------------------------------------------------------------
* Router Setup
* --------------------------------------------------------------------
*/
$routes->setDefaultNamespace('App\Controllers');
$routes->setDefaultController('Home');
$routes->setDefaultMethod('index');
$routes->setTranslateURIDashes(false);
$routes->set404Override(function () {
$session = Services::session();
$store_id = $session->get('ps_store_id');
if ($store_id != null) {
return view('public/404');
} else {
return view('admin/pages/primary/error404');
}
});
$routes->setAutoRoute(true);
/*
* --------------------------------------------------------------------
* Route Definitions
* --------------------------------------------------------------------
*/
// We get a performance increase by specifying the default
// route since we don't have to scan directories.
//Common
$routes->get('/override404', 'PS\Auth::override404');
$routes->get('/maintenance', 'PS\Auth::maintenance');
$routes->get('/changepassword', 'Ps\ChangePassword::index');
//Authstore
$routes->get('/', 'Store\Authstore::login');
$routes->get('/backoffice', 'Store\Authstore::login');
$routes->post('/backoffice', 'Store\Authstore::login');
$routes->get('/dashboardstore', 'Store\Authstore::dashboard');
$routes->post('/dashboardstore', 'Store\Authstore::dashboard');
$routes->get('/forgotstore', 'Store\Authstore::forgot');
$routes->post('/forgotstore', 'Store\Authstore::forgot');
$routes->get('/expiredstore', 'Store\Authstore::expired');
$routes->get('/newpasswordstore', 'Store\Authstore::newpassword');
$routes->get('/resetstore/(:any)', 'Store\Authstore::reset/$1');
$routes->post('/resetstore/(:any)', 'Store\Authstore::reset/$1');
$routes->get('/authlogoutstore', 'Store\Authstore::logout');
$routes->get('/backup-db', 'Store/Storebackupdb::backupdb');
/*
* --------------------------------------------------------------------
* 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 (file_exists(APPPATH . 'Config/' . ENVIRONMENT . '/Routes.php')) {
require APPPATH . 'Config/' . ENVIRONMENT . '/Routes.php';
}