Exemplo n.º 1
0
<?php

/*
* BtiTracker v1.5.0 is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2014 Btiteam.org
*/
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
dbconn();
standardheader('Comments');
if (!user::$current || user::$current["uid"] == 1) {
    err_msg(ERROR, ONLY_REG_COMMENT);
    stdfoot();
    exit;
}
$comment = $db->real_escape_string($_POST["comment"]);
$id = $db->real_escape_string($_GET["id"]);
if (isset($_GET["cid"])) {
    $cid = intval($_GET["cid"]);
} else {
    $cid = 0;
}
function comment_form()
{
    global $comment, $id, $cid;
    block_begin(NEW_COMMENT);
    $comment = str_replace('\\r\\n', "\n", $comment);
    ?>
    <center>
    <form enctype='multipart/form-data' name='comment' method='post'>
Exemplo n.º 2
0
<?php

/*
* BtiTracker v1.5.0 is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2014 Btiteam.org
*/
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
dbconn();
standardheader('Torrent Details');
if (!user::$current || user::$current["view_torrents"] != "yes") {
    err_msg(ERROR . NOT_AUTHORIZED . " " . MNU_TORRENT . "!", SORRY . "...");
    stdfoot();
    exit;
}
block_begin(TORRENT_DETAIL);
$id = AddSlashes(isset($_GET["id"]) ? $_GET["id"] : false);
if (!isset($id) || !$id) {
    die(ERROR_ID . ": " . $id);
}
if (isset($_GET["act"])) {
    print "<center>" . TORRENT_UPDATE . "</center>";
    require_once INCL_PATH . 'getscrape.php';
    scrape(urldecode($_GET["surl"]), $id);
    redirect("details.php?id=" . $id);
    exit;
}
if (isset($_GET["vote"]) && $_GET["vote"] == VOTE) {
    if (isset($_GET["rating"]) && $_GET["rating"] == 0) {
        err_msg(ERROR, ERR_NO_VOTE);
Exemplo n.º 3
0
            standardheader("Login");
            print "<br /><br /><div align='center'><font size='2' color='#FF0000'>" . ERR_USERNAME_INCORRECT . "</font></div>";
            login();
        } elseif (md5($row["random"] . $row["password"] . $row["random"]) != md5($row["random"] . md5($pwd) . $row["random"])) {
            standardheader("Login");
            print "<br /><br /><div align='center'><font size='2' color='#FF0000'>" . ERR_PASSWORD_INCORRECT . "</font></div>";
            login();
        } else {
            $db->query("UPDATE users SET loginhash = '" . md5(vars::$ip . $row['password']) . "' WHERE id = " . (int) $row['id']);
            $salted = md5($GLOBALS["salting"] . $row["random"] . $row["password"] . $row["random"]);
            logincookie((int) $row["id"], $salted);
            if (isset($_GET["returnto"])) {
                $url = security::html_safe(urldecode($_GET["returnto"]));
            } else {
                $url = "index.php";
            }
            redirect($url);
        }
    } else {
        standardheader("Login");
        login();
        exit;
    }
} else {
    if (isset($_GET["returnto"])) {
        $url = security::html_safe(urldecode($_GET["returnto"]));
    } else {
        $url = "index.php";
    }
    redirect($url);
}
Exemplo n.º 4
0
<?php

/*
* BtiTracker v1.5.1 is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2015 Btiteam.org
*/
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
dbconn();
standardheader('Password Recovery', true);
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $email = trim(htmlentities(urldecode($_POST["email"])));
    if (!$email) {
        stderr(ERROR, ERR_NO_EMAIL);
    }
    $res = $db->query("SELECT * FROM users WHERE email = " . sqlesc($email) . " LIMIT 1");
    $arr = $res->fetch_assoc() or stderr(ERROR, ERR_EMAIL_NOT_FOUND_1 . " <b>" . $email . "</b> " . ERR_EMAIL_NOT_FOUND_2);
    if ($USE_IMAGECODE) {
        if (extension_loaded('gd')) {
            $arrgd = gd_info();
            if ($arrgd['FreeType Support'] == 1) {
                $public = $_POST['public_key'];
                $private = $_POST['private_key'];
                $p = new ocr_captcha();
                if ($p->check_captcha($public, $private) != true) {
                    stderr(ERROR, ERR_IMAGE_CODE);
                }
            }
        }
    }
Exemplo n.º 5
0
            echo "</tr>";
            $menu = 1;
        }
        print "<tr><td class='lista' align='center'>" . $num . "</td><td class='lista' align='left'>";
        print "<a href='" . "details.php?id=" . $a['hash'] . "'>" . "<b>";
        print security::html_safe($a["name"]) . "</b></a></td>";
        if ($speed != "true") {
            print "<td class='lista' align='center' width='10%' ><a href='torrent_history.php?id=" . $a["hash"] . "'>" . number_format((int) $a["finished"]) . "</a></td><td class='lista' align='center' width='10%' ><a href='peers.php?id=" . $a["hash"] . "'>" . number_format((int) $a["seeds"]) . "</a></td><td class='lista' align='center' width='10%' > <a href='peers.php?id=" . $a["hash"] . "'>" . number_format((int) $a["leechers"]) . "</a></td><td class='lista' align='center' width='10%' > <a href='peers.php?id=" . $a["hash"] . "'>" . number_format((int) $a["leechers"] + (int) $a["seeds"]) . "</a></td><td class='lista' align='center' width='10%'>" . $ratio . "</td>\n";
        } else {
            print "<td class='lista' align='center'>" . misc::makesize((int) $a["speed"]) . "/s" . "\n";
        }
    }
    end_table();
    block_end();
}
standardheader('Tracker Statistics');
// the display the box only if number of rows is > 0
if (user::$current["view_users"] == "yes") {
    $r = $db->query("SELECT * FROM users WHERE uploaded > 0 ORDER BY uploaded DESC LIMIT 10") or die;
    if ($r->num_rows > 0) {
        usertable($r, TOP_10_UPLOAD);
        echo "<br /><br />";
    }
    $r = $db->query("SELECT * FROM users WHERE uploaded > 0 AND downloaded > 0 ORDER BY downloaded DESC LIMIT 10") or die;
    if ($r->num_rows > 0) {
        usertable($r, TOP_10_DOWNLOAD);
        echo "<br /><br />";
    }
    $r = $db->query("SELECT * FROM users WHERE downloaded > 104857600 ORDER BY uploaded - downloaded DESC LIMIT 10") or die;
    if ($r->num_rows > 0) {
        usertable($r, TOP_10_SHARE . " <font class='lista'>" . MINIMUM_100_DOWN . "</font>");
Exemplo n.º 6
0
<?php

//Torrent RSS by DiemThuy ( jul 2012 ) TBDEV conversion with some improvements; Adapated by Yupy for BtiTracker...
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
dbconn();
if (user::$current['view_torrents'] == 'yes') {
    standardheader('RSS');
    $res = $db->query("SELECT id, name, image FROM categories ORDER BY name");
    while ($cat = $res->fetch_assoc()) {
        if ($cat['image'] == '') {
            $catoptions .= '';
        } else {
            $catoptions .= "<a href='torrents.php?category=" . $cat['id'] . "'>" . image_or_link($cat['image'] == '' ? '' : "{$STYLEPATH}/images/categories/" . $cat['image'], '', security::html_safe($cat['name'])) . "</a><input type='checkbox' name='cat[]' value='" . (int) $cat['id'] . "' " . (strpos($CURUSER['notifs'], "[cat{$cat['id']}]") !== false ? " checked" : '') . "/>";
        }
    }
    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
        if (empty($_POST['cat'])) {
            stderr('Error', 'You need to chose at least one Category !');
        }
        if (empty($_POST['feed'])) {
            stderr('Error', 'You need to chose a feed type !');
        }
        $link = $BASEURL . '/rss_torrents.php';
        if ($_POST['feed'] == 'dl') {
            $query[] = 'feed=dl';
        }
        foreach ($_POST['cat'] as $cat) {
            $query[] = 'cat[]=' . $cat;
        }
        $query[] = 'pid=' . user::$current['pid'];
        $queries = implode('&', $query);
Exemplo n.º 7
0
<?php

/*
* BtiTracker v1.5.1 is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2015 Btiteam.org
*/
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
dbconn();
standardheader('User Details');
block_begin(USER_DETAILS);
$id = intval(0 + $_GET['id']);
if (!isset($_GET['returnto'])) {
    $_GET["returnto"] = '';
}
$link = rawurlencode($_GET['returnto']);
if (user::$current['view_users'] != 'yes') {
    err_msg(ERROR, NOT_AUTHORIZED . ' ' . MEMBERS);
    block_end();
    stdfoot();
    die;
}
if ($id > 1) {
    $res = $db->query("SELECT users.cip, UNIX_TIMESTAMP(users.joined) AS joined, UNIX_TIMESTAMP(users.lastconnect) AS lastconnect, users_level.level, users_level.prefixcolor, users_level.suffixcolor, countries.name, countries.flagpic, users.pid, users.time_offset FROM users INNER JOIN users_level ON users_level.id = users.id_level LEFT JOIN countries ON users.flag = countries.id WHERE users.id = " . $id);
    $num = $res->num_rows;
    #Stats Upped, Downed, etc...
    $user_stats = MCached::get('user::stats::' . $id);
    if ($user_stats === MCached::NO_RESULT) {
        $stats = $db->query('SELECT uploaded, downloaded FROM users WHERE id = ' . $id);
        $user_stats = $stats->fetch_assoc();
Exemplo n.º 8
0
<?php

/*
* BtiTracker v1.5.1 is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2015 Btiteam.org
*/
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
dbconn();
standardheader('Forum');
if (!user::$current || user::$current["view_forum"] != "yes") {
    stderr(ERROR, NOT_AUTHORIZED . " " . MNU_FORUM);
}
if (isset($_GET["action"])) {
    $action = security::html_safe($_GET["action"]);
} else {
    $action = "";
}
function catch_up()
{
    global $db;
    $userid = user::$current["uid"];
    $res = $db->query("SELECT id, lastpost FROM topics");
    while ($arr = $res->fetch_assoc()) {
        $topicid = (int) $arr["id"];
        $postid = (int) $arr["lastpost"];
        $r = $db->query("SELECT id, lastpostread FROM readposts WHERE userid = " . $userid . " AND topicid = " . $topicid) or sqlerr(__FILE__, __LINE__);
        if ($r->num_rows == 0) {
            $db->query("INSERT INTO readposts (userid, topicid, lastpostread) VALUES(" . $userid . ", " . $topicid . ", " . $postid . ")") or sqlerr(__FILE__, __LINE__);
        } else {
Exemplo n.º 9
0
<?php

/*
* BtiTracker v1.5.0 is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2014 Btiteam.org
*/
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
dbconn();
standardheader('Users Search', false);
if (isset($_GET['action']) && $_GET['action']) {
    $action = security::html_safe($_GET['action']);
} else {
    $action = '';
}
if ($action = "find") {
    ?>
    <form action='searchusers.php?action=find' name='users' method='post'>
    <div align='center'>
    <table class='lista'>
    <tr>
        <td><?php 
    echo USER_NAME;
    ?>
:</td>
        <td class='lista'><input type='text' name='user' size='40' maxlength='40' /></td>
        <td class='lista'><input type='submit' name='confirm' value='Search' /></td>
    </tr>
    </table>
    </div>
Exemplo n.º 10
0
<?php

/*
* BtiTracker v1.5.1 is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2015 Btiteam.org
*/
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
dbconn(true);
standardheader('User Control Panel');
$uid = isset($_GET["uid"]) ? intval($_GET["uid"]) : 1;
?>
<script type="text/javascript">
<!--
var newwindow;
function popusers(url)
{
newwindow=window.open(url,'popusers','height=100,width=450');
if (window.focus) {newwindow.focus()}
}
// -->
</script>
<?php 
if (user::$current["uid"] != $uid || user::$current["uid"] == 1) {
    err_msg(ERROR, ERR_USER_NOT_USER);
    stdfoot();
    exit;
} else {
    $utorrents = user::$current["torrentsperpage"];
    if (isset($_GET["do"])) {
Exemplo n.º 11
0
<?php

/*
* BtiTracker v1.5.0 is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2014 Btiteam.org
*/
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
dbconn();
standardheader('Edit Torrents');
$scriptname = $_SERVER["PHP_SELF"];
$link = $_GET["returnto"];
if ($link == "") {
    $link = "details.php?id=" . $row["info_hash"];
}
if (isset($_POST["comment"]) && isset($_POST["name"])) {
    if ($_POST["action"] == FRM_CONFIRM) {
        if ($_POST["name"] == '') {
            err_msg("Error!", "You must specify torrent name.");
            stdfoot();
            exit;
        }
        if ($_POST["comment"] == '') {
            err_msg("Error!", "You must specify description.");
            stdfoot();
            exit;
        }
        $fname = sqlesc(security::html_safe($_POST["name"]));
        $torhash = AddSlashes($_POST["info_hash"]);
        write_log("Modified torrent " . $fname . " (" . $torhash . ")", "modify");
Exemplo n.º 12
0
<?php

/*
* BtiTracker v1.5.1 is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2015 Btiteam.org
*/
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
require_once CLASS_PATH . 'class.Bencode.php';
function_exists("sha1") or die('<font color="red">' . NOT_SHA . '</font></body></html>');
dbconn();
standardheader('Uploads');
if (!user::$current || user::$current["can_upload"] == "no") {
    stderr(ERROR . NOT_AUTHORIZED_UPLOAD, SORRY . "...");
}
block_begin(MNU_UPLOAD);
print "<table class='lista' border='0' width='100%'>\n";
print "<tr><td align='center'>";
if (isset($_FILES["torrent"])) {
    if ($_FILES["torrent"]["error"] != 4) {
        $fd = fopen($_FILES["torrent"]["tmp_name"], "rb") or die(FILE_UPLOAD_ERROR_1);
        is_uploaded_file($_FILES["torrent"]["tmp_name"]) or die(FILE_UPLOAD_ERROR_2);
        $length = filesize($_FILES["torrent"]["tmp_name"]);
        if ($length) {
            $alltorrent = fread($fd, $length);
        } else {
            err_msg(ERROR, FILE_UPLOAD_ERROR_3);
            print "</td></tr></table>";
            block_end();
            stdfoot();
Exemplo n.º 13
0
<?php

/*
* BtiTracker v1.5.1 is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2015 Btiteam.org
*/
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
dbconn();
standardheader('Members');
if (user::$current['view_users'] == 'no') {
    err_msg(ERROR, NOT_AUTHORIZED . ' ' . MEMBERS . '!');
    stdfoot();
    exit;
} else {
    block_begin(MEMBERS_LIST);
    print_users();
    block_end();
}
stdfoot();
Exemplo n.º 14
0
<?
require_once ("include/functions.php");
require_once ("include/config.php");
require_once ("include/blocks.php");

dbconn(true);

standardheader('Index',true,0);

//center_menu();

/*
if (!$CURUSER || $CURUSER["view_torrents"]=="no")
   {
    err_msg(ERROR.NOT_AUTHORIZED." ".MNU_TORRENT."!",SORRY."...");
    stdfoot();
    exit();
}
else
{
*/
  ?>
  <script language="Javascript" type="text/javascript">

  <!--

  var newwindow;
  function popdetails(url)
  {
    newwindow=window.open(url,'popdetails','height=500,width=500,resizable=yes,scrollbars=yes,status=yes');
    if (window.focus) {newwindow.focus()}
Exemplo n.º 15
0
$arandom = intval($_GET["code"]);
if (!$aid || empty($aid) || $aid == 0 || !$arandom || empty($arandom) || $arandom == 0) {
    standardheader('Access Denied');
    err_msg(ERROR, NOT_ADMIN_CP_ACCESS);
    stdfoot();
    exit;
}
$mqry = $db->query("SELECT users.id FROM users INNER JOIN users_level ON users_level.id = users.id_level WHERE users.id = " . $aid . " AND random = " . $arandom . " AND admin_access = 'yes' AND username = "******"username"]) . "");
if ($mqry->num_rows < 1) {
    standardheader('Access Denied');
    err_msg(ERROR, NOT_ADMIN_CP_ACCESS);
    stdfoot();
    exit;
}
// EOF
standardheader('Administrator Control Panel');
if (!user::$current || user::$current["admin_access"] != "yes") {
    err_msg(ERROR, NOT_ADMIN_CP_ACCESS);
    stdfoot();
    exit;
} else {
    define("IN_ACP", true);
    //
    // Read a listing of uploaded category images for use in the edit menu link code...
    //
    $dir = @opendir('images/categories/');
    while ($file = @readdir($dir)) {
        if (!@is_dir('images/categories/' . $file)) {
            $img_size = @getimagesize('images/categories/' . $file);
            if ($img_size[0] && $img_size[1]) {
                $images[] = $file;
Exemplo n.º 16
0
<?php

/*
* BtiTracker v1.5.0 is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2014 Btiteam.org
*/
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
dbconn();
standardheader('Peer Details');
$id = AddSlashes($_GET["id"]);
if (!isset($id) || !$id) {
    die("Error ID");
}
$res = $db->query("SELECT * FROM namemap WHERE info_hash = '" . $id . "'");
if ($res) {
    $row = $res->fetch_array(MYSQLI_BOTH);
    if ($row) {
        $tsize = 0 + (int) $row['size'];
    }
} else {
    die("Error ID");
}
$res = $db->query("SELECT * FROM peers LEFT JOIN countries ON peers.dns = countries.domain WHERE infohash = '" . $id . "' ORDER BY bytes ASC, status DESC");
block_begin(PEER_LIST);
$spacer = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
print "<table width='100%' class='lista' border='0'>\n";
print "<tr><td align='center' class='header' colspan='2'>" . USER_NAME . "</td>";
print "<td align='center' class='header'>" . PEER_COUNTRY . "</td>";
print "<td align='center' class='header'>" . PEER_PORT . "</td>";
Exemplo n.º 17
0
<?php

/*
* BtiTracker v1.5.1 is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2015 Btiteam.org
*/
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
dbconn();
standardheader('News');
if (user::$current['view_news'] == 'no') {
    err_msg(ERROR, NOT_AUTH_VIEW_NEWS);
    stdfoot();
    exit;
} else {
    block_begin('News');
    print_news();
    block_end();
}
stdfoot();
Exemplo n.º 18
0
<?php

/*
* BtiTracker v1.5.0 is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2014 Btiteam.org
*/
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
dbconn();
standardheader('Shoutbox', false);
?>
<style>
div.chat
{
align: center;
overflow: auto;
width: 95%;
height: 500px;
padding: 3px;
}
</style>
<?php 
$Smileys = array(':angry:' => 'angry.gif', ':-D' => 'biggrin.gif', ':D' => 'biggrin.gif', ':|' => 'blank.gif', ':-|' => 'blank.gif', ':blush:' => 'blush.gif', ':cool:' => 'cool.gif', ':((' => 'crying.gif', ':crying:' => 'crying.gif', ':<<:' => 'eyesright.gif', ':frown:' => 'frown.gif', '<3' => 'heart.gif', ':unsure:' => 'hmm.gif', ':lol:' => 'laughing.gif', ':ninja:' => 'ninja.gif', ':no:' => 'no.gif', ':nod:' => 'nod.gif', ':ohno:' => 'ohnoes.gif', ':ohnoes:' => 'ohnoes.gif', ':omg:' => 'omg.gif', ':o' => 'ohshit.gif', ':O' => 'ohshit.gif', ':paddle:' => 'paddle.gif', ':(' => 'sad.gif', ':-(' => 'sad.gif', ':shifty:' => 'shifty.gif', ':sick:' => 'sick.gif', ':)' => 'smile.gif', ':-)' => 'smile.gif', ':sorry:' => 'sorry.gif', ':thanks:' => 'thanks.gif', ':P' => 'tongue.gif', ':p' => 'tongue.gif', ':-P' => 'tongue.gif', ':-p' => 'tongue.gif', ':wave:' => 'wave.gif', ';)' => 'wink.gif', ':wink:' => 'wink.gif', ':creepy:' => 'creepy.gif', ':worried:' => 'worried.gif', ':wtf:' => 'wtf.gif', ':wub:' => 'wub.gif');
function format_shout($text)
{
    global $Smileys, $BASEURL;
    $s = $text;
    $s = strip_tags($s);
    $s = security::html_safe(unesc($s));
    $f = @fopen("badwords.txt", "r");
Exemplo n.º 19
0
*/
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
require_once CLASS_PATH . 'class.Bencode.php';
dbconn();
if (!user::$current || user::$current["can_download"] == "no") {
    standardheader('Download');
    err_msg(ERROR, NOT_AUTH_DOWNLOAD);
    die;
}
if (ini_get('zlib.output_compression')) {
    ini_set('zlib.output_compression', 'Off');
}
$infohash = $db->real_escape_string($_GET["id"]);
$filepath = $TORRENTSDIR . "/" . $infohash . ".btf";
if (!is_file($filepath) || !is_readable($filepath)) {
    standardheader('Download');
    err_msg(ERROR, CANT_FIND_TORRENT);
    stdfoot();
    die;
}
$f = urldecode($_GET["f"]);
// pid code begin
$result = $db->query("SELECT pid FROM users WHERE id = " . user::$current['uid']);
$row = $result->fetch_assoc();
$pid = $db->real_escape_string($row["pid"]);
if (!$pid) {
    $pid = md5(user::$current['uid'] + user::$current['username'] + user::$current['password'] + user::$current['lastconnect']);
    @$db->query("UPDATE users SET pid = '" . $pid . "' WHERE id = '" . user::$current['uid'] . "'");
}
$result = $db->query("SELECT * FROM namemap WHERE info_hash = '" . $infohash . "'");
$row = $result->fetch_assoc();
Exemplo n.º 20
0
<?php

/*
* BtiTracker v1.5.0 is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2014 Btiteam.org
*/
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
dbconn();
standardheader('Manage News');
if (user::$current["edit_news"] != "yes") {
    err_msg(ERROR, ERR_NOT_AUTH);
    stdfoot();
    exit;
}
if (isset($_GET["act"])) {
    $action = security::html_safe($_GET["act"]);
} else {
    $action = '';
}
if ($action == "del") {
    if (user::$current["delete_news"] == "yes") {
        $db->query("DELETE FROM news WHERE id = " . (int) $_GET["id"]);
        redirect("index.php");
        exit;
    } else {
        err_msg(ERROR, CANT_DELETE_NEWS);
        stdfoot();
        exit;
    }
Exemplo n.º 21
0
<?php

/*
* BtiTracker v1.5.0 is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2014 Btiteam.org
*/
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
dbconn();
standardheader('Delete Torrents');
$id = $db->real_escape_string($_GET["info_hash"]);
if (!isset($id) || !$id) {
    die("Error ID");
}
$res = $db->query("SELECT namemap.info_hash, namemap.uploader, namemap.filename, namemap.url, UNIX_TIMESTAMP(namemap.data) AS data, namemap.size, namemap.comment, categories.name AS cat_name, summary.seeds, summary.leechers, summary.finished, summary.speed FROM namemap LEFT JOIN categories ON categories.id = namemap.category LEFT JOIN summary ON summary.info_hash = namemap.info_hash WHERE namemap.info_hash = '" . $id . "'");
$row = $res->fetch_array(MYSQLI_BOTH);
if (user::$current["delete_torrents"] != "yes" && user::$current["uid"] != $row["uploader"]) {
    err_msg(SORRY, CANT_DELETE_TORRENT);
    stdfoot();
    exit;
}
$scriptname = security::html_safe($_SERVER["PHP_SELF"]);
$link = urlencode($_GET["returnto"]);
$hash = AddSlashes($_GET["info_hash"]);
if ($link == "") {
    $link = "torrents.php";
}
if (isset($_POST["action"])) {
    if ($_POST["action"] == DELETE) {
        $ris = $db->query("SELECT info_hash, filename, url FROM namemap WHERE info_hash = '" . $hash . "'");
Exemplo n.º 22
0
<?php

/*
* BtiTracker v1.5.0 is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2014 Btiteam.org
*/
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
$scriptname = security::html_safe($_SERVER["PHP_SELF"]);
$addparam = '';
dbconn();
standardheader('Torrents');
if (!user::$current || user::$current["view_torrents"] != "yes") {
    err_msg(ERROR . NOT_AUTHORIZED . " " . MNU_TORRENT . "!", SORRY . "...");
    stdfoot();
    exit;
}
block_begin(MNU_TORRENT);
if (isset($_GET["search"])) {
    $trova = security::html_safe(str_replace("+", " ", $_GET["search"]));
} else {
    $trova = '';
}
?>
<p align='center'>
<form action='<?php 
$scriptname;
?>
' method='get'>
   <table border='0' class='lista' align='center'>
Exemplo n.º 23
0
<?php

/*
* BtiTracker v1.5.0 is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2014 Btiteam.org
*/
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
dbconn();
standardheader('More Details', false);
if (!isset($_GET["form"]) || !isset($_GET["text"])) {
    err_msg("Error!", "Missing parameter!");
    print "</body></html>";
    die;
}
$parentform = htmlentities(urldecode($_GET["form"]));
$parentarea = htmlentities(urldecode($_GET["text"]));
?>
<script language='javascript'>

function SmileIT(smile,textarea){
    // Attempt to create a text range (IE).
    if (typeof(textarea.caretPos) != "undefined" && textarea.createTextRange)
    {
        var caretPos = textarea.caretPos;

        caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? smile + ' ' : smile
        caretPos.select();
    }
    // Mozilla text range replace.
Exemplo n.º 24
0
<?php

/*
* BtiTracker v1.5.1 is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2015 Btiteam.org
*/
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
dbconn();
standardheader('History Details');
$id = AddSlashes($_GET["id"]);
if (!isset($id) || !$id) {
    die("Error ID");
}
// control if torrent exist in our db
$res = $db->query("SELECT * FROM namemap WHERE info_hash = '" . $id . "'");
if ($res) {
    $row = $res->fetch_array(MYSQLI_BOTH);
    if ($row) {
        $tsize = 0 + (int) $row["size"];
    }
} else {
    die("Error ID");
}
// select lastest 30 records for infohash
$res = $db->query("SELECT history.*, username, countries.name AS country, countries.flagpic, level, prefixcolor, suffixcolor FROM history INNER JOIN users ON history.uid = users.id INNER JOIN countries ON users.flag = countries.id INNER JOIN users_level ON users.id_level = users_level.id WHERE history.infohash = '" . $id . "' AND history.date IS NOT NULL ORDER BY date DESC LIMIT 0, 30");
block_begin("Torrent History (Last 30 Snatchers)");
$spacer = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
print "<table class='lista' border='0' width='100%'>\n";
print "<tr><td align='center' class='header' colspan='2'>" . USER_NAME . "</td>";
Exemplo n.º 25
0
<?php

/*
* BtiTracker v1.5.0 is a php tracker system for BitTorrent, easy to setup and configure.
* This tracker is a frontend for DeHackEd's tracker, aka phpBTTracker (now heavely modified). 
* Updated and Maintained by Yupy.
* Copyright (C) 2004-2014 Btiteam.org
*/
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
dbconn();
if (!isset($_POST["language"])) {
    $_POST["language"] = 0;
}
$idlang = intval($_POST["language"]);
standardheader('Account Management', true, $idlang);
?>
<script language='javascript'>
<!--

function FormControl($nopwd)
{
// Controllo nome + pwd
    if (document.utente.user.value == "" )
      {
        alert(INSERT_USERNAME);
        return false;
      }

     if ($nopwd=="mod") {
        return true;
     }