
Tato123
-
Posts
150 -
Joined
-
Last visited
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Posts posted by Tato123
-
-
my error log is empty
-
no error
Is influent the php version ?
-
Yes Tom, the query work and return number 4
-
no error. The sitedon't show the number
-
<?php class HubStats extends Codondata { public static function Pilots($icao) { //Pilot details $query = "SELECT * FROM ".TABLE_PREFIX."pilots WHERE hub = '".$icao."'"; return DB::get_results($query); } public static function CountPilots($icao) { //Number of pilots $query = "SELECT COUNT(pilotid) as count FROM ".TABLE_PREFIX."pilots WHERE hub = '".$icao."'"; $results = DB::get_row($query); return $results->count; } public static function CountFlights($icao) { //Number of flights total $query = "SELECT COUNT(pirepid) as count FROM ".TABLE_PREFIX."pireps WHERE arricao = '".$icao."' OR depicao = '".$icao."'"; $results = DB::get_row($query); return $results->count; } public static function CountFlightsFrom($icao) { //Number of flights departing $query = "SELECT COUNT(pirepid) as count FROM ".TABLE_PREFIX."pireps WHERE depicao = '".$icao."'"; $results = DB::get_row($query); return $results->count; } public static function CountFlightsTo($icao) { //Number of flights arriving $query = "SELECT COUNT(pirepid) as count FROM ".TABLE_PREFIX."pireps WHERE arricao = '".$icao."'"; $results = DB::get_row($query); return $results->count; } public static function FlightsDetails($icao, $limit=10) { //Details of latest (10) flights $query = "SELECT * FROM ".TABLE_PREFIX."pireps WHERE depicao = '".$icao."' OR arricao = '".$icao."' ORDER BY submitdate DESC LIMIT ".intval($limit); return DB::get_results($query); } public static function CountRoutes($icao) { //Count schedules $query = "SELECT COUNT(id) as count FROM ".TABLE_PREFIX."schedules WHERE depicao = '".$icao."' OR arricao = '".$icao."'"; $results = DB::get_row($query); return $results->count; } public static function CountRoutesFrom($icao) { //Count schedules departing $query = "SELECT COUNT(id) as count FROM ".TABLE_PREFIX."schedules WHERE depicao = '".$icao."'"; $results = DB::get_row($query); return $results->count; } public static function CountRoutesTo($icao) { //Count schedules arriving $query = "SELECT COUNT(id) as count FROM ".TABLE_PREFIX."schedules WHERE arricao = '".$icao."'"; $results = DB::get_row($query); return $results->count; } public static function TotalMiles($icao) { //Count miles flown $query = "SELECT SUM(distance) as miles FROM ".TABLE_PREFIX."pireps WHERE depicao = '".$icao."' OR arricao = '".$icao."'"; $result = DB::get_row($query); return $result->miles; } public static function TotalMilesFrom($icao) { //Count miles flown departing $query = "SELECT SUM(distance) as miles FROM ".TABLE_PREFIX."pireps WHERE depicao = '".$icao."'"; $result = DB::get_row($query); return $result->miles; } public static function TotalMilesTo($icao) { //Count miles flown arriving $query = "SELECT SUM(distance) as miles FROM ".TABLE_PREFIX."pireps WHERE arricao = '".$icao."'"; $result = DB::get_row($query); return $result->miles; } public static function TotalHours($icao) { //Count total hours $query = "SELECT SUM(flighttime) as hours FROM ".TABLE_PREFIX."pireps WHERE depicao = '".$icao."' OR arricao = '".$icao."'"; $result = DB::get_row($query); return $result->hours; } public static function TotalHoursFrom($icao) { //Count total hours departing $query = "SELECT SUM(flighttime) as hours FROM ".TABLE_PREFIX."pireps WHERE depicao = '".$icao."'"; $result = DB::get_row($query); return $result->hours; } public static function TotalHoursTo($icao) { //Count total hours arriving $query = "SELECT SUM(flighttime) as hours FROM ".TABLE_PREFIX."pireps WHERE arricao = '".$icao."'"; $result = DB::get_row($query); return $result->hours; } public static function TotalFuelUsed($icao) { //Count total fuel used arriving $query = "SELECT SUM(fuelused) as fuel FROM ".TABLE_PREFIX."pireps WHERE arricao = '".$icao."'"; $result = DB::get_row($query); return $result->fuel; } } ?>
TPL
<td>Numero Voli in Arrivo</td> <td><?php echo HubStats::CountFlightsTo('LIMF'); ?></td> </tr>
-
Yes i have update also that file
-
Hello,
i have a problem ...
if i try in local (127.0.0.1) <?php echo HubStats::CountFlightsTo('LIRA'); ?> work great
On line don't work
All the others stats works, only CountFlightsTo not work online
Do yuo have a solution please?
Thanks
-
-
Hello to all,
My host requires me to upgrade to a higher version of php 5.2.17
If I select the 5.3.28 I can not log-in to the site.
Can anyone help me?
My code:
<h3>Autenticazione</h3> <?php /* Quick example of how to see if they're logged in or not Only show this login form if they're logged in */ if(Auth::LoggedIn() == false) { ?> <form name="loginform" action="<?php echo url('/login'); ?>" method="post"> <p> <input type="text" onclick="this.value='';" onblur="this.value=!this.value?'Email':this.value;" name="email" value="Email/Callsign VARXXX" id="email" size="24" /> </p> <p> <input type="password" onclick="this.value='';" onblur="this.value=!this.value?'Password':this.value;" name="password" id="password" value="Password" size="24" /> <input type="hidden" name="redir" value="index.php/profile" /> <input type="hidden" name="action" value="login" /> </p> <p> </p> Ricordami? <input type="checkbox" name="remember" /> <br> <br> <button type="submit" id="">Login</button> <br> <br> <a href="<?php echo url('Login/forgotpassword'); ?>">Ho dimenticato la password</a> </form> <p> <?php }
-
Thanks Very much !!!!!!
-
nothing is the same
-
Nothing, Warning: Invalid argument supplied for foreach() in /web/htdocs/www.virtualiroma.it/home/newvar/core/templates/tour/tour_schedules_sog.tpl on line 16
-
The Function in my TOUR Module:
public function get_schedules_sog() { $this->set('schedules', TourData::get_sog_schedules()); $this->show('tour/tour_schedules_sog.tpl'); }
The Query in my TourData.Class
public function get_sog_schedules() { $query = "SELECT * FROM ".TABLE_PREFIX."schedules WHERE flightnum >= '00001' and flightnum <= '00003' "; return DB::get_results($query); }
my tour_schedules_sog.tpl
<h3>Addestramento / Trasferimento</h3> <table width="750" class="tablevar"> <tr> <td>Volo N</td> <td>Dep.Air</td> <td>Arr.Air</td> <td>Dep.Time</td> <td>Arr.Time</td> <td>Aereo</td> <td>Dist</td> <td>Route</td> </tr> <?php $schedules=DB::get_results($query); foreach ($schedules as $ist) ?> <th><?php echo $ist->flightnum ?></th> <th><?php echo $ist->depicao ?></th> <th><?php echo $ist->arricao ?></th> <th><?php echo $ist->deptime ?></th> <th><?php echo $ist->arrtime ?></th> <th><?php echo $ist->aircraft ?></th> <th><?php echo $ist->distance ?></th> <th><?php echo $ist->route_details ?></th> </table>
with:
WHERE flightnum >= '00001' and flightnum <= '00003' ";
i have an error in foreach,
if i change in the query:
WHERE flightnum >= '00001' and flightnum <= '00003' "; in WHERE flightnum >= 'SOG00001' and flightnum <= 'SOG00003' ";
I see all 1 record, the SOG00003
-
I have create a TourData.class.php file in my common folder and i have include the select function but don't work.
I cry
-
<h3>Addestramento / Trasferimento</h3> <p>Con questa attivita' il pilota effettua: <br /> <br /> Addestramento nelle aree previste o da portaerei per carrier qualification (VOAT) <br /> <br /> Il trasferimento da un aeroporto militare ad un'altro, da portaerei a aereoporto militare e viceversa(VOAT O IOAT). <br /> <br /> AEREI: F-14, F-15, F-16, F-18, EUROFIGHTER, AV-8B (HARRIER), TORNADO, GRUMMAN A6 INTRUDER, AIRBUS A319, ATR 72, P180. <br /> <br /> ELI: A109, B212, B412, CH47, SH3D, MH53, SH60, EH101. <br /> </p> <br /> <table width="750" class="tablevar" id="tabledlist"> <tr> <td>Volo N</td> <td>Dep.Air</td> <td>Arr.Air</td> <td>Dep.Time</td> <td>Arr.Time</td> <td>Aereo</td> <td>Dist</td> <td>Day</td> <td>Route</td> <td>Note</td> <td>Options</td> </tr> <?php $query="SELECT * FROM phpvms_schedules WHERE flightnum >= '00001' and flightnum <= '00003' "; $list=DB::get_results($query); foreach ($list as $ist) ?> <th><?php echo $ist->flightnum ?></th> <th><?php echo $ist->depicao ?></th> <th><?php echo $ist->arricao ?></th> <th><?php echo $ist->deptime ?></th> <th><?php echo $ist->arrtime ?></th> <th><?php echo $ist->aircraft ?></th> <th><?php echo $ist->distance ?></th> <th><?php echo Util::GetDaysCompact($ist->daysofweek); ?> <th><?php echo $ist->route_details ?></th> <th><?php echo $ist->notes ?></th> <th nowrap> <a href="<?php echo url('/schedules/details/'.$ist->id);?>">View Details</a><br /> <a href="<?php echo url('/schedules/brief/'.$ist->id);?>">Pilot Brief</a><br /> <?php # Don't allow overlapping bids and a bid exists if(Config::Get('DISABLE_SCHED_ON_BID') == true && $ist->bidid != 0) { ?> <a id="<?php echo $ist->id; ?>" class="addbid" href="<?php echo actionurl('/schedules/addbid');?>">Add to Bid</a> <?php } else { if(Auth::LoggedIn()) { ?> <a id="<?php echo $ist->id; ?>" class="addbid" href="<?php echo url('/schedules/addbid');?>">Add to Bid</a> <?php } } ?> </th> </table> <br />
-
I check the 0, are 0000 (4)
Warning: Invalid argument supplied for foreach() in/web/htdocs/www.virtualiroma.it/home/newvar/core/templates/tour/tour_index_sog.tpl on line 38
http://www.virtualiroma.it/newvar/index.php/Tour/get_tours_sog?
-
Hi Vangeis,
I try but don't work
WHERE flightnum => 'SOG00001' and flightnum <= 'SOG00003' ";
or
WHERE flightnum => 00001 and flightnum <= 00003 ";
in no way works
<table width="750" class="tablevar" id="tabledlist"> <tr> <td>Volo N</td> <td>Dep.Air</td> <td>Arr.Air</td> <td>Dep.Time</td> <td>Arr.Time</td> <td>Aereo</td> <td>Dist</td> <td>Day</td> <td>Route</td> <td>Note</td> <td>Options</td> </tr> <?php $query="SELECT * FROM phpvms_schedules WHERE flightnum => 00001 and flightnum <= 00003 "; $list=DB::get_results($query); foreach ( $list as $ist) ?> <th><?php echo $ist->flightnum ?></th> <th><?php echo $ist->depicao ?></th> <th><?php echo $ist->arricao ?></th> <th><?php echo $ist->deptime ?></th> <th><?php echo $ist->arrtime ?></th> <th><?php echo $ist->aircraft ?></th> <th><?php echo $ist->distance ?></th> <th><?php echo Util::GetDaysCompact($ist->daysofweek); ?> <th><?php echo $ist->route_details ?></th> <th><?php echo $ist->notes ?></th> <th nowrap> <a href="<?php echo url('/schedules/details/'.$ist->id);?>">View Details</a><br /> <a href="<?php echo url('/schedules/brief/'.$ist->id);?>">Pilot Brief</a><br /> <?php # Don't allow overlapping bids and a bid exists if(Config::Get('DISABLE_SCHED_ON_BID') == true && $ist->bidid != 0) { ?> <a id="<?php echo $ist->id; ?>" class="addbid" href="<?php echo actionurl('/schedules/addbid');?>">Add to Bid</a> <?php } else { if(Auth::LoggedIn()) { ?> <a id="<?php echo $ist->id; ?>" class="addbid" href="<?php echo url('/schedules/addbid');?>">Add to Bid</a> <?php } } ?> </th> </table> <br />
-
Hello Guys,
I have a question to ask yourself.
I have these schedules
Flight number
TOU001
TOU002
SOG001
SOG002
SOG003
SOG004
SOG005
I need to extract from the schedule with a query flights between flighnumber SOG001 and SOG003
I try with that query:
<?php $query="SELECT * FROM phpvms_schedules WHERE flightnum BETWEEN 'SOG00001' And 'SOG00005'"; $list=DB::get_results($query); foreach ( $list as $ist) ?>
With this query i show only a result.
Can you tell me how to see all flighnumber between SOG0001 and SOG0005?
-
working great !!!!!!!!!!!!
Thanks Vangelis !!!!
-
Hi Vangelis, don't work.
I put this code in profile_main.tpl
<?php MainController::Run('vAwards', 'showPilotIssuedAwards', $userinfo->pilotid); ?>
I use the freeware module Vawards from Vansers
-
thanks Vangelis, but don't work.
Where i put your code?
My original code is:
<?php if(!$allawardtpes) { echo 'Non sono disponibili Spille!'; return; } foreach($allawardtpes as $type) { ?> <h3><?php echo $type->typ_name;?></h3> <p> <?php $allissuedawards = vAwardsData::GetAllIssuedAward($pilotid, $type->typ_id); if(!$allissuedawards) { echo 'Nessuna Spilla Assegnata'; $allissuedawards = array(); } foreach($allissuedawards as $award) { ?> <?php if(!empty($award->awd_image)) { ?> <br /> <table> <th><img src="<?php echo $award->awd_image;?>" /><th> <th><?php echo $award->awd_name;?></th> </table> <?php } else { ?> Immagine Spilla non disponibile <?php } ?> </p> <?php } ?> <?php } ?>
-
please read the first my post
-
Thanks Servetas but for use the float function?
-
Hi Scott,
yes work.
All image are in the center of the page.
TOPPilot beta 1.0
in Simpilot Group Addons
Posted
Is possible to create a graph with the toppilots result?