Jump to content

maiochine

Members
  • Posts

    30
  • Joined

  • Last visited

maiochine's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi all ! We are seeking for a web designer who could take care of building a website for us following certain guides that would be communicated using Skype. We already have a scheme and know what we need. Please if you are interested contact us at staff@cargoitaliavirutal.com Mario Chahine
  2. @SIMPILOT Please Please Please dont let down on me I saw this code you posted: public function get_all_stats($month) { $query = "SELECT pilotid, code, flightnum, depicao, arricao, aircraft, landingrate, submitdate FROM `".TABLE_PREFIX."pireps` WHERE landingrate < '0' AND MONTH(submitdate) = '$month' ORDER BY landingrate DESC"; return DB::get_results($query); } could you please transform it in an example ? I mean if I want the month of July how th could would be ? Here' my code now : <?php //simpilotgroup addon module for phpVMS virtual airline system // //simpilotgroup addon modules are licenced under the following license: //Creative Commons Attribution Non-commercial Share Alike (by-nc-sa) //To view full license text visit http://creativecommons.org/licenses/by-nc-sa/3.0/ // //@author David Clark (simpilot) //@copyright Copyright (c) 2009-2010, David Clark //@license http://creativecommons.org/licenses/by-nc-sa/3.0/ class TouchdownStatsData extends CodonData { public function get_all_stats() { $query = "SELECT * FROM flights WHERE TouchDownVertSpeedFt < '-0' ORDER BY TouchDownVertSpeedFt DESC"; return DB::get_results($query); } public function get_stats($howmany) { $query = "SELECT * FROM flights WHERE TouchDownVertSpeedFt < '-0' ORDER BY TouchDownVertSpeedFt DESC LIMIT $howmany"; return DB::get_results($query); } } Is your code has to be put in the second part or both of them ? I mean the ($howmany) part or also the first one ?
  3. @SIMPILOT Hey finally the whole thing worked thanks to Selwyn Orren the guardian angel take a look at the stats : http://www.cargoitaliavirtual.com/index.php Is the monthly stats working ? If yes what should I tune then ?
  4. Ok thanks
  5. Yes I understand but WHERE in the modules after WHAT? do I have to replace some code line ????? What is myvariable ? Does it have to remain as it is or should I replace it ??? Sorry guys if I insist but seen from the point of view of a newbe it is not as clear and easy as you super programmers think ! And the most important thing that when you post something for someone who is not familiar with coding, it is much more efficient to demonstrate in more detailed way how to write stuff than post pro. coding and have the topic full of questions ! I appreciate your hard work and the dedication you offered and in this reply I mean no offence to you or anyone else .
  6. @SIMPILOT Hey matey ! I managed to create something here and I think I'm really close to the objective! http://www.cargoitaliavirtual.com/index.php/TouchdownStats I still need to learn how to insert the PilotName and TouchDownVertSpeedFt from the database !!! take a look at my touchdownstats_index.tpl <?php //simpilotgroup addon module for phpVMS virtual airline system // //simpilotgroup addon modules are licenced under the following license: //Creative Commons Attribution Non-commercial Share Alike (by-nc-sa) //To view full license text visit http://creativecommons.org/licenses/by-nc-sa/3.0/ // //@author David Clark (simpilot) //@copyright Copyright (c) 2009-2010, David Clark //@license http://creativecommons.org/licenses/by-nc-sa/3.0/ ?> <table width="600" border="0" align="center" cellpadding="0" cellspacing="0" class="TableFullyBorderedLightGray" class="tablesorter" id="tabledlist"> <tbody> <tr align="center" bgcolor="#B3C7EF" class="TableFullyBorderedLightGrayCell"> <td colspan="3" class="TableFullyBorderedLightGrayCell"> <table width="300" border="0" cellspacing="0" cellpadding="4"> <tbody><tr> <td align="center"> <h3>Top 10 Best Landings</h3> </td> </tr> </tbody> </table> </td> </tr> <tr align="center" class="TableFullyBorderedLightGrayCell"> <td colspan="3" class="TableFullyBorderedLightGrayCell"> <table width="300" border="0" cellspacing="0" cellpadding="4"> <tbody><tr> <td align="center"><h4>July 2010</h4></td> </tr> </tbody></table></td> </tr> <tr valign="middle" class="TableFullyBorderedLightGrayCell"> <td align="right" class="TableFullyBorderedLightGrayCell">1st </td> <td width="384" class="TableFullyBorderedLightGrayCell"><table width="380" border="0" cellspacing="0" cellpadding="4"> <tbody><tr> <td>Pilot</td> </tr> </tbody></table></td> <td width="123" align="right" class="TableFullyBorderedLightGrayCell">-103 ft/min </td> </tr> <tr valign="middle" class="TableFullyBorderedLightGrayCell"> <td align="right" class="TableFullyBorderedLightGrayCell">2nd </td> <td width="384" class="TableFullyBorderedLightGrayCell"><table width="380" border="0" cellspacing="0" cellpadding="4"> <tbody><tr> <td>Pilot</td> </tr> </tbody></table></td> <td width="123" align="right" class="TableFullyBorderedLightGrayCell">-104 ft/min </td> </tr> <tr valign="middle" class="TableFullyBorderedLightGrayCell"> <td align="right" class="TableFullyBorderedLightGrayCell">3rd </td> <td width="384" class="TableFullyBorderedLightGrayCell"><table width="380" border="0" cellspacing="0" cellpadding="4"> <tbody><tr> <td>Pilot</td> </tr> </tbody></table></td> <td width="123" align="right" class="TableFullyBorderedLightGrayCell">-108 ft/min </td> </tr> <tr valign="middle" class="TableFullyBorderedLightGrayCell"> <td align="right" class="TableFullyBorderedLightGrayCell">4th </td> <td width="384" class="TableFullyBorderedLightGrayCell"><table width="380" border="0" cellspacing="0" cellpadding="4"> <tbody><tr> <td>Pilot</td> </tr> </tbody></table></td> <td width="123" align="right" class="TableFullyBorderedLightGrayCell">-108 ft/min </td> </tr> <tr valign="middle" class="TableFullyBorderedLightGrayCell"> <td align="right" class="TableFullyBorderedLightGrayCell">5th </td> <td width="384" class="TableFullyBorderedLightGrayCell"><table width="380" border="0" cellspacing="0" cellpadding="4"> <tbody><tr> <td>Pilot</td> </tr> </tbody></table></td> <td width="123" align="right" class="TableFullyBorderedLightGrayCell">-109 ft/min </td> </tr> <?php foreach($stats as $stat) { echo '<tr>'; echo '<td>'.$stat->PilotName.'</td>'; echo '<td>'.$stat->AircraftName.'</td>'; echo '<td>'.$stat->ArrivalIcaoName.'</td>'; echo '<td>'.$stat->TouchDownVertSpeedFt.'</td>'; echo '<td>'.$stat->datestamp.'</td>'; echo '</tr>'; } ?> </table> Could you please lead me to a correct path ? Thanks for your patience
  7. @ SIMPILOT Hi Simpilot ! Sorry if I disturb you but I would like to learn how the stats work once and for all my TouchdownStatsData.class.php : <?php //simpilotgroup addon module for phpVMS virtual airline system // //simpilotgroup addon modules are licenced under the following license: //Creative Commons Attribution Non-commercial Share Alike (by-nc-sa) //To view full license text visit http://creativecommons.org/licenses/by-nc-sa/3.0/ // //@author David Clark (simpilot) //@copyright Copyright (c) 2009-2010, David Clark //@license http://creativecommons.org/licenses/by-nc-sa/3.0/ class TouchdownStatsData extends CodonData { public function get_all_stats() { $query = "SELECT * FROM flights WHERE TouchDownVertSpeedFt < '-100' ORDER BY TouchDownVertSpeedFt DESC"; return DB::get_results($query); } public function get_stats($howmany) { $query = "SELECT * FROM flights WHERE TouchDownVertSpeedFt < '-100' ORDER BY TouchDownVertSpeedFt DESC"; return DB::get_results($query); } } The TouchdownStats.php : <?php //simpilotgroup addon module for phpVMS virtual airline system // //simpilotgroup addon modules are licenced under the following license: //Creative Commons Attribution Non-commercial Share Alike (by-nc-sa) //To view full license text visit http://creativecommons.org/licenses/by-nc-sa/3.0/ // //@author David Clark (simpilot) //@copyright Copyright (c) 2009-2010, David Clark //@license http://creativecommons.org/licenses/by-nc-sa/3.0/ class TouchdownStats extends CodonModule { public function index() { $this->set('stats', TouchdownStatsData::get_all_stats()); $this->show('touchdownstats/touchdownstats_index.tpl'); } public function top_landings($howmany) { $this->set('stats', TouchdownStatsData::get_stats($howmany)); $this->show('touchdownstats/touchdownstats_index.tpl'); } } and touchdownstats_index.tpl: <?php //simpilotgroup addon module for phpVMS virtual airline system // //simpilotgroup addon modules are licenced under the following license: //Creative Commons Attribution Non-commercial Share Alike (by-nc-sa) //To view full license text visit http://creativecommons.org/licenses/by-nc-sa/3.0/ // //@author David Clark (simpilot) //@copyright Copyright (c) 2009-2010, David Clark //@license http://creativecommons.org/licenses/by-nc-sa/3.0/ ?> <table width="100%" border="1" bordercolor="#FFFFFF" class="tablesorter" id="tabledlist"> <tr align="center" valign="middle" bgcolor="#0079B2"> <td>Pilot</td> <td>Aircraft</td> <td>Arrival Field</td> <td>Landing Rate</td> <td>Date Posted</td> </tr> <?php foreach($stats as $stat) { echo '<tr>'; echo '<td>'.$stat->PilotName.'</td>'; echo '<td>'.$stat->AircraftName.'</td>'; echo '<td>'.$stat->ArrivalIcaoName.'</td>'; echo '<td>'.$stat->TouchDownVertSpeedFt.'</td>'; echo '<td>'.$stat->datestamp.'</td>'; echo '</tr>'; } ?> </table> I used this link to see the top ten but I still see all flights http://www.cargoitaliavirtual.com/index.php/TouchdownStats/top_landings/10 I tried to make a monthly stats and followed this : public function get_all_stats($month) { $query = "SELECT pilotid, code, flightnum, depicao, arricao, aircraft, landingrate, submitdate FROM `".TABLE_PREFIX."pireps` WHERE landingrate < '0' AND MONTH(submitdate) = '$month' ORDER BY landingrate DESC"; return DB::get_results($query); } But could not reach my objective... Would you please have the patience and teach me how to make a table similar to the screenshot I posted where I can have top FIVE of the month ? Please its important ! Thanks again and really sorry if that disturbs you
  8. @Jeff Im using FsCaptain and its similar to FsPassengers as a code and I cant use standard code, the stats work perfectly I just want to see top five only and if possible have the ranking displayed to the left as in the screenshot. Thats all ! is that possible ? Thanks Jeff
  9. Hey Jeff hey Simpilot ! any help please ?
  10. @JEFF Here's my TouchdownStats.php <?php //simpilotgroup addon module for phpVMS virtual airline system // //simpilotgroup addon modules are licenced under the following license: //Creative Commons Attribution Non-commercial Share Alike (by-nc-sa) //To view full license text visit http://creativecommons.org/licenses/by-nc-sa/3.0/ // //@author David Clark (simpilot) //@copyright Copyright (c) 2009-2010, David Clark //@license http://creativecommons.org/licenses/by-nc-sa/3.0/ class TouchdownStats extends CodonModule { public function index() { $this->set('stats', TouchdownStatsData::get_all_stats('10')); $this->show('touchdownstats/touchdownstats_index.tpl'); } public function top_landings($howmany) { $this->set('stats', TouchdownStatsData::get_stats($howmany)); $this->show('touchdownstats/touchdownstats_index.tpl'); } } If there's anything else please tell me !
  11. @JEFF I tried your script but still didn't manage to get only TOP TEN look at the result !!! http://www.cargoitaliavirtual.com/index.php/TouchdownStats/top_landings/10 I tried your .tpl code but it doesn't work so Im using this code now <?php //simpilotgroup addon module for phpVMS virtual airline system // //simpilotgroup addon modules are licenced under the following license: //Creative Commons Attribution Non-commercial Share Alike (by-nc-sa) //To view full license text visit http://creativecommons.org/licenses/by-nc-sa/3.0/ // //@author David Clark (simpilot) //@copyright Copyright (c) 2009-2010, David Clark //@license http://creativecommons.org/licenses/by-nc-sa/3.0/ ?> <table width="100%" border="1" bordercolor="#FFFFFF" class="tablesorter" id="tabledlist"> <tr align="center" valign="middle" bgcolor="#0079B2"> <td>Pilot</td> <td>Aircraft</td> <td>Arrival Field</td> <td>Landing Rate</td> <td>Date Posted</td> </tr> <?php foreach($stats as $stat) { echo '<tr>'; echo '<td>'.$stat->PilotName.'</td>'; echo '<td>'.$stat->AircraftName.'</td>'; echo '<td>'.$stat->ArrivalIcaoName.'</td>'; echo '<td>'.$stat->TouchDownVertSpeedFt.'</td>'; echo '<td>'.$stat->datestamp.'</td>'; echo '</tr>'; } ?> </table> would you please help me out with this ... im trying to make a table similare to the one below please could you tell me how to do that ? I'm not a professional coder, of course the blured area contain Pilot Name date of lfight and departure/destination
  12. Hey Big Boss ! I'm using the codes you gave me <?php foreach($stats as $stat) { echo '<tr>'; echo '<td>'.$stat->PilotName.'</td>'; echo '<td>'.$stat->AircraftName.'</td>'; echo '<td>'.$stat->ArrivalIcaoName.'</td>'; echo '<td>'.$stat->TouchDownVertSpeedFt.'</td>'; echo '<td>'.$stat->datestamp.'</td>'; echo '</tr>'; } ?> this code worked perfectly I only need to know hoe to limit the stats for monthly stats and top 5 and Im aaaaaaaaaaaaaaaaal done Tanks again Simpilot
  13. Jeff I still didn't make it to make a similar page to yours with only 10 landings !!!! Could you please tell me in a simple way (because I no almost nothing in coding) how you made your page work like that ? look at mine http://www.cargoitaliavirtual.com/index.php/TouchdownStats/ thanks Jeff
  14. Hey it works ! take a look at this http://www.cargoitaliavirtual.com/index.php/TouchdownStats/top_landings/10 I would like to ask you one last thing if I could, I would like to have only top five landings and limited monthly and last last thingI would like to limit results of the best from -100 up to -200 if its less than -100 exp: -99 or more -201 I would not like to have them displayed ! Thanks again and best wishes
  15. Im gonna try this out and see what I can get ! I dont know how the landing rate works !!! it shouldn't be -120 ft/m it should be 120ft/m but eh +69 I have no idea how that was since I was not flying that flight
×
×
  • Create New...