Jump to content

maiochine

Members
  • Posts

    30
  • Joined

  • Last visited

Everything posted by maiochine

  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. 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 .
  5. @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
  6. @ 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
  7. @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
  8. Hey Jeff hey Simpilot ! any help please ?
  9. @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 !
  10. @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
  11. 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
  12. 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
  13. 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
  14. 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
  15. @simpilot I have tried the modification you told me about but still have a small issue, please take a look at this result : http://www.cargoitaliavirtual.com/index.php/TouchdownStats/ As you can see there's no pilot name nor aircraft name.... my touchdownstats_index.tpl look like this now <?php foreach($stats as $stat) { $pilot = PilotData::getPilotData($stat->PilotName); $aircraft = OperationsData::getAircraftInfo($stat->AircraftName); echo '<tr>'; echo '<td>'.PilotData::getPilotCode($pilot->UserName, $pilot->PilotName).' - '.$pilot->PilotName.'</td>'; echo '<td>'.$aircraft->AircraftName.'</td>'; echo '<td>'.$stat->ArrivalIcaoName.'</td>'; echo '<td>'.$stat->TouchDownVertSpeedFt.'</td>'; echo '<td>'.$stat->datestamp.'</td>'; echo '</tr>'; } ?> </table> could you please help me for this one too ? thanks again
  16. Hey I have entered manualy 3 landing rate data in the rate field but all the other fields for the remaining flights have the landing rate still 0 but since I'm using FsCaptain I have its own landing rate fields and table in my phpvms that it might be interesting if I link your add-on to it instead of the phpvms_pireps table. If you could please help me do this because I'm not a programmer and I understand few of coding... Here's the structure of my FsCaptain table witch is called "flights" CREATE TABLE IF NOT EXISTS `flights` ( `id` int(16) unsigned NOT NULL auto_increment, `datestamp` datetime NOT NULL default '0000-00-00 00:00:00', `UserName` varchar(22) NOT NULL default '', `CompanyName` varchar(35) NOT NULL default '', `PilotName` varchar(35) NOT NULL default '', `FlightId` varchar(10) NOT NULL default '', `OnlineNetworkNbr` tinyint(4) NOT NULL default '0', `FlightDate` date NOT NULL default '0000-00-00', `AircraftName` varchar(50) NOT NULL default '', `AircraftType` varchar(5) NOT NULL default '', `NbrPassengers` smallint(2) NOT NULL default '0', `CargoWeight` varchar(15) NOT NULL default '', `Mtow` varchar(15) NOT NULL default '', `StartAircraftWeight` varchar(15) NOT NULL default '', `EndAircraftWeight` varchar(15) NOT NULL default '', `StartFuelQuantity` varchar(15) NOT NULL default '', `EndFuelQuantity` varchar(15) NOT NULL default '', `DepartureIcaoName` varchar(50) NOT NULL default '', `ArrivalIcaoName` varchar(50) NOT NULL default '', `DepartureLocalHour` time NOT NULL default '00:00:00', `ArrivalLocalHour` time NOT NULL default '00:00:00', `DepartureGmtHour` time NOT NULL default '00:00:00', `ArrivalGmtHour` time NOT NULL default '00:00:00', `TotalBlockTime` time NOT NULL default '00:00:00', `TotalBlockTimeNight` time NOT NULL default '00:00:00', `TotalAirbornTime` time NOT NULL default '00:00:00', `TotalTimeOnGround` time NOT NULL default '00:00:00', `TotalDistance` varchar(18) NOT NULL default '', `MaxAltitude` varchar(15) NOT NULL default '', `CruiseSpeed` varchar(15) NOT NULL default '', `CruiseMachSpeed` varchar(15) NOT NULL default '', `CruiseTimeStartSec` time NOT NULL default '00:00:00', `CruiseTimeStopSec` time NOT NULL default '00:00:00', `CruiseFuelStart` varchar(15) NOT NULL default '', `CruiseFuelStop` varchar(15) NOT NULL default '', `LandingSpeed` varchar(15) NOT NULL default '', `LandingPitch` varchar(15) NOT NULL default '', `TouchDownVertSpeedFt` float NOT NULL default '0', `CaptainSentMayday` tinyint(3) NOT NULL default '0', `CrashFlag` tinyint(3) NOT NULL default '0', `FlightResult` varchar(15) NOT NULL default '', `PassengersOpinion` tinyint(4) NOT NULL default '0', `PassengersOpinionText` text NOT NULL, `FailureText` text NOT NULL, `CasualtiesText` text NOT NULL, `PilotBonusText` text NOT NULL, `BonusPoints` int(10) NOT NULL default '0', `PilotPenalityText` text NOT NULL, `PenalityPoints` int(10) NOT NULL default '0', PRIMARY KEY (`id`), KEY `datestamp` (`datestamp`), KEY `UserName` (`UserName`), KEY `CompanyName` (`CompanyName`), KEY `PilotName` (`PilotName`), KEY `AircraftName` (`AircraftName`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=70 ; STEPS TO FOLLOW: 1- the first thing to do is to modify both entries ".TABLE_PREFIX." in the file TouchdownStatsData.class.php of your add-on found in the folder "common" to ".flights." is that correct ? 2- to show only the best five I have to open the file TouchdownStats.php and modify the entry at line 15 $this->set('stats', TouchdownStatsData::get_all_stats()); to $this->set->('stats', TouchdownStatsData::get_stats('5')); so the whole code would look like this : <?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_stats('5')); $this->show('touchdownstats/touchdownstats_index.tpl'); } public function top_landings($howmany) { $this->set('stats', TouchdownStatsData::get_stats($howmany)); $this->show('touchdownstats/touchdownstats_index.tpl'); } } 3- Please show me how to change the entries in touchdownstats_index.tpl so it communicates with the "flights" table. <?php foreach($stats as $stat) { $pilot = PilotData::getPilotData($stat->pilotid); $aircraft = OperationsData::getAircraftInfo($stat->aircraft); echo '<tr>'; echo '<td>'.PilotData::getPilotCode($pilot->code, $pilot->pilotid).' - '.$pilot->firstname.' '.$pilot->lastname.'</td>'; echo '<td>'.$aircraft->fullname.'</td>'; echo '<td>'.$stat->arricao.'</td>'; echo '<td>'.$stat->landingrate.'</td>'; echo '<td>'.date(DATE_FORMAT, strtotime($stat->submitdate)).'</td>'; echo '</tr>'; } ?>
  17. I have the same problem, i usually send manual pireps and I confirm to have landing rates as field .... any help ?
  18. No no I have it on both root folder and Clowdy folder !
  19. You mean if the Register.php is still in the "clowdy" folder it wont work ? Ill do the test and see if it works, thanks
  20. Hi Nabeel, I'm having trouble in making the admin notification mail work ! I'm using as a template "clowdy", an inside "clowdy" folder I inserted the Register.php, email_registered.tpl and email_registrationaccepted.tpl, When a user is registering Im not receiving any mail ! could you please tell me what I'm missing? thanks
  21. Hi guys ! I would like to announce the arrival of Cargoitalia Virtual for all of MD-11 fans and specially for the cargo pilots. Cargoitalia Virtual is the first and unique virtual airline that reproduce Cargoitalia's real life activities. Its concept is unique and is based on a simulated real life pilot career that begins when a user subscribes as a cadet pilot and thanks to the exlusive use of PMDG MD-11F simulator the pilot will be followed by the instructors with a step by step type rating that guides him to his total 50 hours before he becomes a second officer. Cargoitalia Virtual is characterized for its close support with the VA staff that takes place on Skype where pilots go for a breifing and proceed with the VA operations. The preparation lessons for the type rating is based on the original PMDG MD-11F manuals and based on the real life MD-11 manual. Pilots who subscribe to Cargoitalia Virtual should have an original copy of PMDG MD-11 and advised to have also FsCaptain for flight logging. A minimum of 2 flights a month is required, we encourage online flying over VATSIM and IVAO, pilots can freely chose to fly online or offline at their discretion. Lessons are held in Italian and English when needed. Cargoitalia Virtual's Cheif and Coordinator Thomas Zaniboni welcomes you on board. Comunications and Design Mario Chahine
  22. Hi all! I have seen this map : http://delta.innosked.com/ and I am completely amazed ! I would like to have a similar map on our VA website but I dont know where to start ! Any help will be appreciated ! many thanks
  23. Nabeel ! Code Snipped http://pastebin.com/PTj2fpdx These are the results ! FsCaptain use the same language and format as Fspassengers so it should be the same !
×
×
  • Create New...