Jump to content

[Free] CrewCenter - Modern and responsive pilot center


swan58

Recommended Posts

Hello , I don't know if this bug is just with me or with everyone :- When I edit any Info in my Profile , It doesnt get saved. It stays with previous values itself.

Hence I have modified the code between (approx) line 17 to line 109 in profileedit.php/tpl

(after the code "<form action="<?php echo url('/profile');?>" method="post" enctype="multipart/form-data">)

Edited Code :

<dl>
<label>Name</label>
<dd><input type="text" class="form-control" disabled placeholder="<?php echo $pilot->firstname . ' ' . $pilot->lastname;?>"></dd>

<label>Airline</label>
<dd><input type="text" class="form-control" disabled placeholder="<?php echo $pilot->code?>">
<p>To request a change, contact your admin</p>
</dd>

<label>Email Address</label>

<dd><input type="text" class="form-control" name="email" value="<?php echo $pilot->email;?>" />
<?php
if(isset($email_error) && $email_error == true)
echo '<p class="error">Please enter your email address</p>';
?>
</dd>

<label>Location</label>
<dd><select name="location" class="form-control">
<?php
foreach($countries as $countryCode=>$countryName)
{
if($pilot->location == $countryCode)
$sel = 'selected="selected"';
else
$sel = '';

echo '<option value="'.$countryCode.'" '.$sel.'>'.$countryName.'</option>';
}
?>
</select>
<?php
if(isset($location_error) && $location_error == true)
echo '<p class="error">Please enter your location</p>';
?>
</dd>

<label>Signature Background</label>
<dd><select name="bgimage" class="form-control">
<?php
foreach($bgimages as $image)
{
if($pilot->bgimage == $image)
$sel = 'selected="selected"';
else
$sel = '';

echo '<option value="'.$image.'" '.$sel.'>'.$image.'</option>';
}
?>
</select>
</dd>


<?php
if($customfields) {
foreach($customfields as $field) {
echo '<dt>'.$field->title.'</dt>
 <dd>';

if($field->type == 'dropdown') {
$field_values = SettingsData::GetField($field->fieldid);
$values = explode(',', $field_values->value);


echo "<select name=\"{$field->fieldname}\">";

if(is_array($values)) {

 foreach($values as $val) {
 $val = trim($val);

 if($val == $field->value)
 $sel = " selected ";
 else
 $sel = '';

 echo "<option value=\"{$val}\" {$sel}>{$val}</option>";
 }
}

echo '</select>';
} elseif($field->type == 'textarea') {
echo '<textarea name="'.$field->fieldname.'" class="customfield_textarea">'.$field->value.'</textarea>';
} else {
echo '<input type="text" name="'.$field->fieldname.'" value="'.$field->value.'" />';
}

echo '</dd>';
}
}
?>

Please NOTE : Do not edit the code unnecessarily. Edit the code only if the changes made in Edit Profile page are not reflected after saving it. The above code works for me. I am using PHPVMS v5.5

Edited by shrikar
Link to comment
Share on other sites

  • Moderators

Really liking this - any reason why we can't just install it on the main site instead of a subdomain?

Also, I seem to have a "no route passed" error when bidding on a schedule. This only seems to happen when using CrewCenter.

alaskairvirtual.com

crew.alaskairvirtual.com

Edited by shakamonkey88
Link to comment
Share on other sites

Really liking this - any reason why we can't just install it on the main site instead of a subdomain?

Also, I seem to have a "no route passed" error when bidding on a schedule. This only seems to happen when using CrewCenter.

There's nothing stopping you from putting in in your main domain, however, the default page is a redirect to the login page so your visitors would not see any front page.

As for the error, what version of phpVMS are you using? Is it the PHP one? I did test it on the TPL version and it worked fine but I haven't actually tried it on the PHP version!

Link to comment
Share on other sites

Really liking this - any reason why we can't just install it on the main site instead of a subdomain?

Also, I seem to have a "no route passed" error when bidding on a schedule. This only seems to happen when using CrewCenter.

alaskairvirtual.com

crew.alaskairvirtual.com

Yes , Same Error Here. I am using PHPvms v5.5

Edited by shrikar
Link to comment
Share on other sites

  • Moderators

<p>

There's nothing stopping you from putting in in your main domain, however, the default page is a redirect to the login page so your visitors would not see any front page.

As for the error, what version of phpVMS are you using? Is it the PHP one? I did test it on the TPL version and it worked fine but I haven't actually tried it on the PHP version!

I'm showing this:

Install Check

phpVMS Build Number: 936

Checking PHP version

[OK] PHP version is 5.3.29.x

Also got it on the subdomain which is showing this:

phpVMS Build Number: simpilot 5.5.2

Checking PHP version

[OK] PHP version is 5.3.29.x

Edited by shakamonkey88
Link to comment
Share on other sites

I'm looking into this error. It only happens in phpVMS 5.5.x (PHP version). The no route passed error has happened before on another skin I believe. I looked at the JS console and it appears it could be something to do with the AJAX form or jQuery. This may have something to do with the JS scripts for the application overriding the core phpVMS jQuery required for core functions like adding a bid.

Error message if anyone is interested: Uncaught TypeError: $(...).ajaxForm is not a function

I'll try my best to fix it, but if anyone can figure this one out, that'd be awesome.

  • Like 1
Link to comment
Share on other sites

Usually when this happens, it is because of a jQuery version mis-match.

All of your jQuery references should be in your core_htmlhead.php and not anywhere else (e.g. layout.php)

So in your layout.php remove these

<!-- jQuery 2.2.3 -->
<script src="<?php echo SITE_URL?>/lib/skins/crewcenter/plugins/jQuery/jquery-2.2.3.min.js"></script>
<!-- jQuery UI 1.11.4 -->
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>

And see if it works. If it doesn't, try messing around with the other js (adding/removing) files until you get the addbid working.

If that still doesn't work, you could re-write the bidding code to support an updated jQuery library or just add an AJAX request.

Link to comment
Share on other sites

For those who are having issues with "no route passed", I believe I've fixed that issue.

Would someone care to test this out on their server

https://github.com/web541/CrewCenter

If it works, then I'll submit a pull-request with Mark Swan and get this onto his original repo.

Changes I've Made

-------------------------

Styling Changes here and there

Added Pilot's roster, schedule details, schedule briefing pages (for those who want them)

Removed all references to requiring the app_top and bottom on each page (little code hack, might work for you, might not) and defined it globally in the layout.php file

Fixed the "no route passed" jQuery issue (I think)

Fixed the "not able to delete bids" (I think [might not have been an issue before])

Fixed the redirection on the frontpage only redirecting to /... (in case you had extra folders before the index)

Fixed default registration page to work with phpvms 5.5.x

So far I've tested it on two different servers and they both worked. I had an issue with the recaptcha at some points, but I believe that was because I have turned off a few settings with my host. All other components (filing pirep, schedule search form/results, bids, downloads, etc.) have remained untouched with the exception of a few styling changes.

NOTE: This is for the phpVMS 5.5.x version of phpVMS, if you are using the .tpl version, please see the OP for the link to download that.

NOTE: If you are testing this, please BACKUP ALL FILES beforehand in case you need to restore, I won't take any responsibility for you losing your files.

Edited by web541
Link to comment
Share on other sites

For those who are having issues with "no route passed", I believe I've fixed that issue.

Would someone care to test this out on their server

https://github.com/web541/CrewCenter

If it works, then I'll submit a pull-request with Mark Swan and get this onto his original repo.

Changes I've Made

-------------------------

Styling Changes here and there

Added Pilot's roster, schedule details, schedule briefing pages (for those who want them)

Removed all references to requiring the app_top and bottom on each page (little code hack, might work for you, might not) and defined it globally in the layout.php file

Fixed the "no route passed" jQuery issue (I think)

Fixed the "not able to delete bids" (I think [might not have been an issue before])

Fixed the redirection on the frontpage only redirecting to /... (in case you had extra folders before the index)

Fixed default registration page to work with phpvms 5.5.x

So far I've tested it on two different servers and they both worked. I had an issue with the recaptcha at some points, but I believe that was because I have turned off a few settings with my host. All other components (filing pirep, schedule search form/results, bids, downloads, etc.) have remained untouched with the exception of a few styling changes.

NOTE: This is for the phpVMS 5.5.x version of phpVMS, if you are using the .tpl version, please see the OP for the link to download that.

NOTE: If you are testing this, please BACKUP ALL FILES beforehand in case you need to restore, I won't take any responsibility for you losing your files.

It works like a charm.

Your name is going in my website's "Hall of Fame" . Thank you very very much

Edited by shrikar
Link to comment
Share on other sites

Hi Guys,

I've pulled in all of web541's changes to the code, which fixes the 'no route passed' error in addition to adding some other new pages. The main repository accessible from the original link (https://github.com/swan58/CrewCenter) will now include his changes. If you are using phpVMS 5.5.x, just move all the files from php_templates over to the main CrewCenter skin folder.

I would like to thank web541 greatly for his invaluable contribution to the skin, it is very much appreciated by myself and I'm sure many others will benefit from your work.

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

Even with the newly modified files I am still getting 'No route passed'. I have done the recommended removal of jQuery from web541 with no luck infact disabling any tab button so therefore needed to revert back.

you must be having some jQuery code interfering somwhere. Make sure you put all of them in layout.php

Edited by shrikar
Link to comment
Share on other sites

<!DOCTYPE html>
<html>
   <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <!-- Chrome, Firefox OS, Opera and Vivaldi -->
    <meta name="theme-color" content="#367FA9">
    <!-- Windows Phone -->
    <meta name="msapplication-navbutton-color" content="#367FA9">
    <!-- iOS Safari -->
    <meta name="apple-mobile-web-app-status-bar-style" content="#367FA9">

    <!-- <title><?php echo $page_title; ?></title> -->
    <title><?php echo SITE_NAME; ?> CrewCenter</title>

    <?php echo $page_htmlhead; ?>

    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="<?php echo SITE_URL?>/lib/skins/crewcenter/bootstrap/css/bootstrap.min.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
    <!-- Ionicons -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="<?php echo SITE_URL?>/lib/skins/crewcenter/dist/css/AdminLTE.min.css">
    <!-- AdminLTE Skins. Choose a skin from the css/skins
	   folder instead of downloading all of them to reduce the load. -->
    <link rel="stylesheet" href="<?php echo SITE_URL?>/lib/skins/crewcenter/dist/css/skins/_all-skins.min.css">
    <!-- iCheck -->
    <link rel="stylesheet" href="<?php echo SITE_URL?>/lib/skins/crewcenter/plugins/iCheck/flat/blue.css">
    <!-- Morris chart -->
    <link rel="stylesheet" href="<?php echo SITE_URL?>/lib/skins/crewcenter/plugins/morris/morris.css">
    <!-- jvectormap -->
    <link rel="stylesheet" href="<?php echo SITE_URL?>/lib/skins/crewcenter/plugins/jvectormap/jquery-jvectormap-1.2.2.css">
    <!-- Date Picker -->
    <link rel="stylesheet" href="<?php echo SITE_URL?>/lib/skins/crewcenter/plugins/datepicker/datepicker3.css">
    <!-- Daterange picker -->
    <link rel="stylesheet" href="<?php echo SITE_URL?>/lib/skins/crewcenter/plugins/daterangepicker/daterangepicker.css">
    <!-- bootstrap wysihtml5 - text editor -->
    <link rel="stylesheet" href="<?php echo SITE_URL?>/lib/skins/crewcenter/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
   </head>
   <body>
    <?php echo $page_htmlreq; ?>

    <div id="content">
	    <?php echo $page_content; ?>
    </div>

    <!-- jQuery 2.2.3 -->
    <script src="<?php echo SITE_URL?>/lib/skins/crewcenter/plugins/jQuery/jquery-2.2.3.min.js"></script>
    <!-- jQuery UI 1.11.4 -->
    <script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
    <!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
    <script>
	    $.widget.bridge('uibutton', $.ui.button);
    </script>
    <!-- Bootstrap 3.3.6 -->
    <script src="<?php echo SITE_URL?>/lib/skins/crewcenter/bootstrap/js/bootstrap.min.js"></script>
    <!-- Morris.js charts -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
    <script src="<?php echo SITE_URL?>/lib/skins/crewcenter/plugins/morris/morris.min.js"></script>
    <!-- Sparkline -->
    <script src="<?php echo SITE_URL?>/lib/skins/crewcenter/plugins/sparkline/jquery.sparkline.min.js"></script>
    <!-- jvectormap -->
    <script src="<?php echo SITE_URL?>/lib/skins/crewcenter/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
    <script src="<?php echo SITE_URL?>/lib/skins/crewcenter/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
    <!-- jQuery Knob Chart -->
    <script src="<?php echo SITE_URL?>/lib/skins/crewcenter/plugins/knob/jquery.knob.js"></script>
    <!-- daterangepicker -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment.min.js"></script>
    <script src="<?php echo SITE_URL?>/lib/skins/crewcenter/plugins/daterangepicker/daterangepicker.js"></script>
    <!-- datepicker -->
    <script src="<?php echo SITE_URL?>/lib/skins/crewcenter/plugins/datepicker/bootstrap-datepicker.js"></script>
    <!-- Bootstrap WYSIHTML5 -->
    <script src="<?php echo SITE_URL?>/lib/skins/crewcenter/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>
    <!-- Slimscroll -->
    <script src="<?php echo SITE_URL?>/lib/skins/crewcenter/plugins/slimScroll/jquery.slimscroll.min.js"></script>
    <!-- FastClick -->
    <script src="<?php echo SITE_URL?>/lib/skins/crewcenter/plugins/fastclick/fastclick.js"></script>
    <!-- AdminLTE App -->
    <script src="<?php echo SITE_URL?>/lib/skins/crewcenter/dist/js/app.min.js"></script>
    <!-- AdminLTE dashboard demo (This is only for demo purposes) -->
    <script src="<?php echo SITE_URL?>/lib/skins/crewcenter/dist/js/pages/dashboard.js"></script>
    <!-- AdminLTE for demo purposes -->
    <script src="<?php echo SITE_URL?>/lib/skins/crewcenter/dist/js/demo.js"></script>
   </body>

Link to comment
Share on other sites

Remove these two lines

		    <!-- jQuery 2.2.3 -->
		    <script src="<?php echo SITE_URL?>/lib/skins/crewcenter/plugins/jQuery/jquery-2.2.3.min.js"></script>
		    <!-- jQuery UI 1.11.4 -->
		    <script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>

Or try this one

https://raw.githubusercontent.com/swan58/CrewCenter/master/php_templates/layout.php

Link to comment
Share on other sites

Remove these two lines

		 <!-- jQuery 2.2.3 -->
		 <script src="<?php echo SITE_URL?>/lib/skins/crewcenter/plugins/jQuery/jquery-2.2.3.min.js"></script>
		 <!-- jQuery UI 1.11.4 -->
		 <script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>

Or try this one

https://raw.githubus...ates/layout.php

Have tried this, it disables the use of any tabs in the schedule area and can therefore not search routes.

Link to comment
Share on other sites

Are you using phpvms 5.5.x? Can you try re-uploading the enter skin folder?

The tabs are working for me as I've had to re-arrange some of the files, but all the additions I've made have worked and have been pulled onto the main github.

Can you check your browser console for any errors and post them here.

Link to comment
Share on other sites

Thanks for taking the time to assist me @web541. I'm operating Version 2.1.936, I've re-uploaded the version you made and the version Mark made but sadly the fix works on neither. Where can I get 5.5.x and could I overright my current install?

bootstrap.min.js:6 Uncaught Error: Bootstrap's Javascript requires jQuery version 1.9.1 or higher, but lower than version 3(…)(anonymous function) @ bootstrap.min.js:6(anonymous function) @ bootstrap.min.js:6
bootstrap-datepicker.js:1655 Uncaught TypeError: $(...).on is not a function(…)(anonymous function) @ bootstrap-datepicker.js:1655(anonymous function) @ bootstrap-datepicker.js:1671
demo.js:290 Uncaught TypeError: $(...).on is not a function(…)setup @ demo.js:290(anonymous function) @ demo.js:213(anonymous function) @ demo.js:340
app.min.js:13 Uncaught TypeError: $(...).off is not a function(…)

Link to comment
Share on other sites

phpVMS 5.5.x is this one https://github.com/DavidJClark/phpvms_5.5.x which if you are using the .php files, you are running this version.

If you are not on this version and don't want to update, then use this one without the php_templates https://github.com/swan58/CrewCenter

And while you are in your files, can you post your core_htmlhead.tpl/.php file.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...