Jump to content

Requesting Code Help Simulator and Pireps Source


chilemugriento

Recommended Posts

Good day Gentlemen.

Still working on my VA,

Noticed in Pirep table there is a column called source. So added in customfileds table, new item, called "Simulator" with a dropdown menu for: FS9, FSX, Xplane, Prepare3D (this are for registration form)

Want to active a table in VA Statistic to show those parameters, total numbers of every Simulator and total numbers of Pirep System

Example:

SIMULATOR PIREP

FS9 (120) FSPASSENGERS (170)

FSX (185) FS FLIGHT KEEPER (8)

XPLANE (16) FSACARS (14)

PREPARE3D (12) XACARS (97)

KACARS (16)

FSCAPTAIN (3)

PILOT REPORT (25)

TOTAL (333) TOTAL (333)

Table already build, (copy from pilots by country) trying to put the code by myself, with no results.

http://www.surair.co...th=06&year=2014

Somebody can help me with this code ?

Thank you very much !!!!

Best regards.

Link to comment
Share on other sites

  • 2 weeks later...

[sOLVED] Good day,

Finally can made script myself :Dhttp://www.surair.co...p/vStatsCenter/

Here is, hope will be useful for every interested

(noticed table prefix, mine is phpvms_1pireps)

<table align="center">

<thead>

<th colspan="5"><Center>PIREPS Y ACARS<Center></th>

<tr>

<th><Center><img src="http:/yoursite"><Center>FSPassengers</th>

<th><Center><img src="http:/yoursite"><Center>Xacars</th>

<th><Center><img src="http:/yoursite"><Center>Kacars</th>

<th><Center><img src="http:/yoursite"><Center>FSAcars</th>

<th><Center><http:/yoursite"><Center>FSCaptain</th>

</tr>

</thead>

<tbody>

<tr>

<td align="center"><?php

$query="SELECT COUNT(*) as totalfsp FROM `phpvms_1pireps` WHERE `source`='fspax'";

$result=DB::get_results($query);

echo $result[0]->totalfsp; ?></td>

<td align="center"><?php

$query="SELECT COUNT(*) as totalxac FROM `phpvms_1pireps` WHERE `source`='xacars'";

$result=DB::get_results($query);

echo $result[0]->totalxac; ?></td>

<td align="center"><?php

$query="SELECT COUNT(*) as totalkac FROM `phpvms_1pireps` WHERE `source`='kacars'";

$result=DB::get_results($query);

echo $result[0]->totalkac; ?></td>

<td align="center"><?php

$query="SELECT COUNT(*) as totalfsac FROM `phpvms_1pireps` WHERE `source`='fsac'";

$result=DB::get_results($query);

echo $result[0]->totalfsac; ?></td>

<td align="center"><?php

$query="SELECT COUNT(*) as totalfscap FROM `phpvms_1pireps` WHERE `source`='fscap'";

$result=DB::get_results($query);

echo $result[0]->totalfscap; ?></td>

<td colspan="5"></td>

</tbody>

</table>

<table align="center">

<thead>

<th colspan="5"><Center><Center></th>

<tr>

<th><Center><img src="http:/yoursite"><Center>FS Flight Keeper</th>

<th><Center><img src="http:/yoursite"><Center>APVacars</th>

<th><Center><img src="http:/yoursite"><Center>CAVacars</th>

<th><Center><img src="http:/yoursite"><Center>SUR AIR Report</th>

<th><Center><img src="http:/yoursite"><Center>Otros</th>

</tr>

</thead>

<tbody>

<tr>

<td align="center"><?php

$query="SELECT COUNT(*) as totalfsfk FROM `phpvms_1pireps` WHERE `source`='fsfk'";

$result=DB::get_results($query);

echo $result[0]->totalfsfk; ?></td>

<td align="center"><?php

$query="SELECT COUNT(*) as totalapv FROM `phpvms_1pireps` WHERE `source`='apv'";

$result=DB::get_results($query);

echo $result[0]->totalapv; ?></td>

<td align="center"><?php

$query="SELECT COUNT(*) as totalcav FROM `phpvms_1pireps` WHERE `source`='cav'";

$result=DB::get_results($query);

echo $result[0]->totalcav; ?></td>

<td align="center"><?php

$query="SELECT COUNT(*) as totalfpr FROM `phpvms_1pireps` WHERE `source`='fpr'";

$result=DB::get_results($query);

echo $result[0]->totalfpr; ?></td>

<td align="center"><?php

$query="SELECT COUNT(*) as totalotro FROM `phpvms_1pireps` WHERE `source`='otro'";

$result=DB::get_results($query);

echo $result[0]->totalotro; ?></td>

<td colspan="5"></td>

</tbody>

</table></p><BR><BR>

Best regards

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...