Jump to content

Jeff

Members
  • Posts

    1307
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Jeff

  1. It's still the same. <td style="background-color:#CCCCCC; color:#000000"><div align="center"><?php echo StatsData::TotalHours("AA"); ?></div></td>
  2. Anywhere you want. I created a new page called Videos (in the Admin Panel) and added it there. Then I created a link in my navigation menu to go to the page www.yoursite.com/index.php/pages/videos Here is an example table I have in my Videos page to show the videos on my site: <table> <thead width="100%" align="center"> <th>Video 1</th> <th>Extreme Crosswind Landing</th> //THIS IS AN EXAMPLE VIDEO NAME THAT WILL SHOW ABOVE THE VIDEO </thead> <tbody> <td>YOUR IFRAME CODE GOES HERE</td> <td><iframe width="455" height="300" src="http://www.youtube.com/embed/lnHHelsfXYE" frameborder="0" allowfullscreen></iframe></td> //THIS IS HOW YOUR IFRAME SHOULD LOOK </tbody> </table> <table> <thead width="100%" align="center"> <th>Video 3</th> <th>Video 4</th> </thead> <tbody> <td>YOUR IFRAME CODE GOES HERE</iframe></td> <td>YOUR IFRAME CODE GOES HERE</iframe></td> </tbody> </table>
  3. I am in a slight predicament. I am trying to display total hours flown for a specific airline. The code I am using is not displaying the correct output for it. It keeps displaying my total VA hours instead of just the individual Airline I want. Here is the code I am using <?php echo StatsData::TotalHours(AA); ?> If I use these codes <?php echo StatsData::TotalPaxCarried(AA); ?> <?php echo StatsData::TotalMilesFlown(AA); ?> <?php echo StatsData::totalschedules(AA); ?> <?php echo StatsData::TotalFlights(AA); ?> These all show up correctly. Any idea why the Total Hours one isn't showing correctly?
  4. What does line 90 say in /admin/modules/Import/Import.php By the looks of it, you changed your Import.php file and it should actually be line 91 (which should say set_time_limit(270); )
  5. I was just guessing, since I don't use FS9 (FSX only) I just meant FSUIPC itself.
  6. Might be a very stupid question, but do you have FSUIPC4 installed Iain?
  7. I made the changes for you. You still have a lot of schedules that need to have their registration numbers added. You need to add those before you try uploading the .csv to your site. http://www.virtualflightzone.net/files/rotas.zip
  8. Jeff

    Freichat

    I'll give it a go Eddie, if you don't mind to share.
  9. Deleted: Sorry I posted for All Airlines instead of All Airplanes.
  10. Images <img src="http://www.mysite.com/images/myimage.jpg"> YouTube Videos <iframe width="455" height="300" src="http://www.youtube.com/embed/lnHHelsfXYE" frameborder="0" allowfullscreen></iframe> The above video code is an example code to embed on your site. You can find the code on the YouTube page of the video. This video shows a Extreme 747 landing in crosswinds. You can change the size of the video by changing the width and height.
  11. can you zip your .csv and post it here so I can look at it? I think your problem resides in there.
  12. Right-click the "K" column so it hi-lights the whole column. Click "Format Cells". "General" should be hi-lighted, click "Time" Click 13:30 in the list. Click OK. You should now be able to insert time in those boxes.
  13. Your "Flight Time" in your .csv are all showing 1. You need to add the flight times together and place them in each cell. You can't have just one number in it. it needs to read something like this (in military time) Ex: 05:14 10:55
  14. The only thing I was able to make of that is "Nighthawk"
  15. That is a customized GIF image. You can make one using a free image editing software called GIMP, or paid with Photoshop.
  16. What moving badges are you referring to?
  17. Go to phpMyAdmin and go to phpVMS_pilots Under ID should be a number next to your name. If the number is 1, you are good to go.
  18. Jeff

    SQL help

    Are you using the correct code to call for the gate numbers? schedule_results.tpl <?php echo $route->depgate ?> <?php echo $route->arrgate ?> schedule_details.tpl <?php echo $schedule->depgate?> <?php echo $schedule->arrgate?>
  19. I'm stuck on a code, and I cannot figure it out. I want to display all flights from a single airline for one of my custom pages. Can someone please help, or type in the code? I am using 2-digit IATA code for my Airlines (AA=American, DL=Delta...etc.). Thank you
  20. It really isn't necessary to type words of that nature in this Community. I advise you to go elsewhere if you want to continue speaking like that.
  21. Jeff

    SQL help

    Instructions added. (Good luck)
  22. Jeff

    SQL help

    Your Schedule CSV 1) Open your .csv using Microsoft Excel (I find this better than notepad). 2) Create 2 fields at the top called depgate and arrgate 3) Type your gate numbers in their respected boxes for each flight. 4) Save your .csv phpMyAdmin 1) Open phpMyAdmin from your cPanel 2) Choose your database name (from the left) 3) From the scroll-down, click "phpvms_schedules" 4) At the top, click "Structure" 5) Just below the table, look for this Add 1 Column. click the radio button for "After" then choose "Enabled" from the drop-down. 6) Type the following in their correct boxes: Column depgate Type TEXT Default None Collation latin1_swedish_ci 7) Click SAVE 8) Repeat steps 5-7 to add the arrgate to the structure (you want to type arrgate instead of depgate on this one, and instead of entering it after "Enabled", you want to add it after "depgate"). File Manager (Editing the schedules module) 1) Go to the following directory: /public_html/admin/modules/Import 2) Open the Import.php file (please make a back-up of this before editing) 3) Look for this code: public function processexport() { $export=''; $all_schedules = SchedulesData::GetSchedules('', false); if(!$all_schedules) { echo 'No schedules found!'; return; } header('Content-Type: text/plain'); header('Content-Disposition: attachment; filename="schedules.csv"'); $fp = fopen('php://output', 'w'); $line=file_get_contents(SITE_ROOT.'/admin/lib/template.csv'); fputcsv($fp, explode(',', $line)); foreach($all_schedules as $s) { $line ="{$s->code},{$s->flightnum},{$s->depicao},{$s->arricao}," ."{$s->route},{$s->registration},{$s->flightlevel},{$s->distance}," ."{$s->deptime}, {$s->arrtime}, {$s->flighttime}, {$s->notes}, " ."{$s->price}, {$s->flighttype}, {$s->daysofweek}, {$s->enabled}"; fputcsv($fp, explode(',', $line)); } fclose($fp); } 4) Change it to this: public function processexport() { $export=''; $all_schedules = SchedulesData::GetSchedules('', false); if(!$all_schedules) { echo 'No schedules found!'; return; } header('Content-Type: text/plain'); header('Content-Disposition: attachment; filename="schedules.csv"'); $fp = fopen('php://output', 'w'); $line=file_get_contents(SITE_ROOT.'/admin/lib/template.csv'); fputcsv($fp, explode(',', $line)); foreach($all_schedules as $s) { $line ="{$s->code},{$s->flightnum},{$s->depicao},{$s->arricao}," ."{$s->route},{$s->registration},{$s->flightlevel},{$s->distance}," ."{$s->deptime}, {$s->arrtime}, {$s->flighttime}, {$s->notes}, " ."{$s->price}, {$s->flighttype}, {$s->daysofweek}, {$s->enabled}, " ."{$s->depgate}, {$s->arrgate}, "; fputcsv($fp, explode(',', $line)); } fclose($fp); } 5) Scroll down, and look for this: echo '<div style="overflow: auto; height: 400px; border: 1px solid #666; margin-bottom: 20px; padding: 5px; padding-top: 0px; padding-bottom: 20px;">'; while($fields = fgetcsv($fp, 1000, ',')) { // Skip the first line if($skip == true) { $skip = false; continue; } // list fields: $code = $fields[0]; $flightnum = $fields[1]; $depicao = $fields[2]; $arricao = $fields[3]; $route = $fields[4]; $aircraft = $fields[5]; $flightlevel = $fields[6]; $distance = $fields[7]; $deptime = $fields[8]; $arrtime = $fields[9]; $flighttime = $fields[10]; $notes = $fields[11]; $price = $fields[12]; $flighttype = $fields[13]; $daysofweek = $fields[14]; $enabled = $fields[15]; if($code == '') { continue; } 6) Change it to this: echo '<div style="overflow: auto; height: 400px; border: 1px solid #666; margin-bottom: 20px; padding: 5px; padding-top: 0px; padding-bottom: 20px;">'; while($fields = fgetcsv($fp, 1000, ',')) { // Skip the first line if($skip == true) { $skip = false; continue; } // list fields: $code = $fields[0]; $flightnum = $fields[1]; $depicao = $fields[2]; $arricao = $fields[3]; $route = $fields[4]; $aircraft = $fields[5]; $flightlevel = $fields[6]; $distance = $fields[7]; $deptime = $fields[8]; $arrtime = $fields[9]; $flighttime = $fields[10]; $notes = $fields[11]; $price = $fields[12]; $flighttype = $fields[13]; $daysofweek = $fields[14]; $enabled = $fields[15]; $depgate = $fields[16]; $arrgate = $fields[17]; if($code == '') { continue; } 7) Scroll down a little more, and find this: # This is our 'struct' we're passing into the schedule function # to add or edit it $data = array( 'code'=>$code, 'flightnum'=>$flightnum, 'depicao'=>$depicao, 'arricao'=>$arricao, 'route'=>$route, 'aircraft'=>$ac, 'flightlevel'=>$flightlevel, 'distance'=>$distance, 'deptime'=>$deptime, 'arrtime'=>$arrtime, 'flighttime'=>$flighttime, 'daysofweek'=>$daysofweek, 'notes'=>$notes, 'enabled'=>$enabled, 'price'=>$price, 'flighttype'=>$flighttype); 8) Change it to this: # This is our 'struct' we're passing into the schedule function # to add or edit it $data = array( 'code'=>$code, 'flightnum'=>$flightnum, 'depicao'=>$depicao, 'arricao'=>$arricao, 'route'=>$route, 'aircraft'=>$ac, 'flightlevel'=>$flightlevel, 'distance'=>$distance, 'deptime'=>$deptime, 'arrtime'=>$arrtime, 'flighttime'=>$flighttime, 'daysofweek'=>$daysofweek, 'notes'=>$notes, 'enabled'=>$enabled, 'price'=>$price, 'flighttype'=>$flighttype, 'depgate'=>$depgate, 'arrgate'=>$arrgate); 9) Save your work. Testing out csv 1) Import your schedules to your database using your Admin Center (I have to upload it twice for some reason in order for them to show up for me). 2) Let me know if you run into any problems.
  23. WOW! That's a new one. I never seen that before with this skin. Not sure what would be causing that.
×
×
  • Create New...