function classes2name($min, $max) { global $sent2classes; for ($i = $min; $i < $max + 1; $i++) { $sent2classes[] = get_user_class_name($i); } }
function usercommenttable($rows) { global $CURUSER, $pic_base_url, $userid; begin_main_frame(); begin_frame(); $count = 0; foreach ($rows as $row) { echo "<p class=sub>#" . $row["id"] . " by "; if (isset($row["username"])) { $title = $row["title"]; if ($title == "") { $title = get_user_class_name($row["class"]); } else { $title = safeChar($title); } echo "<a name=comm" . $row["id"] . " href=userdetails.php?id=" . $row["user"] . "><b>" . safeChar($row["username"]) . "</b></a>" . ($row["donor"] == "yes" ? "<img src=\"{$pic_base_url}star.gif\" alt='Donor'>" : "") . ($row["warned"] == "yes" ? "<img src=" . "\"{$pic_base_url}warned.gif\" alt=\"Warned\">" : "") . " ({$title})\n"; } else { echo "<a name=\"comm" . $row["id"] . "\"><i>(orphaned)</i></a>\n"; } echo " at " . $row["added"] . " GMT" . ($userid == $CURUSER["id"] || $row["user"] == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? "- [<a href=usercomment.php?action=edit&cid={$row['id']}>Edit</a>]" : "") . ($userid == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? "- [<a href=usercomment.php?action=delete&cid={$row['id']}>Delete</a>]" : "") . ($row["editedby"] && get_user_class() >= UC_MODERATOR ? "- [<a href=usercomment.php?action=vieworiginal&cid={$row['id']}>View original</a>]" : "") . "</p>\n"; $avatar = $CURUSER["avatars"] == "yes" ? safeChar($row["avatar"]) : ""; $text = format_comment($row["text"]); if ($row["editedby"]) { $text .= "<p><font size=1 class=small>Last edited by <a href=userdetails.php?id={$row['editedby']}><b>{$row['username']}</b></a> at {$row['editedat']} GMT</font></p>\n"; } begin_table(true); echo "<tr valign=top>\n"; echo "<td align=center width=150 style='padding: 0px'><img width=150 src=\"{$avatar}\"></td>\n"; echo "<td class=text>{$text}</td>\n"; echo "</tr>\n"; end_table(); } end_frame(); end_main_frame(); }
function commenttable($rows, $redaktor = "comment") { global $CURUSER, $avatar_max_width; $count = 0; foreach ($rows as $row) { if ($row["downloaded"] > 0) { $ratio = $row['uploaded'] / $row['downloaded']; $ratio = number_format($ratio, 2); } elseif ($row["uploaded"] > 0) { $ratio = "Inf."; } else { $ratio = "---"; } if (strtotime($row["last_access"]) > gmtime() - 600) { $online = "online"; $online_text = "В сети"; } else { $online = "offline"; $online_text = "Не в сети"; } print "<table class=maibaugrand width=100% border=1 cellspacing=0 cellpadding=3>"; print "<tr><td class=colhead align=\"left\" colspan=\"2\" height=\"24\">"; if (isset($row["username"])) { $title = $row["title"]; if ($title == "") { $title = get_user_class_name($row["class"]); } else { $title = htmlspecialchars_uni($title); } print ":: <img src=\"pic/buttons/button_" . $online . ".gif\" alt=\"" . $online_text . "\" title=\"" . $online_text . "\" style=\"position: relative; top: 2px;\" border=\"0\" height=\"14\">" . " <a name=comm" . $row["id"] . " href=userdetails.php?id=" . $row["user"] . " class=altlink_white><b>" . get_user_class_color($row["class"], htmlspecialchars_uni($row["username"])) . "</b></a> ::" . ($row["donor"] == "yes" ? "<img src=pic/star.gif alt='Donor'>" : "") . ($row["warned"] == "yes" ? "<img src=\"/pic/warned.gif\" alt=\"Warned\">" : "") . " {$title} ::\n" . " <img src=\"pic/upl.gif\" alt=\"upload\" border=\"0\" width=\"12\" height=\"12\"> " . mksize($row["uploaded"]) . " :: <img src=\"pic/down.gif\" alt=\"download\" border=\"0\" width=\"12\" height=\"12\"> " . mksize($row["downloaded"]) . " :: <font color=\"" . get_ratio_color($ratio) . "\">{$ratio}</font> :: "; } else { print "<a name=\"comm" . $row["id"] . "\"><i>[Anonymous]</i></a>\n"; } $avatar = $CURUSER["avatars"] == "yes" ? htmlspecialchars_uni($row["avatar"]) : ""; if (!$avatar) { $avatar = "pic/default_avatar.gif"; } if (md5($row['text']) == $row['text_hash']) { $text = $row['text_parsed']; } else { $text = format_comment($row['text']); sql_query('INSERT INTO comments_parsed (cid, text_hash, text_parsed) VALUES (' . implode(', ', array_map('sqlesc', array($row['id'], md5($row['text']), $text))) . ')') or sqlerr(__FILE__, __LINE__); } if ($row["editedby"]) { //$res = mysql_fetch_assoc(sql_query("SELECT * FROM users WHERE id = $row[editedby]")) or sqlerr(__FILE__,__LINE__); $text .= "<p><font size=1 class=small>Последний раз редактировалось <a href=userdetails.php?id={$row['editedby']}><b>{$row['editedbyname']}</b></a> в {$row['editedat']}</font></p>\n"; } print "</td></tr>"; print "<tr valign=top>\n"; print "<td style=\"padding: 0px; width: 5%;\" align=\"center\"><img src={$avatar} width=\"{$avatar_max_width}\"> </td>\n"; print "<td width=100% class=text>"; //print("<span style=\"float: right\"><a href=\"#top\"><img title=\"Top\" src=\"pic/top.gif\" alt=\"Top\" border=\"0\" width=\"15\" height=\"13\"></a></span>"); print "{$text}</td>\n"; print "</tr>\n"; print "<tr><td class=colhead align=\"center\" colspan=\"2\">"; print "<div style=\"float: left; width: auto;\">" . ($CURUSER ? " [<a href=\"" . $redaktor . ".php?action=quote&cid={$row['id']}\" class=\"altlink_white\">Цитата</a>]" : "") . ($row["user"] == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? " [<a href=" . $redaktor . ".php?action=edit&cid={$row['id']} class=\"altlink_white\">Изменить</a>]" : "") . (get_user_class() >= UC_MODERATOR ? " [<a href=\"" . $redaktor . ".php?action=delete&cid={$row['id']}\" class=\"altlink_white\">Удалить</a>]" : "") . ($row["editedby"] && get_user_class() >= UC_MODERATOR ? " [<a href=\"" . $redaktor . ".php?action=vieworiginal&cid={$row['id']}\" class=\"altlink_white\">Оригинал</a>]" : "") . (get_user_class() >= UC_MODERATOR ? " IP: " . ($row["ip"] ? "<a href=\"usersearch.php?ip={$row['ip']}\" class=\"altlink_white\">" . $row["ip"] . "</a>" : "Неизвестен") : "") . "</div>"; print "<div align=\"right\"><!--<font size=1 class=small>-->Комментарий добавлен: " . $row["added"] . " GMT<!--</font>--></td></tr>"; print "</table><br>"; } }
function reqcommenttable($rows) { global $CURUSER, $HTTP_SERVER_VARS; begin_main_frame(); begin_frame(); $count = 0; foreach ($rows as $row) { print("<p class=sub>#" . $row["id"] . " bY: "); if (isset($row["username"])) { $username = $row["username"]; $ratres = mysql_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>$ratio</font>"; } else if ($rat["uploaded"] > 0) $ratio = "Inf."; else $ratio = "---"; $title = $row["title"]; if ($title == "") $title = get_user_class_name($row["class"]); else $title = htmlspecialchars($title); print("<a name=comm".$row["id"]." href=userdetails.php?id=".$row["user"]."><b>".htmlspecialchars($row["username"])."</b></a>".($row["donor"] == "yes" ? "<img src=pic/star.gif alt='Donor'>" : "").($row["warned"] == "yes" ? "<img src="."/pic/warned.gif alt=\"Warned\">" : "")." ($title) (Ratio: $ratio)\n"); } else print("<a name=\"comm" . $row["id"] . "\"><i>(orphaned)</i></a>\n"); print(" at " . $row["added"] . " GMT" .($row["user"] == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? "- [<a href=reqcomment.php?action=edit&cid=$row[id]>Edit</a>]" : "") .(get_user_class() >= UC_MODERATOR ? "- [<a href=reqcomment.php?action=delete&cid=$row[id]>Delete</a>]" : "") . "</p>\n");$avatar = ($CURUSER["avatars"] == "yes" ? htmlspecialchars($row["avatar"]) : ""); if (!$avatar) $avatar = "/pic/default_avatar.gif"; $text = format_comment($row["text"]); begin_table(true); print("<tr valign=top>\n"); print("<td align=center width=150 style='padding: 0px'><img width=150 src=$avatar></td>\n"); print("<td class=text>$text</td>\n"); print("</tr>\n"); end_table(); } end_frame(); end_main_frame(); }
function check_admins($flag = true, $usertypes = "") { //$flag=false 表示是否为论坛版主,否则为各等级管理员; global $lang_signin; global $CURUSER; if ($flag) { if (get_user_class() < 12) { stderr($lang_signin['std_sorry'], $lang_signin['std_permission_denied_only'] . get_user_class_name(12, false, true, true) . $lang_signin['std_or_above_can_view'], false, false, true, true); } } elseif ($usertypes == "admin") { if (get_user_class() < 14) { stderr($lang_signin['std_sorry'], $lang_signin['std_permission_denied_onlyadmin'] . get_user_class_name(14, false, true, true) . $lang_signin['std_or_admin_can_view'], false, false, true, true); } return true; //不是管理员 } elseif ($usertypes == "forumman") { //以下内容不在等级系统中 $mysql = "SELECT * FROM forummods WHERE forummods.userid = '" . $CURUSER['id'] . "'"; $res = mysql_query($mysql); if ("" == mysql_fetch_array($res)) { return false; //bu是论坛版主 } return true; //确实是论坛版主 } elseif ($usertypes == "picker") { $mysql = "SELECT * FROM users WHERE users.id = '" . $CURUSER['id'] . "' and users.picker = 'yes'"; $res = mysql_query($mysql); if ("" == mysql_fetch_array($res)) { return false; //不是保种员 } return true; //确实是保种员 } elseif ($usertypes == "support") { $mysql = "SELECT * FROM users WHERE users.id = '" . $CURUSER['id'] . "' and users.support = 'yes'"; $res = mysql_query($mysql); if ("" == mysql_fetch_array($res)) { return false; //不是保种员 } return true; //确实是保种员 } }
function autoinvites($interval, $minlimit, $maxlimit, $minratio, $invites, $maxinvites) { $time = gmtime() - $interval * 86400; $minlimit = $minlimit * 1024 * 1024 * 1024; $maxlimit = $maxlimit * 1024 * 1024 * 1024; $res = SQL_Query_exec("SELECT id, username, class, invites FROM users WHERE enabled = 'yes' AND status = 'confirmed' AND downloaded >= {$minlimit} AND downloaded < {$maxlimit} AND uploaded / downloaded >= {$minratio} AND warned = 'no' AND UNIX_TIMESTAMP(invitedate) <= {$time}"); if (mysql_num_rows($res) > 0) { while ($arr = mysql_fetch_assoc($res)) { $maxninvites = $maxinvites[$arr['class']]; if ($arr['invites'] >= $maxninvites) { continue; } if ($maxninvites - $arr['invites'] < $invites) { $invites = $maxninvites - $arr['invites']; } SQL_Query_exec("UPDATE users SET invites = invites+{$invites}, invitedate = NOW() WHERE id={$arr['id']}"); write_log("Gave {$invites} invites to '{$arr['username']}' - Class: " . get_user_class_name($arr['class']) . ""); } } }
function usercommenttable($rows) { $htmlout = ''; global $CURUSER, $INSTALLER09, $userid, $lang; $htmlout .= "<table class='main' width='750' border='0' cellspacing='0' cellpadding='0'>" . "<tr><td class='embedded'>"; $htmlout .= begin_frame(); $count = 0; foreach ($rows as $row) { $htmlout .= "<p class='sub'>#" . (int) $row["id"] . " by "; if (isset($row["username"])) { $title = $row["title"]; if ($title == "") { $title = get_user_class_name($row["class"]); } else { $title = htmlsafechars($title); } $htmlout .= "<a name='comm" . (int) $row['id'] . "' href='userdetails.php?id=" . (int) $row['user'] . "'><b>" . htmlsafechars($row['username']) . "</b></a>" . ($row["donor"] == "yes" ? "<img src=\"{$INSTALLER09['pic_base_url']}star.gif\" alt='{$lang['userdetails_donor']}' />" : "") . ($row["warned"] >= "1" ? "<img src=" . "\"{$INSTALLER09['pic_base_url']}warned.gif\" alt=\"{$lang['userdetails_warned']}\" />" : "") . " ({$title})\n"; } else { $htmlout .= "<a name=\"comm" . (int) $row["id"] . "\"><i>{$lang['userdetails_orphaned']}</i></a>\n"; } $htmlout .= " " . get_date($row["added"], 'DATE', 0, 1) . "" . ($userid == $CURUSER["id"] || $row["user"] == $CURUSER["id"] || $CURUSER['class'] >= UC_STAFF ? " - [<a href='usercomment.php?action=edit&cid=" . (int) $row['id'] . "'>{$lang['userdetails_comm_edit']}</a>]" : "") . ($userid == $CURUSER["id"] || $CURUSER['class'] >= UC_STAFF ? " - [<a href='usercomment.php?action=delete&cid=" . (int) $row['id'] . "'>{$lang['userdetails_comm_delete']}</a>]" : "") . ($row["editedby"] && $CURUSER['class'] >= UC_STAFF ? " - [<a href='usercomment.php?action=vieworiginal&cid=" . (int) $row['id'] . "'>{$lang['userdetails_comm_voriginal']}</a>]" : "") . "</p>\n"; $avatar = $CURUSER["avatars"] == "yes" ? htmlsafechars($row["avatar"]) : ""; if (!$avatar) { $avatar = "{$INSTALLER09['pic_base_url']}default_avatar.gif"; } $text = format_comment($row["text"]); if ($row["editedby"]) { $text .= "<font size='1' class='small'><br /><br />{$lang['userdetails_comm_ledited']}<a href='userdetails.php?id=" . (int) $row['editedby'] . "'><b>" . htmlsafechars($row['username']) . "</b></a> " . get_date($row['editedat'], 'DATE', 0, 1) . "</font>\n"; } $htmlout .= "<table width='100%' border='1' cellspacing='0' cellpadding='5'>"; $htmlout .= "<tr valign='top'>\n"; $htmlout .= "<td align='center' width='150' style='padding:0px'><img width='150' src=\"{$avatar}\" alt=\"Avatar\" /></td>\n"; $htmlout .= "<td class='text'>{$text}</td>\n"; $htmlout .= "</tr>\n"; $htmlout .= "</table>"; } $htmlout .= end_frame(); $htmlout .= "</td></tr></table>"; return $htmlout; }
if ($showmovies['hot'] == "yes" || $showmovies['classic'] == "yes") { tr_small($lang_usercp['row_recommended_movies'], ($showmovies['hot'] == "yes" ? "<input type=checkbox name=show_hot" . ($CURUSER["showhot"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['checkbox_show_hot'] . " " : "") . ($showmovies['classic'] == "yes" ? "<input type=checkbox name=show_classic" . ($CURUSER["showclassic"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['checkbox_show_classic'] . " " : ""), 1); } tr_small($lang_usercp['row_pm_boxes'], $lang_usercp['text_show'] . "<input type=text name=pmnum size=5 value=" . $CURUSER['pmnum'] . " >" . $lang_usercp['text_pms_per_page'], 1); if ($showshoutbox_main == "yes") { //system side setting for shoutbox tr_small($lang_usercp['row_shoutbox'], $lang_usercp['text_show_last'] . "<input type=text name=sbnum size=5 value=" . $CURUSER['sbnum'] . " >" . $lang_usercp['text_messages_at_shoutbox'] . "<br />" . $lang_usercp['text_refresh_shoutbox_every'] . "<input type=text name=sbrefresh size=5 value=" . $CURUSER['sbrefresh'] . " >" . $lang_usercp['text_seconds'] . ($showhelpbox_main == 'yes' ? "<br /><input type=checkbox name=hidehb" . ($CURUSER["hidehb"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['text_hide_helpbox_messages'] : ""), 1); } if ($showfunbox_main == 'yes') { //siteside setting for funbox tr_small($lang_usercp['row_funbox'], "<input type=checkbox name=showfb" . ($CURUSER["showfb"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_funbox'], 1); } tr_small($lang_usercp['row_torrent_detail'], "<input type=checkbox name=showdescription" . ($CURUSER["showdescription"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_description'] . "<br />" . ($enablenfo_main == 'yes' && get_user_class() >= UC_POWER_USER ? "<input type=checkbox name=shownfo" . ($CURUSER["shownfo"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_nfo'] . "<br />" : "") . ($showextinfo['imdb'] == 'yes' ? "<input type=checkbox name=showimdb" . ($CURUSER["showimdb"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_imdb_info'] . "<br />" : "") . ($showextinfo['douban'] == 'yes' ? "<input type=checkbox name=showdouban" . ($CURUSER["showdouban"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_douban_info'] : ""), 1); tr_small($lang_usercp['row_discuss'], "<input type=checkbox name=showcomment" . ($CURUSER["showcomment"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_comments'], 1); if ($enablead_advertisement == 'yes') { tr_small($lang_usercp['row_show_advertisements'], "<input type=\"checkbox\" name=\"showad\"" . ($CURUSER["noad"] == "yes" ? "" : " checked=\"checked\"") . ($showaddisabled ? " disabled=\"disabled\"" : "") . " value=\"yes\" />" . $lang_usercp['text_show_advertisement_note'] . ($enablenoad_advertisement == 'yes' ? "<br />" . get_user_class_name($noad_advertisement, false, true, true) . $lang_usercp['text_can_turn_off_advertisement'] : "") . ($enablebonusnoad_advertisement == 'yes' ? "<br />" . get_user_class_name($bonusnoad_advertisement, false, true, true) . $lang_usercp['text_buy_no_advertisement'] . "<a href=\"mybonus.php\"><b>" . $lang_usercp['text_bonus_center'] . "</b></a>" : ""), 1); } tr_small($lang_usercp['row_time_type'], "<input type=radio name=timetype " . ($CURUSER['timetype'] == 'timeadded' ? " checked" : "") . " value=timeadded>" . $lang_usercp['text_time_added'] . " <input type=radio name=timetype " . ($CURUSER['timetype'] == 'timealive' ? " checked" : "") . " value=timealive>" . $lang_usercp['text_time_elapsed'] . "<br />", 1); //Setting for browse page tr_small($lang_usercp['row_browse_page'], $lang_usercp['text_browse_setting_warning'] . "\n\t\t<br /><b>" . $lang_usercp['row_torrent_page'] . ": </b><br />" . $lang_usercp['text_show'] . "<input type=text size=5 name=torrentsperpage value=" . $CURUSER['torrentsperpage'] . "> " . $lang_usercp['text_torrents_per_page'] . $lang_usercp['text_zero_equals_default'] . "<br />" . ($showtooltipsetting ? "<b>" . $lang_usercp['text_tooltip_type'] . "</b>: <br />" . ($showextinfo['imdb'] == 'yes' ? "<input type=radio name=tooltip " . ($CURUSER['tooltip'] == 'minorimdb' ? " checked" : "") . " value=minorimdb>" . $lang_usercp['text_minor_imdb_info'] . "<br /><input type=radio name=tooltip " . ($CURUSER['tooltip'] == 'medianimdb' ? " checked" : "") . " value=medianimdb>" . $lang_usercp['text_median_imdb_info'] . "<br />" : "") . ($showextinfo['douban'] == 'yes' ? "<input type=radio name=tooltip " . ($CURUSER['tooltip'] == 'minorimdb' ? "" : ($CURUSER['tooltip'] == 'minordouban' ? "checked" : "")) . " value=minordouban>" . $lang_usercp['text_minor_douban_info'] . "<br /><input type=radio name=tooltip " . ($CURUSER['tooltip'] == 'medianimdb' ? "" : ($CURUSER['tooltip'] == 'mediandouban' ? "checked" : "")) . " value=mediandouban>" . $lang_usercp['text_median_douban_info'] . "<br />" : "") . "<input type=radio name=tooltip " . ($CURUSER['tooltip'] == 'off' ? " checked" : "") . " value=off>" . $lang_usercp['text_off'] . "<br />" : "") . "<b>" . $lang_usercp['text_append_words_to_torrents'] . ": </b><br /><input type=checkbox name=appendsticky " . ($CURUSER['appendsticky'] == 'yes' ? " checked" : "") . " value=yes>" . $lang_usercp['text_append_sticky'] . "<br /><input type=checkbox name=appendnew " . ($CURUSER['appendnew'] == 'yes' ? " checked" : "") . " value=yes>" . $lang_usercp['text_append_new'] . "<br />" . $lang_usercp['text_torrents_on_promotion'] . "<input type=radio name=appendpromotion " . ($CURUSER['appendpromotion'] == 'highlight' ? " checked" : "") . " value='highlight'>" . $lang_usercp['text_highlight'] . "<input type=radio name=appendpromotion " . ($CURUSER['appendpromotion'] == 'word' ? " checked" : "") . " value='word'>" . $lang_usercp['text_append_words'] . "<input type=radio name=appendpromotion " . ($CURUSER['appendpromotion'] == 'icon' ? " checked" : "") . " value='icon'>" . $lang_usercp['text_append_icon'] . "<input type=radio name=appendpromotion " . ($CURUSER['appendpromotion'] == 'off' ? " checked" : "") . " value='off'>" . $lang_usercp['text_no_mark'] . "<br /><input type=checkbox name=appendpicked " . ($CURUSER['appendpicked'] == 'yes' ? " checked" : "") . " value=yes>" . $lang_usercp['text_append_picked'] . "<br />\n\t\t<b>" . $lang_usercp['text_show_title'] . ": </b><br />" . "<input type=checkbox name=smalldescr " . ($CURUSER['showsmalldescr'] == 'yes' ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_small_description'] . "<br />\n\t\t<b>" . $lang_usercp['text_show_action_icons'] . ": </b><br />" . "<input type=checkbox name=dlicon " . ($CURUSER['dlicon'] == 'yes' ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_download_icon'] . " <img class=\"download\" src=\"pic/trans.gif\" alt=\"Download\" /><br /><input type=checkbox name=bmicon " . ($CURUSER['bmicon'] == 'yes' ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_bookmark_icon'] . " <img class=\"bookmark\" src=\"pic/trans.gif\" alt=\"Bookmark\" /><br />\n\t\t<b>" . $lang_usercp['text_comments_reviews'] . ": </b><br /><input type=checkbox name=showcomnum " . ($CURUSER['showcomnum'] == 'yes' ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_comment_number'] . ($showtooltipsetting ? "<select name=\"showlastcom\" style=\"width: 70px;\"><option value=\"yes\" " . ($CURUSER['showlastcom'] != 'no' ? " selected" : "") . ">" . $lang_usercp['select_with'] . "</option><option value=\"no\" " . ($CURUSER['showlastcom'] == 'no' ? " selected" : "") . ">" . $lang_usercp['select_without'] . "</option></select>" . $lang_usercp['text_last_comment_on_tooltip'] : ""), 1); submit(); print "</table>"; stdfoot(); die; break; case "forum": if ($enabletooltip_tweak == 'yes') { $showtooltipsetting = true; } else { $showtooltipsetting = false; }
} elseif (isset($takesubtitleid) && isset($takereason)) { takereport($takesubtitleid, 'subtitle', $takereason); } elseif (isset($user)) { int_check($user); if ($user == $CURUSER[id]) { stderr($lang_report['std_sorry'], $lang_report['std_cannot_report_oneself']); die; } $res = sql_query("SELECT username, class FROM users WHERE id=" . sqlesc($user)) or sqlerr(__FILE__, __LINE__); if (mysql_num_rows($res) == 0) { stderr($lang_report['std_error'], $lang_report['std_invalid_user_id']); die; } $arr = mysql_fetch_assoc($res); if ($arr["class"] >= $staffmem_class) { stderr($lang_report['std_sorry'], $lang_report['std_cannot_report'] . get_user_class_name($arr["class"], false, true, true), false); die; } else { stderr($lang_report['std_are_you_sure'], $lang_report['text_are_you_sure_user'] . get_username(htmlspecialchars($user)) . $lang_report['text_to_staff'] . "<br />" . $lang_report['text_not_for_leechers'] . "<br />" . $lang_report['text_reason_note'] . "<br /><form method=post action=report.php><input type=hidden name=takeuser value=\"" . htmlspecialchars($user) . "\">" . $lang_report['text_reason_is'] . "<input type=text style=\"width: 200px\" name=reason><input type=submit value=\"" . $lang_report['submit_confirm'] . "\"></form>", false); } } elseif (isset($torrent)) { int_check($torrent); $res = sql_query("SELECT name FROM torrents WHERE id=" . sqlesc($torrent)); if (mysql_num_rows($res) == 0) { stderr($lang_report['std_error'], $lang_report['std_invalid_torrent_id']); die; } $arr = mysql_fetch_array($res); stderr($lang_report['std_are_you_sure'], $lang_report['text_are_you_sure_torrent'] . "<a href=details.php?id=" . htmlspecialchars($torrent) . "><b>" . htmlspecialchars($arr[name]) . "</b></a>" . $lang_report['text_to_staff'] . "<br />" . $lang_report['text_reason_note'] . "<br /><form method=post action=report.php><input type=hidden name=taketorrent value=\"" . htmlspecialchars($torrent) . "\">" . $lang_report['text_reason_is'] . "<input type=text style=\"width: 200px\" name=reason><input type=submit value=\"" . $lang_report['submit_confirm'] . "\"></form>", false); } elseif (isset($forumpost)) { int_check($forumpost);
<tr> <td class="one" align="center" valign="top" colspan="4"> <img src="pic/smilies/shit.gif" alt="*" /> Your shit list is empty. <img src="pic/smilies/shit.gif" alt="*" /></td> </tr>'; } else { while ($shit_list = mysqli_fetch_array($res)) { $shit = ''; for ($poop = 1; $poop <= $shit_list['shittyness']; $poop++) { $shit .= ' <img src="pic/smilies/shit.gif" title="' . (int) $shit_list['shittyness'] . ' out of 10 on the sittyness scale" alt="*" />'; } $HTMLOUT .= ($i % 2 == 1 ? '<tr>' : '') . ' <td class="' . ($i % 2 == 0 ? 'one' : 'two') . '" align="center" valign="top" width="80">' . avatar_stuff($shit_list) . ' ' . print_user_stuff($shit_list) . ' <b> [ ' . get_user_class_name($shit_list['class']) . ' ]</b> <a class="altlink" href="staffpanel.php?tool=shit_list&action=shit_list&action2=delete&shit_list_id=' . (int) $shit_list['suspect_id'] . '" title="remove this toad from your shit list">Remove</a> <a class="altlink" href="sendmessage.php?receiver=' . (int) $shit_list['suspect_id'] . '" title="send a PM to this evil toad">Send PM</a></td> <td class="' . ($i % 2 == 0 ? 'one' : 'two') . '" align="left" valign="top">' . $shit . ' <b>joined:</b> ' . get_date($shit_list['added'], '') . ' [ ' . get_date($shit_list['added'], '', 0, 1) . ' ] <b>added to shit list:</b> ' . get_date($shit_list['shit_list_added'], '') . ' [ ' . get_date($shit_list['shit_list_added'], '', 0, 1) . ' ]
//== } $body = $arr['bbcode'] == 'yes' ? format_comment($arr['body']) : format_comment_no_bbcode($arr['body']); $post_id = (int) $arr['post_id']; $width = 100; $HTMLOUT .= '<tr> <td class="forum_head_dark" colspan="3" align="left">' . $lang['fe_forum'] . ': <a class="altlink" href="forums.php?action=view_forum&forum_id=' . (int) $arr['forum_id'] . '" title="' . $lang['fe_link_to_forum'] . '"> <span style="color: white;font-weight: bold;">' . htmlsafechars($arr['forum_name'], ENT_QUOTES) . '</span></a> ' . $lang['fe_topic'] . ': <a class="altlink" href="forums.php?action=view_topic&topic_id=' . (int) $arr['topic_id'] . '" title="' . $lang['fe_link_to_forum'] . '"> <span style="color: white;font-weight: bold;">' . htmlsafechars($arr['topic_name'], ENT_QUOTES) . '</span></a>' . $topic_status_image . '</td> </tr> <tr> <td class="forum_head" align="left" width="100" valign="middle"><a name="' . $post_id . '"></a></td> <td class="forum_head" align="left" valign="middle"> <span style="white-space:nowrap;">' . $post_icon . ' <a class="altlink" href="forums.php?action=view_topic&topic_id=' . (int) $arr['topic_id'] . '&page=' . $page . '#' . (int) $arr['post_id'] . '" title="' . $lang['fe_link_to_post'] . '"> ' . $post_title . '</a> ' . $post_status_image . ' ' . $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 href="forums.php?action=view_my_posts&page=' . $page . '#top"><img src="pic/forums/up.gif" alt="' . $lang['fe_top'] . '" /></a> <a href="forums.php?action=view_my_posts&page=' . $page . '#bottom"><img src="pic/forums/down.gif" alt="' . $lang['fe_bottom'] . '" /></a></span></td> </tr> <tr> <td class="' . $class_alt . '" align="center" width="100px" valign="top">' . ($arr['anonymous'] == 'yes' ? '<img style="max-width:' . $width . 'px;" src="' . $INSTALLER09['pic_base_url'] . 'anonymous_1.jpg" alt="avatar" />' : avatar_stuff($user_arr)) . '<br />' . ($arr['anonymous'] == 'yes' ? '<i>' . $lang['fe_anonymous'] . '</i>' : print_user_stuff($user_arr)) . ($arr['anonymous'] == 'yes' || $user_arr['title'] == '' ? '' : '<br /><span style=" font-size: xx-small;">[' . htmlsafechars($user_arr['title']) . ']</span>') . '<br /><span style="font-weight: bold;">' . ($arr['anonymous'] == 'yes' ? '' : get_user_class_name($user_arr['class'])) . '</span><br /></td> <td class="' . $post_status . '" align="left" valign="top" colspan="2">' . $body . $edited_by . '</td> </tr> <tr> <td class="' . $class_alt . '" align="right" valign="middle" colspan="3"></td> </tr>'; } //=== end while loop $HTMLOUT .= $the_top_and_bottom . '</table><a name="bottom"></a><br />' . $links . '<br />';
if (isset($_POST['modcomment']) && ($modcomment = $_POST['modcomment'])) { } else { $modcomment = ""; } // Set class if (isset($_POST['class']) && ($class = $_POST['class']) != $user['class']) { if ($CURUSER['class'] < UC_SYSOP && $user['class'] >= $CURUSER['class']) { stderr("{$lang['modtask_user_error']}", "{$lang['modtask_try_again']}"); } // Notify user $what = $class > $user['class'] ? "{$lang['modtask_promoted']}" : "{$lang['modtask_demoted']}"; $msg = sqlesc(sprintf($lang['modtask_have_been'], $what) . " '" . get_user_class_name($class) . "' {$lang['modtask_by']} " . $CURUSER['username']); $added = time(); mysql_query("INSERT INTO messages (sender, receiver, msg, added) VALUES(0, {$userid}, {$msg}, {$added})") or sqlerr(__FILE__, __LINE__); $updateset[] = "class = " . sqlesc($class); $modcomment = get_date(time(), 'DATE', 1) . " - {$what} to '" . get_user_class_name($class) . "' by {$CURUSER['username']}.\n" . $modcomment; } // Clear Warning - Code not called for setting warning if (isset($_POST['warned']) && ($warned = $_POST['warned']) != $user['warned']) { $updateset[] = "warned = " . sqlesc($warned); $updateset[] = "warneduntil = 0"; if ($warned == 'no') { $modcomment = get_date(time(), 'DATE', 1) . "{$lang['modtask_warned']}" . $CURUSER['username'] . ".\n" . $modcomment; $msg = sqlesc("{$lang['modtask_warned_removed']}" . $CURUSER['username'] . "."); $added = time(); mysql_query("INSERT INTO messages (sender, receiver, msg, added) VALUES (0, {$userid}, {$msg}, {$added})") or sqlerr(__FILE__, __LINE__); } } // Reset LastUpload // Auto Demote Uploader by XiaNYdE // start // support - http://bit.ly/5NtmgT
} else { $userbar = '<center><form method="post" action="takelogin.php"> <br /> ' . $tracker_lang['username'] . ': <br /> <input type="text" size=20 name="username" /><br /> ' . $tracker_lang['password'] . ': <br /> <input type="password" size=20 name="password" /><br /> <input type="submit" value="' . $tracker_lang['login'] . '!" class=\\"btn\\"><br /><br /> </form></center> <a class="menu" href="signup.php"><center>' . $tracker_lang['signup'] . '</center></a>'; } if ($CURUSER['override_class'] != 255) { $usrclass = " <img src=\"pic/warning.gif\" title=" . get_user_class_name($CURUSER['class']) . " alt=" . get_user_class_name($CURUSER['class']) . "> "; } elseif (get_user_class() >= UC_MODERATOR) { $usrclass = " <a href=\"setclass.php\"><img src=\"pic/warning.gif\" title=\"" . get_user_class_name($CURUSER['class']) . "\" alt=\"" . get_user_class_name($CURUSER['class']) . "\" border=\"0\"></a> "; } blok_menu($tracker_lang['welcome_back'] . ($CURUSER ? "<a href=\"{$DEFAULTBASEURL}/userdetails.php?id=" . $CURUSER["id"] . "\">" . $CURUSER["username"] . "</a> " . $usrclass . " " : "гость") . $medaldon . $warn, $userbar, "155"); echo "<br />"; $mainmenu = "<a class=\"menu\" href=\"index.php\"> " . $tracker_lang['homepage'] . "</a>" . "<a class=\"menu\" href=\"browse.php\"> " . $tracker_lang['browse'] . "</a>" . "<a class=\"menu\" href=\"log.php\"> " . $tracker_lang['log'] . "</a>" . "<a class=\"menu\" href=\"rules.php\"> " . $tracker_lang['rules'] . "</a>" . "<a class=\"menu\" href=\"faq.php\"> " . $tracker_lang['faq'] . "</a>" . "<a class=\"menu\" href=\"topten.php\"> " . $tracker_lang['topten'] . "</a>" . "<a class=\"menu\" href=\"formats.php\"> " . $tracker_lang['formats'] . "</a>"; blok_menu($tracker_lang['main_menu'], $mainmenu, "155"); echo "<br />"; if ($CURUSER) { $usermenu = "<a class=\"menu\" href=\"my.php\"> " . $tracker_lang['my'] . "</a>" . "<a class=\"menu\" href=\"userdetails.php?id=" . $CURUSER["id"] . "\"> " . $tracker_lang['profile'] . "</a>" . "<a class=\"menu\" href=\"bookmarks.php\"> " . $tracker_lang['bookmarks'] . "</a>" . "<a class=\"menu\" href=\"mybonus.php\"> " . $tracker_lang['my_bonus'] . "</a>" . "<a class=\"menu\" href=\"invite.php\"> " . $tracker_lang['invite'] . "</a>" . "<a class=\"menu\" href=\"users.php\"> " . $tracker_lang['users'] . "</a>" . "<a class=\"menu\" href=\"friends.php\"> " . $tracker_lang['personal_lists'] . "</a>" . "<a class=\"menu\" href=\"subnet.php\"> " . $tracker_lang['neighbours'] . "</a>" . "<a class=\"menu\" href=\"mytorrents.php\"> " . $tracker_lang['my_torrents'] . "</a>" . "<a class=\"menu\" href=\"logout.php\"> " . $tracker_lang['logout'] . "!</a>"; blok_menu($tracker_lang['user_menu'], $usermenu, "155"); echo "<br />"; $messages = "<a class=\"menu\" href=\"message.php\"> " . $tracker_lang['inbox'] . "</a>" . "<a class=\"menu\" href=\"message.php?action=viewmailbox&box=-1\"> " . $tracker_lang['outbox'] . "</a>"; blok_menu($tracker_lang['messages'], $messages, "155"); echo "<br />"; } $bt_clients = ' <a href="http://bitconjurer.org/BitTorrent/download.html" target="_blank"><font class=small color=green>' . $tracker_lang['official'] . '</font></a><br />' . ' <a href="http://azureus.sourceforge.net/" target="_blank"><font class=small color=green>Azureus (Java)</font></a><br />' . ' <a href="http://www.bittornado.com/" target="_blank"><font class=small color=green>BitTornado</font></a><br />' . ' <a href="http://www.bitcomet.com/" target="_blank"><font class=small color=green>BitComet</font></a><br />' . ' <a href="http://www.bitlord.com/" target="_blank"><font class=small color=green>BitLord</font></a><br />' . ' <a href="http://www.macupdate.com/info.php/id/7170" target="_blank"><font class="small" color=green>Acquisition (Mac)</font></a><br />' . ' <a href="http://www.167bt.com/intl/" target="_blank"><font class=small color=green>BitSpirit</font></a><br />' . '<hr width=100% color=#ffc58c size=1>' . '<font class=small color=red> ' . $tracker_lang['clients_recomened_by_us'] . '</font>';
//=== get the last post read by CURUSER (with Retro's $readpost_expiry thingie) - cached \0/ if (($last_read_post_arr = $mc1->get_value('last_read_post_' . $last_post_arr['topic_id'] . '_' . $CURUSER['id'])) === false) { $last_read_post_arr = mysqli_fetch_row(sql_query('SELECT last_post_read FROM read_posts WHERE user_id=' . sqlesc($CURUSER['id']) . ' AND topic_id=' . sqlesc($last_post_arr['topic_id']))); $mc1->cache_value('last_read_post_' . $last_post_arr['topic_id'] . '_' . $CURUSER['id'], $last_read_post_arr, $INSTALLER09['expires']['last_read_post']); } $image_to_use = $last_post_arr['added'] > TIME_NOW - $readpost_expiry ? !$last_read_post_arr or $last_post_id > $last_read_post_arr[0] : 0; $img = $image_to_use ? 'unlockednew' : 'unlocked'; //== Anonymous -> if ($last_post_arr["tan"] == "yes") { if ($CURUSER['class'] < UC_STAFF && $last_post_arr["user_id"] != $CURUSER["id"]) { $last_post = '<span style="white-space:nowrap;">' . $lang['fe_last_post_by'] . ': <i>' . $lang['fe_anonymous'] . '</i> in ► <a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php?action=view_topic&topic_id=' . (int) $last_post_arr['topic_id'] . '&page=' . $last_post_id . '#' . $last_post_id . '" title="' . htmlsafechars($last_post_arr['topic_name'], ENT_QUOTES) . '"><span style="font-weight: bold;">' . CutName(htmlsafechars($last_post_arr['topic_name'], ENT_QUOTES), 30) . '</span></a><br />' . get_date($last_post_arr['added'], '') . '<br /></span>'; } else { $last_post = '<span style="white-space:nowrap;">' . $lang['fe_last_post_by'] . ': <i>' . $lang['fe_anonymous'] . '</i> [' . ($last_post_arr['username'] !== '' ? print_user_stuff($last_post_arr) : '' . $lang['fe_lost'] . '') . '] <span style="font-size: x-small;"> [ ' . get_user_class_name($last_post_arr['class']) . ' ] </span><br />in ► <a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php?action=view_topic&topic_id=' . (int) $last_post_arr['topic_id'] . '&page=' . $last_post_id . '#' . $last_post_id . '" title="' . htmlsafechars($last_post_arr['topic_name'], ENT_QUOTES) . '"><span style="font-weight: bold;">' . CutName(htmlsafechars($last_post_arr['topic_name'], ENT_QUOTES), 30) . '</span></a><br />' . get_date($last_post_arr['added'], '') . '<br /></span>'; } } else { $last_post = '<span style="white-space:nowrap;">' . $lang['fe_last_post_by'] . ': ' . ($last_post_arr['username'] !== '' ? print_user_stuff($last_post_arr) : '' . $lang['fe_lost'] . '') . ' <span style="font-size: x-small;"> [ ' . get_user_class_name($last_post_arr['class']) . ' ] </span><br />in ► <a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php?action=view_topic&topic_id=' . (int) $last_post_arr['topic_id'] . '&page=' . $last_post_id . '#' . $last_post_id . '" title="' . htmlsafechars($last_post_arr['topic_name'], ENT_QUOTES) . '"><span style="font-weight: bold;">' . CutName(htmlsafechars($last_post_arr['topic_name'], ENT_QUOTES), 30) . '</span></a><br />' . get_date($last_post_arr['added'], '') . '<br /></span>'; } //== //=== get child boards if any - cached \0/ $keys['child_boards'] = 'child_boards_' . $last_post_id . '_' . $CURUSER['class']; if (($child_boards_cache = $mc1->get_value($keys['child_boards'])) === false) { $child_boards = ''; $child_boards_cache = array(); $res = sql_query('SELECT name, id FROM forums WHERE parent_forum = ' . sqlesc($arr_forums['real_forum_id']) . ' AND min_class_read <= ' . sqlesc($CURUSER['class']) . ' ORDER BY sort ASC') or sqlerr(__FILE__, __LINE__); while ($arr = mysqli_fetch_assoc($res)) { if ($child_boards) { $child_boards .= ', '; } $child_boards .= '<a href="' . $INSTALLER09['baseurl'] . '/forums.php?action=view_forum&forum_id=' . (int) $arr['id'] . '" title="' . $lang['fm_click_to_view'] . '!" class="altlink">' . htmlsafechars($arr['name'], ENT_QUOTES) . '</a>'; } $child_boards_cache['child_boards'] = $child_boards;
if (mysqli_num_rows($res) == 0) { stderr('Error', 'No forum found with that ID!'); } $forum = mysqli_fetch_assoc($res); if ($INSTALLER09['forums_online'] == 0) { $HTMLOUT .= stdmsg('Warning', 'Forums are currently in maintainance mode'); } $HTMLOUT .= begin_main_frame(); $HTMLOUT .= begin_frame("Edit Forum", "center"); $HTMLOUT .= "<form method='post' action='{$INSTALLER09['baseurl']}/forums.php?action=updateforum&forumid={$forumid}'>\n"; $HTMLOUT .= begin_table(); $HTMLOUT .= "<tr><td class='rowhead'>Forum name</td>\r\n <td align='left' style='padding: 0px'><input type='text' size='60' maxlength='{$Multi_forum['configs']['maxsubjectlength']}' name='name' style='border: 0px; height: 19px' value=\"" . htmlsafechars($forum['name']) . "\" /></td></tr>\r\n <tr><td class='rowhead'>Description</td><td align='left' style='padding: 0px'><textarea name='description' cols='68' rows='3' style='border: 0px'>" . htmlsafechars($forum['description']) . "</textarea></td></tr>\r\n <tr><td class='rowhead'></td><td align='left' style='padding: 0px'> Minimum <select name='readclass'>"; for ($i = 0; $i <= MAX_CLASS; ++$i) { $HTMLOUT .= "<option value='{$i}' " . ($i == $forum['min_class_read'] ? " selected='selected'" : "") . ">" . get_user_class_name($i) . "</option>\n"; } $HTMLOUT .= "</select> Class required to View<br />\n Minimum <select name='writeclass'>"; for ($i = 0; $i <= MAX_CLASS; ++$i) { $HTMLOUT .= "<option value='{$i}' " . ($i == $forum['min_class_write'] ? " selected='selected'" : "") . ">" . get_user_class_name($i) . "</option>\n"; } $HTMLOUT .= "</select> Class required to Post<br />\n Minimum <select name='createclass'>"; for ($i = 0; $i <= MAX_CLASS; ++$i) { $HTMLOUT .= "<option value='{$i}' " . ($i == $forum['min_class_create'] ? " selected='selected'" : "") . ">" . get_user_class_name($i) . "</option>\n"; } $HTMLOUT .= "</select> Class required to Create Topics</td></tr>\r\n <tr><td colspan='2' align='center'><input type='submit' value='Submit' /></td></tr>\n"; $HTMLOUT .= end_table(); $HTMLOUT .= "</form>"; $HTMLOUT .= end_frame(); $HTMLOUT .= end_main_frame(); echo stdhead("{$lang['forums_title']}", true, $stdhead) . $HTMLOUT . stdfoot($stdfoot); exit; }
// End --> </script> <?php print "<h2>" . safeChar($count) . " accounts inactive for longer than " . safeChar($days) . " days.</h2>"; print "<form action=\"inactive.php\" method=\"post\">"; print "<table class=main border=1 cellspacing=0 cellpadding=5><tr>\n"; print "<td class=colhead>Username</td>"; print "<td class=colhead>Class</td>"; print "<td class=colhead>Mail</td>"; print "<td class=colhead>Ratio</td>"; print "<td class=colhead>Last Seen</td>"; print "<td class=colhead align=\"center\">x</td>"; while ($arr = mysql_fetch_assoc($res)) { $ratio = $arr["downloaded"] > 0 ? number_format($arr["uploaded"] / $arr["downloaded"], 3) : ($arr["uploaded"] > 0 ? "Inf." : "---"); $last_seen = $arr["last_access"] == "0000-00-00 00:00:00" ? "never" : "" . get_elapsed_time(sql_timestamp_to_unix_timestamp($arr["last_access"])) . " ago"; $class = get_user_class_name($arr["class"]); print "<tr>"; print "<td><a href=\"userdetails.php?id=" . $arr["id"] . "\">" . $arr["username"] . "</a></td>"; print "<td>" . $class . "</td>"; print "<td><a href=\"mailto:" . $arr["email"] . "\">" . safeChar($arr["email"]) . "</a></td>"; print "<td>" . $ratio . "</td>"; print "<td>" . $last_seen . "</td>"; print "<td align=\"center\" bgcolor=\"#FF0000\"><input type=\"checkbox\" name=\"userid[]\" value=\"" . $arr["id"] . "\" /></td>"; print "</tr>"; } print "<tr><td colspan=\"6\" class=\"colhead\" align=\"center\">\n<select name=\"action\">\n<option value=\"mail\">Send mail</option>\n<option value=\"deluser\" " . ($CURUSER["class"] < UC_ADMINISTRATOR ? "disabled" : "") . ">Delete users</option>\n<option value=\"disable\">Disable Accounts</option>\n</select> <input type=\"submit\" name=\"submit\" value=\"Apply Changes\"/> <input type=\"button\" value=\"Check all\" onClick=\"this.value=check(form)\"></td></tr>"; if ($record_mail) { $ress = sql_query("SELECT avps.value_s AS userid, avps.value_i AS last_mail, avps.value_u AS mails, users.username FROM avps LEFT JOIN users ON avps.value_s=users.id WHERE avps.arg='inactivemail' LIMIT 1"); $date = mysql_fetch_assoc($ress); if ($date["last_mail"] > 0) { print "<tr><td colspan=\"6\" class=\"colhead\" align=\"center\" style=\"color:red;\">Last Email sent by <a href=\"usersdetails.php?id=" . htmlspecialchars($date["userid"]) . "\">" . htmlspecialchars($date["username"]) . "</a> on <b>" . gmdate("d M Y", $date["last_mail"]) . " - " . $date["mails"] . "</b> Email" . ($date["mails"] > 1 ? "s" : "") . " sent !</td></tr>";
<?php require "include/bittorrent.php"; dbconn(); require_once get_langfile_path(); loggedinorreturn(); parked(); $id = 0 + $_GET["id"]; $type = unesc($_GET["type"]); $_SESSION['inviterand'] = mt_rand(100000, 999999); registration_check('invitesystem', true, false); if ($CURUSER[id] != $id && get_user_class() < $viewinvite_class || !is_valid_id($id)) { stderr($lang_invite['std_sorry'], $lang_invite['std_permission_denied']); } if (get_user_class() < $sendinvite_class) { stderr($lang_invite['std_sorry'], $lang_invite['std_only'] . get_user_class_name($sendinvite_class, false, true, true) . $lang_invite['std_or_above_can_invite'], false); } $res = sql_query("SELECT username FROM users WHERE id = " . mysql_real_escape_string($id)) or sqlerr(); $user = mysql_fetch_assoc($res); stdhead($lang_invite['head_invites']); print "<table width=700 class=main border=0 cellspacing=0 cellpadding=0><tr><td class=embedded>"; print "<h1 align=center><a href=\"invite.php?id=" . $id . "\">" . $user['username'] . $lang_invite['text_invite_system'] . "</a></h1>"; print "<h2 align=center><form method=post action=invite.php?id=" . htmlspecialchars($id) . "&type=new><input type=submit " . ($CURUSER[invites] <= 0 ? "disabled " : "") . " value='" . $lang_invite['sumbit_invite_someone'] . "'></form>" . "</h2>"; $sent = htmlspecialchars($_GET['sent']); if ($sent == 1) { $msg = $lang_invite['text_invite_code_sent']; print "<p align=center><font color=red>" . $msg . "</font></p>"; } $res = sql_query("SELECT invites FROM users WHERE id = " . mysql_real_escape_string($id)) or sqlerr(); $inv = mysql_fetch_assoc($res); //for one or more. "invite"/"invites"
function commenttable($rows, $variant = 'torrent') { require_once INCL_DIR . 'html_functions.php'; global $CURUSER, $TBDEV; $lang = load_language('torrenttable_functions'); $htmlout = ''; $count = 0; $variant_options = array('torrent' => 'details', 'request' => 'viewrequests'); if (isset($variant_options[$variant])) { $locale_link = $variant_options[$variant]; } else { return; } $extra_link = $variant == 'request' ? '&type=request' : ''; $htmlout .= begin_main_frame(); $htmlout .= begin_frame(); foreach ($rows as $row) { $htmlout .= "<p class='sub'>#{$row["id"]} {$lang["commenttable_by"]} "; if (isset($row["username"])) { if ($row['anonymous'] == 'yes') { $htmlout .= ($CURUSER['class'] >= UC_MODERATOR ? 'Anonymous - Posted by: <b>' . htmlspecialchars($row['username']) . '</b> ID: ' . $row['user'] . '' : 'Anonymous') . ' '; } else { $title = $row["title"]; if ($title == "") { $title = get_user_class_name($row["class"]); } else { $title = htmlspecialchars($title); } $htmlout .= "<a name='comm{$row["id"]}' href='userdetails.php?id={$row["user"]}'><b>" . htmlspecialchars($row["username"]) . "</b></a>" . ($row["donor"] == "yes" ? "<img src='{$TBDEV['pic_base_url']}star.gif' alt='" . $lang["commenttable_donor_alt"] . "' />" : "") . ($row["warned"] == "yes" ? "<img src=" . "'{$TBDEV['pic_base_url']}warned.gif' alt='" . $lang["commenttable_warned_alt"] . "' />" : "") . " ({$title})\n"; } } else { $htmlout .= "<a name='comm{$row["id"]}'><i>(" . $lang["commenttable_orphaned"] . ")</i></a>\n"; } $htmlout .= get_date($row['added'], ''); $htmlout .= ($row["user"] == $CURUSER["id"] || $CURUSER["class"] >= UC_STAFF ? "- [<a href='comment.php?action=edit&cid=" . $row['id'] . $extra_link . "&tid=" . $row[$variant] . "'>" . $lang["commenttable_edit"] . "</a>]" : "") . ($CURUSER["class"] >= UC_VIP ? " - [<a href='report.php?type=Comment&id=" . $row['id'] . "'>Report this Comment</a>]" : "") . ($CURUSER["class"] >= UC_STAFF ? " - [<a href='comment.php?action=delete&cid=" . $row['id'] . $extra_link . "&tid=" . $row[$variant] . "'>" . $lang["commenttable_delete"] . "</a>]" : "") . ($row["editedby"] && $CURUSER["class"] >= UC_STAFF ? "- [<a href='comment.php?action=vieworiginal&cid=" . $row['id'] . $extra_link . "&tid=" . $row[$variant] . "'>" . $lang["commenttable_view_original"] . "</a>]" : "") . "</p>\n"; $avatar = $CURUSER["avatars"] == "all" ? htmlspecialchars($row["avatar"]) : ($CURUSER["avatars"] == "some" && $row["offavatar"] == "no" ? htmlspecialchars($row["avatar"]) : ""); if (!$avatar) { $avatar = "{$TBDEV['pic_base_url']}forumicons/default_avatar.gif"; } $text = format_comment($row["text"]); if ($row["editedby"]) { $text .= "<p><font size='1' class='small'>" . $lang["commenttable_last_edited_by"] . " <a href='userdetails.php?id={$row['editedby']}'><b>{$row['username']}</b></a> " . $lang["commenttable_last_edited_at"] . " " . get_date($row['editedat'], 'DATE') . "</font></p>\n"; } $htmlout .= begin_table(true); $htmlout .= "<tr valign='top'>\n"; $htmlout .= "<td align='center' width='150' style='padding: 0px'><img width='{$row['av_w']}' height='{$row['av_h']}' src='{$avatar}' alt='' /><br />" . get_reputation($row, 'comments') . "</td>\n"; $htmlout .= "<td class='text'>{$text}</td>\n"; $htmlout .= "</tr>\n"; $htmlout .= end_table(); } $htmlout .= end_frame(); $htmlout .= end_main_frame(); return $htmlout; }
function StatusBar() { global $CURUSER, $TBDEV, $lang, $rep_is_on, $mc; if (!$CURUSER) { return ""; } if (!$TBDEV['coins']) { $upped = mksize($CURUSER['uploaded']); $downed = mksize($CURUSER['downloaded']); $ratio = $CURUSER['downloaded'] > 0 ? $CURUSER['uploaded'] / $CURUSER['downloaded'] : 0; $ratio = number_format($ratio, 2); $color = get_ratio_color($ratio); if ($color) { $ratio = "<font color='{$color}'>{$ratio}</font>"; } } $res1 = @sql_query("SELECT count(id) FROM messages WHERE receiver=" . $CURUSER["id"] . " AND unread='yes'") or sqlerr(__LINE__, __FILE__); $arr1 = mysql_fetch_row($res1); $unread = $arr1[0]; $inbox = $unread == 1 ? "{$unread} {$lang['gl_msg_singular']}" : "{$unread} {$lang['gl_msg_plural']}"; $res2 = @sql_query("SELECT seeder, count(*) AS pCount FROM peers WHERE userid=" . $CURUSER['id'] . " GROUP BY seeder") or sqlerr(__LINE__, __FILE__); $seedleech = array('yes' => '0', 'no' => '0'); while ($row = mysql_fetch_assoc($res2)) { if ($row['seeder'] == 'yes') { $seedleech['yes'] = $row['pCount']; } else { $seedleech['no'] = $row['pCount']; } } /////////////// REP SYSTEM ///////////// $member_reputation = get_reputation($CURUSER); ////////////// REP SYSTEM END ////////// if ($CURUSER['class'] < UC_VIP && $TBDEV['max_slots']) { $ratioq = $CURUSER['downloaded'] > 0 ? $CURUSER['uploaded'] / $CURUSER['downloaded'] : 1; if ($ratioq < 0.95) { switch (true) { case $ratioq < 0.5: $max = 2; break; case $ratioq < 0.65: $max = 3; break; case $ratioq < 0.8: $max = 5; break; case $ratioq < 0.95: $max = 10; break; default: $max = 10; } } else { switch ($CURUSER['class']) { case UC_USER: $max = 20; break; case UC_POWER_USER: $max = 30; break; default: $max = 99; } } } else { $max = 999; } $usrclass = ""; if ($CURUSER['override_class'] != 255) { $usrclass = " <b>(" . get_user_class_name($CURUSER['class']) . ")</b> "; } elseif ($CURUSER['class'] >= UC_MODERATOR) { $usrclass = " <a href='{$TBDEV['baseurl']}/setclass.php'><b>(" . get_user_class_name($CURUSER['class']) . ")</b></a> "; } $StatusBar = ''; $StatusBar = "<tr>" . "<td colspan='2' style='padding: 2px;'>" . "<div id='statusbar'>" . "<div style='float:left;color:black;'>{$lang['gl_msg_welcome']}, \n\t\t" . format_username($CURUSER) . " {$usrclass} \n\t\t" . " {$member_reputation}" . " | Invites: <a href='{$TBDEV['baseurl']}/invite.php'>{$CURUSER['invites']}</a> |" . "\n\t\t Bonus: <a href='{$TBDEV['baseurl']}/mybonus.php'>{$CURUSER['seedbonus']}</a> | <a href='logout.php'>[{$lang['gl_logout']}]</a>"; if (!$TBDEV['coins']) { $StatusBar .= "\n\t\t<br />{$lang['gl_ratio']}:{$ratio}" . " | {$lang['gl_uploaded']}:{$upped}" . " | {$lang['gl_downloaded']}:{$downed}"; } if ($TBDEV['coins']) { $StatusBar .= " | {$lang['gl_coins']}:<a href='{$TBDEV['baseurl']}/coins.php'>{$CURUSER['coins']}</a> "; } $StatusBar .= " | {$lang['gl_act_torrents']}: <img alt='{$lang['gl_seed_torrents']}' title='{$lang['gl_seed_torrents']}' src='{$TBDEV['pic_base_url']}up.png' /> {$seedleech['yes']}" . " <img alt='{$lang['gl_leech_torrents']}' title='{$lang['gl_leech_torrents']}' src='{$TBDEV['pic_base_url']}dl.png' /> " . ($TBDEV['max_slots'] ? "<a title='I have " . $max . " Download Slots'>{$seedleech['no']}/" . $max . "</a>" : $seedleech['no']) . "</div>" . "<div><p style='text-align:right;'>" . date(DATE_RFC822) . "<br />" . "<a href='./messages.php'>{$inbox}</a></p></div>" . "</div></td></tr>"; return $StatusBar; }
<td class=embedded style='padding-left: 10px'><font size=3><b>Send mass e-mail to all members</b></font></td> </tr></table></p> <table border=1 cellspacing=0 cellpadding=5> <form method=post action=massmail.php> <?php if (get_user_class() == UC_MODERATOR && $CURUSER["class"] > UC_POWER_USER) { printf("<input type=hidden name=class value={$CURUSER['class']}\n"); } else { print "<tr><td class=rowhead>Classe</td><td colspan=2 align=left><select name=or><option value='<'><<option value='>'>><option value='='>=<option value='<='><=<option value='>='>>=</select><select name=class>\n"; if (get_user_class() == UC_MODERATOR) { $maxclass = UC_POWER_USER; } else { $maxclass = get_user_class() - 1; } for ($i = 0; $i <= $maxclass; ++$i) { print "<option value={$i}" . ($CURUSER["class"] == $i ? " selected" : "") . ">{$prefix}" . get_user_class_name($i, false, true, true) . "\n"; } print "</select></td></tr>\n"; } ?> <tr><td class=rowhead>Subject</td><td><input type=text name=subject size=80></td></tr> <tr><td class=rowhead>Body</td><td><textarea name=message cols=80 rows=20></textarea></td></tr> <tr><td colspan=2 align=center><input type=submit value="Send" class=btn></td></tr> </form> </table> <?php stdfoot();
?> </td> </tr> <?php tr($lang_upload['row_torrent_file'] . "<font color=\"red\">*</font>", "<input type=\"file\" class=\"file\" id=\"torrent\" name=\"file\" onchange=\"getname()\" />\n", 1); if ($altname_main == 'yes') { tr($lang_upload['row_torrent_name'], "<b>" . $lang_upload['text_english_title'] . "</b> <input type=\"text\" style=\"width: 250px;\" name=\"name\" /> \n<b>" . $lang_upload['text_chinese_title'] . "</b> <input type=\"text\" style=\"width: 250px\" name=\"cnname\"><br /><font class=\"medium\">" . $lang_upload['text_titles_note'] . "</font>", 1); } else { tr($lang_upload['row_torrent_name'], "<input type=\"text\" style=\"width: 650px;\" id=\"name\" name=\"name\" /><br /><font class=\"medium\">" . $lang_upload['text_torrent_name_note'] . "</font>", 1); } if ($smalldescription_main == 'yes') { tr($lang_upload['row_small_description'], "<input type=\"text\" style=\"width: 650px;\" name=\"small_descr\" /><br /><font class=\"medium\">" . $lang_upload['text_small_description_note'] . "</font>", 1); } get_external_tr(); if ($enablenfo_main == 'yes') { tr($lang_upload['row_nfo_file'], "<input type=\"file\" class=\"file\" name=\"nfo\" /><br /><font class=\"medium\">" . $lang_upload['text_only_viewed_by'] . get_user_class_name($viewnfo_class, false, true, true) . $lang_upload['text_or_above'] . "</font>", 1); } print "<tr><td class=\"rowhead\" style='padding: 3px' valign=\"top\">" . $lang_upload['row_description'] . "<font color=\"red\">*</font></td><td class=\"rowfollow\">"; textbbcode("upload", "descr", "", false); print "</td></tr>\n"; if ($allowtorrents) { $disablespecial = " onchange=\"disableother('browsecat','specialcat')\""; $s = "<select name=\"type\" id=\"browsecat\" " . ($allowtwosec ? $disablespecial : "") . ">\n<option value=\"0\">" . $lang_upload['select_choose_one'] . "</option>\n"; $cats = genrelist($browsecatmode); foreach ($cats as $row) { $s .= "<option value=\"" . $row["id"] . "\">" . htmlspecialchars($row["name"]) . "</option>\n"; } $s .= "</select>\n"; } else { $s = ""; }
return "" . $language['stdhey4'] . ""; case $now >= 21 && $now < 23: return "" . $language['stdhey5'] . ""; case $now >= 0 && $now < 7: return "" . $language['stdhey6'] . ""; default: return "" . $language['stdhey7'] . ""; } } if (get_user_class() >= UC_MODERATOR) { $p = "[<a href=staffpanel.php><font color=red><b>Staffpanel</b></font></a>]"; } if ($CURUSER['override_class'] != 255) { $usrclass = "<b>(" . get_user_class_name($CURUSER['class']) . ")</b>"; } elseif (get_user_class() >= UC_MODERATOR) { $usrclass = "<a href=setclass.php><b>(" . get_user_class_name($CURUSER['class']) . ")</b></a>"; } ?> <div id="statusbar" class="statusbar"> <table width="100%" cellpadding="0" cellspacing="0" border="0" style="border:none;display:block;border-collapse:collapse;height:100%;"> <tr><td align="left" style="border:none; border-collapse:collapse;" valign="middle" nowrap="nowrap"> <b> <?php echo hey(); ?> , <a href="userdetails.php?id=<?php echo $CURUSER['id']; ?> "><?php
$pager = pager($perpage, $count1, 'staffpanel.php?tool=uploader_info&'); //=== main query $res = sql_query('SELECT COUNT(t.id) as how_many_torrents, t.owner, t.added, u.username, u.uploaded, u.downloaded, u.id, u.donor, u.suspended, u.class, u.warned, u.enabled, u.chatpost, u.leechwarn, u.pirate, u.king FROM torrents AS t LEFT JOIN users as u ON u.id = t.owner GROUP BY t.owner ORDER BY how_many_torrents DESC ' . $pager['limit']); if ($count1 > $perpage) { $HTMLOUT .= $pager['pagertop']; } $HTMLOUT .= '<table border="0" cellspacing="0" cellpadding="5"> <tr><td class="colhead" align="center">' . $lang['upinfo_rank'] . '</td><td class="colhead" align="center">' . $lang['upinfo_torrent'] . '</td><td class="colhead" align="left">' . $lang['upinfo_member'] . '</td><td class="colhead" align="left">' . $lang['upinfo_class'] . '</td><td class="colhead" align="left">' . $lang['upinfo_ratio'] . '</td><td class="colhead" align="left">' . $lang['upinfo_ltupload'] . '</td><td class="colhead" align="center">' . $lang['upinfo_sendpm'] . '</td></tr>'; $i = 0; while ($arr = mysqli_fetch_assoc($res)) { $i++; //=== change colors $count = ++$count % 2; $class = $count == 0 ? 'one' : 'two'; $ratio = member_ratio($arr['uploaded'], $INSTALLER09['ratio_free'] ? '0' : $arr['downloaded']); $HTMLOUT .= '<tr> <td class="' . $class . '" align="center">' . $i . '</td> <td class="' . $class . '" align="center">' . (int) $arr['how_many_torrents'] . '</td> <td class="' . $class . '" align="left">' . format_username($arr) . '</td> <td class="' . $class . '" align="left">' . get_user_class_name($arr['class']) . '</td> <td class="' . $class . '" align="left">' . $ratio . '</td> <td class="' . $class . '" align="left">' . get_date($arr['added'], 'DATE', 0, 1) . '</td> <td class="' . $class . '" align="center"><a href="pm_system.php?action=send_message&receiver=' . (int) $arr['id'] . '"><img src="' . $INSTALLER09['pic_base_url'] . '/button_pm.gif" alt="' . $lang['upinfo_pm'] . '" title="' . $lang['upinfo_pm'] . '" border="0" /></a></td> </tr>'; } $HTMLOUT .= '</table>'; if ($count1 > $perpage) { $HTMLOUT .= $pager['pagerbottom']; } echo stdhead($lang['upinfo_stdhead']) . $HTMLOUT . stdfoot();
<?php require "include/bittorrent.php"; dbconn(); require_once get_langfile_path(); loggedinorreturn(); if (get_user_class() < $log_class) { stderr($lang_log['std_sorry'], $lang_log['std_permission_denied_only'] . get_user_class_name($log_class, false, true, true) . $lang_log['std_or_above_can_view'], false); } function permissiondeny() { global $lang_log; stderr($lang_log['std_sorry'], $lang_log['std_permission_denied'], false); } function logmenu($selected = "dailylog") { global $lang_log; global $showfunbox_main; begin_main_frame(); print "<div id=\"lognav\"><ul id=\"logmenu\" class=\"menu\">"; print "<li" . ($selected == "dailylog" ? " class=selected" : "") . "><a href=\"?action=dailylog\">" . $lang_log['text_daily_log'] . "</a></li>"; print "<li" . ($selected == "chronicle" ? " class=selected" : "") . "><a href=\"?action=chronicle\">" . $lang_log['text_chronicle'] . "</a></li>"; if ($showfunbox_main == 'yes') { print "<li" . ($selected == "funbox" ? " class=selected" : "") . "><a href=\"?action=funbox\">" . $lang_log['text_funbox'] . "</a></li>"; } print "<li" . ($selected == "news" ? " class=selected" : "") . "><a href=\"?action=news\">" . $lang_log['text_news'] . "</a></li>"; print "<li" . ($selected == "poll" ? " class=selected" : "") . "><a href=\"?action=poll\">" . $lang_log['text_poll'] . "</a></li>"; print "</ul></div>"; end_main_frame(); } function searchtable($title, $action, $opts = array())
$HTMLOUT .= "<br /><b>{$lang['userdetails_rdonor']}</b><input name='donor' value='no' type='checkbox' /> [ If they were bad ]"; } $HTMLOUT .= "</td></tr>\n"; } // ====End if ($CURUSER['class'] == UC_STAFF && $user["class"] > UC_VIP) { $HTMLOUT .= "<input type='hidden' name='class' value='{$user['class']}' />\n"; } else { $HTMLOUT .= "<tr><td class='rowhead'>Class</td><td colspan='2' align='left'><select name='class'>\n"; if ($CURUSER['class'] == UC_STAFF) { $maxclass = UC_VIP; } else { $maxclass = $CURUSER['class'] - 1; } for ($i = 0; $i <= $maxclass; ++$i) { $HTMLOUT .= "<option value='{$i}'" . ($user["class"] == $i ? " selected='selected'" : "") . ">" . get_user_class_name($i) . "</option>\n"; } $HTMLOUT .= "</select></td></tr>\n"; } $supportfor = htmlspecialchars($user["supportfor"]); $HTMLOUT .= "<tr><td class='rowhead'>{$lang['userdetails_support']}</td><td colspan='2' align='left'><input type='radio' name='support' value='yes'" . ($user["support"] == "yes" ? " checked='checked'" : "") . " />{$lang['userdetails_yes']}<input type='radio' name='support' value='no'" . ($user["support"] == "no" ? " checked='checked'" : "") . " />{$lang['userdetails_no']}</td></tr>\n"; $HTMLOUT .= "<tr><td class='rowhead'>{$lang['userdetails_supportfor']}</td><td colspan='2' align='left'><textarea cols='60' rows='2' name='supportfor'>{$supportfor}</textarea></td></tr>\n"; $modcomment = htmlspecialchars($user["modcomment"]); if ($CURUSER["class"] < UC_SYSOP) { $HTMLOUT .= "<tr><td class='rowhead'>{$lang['userdetails_comment']}</td><td colspan='2' align='left'><textarea cols='60' rows='6' name='modcomment' readonly='readonly'>{$modcomment}</textarea></td></tr>\n"; } else { $HTMLOUT .= "<tr><td class='rowhead'>{$lang['userdetails_comment']}</td><td colspan='2' align='left'><textarea cols='60' rows='6' name='modcomment'>{$modcomment}</textarea></td></tr>\n"; } $HTMLOUT .= "<tr><td class='rowhead'>{$lang['userdetails_add_comment']}</td><td colspan='2' align='left'><textarea cols='60' rows='2' name='addcomment'></textarea></td></tr>\n"; //=== bonus comment $bonuscomment = htmlspecialchars($user["bonuscomment"]);
</table> <?php end_frame(); begin_frame($lang_magic['set_magic_title'], true, 10, "100%", "center"); //print form print "<form action=\"\" method=\"post\"><input type=\"hidden\" name=\"action\" value=\"magic\" />"; //action flag print "<input type=\"hidden\" name=\"action\" value=\"magic\" />"; //table style print "<table width=\"75%\" cellpadding=\"4\"><tbody align=\"left\">"; //print torrent ID and information print "<tr><td class=\"rowhead\" width=\"10%\">" . $lang_magic['torrent_uid'] . "</td><td class=\"rowfollow\"><input type=\"hidden\" name=\"torrentid\" value=" . $id . " />" . $id . "</td></tr>"; print "<tr><td class=\"rowhead\" width=\"10%\">" . $lang_magic['torrent_name'] . "</td><td class=\"rowfollow\">" . $row['name'] . "</td></tr>"; print "<tr><td class=\"rowhead\" width=\"10%\">" . $lang_magic['torrent_size'] . "</td><td class=\"rowfollow\">" . mksize($row['size']) . "</td></tr>"; //print owner rank print "<tr><td class=\"rowhead\" width=\"10%\">" . $lang_magic['torrent_owner'] . "</td><td class=\"rowfollow\">" . "<b><span class='" . get_user_class_name($ownerclass, true) . "_Name'>" . get_user_class_name($ownerclass, false, false, true) . "</span></b></td></tr>"; //print limit text print "<tr><td class=\"rowhead\">" . $lang_magic['promotion_limit'] . "</td><td class=\"rowfollow\"><input type=\"text\" name=\"hours\" value=\"24\" /><br />" . $lang_magic['limit_rule'] . "</td></tr>"; //show free choose print "<tr><td class=\"rowhead\">" . $lang_magic['text_promotion_type'] . "</td><td class=\"rowfollow\"><select name=\"promotion\" class =\"med\" style=\"width: 100px;\"onchange=\"ShowHideCPromotion(this.value,'cp_fields');\"><option value=\"2\" class=\"free\">" . $lang_magic['text_free'] . "</option><option value=\"4\" class=\"twoupfree\">" . $lang_magic['text_free_two_times_up'] . "</option></td></tr>"; //show magic point view print "<tr><td class=\"rowhead\">" . $lang_magic['count_magic'] . "</td><td class=\"rowfollow\"><span id=\"MagicPoint\"><i>" . $lang_magic['wait_to_count'] . "</i></span> <input type=\"button\" onclick=\"countmagic(" . $id . ",this.form)\" value=\"" . $lang_magic['count_the_magic'] . "\" /></td></tr>"; //foot print "</tbody></table>"; //print a button print "<input type=\"submit\" value=\"" . $lang_magic['do_the_magic'] . "\" />"; print "</form>"; end_frame(); end_main_frame(); stdfoot();
exit; } switch ($do) { case "disabled": $query = "SELECT id,username, class, downloaded, uploaded, IF(downloaded>0, round((uploaded/downloaded),2), '---') as ratio, disable_reason, added, last_access FROM users WHERE enabled='no' ORDER BY last_access DESC "; $title = "Disabled users"; $link = "<a href=\"staffpanel.php?tool=warn&action=warn&?do=warned\">warned users</a>"; break; case "warned": $query = "SELECT id, username, class, downloaded, uploaded, IF(downloaded>0, round((uploaded/downloaded),2), '---') as ratio, warn_reason, warned, added, last_access FROM users WHERE warned>='1' ORDER BY last_access DESC, warned DESC "; $title = "Warned users"; $link = "<a href=\"staffpanel.php?tool=warn&action=warn&do=disabled\">disabled users</a>"; break; } $g = sql_query($query) or print mysql_error(); $count = mysql_num_rows($g); $HTMLOUT .= begin_main_frame(); $HTMLOUT .= begin_frame($title . " [<font class=\"small\">total - " . $count . " user" . ($count > 1 ? "s" : "") . "</font>] - " . $link); if ($count == 0) { $HTMLOUT .= stdmsg("hey", "There is no " . strtolower($title)); } else { $HTMLOUT .= "<form action='staffpanel.php?tool=warn&action=warn' method='post'>\r\n\t\t<table width='600' cellpadding='3' cellspacing='2' style='border-collapse:separate;' align='center'>\r\n\t\t<tr> \t\r\n\t\t\t<td class='colhead' align='left' width='100%' >User</td>\r\n\t\t\t<td class='colhead' align='center' nowrap='nowrap'>Ratio</td>\r\n\t\t\t<td class='colhead' align='center' nowrap='nowrap'>Class</td>\r\n\t\t\t<td class='colhead' align='center' nowrap='nowrap'>Last access</td>\r\n\t\t\t<td class='colhead' align='center' nowrap='nowrap'>Joined</td>\r\n\t\t\t<td class='colhead' align='center' nowrap='nowrap'><input type='checkbox' name='checkall' /></td>\r\n\t\t</tr>"; while ($a = mysql_fetch_assoc($g)) { $tip = $do == "warned" ? "Warned for : " . $a["warn_reason"] . "<br />" . " Warned till " . get_date($a["warned"], 'DATE', 1) . " - " . mkprettytime($a['warned'] - time()) : "Disabled for " . $a["disable_reason"]; $HTMLOUT .= "<tr>\r\n\t\t\t\t <td align='left' width='100%'><a href='userdetails.php?id={$a["id"]}' onmouseover=\"Tip('({$tip})')\" onmouseout=\"UnTip()\">{$a["username"]}</a></td>\r\n\t\t\t\t <td align='left' nowrap='nowrap'>{$a["ratio"]}<br /><font class='small'><b>D: </b>" . mksize($a["downloaded"]) . " <b>U:</b> " . mksize($a["uploaded"]) . "</font></td>\r\n\t\t\t\t <td align='center' nowrap='nowrap'>" . get_user_class_name($a["class"]) . "</td>\r\n\t\t\t\t <td align='center' nowrap='nowrap'>" . get_date($a["last_access"], 'LONG', 0, 1) . "</td>\r\n\t\t\t\t <td align='center' nowrap='nowrap'>" . get_date($a["added"], 'DATE', 1) . "</td>\r\n\t\t\t\t <td align='center' nowrap='nowrap'><input type='checkbox' name='users[]' value='{$a["id"]}' /></td>\r\n\t\t\t\t</tr>"; } $HTMLOUT .= "<tr>\r\n\t\t\t<td colspan='6' class='colhead' align='center'>\r\n\t\t\t\t<select name='action'>\r\n\t\t\t\t\t<option value='unwarn'>Unwarn</option>\r\n\t\t\t\t\t<option value='disable'>Disable</option>\r\n\t\t\t\t\t<option value='delete'>Delete</option>\r\n\t\t\t\t</select>\r\n\t\t\t\t»\r\n\t\t\t\t<input type='submit' value='Apply' />\r\n\t\t\t\t<input type='hidden' value='" . htmlspecialchars($_SERVER["REQUEST_URI"]) . "' name='ref' />\r\n\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t</table>\r\n\t\t\t</form>"; } $HTMLOUT .= end_frame(); $HTMLOUT .= end_main_frame(); echo stdhead($title) . $HTMLOUT . stdfoot($stdfoot);
u.username, u.class, u.donor, u.suspended, u.warned, u.enabled , u.chatpost, u.leechwarn, u.pirate, u.king, u.avatar_rights FROM topics AS t LEFT JOIN posts AS p ON p.topic_id = t.id RIGHT JOIN users AS u ON u.id = p.user_id WHERE ' . ($CURUSER['class'] < UC_STAFF ? 'p.status = \'ok\' AND t.status = \'ok\' AND' : ($CURUSER['class'] < $min_delete_view_class ? ' t.status != \'deleted\' AND p.status != \'deleted\' AND' : '')) . ' t.forum_id = ' . $forum_id . ' ORDER BY p.id DESC LIMIT 1'); $last_post_arr = mysql_fetch_assoc($last_post_res); //=== only do more if there is a post there... if ($last_post_arr['last_post'] > 0) { $last_post_id = $last_post_arr['last_post']; //=== get the last post read by CURUSER (with Retro's $readpost_expiry thingie) $last_read_post_res = sql_query('SELECT last_post_read FROM read_posts WHERE user_id=' . $CURUSER['id'] . ' AND topic_id=' . $last_post_arr['topic_id']); $last_read_post_arr = mysql_fetch_row($last_read_post_res); $image_to_use = $last_post_arr['added'] > time() - $readpost_expiry ? !$last_read_post_arr or $last_post_id > $last_read_post_arr[0] : 0; $img = $image_to_use ? 'unlockednew' : 'unlocked'; $last_post = '<span style="white-space:nowrap;">Last Post by: ' . print_user_stuff($last_post_arr) . ' <span style="font-size: x-small;"> [ ' . get_user_class_name($last_post_arr['class']) . ' ] </span><br /> in ► <a class="altlink" href="forums.php?action=view_topic&topic_id=' . $last_post_arr['topic_id'] . '&page=p' . $last_post_id . '#' . $last_post_id . '" title="' . htmlentities($last_post_arr['topic_name'], ENT_QUOTES) . '"> <span style="font-weight: bold;">' . CutName(htmlentities($last_post_arr['topic_name'], ENT_QUOTES), 30) . '</span></a><br /> ' . get_date($last_post_arr['added'], '') . '<br /></span>'; //=== get child boards if any $child_boards_res = sql_query('SELECT name, id FROM forums WHERE parent_forum = ' . $arr_forums['real_forum_id'] . ' AND min_class_read <= ' . $CURUSER['class'] . ' ORDER BY sort ASC'); $child_boards = ''; while ($child_boards_arr = mysql_fetch_assoc($child_boards_res)) { if ($child_boards !== '') { $child_boards .= ', '; } $child_boards .= '<a href="forums.php?action=view_forum&forum_id=' . $child_boards_arr['id'] . '" title="click to view!" class="altlink">' . htmlentities($child_boards_arr['name'], ENT_QUOTES) . '</a>'; } if ($child_boards !== '') { $child_boards = '<hr /><span style="font-size: xx-small;">child boards:</span> ' . $child_boards; }
exit; } $sql = sql_query('SELECT uploaded, downloaded ' . 'FROM users ' . 'WHERE id = ' . sqlesc($CURUSER['id'])) or sqlerr(__FILE__, __LINE__); $User = mysqli_fetch_assoc($sql); $User['uploaded'] = $User['uploaded']; $User['downloaded'] = $User['downloaded']; //== Reset user gamble stats! $hours = 2; //== Hours to wait after using all tries, until they will be restarted $dt = TIME_NOW - $hours * 3600; $res = sql_query("SELECT userid, trys, date, enableplay FROM casino WHERE date < {$dt} AND trys >= '51' AND enableplay = 'yes'"); while ($arr = mysqli_fetch_assoc($res)) { sql_query("UPDATE casino SET trys='0' WHERE userid=" . sqlesc($arr['userid'])) or sqlerr(__FILE__, __LINE__); } if ($CURUSER['class'] < $player) { stderr($lang['gl_sorry'], "" . htmlsafechars($CURUSER["username"]) . " {$lang['casino_the_moderators_do_not_allow_your_class']} " . get_user_class_name($player) . " {$lang['casino_to_play_casino']}"); } $query = "SELECT * from casino where userid = " . sqlesc($CURUSER['id']) . ""; $result = sql_query($query) or sqlerr(__FILE__, __LINE__); if (mysqli_affected_rows($GLOBALS["___mysqli_ston"]) != 1) { sql_query("INSERT INTO casino (userid, win, lost, trys, date, started) VALUES(" . sqlesc($CURUSER["id"]) . ", 0, 0, 0," . TIME_NOW . ",1)") or is_object($GLOBALS["___mysqli_ston"]) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false); $result = sql_query($query) or sqlerr(__FILE__, __LINE__); } $row = mysqli_fetch_assoc($result); $user_win = $row["win"]; $user_lost = $row["lost"]; $user_trys = (int) $row["trys"]; $user_date = (int) $row["date"]; $user_deposit = $row["deposit"]; $user_enableplay = htmlsafechars($row["enableplay"]); if ($user_enableplay == "no") {
} stdhead("Add/Remove invites"); begin_frame(); ?> <form action="<?php echo $_SERVER["PHP_SELF"]; ?> " method="post"> <table width="500" cellpadding="5" cellspacing="0" border="1" align="center"> <tr> <td valign="top" align="right">Classes</td> <td width="100%" align="left" colspan="3"> <?php $r = "<label for=\"all\"><input type=\"checkbox\" name=\"classes[]\" value=\"255\" id=\"all\" />All classes</label><br/>\n"; for ($i = $firstclass; $i < $maxclass + 1; $i++) { $r .= "<label for=\"c{$i}\"><input type=\"checkbox\" name=\"classes[]\" value=\"{$i}\" id=\"c{$i}\" />" . get_user_class_name($i) . " </label><br/>\n"; } echo $r; ?> </td> </tr> <tr> <td valign="top" align="center" >Options</td> <td valign="top">Do <select name="do" > <option value="add">add invites</option> <option value="remove">remove invites</option> <option value="remove_all">Remove all invites</option> </select></td> <td>Invites <input type="text" maxlength="2" name="invites" size="5" /> </td>