Beispiel #1
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'>
    <input type='hidden' name='info_hash' value='<?php 
    echo $id;
    ?>
' />
    <table class='lista' border='0' cellpadding='10'>
    <tr>
    <tr><td align='left' class='header'><?php 
    echo USER_NAME;
    ?>
:</td><td class='lista' align='left'><input name='user' type='text'  value='<?php 
    echo security::html_safe($_GET["usern"]);
    ?>
' size='20' maxlength='100' disabled; readonly></td></tr>
    <tr><td align='left' class='header'><?php 
    echo COMMENT_1;
    ?>
:</td><td class='lista' align='left'><?php 
    textbbcode("comment", "comment", security::html_safe(unesc($comment)));
    ?>
</td></tr>
    <tr><td class='header' colspan='2' align='center'><input type='submit' name='confirm' value='<?php 
    echo FRM_CONFIRM;
    ?>
' />&nbsp;&nbsp;&nbsp;<input type='submit' name='confirm' value='<?php 
    echo FRM_PREVIEW;
    ?>
' /></td></tr>
    </table>
    </form>
    </center>
    
    <?php 
    block_end();
}
function _torrenttable($res, $frame_caption, $speed = "false")
{
    global $db;
    block_begin($frame_caption, 'center');
    begin_table();
    $num = 0;
    while ($a = $res->fetch_assoc()) {
        ++$num;
        if ($a["leechers"] > 0) {
            $r = (int) $a["seeds"] / (int) $a["leechers"];
            $ratio = number_format($r, 2);
        } else {
            $ratio = INFINITE;
        }
        if (!isset($menu)) {
            $menu = "";
        }
        if ($menu != "1") {
            echo "<tr>" . "<table width='100%' class='lista'>" . "<td class='header' align='center'>" . USER_LEVEL . "</td>" . "<td class='header'>" . FILE . "</td>";
            if ($speed != "true") {
                echo "<td class='header' align='center'>" . FINISHED . "</td>" . "<td class='header' align='center'>" . SEEDERS . "</td>" . "<td class='header' align='center'>" . LEECHERS . "</td>" . "<td class='header' align='center'>" . PEERS . "</td>" . "<td class='header' align='center'>" . RATIO . "</td>";
            } else {
                echo "<td class='header' align='right'>" . SPEED . "</td>";
            }
            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();
}
Beispiel #3
0
//   1. Redistributions of source code must retain the above copyright notice,
//      this list of conditions and the following disclaimer.
//   2. Redistributions in binary form must reproduce the above copyright notice,
//      this list of conditions and the following disclaimer in the documentation
//      and/or other materials provided with the distribution.
//   3. The name of the author may not be used to endorse or promote products
//      derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
////////////////////////////////////////////////////////////////////////////////////
block_begin("Donate");
?>
<table width="100%" align="center" border="0" cellspacing="1" cellpadding="4">
<tr>
  <td align="center" valign="top">
  <img src="images/makedonation.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" />
  </td>
</tr>
</table>
<?php 
block_end();
Beispiel #4
0
<?php

/*
* BtiTracker v1.5.q 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
*/
$clocktype = $GLOBALS["clocktype"];
require_once "addons/clock/clock.php";
block_begin("Clock", 1, "center");
clock_display($clocktype);
block_end();
Beispiel #5
0
////////////////////////////////////////////////////////////////////////////////////
#################################################################
#
#         Ajax MySQL shoutbox for btit
#         Version 1.0
#         Author: miskotes
#         Created: 11/07/2007
#         Contact: miskotes [at] yahoo.co.uk
#         Website: http://www.yu-corner.com
#         Credits: linuxuser.at, plasticshore.com
#
#################################################################
$getsbox = @mysqli_fetch_array(@mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM {$TABLE_PREFIX}users WHERE id=" . $CURUSER["uid"]));
$sbox = "{$getsbox['sbox']}";
if ($sbox == "no") {
    block_begin(SHOUTBOX);
    global $btit_settings;
    if ($CURUSER["view_shout"] == "yes") {
        require_once "include/smilies.php";
        require_once "shoutfun.php";
        if (!isset($CURUSER)) {
            global $CURUSER, $btit_settings, $tpl;
        }
        $switch = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT status FROM {$TABLE_PREFIX}blocks WHERE content = 'featured'");
        $arco = mysqli_fetch_array($switch);
        if ($arco["status"] == '0' and $btit_settings["shoutdel"] == true) {
            ?>
<script language="javascript" type="text/javascript" src="jscript/jquery.js"></script>
<?php 
        }
        if ($btit_settings["bling"] == true) {
Beispiel #6
0
* 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'>
   <tr>
   <td class='block'><?php 
echo TORRENT_SEARCH;
Beispiel #7
0
                } else {
                    $db->query("INSERT INTO news (news, title, user_id, date) VALUES (" . $news . ", " . $title . ", " . $uid . ", NOW())");
                }
                redirect("index.php");
                exit;
            }
        }
    } elseif ($_POST["conferma"] == FRM_CANCEL) {
        redirect("index.php");
        exit;
    } else {
        $title = '';
        $news = '';
    }
}
block_begin(NEWS_PANEL);
global $news, $title;
?>
<div align='center'>
  <form action='news.php' name='news' method='post'>
  <table border='0' class='lista'>
  <tr><td><input type='hidden' name='action' value='<?php 
echo $action;
?>
'/></td></tr>
  <tr><td><input type='hidden' name='id' value='<?php 
echo (int) $_GET['id'];
?>
'/></td></tr>
  <tr>
       <td align='center' colspan='2' class='header' >
<?php

// CyBerFuN.ro & xList.ro
// xList .::. Categories Block
// http://tracker.cyberfun.ro/
// http://www.cyberfun.ro/
// http://xlist.ro/
// Modified By CyBerNe7
global $CURUSER;
if (!$CURUSER || $CURUSER["view_torrents"] == "no") {
    // do nothing
} else {
    block_begin(BLOCK_CAT);
    function catnumber($val = "")
    {
        global $TABLE_PREFIX;
        print "<div id=catnumber style=\"width:100%;overflow:auto\" align=left><table class=\"lista\" cellpadding=\"2\" cellspacing=\"1\" style=\"width:100%;\" align=left>";
        $c_q = @mysql_query("SELECT * FROM {$TABLE_PREFIX}categories WHERE sub='0' ORDER BY sort_index ASC");
        while ($c = mysql_fetch_array($c_q)) {
            $cid = $c["id"];
            $name = unesc($c["name"]);
            // lets see if it has sub-categories.
            $s_q = mysql_query("SELECT * FROM {$TABLE_PREFIX}categories WHERE sub='{$cid}'");
            $s_t = mysql_num_rows($s_q);
            $res = mysql_query("select count(*) as allincat FROM {$TABLE_PREFIX}files where category=" . $cid);
            if ($res) {
                $row = mysql_fetch_array($res);
                $totalall = $row["allincat"];
            } else {
                $totalall = 0;
            }
Beispiel #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
 */
if (!defined("IN_ACP")) {
    die("No direct access!");
}
block_begin("Database Tools");
switch ($action) {
    case 'runqry':
        if (isset($_POST["confirm"]) && $_POST["confirm"] == FRM_CONFIRM) {
            if ($_POST["runquery"] != "") {
                // just in case...
                $_POST["runquery"] = strip_tags($_POST["runquery"]);
                $thequery = strtoupper($_POST["runquery"]);
                // try to run the query
                $dbres = $db->query(unesc($_POST["runquery"]));
                if (in_array(substr($thequery, 0, strpos($thequery, " ")), array("SELECT", "SHOW", "EXPLAIN", "DESCRIBE"))) {
                    // display result
                    $ad_display .= "\n                           <br />\n                           <form name='dbutil' action='admincp.php?user="******"uid"] . "&code=" . $user::$current["random"] . "&do=dbutil&action=qry' method='post'>\n                           <table class='lista' cellspacing='1' cellpadding='0' align='center' border='0' width='98%'>\n                           <tr>\n                           <td>" . security::html_safe(unesc($_POST["runquery"])) . "\n                           </td>\n                           </tr>\n                           <tr>\n                           <td>\n                           <table class='lista' cellspacing='1' cellpadding='0' align='center' border='0' width='100%'>\n                           <tr>";
                    // display header (fields' name)
                    $i = 0;
                    $field = array();
                    while ($fname = $dbres->fetch_field()) {
                        $ad_display .= "<td align='center' class='header'>{$fname->name}</td>";
                        $field[$i] = $fname->name;
                        $i++;
Beispiel #10
0
/*
* 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);
        block_end();
Beispiel #11
0
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////
////    Bónusz pont utalás By virus ///////
//////////////////////////////////////////
////////////////////////////////////////////
//// Converted to english by reBirth //////
//////////////////////////////////////////
////////////////////////////////////////////
//// Converted for xbtit by cooly /////////
//////////////////////////////////////////
if (!defined("IN_BTIT")) {
    die("non direct access!");
}
if ($CURUSER["view_users"] != "yes") {
    err_msg($language["ERROR"], $language["NOT_AUTHORIZED"] . " " . $language["MEMBERS"]);
    stdfoot();
    die;
}
block_begin("Bonus Transfer");
$Btrans[] = "\n\n<form name=transfer method=post action=index.php?page=bonusdone>\n<table width=100% align=center>\n<tr>\n<td class=header width=80% colspan=5><b>You can transfer your seed bonus points to another member here</b>\n</td>\n<tr>\n<td class=header width=30% align=right>Which user you want to make happy\n<td class=lista><input type=text name=username size=30></td>\n</tr>\n<tr>\n<td class=header width=30% align=right>How much points you like to give\n<td class=lista><input type=text name=bonuszpont size=6 value=1></td>\n</tr>\n<tr>\n<td class=header width=30% align=right>Use anonymous for sender ID\n<td class=lista><input type=checkbox name=anonym value=anonym></td></tr>\n<tr><td colspan=2><input name=submit type=submit value=Transfer></td>\n</tr>\n</table>\n</form>";
$bonustpl = new bTemplate();
$bonustpl->set("Btrans", $Btrans);
block_end();
Beispiel #12
0
//   3. The name of the author may not be used to endorse or promote products
//      derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
////////////////////////////////////////////////////////////////////////////////////
block_begin("Top 5 Requests");
global $btit_settings;
$number = $btit_settings["req_number"];
$res = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT users.id_level,users.downloaded, users.uploaded, users.username, requests.filled, requests.filledby, requests.id, requests.userid, requests.request, requests.added, requests.hits, categories.image as catimg, categories.name as cat FROM {$TABLE_PREFIX}requests requests inner join {$TABLE_PREFIX}categories categories on requests.cat = categories.id inner join {$TABLE_PREFIX}users users on requests.userid = users.id ORDER BY requests.hits DESC, requests.id DESC LIMIT {$number}") or sqlerr();
$num = mysqli_num_rows($res);
print "<table border=0 width=100% align=center cellspacing=1 cellpadding=0>\n";
print "<tr><td class=header align=center>Torrent File</td><td class=header align=center>Cat.</td><td class=header align=center>Added</td><td class=header align=center>By</td><td class=header align=center>Filled</td><td class=header align=center>Votes</td>\n";
for ($i = 0; $i < $num; ++$i) {
    $arr = mysqli_fetch_assoc($res);
    $rep = do_sqlquery("SELECT * FROM {$TABLE_PREFIX}users_level WHERE id_level =" . $arr['id_level']);
    $rept = mysqli_fetch_array($rep);
    $name = stripslashes($rept[prefixcolor]) . $arr[username] . stripslashes($rept[suffixcolor]);
    $privacylevel = $arr["privacy"];
    if ($arr["downloaded"] > 0) {
        $ratio = number_format($arr["uploaded"] / $arr["downloaded"], 2);
        //$ratio = "<font color=" . get_ratio_color($ratio) . "><b>$ratio</b></font>";
<?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 INCL_PATH . 'functions.php';
require_once INCL_PATH . 'blocks.php';
if (!user::$current || user::$current["view_news"] == "no") {
    #Do Nothing...
} else {
    block_begin(LAST_NEWS);
    print_news($GLOBALS['block_newslimit']);
    block_end();
}
Beispiel #14
0
        @$db->query("DELETE FROM namemap WHERE info_hash = '" . $hash . "'");
        @$db->query("DELETE FROM timestamps WHERE info_hash = '" . $hash . "'");
        @$db->query("DELETE FROM comments WHERE info_hash = '" . $hash . "'");
        @$db->query("DELETE FROM ratings WHERE infohash = '" . $hash . "'");
        @$db->query("DELETE FROM peers WHERE infohash = '" . $hash . "'");
        @$db->query("DELETE FROM history WHERE infohash = '" . $hash . "'");
        @unlink(CACHE_PATH . 'torrent_details_' . $hash . '.txt');
        unlink($TORRENTSDIR . "/" . $hash . ".btf");
        print "<script language='javascript'>window.location.href='" . $link . "'</script>";
        exit;
    } else {
        print "<script language='javascript'>window.location.href='" . $link . "'</script>";
        exit;
    }
}
block_begin(DELETE_TORRENT);
print "<table width='100%' class='lista' border='0' cellspacing='5' cellpadding='5'>\n";
print "<tr><td align='right' class='header'>" . FILE_NAME . ":</td><td class='lista'>" . security::html_safe($row["filename"]) . "</td></tr>";
print "<tr><td align='right' class='header'>" . INFO_HASH . ":</td><td class='lista'>" . security::html_safe($row["info_hash"]) . "</td></tr>";
if (!empty($row["comment"])) {
    print "<tr><td align='right' class='header'>" . DESCRIPTION . ":</td><td align='left' class='lista'>" . format_comment(unesc($row["comment"])) . "</td></tr>";
}
if (isset($row["cat_name"])) {
    print "<tr><td align='right' class='header'>" . CATEGORY_FULL . ":</td><td class='lista'>" . security::html_safe($row["cat_name"]) . "</td></tr>";
} else {
    print "<tr><td align='right' class='header'>" . CATEGORY_FULL . ":</td><td class='lista'>(None)</td></tr>";
}
print "<tr><td align='right' class='header'>" . SIZE . ":</td><td class='lista'>" . misc::makesize((int) $row["size"]) . "</td></tr>";
print "<tr><td align='right' class='header'>" . ADDED . ":</td><td class='lista'>" . date("d/m/Y H:m:s", $row["data"]) . "</td></tr>";
if ($row["speed"] < 0) {
    $speed = "N/A";
<?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
*/
global $db;
if (!user::$current || user::$current["view_forum"] == "no") {
    // do nothing
} else {
    block_begin(FORUM_INFO);
    $res = $db->query("SELECT COUNT(*) AS topic_total FROM topics");
    if ($res) {
        $row = $res->fetch_array(MYSQLI_BOTH);
        $topics = (int) $row['topic_total'];
        $res1 = $db->query("SELECT COUNT(*) AS post_total FROM posts");
        if ($res1) {
            $row = $res1->fetch_array(MYSQLI_BOTH);
            $posts = (int) $row['post_total'];
            if ($posts > 0) {
                $posts_avg = number_format($topics / $posts * 100, 0);
            } else {
                $posts_avg = 0;
            }
        }
    } else {
        $topics = 0;
        $posts = 0;
        $posts_avg = 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
*/
global $db;
if (!user::$current || user::$current["view_users"] == "no") {
    // do nothing
} else {
    //lastest member
    block_begin("Latest Member");
    $cache_last_member = CACHE_PATH . 'last_member.txt';
    $cache_last_member_expire = 15 * 60;
    if (file_exists($cache_last_member) && is_array(unserialize(file_get_contents($cache_last_member))) && vars::$timestamp - filemtime($cache_last_member) < $cache_last_member_expire) {
        $a = unserialize(@file_get_contents($cache_last_member));
    } else {
        $a = @$db->query("SELECT id, username FROM users WHERE id_level <> 1 AND id_level <> 2 ORDER BY id DESC LIMIT 1");
        $a = @$a->fetch_assoc();
        $handle = fopen($cache_last_member, "w+");
        fwrite($handle, serialize($a));
        fclose($handle);
    }
    if ($a) {
        if (user::$current["view_users"] == "yes") {
            $latestuser = "******" . (int) $a["id"] . "'>" . security::html_safe($a["username"]) . "</a>";
        } else {
            $latestuser = security::html_safe($a['username']);
        }
Beispiel #17
0
    $s = preg_replace("/\\[url\\]((http|ftp|https|ftps|irc):\\/\\/[^<>\\s]+?)\\[\\/url\\]/i", "<a href=\\1 target=_blank>\\1</a>", $s);
    // [size=4]Text[/size]
    $s = preg_replace("/\\[size=([1-7])\\]((\\s|.)+?)\\[\\/size\\]/i", "<font size=\\1>\\2</font>", $s);
    // [font=Arial]Text[/font]
    $s = preg_replace("/\\[font=([a-zA-Z ,]+)\\]((\\s|.)+?)\\[\\/font\\]/i", "<font face=\"\\1\">\\2</font>", $s);
    // Linebreaks
    $s = nl2br($s);
    // Maintain spacing
    $s = str_replace("  ", " &nbsp;", $s);
    reset($Smileys);
    while (list($code, $url) = each($Smileys)) {
        $s = str_replace($code, "<img border='0' src='" . $BASEURL . "/images/smilies/" . $url . "'>", $s);
    }
    return $s;
}
block_begin("Shout history");
echo "<br />";
$msg = array();
function file_save($filename, $content, $flags = 0)
{
    if (!($file = fopen($filename, 'w'))) {
        return FALSE;
    }
    $n = fwrite($file, $content);
    fclose($file);
    return $n ? $n : FALSE;
}
if (!file_exists("chat.php")) {
    file_save("chat.php", "<?php\n\$msg = " . var_export($msg, TRUE) . "\n?>");
}
include "chat.php";
<?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
*/
global $db, $user;
if (!user::$current || user::$current["id"] == 1) {
    #Do nothing
} else {
    block_begin(BLOCK_USER);
    // user information
    $style = style_list();
    $langue = language_list();
    print "\n<tr><td align='center' class='blocklist'>" . USER_NAME . ": " . unesc(user::$current["username"]) . "</td></tr>\n";
    print "<tr><td align='center' class='blocklist'>" . USER_LEVEL . ": " . security::html_safe(user::$current["level"]) . "</td></tr>\n";
    $resmail = $db->query("SELECT COUNT(*) FROM messages WHERE readed = 'no' AND receiver = " . user::$current['uid']);
    if ($resmail && $resmail->num_rows > 0) {
        $mail = $resmail->fetch_row();
        if ($mail[0] > 0) {
            print "<td class='blocklist' align='center'><a href='usercp.php?uid=" . user::$current["uid"] . "&do=pm&action=list'>" . MAILBOX . "</a> (<font color='#FF0000'><b>" . (int) $mail[0] . "</b></font>)</td>\n";
        } else {
            print "<td class='blocklist' align='center'><a href='usercp.php?uid=" . user::$current["uid"] . "&do=pm&action=list'>" . MAILBOX . "</a></td>\n";
        }
    } else {
        print "<tr><td align='center'>" . NO_MAIL . "</td></tr>";
    }
    print "<tr><td align='center' class='blocklist'>";
    include INCL_PATH . 'offset.php';
Beispiel #19
0
/*
* 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
*/
if (!user::$current || user::$current["admin_access"] != "yes") {
    err_msg(ERROR, NOT_ADMIN_CP_ACCESS);
    stdfoot();
    exit;
} else {
    $delete_timeout = vars::$timestamp - 60 * 60 * 24 * 7;
    // delete log older then 7 days
    $db->query("DELETE FROM logs WHERE added < " . $delete_timeout);
    block_begin("Site Log");
    $logres = $db->query("SELECT COUNT(*) FROM logs ORDER BY added DESC");
    $lognum = $logres->fetch_row();
    $num = (int) $lognum[0];
    $perpage = max(0, user::$current["postsperpage"]) > 0 ? user::$current["postsperpage"] : 20;
    list($pagertop, $limit) = misc::pager($perpage, $num, "admincp.php?user="******"uid"] . "&code=" . user::$current["random"] . "&do=logview&");
    print $pagertop;
    print "\n<table class='lista' width='100%' align='center'><tr>";
    print "\n<td class='header'>" . DATE . "</td>";
    print "\n<td class='header'>" . USER_NAME . "</td>";
    print "\n<td class='header'>" . ACTION . "</td>\n</tr>";
    $logres = $db->query("SELECT * FROM logs ORDER BY added DESC " . $limit);
    if ($logres) {
        while ($logview = $logres->fetch_array(MYSQLI_BOTH)) {
            if ($logview["type"] == "delete") {
                $bgcolor = "style='background-color:#FF95AC; color:#000000;'";
Beispiel #20
0
  </form>
  </td></tr></table>
      <?php 
        block_end();
    }
} else {
    require_once "include/functions.php";
    require_once "include/config.php";
    dbconn();
    $res = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM {$TABLE_PREFIX}polls WHERE status='true'") or die(is_object($GLOBALS["___mysqli_ston"]) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false));
    $result = mysql_fetch_array($res);
    $pid = $result["pid"];
    if ($result) {
        $res2 = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM {$TABLE_PREFIX}poll_voters WHERE pid='{$pid}'") or die(is_object($GLOBALS["___mysqli_ston"]) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false));
        $question = $result["poll_question"];
        block_begin("Poll: {$question}");
        print "<tr><td class=blocklist align=center>\n";
        print "<table cellspacing=2 cellpading=2>\n";
        if (!isset($CURUSER)) {
            global $CURUSER;
        }
        $total_votes = 0;
        $check = 0;
        if ($CURUSER["id_level"] < 3 || isset($_POST['showres']) && $_POST['showres'] == 'Show Results') {
            $check = 1;
        } else {
            $check = 0;
        }
        while ($voters = mysqli_fetch_array($res2)) {
            if ($CURUSER["uid"] == $voters["memberid"]) {
                $check = 1;
Beispiel #21
0
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
////////////////////////////////////////////////////////////////////////////////////
global $CURUSER, $BASEURL, $STYLEPATH, $XBTT_USE;
if (!$CURUSER || $CURUSER["view_torrents"] == "no") {
    // do nothing
} else {
    $limit = 10;
    if ($XBTT_USE) {
        $sql = "SELECT f.info_hash as hash, f.seeds+ifnull(x.seeders,0) as seeds , f.leechers + ifnull(x.leechers,0) as leechers, dlbytes AS dwned, format(f.finished+ifnull(x.completed,0),0) as finished, filename, url, info, UNIX_TIMESTAMP(data) AS added, c.image, c.name AS cname, category AS catid, size, external, uploader FROM {$TABLE_PREFIX}files as f LEFT JOIN xbt_files x ON f.bin_hash=x.info_hash LEFT JOIN {$TABLE_PREFIX}categories as c ON c.id = f.category WHERE f.leechers + ifnull(x.leechers,0) > 0 AND f.seeds+ifnull(x.seeders,0) = 0 AND f.external='no' ORDER BY f.leechers + ifnull(x.leechers,0) DESC LIMIT {$limit}";
    } else {
        $sql = "SELECT info_hash as hash, seeds, leechers, dlbytes AS dwned, finished, filename, url, info, UNIX_TIMESTAMP(data) AS added, c.image, c.name AS cname, category AS catid, size, external, uploader FROM {$TABLE_PREFIX}files as f LEFT JOIN {$TABLE_PREFIX}categories as c ON c.id = f.category WHERE leechers >0 AND seeds = 0 AND external='no' ORDER BY leechers DESC LIMIT {$limit}";
    }
    $row = do_sqlquery($sql, true);
    if (mysql_num_rows($row) > 0) {
        block_begin("Seeder Wanted");
        ?>
       <table cellpadding="4" cellspacing="1" width="100%">
       <tr>
         <td colspan="2" align="center" class="header">&nbsp;<?php 
        echo $language["TORRENT_FILE"];
        ?>
&nbsp;</td>
         <td align="center" class="header">&nbsp;<?php 
        echo $language["CATEGORY"];
        ?>
&nbsp;</td>
         <?php 
        if (max(0, $CURUSER["WT"]) > 0) {
            print "<TD align=\"center\" class=\"header\">" . $language["WT"] . "</TD>";
        }
Beispiel #22
0
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>";
print "<td align='center' class='header'>" . PEER_PROGRESS . "</td>";
print "<td align='center' class='header'>" . PEER_STATUS . "</td>";
print "<td align='center' class='header'>" . PEER_CLIENT . "</td>\n";
print "<td align='center' class='header'>" . DOWNLOADED . "</td>\n";
print "<td align='center' class='header'>" . UPLOADED . "</td>\n";
print "<td align='center' class='header'>" . RATIO . "</td>\n";
print "<td align='center' class='header'>" . SEEN . "</td></tr>\n";
while ($row = $res->fetch_array(MYSQLI_BOTH)) {
    // for user name instead of peer
    if ($PRIVATE_ANNOUNCE) {
Beispiel #23
0
            $query[] = 'cat[]=' . $cat;
        }
        $query[] = 'pid=' . user::$current['pid'];
        $queries = implode('&', $query);
        if ($queries) {
            $link .= '?' . $queries;
        }
        if ($_POST['feed'] == 'dl') {
            err_msg('RSS Link', 'Use the following url in your RSS reader:<br><b>' . $link . '</b><br>');
            stdfoot();
            exit;
        } else {
            header('Refresh: 0; url=' . $link);
        }
    }
    block_begin('Get RSS');
    ?>
    <form method='POST' action='get_rss.php'>
    <table class='header' width='80%' align='center'>
    <tr>
       <td class='header' width='30%'>Categories:</td>
       <td class='lista' width='50%'><?php 
    echo $catoptions;
    ?>
</td>
    </tr>
    <tr>
       <td width='30%'><br /></td>
    </tr>
    <tr>
       <td class='header'>Feed Type:</td>
Beispiel #24
0
function insert_compose_frame($id, $newtopic = true, $quote = false)
{
    global $maxsubjectlength, $db;
    MCached::connect();
    if ($newtopic) {
        $arr = MCached::get('forums::name::' . $id);
        if ($arr === MCached::NO_RESULT) {
            $res = $db->query("SELECT name FROM forums WHERE id = " . $id) or sqlerr(__FILE__, __LINE__);
            $arr = $res->fetch_assoc() or die(BAD_FORUM_ID);
            MCached::add('forums::name::' . $id, $arr, 9600);
        }
        $forumname = security::html_safe(unesc($arr["name"]));
        block_begin(WORD_NEW . " " . TOPIC . " " . IN . " <a href='?action=viewforum&forumid=" . $id . "'>" . $forumname . "</a> " . FORUM);
    } else {
        $arr = MCached::get('quick::jump::topics::' . $id);
        if ($arr === MCached::NO_RESULT) {
            $res = $db->query("SELECT * FROM topics WHERE id = " . $id) or sqlerr(__FILE__, __LINE__);
            $arr = $res->fetch_assoc() or stderr(ERROR, FORUM_ERROR . TOPIC_NOT_FOUND);
            MCached::add('quick::jump::topics::' . $id, $arr, 9600);
        }
        $subject = security::html_safe(unesc($arr["subject"]));
        block_begin(REPLY . " " . TOPIC . ": <a href='?action=viewtopic&topicid=" . $id . "'>" . $subject . "</a>");
    }
    begin_frame();
    print "<form method='post' name='compose' action='?action=post'>\n";
    if ($newtopic) {
        print "<input type='hidden' name='forumid' value='" . $id . "'>\n";
    } else {
        print "<input type='hidden' name='topicid' value='" . $id . "'>\n";
    }
    begin_table();
    if ($newtopic) {
        print "<tr><td class='header'>" . SUBJECT . "</td>" . "<td class='lista' align='left' style='padding: 0px'><input type='text' size='50' maxlength='" . $maxsubjectlength . "' name='subject' " . "style='border: 0px; height: 19px'></td></tr>\n";
    }
    if ($quote) {
        $postid = 0 + (int) $_GET["postid"];
        if (!is_valid_id($postid)) {
            die;
        }
        $res = $db->query("SELECT posts.*, users.username FROM posts INNER JOIN users ON posts.userid = users.id WHERE posts.id = " . $postid) or sqlerr(__FILE__, __LINE__);
        if ($res->num_rows != 1) {
            stderr(ERROR, ERR_NO_POST_WITH_ID . "" . $postid);
        }
        $arr = $res->fetch_assoc();
    }
    print "<tr><td class='header'>" . BODY . "</td><td class='lista' align='left' style='padding: 0px'>";
    textbbcode("compose", "body", $quote ? "[quote=" . security::html_safe($arr["username"]) . "]" . security::html_safe(unesc($arr["body"])) . "[/quote]" : "");
    print "<tr><td colspan='2' align='center'><input type='submit' class='btn' value='" . FRM_CONFIRM . "'></td></tr>\n";
    print "</td></tr>";
    end_table();
    print "</form>\n";
    end_frame();
    //------ Get 10 last posts if this is a reply
    if (!$newtopic) {
        $postres = $db->query("SELECT * FROM posts WHERE topicid = " . $id . " ORDER BY id DESC LIMIT 10") or sqlerr(__FILE__, __LINE__);
        begin_frame(LAST_10_POSTS, true);
        while ($post = $postres->fetch_assoc()) {
            //-- Get poster details
            $userres = $db->query("SELECT * FROM users WHERE id = " . (int) $post["userid"] . " LIMIT 1") or sqlerr(__FILE__, __LINE__);
            $user = $userres->fetch_assoc();
            $avatar = $user["avatar"] && $user["avatar"] != "" ? security::html_safe($user["avatar"]) : "";
            begin_table(true);
            print "<tr valign='top'><td width='150' align='center' style='padding: 0px'>#" . (int) $post["id"] . " by " . security::html_safe($user["username"]) . "<br />" . get_date_time($post["added"]) . ($avatar != "" ? "<br /><img width='80' src='" . $avatar . "'>" : "") . "</td><td class='lista'>" . format_comment(unesc($post["body"])) . "</td></tr><br>\n";
            end_table();
        }
        end_frame();
    }
    if (!isset($forumid)) {
        $forumid = 0;
    }
    insert_quick_jump_menu($forumid);
    block_end();
}
    print "\n<td class='lista' align='center'><b><a href='account.php?act=mod&uid=" . $id . "&returnto=admincp.php?user="******"uid"] . "&code=" . user::$current["random"] . "&do=searchdiff'><img src='./style/base/edit.png' border='0' alt='Edit'/></b></td>";
    print "\n<td class='lista' align='center'><b><a href='account.php?act=del&uid=" . $id . "&returnto=admincp.php?user="******"uid"] . "&code=" . user::$current["random"] . "&do=searchdiff'><img src='./style/base/delete.png' border='0' alt='Delete'/></b></td>";
    print "\n<td class='lista' align='center'><input type='checkbox' name='uyedegis[]' value='" . $id . "' /></td>\n</tr>";
}
$type = isset($_POST["type"]) ? $_POST["type"] : "GB";
$diff = isset($_POST["diff"]) ? (int) $_POST["diff"] : 50;
$readyto = isset($_POST["readyto"]) ? $_POST["readyto"] : "sa";
$kullan = isset($_POST["kullan"]) ? (int) $_POST["kullan"] : 0;
$kullan1 = isset($_POST["kullan1"]) ? (int) $_POST["kullan1"] : 0;
$changeug = isset($_POST["changeug"]) ? $_POST["changeug"] : "sa";
$mesajat = isset($_POST["mesajat"]) ? $_POST["mesajat"] : "sa";
$grupdegis = isset($_POST["grupdegis"]) ? $_POST["grupdegis"] : "sa";
$mesajmetni = isset($_POST["mesajmetni"]) ? $_POST["mesajmetni"] : "sa";
$baslik = isset($_POST["baslik"]) ? $_POST["baslik"] : "sa";
$count = 0;
block_begin("Search Diff");
?>
<center>
<TABLE class="lista">
<TR>
<TD align="center" class="header"><?php 
echo "Search Difference";
?>
</TD></TR>
<TR><TD align="center" class="blocklist">
<form method="post" action="admincp.php?user=<?php 
echo user::$current["uid"];
?>
&code=<?php 
echo user::$current["random"];
?>
<?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
*/
block_begin(BLOCK_MENU);
print "<tr><td class='blocklist' align='center'><a href='./'>" . MNU_INDEX . "</a></td></tr>\n";
if (user::$current["view_torrents"] == "yes") {
    print "<tr><td class='blocklist' align='center'><a href='torrents.php'>" . MNU_TORRENT . "</a></td></tr>\n";
    print "<tr><td class='blocklist' align='center'><a href='extra-stats.php'>" . MNU_STATS . "</a></td></tr>\n";
}
if (user::$current["can_upload"] == "yes") {
    print "<tr><td class='blocklist' align='center'><a href='upload.php'>" . MNU_UPLOAD . "</a></td>\n";
}
if (user::$current["view_users"] == "yes") {
    print "<tr><td class='blocklist' align='center'><a href='users.php'>" . MNU_MEMBERS . "</a></td></tr>\n";
}
if (user::$current["view_news"] == "yes") {
    print "<tr><td class='blocklist' align='center'><a href='viewnews.php'>" . MNU_NEWS . "</a></td></tr>\n";
}
if (user::$current["view_forum"] == "yes") {
    if ($GLOBALS["FORUMLINK"] == "" || $GLOBALS["FORUMLINK"] == "internal") {
        print "<td class='blocklist' align='center'><a href='forum.php'>" . MNU_FORUM . "</a></td>\n";
    } else {
        print "<td class='blocklist' align='center'><a href='" . $GLOBALS['FORUMLINK'] . "' target='_blank'>" . MNU_FORUM . "</a></td>\n";
    }
}
if (user::$current["uid"] == 1 || !user::$current) {
Beispiel #27
0
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
////////////////////////////////////////////////////////////////////////////////////
global $CURUSER, $btit_settings;
if (!$CURUSER || $CURUSER["view_torrents"] == "no") {
    // do nothing
} else {
    global $BASEURL, $STYLEPATH, $dblist, $XBTT_USE, $btit_settings;
    block_begin(LAST_TORRENTS);
    ?>
  <table cellpadding="4" cellspacing="1" width="100%">
  <?php 
    // Gold/Silver Torrent v 1.2 by Losmi / start
    // f.gold as gold,
    // Gold/Silver Torrent v 1.2 by Losmi / end
    if ($XBTT_USE) {
        $sql = "SELECT f.info_hash as hash, f.gold as gold, f.seeds+ifnull(x.seeders,0) as seeds , f.leechers + ifnull(x.leechers,0) as leechers, dlbytes AS dwned, format(f.finished+ifnull(x.completed,0),0) as finished, filename, url, info, UNIX_TIMESTAMP(data) AS added, c.image, c.name AS cname, category AS catid, size, external, uploader FROM {$TABLE_PREFIX}files as f LEFT JOIN xbt_files x ON f.bin_hash=x.info_hash LEFT JOIN {$TABLE_PREFIX}categories as c ON c.id = f.category WHERE f.leechers + ifnull(x.leechers,0) + f.seeds+ifnull(x.seeders,0) > 0 ORDER BY data DESC LIMIT " . $GLOBALS["block_last10limit"];
    } else {
        $sql = "SELECT info_hash as hash, f.gold as gold, seeds, leechers, dlbytes AS dwned, format(finished,0) as finished, filename, url, info, UNIX_TIMESTAMP(data) AS added, c.image, c.name AS cname, category AS catid, size, external, uploader FROM {$TABLE_PREFIX}files as f LEFT JOIN {$TABLE_PREFIX}categories as c ON c.id = f.category WHERE leechers + seeds > 0 ORDER BY data DESC LIMIT " . $GLOBALS["block_last10limit"];
    }
    $row = get_result($sql, true, $btit_settings['cache_duration']);
    ?>
  <tr>
      <td align="center" width="20" class="header">&nbsp;<?php 
<?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
*/
block_begin("Trackerload");
if (!function_exists("getmicrotime")) {
    function getmicrotime()
    {
        list($usec, $sec) = explode(" ", microtime());
        return (double) $usec + (double) $sec;
    }
}
$percent = min(100, round(@exec('ps ax | grep -c apache') / 256 * 10), 4);
// try other method
if ($percent == 0) {
    $time_start = getmicrotime();
    $time = round(getmicrotime() - $time_start, 4);
    $percent = $time * 60;
}
echo "<div align='center'>" . TRACKER_LOAD . ": (" . $percent . " %)</div><table class='blocklist' align='center' border='0' width='400'><tr><td style='padding: 0px; background-image: url(addons/serverload/loadbarbg.gif); background-repeat: repeat-x'>";
//TRACKER LOAD
if ($percent <= 70) {
    $pic = "addons/serverload/loadbargreen.gif";
} elseif ($percent <= 90) {
    $pic = "addons/serverload/loadbaryellow.gif";
} else {
    $pic = "addons/serverload/loadbarred.gif";
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>";
print "<td align='center' class='header'>" . PEER_COUNTRY . "</td>";
print "<td align='center' class='header'>Active</td>";
print "<td align='center' class='header'>" . PEER_CLIENT . "</td>\n";
print "<td align='center' class='header'>" . DOWNLOADED . "</td>\n";
print "<td align='center' class='header'>" . UPLOADED . "</td>\n";
print "<td align='center' class='header'>" . RATIO . "</td>\n";
print "<td align='center' class='header'>" . FINISHED . "</td></tr>\n";
while ($row = $res->fetch_array(MYSQLI_BOTH)) {
    print "<tr><td align='center' class='lista'>" . "<a href='userdetails.php?id=" . (int) $row["uid"] . "'>" . security::html_safe(unesc($row["username"])) . "</a></td>" . "<td align='center' class='lista'><a href='usercp.php?do=pm&action=edit&uid=" . user::$current['uid'] . "&what=new&to=" . urlencode(unesc($row["username"])) . "'>" . image_or_link($STYLEPATH . "/pm.png", "", "PM") . "</a></td>";
    if ($row["flagpic"] != "") {
        print "<td align='center' class='lista'><img src='images/flag/" . $row["flagpic"] . "' alt='" . security::html_safe($row["country"]) . "' /></td>";
    } else {
Beispiel #30
0
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
////////////////////////////////////////////////////////////////////////////////////
global $CURUSER, $user, $USERLANG, $FORUMLINK, $db_prefix, $btit_settings;
require_once load_language("lang_account.php");
block_begin("" . BLOCK_USER . "");
if (!$CURUSER || $CURUSER["id"] == 1) {
    // guest-anonymous, login require
    ?>
            <form action="index.php?page=login" name="login" method="post">
            <table class="lista" border="0" align="center" width="100%">
            <tr><td style="text-align:center;" align="center" class="poller"><?php 
    echo $language["USER_NAME"];
    ?>
:</td></tr><tr><td class="poller" style="text-align:center;" align="center"><input type="text" size="9" name="uid" value="<?php 
    $user;
    ?>
" maxlength="40" /></td></tr>
            <tr><td style="text-align:center;" align="center" class="poller"><?php 
    echo $language["USER_PWD"];
    ?>