コード例 #1
0
ファイル: events.php プロジェクト: thefkboss/U-232
 *   Licence Info: GPL
 *   Copyright (C) 2010 BTDev Installer v.1
 *   A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon.
 *   Project Leaders: Mindless,putyn.
 **/
if (!defined('IN_TBDEV_ADMIN')) {
    $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 . 'bbcode_functions.php';
require_once INCL_DIR . 'html_functions.php';
$HTMLOUT = "";
if (!min_class(UC_SYSOP)) {
    // or just simply: if (!min_class(UC_STAFF))
    header("Location: {$TBDEV['baseurl']}/index.php");
}
function mysql_fetch_all($query, $default_value = array())
{
    $r = @mysql_query($query);
    $result = array();
    if ($err = mysql_error()) {
        return $err;
    }
    if (@mysql_num_rows($r)) {
        while ($row = mysql_fetch_array($r)) {
            $result[] = $row;
        }
    }
コード例 #2
0
ファイル: freeleech.php プロジェクト: thefkboss/U-232
/**
 *   http://btdev.net:1337/svn/test/Installer09_Beta
 *   Licence Info: GPL
 *   Copyright (C) 2010 BTDev Installer v.1
 *   A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon.
 *   Project Leaders: Mindless,putyn.
 **/
/** freeleech mod by pdq for TBDev.net 2009**/
if (!defined('IN_TBDEV_ADMIN')) {
    $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';
if (!min_class(UC_ADMINISTRATOR)) {
    // or just simply: if (!min_class(UC_STAFF))
    header("Location: {$TBDEV['baseurl']}/index.php");
}
$HTMLOUT = '';
if (isset($_GET['remove'])) {
    $configfile = "<" . "?php\n\n/**\nThis file created on " . date('M d Y H:i:s') . ".\nfreeleech mod by pdq for TBDev.net 2009.\n**/\n\n\$free = array(\n";
    $configfile .= "array('modifier'=> 0, 'expires'=> 'Inf.', 'setby'=> 'No One', 'title'=> 'Add title', 'message'=> 'Add Message')";
    $configfile .= "\n);\n\n?" . ">";
    $filenum = fopen('cache/free_cache.php', 'w');
    ftruncate($filenum, 0);
    fwrite($filenum, $configfile);
    fclose($filenum);
    header("Location: {$TBDEV['baseurl']}/admin.php?action=freeleech");
    die;
}
コード例 #3
0
ファイル: topten.php プロジェクト: thefkboss/U-232
    $htmlout .= end_table();
    $htmlout .= end_frame();
    return $htmlout;
}
$HTMLOUT = '';
$HTMLOUT .= begin_main_frame();
//  $r = sql_query("SELECT * FROM users ORDER BY donated DESC, username LIMIT 100") or die;
//  donortable($r, "Top 10 Donors");
$type = isset($_GET["type"]) ? 0 + $_GET["type"] : 0;
if (!in_array($type, array(1, 2, 3))) {
    $type = 1;
}
$limit = isset($_GET["lim"]) ? 0 + $_GET["lim"] : false;
$subtype = isset($_GET["subtype"]) ? $_GET["subtype"] : false;
$HTMLOUT .= "<p align='center'>" . ($type == 1 && !$limit ? "<b>{$lang['common_users']}</b>" : "<a href='topten.php?type=1'>{$lang['common_users']}</a>") . " | " . ($type == 2 && !$limit ? "<b>{$lang['nav_torrents']}</b>" : "<a href='topten.php?type=2'>{$lang['nav_torrents']}</a>") . " | " . ($type == 3 && !$limit ? "<b>{$lang['nav_countries']}</b>" : "<a href='topten.php?type=3'>{$lang['nav_countries']}</a>") . " | " . ($type == 4 && !$limit ? "<b>{$lang['nav_peers']}</b>" : "<a href='topten.php?type=4'>{$lang['nav_peers']}</a>") . "</p>\n";
$pu = min_class() >= UC_POWER_USER;
if (!$pu) {
    $limit = 10;
}
if ($type == 1) {
    $mainquery = "SELECT id as userid, username, added, uploaded, downloaded, uploaded / (" . time() . " - added) AS upspeed, downloaded / (" . time() . " - added) AS downspeed FROM users WHERE enabled = 'yes' AND anonymous='no'";
    if (!$limit || $limit > 250) {
        $limit = 10;
    }
    if ($limit == 10 || $subtype == "ul") {
        $order = "uploaded DESC";
        $r = sql_query($mainquery . " ORDER BY {$order} " . " LIMIT {$limit}") or sqlerr();
        $HTMLOUT .= usertable($r, sprintf($lang['user_topulers'], $limit) . ($limit == 10 && $pu ? " <font class='small'> - [<a href='topten.php?type=1&amp;lim=100&amp;subtype=ul'>{$lang['common_top100']}</a>] - [<a href='topten.php?type=1&amp;lim=250&amp;subtype=ul'>{$lang['common_top250']}</a>]</font>" : ""));
    }
    if ($limit == 10 || $subtype == "dl") {
        $order = "downloaded DESC";
コード例 #4
0
ファイル: shistory.php プロジェクト: thefkboss/U-232
|   $shistory
|   $Bigjoos/Putyn/pdq
+------------------------------------------------
*/
if (!defined('IN_TBDEV_ADMIN')) {
    $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&amp;');
$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 {
コード例 #5
0
ファイル: cheaters.php プロジェクト: thefkboss/U-232
 *   Copyright (C) 2010 BTDev Installer v.1
 *   A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon.
 *   Project Leaders: Mindless,putyn.
 **/
if (!defined('IN_TBDEV_ADMIN')) {
    $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 . 'html_functions.php';
require_once INCL_DIR . 'pager_functions.php';
$lang = array_merge($lang, load_language('cheaters'));
$HTMLOUT = "";
if (!min_class(UC_MODERATOR)) {
    // or just simply: if (!min_class(UC_STAFF))
    stderr($lang['cheaters_error'], "{$lang['cheaters_rc']}");
}
if (isset($_POST["nowarned"]) && $_POST["nowarned"] == "nowarned") {
    if (empty($_POST["desact"]) && empty($_POST["remove"])) {
        stderr("Error...", "You must select a user.");
    }
    if (!empty($_POST["remove"])) {
        mysql_query("DELETE FROM cheaters WHERE id IN (" . implode(", ", $_POST["remove"]) . ")") or sqlerr(__FILE__, __LINE__);
    }
    if (!empty($_POST["desact"])) {
        mysql_query("UPDATE users SET enabled = 'no' WHERE id IN (" . implode(", ", $_POST["desact"]) . ")") or sqlerr(__FILE__, __LINE__);
    }
}
$HTMLOUT .= begin_main_frame();