示例#1
0
'><?php 
                echo $item->name;
                ?>
</a>&nbsp;</div>
			<?php 
            } else {
                ?>
				<div id="value" style="overflow: hidden; white-space: pre-wrap;">&nbsp;<?php 
                echo $item->name;
                ?>
&nbsp;</div>
			<?php 
            }
            ?>
			<div id="value-right" style="white-space: nowrap;">&nbsp;<?php 
            echo TrackerHelper::make_size($item->size);
            ?>
&nbsp;</div>
			<div id="value-center">&nbsp;<?php 
            echo date('Y.m.d', strtotime($item->created_time));
            ?>
&nbsp;</div>
			<div id="value-center">&nbsp;<?php 
            echo $item->seeders;
            ?>
&nbsp;</div>
			<div id="value-center">&nbsp;<?php 
            echo $item->leechers;
            ?>
&nbsp;</div>
			<div id="value-center">&nbsp;<?php 
示例#2
0
 echo '<div id="value-center"><b>&nbsp;' . JText::_('COM_TRACKER_STATS_CREATED_TIME') . '&nbsp;</b></div>';
 echo '<div id="value-center"><b>&nbsp;' . JText::_('COM_TRACKER_TORRENT_SEEDERS_SMALL') . '&nbsp;</b></div>';
 echo '<div id="value-center"><b>&nbsp;' . JText::_('COM_TRACKER_TORRENT_LEECHERS_SMALL') . '&nbsp;</b></div>';
 echo '<div id="value-center"><b>&nbsp;' . JText::_('COM_TRACKER_TORRENT_COMPLETED_SMALL') . '&nbsp;</b></div>';
 echo '<div id="value-center"><b>&nbsp;' . JText::_('JCATEGORY') . '&nbsp;</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;">&nbsp;';
     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 '&nbsp;</div>';
     echo '<div id="value-right">&nbsp;' . TrackerHelper::make_size($worst_completed_torrents->size) . '&nbsp;</div>';
     echo '<div id="value-center">&nbsp;' . date('Y.m.d', strtotime($worst_completed_torrents->created_time)) . '&nbsp;</div>';
     echo '<div id="value-center">&nbsp;' . $worst_completed_torrents->seeders . '&nbsp;</div>';
     echo '<div id="value-center">&nbsp;' . $worst_completed_torrents->leechers . '&nbsp;</div>';
     echo '<div id="value-center">&nbsp;' . $worst_completed_torrents->completed . '&nbsp;</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">&nbsp;';
     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 '&nbsp;</div>';
     echo '</div>';
示例#3
0
        echo "user_hitrun{$k}";
        ?>
">
				<td width="75%"><a href='<?php 
        echo JRoute::_("index.php?option=com_tracker&view=torrent&amp;id=" . $this->item_hitrun->fid);
        ?>
'><?php 
        echo htmlspecialchars(str_replace("_", " ", $this->item_hitrun->name));
        ?>
</a></td>
				<td width="5%" nowrap align="right">&nbsp;<?php 
        echo TrackerHelper::make_size($this->item_hitrun->uploaded);
        ?>
&nbsp;</td>
				<td width="5%" nowrap align="right">&nbsp;<?php 
        echo TrackerHelper::make_size($this->item_hitrun->downloaded);
        ?>
&nbsp;</td>
				<td width="5%" nowrap align="right">&nbsp;<?php 
        echo $this->item_hitrun->completed;
        ?>
&nbsp;</td>
				<td width="5%" nowrap align="right">&nbsp;<?php 
        echo $this->item_hitrun->seeders;
        ?>
&nbsp;</td>
				<td width="5%" nowrap align="right">&nbsp;<?php 
        echo $this->item_hitrun->leechers;
        ?>
&nbsp;</td>
			</tr>
示例#4
0
 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;
 }
示例#5
0
					<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>
示例#6
0
        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>
示例#7
0
				<?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 
示例#8
0
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 {
示例#9
0
 }
 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">&nbsp;' . $item->description . '&nbsp;</div>';
 }
 if ($params->get('size_field')) {
     $items .= '<div id="value-right">&nbsp;' . TrackerHelper::make_size($item->size) . '&nbsp;</div>';
 }
 if ($params->get('created_time_field')) {
     $items .= '<div id="value-right">&nbsp;' . date('Y.m.d', strtotime($item->created_time)) . '&nbsp;</div>';
 }
 if ($params->get('leechers_field')) {
     $items .= '<div id="value-center">&nbsp;' . $item->leechers . '&nbsp;</div>';
 }
 if ($params->get('seeders_field')) {
     $items .= '<div id="value-center">&nbsp;' . $item->seeders . '&nbsp;</div>';
 }
 if ($params->get('completed_field')) {
     $items .= '<div id="value-center">&nbsp;' . $item->completed . '&nbsp;</div>';
 }
 if ($params->get('number_files_field')) {
     $items .= '<div id="value-center">&nbsp;' . $item->number_files . '&nbsp;</div>';