Jump to content

Alex

Members
  • Posts

    145
  • Joined

  • Last visited

Everything posted by Alex

  1. I recently created some hub pages which work fine. but since whenever i go gto log in i get this error. Warning: Cannot modify header information - headers already sent by (output started at /home/atlasvi1/public_html/core/modules/eddf/eddf.php:2) in /home/atlasvi1/public_html/core/modules/Login/Login.php on line 154 if i go to log in again i get the " error you are already logged in" and can proceed as normal. my eddf.php is very simple just shows <?php class eddf extends CodonModule { public function index() { Template::Show('eddf_hub.tpl'); } } ?> the login.php line 154 is this header('Location: '.url('/'.$this->post->redir)); any ideas?
  2. Excellent, thanks it works a treat.. Cheers Lorathon
  3. Hi all, I want my pilots to only be able to file a pirep from any of my scheduled departure airfileds. Currently a pilot can file a pirep from any airport, which creates problems for me. The code i believe at the moment in the pireps_new.tpl is this. <input type="text" name="depicao" value="<?php echo $_POST['depicao'] ?>" /> can someone point me in the right direction please.
  4. Alex

    Obsess Blue

    Hi Roger, tried that code but it does not populate with any of the airlines in the database! I have this code which does populate the search list with my airlines, but i cant get the actual individual airline search function to work as it just brings all schedules up. <div id="airlinetab"> <p>Select Required Airline:</p> <select id="airline" name="airline"> <option value="">All Airlines</option> <?php if(!$allairlines) $allairlines = array(); foreach($allairlines as $airline) { echo '<option value="'.$airline->code.'" '.$sel.'>'.$airline->code.' - '.$airline->name.'</option>'; } ?> </select> <input type="submit" name="submit" value="Find Flights" /> </div>
  5. Alex

    Obsess Blue

    Roger, did you manage to take a look at the search by airline function?
  6. Alex

    Obsess Blue

    I tried daves frontschedules but when is use them his search by aircraft doesnt work as it uses $aircrafts whereas my version appears to use $equipment. (but thats a different story and i dont want to hijack the thread.) And yes roger thats exactly what i need.
  7. Alex

    Obsess Blue

    Roger, i have been using Obsessblue since starting my VA, The only one thing i have had a problem with is that there is no airline search facility in the schedules search. i have tried in vain many times to incorporate one but failed.Is this something you can add or pproovide the rel. code for? Cheers Alex
  8. i have one long list for all the pilots and hubs on one page. i'd just like to split the pilots per hub into seperate hubs.
  9. How easy is it to create a seperate page for each of my hubs in the pilots list. I have three hubs and would like to have from the pilots list the ability to select a hub from either a dropdown menu or from a link to page.?
  10. My default template doesn't have the airline search function. i think it is an issue in the schedulesdataclass. I have tried copy pasting the relevent parts from daves front schedules into my templates but just a errors galore. I think the easiest thing will be to try an work out why daves frontschedules search module doesnt show my aircraft but the icao of airfields.
  11. I'll double check Mark. thanks
  12. Ok in SchedulesDataClass i noticed that there was no search for the airline in the public function. It appears that the airline is searched for using "s.code" is this correct? i added the s.code as airline in the mysql queury added what i think should go but i'm probably way out. as it still doesnt search for the airline. public static function findSchedules($params, $count = '', $start = '') { $sql = 'SELECT s.*, a.id as aircraftid, s.code as airline, a.name as aircraft, a.registration, a.minrank as aircraft_minrank, a.ranklevel as aircraftlevel, dep.name as depname, dep.lat AS deplat, dep.lng AS deplng, arr.name as arrname, arr.lat AS arrlat, arr.lng AS arrlng FROM '.TABLE_PREFIX.'schedules AS s LEFT JOIN '.TABLE_PREFIX.'airports AS dep ON dep.icao = s.depicao LEFT JOIN '.TABLE_PREFIX.'airports AS arr ON arr.icao = s.arricao LEFT JOIN '.TABLE_PREFIX.'airline AS air ON s.code = s.code LEFT JOIN '.TABLE_PREFIX.'aircraft AS a ON a.id = s.aircraft '; This is really getting me down now, i have tried lots of trial and error and reading up of the API DOCS, to no avail. i should clarify that whilst i state it doesnt search each individual airline, it does bring all the airlines up.
  13. Dave, by this do you mean the Java Script? I'm still struggling with this airline search function.
  14. you would need to add something like. Pilot Briefing Notes For: <?php echo $userinfo->firstname . ' ' . $userinfo->lastname .' ' . $pilotcode; ?> into your Schedule_briefing.tpl
  15. i believe you can grab your current location using. <?php echo $current_location.'-'.$current_location2; ?> Alex
  16. Dave i think he is saying that your search parameters in your module for aircraft are $aircrafts wheras in his i think its the dataclass its defined as $equipment. I have the same issue (on the obsessblue skins) I think i posted this problem previously. yes here. i posted the two different templates for comparison. Link
  17. Thanks Dave that did the trick.
  18. Hi, On my admin activity template i would like it only to display the last 20 instead of all activity. currently the template is the admin/templates/log_index.tpl. <h3>Admin Activity Logs</h3> <?php if(!$all_logs) { echo 'There is no activity'; return; } ?> <table id="tabledlist" class="tablesorter"> <thead> <tr> <th>Date</th> <th>Name</th> <th>Message</th> </tr> </thead> <tbody> <?php foreach($all_logs as $log) { echo "<tr> <td width=\"5%\" nowrap>{$log->datestamp}</td> <td width=\"5%\" nowrap>".PilotData::getPilotCode($log->code, $log->pilotid)." - {$log->firstname} {$log->lastname}</td> <td>{$log->message}</td> </tr>"; } ?> </tbody> </table> i'm thinking i need to add something like a getrecentreports, but am lost as to where to start? Anyone help? Thanks
  19. <?php $usersonline = StatsData::UsersOnline(); $guestsonline = StatsData::GuestsOnline(); ?> <h4>Pilots Online</h4> <?php $shown = array(); foreach($usersonline as $pilot) { if(in_array($pilot->pilotid, $shown)) continue; else $shown[] = $pilot->pilotid; echo "<p>"; echo '<img src="'.Countries::getCountryImage($pilot->location).'" alt="'.Countries::getCountryName($pilot->location).'" />'; echo " {$pilot->firstname} {$pilot->lastname}<br />"; echo "</p>"; } ?> <h4>Guests Online</h4> <p class="txt-red10">Currently <?php echo count($guestsonline);?> guest(s) visiting. would be something like this
  20. Still struggling to get this to work properly, i know i'm a pain for asking but can anyone hilight the problem?
  21. Just to reinforce SimPilots comments, the error will be with your submitted pireps. check them, you will find one with i misspelled ICAO.
  22. That is the mysql table for your database. you need to navigate to your database on your server using cpanel if you have it, and upload that file.
  23. failed almost fatally, ended up none of my pilots could file a pirep and all schedules dissapeared, don't know what i did but luckily a backup provided an escape. i'm looking now at the common/schedules/schedulesdata.class.php and from reading nabeels comments in there i need to add something to the findflights part. i cobbled together this, but still no luck in the actual search function working. public function showSchedules() { $depapts = OperationsData::GetAllAirports(); $equip = OperationsData::GetAllAircraftSearchList(true); $airline = OperationsData::GetAllAirlines(); $this->set('depairports', $depapts); $this->set('equipment', $equip); $this->set('airline', $airline); $this->render('schedule_searchform.tpl'); # Show the routes. Remote this to not show them. $this->set('allroutes', SchedulesData::GetSchedules()); $this->render('schedule_list.tpl'); } public function findFlight() { if($this->post->airline != '') { $params = array('s.code' => $this->post->airline); } if($this->post->depicao != '') { $params = array('s.depicao' => $this->post->depicao); } if($this->post->arricao != '') { $params = array('s.arricao' => $this->post->arricao); } if($this->post->equipment != '') { $params = array('a.name' => $this->post->equipment); } if($this->post->distance != '') { if($this->post->type == 'greater') $value = '> '; else $value = '< '; $value .= $this->post->distance; $params = array('s.distance' => $value); } $params['s.enabled'] = 1; $this->set('allroutes', SchedulesData::findSchedules($params)); $this->render('schedule_results.tpl'); in your frontschedules.php it is written differently and i'm not confident enough to know the subtle differences. Heres how that reads. public function index() { if(isset($this->post->action)) { if($this->post->action == 'findflight') { $this->findflight(); } } else { $this->set('airports', OperationsData::GetAllAirports()); $this->set('airlines', OperationsData::getAllAirlines()); $this->set('aircrafts', FrontSchedulesData::findaircrafttypes()); $this->set('countries', FrontSchedulesData::findcountries()); $this->show('airport_search.tpl'); } } public function findflight() { $arricao = DB::escape($this->post->arricao); $depicao = DB::escape($this->post->depicao); $airline = DB::escape($this->post->airline); $aircraft = DB::escape($this->post->aircraft); if(!$airline) { $airline = '%'; } if(!$arricao) { $arricao = '%'; } if(!$depicao) { $depicao = '%'; } if($aircraft == !'') { $aircrafts = FrontSchedulesData::findaircraft($aircraft);//print_r($aircrafts); foreach($aircrafts as $aircraft) { $route = FrontSchedulesData::findschedules($arricao, $depicao, $airline, $aircraft->id); if(!$route){$route=array();} if(!$routes){$routes=array();} $routes = array_merge($routes, $route); } } else { $routes = FrontSchedulesData::findschedule($arricao, $depicao, $airline); } $this->set('allroutes', $routes); $this->show('schedule_results.tpl'); Dave, your frontschedules module works for me (as you directed in the posts above) however the search by aircraft type just displays the ICAO of airports in my list. I'd be happy just to get either one working correctly without me messing it up again.
  24. i think that will be way passed my skill level, i hoped that i could just copy the initial format as i posted in the first post to make this work, but it's clearly not that easy. i tried to incorporate some of your code from frontschedules.php but failed miserably.
  25. Scott rather than duplicating posts have a look here, where we are going through the same thing. topic
×
×
  • Create New...