Jump to content

Show top5 touchdown in frontpage_main.tpl


ARV187

Recommended Posts

Hi, Im trying show the top5 landing rating in frontpage_main.tpl but not work (it isn't showing and no error messages) , can anyone help me?

/public_html/core/common/TouchdownStatsData.class.php

public function get_stats_by_cur_month5 () { $query = "SELECT pilotid, code, flightnum, depicao, arricao, aircraft, landingrate, submitdate FROM `".TABLE_PREFIX."pireps` WHERE landingrate < '0' AND MONTH(submitdate)=MONTH(now()) AND YEAR(submitdate)=YEAR(now()) ORDER BY landingrate DESC LIMIT 5"; return DB::get_results($query); }

/public_html/core/modules/TouchdownStats/TouchdownStats.php

public function top_landing_this_month5 () { $this->set('stats', TouchdownStatsData::get_stats_by_cur_month5()); $this->show('public_html/lib/skins/templatemo_254_agency/frontpage_main.tpl'); }

/public_html/lib/skins/templatemo_254_agency/frontpage_main.tpl

<?php MainController::Run('TouchdownStats', 'display_TouchdownStats/top_landing_this_month5'); ?>

 

Thanks!

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...