Bravo List

Bravo List (https://www.bvlist.com/index.php)
-   Downloads (https://www.bvlist.com/forumdisplay.php?f=16)
-   -   Deluxe Torrent (https://www.bvlist.com/showthread.php?t=8756)

firefly007 29th June 2013 00:36

Replace with this

takeupload.php

PHP Code:

<?

require_once("include/benc.php");
require_once(
"include/bittorrent.php");

ini_set("upload_max_filesize",$max_torrent_size);

function 
bark($msg) {
        
genbark($msg, "Upload failed!");
}

dbconn();
security_staff();
if (
$CURUSER["class"] > 15)
{
stdhead();
  
stdmsg("FUCK OFF...", "STOP CHEATING MOTHER FUCKER");
  
stdfoot();
  exit;
}

loggedinorreturn();
maxsysop();
parked();

if (
get_user_class() < UC_VIP) {
$uploadpos = $CURUSER['uploadpos'];
} else {
$uploadpos = "yes";
}

if (
$uploadpos == 'no' && get_user_class() < UC_VIP)
  die;

foreach(
explode(":","descr:type:name") as $v) {
        if (!isset(
$_POST[$v]))
                
bark("missing form data");
} 

 if (!empty(
$_POST['poster']))
$poster = unesc($_POST['poster']);

 if (!empty(
$_POST['url']))
$url = unesc($_POST['url']);

if (!isset(
$_FILES["file"]))
        
bark("missing form data");

$f = $_FILES["file"];
$fname = unesc($f["name"]);
if (empty(
$fname))
        
bark("Empty filename!");

$nfofile = $_FILES['nfo'];
if (
$nfofile['name'] == '')
  
bark("No NFO!");

if (
$nfofile['size'] == 0)
  
bark("0-byte NFO");

if (
$nfofile['size'] > 565535)
  
bark("NFO is too big! Max 65,535 bytes.");

$nfofilename = $nfofile['tmp_name'];

if (@!
is_uploaded_file($nfofilename))
  
bark("NFO upload failed");

$descr = unesc($_POST["descr"]);
if (!
$descr)
  
bark("You must enter a description!");

if(
$_POST['strip'] == 'strip')
{
    include 
'include/strip.php';
        
$descr = preg_replace("/[^\\x20-\\x7e\\x0a\\x0d]/", " ", $descr);
    
strip($descr);
}
if (!empty(
$_POST['x2']))
$x2 = unesc($_POST['x2']);

if (!empty(
$_POST['free']))
$free = unesc($_POST['free']);

if (!empty(
$_POST['extern']))
$extern = unesc($_POST['extern']);

if (!empty(
$_POST['seedb']))
$seedb = unesc($_POST['seedb']);

if (!empty(
$_POST['sticky']))
$sticky = unesc($_POST['sticky']);

$request = ($_POST["request"] != "no" ? "yes" : "no");

$catid = (0 + $_POST["type"]);
if (!
is_valid_id($catid))
        
bark("You must select a category to put the torrent in!");

if (!
validfilename($fname))
        
bark("Invalid filename!");
if (!
preg_match('/^(.+)\.torrent$/si', $fname, $matches))
        
bark("Invalid filename (not a .torrent).");
$shortfname = $torrent = $matches[1];
if (!empty(
$_POST["name"]))
        
$torrent = unesc($_POST["name"]);

$tmpname = $f["tmp_name"];
if (!
is_uploaded_file($tmpname))
        
bark("eek");
if (!
filesize($tmpname))
        
bark("Empty file!");

$dict = bdec_file($tmpname, $max_torrent_size);
if (!isset(
$dict))
        
bark("What the hell did you upload? This is not a bencoded file!");

function 
dict_check($d, $s) {
        if (
$d["type"] != "dictionary")
                
bark("not a dictionary");
        
$a = explode(":", $s);
        
$dd = $d["value"];
        
$ret = array();
        foreach (
$a as $k) {
                unset(
$t);
                if (
preg_match('/^(.*)\((.*)\)$/', $k, $m)) {
                        
$k = $m[1];
                        
$t = $m[2];
                }
                if (!isset(
$dd[$k]))
                        
bark("dictionary is missing key(s)");
                if (isset(
$t)) {
                        if (
$dd[$k]["type"] != $t)
                                
bark("invalid entry in dictionary");
                        
$ret[] = $dd[$k]["value"];
                }
                else
                        
$ret[] = $dd[$k];
        }
        return 
$ret;
}

function 
dict_get($d, $k, $t) {
        if (
$d["type"] != "dictionary")
                
bark("not a dictionary");
        
$dd = $d["value"];
        if (!isset(
$dd[$k]))
                return;
        
$v = $dd[$k];
        if (
$v["type"] != $t)
                
bark("invalid dictionary entry type");
        return 
$v["value"];
}

list(
$ann, $info) = dict_check($dict, "announce(string):info");
list(
$dname, $plen, $pieces) = dict_check($info, "name(string):piece length(integer):pieces(string)");

//$passkey=$announce_urls[0].'?passkey='.$CURUSER['passkey'];

//if ($passkey != $ann)
//bark("invalid announce url! must be <b>" . $passkey . "</b>");


$external=!in_array($ann, $announce_urls, 1);
if (
strlen($pieces) % 20 != 0)
        
bark("invalid pieces");

$filelist = array();
$totallen = dict_get($info, "length", "integer");
if (isset(
$totallen)) {
        
$filelist[] = array($dname, $totallen);
        
$type = "single";
}
else {
        
$flist = dict_get($info, "files", "list");
        if (!isset(
$flist))
                
bark("missing both length and files");
        if (!
count($flist))
                
bark("no files");
        
$totallen = 0;
        foreach (
$flist as $fn) {
                list(
$ll, $ff) = dict_check($fn, "length(integer):path(list)");
                
$totallen += $ll;
                
$ffa = array();
                foreach (
$ff as $ffe) {
                        if (
$ffe["type"] != "string")
                                
bark("filename error");
                        
$ffa[] = $ffe["value"];
                }
                if (!
count($ffa))
                        
bark("filename error");
                
$ffe = implode("/", $ffa);
                
$filelist[] = array($ffe, $ll);
        if (
$ffe == 'Thumbs.db')
        {
            
stderr("Error","The torrent can't contain files named Thumbs.db!");
            die;
        }
        }
        
$type = "multi";
}

//$dict['value']['announce']=bdec(benc_str( $announce_urls[0]));  // change announce url to local
//$dict['value']['info']['value']['private']=bdec('i1e');  // add private tracker flag
//$dict['value']['info']['value']['source']=bdec(benc_str( "[$DEFAULTBASEURL] $SITENAME")); // add link for bitcomet users
unset($dict['value']['announce-list']); // remove multi-tracker capability
unset($dict['value']['nodes']); // remove cached peers (Bitcomet & Azareus)
unset($dict['value']['info']['value']['crc32']); // remove crc32
unset($dict['value']['info']['value']['ed2k']); // remove ed2k
unset($dict['value']['info']['value']['md5sum']); // remove md5sum
unset($dict['value']['info']['value']['sha1']); // remove sha1
unset($dict['value']['info']['value']['tiger']); // remove tiger
unset($dict['value']['azureus_properties']); // remove azureus properties
$dict=bdec(benc($dict)); // double up on the becoding solves the occassional misgenerated infohash
$dict['value']['comment']=bdec(benc_str( "Torrent created for '$SITENAME' tracker")); // change torrent comment
$dict['value']['created by']=bdec(benc_str( "$CURUSER[username]")); // change created by
$dict['value']['publisher']=bdec(benc_str( "$CURUSER[username]")); // change publisher
$dict['value']['publisher.utf-8']=bdec(benc_str( "$CURUSER[username]")); // change publisher.utf-8
$dict['value']['publisher-url']=bdec(benc_str( "$DEFAULTBASEURL/userdetails.php?id=$CURUSER[id]")); // change publisher-url
$dict['value']['publisher-url.utf-8']=bdec(benc_str( "$DEFAULTBASEURL/userdetails.php?id=$CURUSER[id]")); // change publisher-url.utf-8
list($ann, $info) = dict_check($dict, "announce(string):info");

$infohash = pack("H*", sha1($info["string"]));


//------------------------------------------------DHT TORRENTS by Axxel--------------------------------------------------

if($external && $extorr == "yes")
bark("$takeupld_r");



$external =($external!=null) ? sqlesc(substr($ann,0,strrpos($ann,'announce')). 'scrape'. substr($ann,strrpos($ann,'announce')+9) .'?info_hash=' . urlencode($infohash)):null;
if(
preg_match('/passkey/',$external))
$external =($external!=null) ? sqlesc(substr($ann,0,strrpos($ann,'announce')). 'scrape.'. substr($ann,strrpos($ann,'announce')+9) .'&info_hash=' . urlencode($infohash)):'';
elseif(
preg_match('/php/',$external))
$external =($external!=null) ? sqlesc(substr($ann,0,strrpos($ann,'announce')). 'scrape.'. substr($ann,strrpos($ann,'announce')+9) .'?info_hash=' . urlencode($infohash)):'';
elseif(!
$external)
$external = false;
else
$external =($external!=null) ? sqlesc(substr($ann,0,strrpos($ann,'announce')). 'scrape'. substr($ann,strrpos($ann,'announce')+9) .'?info_hash=' . urlencode($infohash)):'';

// Replace punctuation characters with spaces
// $fname = str_replace(".torrent", "", $fname);
// $fname = $fname."-[PeerSpy].torrent";

//------------------------------------------------DHT TORRENTS end-------------------------------------------------------

// Replace punctuation characters with spaces

$torrent = str_replace("_", " ", $torrent);
$torrent = str_replace(" ", ".", $torrent);
$torrent = str_replace(".-", "-", $torrent);
$torrent = str_replace("-.", "-", $torrent);
$torrent = str_replace(".-.", "-", $torrent);
$torrent = str_replace("--", "-", $torrent);
$torrent = str_replace(":", ".", $torrent);
$torrent = str_replace(":.", ".", $torrent);
$torrent = str_replace(".:", ".", $torrent);
$torrent = str_replace(".:.", ".", $torrent);
$torrent = str_replace("..", ".", $torrent);

// Replace .torrent .rar .avi .exe .zip ... characters with spaces

$torrent = str_replace(".torrent", " ", $torrent);
$torrent = str_replace(".rar", " ", $torrent);
$torrent = str_replace(".avi", " ", $torrent);
$torrent = str_replace(".mpeg", " ", $torrent);
$torrent = str_replace(".exe", " ", $torrent);
$torrent = str_replace(".zip", " ", $torrent);
$torrent = str_replace(".wmv", " ", $torrent);
$torrent = str_replace(".iso", " ", $torrent);
$torrent = str_replace(".bin", " ", $torrent);
$torrent = str_replace(".txt", " ", $torrent);
$torrent = str_replace(".nfo", " ", $torrent);
$torrent = str_replace(".7z", " ", $torrent);
$torrent = str_replace(".mp3", " ", $torrent);

$nfo = sqlesc(str_replace("\x0d\x0d\x0a", "\x0d\x0a", @file_get_contents($nfofilename)));
$smalldescr = $_POST["description"];

if(
$extern)


$ret = mysql_query("INSERT INTO torrents (search_text, filename, owner, visible, request, info_hash, name, size, numfiles, type, url, descr, x2, extern, seedb, free, ori_descr, description, category, save_as, added, last_action, external, nfo, poster) VALUES (" .
                
implode(",", array_map("sqlesc", array(searchfield("$shortfname $dname $torrent"), $fname, $CURUSER["id"], "no", $request, $infohash, $torrent, $totallen, count($filelist), $type, $url, $descr, $x2, $extern, $seedb, $free, $descr, $smalldescr, 0 + $_POST["type"], $dname))) .
                
", '" . get_date_time() . "', '" . get_date_time() . "', $external, $nfo, '".$poster."')");
else
$ret = mysql_query("INSERT INTO torrents (search_text, filename, owner, visible, request, info_hash, name, size, numfiles, type, url, descr, x2, extern, seedb, sticky, free, ori_descr, description, category, save_as, added, last_action, nfo, poster) VALUES (" .
                
implode(",", array_map("sqlesc", array(searchfield("$shortfname $dname $torrent"), $fname, $CURUSER["id"], "no", $request, $infohash, $torrent, $totallen, count($filelist), $type, $url, $descr, $x2, $extern, $seedb, $sticky, $free, $descr, $smalldescr, 0 + $_POST["type"], $dname))) .
                
", '" . get_date_time() . "', '" . get_date_time() . "', $nfo, '".$poster."')");


if (!
$ret) {
        if (
mysql_errno() == 1062)
                
bark("torrent already uploaded!");
        
bark("mysql puked: ".mysql_error());
}
$id = mysql_insert_id();

@
mysql_query("DELETE FROM files WHERE torrent = $id");
foreach (
$filelist as $file) {
        @
mysql_query("INSERT INTO files (torrent, filename, size) VALUES ($id, ".sqlesc($file[0]).",".$file[1].")");
}

$fp = fopen("$torrent_dir/$id.torrent", "w");
if (
$fp)
{
        @
fwrite($fp, benc($dict), strlen(benc($dict)));
    
fclose($fp);
}

//write_log("Torrent $id ($torrent) was uploaded by " . $CURUSER["username"]);
write_log("Torrent: <b>$torrent</b> | ID: <b>$id</b> | Was <b>uploaded</b>. by $CURUSER[username].");
/* RSS feeds */
/*
if (($fd1 = @fopen("rss.xml", "w")) && ($fd2 = fopen("rssdd.xml", "w")))
{
        $cats = "";
        $res = mysql_query("SELECT id, name FROM categories");
        while ($arr = mysql_fetch_assoc($res))
                $cats[$arr["id"]] = $arr["name"];
        $s = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<rss version=\"2.0\">\n<channel>\n" .
                "<title>$DEFAULTBASEURL</title>\n<description>Newest tracker torrents</description>\n<link>$DEFAULTBASEURL/</link>\n";
        @fwrite($fd1, $s);
        @fwrite($fd2, $s);
        $r = mysql_query("SELECT id,name,descr,filename,category FROM torrents ORDER BY added DESC LIMIT 15") or sqlerr(__FILE__, __LINE__);
        while ($a = mysql_fetch_assoc($r))
        {
                $cat = $cats[$a["category"]];
                $s = "<item>\n<title>" . htmlspecialchars($a["name"] . " ($cat)") . "</title>\n" .
                        "<description>" . htmlspecialchars($a["descr"]) . "</description>\n";
                @fwrite($fd1, $s);
                @fwrite($fd2, $s);
                @fwrite($fd1, "<link>$DEFAULTBASEURL/details.php?id=$a[id]&hit=1</link>\n</item>\n");
                $filename = htmlspecialchars($a["filename"]);
                @fwrite($fd2, "<link>$DEFAULTBASEURL/download.php/$a[id]/$filename</link>\n</item>\n");
        }
        $s = "</channel>\n</rss>\n";
        @fwrite($fd1, $s);
        @fwrite($fd2, $s);
        @fclose($fd1);
        @fclose($fd2);
}
*/
/* Email notifs */
/*******************

$res = mysql_query("SELECT name FROM categories WHERE id=$catid") or sqlerr();
$arr = mysql_fetch_assoc($res);
$cat = $arr["name"];
$res = mysql_query("SELECT email FROM users WHERE enabled='yes' AND notifs LIKE '%[cat$catid]%'") or sqlerr();
$uploader = $CURUSER['username'];

$size = mksize($totallen);
$description = ($html ? strip_tags($descr) : $descr);

$body = <<<EOD
A new torrent has been uploaded.

Name: $torrent
Size: $size
Category: $cat
Uploaded by: $uploader

Description
-------------------------------------------------------------------------------
$description
-------------------------------------------------------------------------------

You can use the URL below to download the torrent (you may have to login).

$DEFAULTBASEURL/details.php?id=$id&hit=1

--
$SITENAME
EOD;
$to = "";
$nmax = 100; // Max recipients per message
$nthis = 0;
$ntotal = 0;
$total = mysql_num_rows($res);
while ($arr = mysql_fetch_row($res))
{
  if ($nthis == 0)
    $to = $arr[0];
  else
    $to .= "," . $arr[0];
  ++$nthis;
  ++$ntotal;
  if ($nthis == $nmax || $ntotal == $total)
  {
    if (!mail("Multiple recipients <$SITEEMAIL>", "New torrent - $torrent", $body,
    "From: $SITEEMAIL\r\nBcc: $to", "-f$SITEEMAIL"))
          stderr("Error", "Your torrent has been been uploaded. DO NOT RELOAD THE PAGE!\n" .
            "There was however a problem delivering the e-mail notifcations.\n" .
            "Please let an administrator know about this error!\n");
    $nthis = 0;
  }
}


*******************/

$text = "[b]New torrent![/b] [url=$BASEURL/details.php?id=$id]".htmlspecialchars($torrent)."[/url] [color=lime][b]was just uploaded by[/b] [/color][url=$BASEURL/userdetails.php?id=". $CURUSER['id'] ."] " .$CURUSER['username']."[/URL]";
$userid = "10001";
 
$date=time();
mysql_query("INSERT INTO shoutbox (id, userid, date, text) VALUES ('id'," . sqlesc($userid) . ", $date, " . sqlesc($text) . ")") or sqlerr(__FILE__, __LINE__);



header("Location: $BASEURL/details.php?id=$id&uploaded=1");


BlueZ98 29th June 2013 00:41

Nothing
 
Nothing changes :| take my yahoo id: easy.bluez

firefly007 29th June 2013 00:52

Quote:

Originally Posted by BlueZ98 (Post 41290)
Nothing changes :| take my yahoo id: easy.bluez

You will need to upload a new torrent to see it as it only executes upon torrent upload.

BlueZ98 29th June 2013 00:54

Upload
 
I allready upload a torrent and it's say: Nothing here sorry pla :-(


Sorry for my bad english.

firefly007 29th June 2013 01:00

Quote:

Originally Posted by BlueZ98 (Post 41293)
I allready upload a torrent and it's say: Nothing here sorry pla :-(


Sorry for my bad english.

That's a whole new problem

1) Chmod 0777 the torrent folder.
2) Check torrent path in bittorent.php.

BlueZ98 29th June 2013 01:04

It work, thank you: the folder warehouse are missing :D

firefly007 29th June 2013 01:10

Quote:

Originally Posted by BlueZ98 (Post 41295)
It work, thank you: the folder warehouse are missing :D

OK, good good

GameMaster 29th June 2013 15:13

OK installed this code today and after new staff members posting in shoutbox their getting
Error

Please select an option.

Also when making users staff they're not able to view the site, it's saying fake ip addresses or something, any way to fix this?

firefly007 29th June 2013 15:34

Quote:

Originally Posted by GameMaster (Post 41300)
OK installed this code today and after new staff members posting in shoutbox their getting
Error

Please select an option.

Also when making users staff they're not able to view the site, it's saying fake ip addresses or something, any way to fix this?


1) They need to either vote or read their announcement.[Its not an error]
2) Edit bittorent.php and add the users name and id to the staff functions.

GameMaster 29th June 2013 15:48

also this source is not english, any help on that too? :P

firefly007 29th June 2013 15:58

Quote:

Originally Posted by GameMaster (Post 41302)
also this source is not english, any help on that too? :P

You will need to translate it, as far as I know there is no lang system.

GameMaster 29th June 2013 16:04

what kind of source code is that in your signature, the site link? :)

staff 29th June 2013 17:51

How Create user is Owner?
 
Quote:

Originally Posted by aeon-design (Post 38845)
Create an account and after the login !

How Create user is Owner?
http://image.ohozaa.com/i/7cd/1GOk2L.jpg

Timisoreanul 29th June 2013 18:22

In phpmyadmin , at users, your name ..click edit ..find Class , there replace/write : 15 ,click ok.. now you are owner. Good luck

staff 30th June 2013 07:57

Quote:

Originally Posted by Timisoreanul (Post 41308)
In phpmyadmin , at users, your name ..click edit ..find Class , there replace/write : 15 ,click ok.. now you are owner. Good luck

Change, then this message came up.>> Access Denied!
We come to believe you are using a fake account, therefore we've logged this action!
i try logout and new login one more the same
http://image.ohozaa.com/i/fc3/kKSxsJ.jpg

BlueZ98 30th June 2013 12:07

Resolve
 
Quote:

Originally Posted by staff (Post 41315)
Change, then this message came up.>> Access Denied!
We come to believe you are using a fake account, therefore we've logged this action!
i try logout and new login one more the same
http://image.ohozaa.com/i/fc3/kKSxsJ.jpg

You must to go to your phpmyadmin and to set to your username id 1 and class 15 and that its. For me it's works!

staff 30th June 2013 13:05

Quote:

Originally Posted by BlueZ98 (Post 41316)
You must to go to your phpmyadmin and to set to your username id 1 and class 15 and that its. For me it's works!

this scrip very problem.

firefly007 30th June 2013 16:47

You just need to add your Id's and username in bittorrent.php

looks for this...

$clasa =your id;
$glavnii = array("your username");


PHP Code:

    global $CURUSER;
    
$clasa  = 16; //number class of Owner
    
$glavnii = array("aeon_x32");
    
// Case sensitive. (example: array("adminname1","adminname2","adminname3","adminname4","so far")
    
if ($CURUSER["class"] >= $clasa)
        if (!
in_array($CURUSER["username"], $glavnii, true)) { // true for strict comparison
        
$msg = "[b]ATENTIE ! - un idiot incearca sa atace trackerul :[/b]
        
        [b]Username[/b]: "
.$CURUSER["username"]." ; 
        [b]User ID[/b]: "
.$CURUSER["id"]." ;
        [b]IP[/b]: "
.getip();
        
mysql_query("INSERT INTO messages (poster, sender, receiver, added, msg) VALUES(0, 0, '1', '" . get_date_time() . "', " .sqlesc($msg) . ")") or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE users set enabled='no' WHERE id=$CURUSER[id]") or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE users set class='1' WHERE id=$CURUSER[id]") or sqlerr(__FILE__, __LINE__);
        
stderr("Acces Denied!","Your username not found in security code, your account will be DISABLED.");
}
} 

Also need to add that all of these sources from Chez and Aeon are all basically the same and its weird that there needs to be almost identical releases with different styling when I think it would be better to make alternative style sheets.

Also maybe concentrating on spending some time translating it to English too.

I'm also interested to find out how the copyright works ???

Gbpiclvdsmu 6th August 2013 15:46

Problem
 
I try to instal this source and i have that error

Code:

15) { stdhead(); stdmsg("FUCK OFF...", "STOP CHEATING MOTHER FUCKER"); stdfoot(); exit; } loggedinorreturn(); maxsysop(); if ($_SERVER["REQUEST_METHOD"] == "POST") { $choice = $_POST["choice"]; if ($CURUSER && $choice != "" && $choice < 256 && $choice == floor($choice)) { $res = mysql_query("SELECT * FROM polls ORDER BY added DESC LIMIT 1") or sqlerr(); $arr = mysql_fetch_assoc($res) or die("No poll"); $pollid = $arr["id"]; $userid = $CURUSER["id"]; mysql_query("UPDATE users SET seedbonus = seedbonus+1.0 WHERE id = $CURUSER[id]") or sqlerr(__FILE__, __LINE__); $res = mysql_query("SELECT * FROM pollanswers WHERE pollid=$pollid && userid=$userid") or sqlerr(); $arr = mysql_fetch_assoc($res); if ($arr) die("Dupe vote"); mysql_query("INSERT INTO pollanswers VALUES(0, $pollid, $userid, $choice)") or sqlerr(); if (mysql_affected_rows() != 1) stderr("Error", "An error occured. Your vote has not been counted."); header("Location: $BASEURL/"); die; } else stderr("Error", "Please select an option."); } $a = @mysql_fetch_assoc(@mysql_query("SELECT id,username FROM users WHERE status='confirmed' ORDER BY id DESC LIMIT 1")) or die(mysql_error()); if ($CURUSER) $latestuser = "" . $a["username"] . ""; else $latestuser = $a['username']; $male = number_format(get_row_count("users", "WHERE gender='Male'")); $female = number_format(get_row_count("users", "WHERE gender='Female'")); $nobody = number_format(get_row_count("users", "WHERE gender='N/A'")); $invites = number_format(get_row_count("users", "WHERE invited_by>'0'")); //$rated = number_format(get_row_count("torrents", "WHERE numratings>'0'")); //$extern = number_format(get_row_count("torrents", "WHERE extern='yes'")); $topics = number_format(get_row_count("topics")); $posts = number_format(get_row_count("posts")); $registered = number_format(get_row_count("users")); $todayreg = get_row_count('users', 'WHERE added > DATE_SUB(NOW(), INTERVAL 1 DAY)'); $unverified = number_format(get_row_count("users", "WHERE status='pending'")); $torrents = number_format(get_row_count("torrents")); $dead = number_format(get_row_count("torrents", "WHERE visible='no'")); $warnedu = number_format(get_row_count("users", "WHERE warned='yes'")); $disabled = number_format(get_row_count("users", "WHERE enabled='no'")); $NAT = number_format(get_row_count("peers", "WHERE connectable='no'")); $r = mysql_query("SELECT value_u FROM avps WHERE arg='seeders'") or sqlerr(__FILE__, __LINE__); $a = mysql_fetch_row($r); $seeders = $a[0]; $r = mysql_query("SELECT value_u FROM avps WHERE arg='leechers'") or sqlerr(__FILE__, __LINE__); $a = mysql_fetch_row($r); $leechers = $a[0]; $seeders = (get_row_count("peers", "WHERE seeder='yes'")); $leechers = (get_row_count("peers", "WHERE seeder='no'")); $peers = ($seeders + $leechers); $uniqpeer = (get_row_count("peers", "WHERE connectable='yes'")*3); if ($leechers == 0) $tratio = 0; else $tratio = round(($seeders / $leechers), 2); if ($leechers == 0) $sratio = 0; //$sratio = round(($seeders / $leechers) * 100); $sratio = round((($seeders + 1) / ($leechers + 1)) * 100); $result = mysql_query("SELECT SUM(downloaded) AS totaldl, SUM(uploaded) AS totalul FROM users") or sqlerr(__FILE__, __LINE__); $row = mysql_fetch_assoc($result); $totaldownloaded = $row["totaldl"]; $totaluploaded = $row["totalul"]; $totaldata = $totaldownloaded+$totaluploaded; $dt = gmtime() - 3600; $dt = sqlesc(get_date_time($dt)); $result = mysql_query("SELECT SUM(last_access >= $dt) AS totalol FROM users") or sqlerr(__FILE__, __LINE__); while ($row = mysql_fetch_array ($result)) { $totalonline = $row["totalol"]; $rec = @mysql_fetch_array(@mysql_query("SELECT * FROM onlinerec LIMIT 1")); if ($rec[users] < $totalonline) mysql_query("UPDATE onlinerec SET users=$totalonline, date='".get_date_time()."' WHERE users=$rec[users]"); } if (get_user_class() >= UC_UPLOADER) { $activeuser_class = 15; } else { $activeuser_class = 7; } $dt = gmtime() - 3600; $dt = sqlesc(get_date_time($dt)); $res = mysql_query("SELECT id, username, class, uploaded, downloaded, avatar, added, donor, warned FROM users WHERE class <= $activeuser_class AND last_access >= $dt ORDER BY class DESC,username") or sqlerr(__FILE__, __LINE__); while ($arr = mysql_fetch_assoc($res)) { if ($activeusers) $activeusers .= ",\n"; $res2 = mysql_query("SELECT COUNT(*) FROM peers WHERE userid=" . htmlspecialchars($arr["id"]) . " AND seeder='yes'") or print(mysql_error()); $row = mysql_fetch_row($res2); $activeseed = "$row[0]"; $res2 = mysql_query("SELECT COUNT(*) FROM peers WHERE userid=" . htmlspecialchars($arr["id"]) . " AND seeder='no'") or print(mysql_error()); $row = mysql_fetch_row($res2); $activeleech = "$row[0]"; if ($arr[added] == "0000-00-00 00:00:00") $joindate = 'N/A'; else $joindate = "Jn: " . get_elapsed_time(sql_timestamp_to_unix_timestamp($arr["added"])) . " ago"; if ($arr["downloaded"] > 0) { $ratio = number_format($arr["uploaded"] / $arr["downloaded"], 3); $ratio = "$ratio"; } else if ($arr["uploaded"] > 0) $ratio = "Inf."; else $ratio = "---"; $uploaded = mksize($arr["uploaded"]); $downloaded = mksize($arr["downloaded"]); $username = "" . htmlspecialchars($arr['username']) . ""; //$username = $arr["username"]; $usrclass = "".get_user_class_name($arr['class']).""; if ($arr["avatar"]) $avatarover = "" . htmlspecialchars($arr['avatar']) . ""; //$avatarover = $arr["avatar"]; elseif (!$arr["avatar"]) $avatarover = "/pic/default_avatar.png"; switch ($arr["class"]) { case UC_OWNER: $arr["username"] = "
$joindate
Cl: $usrclass

UP: $uploaded
DL: $downloaded
', CAPTION, '
R:$ratio  $activeseed  $activeleech
');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_SVISOR: $arr["username"] = "
$joindate
Cl: $usrclass

UP: $uploaded
DL: $downloaded
', CAPTION, '
R:$ratio  $activeseed  $activeleech
');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_SYSOP: $arr["username"] = "
$joindate
Cl: $usrclass

UP: $uploaded
DL: $downloaded
', CAPTION, '
R:$ratio  $activeseed  $activeleech
');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_ELITE_ADMINISTRATOR: $arr["username"] = "
$joindate
Cl: $usrclass

UP: $uploaded
DL: $downloaded
', CAPTION, '
R:$ratio  $activeseed  $activeleech
');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_ADMINISTRATOR: $arr["username"] = "
$joindate
Cl: $usrclass

UP: $uploaded
DL: $downloaded
', CAPTION, '
R:$ratio  $activeseed  $activeleech
');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_MASTER_MODERATOR: $arr["username"] = "
$joindate
Cl: $usrclass

UP: $uploaded
DL: $downloaded
', CAPTION, '
R:$ratio  $activeseed  $activeleech
');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_MODERATOR: $arr["username"] = "
$joindate
Cl: $usrclass

UP: $uploaded
DL: $downloaded
', CAPTION, '
R:$ratio  $activeseed  $activeleech
');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_PREMIUM_UPLOADER: $arr["username"] = "
$joindate
Cl: $usrclass

UP: $uploaded
DL: $downloaded
', CAPTION, '
R:$ratio  $activeseed  $activeleech
');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_UPLOADER: $arr["username"] = "
$joindate
Cl: $usrclass

UP: $uploaded
DL: $downloaded
', CAPTION, '
R:$ratio  $activeseed  $activeleech
');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_VIP: $arr["username"] = "
$joindate
Cl: $usrclass

UP: $uploaded
DL: $downloaded
', CAPTION, '
R:$ratio  $activeseed  $activeleech
');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_LEGEND_USER: $arr["username"] = "
$joindate
Cl: $usrclass

UP: $uploaded
DL: $downloaded
', CAPTION, '
R:$ratio  $activeseed  $activeleech
');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_EXTREME_USER: $arr["username"] = "
$joindate
Cl: $usrclass

UP: $uploaded
DL: $downloaded
', CAPTION, '
R:$ratio  $activeseed  $activeleech
');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_ELITE_USER: $arr["username"] = "
$joindate
Cl: $usrclass

UP: $uploaded
DL: $downloaded
', CAPTION, '
R:$ratio  $activeseed  $activeleech
');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_POWER_USER: $arr["username"] = "
$joindate
Cl: $usrclass

UP: $uploaded
DL: $downloaded
', CAPTION, '
R:$ratio  $activeseed  $activeleech
');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; case UC_USER: $arr["username"] = "
$joindate
Cl: $usrclass

UP: $uploaded
DL: $downloaded
', CAPTION, '
R:$ratio  $activeseed  $activeleech
');\" onmouseout=\"return nd();\"> " . htmlspecialchars($arr["username"]) . ""; break; } $donator = $arr["donor"] === "yes"; if ($donator) $activeusers .= ""; $warned = $arr["warned"] === "yes"; if ($warned) $activeusers .= ""; if ($CURUSER) $activeusers .= "{$arr["username"]}"; else $activeusers .= "{$arr["username"]}"; if ($donator) $activeusers .= "Donated {$$arr["donor"]}"; if ($warned) $activeusers .= "Warned {$$arr["warned"]}"; } if (!$activeusers) $activeusers = "There have been no active users in the last 15 minutes."; stdhead("Home"); echo "Welcome to last user : $latestuser\n"; // Extra //print("


\n"); //print("
 // // // //

\n"); // End Extra begin_main_frame (); print("
"); if (get_user_class() >= UC_SVISOR){ print("
Tracker News [New Item]"); print("
\n"); } else{ print("
Tracker News
"); } $res = mysql_query("SELECT * FROM news WHERE ADDDATE(added, INTERVAL 365 DAY) > NOW() ORDER BY added DESC LIMIT 5") or sqlerr(__FILE__, __LINE__); if (mysql_num_rows($res) > 0) { print("
\n
"); $news_flag = 0; while($array = mysql_fetch_array($res)) { $user = mysql_fetch_assoc(mysql_query("SELECT username FROM users WHERE id = $array[userid]")) or sqlerr(); if ($news_flag == 0) { print("
\"Show/Hide\" " . gmdate("M-d-y",strtotime($array['added'])) . " - " ."". $array['title'] . " "); if (get_user_class() >= UC_MODERATOR) { print("  [E]"); print(" [D]"); } print("
".format_comment($array["body"],0)."

"); $news_flag = 1; } else { print("
\"Show/Hide\" " . gmdate("M-d-y",strtotime($array['added'])) . " - " ."". $array['title'] . " "); if (get_user_class() >= UC_MODERATOR) { print("  [E]"); print(" [D]"); } print("
".format_comment($array["body"],0)."

"); } print("
".str_replace(array("n", " "), array("n", " "), $array["body"])."
"); print(""); } print("
\n"); } //print("

\n"); //print("
Our partner and daily resource of games!

\n"); //print("

\n"); ?> "); $query = "SELECT * FROM banners WHERE 1=1"; $sql = mysql_query($query); while ($row = mysql_fetch_array($sql)) { $link = $row['link']; $banner = $row['banner']; print("

"); } print("
"); ////////////////////////////////////////////////////////////////////////////////////// ?>

Recent Poll"); if (get_user_class() >= UC_SYSOP) { print(""); print(" - [New]\n"); if($pollok) { print(" - [Edit]\n"); // print(" - [Delete]"); } print(""); } print("

\n"); if($pollok) { print("
\n"); print("
"); print("
$question

\n"); $voted = $arr2; if ($voted) { // display results if ($arr["selection"]) $uservote = $arr["selection"]; else $uservote = -1; // we reserve 255 for blank vote. $res = mysql_query("SELECT selection FROM pollanswers WHERE pollid=$pollid AND selection < 20") or sqlerr(); $tvotes = mysql_num_rows($res); $vs = array(); // array of $os = array(); // Count votes while ($arr2 = mysql_fetch_row($res)) $vs[$arr2[0]] += 1; reset($o); for ($i = 0; $i < count($o); ++$i) if ($o[$i]) $os[$i] = array($vs[$i], $o[$i]); function srt($a,$b) { if ($a[0] > $b[0]) return -1; if ($a[0] < $b[0]) return 1; return 0; } // now os is an array like this: array(array(123, "Option 1"), array(45, "Option 2")) if ($arr["sort"] == "yes") usort($os, srt); print("\n"); $i = 0; while ($a = $os[$i]) { if ($i == $uservote) $a[1] .= " *"; if ($tvotes == 0) $p = 0; else $p = round($a[0] / $tvotes * 100); if ($i % 2) $c = ""; else $c = ""; print("\n"); ++$i; } print("
" . $a[1] . "      " . " $p%
\n"); $tvotes = number_format($tvotes); print("
Votes: $tvotes

\n"); } else { print("
\n"); $i = 0; while ($a = $o[$i]) { print("$a
\n"); ++$i; } print("
"); print("Blank vote (a.k.a. \" I just want to see the results ! \")
\n"); print("


"); } ?>
Older | Suggestions
\n"); ?>
\n"; echo "
"; echo"
No Active Polls

\n"; echo "
"; } } ?> = UC_USER) { ?> "; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
Bold    Italic    Underline    Url    Img           
"; } ?>

= UC_USER) { ?>
Useri Activi:
Notice: Undefined variable: totalonline in C:\xampp\htdocs\MerY\index.php on line 675


 
More Smilies


                   

Notice: Undefined variable: activeusers in C:\xampp\htdocs\MerY\index.php on line 680
= UC_VIP) { ?>

'' ORDER BY added DESC LIMIT 10"; $result=mysql_query($query);$num = mysql_num_rows($result); print("
"); while ($row = mysql_fetch_assoc($result)) { $id = $row['id']; $name = $row['name']; $poster = $row['poster']; $name = str_replace('_', ' ' , $name); $name = str_replace('.', ' ' , $name); $name = substr($name, 0, 50); if (!empty($poster)){ print("$name"); } else { print("$name"); } } print("
"); //== End of Last X torrents with poster and marquee mod ==// ?> = UC_USER) { ?>

"); print(""); print(""); print(""); print(""); while( $arr = mysql_fetch_assoc($result) ){ $torrname = htmlspecialchars($arr['name']); if (strlen($torrname) > 50) $torrname = substr($torrname, 0,50) . "..."; $poster = $arr["poster"]; if (!empty($arr["poster"])){ $poster1 = ""; } else{ $poster1 = ""; } print(""); print(""); print(""); print(""); print(""); } print("
0) { print("
\n"); print("\n"); while ($arr = mysql_fetch_assoc($res)) { $torrname = htmlspecialchars($arr['name']); if (strlen($torrname) > 50) $torrname = substr($torrname, 0,50) . "..."; $poster = $arr["poster"]; if (!empty($arr["poster"])){ $poster1 = ""; } else{ $poster1 = ""; } print("\n"); } print("
Top 10 torrents               
".$torrname."    ".$arr['seeders']."    ".number_format($arr['leechers'])."
\n"); } else print("Sorry pal, no torrents here..."); ?>
"); print("
Last 10 torrents               
".$torrname."    " . $arr['seeders'] . "    " . $arr['leechers'] . "
"); }?>

\n"); ?>


joeroberts 6th August 2013 15:52

turn on allow short tags in your server settings in php.ini

MrDeL 15th November 2013 20:45

I install this and my website redirect me to 404 Error ? Help ?:sos:

Bump:
Quote:

Originally Posted by daffy (Post 40093)
lol delete index.html in root / public_html also why your there delete xampp folder dont need it

i delete but "It works" appears. :((
:sos::sos::sos::sos:


All times are GMT +2. The time now is 23:02.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2026, vBulletin Solutions Inc.