Jump to content

Tameem

Members
  • Posts

    47
  • Joined

  • Last visited

Everything posted by Tameem

  1. This code <?php echo TopPilotData::top_pilot_hours($month, $year, 5) ; ?> is not pulling any records
  2. OK first thank you. i used this code <?php $month = date("m"); $year = date("Y"); $pilot= TopPilotData::top_pilot_hours($month, $year, 1) ; foreach ($pilot as $top) { echo '<tr>'; echo '<td>'.$top->hours.'</td>'; echo '</tr>'; } ?> but it turns to PHP Error Message warning: invalid argument supplied for foreach() in frontpage_main.tpl
  3. Hi, I need a help ASAP please. how can i display the top 5 pilots on the front page using simpilot addon. i used this code <?php echo TopPilotData::top_pilot_hours($month, $year, 5) ; ?> but it didn't worked!!
  4. I didn't get it please explain
  5. Yes i know actually I'm a php pro but the problem is the code is not showing any thing unless it is not working
  6. Sorry but that didn't work also
  7. <p>Hi.<br /> I want to know how to display top pilots hour in the front page.<br /> i ued this code <br /> <?php echo TopPilotData::top_pilot_hours($month, $year, 5) ; ?><br /> but it displays nothing. please help.</p>
  8. Hi there. now i'm working on the rjva but i want to know how to make this table. And thank u
  9. like also the navbar's position is different in frontpage but the same in the others
  10. like if u changed frontpage.tpl it will just edit the frontpage but if i edited layout.tpl it will edit all other pages and the frontpage too so i want a way to change the full frontpage separately and the others also separately together
  11. As u can see here http://rj-va.uphero.com/2.png http://rj-va.uphero.com/3.png this is the frontpage. but in the other pages it turns like this http://rj-va.uphero.com/1.png so i want a way that can make 2 kinds of layout one for the front page and one for the others
  12. Hi there. I have a new design that contain a frontpage that is different in the component and the other pages are the same but not like the frontpage so I think that I must have multi layout file plz help Tameem melhem Technical support a royal jordania virtual airlines
  13. just solved <html> <head> <meta http-equiv="refresh" content="600"> <title>...</title> <style type="text/css"> .bg { width:300px; background:#333; border:1px solid #999; border-radius:10px; margin-left:auto; margin-right:auto; } </style> </head> <body> <?php $lng['trafficingb'] = 'Pilots'; $lng['notrafficingb'] = 'There is no traffic in the Jordanian Airspace.'; $weekdays = array( 1 => 'Monday', 2 => 'Tuesday', 3 => 'Wednesday', 4 => 'Thursday', 5 => 'Friday', 6 => 'Saturday', 0 => 'Sunday' ); // Put here 2 first letter of airport ICAO codes $countryicao = 'SB'; // Put here country code of staff members $staffcountry = 'br'; $airports = array( 'OXXX' => 'Example Area Sector', 'OXXX' => 'Example Airport', ); $validcontrollers = array('DEL','GND','TWR','DEP','APP','CTR','FSS'); $service = array( 'DEL' => 'Delivery', 'GND' => 'Ground', 'TWR' => 'Tower', 'APP' => 'Radar', 'DEP' => 'APP / Radar', 'CTR' => 'Sector', 'FSS' => '', ); $ctrlevel = array( 1 => 'OBS', 2 => 'AS1', 3 => 'AS2', 4 => 'AS3', 5 => 'ADC', 6 => 'APC', 7 => 'ACC', 8 => '<span class="green">SEC</span>', 9 => '<span class="green">SAI</span>', 10 => '<span class="green">CAI</span>', 11 => '<span class="red">SUP</span>', 12 => '<span class="red">ADM</span>' ); /* END OF CONFIGURATION */ //http://www.ivao.aero/whazzup/status.txt //http://dataservice.gatools.org/data/ivao.txt // DOWNLOAD ONLINE-LISTAUS //--------------------------------------------------------------------------------------------------------- $filecontents = file_get_contents('https://api.ivao.aero/getdata/whazzup'); //$filecontents = file_get_contents('whazzup.txt'); //Testing file $rows = split("\n", $filecontents); $filepart = ''; $pilots = array(); $pilotcount = 0; $controllers = array(); $staff = array(); $controllercount = 0; $generaldata = array(); $rating = $pilot[41]; foreach ($rows as $row) { if (substr($row,0,1) == '!') { $filepart = substr($row,1); } else { switch ($filepart) { case 'CLIENTS': $fields = split(":", $row); if ($fields[3] == 'ATC') { $controllercount++; if (in_array(substr($fields[0],-3), $validcontrollers) && substr($fields[0],0,strlen($countryicao)) == $countryicao) { array_push($controllers, $fields); } if (substr($fields[0],0,3) == $staffcountry . '-') { array_push($staff, $fields); } } else { $pilotcount++; if (substr($fields[11],0,strlen($countryicao)) == $countryicao OR substr($fields[13],0,strlen($countryicao)) == $countryicao) { $countrypcount++; //if ($countrypcount <= 20) { array_push($pilots, $fields); //} } } break; case 'GENERAL': list($key, $value) = split('=', $row); $generaldata[trim($key)] = trim($value); break; } } } // ATC //-------------------------------------------------------------------------------------------------------------------// // Check there is ATC online then show count //echo '<h3 align="left">' . $lng['atcingb'] ; //if(count($controllers) != 0) echo ' ('.count($controllers).')'; //echo '</h3>'; //echo "<img src= "<?php echo $rating ""; if (count($pilots) != 0) { echo '' . $lng['trafficingb'].' ('.count($pilots).')<div class="bg"><table class="trafficlisttable">'; foreach ($pilots as $pilot) { $realname = $pilot[2]; if (substr($realname,-5,1) == ' ') { $realname = substr($realname,0,-5); } ; echo '<tr align="left"><td><img src="'. $pilot[41] .'.gif" width="105" height="30" /></td> <td width="75"><a href="flighttrack.php?cs=' . $pilot[0] . '" onclick="MM_openBrWindow(\'flighttrack.php?cs=' . $pilot[0] . '\',\'\',\'scrollbars=no,resizable=yes,width=430,height=525\');return false" target="_blank">' . $pilot[0] . '</a></td><td width="33">' . $pilot[11] . '</td> <td width="40">> ' . $pilot[13] . '</td></tr>'; } echo '</table></div>'; } else { echo '<h3 align="left">' . $lng['trafficingb'].' </h3><p style="margin-bottom: 20px; color: #999;"><i>' .$lng['notrafficingb'] . '</i></p>'; } ?> </body> </html>
  14. Ok look i have this one <html> <head> <meta http-equiv="refresh" content="600"> <title>...</title> <style type="text/css"> .bg { width:300px; background:#333; border:1px solid #999; border-radius:10px; margin-left:auto; margin-right:auto; } </style> </head> <body> <?php $lng['trafficingb'] = 'Pilots'; $lng['notrafficingb'] = 'There is no traffic in the Jordanian Airspace.'; $weekdays = array( 1 => 'Monday', 2 => 'Tuesday', 3 => 'Wednesday', 4 => 'Thursday', 5 => 'Friday', 6 => 'Saturday', 0 => 'Sunday' ); // Put here 2 first letter of airport ICAO codes $countryicao = 'SB'; // Put here country code of staff members $staffcountry = 'br'; $airports = array( 'OXXX' => 'Example Area Sector', 'OXXX' => 'Example Airport', ); $validcontrollers = array('DEL','GND','TWR','DEP','APP','CTR','FSS'); $service = array( 'DEL' => 'Delivery', 'GND' => 'Ground', 'TWR' => 'Tower', 'APP' => 'Radar', 'DEP' => 'APP / Radar', 'CTR' => 'Sector', 'FSS' => '', ); $ctrlevel = array( 1 => 'OBS', 2 => 'AS1', 3 => 'AS2', 4 => 'AS3', 5 => 'ADC', 6 => 'APC', 7 => 'ACC', 8 => '<span class="green">SEC</span>', 9 => '<span class="green">SAI</span>', 10 => '<span class="green">CAI</span>', 11 => '<span class="red">SUP</span>', 12 => '<span class="red">ADM</span>' ); /* END OF CONFIGURATION */ //http://www.ivao.aero/whazzup/status.txt //http://dataservice.gatools.org/data/ivao.txt // DOWNLOAD ONLINE-LISTAUS //--------------------------------------------------------------------------------------------------------- $filecontents = file_get_contents('https://api.ivao.aero/getdata/whazzup'); //$filecontents = file_get_contents('whazzup.txt'); //Testing file $rows = split("\n", $filecontents); $filepart = ''; $pilots = array(); $pilotcount = 0; $controllers = array(); $staff = array(); $controllercount = 0; $generaldata = array(); $rating = $pilot[41]; foreach ($rows as $row) { if (substr($row,0,1) == '!') { $filepart = substr($row,1); } else { switch ($filepart) { case 'CLIENTS': $fields = split(":", $row); if ($fields[3] == 'ATC') { $controllercount++; if (in_array(substr($fields[0],-3), $validcontrollers) && substr($fields[0],0,strlen($countryicao)) == $countryicao) { array_push($controllers, $fields); } if (substr($fields[0],0,3) == $staffcountry . '-') { array_push($staff, $fields); } } else { $pilotcount++; if (substr($fields[11],0,strlen($countryicao)) == $countryicao OR substr($fields[13],0,strlen($countryicao)) == $countryicao) { $countrypcount++; //if ($countrypcount <= 20) { array_push($pilots, $fields); //} } } break; case 'GENERAL': list($key, $value) = split('=', $row); $generaldata[trim($key)] = trim($value); break; } } } // ATC //-------------------------------------------------------------------------------------------------------------------// // Check there is ATC online then show count //echo '<h3 align="left">' . $lng['atcingb'] ; //if(count($controllers) != 0) echo ' ('.count($controllers).')'; //echo '</h3>'; //echo "<img src= "<?php echo $rating ""; if (count($pilots) != 0) { echo '' . $lng['trafficingb'].' ('.count($pilots).')<div class="bg"><table class="trafficlisttable">'; foreach ($pilots as $pilot) { $realname = $pilot[2]; if (substr($realname,-5,1) == ' ') { $realname = substr($realname,0,-5); } ; echo '<tr align="left"><td><img src="<? echo $rating ?>.gif" width="105" height="30" /></td> <td width="75"><a href="flighttrack.php?cs=' . $pilot[0] . '" onclick="MM_openBrWindow(\'flighttrack.php?cs=' . $pilot[0] . '\',\'\',\'scrollbars=no,resizable=yes,width=430,height=525\');return false" target="_blank">' . $pilot[0] . '</a></td><td width="33">' . $pilot[11] . '</td> <td width="40">> ' . $pilot[13] . '</td></tr>'; } echo '</table></div>'; } else { echo '<h3 align="left">' . $lng['trafficingb'].' </h3><p style="margin-bottom: 20px; color: #999;"><i>' .$lng['notrafficingb'] . '</i></p>'; } ?> </body> </html> and i did store the ivao ratings img in my root dir. but it keeping give me this : http://rj-va.uphero.com/pilot.png i think that the problem is here <img src="<? echo $rating ?>.gif" width="105" height="30" /> it's not storing the $rating = $pilot[41]; and posting to the img src
  15. I did edit from this $rating = array(); To $rating = $pilot[41];
  16. Hi there. I'm the technical support staff from royal jordanian airlines which we are working on. I want to make an online box like this: http://rj-va.uphero.com/box.png. now i used this code <html> <head> <title>...</title> <style type="text/css"> .bg { width:300px; background:#333; border:1px solid #999; border-radius:10px; margin-left:auto; margin-right:auto; } </style> </head> <body> <?php $lng['trafficingb'] = 'Pilots'; $lng['notrafficingb'] = 'There is no traffic in the Jordanian Airspace.'; $weekdays = array( 1 => 'Monday', 2 => 'Tuesday', 3 => 'Wednesday', 4 => 'Thursday', 5 => 'Friday', 6 => 'Saturday', 0 => 'Sunday' ); // Put here 2 first letter of airport ICAO codes $countryicao = 'SB'; // Put here country code of staff members $staffcountry = 'br'; $airports = array( 'OXXX' => 'Example Area Sector', 'OXXX' => 'Example Airport', ); $validcontrollers = array('DEL','GND','TWR','DEP','APP','CTR','FSS'); $service = array( 'DEL' => 'Delivery', 'GND' => 'Ground', 'TWR' => 'Tower', 'APP' => 'Radar', 'DEP' => 'APP / Radar', 'CTR' => 'Sector', 'FSS' => '', ); $ctrlevel = array( 1 => 'OBS', 2 => 'AS1', 3 => 'AS2', 4 => 'AS3', 5 => 'ADC', 6 => 'APC', 7 => 'ACC', 8 => '<span class="green">SEC</span>', 9 => '<span class="green">SAI</span>', 10 => '<span class="green">CAI</span>', 11 => '<span class="red">SUP</span>', 12 => '<span class="red">ADM</span>' ); /* END OF CONFIGURATION */ //http://www.ivao.aero/whazzup/status.txt //http://dataservice.gatools.org/data/ivao.txt // DOWNLOAD ONLINE-LISTAUS //--------------------------------------------------------------------------------------------------------- $filecontents = file_get_contents('https://api.ivao.aero/getdata/whazzup'); //$filecontents = file_get_contents('whazzup.txt'); //Testing file $rows = split("\n", $filecontents); $filepart = ''; $pilots = array(); $pilotcount = 0; $controllers = array(); $staff = array(); $controllercount = 0; $generaldata = array(); $rating = array(); foreach ($rows as $row) { if (substr($row,0,1) == '!') { $filepart = substr($row,1); } else { switch ($filepart) { case 'CLIENTS': $fields = split(":", $row); if ($fields[3] == 'ATC') { $controllercount++; if (in_array(substr($fields[0],-3), $validcontrollers) && substr($fields[0],0,strlen($countryicao)) == $countryicao) { array_push($controllers, $fields); } if (substr($fields[0],0,3) == $staffcountry . '-') { array_push($staff, $fields); } } else { $pilotcount++; if (substr($fields[11],0,strlen($countryicao)) == $countryicao OR substr($fields[13],0,strlen($countryicao)) == $countryicao) { $countrypcount++; //if ($countrypcount <= 20) { array_push($pilots, $fields); //} } } break; case 'GENERAL': list($key, $value) = split('=', $row); $generaldata[trim($key)] = trim($value); break; } } } // ATC //-------------------------------------------------------------------------------------------------------------------// // Check there is ATC online then show count //echo '<h3 align="left">' . $lng['atcingb'] ; //if(count($controllers) != 0) echo ' ('.count($controllers).')'; //echo '</h3>'; // if (count($pilots) != 0) { echo '' . $lng['trafficingb'].' ('.count($pilots).')<div class="bg"><table class="trafficlisttable">'; foreach ($pilots as $pilot) { $realname = $pilot[2]; if (substr($realname,-5,1) == ' ') { $realname = substr($realname,0,-5); } ; echo '<tr align="left"><td>Rating Img</td> <td width="75"><a href="flighttrack.php?cs=' . $pilot[0] . '" onclick="MM_openBrWindow(\'flighttrack.php?cs=' . $pilot[0] . '\',\'\',\'scrollbars=no,resizable=yes,width=430,height=525\');return false" target="_blank">' . $pilot[0] . '</a></td><td width="33">' . $pilot[11] . '</td> <td width="40">> ' . $pilot[13] . '</td></tr>'; } echo '</table></div>'; } else { echo '<h3 align="left">' . $lng['trafficingb'].' </h3><p style="margin-bottom: 20px; color: #999;"><i>' .$lng['notrafficingb'] . '</i></p>'; } ?> </body> </html> but when i add this code <img src="http://www.ivao.aero/data/images/ratings/pilot/<? echo $rating ?>.gif" width="105" height="30" /> - <?php if ($rating == 1 ) echo "OBS - Observer"; elseif ($rating == 2 ) echo "Basic Flight Student (FS1)"; elseif ($rating == 3 ) echo "Flight Student (FS2)"; elseif ($rating == 4 ) echo "Advanced Flight Student (FS3)"; elseif ($rating == 5 ) echo "Private Pilot (PP)"; elseif ($rating == 6 ) echo "Senior Private Pilot (SPP)"; elseif ($rating == 7 ) echo "Commercial Pilot (CP)"; elseif ($rating == 8 ) echo "Airline Transport Pilot (ATP)"; elseif ($rating == 9 ) echo "Senior Flight Instructor (SFI)"; elseif ($rating == 10 ) echo "Chief Flight Instructor (CFI)"; elseif ($rating == 11 ) echo "Supervisor (SUP)"; elseif ($rating == 12 ) echo "Administrator (ADM)"; ?> it turns into error 400 bad request. so i want to add for this one :http://rj-va.uphero.com/new.png the rating imgs.
×
×
  • Create New...