Jump to content

kkoseoglu

Members
  • Content Count

    13
  • Joined

  • Last visited

Community Reputation

0 Neutral

About kkoseoglu

  • Rank
    Member

Profile Information

  • Gender
    Male
  • Location
    Turkey
  1. Should I change my touchdowns.php ? Regards
  2. Here is my Touchdownstatsdataclass.php : public function tdunic () { $query = "SELECT pirepid, pilotid, code, flightnum, depicao, arricao, aircraft, MAX(landingrate) as landingrate, submitdate FROM `".TABLE_PREFIX."pireps` WHERE landingrate < '0' AND MONTH(submitdate)=MONTH(now()) AND YEAR(submitdate)=YEAR(now()) GROUP BY pilotid ORDER BY landingrate DESC LIMIT 5"; return DB::get_results($query); } Here is my touchdowns.php : <?php $stats = TouchdownStatsData::tdunic(); if ($stats) { ?> <table class="table table-condensed"> <tr> <th>Pilot</th> <th>Aircraft</th> <th>Arrival</th> <th>V/S</th> <th>Date</th> </tr> <?php foreach($stats as $stat) { $pilot = PilotData::getPilotData($stat->pilotid); $aircraft = OperationsData::getAircraftInfo($stat->aircraft); echo '<tr>'; echo '<td>'.$pilot->firstname.'</td>'; echo '<td>'.$aircraft->name.'</td>'; echo '<td>'.$stat->arricao.'</td>'; echo '<td><font color="red">'.$stat->landingrate.' ft/m</font></td>'; echo '<td>'.date('d/m', strtotime($stat->submitdate)).'</td>'; echo '</tr>'; } }else { echo 'No ' . date('F') . ' Flights Recorded'; } ?> </table> Here is my frontpagemain.php : <?php MainController::Run('content', 'pilotlandings', '5'); ?>
  3. I have just noticed something related to this. When data is listed, only name and touchdown is correct. Arr icao and plane are wrong. It takes pilots first flight. For example: Pilots first flights is: Oytun B737-600 VQPR -20 ft/m 04/02 Second one is: Oytun B737-800 KJFK -12 ft/m 06/02 On the list: Oytun B737-600 VQPR -12 ft/m 04/02 The correct one must be Second one on the list but it is not. How can I solve this one?
  4. Hello David, It Works. Thanks A Lot!
  5. Hii, I'm using Monthly Touch Down Rates in my homepage limited by 5. Hovewer, some pilots have really really good T/D rates. For example; Pilot A: -9,-12-15 Pilot B: -23,-26 Pilot C: -30,-34 Pilot D:-40,-41,43 Pilot E:-45,-47 The output automatically shows Pilot A:-9 Pilot A:-12 Pilot A:-15 Pilot B:-23 Pilot B:-26 Now: I would like to show Top 5 pilots top rate.Any pilot's rates should not repeated. I want to show only the best one so more pilots can enter the list . Example: Pilot A:-9 Pilot B:-23 Pilot C:-30 Pilot D:-40 Pilot E:-45 I Mean Top 5 Pilots greatest landing according to that month. How Should I Change the codes? Thanks, Kıvanç
  6. Hello here is my file // Add the comment if its not blank if ($comment != '') { self::addComment($pirepid, $pirepdata['pilotid'], $comment); } # Update the financial information for the PIREP, true to refresh fuel self::PopulatePIREPFinance($pirepid, true); # Do other assorted tasks that are along with a PIREP filing # Update the flown count for that route self::UpdatePIREPFeed(); # Update any pilot's information $pilotinfo = PilotData::getPilotData($pirepdata['pilotid']); $pilotcode = PilotData::getPilotCode($pilotinfo->code, $pilotinfo->pilotid); PilotData::UpdateLastPIREPDate($pilotinfo->pilotid); PirepAcData::search($pirepid); if (Config::Get('EMAIL_SEND_PIREP') === true) { # Send an email to the admin that a PIREP was submitted $sub = "A PIREP has been submitted by {$pilotcode} ({$pirepdata['depicao']} - {$pirepdata['arricao']})"; $message = "A PIREP has been submitted by {$pilotcode} " ."({$pilotinfo->firstname} {$pilotinfo->lastname})\n\n" ."{$pirepdata['code']}{$pirepdata['flightnum']}: {$pirepdata['depicao']} to {$pirepdata['arricao']}\n" ."Aircraft: {$pirepdata['aircraft']}\n" . "Flight Time: {$pirepdata['flighttime']}\n" ."Landing Rate: {$pirepdata['landingrate']}\n"."Filed using: {$pirepdata['source']}\n\n" ."Comment: {$comment}\n\n" ."Click to approve this pirep (admin must be signed in):\n" .adminurl('/pirepadmin/approvepirep/'.$pirepid); $email = Config::Get('EMAIL_NEW_PIREP'); if (empty($email)) { $email = ADMIN_EMAIL; } Util::SendEmail($email, $sub, $message); } /* Add this into the activity feed */ $message = Lang::get('activity.new.pirep'); foreach($pirepdata as $key=>$value) { $message = str_replace('$'.$key, $value, $message); } # Add it to the activity feed ActivityData::addActivity(array( 'pilotid' => $pirepdata['pilotid'], 'type' => ACTIVITY_NEW_PIREP, 'refid' => $pirepid, 'message' => htmlentities($message), )); /* Now send data to vaCentral */ CentralData::send_pirep($pirepid); // Reset this ID back DB::$insert_id = $pirepid; self::$pirepid = $pirepid; return $pirepid; }
  7. Hello Vangelis, I experience the same bid problem. Bids are not deleted. Also, We are using customized kacars. When I put PirepAcData::search($pirepid) as well as yours and when I send my PIREP to the website, the PIREP is sended but we face this error. Do you have any idea? I use Simpilotgroup Extended Version 1.3 . Thanks
  8. Also, I changed all tpl extension files to .php I also edit pirepAutoAccept.php file find and replace all tpl to php. Regards, Kıvanç
  9. Thank you very much. Tested and It is working. Now, Happy Wings Va is using AutoPIREP system. Regards, Kıvanç
  10. I wrote a new sql sentence to get the number $sql = "SELECT * FROM phpvms_fieldvalues WHERE fieldid=2 and pilotid=$pilotid" ; $mobile= $row["value"]; and I solved.
  11. Hello, I suggested http://ourairports.com/data/ datas. It is updated daily. Regards Kıvanç
  12. First, it is not a problem. It is what I cant find any suitable codes. Situation, In our website, when people register, they recieved sms. I put custom fields called "Mobile Number" in admin panel. It takes pilot's mobile number and thanks to sms api system it automatically sends sms. How I do? as you know after registration process fields are sended to core/RegistrationData.class.php In 135. line the customfields data is starting as //Get customs fields $fields = self::getCustomFields(); if(count($fields) > 0) { foreach ($fields as $field) { $value = Vars::POST($field->fieldname); $value = DB::escape($value); if ($value != '') { $sql = "INSERT INTO `".TABLE_PREFIX."fieldvalues` (fieldid, pilotid, value) VALUES ($field->fieldid, $pilotid, '$value')"; DB::query($sql); } } } I found $value as Mobile number. So when I assign new variable like $mobile=$value , it is fine and work. And the api take the $mobile and send SMS. However, I decided that I added one more custom fields which is Vatsim ID. When I do this $value is not working anymore. So, do you have any idea that how can I fetch the mobile number data rather than $value . What I mean $mobile= ???? Any help appreciated. Thanks, Kıvanç www.hapyywings.org
×
×
  • Create New...