diff --git a/.gitattributes b/.gitattributes index 21256661..e69de29b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +0,0 @@ -* text=auto \ No newline at end of file diff --git a/README.md b/README.md index e19b379d..0e907ffd 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ## SeAT - Simple (or Stupid) EVE Online API Tool ## -[![Latest Stable Version](https://poser.pugx.org/eve-seat/seat/v/stable.svg)](https://packagist.org/packages/eve-seat/seat) [![Total Downloads](https://poser.pugx.org/eve-seat/seat/downloads.svg)](https://packagist.org/packages/eve-seat/seat) [![Latest Unstable Version](https://poser.pugx.org/eve-seat/seat/v/unstable.svg)](https://packagist.org/packages/eve-seat/seat) [![License](https://poser.pugx.org/eve-seat/seat/license.svg)](https://packagist.org/packages/eve-seat/seat) +[![Latest Stable Version](https://poser.pugx.org/eve-seat/seat/v/stable.svg)](https://packagist.org/packages/eve-seat/seat) [![Latest Unstable Version](https://poser.pugx.org/eve-seat/seat/v/unstable.svg)](https://packagist.org/packages/eve-seat/seat) [![License](https://poser.pugx.org/eve-seat/seat/license.svg)](https://packagist.org/packages/eve-seat/seat) ##### *SeAT is still under heavy development and is not considered 100% stable yet. USE AT YOUR OWN RISK* ##### diff --git a/app/commands/SeatAPIUpdate.php b/app/commands/SeatAPIUpdate.php index 5379546b..7eb17121 100644 --- a/app/commands/SeatAPIUpdate.php +++ b/app/commands/SeatAPIUpdate.php @@ -72,9 +72,9 @@ public function fire() // Call the addToQueue helper to queue jobs for // the EVE Server, Map and General EVE info - \App\Services\Queue\QueueHelper::addToQueue(array('Full', 'Server'), 0, NULL, 'ServerStatus', 'Server'); - \App\Services\Queue\QueueHelper::addToQueue(array('Full', 'Map'), 0, NULL, 'Map', 'Eve'); - \App\Services\Queue\QueueHelper::addToQueue(array('Full', 'Eve'), 0, NULL, 'Eve', 'Eve'); + \App\Services\Queue\QueueHelper::addToQueue('\Seat\EveQueues\Full\Server', 0, NULL, 'ServerStatus', 'Server'); + \App\Services\Queue\QueueHelper::addToQueue('\Seat\EveQueues\Full\Map', 0, NULL, 'Map', 'Eve'); + \App\Services\Queue\QueueHelper::addToQueue('\Seat\EveQueues\Full\Eve', 0, NULL, 'Eve', 'Eve'); // Log the start of the key processing \Log::info('Starting job submissions for all keys', array('src' => __CLASS__)); @@ -105,11 +105,11 @@ public function fire() // Do a fresh AccountStatus lookup Account\AccountStatus::update($key->keyID, $key->vCode); - \App\Services\Queue\QueueHelper::addToQueue(array('Full', 'Character'), $key->keyID, $key->vCode, 'Character', 'Eve'); + \App\Services\Queue\QueueHelper::addToQueue('\Seat\EveQueues\Full\Character', $key->keyID, $key->vCode, 'Character', 'Eve'); break; case 'Corporation': - \App\Services\Queue\QueueHelper::addToQueue(array('Full', 'Corporation'), $key->keyID, $key->vCode, 'Corporation', 'Eve'); + \App\Services\Queue\QueueHelper::addToQueue('\Seat\EveQueues\Full\Corporation', $key->keyID, $key->vCode, 'Corporation', 'Eve'); break; default: diff --git a/app/commands/SeatDiagnose.php b/app/commands/SeatDiagnose.php index 3b61f2f1..22d6d39c 100644 --- a/app/commands/SeatDiagnose.php +++ b/app/commands/SeatDiagnose.php @@ -71,21 +71,20 @@ public function fire() $this->info('Running SeAT ' . \Config::get('seat.version') . ' Diagnostics'); $this->line(''); - // It is important to run the command as the user that the - // workers are running as. This allows for the checks - // for file permissions to logs to be checked - // correctly. Lets notify the user about - // this - $this->comment('If you are not already doing so, it is reccomended that you run this as the user the workers are running as.'); - $this->comment('Eg: `sudo -u apache /usr/bin/php /var/www/seat/artisan seat:diagnose`.'); - $this->comment('This allows you to ensure the correct permissions are in place as required.'); + // It is important to run the command as the user that the workers are running as. + // This way, the checks that ensure file permissions are right are executed + // properly. If this is not the case, notify the user + + $this->comment('If you are not already doing so, it is recommended that you run this as the user the workers are running as.'); + $this->comment('Eg: `sudo -u apache php artisan seat:diagnose`.'); + $this->comment('This helps to check whether the permissions are correct.'); $this->line(''); // Go ahead and get the configuration information using // the \Config helper and print that $this->info('SeAT configuration:'); if (\Config::get('app.debug')) - $this->comment('[warning] Debug Mode On: Yes. It is reccomended that you set this to false in app/config/app.php'); + $this->comment('[warning] Debug Mode On: Yes. It is recommended that you set this to false in app/config/app.php'); else $this->line('[ok] Debug Mode On: No'); $this->line('Url: ' . \Config::get('app.url')); diff --git a/app/config/seat.php b/app/config/seat.php index 25de69a2..d257b157 100644 --- a/app/config/seat.php +++ b/app/config/seat.php @@ -32,7 +32,7 @@ | */ - 'version' => '0.13.0', + 'version' => '0.14.0', /* |-------------------------------------------------------------------------- diff --git a/app/controllers/CharacterController.php b/app/controllers/CharacterController.php index 9e94c5ba..53feffa6 100644 --- a/app/controllers/CharacterController.php +++ b/app/controllers/CharacterController.php @@ -195,6 +195,9 @@ public function getAjaxCharacterSheet($characterID) $jump_clones = DB::table(DB::raw('character_charactersheet_jumpclones as a')) ->select(DB::raw(" *, CASE + when a.locationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.locationID-6000000) when a.locationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.locationID-6000001) @@ -490,6 +493,9 @@ public function getAjaxAssets($characterID) $assets = DB::table(DB::raw('character_assetlist as a')) ->select(DB::raw(" *, CASE + when a.locationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.locationID-6000000) when a.locationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.locationID-6000001) @@ -631,6 +637,9 @@ public function getAjaxContracts($characterID) $contract_list = DB::table(DB::raw('character_contracts as a')) ->select(DB::raw( "*, CASE + when a.startStationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.startStationID-6000000) when a.startStationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.startStationID-6000001) @@ -650,6 +659,9 @@ public function getAjaxContracts($characterID) WHERE m.itemID=a.startStationID) end AS startlocation, CASE + when a.endstationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.endStationID-6000000) when a.endStationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.endStationID-6000001) @@ -775,6 +787,9 @@ public function getAjaxMarketOrders($characterID) $market_orders = DB::table(DB::raw('character_marketorders as a')) ->select(DB::raw( "*, CASE + when a.stationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.stationID-6000000) when a.stationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.stationID-6000001) @@ -1290,6 +1305,9 @@ public function postSearchAssets() $assets = DB::table(DB::raw('character_assetlist as a')) ->select(DB::raw( "*, CASE + when a.locationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.locationID-6000000) when a.locationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.locationID-6000001) @@ -1385,6 +1403,9 @@ public function getAjaxIndustry($characterID) $current_jobs = DB::table('character_industryjobs as a') ->select(DB::raw(" *, CASE + when a.stationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.stationID-6000000) when a.stationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.stationID-6000001) @@ -1412,6 +1433,9 @@ public function getAjaxIndustry($characterID) $finished_jobs = DB::table('character_industryjobs as a') ->select(DB::raw(" *, CASE + when a.stationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.stationID-6000000) when a.stationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.stationID-6000001) diff --git a/app/controllers/CorporationController.php b/app/controllers/CorporationController.php index 046fa61e..614e34d3 100644 --- a/app/controllers/CorporationController.php +++ b/app/controllers/CorporationController.php @@ -28,6 +28,41 @@ class CorporationController extends BaseController { + /* + |-------------------------------------------------------------------------- + | getAll() + |-------------------------------------------------------------------------- + | + | Get all of the corporations on record + | + */ + public function getAll() + { + + // Query the databse for all the characters and some related + // information + $corporations = DB::table('account_apikeyinfo') + ->leftJoin('seat_keys', 'account_apikeyinfo.keyID', '=', 'seat_keys.keyID') + ->leftJoin('account_apikeyinfo_characters', 'account_apikeyinfo.keyID', '=', 'account_apikeyinfo_characters.keyID') + ->leftJoin('corporation_corporationsheet', 'account_apikeyinfo_characters.corporationID', '=', 'corporation_corporationsheet.corporationID') + ->where('account_apikeyinfo.type', '=', 'Corporation') + ->orderBy('seat_keys.isOk', 'asc') + ->orderBy('account_apikeyinfo_characters.corporationName', 'asc') + ->groupBy('account_apikeyinfo_characters.characterID'); + + // Check that we only return characters that the current + // user has access to. SuperUser() automatically + // inherits all permissions + if (!\Auth::hasAccess('recruiter')) + $corporations = $corporations->whereIn('seat_keys.keyID', Session::get('valid_keys')) + ->get(); + else + $corporations = $corporations->get(); + + return View::make('corporation.all') + ->with('corporations', $corporations); + } + /* |-------------------------------------------------------------------------- | getListJournals() @@ -239,6 +274,9 @@ public function getAssets($corporationID) $assets = DB::select( "SELECT *, CASE + when a.locationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.locationID-6000000) when a.locationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.locationID-6000001) @@ -399,6 +437,9 @@ public function getContracts($corporationID) // Contract list $contract_list = DB::select( 'SELECT *, CASE + when a.startStationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.startStationID-6000000) when a.startStationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.startStationID-6000001) @@ -418,6 +459,9 @@ public function getContracts($corporationID) WHERE m.itemID=a.startStationID) end AS startlocation, CASE + when a.endStationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.endStationID-6000000) when a.endStationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.endStationID-6000001) @@ -1102,6 +1146,11 @@ public function getLedgerSummary($corporationID) ->where('corporation_accountbalance.corporationID', $corporationID) ->get(); + $wallet_balances_total = 0; + foreach($wallet_balances as $div) { + $wallet_balances_total += $div->balance; + } + // The overall corporation ledger. We will loop over the wallet divisions // and get the ledger calculated for each $ledgers = array(); @@ -1154,6 +1203,16 @@ public function getLedgerSummary($corporationID) ->orderBy('total', 'desc') ->get(); + $incursions_tax = DB::table('corporation_walletjournal') + ->select('ownerID2', 'ownerName2', DB::raw('SUM(corporation_walletjournal.amount) total')) + ->leftJoin('eve_reftypes', 'corporation_walletjournal.refTypeID', '=', 'eve_reftypes.refTypeID') + ->where('corporation_walletjournal.refTypeID', 99) // Ref type id 99: Corporate Reward Payout (yeah, seriously ...) + ->where('corporation_walletjournal.ownerName1', "CONCORD") // check if the payout came from CONCORD + ->where('corporation_walletjournal.corporationID', $corporationID) + ->groupBy('corporation_walletjournal.ownerName2') + ->orderBy('total', 'desc') + ->get(); + return View::make('corporation.ledger.ledger') ->with('corporationID', $corporationID) ->with('ledger_dates', $ledger_dates) @@ -1161,7 +1220,9 @@ public function getLedgerSummary($corporationID) ->with('ledgers', $ledgers) ->with('bounty_tax', $bounty_tax) ->with('mission_tax', $mission_tax) - ->with('pi_tax', $pi_tax); + ->with('pi_tax', $pi_tax) + ->with('incursions_tax', $incursions_tax) + ->with('wallet_balances_total', $wallet_balances_total); } /* @@ -1251,13 +1312,26 @@ public function getLedgerMonth($corporationID, $date) ->orderBy('total', 'desc') ->get(); + $incursions_tax = DB::table('corporation_walletjournal') + ->select('ownerID2', 'ownerName2', DB::raw('SUM(corporation_walletjournal.amount) total')) + ->leftJoin('eve_reftypes', 'corporation_walletjournal.refTypeID', '=', 'eve_reftypes.refTypeID') + ->where('corporation_walletjournal.refTypeID', 99) // Ref type id 99: Corporate Reward Payout (yeah, seriously ...) + ->where('corporation_walletjournal.ownerName1', "CONCORD") // check if the payout came from CONCORD + ->where(DB::raw('MONTH(date)'), $month) + ->where(DB::raw('YEAR(date)'), $year) + ->where('corporation_walletjournal.corporationID', $corporationID) + ->groupBy('corporation_walletjournal.ownerName2') + ->orderBy('total', 'desc') + ->get(); + return View::make('corporation.ledger.ajax.ledgermonth') ->with('corporationID', $corporationID) ->with('date', $date) ->with('ledgers', $ledgers) ->with('bounty_tax', $bounty_tax) ->with('mission_tax', $mission_tax) - ->with('pi_tax', $pi_tax); + ->with('pi_tax', $pi_tax) + ->with('incursions_tax', $incursions_tax); } /* @@ -1453,6 +1527,9 @@ public function getMarketOrders($corporationID) // Corporation Market Orders $market_orders = DB::select( 'SELECT *, CASE + when a.stationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.stationID-6000000) when a.stationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.stationID-6000001) @@ -1662,6 +1739,9 @@ public function getIndustry($corporationID) $current_jobs = DB::table('corporation_industryjobs as a') ->select(DB::raw(" *, CASE + when a.stationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.stationID-6000000) when a.stationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.stationID-6000001) @@ -1694,6 +1774,9 @@ public function getIndustry($corporationID) $finished_jobs = DB::table('corporation_industryjobs as a') ->select(DB::raw(" *, CASE + when a.stationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.stationID-6000000) when a.stationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.stationID-6000001) diff --git a/app/controllers/DashboardController.php b/app/controllers/DashboardController.php index cd12180d..8b047267 100644 --- a/app/controllers/DashboardController.php +++ b/app/controllers/DashboardController.php @@ -100,6 +100,9 @@ public function getSearch() $character_assets = DB::table(DB::raw('character_assetlist as a')) ->select(DB::raw( "*, CASE + when a.locationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.locationID-6000000) when a.locationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.locationID-6000001) @@ -208,6 +211,9 @@ public function getSearch() $corporation_assets = DB::table(DB::raw('corporation_assetlist as a')) ->select(DB::raw( "*, CASE + when a.locationID BETWEEN 66015148 AND 66015151 then + (SELECT s.stationName FROM staStations AS s + WHERE s.stationID=a.locationID-6000000) when a.locationID BETWEEN 66000000 AND 66014933 then (SELECT s.stationName FROM staStations AS s WHERE s.stationID=a.locationID-6000001) diff --git a/app/controllers/HomeController.php b/app/controllers/HomeController.php index 7be0bccc..48433cf1 100644 --- a/app/controllers/HomeController.php +++ b/app/controllers/HomeController.php @@ -57,16 +57,31 @@ public function showIndex() if (count(Session::get('valid_keys')) > 0) { $total_keys = SeatKey::whereIn('keyID', Session::get('valid_keys'))->count(); + $total_characters = EveCharacterCharacterSheet::join('account_apikeyinfo_characters', 'account_apikeyinfo_characters.characterID', '=', 'character_charactersheet.characterID') ->join('account_apikeyinfo', 'account_apikeyinfo.keyID', '=', 'account_apikeyinfo_characters.keyID') ->whereIn('account_apikeyinfo_characters.keyID', Session::get('valid_keys')) ->where('account_apikeyinfo.type','!=','Corporation') ->count(); - $total_isk = EveCharacterCharacterSheet::join('account_apikeyinfo_characters', 'account_apikeyinfo_characters.characterID', '=', 'character_charactersheet.characterID') + + $total_corporations = EveCorporationCorporationSheet::join('account_apikeyinfo_characters', 'account_apikeyinfo_characters.corporationID', '=', 'corporation_corporationsheet.corporationID') + ->join('account_apikeyinfo', 'account_apikeyinfo.keyID', '=', 'account_apikeyinfo_characters.keyID') + ->whereIn('account_apikeyinfo_characters.keyID', Session::get('valid_keys')) + ->where('account_apikeyinfo.type','=','Corporation') + ->count(); + + $total_char_isk = EveCharacterCharacterSheet::join('account_apikeyinfo_characters', 'account_apikeyinfo_characters.characterID', '=', 'character_charactersheet.characterID') ->join('account_apikeyinfo', 'account_apikeyinfo.keyID', '=', 'account_apikeyinfo_characters.keyID') ->whereIn('account_apikeyinfo_characters.keyID', Session::get('valid_keys')) ->where('account_apikeyinfo.type','!=','Corporation') ->sum('balance'); + + $total_corp_isk = EveCorporationAccountBalance::join('account_apikeyinfo_characters', 'account_apikeyinfo_characters.corporationID', '=', 'corporation_accountbalance.corporationID') + ->join('account_apikeyinfo', 'account_apikeyinfo.keyID', '=', 'account_apikeyinfo_characters.keyID') + ->whereIn('account_apikeyinfo_characters.keyID', Session::get('valid_keys')) + ->where('account_apikeyinfo.type','=','Corporation') + ->where('accountKey', '!=', EveCorporationAccountBalance::Dust_Account_Key)->sum('balance'); + $total_skillpoints = EveCharacterCharacterSheetSkills::join('account_apikeyinfo_characters', 'account_apikeyinfo_characters.characterID', '=', 'character_charactersheet_skills.characterID') ->join('account_apikeyinfo', 'account_apikeyinfo.keyID', '=', 'account_apikeyinfo_characters.keyID') ->whereIn('account_apikeyinfo_characters.keyID', Session::get('valid_keys')) @@ -75,7 +90,7 @@ public function showIndex() } else { - $total_keys = $total_characters = $total_isk = $total_skillpoints = 0; + $total_keys = $total_characters = $total_corporations = $total_char_isk = $total_corp_isk= $total_skillpoints = 0; } @@ -84,7 +99,9 @@ public function showIndex() // Super user gets all of the data! $total_keys = SeatKey::count(); $total_characters = EveCharacterCharacterSheet::count(); - $total_isk = EveCharacterCharacterSheet::sum('balance'); + $total_corporations = EveCorporationCorporationSheet::count(); + $total_char_isk = EveCharacterCharacterSheet::sum('balance'); + $total_corp_isk = EveCorporationAccountBalance::where('accountKey', '!=', EveCorporationAccountBalance::Dust_Account_Key)->sum('balance'); $total_skillpoints = EveCharacterCharacterSheetSkills::sum('skillpoints'); } @@ -93,7 +110,9 @@ public function showIndex() ->with('server', $server) ->with('total_keys', $total_keys) ->with('total_characters', $total_characters) - ->with('total_isk', $total_isk) + ->with('total_corporations', $total_corporations) + ->with('total_char_isk', $total_char_isk) + ->with('total_corp_isk', $total_corp_isk) ->with('total_skillpoints', $total_skillpoints); } } diff --git a/app/controllers/SettingsController.php b/app/controllers/SettingsController.php index d8950576..25e5a9de 100644 --- a/app/controllers/SettingsController.php +++ b/app/controllers/SettingsController.php @@ -64,6 +64,9 @@ public function getSettings() ->with('decimal_seperator', Settings::getSetting('decimal_seperator', true)) ->with('required_mask', Settings::getSetting('required_mask', true)) ->with('registration_enabled', Settings::getSetting('registration_enabled', true)) + ->with('administrative_contact', Settings::getSetting('administrative_contact', true)) + ->with('seatnotify_member_inactivity_months', Settings::getSetting('seatnotify_member_inactivity_months', true)) + ->with('seatnotify_fuel_warning_days', Settings::getSetting('seatnotify_fuel_warning_days', true)) ->with('seatscheduled_character', Settings::getSetting('seatscheduled_character', true)) ->with('seatscheduled_corporation', Settings::getSetting('seatscheduled_corporation', true)) ->with('seatscheduled_corporation_assets', Settings::getSetting('seatscheduled_corporation_assets', true)) @@ -99,6 +102,11 @@ public function postUpdateSetting() Settings::setSetting('decimal_seperator', Input::get('decimal_seperator')); Settings::setSetting('required_mask', Input::get('required_mask')); Settings::setSetting('registration_enabled', Input::get('registration_enabled')); + Settings::setSetting('administrative_contact', Input::get('administrative_contact')); + + // SeAT Notifications + Settings::setSetting('seatnotify_member_inactivity_months', Input::get('seatnotify_member_inactivity_months')); + Settings::setSetting('seatnotify_fuel_warning_days', Input::get('seatnotify_fuel_warning_days')); // SeAT Queues Settings::setSetting('seatscheduled_character', Input::get('seatscheduled_character')); diff --git a/app/database/migrations/2015_02_05_221915_SeatUsersNullableColumns.php b/app/database/migrations/2015_02_05_221915_SeatUsersNullableColumns.php new file mode 100644 index 00000000..0029fea6 --- /dev/null +++ b/app/database/migrations/2015_02_05_221915_SeatUsersNullableColumns.php @@ -0,0 +1,38 @@ +cache = new \Pheal\Cache\FileStorage( storage_path(). '/cache/phealcache/' ); PhealConfig::getInstance()->access = new \Pheal\Access\StaticCheck(); PhealConfig::getInstance()->log = new \Pheal\Log\FileStorage( storage_path() . '/logs/' ); - PhealConfig::getInstance()->http_user_agent = 'SeAT ' . \Config::get('seat.version') . 'API Fetcher'; PhealConfig::getInstance()->api_customkeys = true; PhealConfig::getInstance()->http_method = 'curl'; + // Build a meaningful User-Agent for CCP should they need to contact someone + $user_agent = 'SeAT ' . \Config::get('seat.version') // Set the Program Identifier + . ' API Fetcher at ' + . \Config::get('app.url'); // Add the Url + + // If the administrative_contact is set, add this to the User-Agent, else use the + // default mail_from in the settings + if (Settings::getSetting('administrative_contact') == null) + $user_agent .= ' Install mail_from: ' . \Config::get('mail.from.name') . ' <' . \Config::get('mail.from.address') . '>'; + else + $user_agent .= ' Administrative Contact: ' . Settings::getSetting('administrative_contact'); + + // Set the newly compiled User-Agent + PhealConfig::getInstance()->http_user_agent = $user_agent; + // Should the EVE api be determined as 'down', set the cache value for 'eve_api_down' // with a expiration of 30 minutes. We will also decrement the current error count // by 10 to allow for some calls to happen after the value has expired out of // cache if (\Cache::get('eve_api_error_count') >= \Config::get('seat.error_limit')) { - \Cache::set('eve_api_down', true, 30); + \Cache::put('eve_api_down', true, 30); \Cache::decrement('eve_api_error_count', 10); } diff --git a/app/eveapi/account/AccountAPIKeyInfo.php b/app/eveapi/account/AccountAPIKeyInfo.php index 57edfdcf..3fbfd632 100644 --- a/app/eveapi/account/AccountAPIKeyInfo.php +++ b/app/eveapi/account/AccountAPIKeyInfo.php @@ -76,7 +76,11 @@ public static function Update($keyID, $vCode) // If we are rate limited, set the status of the eveapi // server to 'down' in the cache so that subsequent // calls don't fail because of this. - \Cache::set('eve_api_down', true, 30); + + // Get time of IP ban in minutes, rounded up to the next whole minute + $time = round(($e->cached_until_unixtime - $e->request_time_unixtime) / 60, 0, PHP_ROUND_HALF_UP); + + \Cache::put('eve_api_down', true, $time); return; // "EVE backend database temporarily disabled."" @@ -84,7 +88,7 @@ public static function Update($keyID, $vCode) // The EVE API Database is apparently down, so mark the // server as 'down' in the cache so that subsequent // calls don't fail because of this. - \Cache::set('eve_api_down', true, 30); + \Cache::put('eve_api_down', true, 30); return; // "Web site database temporarily disabled." @@ -92,7 +96,7 @@ public static function Update($keyID, $vCode) // The EVE API Database is apparently down, so mark the // server as 'down' in the cache so that subsequent // calls don't fail because of this. - \Cache::set('eve_api_down', true, 30); + \Cache::put('eve_api_down', true, 30); return; // "Authentication failure. Legacy API keys can no longer be diff --git a/app/models/EveCorporationAccountBalance.php b/app/models/EveCorporationAccountBalance.php index 140759ff..e51e0079 100644 --- a/app/models/EveCorporationAccountBalance.php +++ b/app/models/EveCorporationAccountBalance.php @@ -26,5 +26,7 @@ class EveCorporationAccountBalance extends Eloquent { + const Dust_Account_Key = 10000; + protected $table = 'corporation_accountbalance'; } diff --git a/app/notifications/corporation/MemberInactivity.php b/app/notifications/corporation/MemberInactivity.php index 3af944a0..6f9d96b1 100644 --- a/app/notifications/corporation/MemberInactivity.php +++ b/app/notifications/corporation/MemberInactivity.php @@ -26,6 +26,7 @@ namespace Seat\Notifications\Corporation; use Seat\Notifications\BaseNotify; +use App\Services\Settings\SettingHelper; /* |-------------------------------------------------------------------------- @@ -62,9 +63,13 @@ public static function Update() // that can come later :D foreach($recruiters as $recruiter) { + // Do a lookup to see how many months without a login should + // be considered as a inactive member + (int)$inactive_months = SettingHelper::getSetting('seatnotify_member_inactivity_months'); + // Now, get a list of members that have not // logged in for 1 month. - $members = \EveCorporationMemberTracking::where('logoffDateTime', '<', \DB::raw('date_sub(NOW(), INTERVAL 1 MONTH)'))->get(); + $members = \EveCorporationMemberTracking::where('logoffDateTime', '<', \DB::raw('date_sub(NOW(), INTERVAL ' . $inactive_months . ' MONTH)'))->get(); // If there are no members, continue if (!$members) @@ -90,7 +95,7 @@ public static function Update() $notification_type = 'Corporation'; $notification_title = 'Member Inactivity'; $notification_text = $member->name . ' in ' . $corporation_name . ' has been inactive ' . - 'for over a month. The last logon time was ' . + 'for ' . $inactive_months . ' month(s). The last logon time was ' . \Carbon\Carbon::parse($member->logonDateTime)->diffFOrHumans() . ' with the last ' . 'known location being ' . $member->location . '.'; diff --git a/app/notifications/starbase/Fuel.php b/app/notifications/starbase/Fuel.php index 62a1b708..bd539252 100644 --- a/app/notifications/starbase/Fuel.php +++ b/app/notifications/starbase/Fuel.php @@ -26,6 +26,7 @@ namespace Seat\Notifications\Starbase; use Seat\Notifications\BaseNotify; +use App\Services\Settings\SettingHelper; /* |-------------------------------------------------------------------------- @@ -182,8 +183,14 @@ public static function Update() // we came for and notify someone // If now plus (the fuel amount devided by the usage) muliplied - // by hours is less that 3 days, send a notification - if(\Carbon\Carbon::now()->addHours($starbase->fuelBlocks / $usage)->lte(\Carbon\Carbon::now()->addDays(3))) { + // by hours is less than the configured days, send a + // notification + + // Retreive the configured days ... + (int)$warning_days = SettingHelper::getSetting('seatnotify_fuel_warning_days'); + + // ... and process a notification if required + if(\Carbon\Carbon::now()->addHours($starbase->fuelBlocks / $usage)->lte(\Carbon\Carbon::now()->addDays($warning_days))) { // OK! We need to tell someone that their towers fuel is // going to be running out soon! @@ -230,7 +237,7 @@ public static function Update() // is anchored in is > 5, check the charters if ($starbase->security >= 5) { - if(Carbon\Carbon::now()->addHours($starbase->starbaseCharter / 1)->lte(Carbon\Carbon::now()->addDays(3))) { + if(Carbon\Carbon::now()->addHours($starbase->starbaseCharter / 1)->lte(Carbon\Carbon::now()->addDays($warning_days))) { // OK! We need to tell someone that their towers charters is // going to be running out soon! diff --git a/app/services/helpers/Img.php b/app/services/helpers/Img.php new file mode 100644 index 00000000..8517e93e --- /dev/null +++ b/app/services/helpers/Img.php @@ -0,0 +1,245 @@ + 'Character', + 1 => 'Corporation', + 2 => 'Alliance', + 3 => 'Type' + ); + + + /* + |-------------------------------------------------------------------------- + | Generate image HTML + |-------------------------------------------------------------------------- + | + | Return the HTML for a image. Based on the $id argument, the correct + | character/corporation/alliance image will be returned. If no type + | could be determined, a character type is assumed. + | + */ + public static function html($id, $size, $attrs, $lazy = true) + { + + if ($id > 90000000 && $id < 98000000) { + + return self::character($id, $size, $attrs, $lazy); + } + elseif (($id > 98000000 && $id < 99000000) || ($id > 1000000 && $id < 2000000)) { + + return self::corporation($id, $size, $attrs, $lazy); + } + elseif (($id > 99000000 && $id < 100000000) || ($id > 0 && $id < 1000000)) { + + return self::alliance($id, $size, $attrs, $lazy); + } + + return self::character($id, $size, $attrs, $lazy); + } + + /* + |-------------------------------------------------------------------------- + | Generate character image HTML + |-------------------------------------------------------------------------- + | + | Generates a HTML response based on the characterID. If a size of smaller + | than 32 is received, then the is overwritten with 32. + | + */ + public static function character($id, $size, $attrs, $lazy = true) + { + + if ($size < 32) + return self::_renderHtml($id, 32, self::Character, $attrs, 32, $lazy); + + return self::_renderHtml($id, $size, self::Character, $attrs, 0, $lazy); + } + + /* + |-------------------------------------------------------------------------- + | Generate corporation image HTML + |-------------------------------------------------------------------------- + | + | Generates a HTML response based on the corporationID. If a size of smaller + | than 32 is received, then the is overwritten with 32. + | + */ + public static function corporation($id, $size, $attrs, $lazy = true) + { + + if ($size < 32) + return self::_renderHtml($id, 32, self::Corporation, $attrs, 32, $lazy); + + return self::_renderHtml($id, $size, self::Corporation, $attrs, 0, $lazy); + } + + /* + |-------------------------------------------------------------------------- + | Generate alliance image HTML + |-------------------------------------------------------------------------- + | + | Generates a HTML response based on the allianceID. If a size of smaller + | than 32 is received, then the is overwritten with 32. + | + */ + public static function alliance($id, $size, $attrs, $lazy = true) + { + + if ($size < 32) + return self::_renderHtml($id, 32, self::Alliance, $attrs, 32, $lazy); + + return self::_renderHtml($id, $size, self::Alliance, $attrs, 0, $lazy); + } + + /* + |-------------------------------------------------------------------------- + | Generate type image HTML + |-------------------------------------------------------------------------- + | + | Generates a HTML response based on the typeID. If a size of smaller + | than 32 is received, then the is overwritten with 32. + | + */ + public static function type($id, $size, $attrs, $lazy = true) + { + + if ($size < 32) + return self::_renderHtml($id, 32, self::Type, $attrs, 32, $lazy); + + return self::_renderHtml($id, $size, self::Type, $attrs, 0, $lazy); + } + + /* + |-------------------------------------------------------------------------- + | Generate a image URL that is lazy load ready + |-------------------------------------------------------------------------- + | + | Generates a HTML response that will put a placeholder instead of the + | actual image. This image however is later lazy loaded client side + | based on the data-src attribute. + | + */ + public static function _renderHtml($id, $size, $type, $attrs, $retina_size = 0, $lazy = true) + { + + // fix default retina image size + if ($retina_size === 0) + $retina_size = $size * 2; + + // make new IMG tag + $html = ' $value) + $html .= "{$name}=\"{$value}\" "; + + // close IMG tag + $html .= ' />'; + + // return completed img tag + return $html; + } + + /* + |-------------------------------------------------------------------------- + | Generate a image URL + |-------------------------------------------------------------------------- + | + | Generates a URL from the CCP image server based on the recieved + | size and image type. + | + */ + public static function _renderUrl($id, $size, $type) + { + + // Base Eve Online Image CDN url + $url = '//image.eveonline.com/'; + + // construct ending bit of URL + switch ($type) { + case self::Corporation: + $url .= self::$types[self::Corporation] . '/' . $id . '_' . $size . '.png'; + break; + + case self::Alliance: + $url .= self::$types[self::Alliance] . '/' . $id . '_' . $size . '.png'; + break; + + case self::Type: + $url .= self::$types[self::Type] . '/' . $id . '_' . $size . '.png'; + break; + + case self::Character: + default: + $url .= self::$types[self::Character] . '/' . $id . '_' . $size . '.jpg'; + } + + // return full URL + return $url; + } + +} diff --git a/app/services/helpers/helpers.php b/app/services/helpers/helpers.php index bd401a26..247ca487 100644 --- a/app/services/helpers/helpers.php +++ b/app/services/helpers/helpers.php @@ -41,7 +41,8 @@ public static function getCorporationList() { $corporations = \DB::table('account_apikeyinfo') ->join('account_apikeyinfo_characters', 'account_apikeyinfo.keyID', '=', 'account_apikeyinfo_characters.keyID') - ->where('account_apikeyinfo.type', 'Corporation'); + ->where('account_apikeyinfo.type', 'Corporation') + ->orderBy('account_apikeyinfo_characters.corporationName'); if (!\Auth::isSuperUser() ) $corporations = $corporations->whereIn('corporationID', \Session::get('corporation_affiliations'))->get(); @@ -364,7 +365,7 @@ public static function getMembersForTitle($corporationID, $titleID) |-------------------------------------------------------------------------- | getSecRolesArray() |-------------------------------------------------------------------------- - | + | | Converts a String or JSON Array of RoleIDs | to an Fancy Role Array with Corporation Division's | @@ -378,7 +379,7 @@ public static function getMembersForTitle($corporationID, $titleID) public static function getSecRolesArray($mixed_roles, $corporationID) { - + if($mixed_roles == '' or $mixed_roles == '[]' or is_null($mixed_roles)) { return array("None"); } else { @@ -407,14 +408,14 @@ public static function getSecRolesArray($mixed_roles, $corporationID) ->where('corporationID',$corporationID) ->remember(0.1) ->get(); - + $divisions_wallet = \DB::table('corporation_corporationsheet_walletdivisions') ->select('accountKey','description') ->orderBy('accountKey') ->where('corporationID',$corporationID) ->remember(0.1) ->get(); - + foreach ($role_list as $role) { $regex = "/(Hangar|Wallet Division|Container from Hangar)\s(\d)/"; diff --git a/app/services/settings/SettingHelper.php b/app/services/settings/SettingHelper.php index 470f4863..4c417234 100644 --- a/app/services/settings/SettingHelper.php +++ b/app/services/settings/SettingHelper.php @@ -45,6 +45,7 @@ class SettingHelper 'app_name' => 'SeAT', 'required_mask' => 176693568, 'registration_enabled' => true, + 'administrative_contact' => null, // User personalization 'color_scheme' => 'blue', @@ -54,6 +55,10 @@ class SettingHelper 'main_character_name' => null, 'email_notifications' => false, + // SeAT Notifications + 'seatnotify_member_inactivity_months' => 1, + 'seatnotify_fuel_warning_days' => 3, + // SeAT Backend 'seatscheduled_character' => true, 'seatscheduled_corporation' => true, @@ -78,6 +83,7 @@ class SettingHelper */ static $user_settings = array( + 'color_scheme', 'thousand_seperator', 'decimal_seperator', @@ -140,14 +146,25 @@ public static function getSetting($setting_name, $system_setting = false, $user_ try { // Looks like we have a user setting, lets do a - // db lookup for it. - $setting_value = \SeatUserSetting::where('user_id', $effective_user_id) + // db lookup for it. Before the lookup we + // first prepare a Cache key to use. + // This key will be used to store + // the resolved value. + $cache_key = self::getUserSettingCacheKeyPrefix($effective_user_id, $setting_name); + $setting_value = \Cache::get($cache_key, function() use ($effective_user_id, $setting_name, $cache_key) { + + $setting_value = \SeatUserSetting::where('user_id', $effective_user_id) ->where('setting', $setting_name) ->pluck('value'); - if($setting_value) + // cache result + \Cache::forever($cache_key, $setting_value); + + return $setting_value; + }); - // Found the user setting, return that! + // If we found the user setting, return that! + if($setting_value) return $setting_value; } catch (\Exception $e) {} @@ -167,9 +184,20 @@ public static function getSetting($setting_name, $system_setting = false, $user_ try { // So we dont have a user setting for whatever reason, - // so lets check the SeAT global settings. - $setting_value = \SeatSetting::where('setting', $setting_name) - ->pluck('value'); + // so lets check the SeAT global settings. Before + // the lookup we first prepare a Cache key to + // use. This key will be used to store + // the resolved value. + $cache_key = self::getSystemSettingCacheKeyPrefix($setting_name); + $setting_value = \Cache::get($cache_key, function() use ($setting_name, $cache_key) { + + $setting_value = \SeatSetting::where('setting', $setting_name)->pluck('value'); + + // cache result + \Cache::forever($cache_key, $setting_value); + + return $setting_value; + }); // If we have a database entry for the setting, return // that as the value @@ -239,6 +267,10 @@ public static function setSetting($setting_name, $setting_value, $user_id = null $user_setting->value = $setting_value; $user_setting->save(); + // cache this value forever to save on DB calls + $cache_key = self::getUserSettingCacheKeyPrefix(\Auth::User()->id, $setting_name); + \Cache::forever($cache_key, $setting_value); + // Return as we are done return true; @@ -257,6 +289,10 @@ public static function setSetting($setting_name, $setting_value, $user_id = null $global_setting->value = $setting_value; $global_setting->save(); + // cache this value forever to save on DB calls + $cache_key = self::getSystemSettingCacheKeyPrefix($setting_name); + \Cache::forever($cache_key, $setting_value); + return true; } @@ -288,4 +324,32 @@ public static function getAllSettings() { } + /* + |-------------------------------------------------------------------------- + | getUserSettingCacheKeyPrefix() + |-------------------------------------------------------------------------- + | + | Get cache prefix for user settings + | + */ + + public static function getUserSettingCacheKeyPrefix($user_id, $setting_name) { + + return 'seat.settings.user.'.(int)$user_id.'.'.$setting_name; + } + + /* + |-------------------------------------------------------------------------- + | getSystemSettingCacheKeyPrefix() + |-------------------------------------------------------------------------- + | + | Get cache prefix for user settings + | + */ + + public static function getSystemSettingCacheKeyPrefix($setting_name) { + + return 'seat.settings.system.'.$setting_name; + } + } diff --git a/app/services/validators/SeatSettingValidator.php b/app/services/validators/SeatSettingValidator.php index b1195211..33154ebd 100644 --- a/app/services/validators/SeatSettingValidator.php +++ b/app/services/validators/SeatSettingValidator.php @@ -30,11 +30,14 @@ class SettingValidator extends Validator public static $rules = array( 'app_name' => 'required', - 'registration_enabled' => 'required', - 'required_mask' => 'required|numeric|min:176693568', - 'color_scheme' => 'required|in:blue,black', - 'thousand_seperator' => 'required', - 'decimal_seperator' => 'required', + 'registration_enabled' => 'required', + 'required_mask' => 'required|numeric|min:176693568', + 'administrative_contact' => 'required|email', + 'color_scheme' => 'required|in:blue,black', + 'thousand_seperator' => 'in:" ",",","."|size:1', + 'decimal_seperator' => 'required|in:",","."|size:1', + 'seatnotify_member_inactivity_months' => 'required|numeric', + 'seatnotify_fuel_warning_days' => 'required|numeric', 'seatscheduled_character' => 'required|in:true,false', 'seatscheduled_corporation' => 'required|in:true,false', 'seatscheduled_corporation_assets' => 'required|in:true,false', diff --git a/app/services/validators/SeatUserSettingValidator.php b/app/services/validators/SeatUserSettingValidator.php index fc28c667..e96c1464 100644 --- a/app/services/validators/SeatUserSettingValidator.php +++ b/app/services/validators/SeatUserSettingValidator.php @@ -29,8 +29,10 @@ class UserSettingValidator extends Validator { public static $rules = array( - 'color_scheme' => 'required|in:blue,black', + 'color_scheme' => 'required|in:blue,black', 'main_character_id' => 'required|numeric', 'email_notifications' => 'required|in:true,false', + 'thousand_seperator' => 'in:" ",",","."|size:1', + 'decimal_seperator' => 'required|in:",","."|size:1', ); } diff --git a/app/views/character/all.blade.php b/app/views/character/all.blade.php index 8cead3d4..a9ae2ef6 100644 --- a/app/views/character/all.blade.php +++ b/app/views/character/all.blade.php @@ -31,8 +31,8 @@
- + {{ Seat\Services\Helpers\Img::character($character->characterID, 256, array('class' => 'img-circle eveIcon xxlarge')) }}
{{ $character->characterName }}
Ship | +Level | +
---|---|
Industrial Command Ships | ++ @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 29637) == 5) + 5 + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 29637) == 0) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 29637) }} + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, $s) <= 2) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 29637) }} + @else + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 29637) }} + @endif + | +
Capital Industrial Ships | ++ @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 28374) == 5) + 5 + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 28374) == 0) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 28374) }} + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, $s) <= 2) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 28374) }} + @else + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 28374) }} + @endif + @if ((App\Services\Helpers\Helpers::findSkillLevel($character_skills, 20533) < 2) || (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 3456) < 1)) + Secondary Skill missing! + @endif + | +
ORE Freighter | ++ @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 34327) == 5) + 5 + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 34327) == 0) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 34327) }} + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, $s) <= 2) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 34327) }} + @else + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 34327) }} + @endif + @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 20342) < 1) + Secondary Skill missing! + @endif + | +
Mining Frigate | ++ @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 32918) == 5) + 5 + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 32918) == 0) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 32918) }} + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, $s) <= 2) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 32918) }} + @else + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 32918) }} + @endif + | +
Expedition Frigates | ++ @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 33856) == 5) + 5 + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 33856) == 0) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 33856) }} + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, $s) <= 2) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 33856) }} + @else + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 33856) }} + @endif + @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 32918) < 5) + Secondary Skill missing! + @endif + | +
ORE Industrial | ++ @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 3184) == 5) + 5 + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 3184) == 0) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 3184) }} + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, $s) <= 2) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 3184) }} + @else + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 3184) }} + @endif + @if ((App\Services\Helpers\Helpers::findSkillLevel($character_skills, 3402) < 2) || (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 25863) < 1)) + Secondary Skill missing! + @endif + | +
Exhumer | ++ @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 22551) == 5) + 5 + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 22551) == 0) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 22551) }} + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, $s) <= 2) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 22551) }} + @else + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 22551) }} + @endif + @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 17940) < 5) + Secondary Skill missing! + @endif + | +
Mining Barge | ++ @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 17940) == 5) + 5 + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 17940) == 0) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 17940) }} + @elseif (App\Services\Helpers\Helpers::findSkillLevel($character_skills, $s) <= 2) + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 17940) }} + @else + {{ App\Services\Helpers\Helpers::findSkillLevel($character_skills, 17940) }} + @endif + @if (App\Services\Helpers\Helpers::findSkillLevel($character_skills, 3410) < 3) + Secondary Skill missing! + @endif + | +
Corp Name | +CEO | +Alliance | +Tax Rate | +Members | +Shares | ++ + + + @foreach ($corporations as $corporation) + + |
---|---|---|---|---|---|---|
+ {{ Seat\Services\Helpers\Img::corporation($corporation->corporationID, 16, array('class' => 'img-circle eveIcon small')) }} + {{ $corporation->corporationName }} [{{ $corporation->ticker }}] + | ++ + {{ Seat\Services\Helpers\Img::character($corporation->ceoID, 16, array('class' => 'img-circle eveIcon small')) }} + {{ $corporation->ceoName }} + + | ++ {{ Seat\Services\Helpers\Img::alliance($corporation->allianceID, 16, array('class' => 'img-circle eveIcon small')) }} + {{ $corporation->allianceName }} + | ++ {{ number_format($corporation->taxRate, 1, $settings['decimal_seperator'], $settings['thousand_seperator']) }} % + | ++ {{ number_format($corporation->memberCount, 0, $settings['decimal_seperator'], $settings['thousand_seperator']) }} / + {{ number_format($corporation->memberLimit, 0, $settings['decimal_seperator'], $settings['thousand_seperator']) }} + | ++ {{ number_format($corporation->shares, 0, $settings['decimal_seperator'], $settings['thousand_seperator']) }} + | + + {{-- key information --}} ++ @if ($corporation->isOk == 1) + Key Ok + @else + Key not Ok + @endif + | + +
From character: {{ $corp->characterName }}
From character: {{ $corp->characterName }}
From character: {{ $corp->characterName }}
From character: {{ $corp->characterName }}
From character: {{ $corp->characterName }}
No Tax Contributor Information Available
@endif + +Contributor | +Contribution Total | +
---|---|
+ + {{ Seat\Services\Helpers\Img::character($entry->ownerID2, 16, array('class' => 'img-circle eveIcon small')) }} + {{ $entry->ownerName2 }} + + | +{{ number_format($entry->total, 2, $settings['decimal_seperator'], $settings['thousand_seperator']) }} ISK | +
No Tax Contributor Information Available
+ @endif +Contributor | +Contribution Total | +
---|---|
+ + {{ Seat\Services\Helpers\Img::character($entry->ownerID2, 16, array('class' => 'img-circle eveIcon small')) }} + {{ $entry->ownerName2 }} + + | +{{ number_format($entry->total, 2, $settings['decimal_seperator'], $settings['thousand_seperator']) }} ISK | +
No Tax Contributor Information Available
+ @endif + +From character: {{ $corp->characterName }}
From character: {{ $corp->characterName }}
From character: {{ $corp->characterName }}
From character: {{ $corp->characterName }}
From character: {{ $corp->characterName }}
From character: {{ $corp->characterName }}
From character: {{ $corp->characterName }}
From character: {{ $corp->characterName }}
- |
-
|
-
- |
-
|
- - |
+ |
+
|
+
+ |
+
|
+ + |
- Hello, -
-- You have received a new SeAT notification: -
- -- The notification text is: -
- -+ Hello, +
++ You have received a new SeAT notification: +
+ ++ The notification text is: +
+ +Total Recorded API Keys
Total Character Sheets
Total Corporation Sheets
+Total Recorded ISK
+Total Recorded Character ISK
Total Recorded Corporation ISK
+Total Recorded Skillpoints
diff --git a/app/views/keys/ajax/corporation.blade.php b/app/views/keys/ajax/corporation.blade.php index 10f2f344..1141a8bf 100644 --- a/app/views/keys/ajax/corporation.blade.php +++ b/app/views/keys/ajax/corporation.blade.php @@ -71,7 +71,7 @@- + {{ Seat\Services\Helpers\Img::character($character->characterID, 128, array('class' => 'img-thumbnail eveIcon xlarge')) }}diff --git a/app/views/keys/all.blade.php b/app/views/keys/all.blade.php index 2fb0fa17..638587cc 100644 --- a/app/views/keys/all.blade.php +++ b/app/views/keys/all.blade.php @@ -45,7 +45,7 @@ @foreach($key['characters'] as $char) - + {{ Seat\Services\Helpers\Img::character($char['characterID'], 16, array('class' => 'img-circle eveIcon small')) }} {{ $char['characterName'] }} diff --git a/app/views/keys/detail.blade.php b/app/views/keys/detail.blade.php index 4bfa3040..00bdd46c 100644 --- a/app/views/keys/detail.blade.php +++ b/app/views/keys/detail.blade.php @@ -87,7 +87,7 @@diff --git a/app/views/keys/people.blade.php b/app/views/keys/people.blade.php index d0bc0f8a..673c2ffe 100644 --- a/app/views/keys/people.blade.php +++ b/app/views/keys/people.blade.php @@ -40,7 +40,7 @@- characterID }}_32.jpg' class='img-circle'> + {{ Seat\Services\Helpers\Img::character($personData[0]['main']->characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ str_limit($personData[0]['main']->characterName, 30, $end = '...') }} ({{ count($personData) }} keys) @@ -64,7 +64,7 @@- - + {{ Seat\Services\Helpers\Img::character($character->characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $character->characterName }} @if ($personData[0]['main']->characterID <> $character->characterID) @@ -108,7 +108,7 @@
- - + {{ Seat\Services\Helpers\Img::character($character->characterID, 16, array('class' => 'img-circle eveIcon small')) }} {{ $character->characterName }} Use as Main for new Group diff --git a/app/views/layouts/components/header.blade.php b/app/views/layouts/components/header.blade.php index 80bba254..d6eaf20c 100644 --- a/app/views/layouts/components/header.blade.php +++ b/app/views/layouts/components/header.blade.php @@ -58,9 +58,9 @@ @endif {{-- See SettingHelper why this has to be more than 1 --}} @if($settings['main_character_id'] > 1) - + {{ Seat\Services\Helpers\Img::character($settings['main_character_id'], 64, array('class' => 'img-circle eveIcon large'), false) }} @else - + {{ Seat\Services\Helpers\Img::character('1', 16, array('class' => 'img-circle eveIcon small')) }} @endif
{{ \Auth::User()->email }} diff --git a/app/views/layouts/components/sidebar.blade.php b/app/views/layouts/components/sidebar.blade.php index 790f4957..a6176540 100644 --- a/app/views/layouts/components/sidebar.blade.php +++ b/app/views/layouts/components/sidebar.blade.php @@ -7,9 +7,9 @@
{{-- See SettingHelper why this has to be more than 1 --}} @if($settings['main_character_id'] > 1) - + {{ Seat\Services\Helpers\Img::character($settings['main_character_id'], 16, array('class' => 'img-circle eveIcon medium')) }} @else - + {{ Seat\Services\Helpers\Img::character('1', 16, array('class' => 'img-circle eveIcon medium')) }} @endif@@ -59,6 +59,7 @@