Ohh, thousand pardons, had not seen. Silly questions, did you insert the sql into your database? What version is your php and phpVMS? Are you using Fltbook version 2? Is the file right? Ex: php or tpl
Can you take a photo of what is showing up and put your file confirmbid.php here to see?
And another silly question, in that code that I spoke up to change you corrected an error that was missing a quote in <script type="text/javascript>?
ncd200
November 7, 2017, 7:15pm
22
I have installed the sql, I am using the php version.
My code from the schedule_results is allmost default now cause of a clean install after trying everything.
I have removed one line that was causing errors with my template.
Quote
<link rel=âstylesheetâ href=âhttps://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css â integrity=âsha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4uâ crossorigin=âanonymousâ>
Quote
<div class=âapp-content content container-fluidâ>
<div class=âcontent-wrapperâ>
<div class=âcontent-header rowâ>
</div>
<section id=âbasic-alertsâ>
<div class=ârowâ>
<div class=âcol-md-12â>
<div class=âcardâ>
<div class=âcard-headerâ>
<h4 class=âcard-titleâ>Avaiable flights</h4>
<a class=âheading-elements-toggleâ><i class=âicon-ellipsis font-medium-3â></i></a>
<div class=âheading-elementsâ>
<ul class=âlist-inline mb-0â>
<li><a data-action=âcollapseâ><i class=âicon-minus4â></i></a></li>
<li><a data-action=âreloadâ><i class=âicon-reloadâ></i></a></li>
<li><a data-action=âexpandâ><i class=âicon-expand2â></i></a></li>
<li><a data-action=âcloseâ><i class=âicon-cross2â></i></a></li>
</ul>
</div>
</div>
<div class=âcard-body collapse inâ>
<div class=âcard-blockâ>
<?php
$pilotid = Auth::$userinfo->pilotid;
$last_location = FltbookData::getLocation($pilotid);
$last_name = OperationsData::getAirportInfo($last_location->arricao);
?>
<!-- Bootstrap - Latest compiled and minified CSS â>
<!-- Pagination => Enable it via the module settings â>
<?php if($settings[âpagination_enabledâ] == 1) { ?>
<style>
div.dataTables_paginate {
float: right;
margin-top: -25px;
}
div.dataTables_length {
float: left;
margin: 0;
}
div.dataTables_filter {
float: right;
margin: 0;
}
</style>
<script src=âhttps://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js â></script>
<script type=âtext/javascriptâ src=â<?php echo fileurl(âlib/js/jquery.dataTables.jsâ);?>â></script>
<script type=âtext/javascriptâ src=â<?php echo fileurl(âlib/js/datatables.jsâ);?>â></script>
<script type=âtext/javascriptâ src=â<?php echo fileurl(âlib/js/dataTables.bootstrap.min.jsâ);?>â></script>
<script type=âtext/javascriptâ charset=âutf-8â>
$(document).ready(function() {
$(â#schedules_table â).dataTable( {
âlengthMenuâ: [[10, 25, 50, -1], [10, 25, 50, âAllâ] ]
} )});
</script>
<?php } ?>
<!-- Latest compiled and minified JavaScript - Modified to clear modal on data-dismiss â>
<script type=âtext/javascriptâ src=â<?php echo SITE_URL; ?>/lib/js/bootstrap.jsâ></script>
<br />
<table id=âschedules_tableâ class=âtableâ width=â100%â>
<?php
if(!$allroutes) {
echo â<tr><td align=âcenterâ>No flights found!</td></tr>â;
} else {
?>
<thead>
<tr id=âtableheadâ>
<th>Airline</th>
<th>Flight Number</th>
<th>Origin</th>
<th>Destination</th>
<th>Aircraft</th>
<th>Options</th>
<?php if($settings[âshow_details_buttonâ] == 1) { ?>
<th style=âdisplay: none;â>Details</th>
<?php } ?>
</tr>
</thead>
<tbody>
<?php
foreach($allroutes as $route) {
if($settings[âdisabled_ac_sched_showâ] == 0) {
# Disable âfakeâ aircraft to get hide a lot of schedules at once
$aircraft = FltbookData::getAircraftByID($route->aircraftid);
if($aircraft->enabled != 1) {
continue;
}
}
if(Config::Get(âRESTRICT_AIRCRAFT_RANKSâ) == 1 && Auth::LoggedIn()) {
if($route->aircraftlevel > Auth::$userinfo->ranklevel) {
continue;
}
}
?>
<tr style=âheight: 12px; font-size: 14px; font-weight: normal;â>
<td width=â16.5%â valign=âmiddleâ><img src=â<?php echo SITE_URL; ?>/lib/images/airlinelogos/<?php echo $route->code;?>.pngâ alt=â<?php echo $route->code;?>â></td>
<td width=â16.5%â align=âcenterâ valign=âmiddleâ><?php echo $route->code . $route->flightnum?></td>
<td width=â16.5%â align=âcenterâ valign=âmiddleâ><?php echo $route->depicao ;?></td>
<td width=â16.5%â align=âcenterâ valign=âmiddleâ><?php echo $route->arricao ;?></td>
<td width=â16.5%â valign=âmiddleâ><?php echo $route->aircraft ;?>
<div class=âvertical-align-text pull-rightâ style=âpadding-left: 6px;â>
<div class=âfont-small pull-rightâ><?php echo $route->flighttime; ?>h</div>
<div class=âfont-smallâ><?php echo round($route->distance, 0, PHP_ROUND_HALF_UP); ?>nm</div>
</div>
</td>
<td width=â16.5%â align=âcenterâ valign=âmiddleâ>
<?php if($settings[âshow_details_buttonâ] == 1) { ?>
<input type=âbuttonâ value=âDetailsâ class=âbtn btn-warningâ onclick=â$(â#details_<?php echo $route->flightnum;?>â).toggle()â>
<?php } ?>
<?php
$aircraft = OperationsData::getAircraftInfo($route->aircraftid);
$acbidded = FltbookData::getBidByAircraft($aircraft->id);
$check = SchedulesData::getBidWithRoute(Auth::$userinfo->pilotid, $route->code, $route->flightnum);
if(Config::Get(âDISABLE_SCHED_ON_BIDâ) == true && $route->bidid != 0) {
echo â<div class=âbtn btn-danger btn-sm disabledâ>Booked</div>â;
} elseif($check) {
echo â<div class=âbtn btn-danger btn-sm disabledâ>Booked</div>â;
} else {
echo â<a data-toggle=âmodalâ href="â.SITE_URL.â/action.php/Fltbook/confirm?id=â.$route->id.â&airline=â.$route->code.â&aicao=â.$route->aircrafticao.â" data-target=â#confirm â class=âbtn btn-success btn-mdâ>Book</a>â;
}
?>
</td>
<?php if($settings[âshow_details_buttonâ] == 1) { ?>
<td colspan=â6â id=âdetails_<?php echo $route->flightnum; ?>â style=âdisplay: none;â width=â100%â>
<table class=âtable table-stripedâ>
<tr>
<th align=âcenterâ bgcolor=âblackâ colspan=â6â><font color=âwhiteâ>Flight Briefing</font></th>
</tr>
<tr>
<td>Departure:</td>
<td colspan=â2â><strong>
<?php
$name = OperationsData::getAirportInfo($route->depicao);
echo â{$name->name}â;
?></strong>
</td>
<td>Arrival:</td>
<td colspan=â2â><strong>
<?php
$name = OperationsData::getAirportInfo($route->arricao);
echo â{$name->name}â;
?></strong>
</td>
</tr>
<tr>
<td>Aircraft</td>
<td colspan=â2â><strong>
<?php
$plane = OperationsData::getAircraftByName($route->aircraft);
echo $plane->fullname;
?></strong>
</td>
<td>Distance:</td>
<td colspan=â2â><strong><?php echo $route->distance.Config::Get(âUNITSâ); ?></strong></td>
</tr>
<tr>
<td>Dep Time:</td>
<td colspan=â2â><strong><font color=âredâ><?php echo $route->deptime?> UTC</font></strong></td>
<td>Arr Time:</td>
<td colspan=â2â><strong><font color=âredâ><?php echo $route->arrtime?> UTC</font></strong></td>
</tr>
<tr>
<td>Altitude:</td>
<td colspan=â2â><strong><?php echo $route->flightlevel; ?> ft</strong></td>
<td>Duration:</td>
<td colspan=â2â>
<font color=âredâ>
<strong>
<?php
$dist = $route->distance;
$speed = 440;
$app = $speed / 60;
$flttime = round($dist / $app,0) + 20;
$hours = intval($flttime / 60);
$minutes = (($flttime / 60) - $hours) * 60;
if($hours > â9â AND $minutes > â9â) {
echo $hours.â:â.$minutes ;
} else {
echo â0â.$hours.â:0â.$minutes ;
}
?> Hrs
</strong>
</font>
</td>
</tr>
<tr>
<td>Days:</td>
<td colspan=â2â><strong><?php echo Util::GetDaysLong($route->daysofweek); ?></strong></td>
<td>Price:</td>
<td colspan=â2â><strong>$<?php echo $route->price ;?>.00</strong></td>
</tr>
<tr>
<td>Flight Type:</td>
<td colspan=â2â><strong>
<?php
if($route->flighttype == âPâ) {
echo âPassengerâ;
} elseif($route->flighttype == âCâ) {
echo âCargoâ;
} elseif($route->flighttype == âHâ) {
echo âCharterâ;
} else {
echo âPassengerâ;
}
?>
</strong></td>
<td>Times Flown</td>
<td colspan=â2â><strong><?php echo $route->timesflown ;?></strong></td>
</tr>
</table>
</td>
<?php } ?>
</tr>
<div class=âmodal fadeâ id=âconfirmâ>
<div class=âmodal-dialogâ>
<div class=âmodal-contentâ>
<div class=âmodal-bodyâ>
</div>
</div>
</div>
</div>
<?php
/* END OF ONE TABLE ROW */
}
}
?>
</tbody>
</table>
</div>
<hr>
<center><a href=â<?php echo url(â/Fltbookâ) ;?>â><input type=âsubmitâ class=âbtn btn-primaryâ name=âsubmitâ value=âBack to Flight Bookingâ ></a></center></div>
<br />
Have you changed anything in the confirmbid.php file?
ncd200
November 7, 2017, 7:49pm
24
negative sir,
Posted below is my confirm bid
Quote
<style>
.sharp {
border-radius: 0;
margin-left: 3px;
margin-right: 3px;
}
</style>
<div class=âcontainer-fluidâ>
<div class=âmodal-headerâ>
<button type=âbuttonâ class=âcloseâ data-dismiss=âmodalâ>Ă</button>
<h4 class=âmodal-titleâ>Confirm Booking</h4>
</div>
<div class=âmodal-bodyâ>
<h3>Select Aircraft Registration</h3>
<form action=â<?php echo url(â/Fltbook/addbidâ); ?>â method=âpostâ>
<select class=âform-controlâ name=âaircraftidâ id=âaircraftidâ>
<option value=ââ selected disabled>Select Your Aircraft</option>
<?php
$allaircraft = FltbookData::getAllAircraftFltbook($airline, $aicao);
foreach($allaircraft as $aircraft) {
# If Aircraft is disabled, remove it from the list
if($settings[âdisabled_ac_allow_bookâ] == 1) {
if($aircraft->enabled != 1) {
continue;
}
}
# If Aircraft is has been booked, remove it from the list
if($settings[âshow_ac_if_bookedâ] == 0) {
$acbidded = FltbookData::getBidByAircraft($aircraft->id);
if($acbidded) { continue; }
}
$icaoairline = â{$aircraft->icao}{$airline}â;
if($aircraft->registration == $icaoairline) {
echo ââ;
} else {
echo â<option value="â.$aircraft->id.â" â.$sel.â>â.$aircraft->registration.â - â.$aircraft->icao.â - â.$aircraft->name.â</option>';
}
}
?>
</select>
<hr />
<input type=âhiddenâ name=ârouteidâ value=â<?php echo $routeid; ?>â />
<input type=âsubmitâ name=âsubmitâ class=âbtn btn-successâ value=âBookâ />
<button type=âbuttonâ class=âbtn btn-defaultâ data-dismiss=âmodalâ>Cancel</button>
</form>
</div>
</div>
web541
November 7, 2017, 8:32pm
25
12 hours ago, ncd200 said:
Ok another problem.
Also I have now the problem that the popup for aircraft selection dissappears directly.
I have tried to use the options given above but I canât figure it out.
I know it is a js problem.
Any ideas?
Rick
So it opens, but it closes immediately before you see anything (small white flash)?
Are you using phpVMS 5.5.x & fltbook version 2? Also, are you using bootstrap in your skin?
If so, try replacing this line
https://github.com/web541/phpVMS-FltbookSystem-v2/blob/master/core/templates/fltbook/search_results.php#L38
with this
\<script type="text/javascript\> // Clear Modal On Hide // =================== // no cache data loaded to modal popup (by default it's cached) $('body').on('hidden.bs.modal', '.modal', function (event) { $(this).removeData('bs.modal'); }); \</script\>
Only that one. Sometimes there are conflicts if you are already using bootstrap in your site.
ncd200
November 7, 2017, 8:53pm
26
If i do that my available flights are zero, when i restore it to the default my flights appear.
I know allmost for sure it is a bootstrap or js error.
I ise the phpvms 5.5 and v2 of the booking system.
web541
November 8, 2017, 7:59pm
27
Anything in your browser console?
ncd200
November 8, 2017, 10:11pm
28
I must take a look tomorrow. But maybe I can fix it. I just found out there are also modals integrated in my template. So if I change the code from the modal. Maybe that works. Donât know but it is worth the try.
I want this flight booking working cause it is the best I know of.
ncd200
November 9, 2017, 9:40pm
29
Ok, I have tried to modify it, but i cant get it to work.
Someone that can help me?
web541
November 10, 2017, 7:54pm
30
Do you have a website url?
ncd200
November 13, 2017, 6:30am
31
web541
November 14, 2017, 8:39pm
32
On 13/11/2017 at 5:30 PM, ncd200 said:
http://crew.silverwingsva.com
In search_results.php, try removing
\<link rel="stylesheet" href="http://crew.silverwingsva.com/lib/skins/crewcenter/app-assets/css/bootstrap.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"\>
And in layout.php, try replacing this
\<script src="http://crew.silverwingsva.com/lib/skins/crewcenter/app-assets/js/core/libraries/bootstrap.min.js" type="text/javascript"\>\</script\>
With this
\<script type="text/javascript" src="\<?php echo SITE\_URL; ?\>/lib/js/bootstrap.js"\>\</script\>
and see what happens. From what I can see, itâs a bootstrap conflict issue.
ncd200
November 14, 2017, 8:58pm
33
18 minutes ago, web541 said:
In search_results.php, try removing
<link rel=âstylesheetâ href=âhttp://crew.silverwingsva.com/lib/skins/crewcenter/app-assets/css/bootstrap.css â integrity=âsha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4uâ crossorigin=âanonymousâ>
And in layout.php, try replacing this
<script src=âhttp://crew.silverwingsva.com/lib/skins/crewcenter/app-assets/js/core/libraries/bootstrap.min.js â type=âtext/javascriptâ></script>
With this
<script type=âtext/javascriptâ src=â<?php echo SITE_URL; ?>/lib/js/bootstrap.jsâ></script>
and see what happens. From what I can see, itâs a bootstrap conflict issue.
Thanks for the reply, I have tried it but my results stay completely empty.
web541
November 15, 2017, 7:46pm
34
ah ok I see the issue, youâre using bootstrap version 1.4.0a and my module uses 1.3.7 (I think) so you would have to convert the templating over.
First, change the links above back to what they were (only the js one, leave the css one out).
Once the HTML shows back up, report back here.
I have several problems installing FltbookSystem 2 Master.
1.- When I create the tables with fltbook.sql I have an error:
Error
consulta SQL:
MySQL ha dicho:
#1060 - Nombre de columna duplicado 'airline'
The tables are created equally.
I create the airplanes:
A350MDN
A350-01
A350-02
I think several more but for the example is like this
When I book a route, it lets me choose between the A350-01, A350-02
I reserve the A350-01, but the plane is blocked for the other pilots.
It is no longer available to anyone, even though the A350-02 is free.
Erase the planes, the routes, the company.
Create everything from the beginning several times and always the same with the same result.
I think everything comes from the error first when creating the table, but I do not know how to solve it.
Can you help me?
Thank you
phpvms 5.5.x
web541
April 25, 2018, 10:16pm
36
4 hours ago, polirom said:
I have several problems installing FltbookSystem 2 Master.
1.- When I create the tables with fltbook.sql I have an error:
Error
consulta SQL:
MySQL ha dicho:
#1060 - Nombre de columna duplicado 'airline'
The tables are created equally.
I create the airplanes:
A350MDN
A350-01
A350-02
I think several more but for the example is like this
When I book a route, it lets me choose between the A350-01, A350-02
I reserve the A350-01, but the plane is blocked for the other pilots.
It is no longer available to anyone, even though the A350-02 is free.
Erase the planes, the routes, the company.
Create everything from the beginning several times and always the same with the same result.
I think everything comes from the error first when creating the table, but I do not know how to solve it.
Can you help me?
Thank you
phpvms 5.5.x
The SQL error is because you already have a column name called âairlineâ in your âphpvms_aircraftâ table. This could be from another custom module, or from you importing the SQL file more than once. Can you go to phpmyadmin => structure of the the âphpvms_aircraftâ table and screenshot it. Also take one of your aircraft table (only the first row will be fine).
Also, in your core/local.config.php file, what is this set to?
DISABLE\_SCHED\_ON\_BID
web541
April 26, 2018, 10:34pm
38
On 4/26/2018 at 8:23 AM, polirom said:
I have it like that
If you go to the admin panel and to the settings for this module, what is this set to? If you change it, does it work?
Allow aircraft to be booked if someone else has booked a schedule with that aircraft
It is in âYESâ
I install it several times and it always happens the same. Does not accept the change of the administration panel
web541
April 27, 2018, 10:21pm
40
8 hours ago, polirom said:
It is in âYESâ
I install it several times and it always happens the same. Does not accept the change of the administration panel
This is quite odd, if you change the value to âNoâ, does it update (it could be that the settings table isnât read properly) and does it allow the aircraft to be booked by multiple people? I just tested the module on a fresh install and it worked first time for me.
In the event that it still doesnât work, you can go into core/templates/fltbook/confirm_bid.php and delete lines 27-31 which should force it to unlock if something is wrong.