'><?php echo $item->name; ?> </a> </div> <?php } else { ?> <div id="value" style="overflow: hidden; white-space: pre-wrap;"> <?php echo $item->name; ?> </div> <?php } ?> <div id="value-right" style="white-space: nowrap;"> <?php echo TrackerHelper::make_size($item->size); ?> </div> <div id="value-center"> <?php echo date('Y.m.d', strtotime($item->created_time)); ?> </div> <div id="value-center"> <?php echo $item->seeders; ?> </div> <div id="value-center"> <?php echo $item->leechers; ?> </div> <div id="value-center"> <?php
echo '<div id="value-center"><b> ' . JText::_('COM_TRACKER_STATS_CREATED_TIME') . ' </b></div>'; echo '<div id="value-center"><b> ' . JText::_('COM_TRACKER_TORRENT_SEEDERS_SMALL') . ' </b></div>'; echo '<div id="value-center"><b> ' . JText::_('COM_TRACKER_TORRENT_LEECHERS_SMALL') . ' </b></div>'; echo '<div id="value-center"><b> ' . JText::_('COM_TRACKER_TORRENT_COMPLETED_SMALL') . ' </b></div>'; echo '<div id="value-center"><b> ' . JText::_('JCATEGORY') . ' </b></div>'; echo '</div>'; foreach ($tracker_stats->worst_completed_torrents as $worst_completed_torrents) { echo '<div id="row">'; echo '<div id="value" style="overflow: hidden; white-space: pre-wrap;"> '; if (TrackerHelper::user_permissions('download_torrents', $session->get('user')->id, 1)) { echo '<a href="index.php?option=com_tracker&view=torrent&id=' . $worst_completed_torrents->fid . '">' . $worst_completed_torrents->name . '</a>'; } else { echo $worst_completed_torrents->name; } echo ' </div>'; echo '<div id="value-right"> ' . TrackerHelper::make_size($worst_completed_torrents->size) . ' </div>'; echo '<div id="value-center"> ' . date('Y.m.d', strtotime($worst_completed_torrents->created_time)) . ' </div>'; echo '<div id="value-center"> ' . $worst_completed_torrents->seeders . ' </div>'; echo '<div id="value-center"> ' . $worst_completed_torrents->leechers . ' </div>'; echo '<div id="value-center"> ' . $worst_completed_torrents->completed . ' </div>'; //if (empty($tracker_stats->country)) $tracker_stats->country = TrackerHelper::getCountryFlag($params->get('defaultcountry')); $category_params = new JRegistry(); $category_params->loadString($worst_completed_torrents->cat_params); echo '<div id="value-center"> '; if (is_file($_SERVER['DOCUMENT_ROOT'] . DS . JUri::root(true) . $category_params->get('image'))) { echo '<img style="vertical-align:middle;" id="tacatimage' . $worst_completed_torrents->fid . '" alt="' . $worst_completed_torrents->cat_title . '" src="' . JUri::root(true) . DS . $category_params->get('image') . '" width="36" />'; } else { echo $worst_completed_torrents->cat_title; } echo ' </div>'; echo '</div>';
echo "user_hitrun{$k}"; ?> "> <td width="75%"><a href='<?php echo JRoute::_("index.php?option=com_tracker&view=torrent&id=" . $this->item_hitrun->fid); ?> '><?php echo htmlspecialchars(str_replace("_", " ", $this->item_hitrun->name)); ?> </a></td> <td width="5%" nowrap align="right"> <?php echo TrackerHelper::make_size($this->item_hitrun->uploaded); ?> </td> <td width="5%" nowrap align="right"> <?php echo TrackerHelper::make_size($this->item_hitrun->downloaded); ?> </td> <td width="5%" nowrap align="right"> <?php echo $this->item_hitrun->completed; ?> </td> <td width="5%" nowrap align="right"> <?php echo $this->item_hitrun->seeders; ?> </td> <td width="5%" nowrap align="right"> <?php echo $this->item_hitrun->leechers; ?> </td> </tr>
public static function traffic_per_day($traffic, $id) { jimport('joomla.user.user'); JLoader::register('JTableUser', JPATH_PLATFORM . '/joomla/database/table/user.php'); $db = JFactory::getDBO(); $user = JFactory::getUser($id); list($date, $time) = explode(' ', $user->registerDate); list($year, $month, $day) = explode('-', $date); list($hour, $minute, $second) = explode(':', $time); $regdate = mktime($hour, $minute, $second, $month, $day, $year); $regged_days = (time() - $regdate) / 86400; // translate the unixtime that is in seconds to days... if ($regged_days > 0) { $ul_bytes_per_day = TrackerHelper::make_size($traffic / $regged_days); } else { $ul_bytes_per_day = 0; } return $ul_bytes_per_day; }
<label><?php echo JText::_('COM_TRACKER_USER_DONATED'); ?> </label> <input disabled value="<?php echo $this->item->donated ? '$' . $this->item->donated : JText::_('COM_TRACKER_USER_NOTHING_DONATED'); ?> " /> </li> <li> <label><?php echo JText::_('COM_TRACKER_USER_CREDITED'); ?> </label> <input disabled value="<?php echo $this->item->credited ? TrackerHelper::make_size($this->item->credited * 1073741824) : JText::_('COM_TRACKER_USER_NOTHING_CREDITED'); ?> " /> </li> <?php } ?> <li> <?php echo $this->form->getLabel('torrent_pass_version'); ?> <input type="text" name="jform[torrent_pass_version]" id="jform_torrent_pass_version" value="<?php echo $this->item->torrent_pass_version; ?> " class="inputbox" size="5"/> </li>
echo $i; ?> " alt="<?php echo $this->hitrunner->countryname; ?> " src="<?php echo JURI::base() . $this->hitrunner->countryimage; ?> " width="32" /> </td> <td width="10%" nowrap align="right"><?php echo TrackerHelper::make_size($this->hitrunner->downloaded); ?> </td> <td width="10%" nowrap align="right"><?php echo TrackerHelper::make_size($this->hitrunner->uploaded); ?> </td> </tr> <?php $k = 1 - $k; } ?> </table> </div> <?php } ?> </div>
<?php } ?> <td align="right" nowrap><?php echo TrackerHelper::make_size($item->downloaded); ?> </td> <td align="right" nowrap> <?php if ($params->get('enable_donations') && $item->credited > 0) { echo TrackerHelper::make_size($item->uploaded + $item->credited * 1073741824); echo ' - (' . $item->credited . ')'; } else { echo TrackerHelper::make_size($item->uploaded); } ?> </td> <td align="center" nowrap> <?php if ($params->get('enable_donations') && $item->credited > 0) { echo TrackerHelper::make_ratio($item->downloaded, $item->uploaded + $item->credited * 1073741824); } else { echo TrackerHelper::make_ratio($item->downloaded, $item->uploaded); } ?> </td> <?php
if ($params->get('uploaded')) { if ($appParams->get('enable_donations')) { $user_stats->uploaded = $user_stats->uploaded + $user_stats->credited * 1048576; } echo '<div style="margin-bottom: 2px;">'; echo '<div style="float: left;display:inline-block; vertical-align:middle;"><img id="' . $user_stats->uploaded . '" alt="' . $user_stats->uploaded . '" src="' . JURI::base() . $params->get('uploaded_image') . '" width="16px" /></div>'; echo '<div style="margin-left: 2px;float: left;display:inline-block; vertical-align:middle;">' . JText::_('MOD_TRACKER_USER_STATS_UPLOADED_TEXT') . '</div>'; echo '<div style="float: right;display:inline-block; vertical-align:middle;"><span style="color:green">' . TrackerHelper::make_size($user_stats->uploaded) . '</span></div>'; echo '</div>'; echo '<div style="clear: both;"></div>'; } if ($params->get('downloaded')) { echo '<div style="margin-bottom: 2px;">'; echo '<div style="float: left;display:inline-block; vertical-align:middle;"><img id="' . $user_stats->downloaded . '" alt="' . $user_stats->downloaded . '" src="' . JURI::base() . $params->get('downloaded_image') . '" width="16px" /></div>'; echo '<div style="margin-left: 2px;float: left;display:inline-block; vertical-align:middle;">' . JText::_('MOD_TRACKER_USER_STATS_DOWNLOADED_TEXT') . '</div>'; echo '<div style="float: right;display:inline-block; vertical-align:middle;"><span style="color:red">' . TrackerHelper::make_size($user_stats->downloaded) . '</span></div>'; echo '</div>'; echo '<div style="clear: both;"></div>'; } if ($params->get('ratio')) { echo '<div style="margin-bottom: 2px;">'; if (TrackerHelper::make_ratio($user_stats->downloaded, $user_stats->uploaded, 1) >= $user_stats->minimum_ratio) { echo '<div style="float: left;display:inline-block; vertical-align:middle;"><img id="ratio" alt="' . JText::_('MOD_TRACKER_USER_STATS_RATIO_TEXT') . '" src="' . JURI::base() . $params->get('good_ratio_image') . '" width="16px" /></div>'; } else { echo '<div style="float: left;display:inline-block; vertical-align:middle;"><img id="ratio" alt="' . JText::_('MOD_TRACKER_USER_STATS_RATIO_TEXT') . '" src="' . JURI::base() . $params->get('bad_ratio_image') . '" width="16px" /></div>'; } echo '<div style="margin-left: 2px;float: left;display:inline-block; vertical-align:middle;">' . JText::_('MOD_TRACKER_USER_STATS_RATIO_TEXT') . '</div>'; echo '<div style="float: right;display:inline-block; vertical-align:middle;">'; if (TrackerHelper::make_ratio($user_stats->downloaded, $user_stats->uploaded, 1) >= $user_stats->minimum_ratio) { echo '<span style="color:green">'; } else {
} if ($params->get('image_file_field') && !empty($item->image_file)) { $reg_exUrl = "/(http|https|ftp|ftps)\\:\\/\\/[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,3}(\\/\\S*)?/"; // If we have a link in the field if (!preg_match($reg_exUrl, $item->image_file)) { $item->image_file = JURI::base() . 'images/tracker/torrent_image/' . $item->image_file; } $item->image_file = '<a href="' . $item->image_file . '" class="modal" ><img style="width: ' . $params->get('image_file_width') . 'px;margin-top: 2px; margin-bottom: 2px;" src="' . $item->image_file . '" /></a>'; } else { $item->image_file = ''; } if ($params->get('description_field')) { $items .= '<div id="value"> ' . $item->description . ' </div>'; } if ($params->get('size_field')) { $items .= '<div id="value-right"> ' . TrackerHelper::make_size($item->size) . ' </div>'; } if ($params->get('created_time_field')) { $items .= '<div id="value-right"> ' . date('Y.m.d', strtotime($item->created_time)) . ' </div>'; } if ($params->get('leechers_field')) { $items .= '<div id="value-center"> ' . $item->leechers . ' </div>'; } if ($params->get('seeders_field')) { $items .= '<div id="value-center"> ' . $item->seeders . ' </div>'; } if ($params->get('completed_field')) { $items .= '<div id="value-center"> ' . $item->completed . ' </div>'; } if ($params->get('number_files_field')) { $items .= '<div id="value-center"> ' . $item->number_files . ' </div>';