FsPassengers Forums
[Solved] Logbuch auf der Webseite - Printable Version

+- FsPassengers Forums (http://www.fspassengers.com/forum)
+-- Forum: FsPassengers (http://www.fspassengers.com/forum/forumdisplay.php?fid=3)
+--- Forum: FsPassengers Support (http://www.fspassengers.com/forum/forumdisplay.php?fid=5)
+--- Thread: [Solved] Logbuch auf der Webseite (/showthread.php?tid=7786)

Pages: 1 2


Re: [Solved] Logbuch auf der Webseite - FSMicroX - 05-08-2009

Still havent figure out what causes this problem. So if anyone has an answer on what I should do in my sql or script I would preciate your
help :beer




Re: [Solved] Logbuch auf der Webseite - Tracker801 - 05-08-2009

you can always PM Aussie about it and ask him what he changed




Re: [Solved] Logbuch auf der Webseite - FSMicroX - 24-08-2009

Now I got it figure out. So here is the solution for those who have the same problem as me.

1. Open your FsPlistflight.php in a texteditor
2. Search for: # total flight time / block time
3. Delete following lines:

Quote: $query = "SELECT sec_to_time(sum(time_to_sec(TotalBlockTime))) FROM flights ".$condition;
$result=mysql_query($query);
$TFT = number_format(mysql_result($result,0));


Copy and paste following lines just under: # total flight time / block time

$query= 'SELECT sum( time_to_sec( TotalBlockTime ) ) FROM flights '. $condition;
$result= mysql_query( $query );
$TFT= mysql_result( $result, 0 );

function int_int_divide( $x, $y ) {
return ( $x- ( $x% $y ) )/ $y;
}

$seconds= $TFT% 60;
$TFT= int_int_divide( $TFT, 60 );
$minutes= $TFT% 60;
$TFT= int_int_divide( $TFT, 60 );
$hours= $TFT;

$TFT= sprintf( '%02d:%02d:%02d', $hours, $minutes, $seconds );




Re: [Solved] Logbuch auf der Webseite - Swiss - 24-08-2009

Hello FSMicroX

Thanks for the solution. The problem is partially solved. I use the script that indicates the different pilots (Tools and Doc | 417 - Modify
Enanced FsPlistflight whit SUM function for GROUP BY Pilot Name).

Your solution resolv only the part "Virtual Airline Statistics". But the pilots remain at 838:59:59. For those who are using the other script,
this is the right solution.

What needs to be additionaly changed in the script?

Here is the code, that needs to be changed (in bold):

// main sql-query :
$query = "SELECT PilotName, COUNT(PilotName) as TnF, SEC_TO_TIME(SUM(TIME_TO_SEC(TotalBlockTime))) AS TTotalBlockTime, SUM(NbrPassengers) AS TNbrPassengers, SUM(BonusPoints) AS TBonusPoints, SUM(PenalityPoints) AS TPenalityPoints, SUM(BonusPoints - PenalityPoints) AS TotalPoint FROM flights GROUP BY PilotName ORDER BY $sortColumn LIMIT $pStart,$pageLines";
if(!$result=mysql_query($query))
{
echo "SQL Error - ".mysql_error()."<br>".$query;
return;
}



Post Edited ( 08-24-09 20:54 )


Re: Logbuch auf der Webseite not solved - Aussie24 - 28-08-2009

We had resolved the problem already but there were problems with a VA due to copyrights so we are back on top
We are working on this problem.

Our programmer is currently not possible due to health reasons to work on this script.
Will inform you as soon as possible.