(Original Author)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
$summary = ''._('statistics_summary_downloads_heading').'
';
$summary .= _('statistics_summary_downloads_total').' ('.sprintf(_('statistics_summary_downloads_total_sincedate'), strftime(_('statistics_date_shortmonthwithyear'), strtotime($addon['Addon']['created']))).'): '.(!empty($stats['totaldownloads']) ? $html->number_format($stats['totaldownloads'], 0) : 0).'
';
$summary .= _('statistics_summary_downloads_lastcount').(!empty($stats['last_downloads_date']) ? ' ('.strftime(_('statistics_date_weekdayshortmonth'), strtotime($stats['last_downloads_date'])).')' : '').': '.(!empty($stats['last_downloads']) ? $html->number_format($stats['last_downloads'], 0) : 0).'
';
$summary .= _('statistics_summary_downloads_average').': '.(!empty($stats['avg_downloads']) ? $html->number_format($stats['avg_downloads'], 0) : 0).'
';
$summary .= _('statistics_summary_downloads_lastweek').': '.(!empty($stats['weeklydownloads']) ? $html->number_format($stats['weeklydownloads'], 0) : 0).'
';
$summary .= ''._('statistics_summary_updatepings_heading').'
';
$summary .= _('statistics_summary_updatepings_total').' (';
if (!empty($stats['last_updatepings_date']))
$summary .= sprintf(_('statistics_summary_updatepings_total_ondate'), strftime(_('statistics_date_weekdayshortmonth'), strtotime($stats['last_updatepings_date'])));
else
$summary .= _('statistics_summary_nodata');
$summary .= '): '.(!empty($stats['last_updatepings']) ? $html->number_format($stats['last_updatepings'], 0) : 0).'
';
$summary .= _('statistics_summary_updatepings_changefromprevious').' (';
if (!empty($stats['previous_updatepings']))
$summary .= sprintf(_('statistics_summary_updatepings_changefromprevious_ondate'), $html->number_format($stats['previous_updatepings'], 0), strftime(_('statistics_date_shortmonth'), strtotime($stats['previous_updatepings_date'])));
else
$summary .= _('statistics_summary_nodata');
$summary .= '): ';
if (!empty($stats['updateping_change'])) {
if ($stats['updateping_change'] > 0)
$summary .= '+';
elseif ($stats['updateping_change'] < 0)
$summary .= '';
else
$summary .= '';
$summary .= round($stats['updateping_change'], 2).'%';
}
else
$summary .= '0';
$summary .= '
';
$summary .= _('statistics_summary_updatepings_average').': '.(!empty($stats['avg_updatepings']) ? $html->number_format($stats['avg_updatepings'], 0) : 0).'
';
$today = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
echo $this->renderElement('rss_listitem', array(
'title' => sprintf(_('statistics_rss_title_statsfordate'), strftime(_('statistics_rss_title_fulldate'))),
'url' => SITE_URL.$html->url('/statistics/addon/'.$addon['Addon']['id']),
'description' => "",
'author' => SITE_NAME,
'pubDate' => $time->toRss($today),
'permalink' => SITE_URL.$html->url('/statistics/addon/'.$addon['Addon']['id']).'/'.date('Ymd', $today)
));
?>