} //==Uploaded/downloaded if ($user['paranoia'] < 2 || $CURUSER['id'] == $id || $CURUSER['class'] >= UC_STAFF) { $days = round((time() - $user['added']) / 86400); $HTMLOUT .= "<tr><td class='rowhead'>{$lang['userdetails_downloaded']}</td><td align='left'>" . mksize($user['downloaded']) . " {$lang['userdetails_daily']}" . ($days > 1 ? mksize($user['downloaded'] / $days) : mksize($user['downloaded'])) . "</td></tr>\r\n <tr><td class='rowhead'>{$lang['userdetails_uploaded']}</td><td align='left'>" . mksize($user['uploaded']) . " {$lang['userdetails_daily']}" . ($days > 1 ? mksize($user['uploaded'] / $days) : mksize($user['uploaded'])) . "</td></tr>\n"; } //=== paranoia settings if ($user['paranoia'] < 2 || $CURUSER['id'] == $id || $CURUSER['class'] >= UC_STAFF) { if ($user['downloaded'] > 0) { $HTMLOUT .= '<tr> <td class="rowhead" style="vertical-align: middle">Share ratio</td> <td align="left" valign="middle" style="padding-top: 1px; padding-bottom: 0px"> <table border="0"cellspacing="0" cellpadding="0"> <tr> <td class="embedded">' . member_ratio($user['uploaded'], $user['downloaded']) . '</td> <td class="embedded"> ' . get_user_ratio_image($user['uploaded'] / $user['downloaded']) . '</td> </tr> </table> </td> </tr>'; } } //=== testing concept of "share ratio" $cache_share_ratio = $mc1->get_value('share_ratio_' . $id); if ($cache_share_ratio === false) { $cache_share_ratio = mysql_fetch_assoc(sql_query("SELECT SUM(seedtime) AS seed_time_total, COUNT(id) AS total_number FROM snatched WHERE seedtime > '0' AND userid =" . $user['id'] . "")); $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('share_ratio_' . $id, $cache_share_ratio, $INSTALLER09['expires']['share_ratio']); } //=== get times per class
<?php //=== share ratio if ($user['paranoia'] < 2 || $CURUSER['id'] == $id || $CURUSER['class'] >= UC_STAFF) { if ($user_stats['downloaded'] > 0) { $HTMLOUT .= '<tr> <td class="rowhead" style="vertical-align: middle">' . $lang['userdetails_share_ratio'] . '</td> <td align="left" valign="middle" style="padding-top: 1px; padding-bottom: 0px"> <table border="0"cellspacing="0" cellpadding="0"> <tr> <td class="embedded">' . member_ratio($user_stats['uploaded'], $INSTALLER09['ratio_free'] ? "0" : $user_stats['downloaded']) . '</td> <td class="embedded"> ' . get_user_ratio_image($user_stats['uploaded'] / ($INSTALLER09['ratio_free'] ? "1" : $user_stats['downloaded'])) . '</td> </tr> </table> </td> </tr>'; } } //==end // End Class // End File
break; case 'postlocked': $post_status = 'postlocked'; break; } $width = 100; $HTMLOUT .= '<tr><td class="' . $class . '" align="left" valign="top" colspan="3"><table border="0" cellspacing="5" cellpadding="10" width="100%"><tr><td class="forum_head" align="left" width="100" valign="middle"> <span style="white-space:nowrap;"><a name="' . $post_id . '"></a> ' . ($CURUSER['class'] >= UC_STAFF ? '<input type="checkbox" name="post_to_mess_with[]" value="' . $post_id . '" />' : '') . ' <a href="javascript:window.alert(\'' . $lang['fe_direct_link_to_this_post'] . ':\\n ' . $INSTALLER09['baseurl'] . '/forums.php?action=view_topic&topic_id=' . $topic_id . '&page=' . $page . '#' . $post_id . '\');"> <img src="' . $INSTALLER09['pic_base_url'] . 'forums/link.gif" alt="' . $lang['fe_direct_link_to_this_post'] . '" title="' . $lang['fe_direct_link_to_this_post'] . '" width="12px" /></a> <span style="font-weight: bold;">' . ($arr['anonymous'] == 'yes' ? '<i>' . $lang['fe_anonymous'] . '</i>' : '' . htmlsafechars($arr['username']) . '') . ' </span> <!-- Mood --> <span class="tool"><a href="javascript:;" onclick="PopUp(\'usermood.php\',\'Mood\',530,500,1,1);"><img src="' . $INSTALLER09['pic_base_url'] . 'smilies/' . $moodpic . '" alt="' . $moodname . '" border="0" /> <span class="tip">' . ($arr['anonymous'] == 'yes' ? '<i>' . $lang['fe_anonymous'] . '</i>' : htmlsafechars($arr['username'])) . ' ' . $moodname . ' !</span></a> </span> ' . ($arr['paranoia'] >= 2 && $CURUSER['class'] < UC_STAFF ? '<img src="' . $INSTALLER09['pic_base_url'] . 'smilies/tinfoilhat.gif" alt="' . $lang['fe_i_wear_a_tinfoil_hat'] . '!" title="' . $lang['fe_i_wear_a_tinfoil_hat'] . '!" />' : get_user_ratio_image($arr['uploaded'], $INSTALLER09['ratio_free'] ? "0" : $arr['downloaded'])) . '</span> </td> <td class="forum_head" align="left" valign="middle"><span style="white-space:nowrap;">' . $post_icon . $post_title . ' ' . $lang['fe_posted_on'] . ': ' . get_date($arr['added'], '') . ' [' . get_date($arr['added'], '', 0, 1) . ']</span></td> <td class="forum_head" align="right" valign="middle"><span style="white-space:nowrap;"> <a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php?action=post_reply&topic_id=' . $topic_id . '&quote_post=' . $post_id . '&key=' . $arr['added'] . '"><img src="' . $INSTALLER09['pic_base_url'] . 'forums/quote.gif" alt="' . $lang['fe_quote'] . '" title="' . $lang['fe_quote'] . '" /> ' . $lang['fe_quote'] . '</a> ' . ($CURUSER['class'] >= UC_STAFF || $CURUSER['id'] == $arr['id'] ? ' <a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php?action=edit_post&post_id=' . $post_id . '&topic_id=' . $topic_id . '&page=' . $page . '"><img src="' . $INSTALLER09['pic_base_url'] . 'forums/modify.gif" alt="' . $lang['fe_modify'] . '" title="' . $lang['fe_modify'] . '" /> ' . $lang['fe_modify'] . '</a> <a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php?action=delete_post&post_id=' . $post_id . '&topic_id=' . $topic_id . '"><img src="' . $INSTALLER09['pic_base_url'] . 'forums/delete.gif" alt="' . $lang['fe_delete'] . '" title="' . $lang['fe_delete'] . '" /> ' . $lang['fe_remove'] . '</a>' : '') . ' <!--<a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php?action=report_post&topic_id=' . $topic_id . '&post_id=' . $post_id . '"><img src="' . $INSTALLER09['pic_base_url'] . 'forums/report.gif" alt="' . $lang['fe_report'] . '" title="' . $lang['fe_report'] . '" width="22" /> ' . $lang['fe_report'] . '</a>--> <a href="' . $INSTALLER09['baseurl'] . '/report.php?type=Post&id=' . $post_id . '&id_2=' . $topic_id . '"><img src="' . $INSTALLER09['pic_base_url'] . 'forums/report.gif" alt="' . $lang['fe_report'] . '" title="' . $lang['fe_report'] . '" width="22" /> ' . $lang['fe_report'] . '</a> ' . ($CURUSER['class'] == UC_MAX && $arr['staff_lock'] == 1 ? '<a href="' . $INSTALLER09['baseurl'] . '/forums.php?action=staff_lock&mode=unlock&post_id=' . $post_id . '&topic_id=' . $topic_id . '"><img src="' . $INSTALLER09['pic_base_url'] . 'key.gif" alt="' . $lang['fe_un_lock'] . '" title="' . $lang['fe_un_lock'] . '" /> ' . $lang['fe_unlock_post'] . '</a> ' : '') . ' ' . ($CURUSER['class'] == UC_MAX && $arr['staff_lock'] == 0 ? '<a href="' . $INSTALLER09['baseurl'] . '/forums.php?action=staff_lock&mode=lock&post_id=' . $post_id . '&topic_id=' . $topic_id . '"><img src="' . $INSTALLER09['pic_base_url'] . 'key.gif" alt="' . $lang['fe_lock'] . '" title="' . $lang['fe_lock'] . '" /> ' . $lang['fe_lock_post'] . '</a>' : '') . $stafflocked . ' <a href="' . $INSTALLER09['baseurl'] . '/forums.php?action=view_topic&topic_id=' . $topic_id . '&page=' . $page . '#top"><img src="' . $INSTALLER09['pic_base_url'] . 'forums/up.gif" alt="' . $lang['fe_top'] . '" title="' . $lang['fe_top'] . '" /></a> <a href="' . $INSTALLER09['baseurl'] . '/forums.php?action=view_topic&topic_id=' . $topic_id . '&page=' . $page . '#bottom"><img src="' . $INSTALLER09['pic_base_url'] . 'forums/down.gif" alt="' . $lang['fe_bottom'] . '" title="' . $lang['fe_bottom'] . '" /></a> </span></td> </tr> <tr>
function commenttable($rows) { global $CURUSER, $HTTP_SERVER_VARS; // === get smilie based on ratio begin_main_frame(); begin_frame(); $count = 0; foreach ($rows as $row) { $querie = sql_query("SELECT anonymous FROM comments WHERE id =" . unsafeChar($row['id']) . ""); $arraya = mysql_fetch_assoc($querie); echo "<p class=sub>#" . safeChar($row["id"]) . " by "; $title = !empty($row["title"]) ? $row["title"] : get_user_class_name($row["class"]); if ($arraya['anonymous'] == 'no' && isset($row["username"])) { $username = $row["username"]; $ratres = sql_query("SELECT uploaded, downloaded from users where username='******'"); $rat = mysql_fetch_array($ratres); if ($rat["downloaded"] > 0) { $ratio = $rat['uploaded'] / $rat['downloaded']; $ratio = number_format($ratio, 3); $color = get_ratio_color($ratio); if ($color) { $ratio = "<font color={$color}>" . safeChar($ratio) . " " . get_user_ratio_image($ratio) . "</font>"; } } else { if ($rat["uploaded"] > 0) { $ratio = "Inf."; } else { $ratio = "---"; } } echo "<a name=comm" . $row["id"] . " href=userdetails.php?id=" . safeChar($row["user"]) . "><b>" . safeChar($row["username"]) . "</b></a> " . $title . " " . ($row["donor"] == "yes" ? "<img src=pic/star.gif alt='Donor'>" : "") . ($row["warned"] == "yes" ? "<img src=" . "/pic/warned.gif alt=\"Warned\">" : "") . " Ratio: {$ratio}\n"; } else { if (!isset($row["username"])) { echo "<a name=\"comm" . $row["id"] . "\"><i>(orphaned)</i></a>\n"; } else { if ($arraya['anonymous'] == 'yes') { echo "<a name=\"comm" . $row["id"] . "\"><font color=blue><b>Anonymous</b></font></a>\n"; } } } echo " at " . display_date_time($row["added"]) . " GMT" . ($row["user"] == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? "- [<a href=comment.php?action=edit&cid={$row['id']}>" . 'Edit' . "</a>] " : "") . (get_user_class() >= UC_VIP ? " - [<a href=report.php?type=Comment&id={$row['id']}>Report this Comment</a>]" : "") . (get_user_class() >= UC_MODERATOR ? "- [<a href=comment.php?action=delete&cid={$row['id']}>" . 'Delete' . "</a>]" : "") . ($row["editedby"] && get_user_class() >= UC_MODERATOR ? " - [<a href=comment.php?action=vieworiginal&cid={$row['id']}>" . 'View_original' . "</a>]" : "") . "</p>\n"; $resa = sql_query("SELECT owner, anonymous FROM torrents WHERE owner = {$row['user']}"); $array = mysql_fetch_assoc($resa); if ($row['anonymous'] == 'yes' && $row['user'] == $array['owner']) { $avatar = "/pic/default_avatar.gif"; } else { $avatar = $CURUSER["avatars"] == "yes" ? safeChar($row["avatar"]) : ""; } if (!$avatar) { $avatar = "/pic/default_avatar.gif"; } begin_table(true); echo "<tr valign=top>\n"; echo "<td align=center width=100 style='padding: 0px'><img width=100 src={$avatar}><br />" . get_reputation($row, 'comments') . "</td>\n"; echo "<td class=text>" . format_comment($row["text"]) . "</td>\n"; echo "</tr>\n"; end_table(); } end_frame(); end_main_frame(); }
<tr> <td class="two" align="right">description:</td> <td class="two" align="left">' . format_comment($body) . '</td> </tr> <tr> <td class="two" align="right">category:</td> <td class="two" align="left"><img border="0" src="pic/caticons/' . $CURUSER['categorie_icon'] . '/' . htmlsafechars($cat_image, ENT_QUOTES) . '" alt="' . htmlsafechars($cat_name, ENT_QUOTES) . '" /></td> </tr> <tr> <td class="two" align="right">link:</td> <td class="two" align="left"><a class="altlink" href="' . htmlsafechars($link, ENT_QUOTES) . '" target="_blank">' . htmlsafechars($link, ENT_QUOTES) . '</a></td> </tr> <tr> <td class="two" align="right">requested by:</td> <td class="two" align="left">' . print_user_stuff($CURUSER) . ' [ ' . get_user_class_name($CURUSER['class']) . ' ] ratio: ' . member_ratio($CURUSER['uploaded'], $INSTALLER09['ratio_free'] ? "0" : $CURUSER['downloaded']) . get_user_ratio_image($CURUSER['uploaded'], $INSTALLER09['ratio_free'] ? "1" : $CURUSER['downloaded']) . '</td> </tr> </table> <br />' : '') . ' <table class="table table-hover table-bordered"> <tr> <td class="colhead" align="center" colspan="2"><h1>Making a Request</h1></td> </tr> <tr> <td align="center" colspan="2" class="two">Before you make an request, <a class="altlink" href="search.php">Search</a> to be sure it has not yet been requested, offered, or uploaded!<br /><br />Be sure to fill in all fields!</td> </tr> <tr> <td class="two" align="right">name:</td> <td class="two" align="left"><input type="text" size="80" name="request_name" value="' . htmlsafechars($request_name, ENT_QUOTES) . '" class="required" /></td> </tr>
$post_status = $class; break; case 'recycled': $post_status = 'recycled'; break; case 'deleted': $post_status = 'deleted'; break; } $HTMLOUT .= '<tr><td class="' . $class . '" align="left" valign="top" colspan="3"><table border="0" cellspacing="5" cellpadding="10" width="100%"><tr><td class="forum_head" align="left" width="100" valign="middle"> <span style="white-space:nowrap;"><a name="' . $post_id . '"></a> ' . ($CURUSER['class'] >= UC_STAFF ? '<input type="checkbox" name="post_to_mess_with[]" value="' . $post_id . '" />' : '') . ' <a href="javascript:window.alert(\'Direct link to this post:\\n ' . $INSTALLER09['baseurl'] . '/forums.php?action=view_topic&topic_id=' . $topic_id . '&page=' . $page . '#' . $post_id . '\');"> <img src="pic/forums/link.gif" alt="Direct link to this post" title="Direct link to this post" width="12px" /></a> <span style="font-weight: bold;">' . htmlspecialchars($arr['username']) . '</span> ' . ($arr['paranoia'] >= 2 && $CURUSER['class'] < UC_STAFF ? '<img src="pic/smilies/tinfoilhat.gif" alt="I wear a tin-foil hat!" title="I wear a tin-foil hat!" />' : get_user_ratio_image($arr['downloaded'] ? $arr['uploaded'] / $arr['downloaded'] : 0, 0)) . '</span></td> <td class="forum_head" align="left" valign="middle"><span style="white-space:nowrap;">' . $post_icon . $post_title . ' posted on: ' . get_date($arr['added'], '') . ' [' . get_date($arr['added'], '', 0, 1) . ']</span></td> <td class="forum_head" align="right" valign="middle"><span style="white-space:nowrap;"> <a class="altlink" href="forums.php?action=post_reply&topic_id=' . $topic_id . '&quote_post=' . $post_id . '&key=' . $arr['added'] . '"><img src="pic/forums/quote.gif" alt="Quote" title="Quote" /> Quote</a> ' . ($CURUSER['class'] >= UC_STAFF || $CURUSER['id'] == $arr['id'] ? ' <a class="altlink" href="forums.php?action=edit_post&post_id=' . $post_id . '&topic_id=' . $topic_id . '&page=' . $page . '"><img src="pic/forums/modify.gif" alt="Modify" title="Modify" /> Modify</a> <a class="altlink" href="forums.php?action=delete_post&post_id=' . $post_id . '&topic_id=' . $topic_id . '"><img src="pic/forums/delete.gif" alt="Delete" title="Delete" /> Remove</a>' : '') . ' <!--<a class="altlink" href="forums.php?action=report_post&topic_id=' . $topic_id . '&post_id=' . $post_id . '"><img src="pic/forums/report.gif" alt="Report" title="Report" width="22" /> Report</a>--> <a href="' . $INSTALLER09['baseurl'] . '/report.php?type=Post&id=' . $post_id . '&id_2=' . $topic_id . '"><img src="pic/forums/report.gif" alt="Report" title="Report" width="22" /> Report</a> <a href="forums.php?action=view_topic&topic_id=' . $topic_id . '&page=' . $page . '#top"><img src="pic/forums/up.gif" alt="top" title="Top" /></a> <a href="forums.php?action=view_topic&topic_id=' . $topic_id . '&page=' . $page . '#bottom"><img src="pic/forums/down.gif" alt="bottom" title="Bottom" /></a> </span></td> </tr> <tr><td class="' . $class_alt . '" align="center" valign="top">' . avatar_stuff($arr) . '<br /> ' . print_user_stuff($arr) . ($arr['title'] == '' ? '' : '<br /><span style=" font-size: xx-small;">[' . htmlspecialchars($arr['title']) . ']</span>') . '<br />