Skip to content

Commit

Permalink
Merge pull request #257 from va-net/v1-0-2
Browse files Browse the repository at this point in the history
v1.0.2
  • Loading branch information
velocity23 authored Nov 22, 2020
2 parents 2392781 + 73c4fc4 commit 2664a04
Show file tree
Hide file tree
Showing 35 changed files with 178 additions and 799 deletions.
2 changes: 0 additions & 2 deletions acars.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
$user = new User();

Page::setTitle('ACARS - '.Config::get('va/name'));
Page::excludeAsset('datatables');
Page::excludeAsset('chartjs');

if (!$user->isLoggedIn()) {
Redirect::to('index.php');
Expand Down
39 changes: 39 additions & 0 deletions admin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php
/*
Flare, a fully featured and easy to use crew centre, designed for Infinite Flight.
Copyright (C) 2020 Lucas Rebato
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

require_once 'core/init.php';

if (Input::get('page') === 'usermanage'):
Redirect::to('/admin/users.php');
elseif (Input::get('page') === 'staffmanage'):
Redirect::to('/admin/staff.php');
elseif (Input::get('page') === 'site'):
Redirect::to('/admin/site.php');
elseif (Input::get('page') === 'recruitment'):
Redirect::to('/admin/recruitment.php');
elseif (Input::get('page') === 'pirepmanage'):
Redirect::to('/admin/pireps.php');
elseif (Input::get('page') === 'multimanage'):
Redirect::to('/admin/multipliers.php');
elseif (Input::get('page') === 'newsmanage'):
Redirect::to('/admin/news.php');
elseif (Input::get('page') === 'events'):
Redirect::to('/admin/events.php');
elseif (Input::get('page') === 'statsviewing'):
Redirect::to('/admin/stats.php');
elseif (Input::get('page') === 'opsmanage'):
Redirect::to('/admin/operations.php?section='.Input::get('section'));
elseif (Input::get('page') === 'codeshares'):
Redirect::to('/admin/codeshares.php');
elseif (Input::get('page') === 'pluginmanage'):
Redirect::to('/admin/plugins.php');
else:
Redirect::to('/home.php');
endif;
?>
2 changes: 0 additions & 2 deletions admin/codeshares.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
$user = new User();

Page::setTitle('Codeshares Admin - '.Config::get('va/name'));
Page::excludeAsset('datatables');
Page::excludeAsset('chartjs');

if (!$user->isLoggedIn()) {
Redirect::to('/index.php');
Expand Down
2 changes: 0 additions & 2 deletions admin/events.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
$user = new User();

Page::setTitle('Events Admin - '.Config::get('va/name'));
Page::excludeAsset('datatables');
Page::excludeAsset('chartjs');

if (!$user->isLoggedIn()) {
Redirect::to('/index.php');
Expand Down
1 change: 0 additions & 1 deletion admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
$user = new User();

Page::setTitle('Site Dashboard - '.Config::get('va/name'));
Page::excludeAsset('datatables');

if (!$user->isLoggedIn()) {
Redirect::to('/index.php');
Expand Down
2 changes: 0 additions & 2 deletions admin/multipliers.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
$user = new User();

Page::setTitle('Multipliers Admin - '.Config::get('va/name'));
Page::excludeAsset('datatables');
Page::excludeAsset('chartjs');

if (!$user->isLoggedIn()) {
Redirect::to('/index.php');
Expand Down
1 change: 0 additions & 1 deletion admin/news.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
$user = new User();

Page::setTitle('News Admin - '.Config::get('va/name'));
Page::excludeAsset('chartjs');

if (!$user->isLoggedIn()) {
Redirect::to('/index.php');
Expand Down
17 changes: 6 additions & 11 deletions admin/operations.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
$user = new User();

Page::setTitle('Operations Admin - '.Config::get('va/name'));
Page::excludeAsset('chartjs');

if (!$user->isLoggedIn()) {
Redirect::to('/index.php');
Expand Down Expand Up @@ -680,9 +679,6 @@ function reverseFormatEditFlightTime() {
$routesArray = [];
foreach ($routelines[0] as $l) {
$segments = preg_split('/, ?/', $l);
if (strpos($segments[10], ".") === FALSE && strpos($segments[10], ":") === FALSE) {
$segments[10] .= ".00";
}
array_push($routesArray, array(
"fltnum" => $segments[1],
"dep" => $segments[2],
Expand All @@ -706,23 +702,22 @@ function reverseFormatEditFlightTime() {
$j = 0;
$doneAircraft = [];
echo '<table class="w-100 mb-2">';
$i = 0;
foreach ($routesArray as $r) {
for ($j=0; $j<$i-1; $j++) {
$r = $routesArray[$j];
if (!in_array($r['aircraftid'], $doneAircraft)) {
echo '<tr class="border-bottom border-top"><td class="align-middle p-2"><b>';
echo $r['aircraftid'];
echo '</b></td><td class="align-middle py-2">';
echo '<input hidden name="rego'.$i.'" value="'.$r["aircraftid"].'" />';
echo '<select required class="form-control mb-2 aircraftSelect" name="aircraft'.$i.'" id="'.$i.'">';
echo '<input hidden name="rego'.$j.'" value="'.$r["aircraftid"].'" />';
echo '<select required class="form-control mb-2 aircraftSelect" name="aircraft'.$j.'" id="'.$j.'">';
echo '<option value>Aircraft Type</option>';
echo $aircraftOptions;
echo '</select>';
echo '<select required class="form-control" name="livery'.$i.'" id="livery'.$i.'">';
echo '<select required class="form-control" name="livery'.$j.'" id="livery'.$j.'">';
echo '<option value>Select an Aircraft to Get Liveries</option>';
echo '</select>';
echo '</td></tr>';
array_push($doneAircraft, $r['aircraftid']);
$i++;
}
}
echo '</table>';
Expand All @@ -735,7 +730,7 @@ function reverseFormatEditFlightTime() {
var id = $(this).attr("id");
$("#livery" + id).html("<option value>Loading...</option>");
$.ajax({
url: "/vanet.php",
url: "vanet.php",
type: "POST",
data: { method: "liveriesforaircraft", data: $(this).val() },
success: function(html){
Expand Down
2 changes: 0 additions & 2 deletions admin/pireps.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
$user = new User();

Page::setTitle('PIREPs Admin - '.Config::get('va/name'));
Page::excludeAsset('datatables');
Page::excludeAsset('chartjs');

if (!$user->isLoggedIn()) {
Redirect::to('/index.php');
Expand Down
1 change: 0 additions & 1 deletion admin/recruitment.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
require_once '../core/init.php';

$user = new User();
Page::excludeAsset('chartjs');

Page::setTitle('Recruitment Admin - '.Config::get('va/name'));

Expand Down
2 changes: 0 additions & 2 deletions admin/site.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
$user = new User();

Page::setTitle('Site Admin - '.Config::get('va/name'));
Page::excludeAsset('datatables');
Page::excludeAsset('chartjs');

if (!$user->isLoggedIn()) {
Redirect::to('/index.php');
Expand Down
1 change: 0 additions & 1 deletion admin/staff.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
$user = new User();

Page::setTitle('Staff Admin - '.Config::get('va/name'));
Page::excludeAsset('chartjs');

if (!$user->isLoggedIn()) {
Redirect::to('/index.php');
Expand Down
2 changes: 0 additions & 2 deletions admin/stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
$user = new User();

Page::setTitle('VA Stats - '.Config::get('va/name'));
Page::excludeAsset('datatables');
Page::excludeAsset('chartjs');

if (!$user->isLoggedIn()) {
Redirect::to('/index.php');
Expand Down
3 changes: 1 addition & 2 deletions admin/users.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
$user = new User();

Page::setTitle('Users Admin - '.Config::get('va/name'));
Page::excludeAsset('chartjs');

if (!$user->isLoggedIn()) {
Redirect::to('/index.php');
Expand Down Expand Up @@ -86,7 +85,7 @@
echo '<button class="btn btn-primary text-light userEdit" data-callsign="'.$user['callsign'].'"
data-name="'.$user['name'].'" data-email="'.$user['email'].'" data-ifc="'.$user['ifc'].'"
data-joined="'.date_format(date_create($user['joined']), 'Y-m-d').'" data-status="'.$user['status'].'"
data-id="'.$user['id'].'" data-thrs="'.Time::secsToString($user["transhours"]).'"
data-id="'.$user['id'].'" data-thrs="'.Time::secsToString($user["transhours"] + $user["transhours"]).'"
data-admin="'.$user['isAdmin'].'" data-tflts="'.$user["transflights"].'"><i class="fa fa-edit"></i>
</button>';
echo '&nbsp;<button id="delconfirmbtn" class="btn text-light btn-danger"
Expand Down
3 changes: 0 additions & 3 deletions apply.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
use RegRev\RegRev;

Page::setTitle('Apply - '.Config::get('va/name'));
Page::excludeAsset('datatables');
Page::excludeAsset('chartjs');
Page::excludeAsset('momentjs');

$user = new User();
if ($user->isLoggedIn()) {
Expand Down
4 changes: 4 additions & 0 deletions assets/style.css.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
}
}

table {
text-align: center;
}

* {
font-family: 'Rubik', sans-serif;
}
Expand Down
148 changes: 0 additions & 148 deletions classes/Notifications.php

This file was deleted.

Loading

0 comments on commit 2664a04

Please sign in to comment.