function cleanup_show_main() { $count1 = get_row_count('cleanup'); $perpage = 15; $pager = pager($perpage, $count1, 'staffpanel.php?tool=cleanup_manager&'); $htmlout = "<h2>Current Cleanup Tasks</h2>\n <table class='torrenttable' bgcolor='#333333' border='1' cellpadding='5px' width='80%'>\n <tr>\n <td class='colhead'>Cleanup Title & Description</td>\n <td class='colhead' width='150px'>Runs every</td>\n <td class='colhead' width='150px'>Next Clean Time</td>\n <td class='colhead' width='40px'>Edit</td>\n <td class='colhead' width='40px'>Delete</td>\n <td class='colhead' width='40px'>Off/On</td>\n <td class='colhead' style='width: 40px;'>Run now</td>\n </tr>"; $sql = sql_query("SELECT * FROM cleanup ORDER BY clean_time ASC " . $pager['limit']) or sqlerr(__FILE__, __LINE__); if (!mysqli_num_rows($sql)) { stderr('Error', 'F*****g panic now!'); } while ($row = mysqli_fetch_assoc($sql)) { $row['_clean_time'] = get_date($row['clean_time'], 'LONG'); $row['clean_increment'] = $row['clean_increment']; $row['_class'] = $row['clean_on'] != 1 ? " style='color:red'" : ''; $row['_title'] = $row['clean_on'] != 1 ? " (Locked)" : ''; $row['_clean_time'] = $row['clean_on'] != 1 ? "<span style='color:red'>{$row['_clean_time']}</span>" : $row['_clean_time']; $htmlout .= "<tr>\n <td{$row['_class']}><strong>{$row['clean_title']}{$row['_title']}</strong><br />{$row['clean_desc']}</td>\n <td>" . mkprettytime($row['clean_increment']) . "</td>\n <td>{$row['_clean_time']}</td>\n <td align='center'><a href='staffpanel.php?tool=cleanup_manager&action=cleanup_manager&mode=edit&cid={$row['clean_id']}'>\n <img src='./pic/aff_tick.gif' alt='Edit Cleanup' title='Edit' border='0' height='12' width='12' /></a></td>\n\n <td align='center'><a href='staffpanel.php?tool=cleanup_manager&action=cleanup_manager&mode=delete&cid={$row['clean_id']}'>\n <img src='./pic/aff_cross.gif' alt='Delete Cleanup' title='Delete' border='0' height='12' width='12' /></a></td>\n <td align='center'><a href='staffpanel.php?tool=cleanup_manager&action=cleanup_manager&mode=unlock&cid={$row['clean_id']}&clean_on={$row['clean_on']}'>\n <img src='./pic/warned.png' alt='On/Off Cleanup' title='on/off' border='0' height='12' width='12' /></a></td>\n<td align='center'><a href='staffpanel.php?tool=cleanup_manager&action=cleanup_manager&mode=run&cid={$row['clean_id']}'>Run it now</a></td>\n </tr>"; } $htmlout .= "</table>"; if ($count1 > $perpage) { $htmlout .= $pager['pagerbottom']; } $htmlout .= "<br />\n <span class='btn'><a href='./staffpanel.php?tool=cleanup_manager&action=cleanup_manager&mode=new'>Add New</a></span>"; echo stdhead('Cleanup Manager - View') . $htmlout . stdfoot(); }
function set_count_so_far() { $userid = $this->userid; $now = date("Y-m-d H:i:s", TIMENOW - 86400); $countsofar = get_row_count("attachments", "WHERE userid=" . sqlesc($userid) . " AND added > " . sqlesc($now)); $this->countsofar = $countsofar; }
function addbookmark($torrentid) { global $CURUSER; if (get_row_count("bookmarks", "WHERE userid={$CURUSER['id']} AND torrentid = {$torrentid}") > 0) { stderr("Error", "Torrent already bookmarked"); } sql_query("INSERT INTO bookmarks (userid, torrentid) VALUES ({$CURUSER['id']}, {$torrentid})") or sqlerr(__FILE__, __LINE__); }
function addbookmark($torrentid) { global $CURUSER, $mc1, $INSTALLER09; if (get_row_count("bookmarks", "WHERE userid=" . sqlesc($CURUSER['id']) . " AND torrentid = " . sqlesc($torrentid)) > 0) { stderr("Error", "Torrent already bookmarked"); } sql_query("INSERT INTO bookmarks (userid, torrentid) VALUES (" . sqlesc($CURUSER['id']) . ", " . sqlesc($torrentid) . ")") or sqlerr(__FILE__, __LINE__); $mc1->delete_value('bookmm_' . $CURUSER['id']); make_bookmarks($CURUSER['id'], 'bookmm_'); }
/** |--------------------------------------------------------------------------| | https://github.com/Bigjoos/ | |--------------------------------------------------------------------------| | Licence Info: GPL | |--------------------------------------------------------------------------| | Copyright (C) 2010 U-232 V4 | |--------------------------------------------------------------------------| | A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon. | |--------------------------------------------------------------------------| | Project Leaders: Mindless,putyn. | |--------------------------------------------------------------------------| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ ( U | - | 2 | 3 | 2 )-( S | o | u | r | c | e )-( C | o | d | e ) \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ */ function docleanup($data) { global $INSTALLER09, $queries; set_time_limit(0); ignore_user_abort(1); //== 09 Stats $XBT_Seeder = mysqli_fetch_assoc(sql_query("SELECT sum(seeders) AS seeders FROM torrents")) or sqlerr(__FILE__, __LINE__); $XBT_Leecher = mysqli_fetch_assoc(sql_query("SELECT sum(leechers) AS leechers FROM torrents")) or sqlerr(__FILE__, __LINE__); $registered = get_row_count('users'); $unverified = get_row_count('users', "WHERE status='pending'"); $torrents = get_row_count('torrents'); $seeders = XBT_TRACKER == true ? $XBT_Seeder : get_row_count('peers', "WHERE seeder='yes'"); $leechers = XBT_TRACKER == true ? $XBT_Leecher : get_row_count('peers', "WHERE seeder='no'"); $torrentstoday = get_row_count('torrents', 'WHERE added > ' . TIME_NOW . ' - 86400'); $donors = get_row_count('users', "WHERE donor ='yes'"); $unconnectables = XBT_TRACKER == true ? '0' : get_row_count("peers", " WHERE connectable='no'"); $forumposts = get_row_count("posts"); $forumtopics = get_row_count("topics"); $dt = TIME_NOW - 300; // Active users last 5 minutes $numactive = get_row_count("users", "WHERE last_access >= {$dt}"); $torrentsmonth = get_row_count('torrents', 'WHERE added > ' . TIME_NOW . ' - 2592000'); $gender_na = get_row_count('users', "WHERE gender='NA'"); $gender_male = get_row_count('users', "WHERE gender='Male'"); $gender_female = get_row_count('users', "WHERE gender='Female'"); $powerusers = get_row_count('users', "WHERE class='" . UC_POWER_USER . "'"); $disabled = get_row_count('users', "WHERE enabled='no'"); $uploaders = get_row_count('users', "WHERE class='" . UC_UPLOADER . "'"); $moderators = get_row_count('users', "WHERE class='" . UC_MODERATOR . "'"); $administrators = get_row_count('users', "WHERE class='" . UC_ADMINISTRATOR . "'"); $sysops = get_row_count('users', "WHERE class='" . UC_SYSOP . "'"); $seeders = (int) $XBT_Seeder['seeders']; $leechers = (int) $XBT_Leecher['leechers']; sql_query("UPDATE stats SET regusers = '{$registered}', unconusers = '{$unverified}', torrents = '{$torrents}', seeders = '{$seeders}', leechers = '{$leechers}', unconnectables = '{$unconnectables}', torrentstoday = '{$torrentstoday}', donors = '{$donors}', forumposts = '{$forumposts}', forumtopics = '{$forumtopics}', numactive = '{$numactive}', torrentsmonth = '{$torrentsmonth}', gender_na = '{$gender_na}', gender_male = '{$gender_male}', gender_female = '{$gender_female}', powerusers = '{$powerusers}', disabled = '{$disabled}', uploaders = '{$uploaders}', moderators = '{$moderators}', administrators = '{$administrators}', sysops = '{$sysops}' WHERE id = '1' LIMIT 1"); if ($queries > 0) { write_log("Stats clean-------------------- Stats cleanup Complete using {$queries} queries --------------------"); } if (false !== mysqli_affected_rows($GLOBALS["___mysqli_ston"])) { $data['clean_desc'] = mysqli_affected_rows($GLOBALS["___mysqli_ston"]) . " items updated"; } if ($data['clean_log']) { cleanup_log($data); } }
/** * https://github.com/Bigjoos/ * Licence Info: GPL * Copyright (C) 2010 U-232 v.3 * A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon. * Project Leaders: Mindless, putyn. * */ function docleanup($data) { global $INSTALLER09, $queries; set_time_limit(0); ignore_user_abort(1); //== 09 Stats $registered = get_row_count('users'); $unverified = get_row_count('users', "WHERE status='pending'"); $torrents = get_row_count('torrents'); $seeders = get_row_count('peers', "WHERE seeder='yes'"); $leechers = get_row_count('peers', "WHERE seeder='no'"); $torrentstoday = get_row_count('torrents', 'WHERE added > ' . TIME_NOW . ' - 86400'); $donors = get_row_count('users', "WHERE donor ='yes'"); $unconnectables = get_row_count("peers", " WHERE connectable='no'"); $forumposts = get_row_count("posts"); $forumtopics = get_row_count("topics"); $dt = TIME_NOW - 300; // Active users last 5 minutes $numactive = get_row_count("users", "WHERE last_access >= {$dt}"); $torrentsmonth = get_row_count('torrents', 'WHERE added > ' . TIME_NOW . ' - 2592000'); $gender_na = get_row_count('users', "WHERE gender='N/A'"); $gender_male = get_row_count('users', "WHERE gender='Male'"); $gender_female = get_row_count('users', "WHERE gender='Female'"); $powerusers = get_row_count('users', "WHERE class='1'"); $disabled = get_row_count('users', "WHERE enabled='no'"); $uploaders = get_row_count('users', "WHERE class='3'"); $moderators = get_row_count('users', "WHERE class='4'"); $administrators = get_row_count('users', "WHERE class='5'"); $sysops = get_row_count('users', "WHERE class='6'"); sql_query("UPDATE stats SET regusers = '{$registered}', unconusers = '{$unverified}', torrents = '{$torrents}', seeders = '{$seeders}', leechers = '{$leechers}', unconnectables = '{$unconnectables}', torrentstoday = '{$torrentstoday}', donors = '{$donors}', forumposts = '{$forumposts}', forumtopics = '{$forumtopics}', numactive = '{$numactive}', torrentsmonth = '{$torrentsmonth}', gender_na = '{$gender_na}', gender_male = '{$gender_male}', gender_female = '{$gender_female}', powerusers = '{$powerusers}', disabled = '{$disabled}', uploaders = '{$uploaders}', moderators = '{$moderators}', administrators = '{$administrators}', sysops = '{$sysops}' WHERE id = '1' LIMIT 1"); if ($queries > 0) { write_log("Stats clean-------------------- Stats cleanup Complete using {$queries} queries --------------------"); } if (false !== mysqli_affected_rows($GLOBALS["___mysqli_ston"])) { $data['clean_desc'] = mysqli_affected_rows($GLOBALS["___mysqli_ston"]) . " items updated"; } if ($data['clean_log']) { cleanup_log($data); } }
<?php print "<td align=center class=tabletitle><b>" . $lang_usercp['text_recently_read_topics'] . "</b></td>"; ?> </table> <?php print "<table border=0 cellspacing=0 cellpadding=3 width=940><tr>" . "<td class=colhead align=left width=80%>" . $lang_usercp['col_topic_title'] . "</td>" . "<td class=colhead align=center><nobr>" . $lang_usercp['col_replies'] . "/" . $lang_usercp['col_views'] . "</nobr></td>" . "<td class=colhead align=center>" . $lang_usercp['col_topic_starter'] . "</td>" . "<td class=colhead align=center width=20%>" . $lang_usercp['col_last_post'] . "</td>" . "</tr>"; $res_topics = sql_query("SELECT * FROM readposts INNER JOIN topics ON topics.id = readposts.topicid WHERE readposts.userid = " . $CURUSER[id] . " ORDER BY readposts.id DESC LIMIT 5") or sqlerr(); while ($topicarr = mysql_fetch_assoc($res_topics)) { $topicid = $topicarr["id"]; $topic_title = $topicarr["subject"]; $topic_userid = $topicarr["userid"]; $topic_views = $topicarr["views"]; $views = number_format($topic_views); /// GETTING TOTAL NUMBER OF POSTS /// if (!($posts = $Cache->get_value('topic_' . $topicid . '_post_count'))) { $posts = get_row_count("posts", "WHERE topicid=" . sqlesc($topicid)); $Cache->cache_value('topic_' . $topicid . '_post_count', $posts, 3600); } $replies = max(0, $posts - 1); /// GETTING USERID AND DATE OF LAST POST /// $arr = get_post_row($topicarr['lastpost']); $postid = 0 + $arr["id"]; $userid = 0 + $arr["userid"]; $added = gettime($arr['added'], true, false); /// GET NAME OF LAST POSTER /// $username = get_username($userid); /// GET NAME OF THE AUTHOR /// $author = get_username($topic_userid); $subject = "<a href=forums.php?action=viewtopic&topicid={$topicid}><b>" . htmlspecialchars($topicarr["subject"]) . "</b></a>"; print "<tr class=tableb><td style='padding-left: 10px' align=left class=rowfollow>{$subject}</td>" . "<td align=center class=rowfollow>" . $replies . "/" . $views . "</td>" . "<td align=center class=rowfollow>" . $author . "</td>" . "<td align=center class=rowfollow><nobr>" . $added . " | " . $username . "</nobr></td></tr>"; }
} } else { $HTMLOUT .= begin_frame(); $s = isset($_GET["s"]) ? htmlsafechars($_GET["s"]) : ""; $w = isset($_GET["w"]) ? htmlsafechars($_GET["w"]) : ""; if ($s && $w == "name") { $where = "WHERE s.name LIKE " . sqlesc("%" . $s . "%"); } elseif ($s && $w == "imdb") { $where = "WHERE s.imdb LIKE " . sqlesc("%" . $s . "%"); } elseif ($s && $w == "comment") { $where = "WHERE s.comment LIKE " . sqlesc("%" . $s . "%"); } else { $where = ""; } $link = $s && $w ? "s={$s}&w={$w}&" : ""; $count = get_row_count("subtitles AS s", "{$where}"); if ($count == 0 && !$s && !$w) { stdmsg("", "There is no subtitle, go <a href=\"subtitles.php?mode=upload\">here</a> and start uploading.", false); } $perpage = 5; $pager = pager($perpage, $count, "subtitles.php?" . $link); $res = sql_query("SELECT s.id, s.name,s.lang, s.imdb,s.fps,s.poster,s.cds,s.hits,s.added,s.owner,s.comment, u.username FROM subtitles AS s LEFT JOIN users AS u ON s.owner=u.id {$where} ORDER BY s.added DESC {$pager['limit']}") or sqlerr(__FILE__, __LINE__); $HTMLOUT .= "<table width='700' cellpadding='5' cellspacing='0' border='0' align='center' style='font-weight:bold'>\n<tr><td style='border:none' valign='middle'>\n<fieldset style='text-align:center; border:#0066CC solid 1px; background-color:#999999'>\n<legend style='text-align:center; border:#0066CC solid 1px ; background-color:#999999;font-size:13px;'><b>Search</b></legend>\n<form action='subtitles.php' method='get'>\n<input size='50' value='" . $s . "' name='s' type='text' />\n<select name='w'>\n<option value='name' " . ($w == "name" ? "selected='selected'" : "") . ">Name</option>\n<option value='imdb' " . ($w == "imdb" ? "selected='selected'" : "") . ">IMDb</option>\n<option value='comment' " . ($w == "comment" ? "selected='selected'" : "") . ">Comments</option>\n</select>\n<input type='submit' value='Search' /> <input type='button' onclick=\"window.location.href='subtitles.php?mode=upload'\" value='Upload' />\n</form></fieldset></td></tr>"; if ($s) { $HTMLOUT .= "<tr><td style='border:none;'>Search result for <i>'{$s}'</i><br />" . (mysqli_num_rows($res) == 0 ? "Nothing found! Try again with a refined search string." : "") . "</td></tr>"; } $HTMLOUT .= "\n</table>\n<br />"; if (mysqli_num_rows($res) > 0) { if ($count > $perpage) { $HTMLOUT .= "<div align=\"left\" style=\"padding:5px\">{$pager['pagertop']}</div>"; }
} if ($hours > 0) { $mins_elapsed = floor(($st - $hours * 60 * 60) / 60); $secs_elapsed = floor($st - $mins * 60); return "<font color='red'><b>{$hours}:{$mins_elapsed}:{$secs_elapsed}</b></font>"; } if ($mins > 0) { $secs_elapsed = floor($st - $mins * 60); return "<font color='red'><b>0:{$mins}:{$secs_elapsed}</b></font>"; } if ($secs > 0) { return "<font color='red'><b>0:0:{$secs}</b></font>"; } return "<font color='red'><b>{$lang['ad_snatched_torrents_none']}<br />{$lang['ad_snatched_torrents_reported']}</b></font>"; } $count = number_format(get_row_count("snatched", "WHERE complete_date != '0'")); $HTMLOUT .= "<h2 align='center'>{$lang['ad_snatched_torrents_allsnatched']}</h2>\r\n<font class='small'>{$lang['ad_snatched_torrents_currently']} " . htmlspecialchars($count) . " {$lang['ad_snatched_torrents_snatchedtor']}</font>"; $HTMLOUT .= begin_main_frame(); $res = sql_query("SELECT COUNT(id) FROM snatched") or sqlerr(); $row = mysql_fetch_row($res); $count = $row[0]; $snatchedperpage = 15; $pager = pager($snatchedperpage, $count, "staffpanel.php?tool=snatched_torrents&action=snatched_torrents&"); if ($count > $snatchedperpage) { $HTMLOUT .= $pager['pagertop']; } $sql = "SELECT sn.userid, sn.id, sn.torrentid, sn.timesann, sn.hit_and_run, sn.mark_of_cain, sn.uploaded, sn.downloaded, sn.start_date, sn.complete_date, sn.seeder, sn.leechtime, sn.seedtime, u.username, t.name " . "FROM snatched AS sn " . "LEFT JOIN users AS u ON u.id=sn.userid " . "LEFT JOIN torrents AS t ON t.id=sn.torrentid WHERE complete_date != '0'" . "ORDER BY sn.complete_date DESC " . $pager['limit'] . ""; $result = sql_query($sql) or print mysql_error(); if (mysql_num_rows($result) != 0) { $HTMLOUT .= "<table width='100%' border='1' cellspacing='0' cellpadding='5' align='center'>\r\n<tr>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_name']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_torname']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_hnr']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_marked']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_announced']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_upload']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_download']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_seedtime']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_leechtime']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_startdate']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_enddate']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_seeding']}</td>\r\n</tr>"; while ($row = mysql_fetch_assoc($result)) {
$HTMLOUT = ''; $HTMLOUT .= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n\t\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n\t\t<html xmlns='http://www.w3.org/1999/xhtml'>\r\n\t\t<head>\r\n\t\t<title>Error!</title>\r\n\t\t</head>\r\n\t\t<body>\r\n\t<div style='font-size:33px;color:white;background-color:red;text-align:center;'>Incorrect access<br />You cannot access this file directly.</div>\r\n\t</body></html>"; print $HTMLOUT; exit; } require_once INCL_DIR . 'user_functions.php'; require_once INCL_DIR . 'pager_functions.php'; require_once INCL_DIR . 'html_functions.php'; require_once INCL_DIR . 'bbcode_functions.php'; $lang = array_merge($lang); if (!min_class(UC_STAFF)) { header("Location: {$TBDEV['baseurl']}/index.php"); } $HTMLOUT = ""; // ////////////////////// $count1 = get_row_count('shoutbox'); $perpage = 15; $pager = pager($perpage, $count1, 'admin.php?action=shistory&'); $res = sql_query("SELECT s.id, s.userid, s.date , s.text, s.to_user, u.username, u.pirate, u.king, u.enabled, u.class, u.donor, u.warned, u.leechwarn, u.chatpost FROM shoutbox as s LEFT JOIN users as u ON s.userid=u.id ORDER BY s.date DESC " . $pager['limit'] . "") or sqlerr(__FILE__, __LINE__); if ($count1 > $perpage) { $HTMLOUT .= $pager['pagertop']; } $HTMLOUT .= begin_main_frame(); if (mysql_num_rows($res) == 0) { $HTMLOUT .= "No shouts here"; } else { $HTMLOUT .= "<table align='center' border='0' cellspacing='0' cellpadding='2' width='100%' class='small'>\n"; while ($arr = mysql_fetch_assoc($res)) { if ($arr['to_user'] != $CURUSER['id'] && $arr['to_user'] != 0 && $arr['userid'] != $CURUSER['id']) { continue; }
} if (isset($CURUSER)) { header("Location: {$INSTALLER09['baseurl']}/index.php"); exit; } ini_set('session.use_trans_sid', '0'); $stdfoot = array('js' => array('check', 'jquery.pstrength-min.1.2', 'jquery.simpleCaptcha-0.2')); if (!$INSTALLER09['openreg']) { stderr('Sorry', 'Invite only - Signups are closed presently if you have an invite code click <a href="' . $INSTALLER09['baseurl'] . '/invite_signup.php"><b> Here</b></a>'); } $HTMLOUT = $year = $month = $day = $gender = ''; $HTMLOUT .= "\n <script type='text/javascript'>\n /*<![CDATA[*/\n \$(function() {\n \$('.password').pstrength();\n });\n /*]]>*/\n </script>"; $lang = array_merge(load_language('global'), load_language('signup')); $newpage = new page_verify(); $newpage->create('tesu'); if (get_row_count('users') >= $INSTALLER09['maxusers']) { stderr($lang['stderr_errorhead'], sprintf($lang['stderr_ulimit'], $INSTALLER09['maxusers'])); } //==timezone select $offset = (string) $INSTALLER09['time_offset']; $time_select = "<select name='user_timezone'>"; foreach ($TZ as $off => $words) { if (preg_match("/^time_(-?[\\d\\.]+)\$/", $off, $match)) { $time_select .= $match[1] == $offset ? "<option value='{$match[1]}' selected='selected'>{$words}</option>\n" : "<option value='{$match[1]}'>{$words}</option>\n"; } } $time_select .= "</select>"; //==country by pdq function countries() { global $mc1, $INSTALLER09;
maxcoder(); if (!logged_in()) { header("HTTP/1.0 404 Not Found"); // moddifed logginorreturn by retro//Remember to change the following line to match your server print "<html><h1>Not Found</h1><p>The requested URL /{$_SERVER['PHP_SELF']} was not found on this server.</p><hr /><address>Apache/1.1.11 " . $SITENAME . " Server at " . $_SERVER['SERVER_NAME'] . " Port 80</address></body></html>\n"; die; } if (get_user_class() < UC_ADMINISTRATOR) { hacker_dork("Reset Ratio - Nosey C**t !"); } if ($_SERVER["REQUEST_METHOD"] == "POST") { $tid = isset($_POST["tid"]) ? 0 + $_POST["tid"] : 0; if ($tid == 0) { stderr(":w00t:", "wtf are your trying to do!?"); } if (get_row_count("torrents", "where id=" . $tid) != 1) { stderr(":w00t:", "That is not a torrent !!!!"); } $q = mysql_query("SELECT s.downloaded as sd , t.id as tid, t.name,t.size, u.username,u.id as uid,u.downloaded as ud FROM torrents as t LEFT JOIN snatched as s ON s.torrentid = t.id LEFT JOIN users as u ON u.id = s.userid WHERE t.id =" . $tid) or print mysql_error(); while ($a = mysql_fetch_assoc($q)) { $newd = $a["ud"] > 0 ? $a["ud"] - $a["sd"] : 0; $new_download[] = "(" . $a["uid"] . "," . $newd . ")"; $tname = $a["name"]; $msg = "Hey , " . $a["username"] . "\n"; $msg .= "Looks like torrent [b]" . $a["name"] . "[/b] is nuked and we want to take back the data you downloaded\n"; $msg .= "So you downloaded " . prefixed($a["sd"]) . " your new download will be " . prefixed($newd) . "\n"; $pms[] = "(0," . $a["uid"] . "," . sqlesc(get_date_time()) . "," . sqlesc($msg) . ")"; } //send the pm !! mysql_query("INSERT into messages (sender, receiver, added, msg) VALUES " . join(",", $pms)) or print mysql_error(); //update user download amount
require "include/bittorrent.php"; require_once "include/bbcode_functions.php"; dbconn(true); maxcoder(); if (!logged_in()) { header("HTTP/1.0 404 Not Found"); // moddifed logginorreturn by retro//Remember to change the following line to match your server print "<html><h1>Not Found</h1><p>The requested URL /{$_SERVER['PHP_SELF']} was not found on this server.</p><hr /><address>Apache/1.1.11 " . $SITENAME . " Server at " . $_SERVER['SERVER_NAME'] . " Port 80</address></body></html>\n"; die; } if (get_user_class() < UC_MODERATOR) { hacker_dork("Admin Bookmarks - Nosey C**t !"); } stdhead("Staff Bookmarks"); begin_main_frame(); $addbookmark = number_format(get_row_count("users", "WHERE addbookmark='yes'")); begin_frame("In total ({$addbookmark})", true); begin_table(); ?> <table cellpadding="4" cellspacing="1" border="0" style="width:800px" class="tableinborder" ><tr><td class="tabletitle">ID</td><td class="tabletitle" align="left">Username</td><td class="tabletitle" align="left">Suspicion</td><td class="tabletitle" align="left">Uploaded</td><td class="tabletitle" align="left">Downloaded</td><td class="tabletitle" align="left">Ratio</td></tr> <?php $res = mysql_query("SELECT id,username,bookmcomment,uploaded,downloaded FROM users WHERE addbookmark='yes' ORDER BY id") or print mysql_error(); while ($arr = @mysql_fetch_assoc($res)) { if ($arr["downloaded"] != 0) { $ratio = number_format($arr["uploaded"] / $arr["downloaded"], 3); } else { $ratio = "---"; } $ratio = "<font color=" . get_ratio_color($ratio) . ">{$ratio}</font>"; $uploaded = prefixed($arr["uploaded"]); $downloaded = prefixed($arr["downloaded"]);
} $do = safeChar($_POST['do']); if ($do == 'enabled') { sql_query("UPDATE users SET enabled = 'yes' WHERE ID IN(" . join(', ', $ids) . ") AND enabled = 'no'"); } elseif ($do == 'confirm') { sql_query("UPDATE users SET status = 'confirmed' WHERE ID IN(" . join(', ', $ids) . ") AND status = 'pending'"); } elseif ($do == 'delete') { sql_query("DELETE FROM users WHERE ID IN(" . join(', ', $ids) . ")"); } else { header('Location: ' . $_SERVER['PHP_SELF']); exit; } } $disabled = number_format(get_row_count("users", "WHERE enabled='no'")); $pending = number_format(get_row_count("users", "WHERE status='pending'")); $count = number_format(get_row_count("users", "WHERE enabled='no' OR status='pending' ORDER BY username DESC")); $perpage = '25'; list($pagertop, $pagerbottom, $limit) = pager($perpage, $count, $_SERVER['PHP_SELF'] . "?"); $res = mysql_query("SELECT id, username, added, downloaded, uploaded, last_access, class, donor, warned, enabled, status FROM users WHERE enabled='no' OR status='pending' ORDER BY username DESC"); stdhead("ACP Manager"); begin_main_frame("Disabled Users: [{$disabled}] | Pending Users: [{$pending}]"); ?> <script language="Javascript" type="text/javascript">eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('6 2="3";6 d=b 9;f e(a){c(2=="3"){4(1=0;1<a.5;1++){a[1].7=8}2="8"}g{4(1=0;1<a.5;1++){a[1].7=3}2="3"}};',17,17,'|i|checkflag|false|for|length|var|checked|true|Array||new|if|marked_row|check|function|else'.split('|'),0,{}))</script><?php if (mysql_num_rows($res) != 0) { echo $pagertop; begin_table('', true); ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?> " method="post" name="viewusers">
<td class="colhead"><?php echo $lang_admanage['col_end_time']; ?> </td> <td class="colhead"><?php echo $lang_admanage['col_clicks']; ?> </td> <td class="colhead"><?php echo $lang_admanage['col_action']; ?> </td> </tr> <?php while ($row = mysql_fetch_array($res)) { $clickcount = get_row_count("adclicks", "WHERE adid=" . sqlesc($row['id'])); ?> <tr> <td class="colfollow"><?php echo $row['enabled'] ? "<font color=\"green\">" . $lang_admanage['text_yes'] . "</font>" : "<font color=\"red\">" . $lang_admanage['text_no'] . "</font>"; ?> </td> <td class="colfollow"><?php echo htmlspecialchars($row['name']); ?> </td> <td class="colfollow"><?php echo get_position_name($row['position']); ?> </td> <td class="colfollow"><?php
<h1 style="text-align:center;">Error</h1> <div style="font-size:33px;color:white;background-color:red;text-align:center;">Incorrect access<br />You cannot access this file directly.</div> </body></html>'; echo $HTMLOUT; exit; } require_once INCL_DIR . 'user_functions.php'; require_once INCL_DIR . 'pager_functions.php'; require_once INCL_DIR . 'html_functions.php'; require_once INCL_DIR . 'bbcode_functions.php'; require_once CLASS_DIR . 'class_check.php'; class_check(UC_STAFF); $lang = array_merge($lang, load_language('ad_shistory')); $HTMLOUT = ''; // ////////////////////// $count1 = get_row_count('shoutbox', "WHERE staff_shout='no'"); $perpage = (int) $CURUSER['postsperpage']; if (!$perpage) { $perpage = 15; } $pager = pager($perpage, $count1, 'staffpanel.php?tool=shistory&'); $res = sql_query("SELECT s.id, s.userid, s.date , s.text, s.to_user, u.username, u.pirate, u.king, u.enabled, u.class, u.donor, u.warned, u.leechwarn, u.chatpost FROM shoutbox as s LEFT JOIN users as u ON s.userid=u.id WHERE staff_shout='no' AND (to_user ={$CURUSER['id']} OR userid ={$CURUSER['id']} OR to_user =0) ORDER BY s.date DESC " . $pager['limit']) or sqlerr(__FILE__, __LINE__); if ($count1 > $perpage) { $HTMLOUT .= $pager['pagertop'] . "<br>"; } $HTMLOUT .= "<div class='row'><div class='col-md-12'>"; if (mysqli_num_rows($res) == 0) { $HTMLOUT .= $lang['shistory_none']; } else { $HTMLOUT .= "<table class='table table-bordered'>\n"; while ($arr = mysqli_fetch_assoc($res)) {
} else { $status = "<a href=checkuser.php?id={$arr['id']}><font color=#ca0226>" . $lang_invite['text_pending'] . "</font></a>"; } print "<tr class=rowfollow>{$user}<td>{$arr['email']}</td><td class=rowfollow>" . mksize($arr[uploaded]) . "</td><td class=rowfollow>" . mksize($arr[downloaded]) . "</td><td class=rowfollow>{$ratio}</td><td class=rowfollow>{$status}</td>"; if ($CURUSER[id] == $id || get_user_class() >= UC_SYSOP) { print "<td>"; if ($arr[status] == 'pending') { print "<input type=\"checkbox\" name=\"conusr[]\" value=\"" . $arr[id] . "\" />"; } print "</td>"; } print "</tr>"; } } if ($CURUSER[id] == $id || get_user_class() >= UC_SYSOP) { $pendingcount = number_format(get_row_count("users", "WHERE status='pending' AND invited_by={$CURUSER['id']}")); if ($pendingcount) { print "<input type=hidden name=email value={$arr['email']}>"; print "<tr><td colspan=7 align=right><input type=submit style='height: 20px' value=" . $lang_invite['submit_confirm_users'] . "></td></tr>"; } print "</form>"; print "<tr><td colspan=7 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></td></tr>"; } print "</table>"; $rul = sql_query("SELECT COUNT(*) FROM invites WHERE inviter =" . mysql_real_escape_string($id)) or sqlerr(); $arre = mysql_fetch_row($rul); $number1 = $arre[0]; $rer = sql_query("SELECT invitee, hash, time_invited FROM invites WHERE inviter = " . mysql_real_escape_string($id)) or sqlerr(); $num1 = mysql_num_rows($rer); print "<table border=1 width=737 cellspacing=0 cellpadding=5>" . "<h2 align=center>" . $lang_invite['text_sent_invites_status'] . " ({$number1})</h2>"; if (!$num1) {
function check_whether_exist($id, $place = 'forum') { global $lang_forums; int_check($id, true); switch ($place) { case 'forum': $count = get_row_count("forums", "WHERE id=" . sqlesc($id)); if (!$count) { stderr($lang_forums['std_error'], $lang_forums['std_no_forum_id']); } break; case 'topic': $count = get_row_count("topics", "WHERE id=" . sqlesc($id)); if (!$count) { stderr($lang_forums['std_error'], $lang_forums['std_bad_topic_id']); } $forumid = get_single_value("topics", "forumid", "WHERE id=" . sqlesc($id)); check_whether_exist($forumid, 'forum'); break; case 'post': $count = get_row_count("posts", "WHERE id=" . sqlesc($id)); if (!$count) { stderr($lang_forums['std_error'], $lang_forums['std_no_post_id']); } $topicid = get_single_value("posts", "topicid", "WHERE id=" . sqlesc($id)); check_whether_exist($topicid, 'topic'); break; } }
<?php require_once "include/bittorrent.php"; dbconn(); require_once get_langfile_path(); loggedinorreturn(); parked(); if ($CURUSER["uploadpos"] == 'no') { stderr($lang_upload['std_sorry'], $lang_upload['std_unauthorized_to_upload'], false); } if ($enableoffer == 'yes') { $has_allowed_offer = get_row_count("offers", "WHERE allowed='allowed' AND userid = " . sqlesc($CURUSER["id"])); } else { $has_allowed_offer = 0; } $uploadfreely = user_can_upload("torrents"); $allowtorrents = $has_allowed_offer || $uploadfreely; $allowspecial = user_can_upload("music"); if (!$allowtorrents && !$allowspecial) { stderr($lang_upload['std_sorry'], $lang_upload['std_please_offer'], false); } $allowtwosec = $allowtorrents && $allowspecial; $brsectiontype = $browsecatmode; $spsectiontype = $specialcatmode; $showsource = $allowtorrents && get_searchbox_value($brsectiontype, 'showsource') || $allowspecial && get_searchbox_value($spsectiontype, 'showsource'); //whether show sources or not $showmedium = $allowtorrents && get_searchbox_value($brsectiontype, 'showmedium') || $allowspecial && get_searchbox_value($spsectiontype, 'showmedium'); //whether show media or not $showcodec = $allowtorrents && get_searchbox_value($brsectiontype, 'showcodec') || $allowspecial && get_searchbox_value($spsectiontype, 'showcodec'); //whether show codecs or not $showstandard = $allowtorrents && get_searchbox_value($brsectiontype, 'showstandard') || $allowspecial && get_searchbox_value($spsectiontype, 'showstandard');
$uid = isset($_GET['id']) && is_valid_id($_GET['id']) ? 0 + $_GET['id'] : 0; $do = isset($_GET['do']) && in_array($_GET['do'], array('check', '')) ? $_GET['do'] : ''; $order = isset($_GET['order']) && in_array($_GET['order'], array('access', 'ip')) ? $_GET['order'] : 'access'; switch ($do) { case 'check': #ipban check break; default: $res = sql_query("SELECT username FROM users WHERE id =" . sqlesc($uid) . "") or sqlerr(__FILE__, __LINE__); if (mysql_num_rows($res) == 0) { stderr("Error", "User not found"); exit; } $perpage = 5; $username = mysql_result($res, 0); $count = get_row_count("iplog", 'WHERE userid =' . $uid); $pager = pager($perpage, $count, 'admin.php?action=iphistory&id=' . $uid . '&' . (($order == 'access' ? 'order=access' : 'order=ip') . '&')); $q1 = sql_query('SELECT u.id,INET_ATON(u.ip) as cip, l.ip, l.access AS last_access, (SELECT count(u2.id) FROM users as u2 WHERE u2.id != u.id AND INET_ATON(u2.ip) = l.ip ) as log_count, (SELECT count(b.id) FROM bans as b WHERE l.ip >= first AND l.ip <= last ) as ban_count FROM users as u LEFT JOIN iplog as l ON u.id = l.userid WHERE u.id = ' . $uid . ' ORDER BY ' . ($order == 'access' ? 'l.access' : 'l.ip') . ' DESC ' . $pager['limit']) or sqlerr(__FILE__, __LINE__); $HTMLOUT = begin_main_frame() . begin_frame("Historical IP addresses used by <a href='{$TBDEV['baseurl']}/userdetails.php?id={$uid}'><b>" . $username . "</b></a>", true); if ($count > $perpage) { $HTMLOUT .= $pager['pagertop']; } $HTMLOUT .= begin_table() . "<tr>\r\n\t<td class='colhead'><a class='colhead' href='{$TBDEV['baseurl']}/admin.php?action=iphistory&id=" . $uid . "&order=access'>Last access</a></td>\n\r\n\t<td class='colhead'><a class='colhead' href='{$TBDEV['baseurl']}/admin.php?action=iphistory&id=" . $uid . "&order=ip'>IP</a></td>\n\r\n\t<td class='colhead'>Hostname</td>\n\r\n\t</tr>\n"; while ($a = mysql_fetch_assoc($q1)) { $HTMLOUT .= "<tr><td>" . get_date($a["last_access"], 'DATE', 1, 0) . "</td>\n"; $ip = long2ip($a['ip']); if ($a['log_count'] >= 1) { $HTMLOUT .= "<td><b><a href='{$TBDEV['baseurl']}/admin.php?action=ipsearch&ip=" . $ip . "' title='ip used by other persons'>" . $ip . "</a></b></td>\n"; } elseif ($a['ban_count'] > 0) { $HTMLOUT .= "<td><a href='{$TBDEV['baseurl']}/admin.php?action=testip&ip=" . $ip . "' title='ip banned'><font color='#FF0000' ><b>" . $ip . "</b></font></a></td>\n"; } else {
\_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ */ if (!defined('IN_INSTALLER09_ADMIN')) { $HTMLOUT = ''; $HTMLOUT .= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n\t\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\t\t<html xmlns='http://www.w3.org/1999/xhtml'>\n\t\t<head>\n\t\t<title>Error!</title>\n\t\t</head>\n\t\t<body>\n\t<div style='font-size:33px;color:white;background-color:red;text-align:center;'>Incorrect access<br />You cannot access this file directly.</div>\n\t</body></html>"; echo $HTMLOUT; exit; } require_once INCL_DIR . 'user_functions.php'; require_once INCL_DIR . 'pager_functions.php'; require_once CLASS_DIR . 'class_check.php'; $class = get_access(basename($_SERVER['REQUEST_URI'])); class_check($class); $lang = array_merge($lang, load_language('ad_upinfo')); $HTMLOUT = $count = ''; $count1 = get_row_count('torrents'); $perpage = 15; $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;
// === subscribe to thread if ($_GET["subscribe"]) { $subscribe = 0 + $_GET["subscribe"]; if ($subscribe != '1') { stderr("Error", "I smell a rat!"); } if (!isset($_GET[topicid])) { stderr("Error", "No forum selected!"); } if ($_GET["topicid"]) { $topicid = 0 + safechar($_GET["topicid"]); if (ereg("^[0-9]+\$", !$topicid)) { stderr("Error", "Bad Topic Id!"); } } if (get_row_count("subscriptions", "WHERE userid={$CURUSER['id']} AND topicid = {$topicid}") > 0) { stderr("Error", "Already subscribed to thread number <b> {$topicid}</b><br><br>Click <a href=forums.php?action=viewtopic&topicid={$topicid}><b>HERE</b></a> to go back to the thread. Or click <a href=subscriptions.php><b>HERE</b></a> to view your subscriptions."); } sql_query("INSERT INTO subscriptions (userid, topicid) VALUES ({$CURUSER['id']}, {$topicid})") or sqlerr(__FILE__, __LINE__); $res = sql_query("SELECT subject FROM `topics` WHERE id={$topicid}") or sqlerr(__FILE__, __LINE__); $arr = mysql_fetch_assoc($res) or stderr("Error", "Bad forum id!"); $forumname = $arr["subject"]; stderr("Sucksex", "Successfully subscribed to thread <b>{$forumname}</b><br><br>Click <a href=forums.php?action=viewtopic&topicid={$topicid}><b>HERE</b></a> to go back to the thread. Or click <a href=subscriptions.php><b>HERE</b></a> to view your subscriptions."); } // === end subscribe to thread // === Action: Delete subscription if ($_GET["delete"]) { if (!isset($_POST[deletesubscription])) { stderr("Error", "Nothing selected"); } $checked = $_POST['deletesubscription'];
write_log("{$lang['ad_banemail_log1']} {$remove} {$lang['ad_banemail_log2']} {$CURUSER['username']}"); } if ($_SERVER["REQUEST_METHOD"] == "POST") { $email = htmlsafechars(trim($_POST["email"])); $comment = htmlsafechars(trim($_POST["comment"])); if (!$email || !$comment) { stderr("{$lang['ad_banemail_error']}", "{$lang['ad_banemail_missing']}"); } sql_query("INSERT INTO bannedemails (added, addedby, comment, email) VALUES(" . TIME_NOW . ", " . sqlesc($CURUSER['id']) . ", " . sqlesc($comment) . ", " . sqlesc($email) . ")") or sqlerr(__FILE__, __LINE__); header("Location: staffpanel.php?tool=bannedemails"); die; } $HTMLOUT .= begin_frame("{$lang['ad_banemail_add']}", true); $HTMLOUT .= "<form method=\"post\" action=\"staffpanel.php?tool=bannedemails\">\n<table border='1' cellspacing='0' cellpadding='5'>\n<tr><td class='rowhead'>{$lang['ad_banemail_email']}</td>\n<td><input type=\"text\" name=\"email\" size=\"40\"/></td></tr>\n<tr><td class='rowhead'align='left'>{$lang['ad_banemail_comment']}</td>\n<td><input type=\"text\" name=\"comment\" size=\"40\"/></td></tr>\n<tr><td colspan='2'>{$lang['ad_banemail_info']}</td></tr>\n<tr><td colspan='2' align='center'>\n<input type=\"submit\" value=\"{$lang['ad_banemail_ok']}\" class=\"btn\"/></td></tr>\n</table></form>\n"; $HTMLOUT .= end_frame(); $count1 = get_row_count('bannedemails'); $perpage = 15; $pager = pager($perpage, $count1, 'staffpanel.php?tool=bannedemails&'); $res = sql_query("SELECT b.id, b.added, b.addedby, b.comment, b.email, u.username FROM bannedemails AS b LEFT JOIN users AS u ON b.addedby=u.id ORDER BY added DESC " . $pager['limit']) or sqlerr(__FILE__, __LINE__); $HTMLOUT .= begin_frame("{$lang['ad_banemail_current']}", true); if ($count1 > $perpage) { $HTMLOUT .= $pager['pagertop']; } if (mysqli_num_rows($res) == 0) { $HTMLOUT .= "<p align='center'><b>{$lang['ad_banemail_nothing']}</b></p>\n"; } else { $HTMLOUT .= "<table border='1' cellspacing='0' cellpadding='5'>\n"; $HTMLOUT .= "<tr><td class='colhead'>{$lang['ad_banemail_add1']}</td><td class='colhead' align='left'>{$lang['ad_banemail_email']}</td>" . "<td class='colhead' align='left'>{$lang['ad_banemail_by']}</td><td class='colhead' align='left'>{$lang['ad_banemail_comment']}</td><td class='colhead'>{$lang['ad_banemail_remove']}</td></tr>\n"; while ($arr = mysqli_fetch_assoc($res)) { $HTMLOUT .= "<tr><td align='left'>" . get_date($arr['added'], '') . "</td>\n <td align='left'>" . htmlsafechars($arr['email']) . "</td>\n <td align='left'><a href='{$INSTALLER09['baseurl']}/userdetails.php?id=" . (int) $arr['addedby'] . "'>" . htmlsafechars($arr['username']) . "</a></td>\n <td align='left'>" . htmlsafechars($arr['comment']) . "</td>\n <td align='left'><a href='staffpanel.php?tool=bannedemails&remove=" . (int) $arr['id'] . "'>{$lang['ad_banemail_remove1']}</a></td></tr>\n"; }
<th class="table_head"><?php echo T_("DATE_COMPLETED"); ?> </th> <th class="table_head"><?php echo T_("RATIO"); ?> </th> </tr> <?php while ($row = mysql_fetch_assoc($res)) { if ($row["privacy"] == "strong" && $CURUSER["edit_users"] == "no") { continue; } $ratio = $row["downloaded"] > 0 ? $row["uploaded"] / $row["downloaded"] : 0; $peers = get_row_count("peers", "WHERE torrent = '{$id}' AND userid = '{$row['id']}' AND seeder = 'yes'") ? "<font color='green'>" . T_("YES") . "</font>" : "<font color='#ff0000'>" . T_("NO") . "</font>"; ?> <tr> <td class="table_col1"><a href="account-details.php?id=<?php echo $row["id"]; ?> "><?php echo $row["username"]; ?> </a></td> <td class="table_col2"><?php echo $peers; ?> </td> <td class="table_col1"><?php echo utc_to_tz($row["date"]);
begin_frame(T_("NOTICE")); echo $site_config['SITENOTICE']; end_frame(); } //Site News if ($site_config['NEWSON'] && $CURUSER['view_news'] == "yes") { begin_frame(T_("NEWS")); $res = SQL_Query_exec("SELECT news.id, news.title, news.added, news.body, users.username FROM news LEFT JOIN users ON news.userid = users.id ORDER BY added DESC LIMIT 10"); if (mysql_num_rows($res) > 0) { print "<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td>\n<ul>"; $news_flag = 0; while ($array = mysql_fetch_assoc($res)) { if (!$array["username"]) { $array["username"] = T_('UNKNOWN_USER'); } $numcomm = get_row_count("comments", "WHERE news='" . $array['id'] . "'"); // Show first 2 items expanded if ($news_flag < 2) { $disp = "block"; $pic = "minus"; } else { $disp = "none"; $pic = "plus"; } print "<br /><a href=\"javascript: klappe_news('a" . $array['id'] . "')\"><img border=\"0\" src=\"" . $site_config["SITEURL"] . "/images/{$pic}.gif\" id=\"pica" . $array['id'] . "\" alt=\"Show/Hide\" />"; print " <b>" . $array['title'] . "</b></a> - <b>" . T_("POSTED") . ":</b> " . date("d-M-y", utc_to_tz_time($array['added'])) . " <b>" . T_("BY") . ":</b> {$array['username']}"; print "<div id=\"ka" . $array['id'] . "\" style=\"display: {$disp};\"> " . format_comment($array["body"]) . " <br /><br />" . T_("COMMENTS") . " (<a href='comments.php?type=news&id=" . $array['id'] . "'>" . number_format($numcomm) . "</a>)</div><br /> "; $news_flag++; } print "</ul></td></tr></table>\n"; } else {
**/ require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'bittorrent.php'; require_once INCL_DIR . 'user_functions.php'; require_once INCL_DIR . 'pager_functions.php'; require_once INCL_DIR . 'html_functions.php'; dbconn(); loggedinorreturn(); $lang = array_merge(load_language('global')); $HTMLOUT = ''; $id = isset($_GET["id"]) ? 0 + $_GET["id"] : "0"; if ($id == "0") { stderr("Err", "I dont think so!"); } $ur = mysql_query("SELECT username from users WHERE id=" . sqlesc($id) . ""); $user = mysql_fetch_array($ur) or stderr("Error", "No user found"); $count = get_row_count("happylog", "WHERE userid={$id} "); $perpage = 30; $pager = pager($perpage, $count, "happylog.php?id={$id}&"); $res = mysql_query("SELECT h.userid, h.torrentid, h.date, h.multi , t.name FROM happylog as h LEFT JOIN torrents AS t on t.id=h.torrentid WHERE h.userid=" . sqlesc($id) . " ORDER BY h.date DESC " . $pager['limit'] . " ") or sqlerr(); $HTMLOUT .= begin_main_frame(); $HTMLOUT .= begin_frame("Happy hour log for " . htmlspecialchars($user["username"]) . ""); if (mysql_num_rows($res) > 0) { $HTMLOUT .= $pager['pagertop']; $HTMLOUT .= "<table class='main' border='1' cellspacing='0' cellpadding='5'>\r\n <tr><td class='colhead' style='width:100%'>Torrent Name</td>\r\n <td class='colhead'>Multiplier</td>\r\n <td class='colhead' nowrap='nowrap'>Date started</td></tr>"; while ($arr = mysql_fetch_assoc($res)) { $HTMLOUT .= "<tr><td><a href='details.php?id=" . htmlspecialchars($arr["torrentid"]) . "'>" . htmlspecialchars($arr["name"]) . "</a></td>\r\n <td>" . $arr["multi"] . "</td>\r\n <td nowrap='nowrap'>" . get_date($arr["date"], 'LONG', 1, 0) . "</td></tr>"; } $HTMLOUT .= "</table>"; $HTMLOUT .= $pager['pagerbottom']; } else { $HTMLOUT .= "No torrents downloaded in happy hour!";
*/ require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'bittorrent.php'; dbconn(); $torrent_pass = isset($_GET["torrent_pass"]) ? htmlsafechars($_GET["torrent_pass"]) : ''; $feed = isset($_GET["type"]) && $_GET['type'] == 'dl' ? 'dl' : 'web'; $cats = isset($_GET["cats"]) ? $_GET["cats"] : ''; if ($cats) { $validate_cats = explode(',', $cats); $cats = implode(', ', array_map('intval', $validate_cats)); $cats = implode(', ', array_map('sqlesc', $validate_cats)); } if (!empty($torrent_pass)) { if (strlen($torrent_pass) != 32) { die("Your passkey is not long enough! Go to " . $INSTALLER09['site_name'] . " and reset your passkey"); } else { if (get_row_count("users", "where torrent_pass="******"Your passkey is invalid !Go to " . $INSTALLER09['site_name'] . " and reset your passkey"); } } } else { die('Your link doesn\'t have a passkey'); } $INSTALLER09['rssdescr'] = $INSTALLER09['site_name'] . " some motto goes here!"; $where = !empty($cats) ? "t.category IN (" . $cats . ") AND " : ''; $counts = array(15, 30, 50, 100); if (!empty($_GET["count"]) && in_array((int) $_GET["count"], $counts)) { $limit = 'LIMIT ' . (int) $_GET['count']; } else { $limit = 'LIMIT 15'; } header("Content-Type: application/xml");
$friend = mysql_num_rows($r); $r = mysql_query("SELECT id FROM blocks WHERE userid={$userid} AND blockid={$id}") or sqlerr(__FILE__, __LINE__); $block = mysql_num_rows($r); if (!$friend || $block) { if ($user["showfriends"] != "yes" && $CURUSER["id"] != $user["id"] && get_user_class() < UC_MODERATOR) { stderr("<br />Sorry", "This members friends list is private."); } } stdhead("Friends list for " . $user['username']); begin_frame(); print "<p><table class=main border=0 cellspacing=0 cellpadding=0>" . "<tr><td class=embedded><h1 style='margin:0px'> Friends list for {$user['username']}</h1></td></tr></table></p>\n"; if ($CURUSER['id'] != $user['id']) { print '<h3><a href=\'userdetails.php?id=' . $userid . '\'>Go to ' . $user['username'] . '\'s Profile</a></h3><br />'; } print "<table class=main width=737 border=0 cellspacing=0 cellpadding=0><tr><td class=embedded>"; $fcount = number_format(get_row_count("friends", "WHERE userid='" . $userid . "' AND confirmed = 'yes'")); // print("<h2 align=left><a name=\"friends\">".$user['username']." has ".$fcount." Friends</a></h2>\n"); print "<h2 align=left><a name=\"friends\">" . $user['username'] . " has " . $fcount . " Friend " . ($fcount > 1 ? "s" : "") . "</a></h2>\n"; print "<table width=737 border=1 cellspacing=0 cellpadding=5><tr><td>"; $i = 0; $res = mysql_query("SELECT f.friendid as id, u.username AS name, u.class, u.avatar, u.title, u.donor, u.warned, u.enabled, u.last_access FROM friends AS f LEFT JOIN users as u ON f.friendid = u.id WHERE userid={$userid} AND f.confirmed='yes' ORDER BY name") or sqlerr(__FILE__, __LINE__); if (mysql_num_rows($res) == 0) { $friends = "<em>" . $user['username'] . " has no friends.</em>"; } else { while ($friend = mysql_fetch_array($res)) { $pm_pic = "<img src=" . $pic_base_url . "button_pm.gif alt='Send PM' border=0>"; $dt = gmtime() - 180; $online = $friend["last_access"] >= '' . get_date_time($dt) . '' ? ' <img src=' . $pic_base_url . 'user_online.gif border=0 alt=Online>' : '<img src=' . $pic_base_url . 'user_offline.gif border=0 alt=Offline>'; $title = htmlspecialchars($friend["title"]); if (!$title) { $title = get_user_class_name($friend["class"]);
$r = sql_query($query); $result = array(); if ($err = is_object($GLOBALS["___mysqli_ston"]) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)) { return $err; } if (@mysqli_num_rows($r)) { while ($row = mysqli_fetch_array($r)) { $result[] = $row; } } if (count($result) == 0) { return $default_value; } return $result; } $count1 = get_row_count('events'); $perpage = 15; $pager = pager($perpage, $count1, 'staffpanel.php?tool=events&action=events&'); $scheduled_events = mysql_fetch_all("SELECT e.id, e.userid, e.startTime, e.endTime, e.overlayText, e.displayDates, e.freeleechEnabled, e.duploadEnabled, e.hdownEnabled, u.id, u.username, u.class, u.chatpost, u.leechwarn, u.warned, u.pirate, u.king, u.donor, u.enabled FROM events AS e LEFT JOIN users AS u ON u.id=e.userid ORDER BY startTime DESC " . $pager['limit'] . ";", array()); if (is_array($scheduled_events)) { foreach ($scheduled_events as $scheduled_event) { if (is_array($scheduled_event) && array_key_exists('startTime', $scheduled_event) && array_key_exists('endTime', $scheduled_event)) { $startTime = 0; $endTime = 0; $overlayText = ""; $displayDates = true; $startTime = $scheduled_event['startTime']; $endTime = $scheduled_event['endTime']; if (time() < $endTime && time() > $startTime) { if (array_key_exists('overlayText', $scheduled_event)) { $overlayText = $scheduled_event['overlayText'];
// | | // | You should have received a copy of the GNU General Public License | // | along with TBDevYSE; if not, write to the Free Software Foundation, | // | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | // +--------------------------------------------------------------------------+ // | Do not remove above lines! | // +--------------------------------------------------------------------------+ */ require "include/bittorrent.php"; dbconn(); loggedinorreturn(); if (get_user_class() < UC_MODERATOR) { stderr($tracker_lang['error'], "Отказано в доступе."); } stdhead("Предупрежденные пользователи"); $warned = number_format(get_row_count("users", "WHERE warned='yes'")); begin_frame("Предупрежденные пользователи: ({$warned})", true); begin_table(); $res = sql_query("SELECT * FROM users WHERE warned=1 AND enabled='yes' ORDER BY (users.uploaded/users.downloaded)") or sqlerr(__FILE__, __LINE__); $num = mysql_num_rows($res); print "<table border=1 width=675 cellspacing=0 cellpadding=2><form action=\"nowarn.php\" method=post>\n"; print "<tr align=center><td class=colhead width=90>Пользователь</td>\n<td class=colhead width=70>Зарегистрирован</td>\n<td class=colhead width=75>Последний раз был на трекере</td>\n<td class=colhead width=75>Класс</td>\n<td class=colhead width=70>Закачал</td>\n<td class=colhead width=70>Раздал</td>\n<td class=colhead width=45>Рейтинг</td>\n<td class=colhead width=125>Окончание</td>\n<td class=colhead width=65>Убрать</td>\n<td class=colhead width=65>Отключить</td></tr>\n"; for ($i = 1; $i <= $num; $i++) { $arr = mysql_fetch_assoc($res); if ($arr['added'] == '0000-00-00 00:00:00') { $arr['added'] = '-'; } if ($arr['last_access'] == '0000-00-00 00:00:00') { $arr['last_access'] = '-'; } if ($arr["downloaded"] != 0) {