break; //=== Member ++ //=== Member ++ case $user['class'] == UC_VIP || $user['class'] == UC_UPLOADER || $user['class'] == UC_MODERATOR || $user['class'] == UC_ADMINISTRATOR || $user['class'] == UC_SYSOP || $user['class'] == UC_CODER: $days = 1.5; break; //=== Member x //=== Member x case $user['class'] == UC_DONOR || $user['class'] >= UC_VIP: $days = 1; break; } $avg_time_ratio = $row_share_ratio['seed_time_total'] / $row_share_ratio['total_number'] / 86400 / $days; $avg_time_seeding = mkprettytime($row_share_ratio['seed_time_total'] / $row_share_ratio['total_number']); if ($user["id"] == $CURUSER["id"] || get_user_class() >= UC_MODERATOR) { echo '<tr><td class=clearalt5 align=right><b>Time Ratio:</b></td><td align=left class=clearalt5>' . ($user['downloaded'] > 0 || $user['uploaded'] > 2147483648 ? '<font color=' . get_ratio_color(number_format($avg_time_ratio, 3)) . '>' . number_format($avg_time_ratio, 3) . '</font> ' . ratio_image_machine(number_format($avg_time_ratio, 3)) . ' [<font color=' . get_ratio_color(number_format($avg_time_ratio, 3)) . '> ' . $avg_time_seeding . '</font> per torrent average ] Ratio based on the assumption that all torrents were NEW. ' : 'inf.') . '</td></tr>'; } //////////////////////////////////////////////////// if (get_user_class() >= UC_MODERATOR) { $resip = sql_query("SELECT ip FROM iplog WHERE userid =" . unsafeChar($id) . " GROUP BY ip") or sqlerr(__FILE__, __LINE__); $iphistory = mysql_num_rows($resip); if ($iphistory > 0) { echo "<tr><td class=rowhead> " . $language['iphist'] . " </td><td align=left> " . $language['iphist1'] . "<b><a href=iphistory.php?id=" . $user['id'] . "> " . safeChar($iphistory) . " " . $language['iphist2'] . "</a></b></td></tr>\n"; } } if ($user["id"] == $CURUSER["id"] || get_user_class() >= UC_MODERATOR) { $bonuslog = explode(" ", $user["bonuscomment"]); $total = 0; for ($i = 0; $i <= count($bonuslog); $i++) { // echo $bonuslog[$i]; if ($bonuslog[$i] == "upload") {
break; //=== Member + //=== Member + case $user['class'] == UC_POWER_USER: $days = 1.5; break; //=== Member ++ //=== Member ++ case $user['class'] == UC_VIP || $user['class'] == UC_UPLOADER || $user['class'] == UC_MODERATOR || $user['class'] == UC_ADMINISTRATOR || $user['class'] == UC_SYSOP: $days = 0.5; break; } $avg_time_ratio = $cache_share_ratio['seed_time_total'] / $cache_share_ratio['total_number'] / 86400 / $days; $avg_time_seeding = mkprettytime($cache_share_ratio['seed_time_total'] / $cache_share_ratio['total_number']); if ($user["id"] == $CURUSER["id"] || $CURUSER['class'] >= UC_STAFF) { $HTMLOUT .= '<tr><td class="clearalt5" align="right"><b>Time Ratio:</b></td><td align="left" class="clearalt5">' . ($user['downloaded'] > 0 || $user['uploaded'] > 2147483648 ? '<font color="' . get_ratio_color(number_format($avg_time_ratio, 3)) . '">' . number_format($avg_time_ratio, 3) . '</font> ' . ratio_image_machine(number_format($avg_time_ratio, 3)) . ' [<font color="' . get_ratio_color(number_format($avg_time_ratio, 3)) . '"> ' . $avg_time_seeding . '</font> per torrent average ] Ratio based on the assumption that all torrents were New. ' : 'inf.') . '</td></tr>'; } $HTMLOUT .= "<tr><td class='rowhead'>{$lang['userdetails_bonus_points']}</td><td align='left'><a class='altlink' href='{$INSTALLER09['baseurl']}/mybonus.php'>" . (int) $user['seedbonus'] . "</a></td></tr>"; if ($user['onirc'] == 'yes') { $ircbonus = !empty($user['irctotal']) ? number_format($user["irctotal"] / $INSTALLER09['autoclean_interval'], 1) : '0.0'; $HTMLOUT .= "<tr><td class='rowhead' valign='top' align='right'>Irc Bonus</td><td align='left'>{$ircbonus}</td></tr>"; $irctotal = !empty($user['irctotal']) ? calctime($user['irctotal']) : $user['username'] . ' has never been on IRC!'; $HTMLOUT .= "<tr><td class='rowhead' valign='top' align='right'>Irc Idle Time</td><td align='left'>{$irctotal}</td></tr>"; } //==Connectable and port shit if ($user['paranoia'] < 1 || $CURUSER['id'] == $id || $CURUSER['class'] >= UC_STAFF) { $port_data = $mc1->get_value('port_data_' . $id); if ($port_data === false) { $q1 = sql_query('SELECT connectable, port,agent FROM peers WHERE userid = ' . $id . ' LIMIT 1') or sqlerr(__FILE__, __LINE__); $port_data = mysql_fetch_row($q1); $mc1->cache_value('port_data_' . $id, $port_data, $INSTALLER09['expires']['port_data']);
$cache_share_ratio['total_number'] = (int) $cache_share_ratio['total_number']; $cache_share_ratio['seed_time_total'] = (int) $cache_share_ratio['seed_time_total']; $mc1->cache_value($What_Cache . $id, $cache_share_ratio, $What_Expire); } //=== get times per class switch (true) { //=== member case $user['class'] == UC_USER: $days = 2; break; //=== Member + //=== Member + case $user['class'] == UC_POWER_USER: $days = 1.5; break; //=== Member ++ //=== Member ++ case $user['class'] == UC_VIP || $user['class'] == UC_UPLOADER || $user['class'] == UC_STAFF || $user['class'] == UC_ADMINISTRATOR || $user['class'] == UC_SYSOP: $days = 0.5; break; } if ($cache_share_ratio['seed_time_total'] > 0 && $cache_share_ratio['total_number'] > 0) { $avg_time_ratio = $cache_share_ratio['seed_time_total'] / $cache_share_ratio['total_number'] / 86400 / $days; $avg_time_seeding = mkprettytime($cache_share_ratio['seed_time_total'] / $cache_share_ratio['total_number']); if ($user["id"] == $CURUSER["id"] || $CURUSER['class'] >= UC_STAFF) { $HTMLOUT .= '<tr><td class="clearalt5" align="right"><b>' . $lang['userdetails_time_ratio'] . '</b></td><td align="left" class="clearalt5">' . ($user_stats['downloaded'] > 0 || $user_stats['uploaded'] > 2147483648 ? '<font color="' . get_ratio_color(number_format($avg_time_ratio, 3)) . '">' . number_format($avg_time_ratio, 3) . '</font> ' . ratio_image_machine(number_format($avg_time_ratio, 3)) . ' [<font color="' . get_ratio_color(number_format($avg_time_ratio, 3)) . '"> ' . $avg_time_seeding . '</font>' . $lang['userdetails_time_ratio_per'] . '' : $lang['userdetails_inf']) . '</td></tr>'; } } //==end // End Class // End File