2018-11-15 10:45:49 +00:00
|
|
|
<?php
|
|
|
|
|
2021-05-03 12:53:40 +00:00
|
|
|
use Illuminate\Support\Facades\Auth;
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
|
2021-08-11 13:45:30 +00:00
|
|
|
use App\Http\Controllers\{HomeController,
|
|
|
|
DomainController,
|
|
|
|
EchoareaController,
|
2021-08-29 01:48:27 +00:00
|
|
|
EchomailController,
|
2021-08-11 13:45:30 +00:00
|
|
|
FileareaController,
|
2023-06-18 13:33:26 +00:00
|
|
|
NetmailController,
|
2021-08-11 13:45:30 +00:00
|
|
|
SystemController,
|
|
|
|
UserController,
|
2021-09-27 12:50:47 +00:00
|
|
|
UserSwitchController,
|
2021-08-11 13:45:30 +00:00
|
|
|
ZoneController};
|
2021-05-03 12:53:40 +00:00
|
|
|
use App\Http\Controllers\Auth\LoginController;
|
|
|
|
|
2018-11-15 10:45:49 +00:00
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Web Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Here is where you can register web routes for your application. These
|
|
|
|
| routes are loaded by the RouteServiceProvider within a group which
|
|
|
|
| contains the "web" middleware group. Now create something great!
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2021-05-03 12:53:40 +00:00
|
|
|
Auth::routes([
|
|
|
|
'login' => true,
|
|
|
|
'logout' => true,
|
|
|
|
'register' => true,
|
|
|
|
'reset' => true, // for resetting passwords
|
|
|
|
'confirm' => true, // for additional password confirmations
|
|
|
|
'verify' => true, // for email verification
|
|
|
|
]);
|
|
|
|
Route::get('logout',[LoginController::class,'logout']);
|
2021-09-27 12:50:47 +00:00
|
|
|
Route::get('admin/switch/start/{o}',[UserSwitchController::class,'user_switch_start']);
|
|
|
|
Route::get('admin/switch/stop',[UserSwitchController::class,'user_switch_stop']);
|
2021-05-03 12:53:40 +00:00
|
|
|
|
2023-06-26 00:32:38 +00:00
|
|
|
// Unauthed routes
|
2021-10-26 12:19:55 +00:00
|
|
|
Route::get('/',[HomeController::class,'home']);
|
2021-06-12 15:14:34 +00:00
|
|
|
Route::view('about','about');
|
2022-11-25 10:44:03 +00:00
|
|
|
Route::view('domain/list','domain.list');
|
2023-10-05 11:59:59 +00:00
|
|
|
Route::get('domain/view/{o}',[DomainController::class,'view'])
|
2023-06-26 00:32:38 +00:00
|
|
|
->where('o','[0-9]+');
|
|
|
|
Route::match(['get','post'],'pkt',[HomeController::class,'pkt']);
|
2023-11-24 10:49:38 +00:00
|
|
|
Route::get('/status',[HomeController::class,'status']);
|
2023-04-15 05:09:32 +00:00
|
|
|
Route::view('system/list','system.list');
|
2022-11-25 10:44:03 +00:00
|
|
|
Route::get('system/view/{o}',[SystemController::class,'view'])
|
|
|
|
->where('o','[0-9]+');
|
2023-06-26 00:32:38 +00:00
|
|
|
Route::get('search',[HomeController::class,'search']);
|
2024-04-22 04:27:48 +00:00
|
|
|
Route::view('user/permissions','auth.permissions');
|
2021-05-03 12:53:40 +00:00
|
|
|
|
2022-03-14 11:28:54 +00:00
|
|
|
Route::middleware(['auth','verified','activeuser'])->group(function () {
|
2024-04-13 14:47:08 +00:00
|
|
|
Route::view('dashboard','dashboard');
|
2023-10-05 11:27:25 +00:00
|
|
|
|
2024-04-22 04:27:48 +00:00
|
|
|
/* ACCOUNT PATHS */
|
2024-04-25 05:27:45 +00:00
|
|
|
Route::match(['get','post'],'user/addedit/{o?}',[UserController::class,'add_edit'])
|
|
|
|
->where('o','[0-9]+');
|
2024-04-22 04:27:48 +00:00
|
|
|
|
2024-05-04 14:10:55 +00:00
|
|
|
/* ADDRESS PATHS */
|
|
|
|
Route::post('address/api/validated/{state}',[SystemController::class,'api_address_validated_toggle'])
|
|
|
|
->whereIn('state',['on','off']);
|
|
|
|
|
2023-10-05 11:42:41 +00:00
|
|
|
/* DOMAIN PATHS */
|
|
|
|
Route::view('domain','domain.home');
|
|
|
|
Route::get('domain/api/hosts/{o}/{region}',[DomainController::class,'api_hosts'])
|
|
|
|
->where('o','[0-9]+')
|
|
|
|
->where('region','[0-9]+');
|
|
|
|
Route::get('domain/api/hubs/{o}/{host}',[DomainController::class,'api_hubs'])
|
|
|
|
->where('o','[0-9]+');
|
|
|
|
Route::get('domain/api/regions/{o}',[DomainController::class,'api_regions'])
|
|
|
|
->where('o','[0-9]+');
|
|
|
|
Route::match(['get','post'],'domain/addedit/{o?}',[DomainController::class,'add_edit'])
|
2021-06-13 13:00:26 +00:00
|
|
|
->where('o','[0-9]+');
|
2023-10-05 11:42:41 +00:00
|
|
|
|
2023-10-05 11:49:57 +00:00
|
|
|
Route::view('echoarea','echoarea.home');
|
|
|
|
Route::match(['get','post'],'echoarea/addedit/{o?}',[EchoareaController::class,'add_edit'])
|
2021-08-11 13:45:30 +00:00
|
|
|
->where('o','[0-9]+');
|
2023-10-05 11:49:57 +00:00
|
|
|
Route::view('filearea','filearea.home');
|
|
|
|
Route::match(['get','post'],'filearea/addedit/{o?}',[FileareaController::class,'add_edit'])
|
2021-08-11 13:45:30 +00:00
|
|
|
->where('o','[0-9]+');
|
|
|
|
|
2023-10-05 11:15:53 +00:00
|
|
|
/* SYSTEM PATHS */
|
|
|
|
Route::view('system','system.home');
|
|
|
|
Route::post('system/api/address/{o}',[SystemController::class,'api_address'])
|
2021-06-17 14:08:30 +00:00
|
|
|
->where('o','[0-9]+');
|
2024-05-04 14:10:55 +00:00
|
|
|
Route::post('system/api/autohold/{state}',[SystemController::class,'api_autohold_toggle'])
|
|
|
|
->whereIn('state',['on','off']);
|
2023-10-05 11:15:53 +00:00
|
|
|
Route::get('system/api/address/get/{o}',[SystemController::class,'api_address_get'])
|
2021-07-04 11:47:23 +00:00
|
|
|
->where('o','[0-9]+');
|
2023-10-05 11:15:53 +00:00
|
|
|
Route::get('system/api/address/orphan',[SystemController::class,'api_address_orphan']);
|
|
|
|
Route::match(['get','post'],'system/addedit/{o?}',[SystemController::class,'add_edit'])
|
2021-06-20 13:03:20 +00:00
|
|
|
->where('o','[0-9]+');
|
2023-10-05 11:15:53 +00:00
|
|
|
Route::post('system/address/add/{o}',[SystemController::class,'address_add'])
|
2021-07-01 14:25:41 +00:00
|
|
|
->where('o','[0-9]+');
|
2023-10-05 11:15:53 +00:00
|
|
|
Route::get('system/address/del/{o}',[SystemController::class,'address_del'])
|
2023-07-06 08:43:32 +00:00
|
|
|
->where('o','[0-9]+');
|
2023-10-05 11:15:53 +00:00
|
|
|
Route::get('system/address/dem/{o}',[SystemController::class,'address_dem'])
|
2023-07-06 08:43:32 +00:00
|
|
|
->where('o','[0-9]+');
|
2023-10-05 11:15:53 +00:00
|
|
|
Route::match(['get','post'],'system/address/mov/{so}/{o}',[SystemController::class,'address_mov'])
|
|
|
|
->where('so','[0-9]+')
|
2021-08-25 12:13:49 +00:00
|
|
|
->where('o','[0-9]+');
|
2023-10-05 11:15:53 +00:00
|
|
|
Route::get('system/address/pro/{o}',[SystemController::class,'address_pro'])
|
2022-11-01 11:24:36 +00:00
|
|
|
->where('o','[0-9]+');
|
2023-10-05 11:15:53 +00:00
|
|
|
Route::get('system/address/pur/{id}',[SystemController::class,'address_pur'])
|
2021-08-08 07:27:22 +00:00
|
|
|
->where('o','[0-9]+');
|
2023-10-05 11:15:53 +00:00
|
|
|
Route::get('system/address/rec/{id}',[SystemController::class,'address_rec'])
|
|
|
|
->where('o','[0-9]+');
|
|
|
|
Route::get('system/address/sus/{o}',[SystemController::class,'address_sus'])
|
|
|
|
->where('o','[0-9]+');
|
|
|
|
Route::match(['get','post'],'system/areafix/{o}/{zo}',[SystemController::class,'areafix'])
|
2023-07-19 05:16:25 +00:00
|
|
|
->where('o','[0-9]+')
|
2023-10-05 11:15:53 +00:00
|
|
|
->where('zo','[0-9]+');
|
|
|
|
Route::match(['get','post'],'system/echoarea/{o}',[SystemController::class,'echoareas'])
|
2022-11-19 01:02:13 +00:00
|
|
|
->where('o','[0-9]+');
|
2023-10-05 11:15:53 +00:00
|
|
|
Route::match(['get','post'],'system/filearea/{o}',[SystemController::class,'fileareas'])
|
2022-11-19 01:02:13 +00:00
|
|
|
->where('o','[0-9]+');
|
2023-10-05 11:15:53 +00:00
|
|
|
Route::view('system/ours','system.ours');
|
|
|
|
Route::post('system/session/add/{o}',[SystemController::class,'session_add'])
|
2021-07-01 14:25:41 +00:00
|
|
|
->where('o','[0-9]+');
|
2023-10-05 11:15:53 +00:00
|
|
|
Route::get('system/session/del/{o}/{zo}',[SystemController::class,'session_del'])
|
|
|
|
->where('o','[0-9]+')
|
|
|
|
->where('zo','[0-9]+');
|
|
|
|
|
|
|
|
Route::post('file/contents/{o}/{date}',[HomeController::class,'file_contents'])
|
|
|
|
->where('o','[0-9]+')
|
|
|
|
->where('date','[0-9:\-@]+');
|
2021-11-11 11:57:13 +00:00
|
|
|
|
2023-06-26 00:32:38 +00:00
|
|
|
Route::match(['get','post'],'link',[UserController::class,'link']);
|
2023-07-19 05:16:25 +00:00
|
|
|
Route::post('packet/contents/{o}/{packet}',[HomeController::class,'packet_contents'])
|
|
|
|
->where('o','[0-9]+')
|
2024-06-07 03:27:10 +00:00
|
|
|
->where('packet','[0-9a-zA-Z]+');
|
2023-10-05 11:15:53 +00:00
|
|
|
|
|
|
|
Route::match(['get','post'],'user/system/register',[SystemController::class,'register']);
|
2022-12-04 02:30:38 +00:00
|
|
|
Route::match(['post'],'user/system/link',[SystemController::class,'system_link']);
|
2023-10-05 11:27:25 +00:00
|
|
|
|
|
|
|
/* ZONE PATHS */
|
|
|
|
Route::view('zone','zone.home');
|
|
|
|
Route::post('zone/api/default/{o}',[ZoneController::class,'api_default'])
|
|
|
|
->where('o','[0-9]+');
|
|
|
|
Route::match(['get','post'],'zone/addedit/{o?}',[ZoneController::class,'add_edit'])
|
|
|
|
->where('o','[0-9]+');
|
2021-06-14 11:33:18 +00:00
|
|
|
});
|
|
|
|
|
2023-12-18 02:00:04 +00:00
|
|
|
Route::middleware(['auth','can:view,o'])->group(function () {
|
2023-12-19 00:45:11 +00:00
|
|
|
Route::get('echomail/view/{o}',[EchomailController::class,'view']);
|
2023-12-18 02:00:04 +00:00
|
|
|
Route::get('netmail/view/{o}',[NetmailController::class,'view']);
|
|
|
|
});
|
|
|
|
|
2021-06-15 12:19:14 +00:00
|
|
|
Route::middleware(['auth','can:admin'])->group(function () {
|
2023-09-08 14:07:46 +00:00
|
|
|
Route::match(['get','post'],'address/merge/{id}',[SystemController::class,'address_merge']);
|
2023-06-26 00:32:38 +00:00
|
|
|
Route::match(['get','post'],'setup',[HomeController::class,'setup']);
|
2023-10-05 12:28:18 +00:00
|
|
|
|
2024-04-25 05:27:45 +00:00
|
|
|
Route::view('user/list','user.list');
|
2021-06-15 12:19:14 +00:00
|
|
|
});
|