diff --git a/app/Http/Controllers/AdminController.php b/app/Http/Controllers/AdminController.php index df6bf3032..b988afebf 100644 --- a/app/Http/Controllers/AdminController.php +++ b/app/Http/Controllers/AdminController.php @@ -75,40 +75,17 @@ class AdminController extends Controller //Get the user data from the table $data = User::where(['name' => $user])->get(); - try { - //Delete the user's ESI Scopes - EsiScope::where(['character_id' => $data->character_id])->delete(); - } catch(Exception $e) { - //Don't do anything. Just continue on. - } - - try { - //Delete the user's ESI Token - EsiToken::where(['character_id' => $data->character_id])->delete(); - } catch(Exception $e) { - //Don't do anything. Just continue on. - } + //Delete the user's ESI Scopes + DB::table('EsiScopes')->where(['character_id' => $data->character_id])->delete(); - try { - //Delete the user's roles from the roles table - UserRole::where(['character_id' => $data->character_id])->delete(); - } catch(Exception $e) { - //Don't do anything. Just continue on. - } + //Delete the user's ESI Token + DB::table('EsiTokens')->where(['character_id' => $data->character_id])->delete(); - try { - //Delete the user from the user table - User::where(['character_id' => $data->character_id])->delete(); - } catch(Exception $e) { - //Don't do anything. Just continue on. - } + //Delete the user's role from the roles table + DB::table('user_roles')->where(['character_id' => $data->character_id])->delete(); - try { - //Delete the user's structures - CorpStructure::where(['character_id' => $data->character_id])->delete(); - } catch(Exception $e) { - //Don't do anything. Just continue on. - } + //Delete the user from the user table + DB::table('users')->where(['character_id' => $data->character_id])->delete(); return redirect('/admin/dashboard')->with('success', 'User deleted from the site.'); } diff --git a/resources/views/fleets/displayfleets.blade.php b/resources/views/fleets/displayfleets.blade.php deleted file mode 100644 index 3e5770b40..000000000 --- a/resources/views/fleets/displayfleets.blade.php +++ /dev/null @@ -1,27 +0,0 @@ -@extends('layouts.b4') -@section('content') -
-

Fleets

- @if(isset($error)) - - @endif - @if(isset($data)) - @for($i = 0; $i < count($data[0]); $i++) - Join {{ $data[2][$i] }}
- @if(Auth::user()->character_id == $data[0][$i]) - Delete Fleet

- @endif - - @if(Auth::user()->character_id == $data[0][$i]) - {!! Form::open(['action' => '/fleets/{fleet_id}/addpilot/{name}', 'method' => 'GET']) !!} -
- {{ Form::label('pilot', 'Pilot') }} - {{ Form::text('pilot', '', ['class' => 'form-control']) }} -
- {{ Form::submit('Submit', ['class' => 'btn btn-primary']) }} - {!! Form::close() !!} - @endif - @endfor - @endif -
-@endsection \ No newline at end of file diff --git a/resources/views/fleets/registerfleet.blade.php b/resources/views/fleets/registerfleet.blade.php deleted file mode 100644 index 7292fb8f1..000000000 --- a/resources/views/fleets/registerfleet.blade.php +++ /dev/null @@ -1,15 +0,0 @@ -@extends('layouts.b4') -@section('content') -
-

Register A New Fleet

- {!! Form::open(['action' => 'FleetsController@registerFleet', 'method' => 'POST']) !!} -
- {{ Form::label('fleetUri', 'Fleet') }} - {{ Form::text('fleetUri', '', ['class' => 'form-control', 'placeholder' => 'Fleet URL']) }} - {{ Form::label('description', 'Fleet Name') }} - {{ Form::text('description', '', ['class' => 'form control', 'placeholder' => 'Fleet Name']) }} -
- {{ Form::submit('Submit', ['class' => 'btn btn-primary']) }} - {!! Form::close() !!} -
-@endsection \ No newline at end of file diff --git a/resources/views/scopes/select.blade.php b/resources/views/scopes/select.blade.php index 7b8f0c2ef..70fe1cdf9 100644 --- a/resources/views/scopes/select.blade.php +++ b/resources/views/scopes/select.blade.php @@ -2,8 +2,6 @@ @section('content') @break @endif - @endforeach - @foreach($scopes as $scope) - @if($scope->scope == 'esi-fleets.write_fleet.v1') -
- {{ Form::label('scopes[]', 'Write Fleet') }} - {{ Form::checkbox('scopes[]', 'esi-fleets.write_fleet.v1', 'true') }} -
- - @break - @endif - @endforeach - @foreach($scopes as $scope) - @if($scope->scope == 'esi-fleets.read_fleet.v1') -
- {{ Form::label('scopes[]', 'Read Fleet') }} - {{ Form::checkbox('scopes[]', 'esi-fleets.read_fleet.v1', 'true') }} -
- - @break - @endif - @endforeach + @endforeach @foreach($scopes as $scope) @if($scope->scope == 'esi-location.read_location.v1')
@@ -131,18 +109,6 @@ {{ Form::checkbox('scopes[]', 'publicData') }}
@endif - @if($writeFleet == false) -
- {{ Form::label('scopes[]', 'Write Fleet') }} - {{ Form::checkbox('scopes[]', 'esi-fleets.write_fleet.v1') }} -
- @endif - @if($readFleet == false) -
- {{ Form::label('scopes[]', 'Read Fleet') }} - {{ Form::checkbox('scopes[]', 'esi-fleets.read_fleet.v1') }} -
- @endif @if($readLocation == false)
{{ Form::label('scopes[]', 'Read Location') }}