avdesigns Posted March 17, 2013 Report Posted March 17, 2013 Hello, I am looking to put a flight booking on the layout using simpilots module however it dosnt reflect the airports, how can I get it to read the airports from the database like it does on its standard page? Thanks Jacob Quote
freshJet Posted March 17, 2013 Report Posted March 17, 2013 <?php MainController::Run('FrontSchedules', 'index');?> Quote
avdesigns Posted March 17, 2013 Author Report Posted March 17, 2013 I was trying to avoid doing that, but it seems to work better than expected. Thanks! Quote
avdesigns Posted March 17, 2013 Author Report Posted March 17, 2013 Sorry I didnt test this properly... It works however as its in the layout.tpl it embeds the results into each page. Is there a way so it will always show the search? Quote
freshJet Posted March 17, 2013 Report Posted March 17, 2013 Not sure what you mean? If you want it on the frontpage, why did you put it on the layout.tpl? Did you use an iframe? If so, don't. Quote
avdesigns Posted March 17, 2013 Author Report Posted March 17, 2013 Its for all pages, an its not iframed I have used the standard form however the airports are not showing in the list, Thanks Jacob Quote
freshJet Posted March 17, 2013 Report Posted March 17, 2013 OK, well first of all make sure it's working in the first place at index.php/FrontSchedules Quote
avdesigns Posted March 17, 2013 Author Report Posted March 17, 2013 Im using this on layout.tpl <form action="<?php echo url('/FrontSchedules');?>" method="post" enctype="multipart/form-data"> <table style="border-collapse:collapse; " cellspacing="0" cellpadding="0" height="100%" width="100%" > <tr> <td> <select style="margin-bottom:5px;" class="search" name="depicao"> <option value="">Select Departure</option> <?php foreach ($airports as $airport) {echo '<option value="'.$airport->icao.'">'.$airport->icao.' - '.$airport->name.'</option>';} ?> </select> </td><td rowspan="2" > <input type="hidden" name="action" value="findflight" /> <input type="submit" name="submit" id="submit" value="Search" style="float:right; margin-right:5px;"/> </td> </tr> <tr> <td > <select class="search" name="arricao"> <option value="">Select Arrival</option> <?php foreach ($airports as $airport) {echo '<option value="'.$airport->icao.'">'.$airport->icao.' - '.$airport->name.'</option>';} ?> </select> </td> </tr> </table> </form> Quote
freshJet Posted March 17, 2013 Report Posted March 17, 2013 I thought you were using the MainController::Run method? Quote
avdesigns Posted March 18, 2013 Author Report Posted March 18, 2013 I was but when I used it on the layout.tpl it, when I searched it didnt maintain a constant search it turned into the results as well (no iframe) Quote
freshJet Posted March 18, 2013 Report Posted March 18, 2013 I dunno what's up then, I use that method and it opens it in a new tab. Try adding: target="_blank" to the submit button on the airport_search.tpl. Quote
avdesigns Posted March 18, 2013 Author Report Posted March 18, 2013 Anybody else have any ideas? Quote
Tylor Eddy Posted March 19, 2013 Report Posted March 19, 2013 Nevermind, misread what you were after haha Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.