...
 
Commits (1)
This source diff could not be displayed because it is too large. You can view the blob instead.
MIT License
Copyright (c) 2019 MicrosoulV3
Copyright (c) 2019 M-jay
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......
Login to view site
Hit & Run
Invite tree
Snatchlist
Local Activity hidden except staff
List members completed torrents
Seedbonus
Auto demote/promote
VIP only torrents
Secure Staff panels
class colur function
Say thanks for download
scrollers on index
recommened torrents
top 10
recent forum on index
\ No newline at end of file
# torrenttrader-3.0
# torrenttrader-3.0 Modded Based on MicroMonkeys 2019 Update
Updated to use mysqli and php 7+ (7.2 or higher recommended) </br>
Please visit https://www.torrenttrader.xyz for help with any issues you may have
Please visit https://www.torrenttrader.xyz for help with any issues you may have </br>
branch torrenttraderv3 = MicroMonkeys original https://github.com/MicrosoulV3/torrenttrader-3.0 </br>
branch raversv3 = Ravers modded (this is stable) </br>
The master branch is not always stable please use raversv3 </br>
You can compare all edits here https://gitlab.com/M-jay/tt2019/compare/torrenttraderv3...raversv3 </br>
If you have any ideas on how to improve the code please let me know </br>
If you have any old or new mods please share and i will consider updating them </br>
I am not a expert coder this is a hobby so i will try to improve and modernise it </br>
Work has started on making it mobile friendly i hope to add a @media.css </br>
Some of the mods included </br>
Login to view site </br>
Hit & Run </br>
Invite tree </br>
Snatchlist </br>
Local Activity hidden except staff </br>
List members completed torrents </br>
Seedbonus </br>
Auto demote/promote </br>
VIP only torrents </br>
Secure Staff panels </br>
class colur function </br>
Say thanks for download </br>
scrollers on index </br>
recommened torrents </br>
top 10 </br>
recent forum on index </br>
and some more </br>
......@@ -3,6 +3,7 @@
require_once("backend/functions.php");
dbconn();
$site_config["LEFTNAV"] = $site_config["MIDDLENAV"] = $site_config["RIGHTNAV"] = false;
$type = $_GET["type"];
$email = $_GET["email"];
......
......@@ -40,6 +40,13 @@ if ($user["downloaded"] > 0) {
}
$numtorrents = get_row_count("torrents", "WHERE owner = $id");
//Start hit & run mod
$qry = SQL_Query_exec("SELECT COUNT(`hnr`) FROM `snatched` WHERE `uid` = '$id' AND `hnr` = 'yes'");
$res = mysqli_fetch_row($qry);
$hnr = $res[0];
//End hit & run
$numcomments = get_row_count("comments", "WHERE user = $id");
$numforumposts = get_row_count("forum_posts", "WHERE userid = $id");
......@@ -81,7 +88,7 @@ if ($user["privacy"] != "strong" || ($CURUSER["control_panel"] == "yes") || ($CU
<tr valign="top">
<td align="left">
<?php echo T_("USERNAME"); ?>: <?php echo htmlspecialchars($user["username"])?><br />
<?php echo T_("USERNAME"); ?>: <?php echo class_user($user["username"])?><br />
<?php echo T_("USERCLASS"); ?>: <?php echo get_user_class_name($user["class"])?><br />
<?php echo T_("TITLE"); ?>: <i><?php echo format_comment($user["title"])?></i><br />
<?php echo T_("JOINED"); ?>: <?php echo htmlspecialchars(utc_to_tz($user["added"]))?><br />
......@@ -108,7 +115,9 @@ if ($user["privacy"] != "strong" || ($CURUSER["control_panel"] == "yes") || ($CU
<td align="left">
<?php echo T_("UPLOADED"); ?>: <?php echo mksize($user["uploaded"]); ?><br />
<?php echo T_("DOWNLOADED"); ?>: <?php echo mksize($user["downloaded"]); ?><br />
<?php echo T_("Seed Bonus"); ?>: <?php echo mksize($user["seedbonus"]); ?><br />
<?php echo T_("RATIO"); ?>: <?php echo $ratio; ?><br />
<?php echo T_("H&R"); ?>: <?php echo $hnr; ?><br />
<?php echo T_("AVG_DAILY_DL"); ?>: <?php echo mksize($user["downloaded"] / (DateDiff($user["added"], time()) / 86400)); ?><br />
<?php echo T_("AVG_DAILY_UL"); ?>: <?php echo mksize($user["uploaded"] / (DateDiff($user["added"], time()) / 86400)); ?><br />
<?php echo T_("TORRENTS_POSTED"); ?>: <?php echo number_format($numtorrents); ?><br />
......@@ -122,6 +131,10 @@ if ($user["privacy"] != "strong" || ($CURUSER["control_panel"] == "yes") || ($CU
<!-- <a href=#>View Forum Posts</a><br />
<a href=#>View Comments</a><br /> -->
<a href="report.php?user=<?php echo $user["id"]?>"><?php echo T_("REPORT_MEMBER"); ?></a><br />
<?php if ($CURUSER["class"] >= 5 && $CURUSER["class"] > $user["class"]) { ?>[<a href="invitetree.php?id=<?php echo $user["id"]?>">Invite Tree</a>]<?php } ?><br />
<?php if ($CURUSER["edit_users"]=="yes") { ?>
<div style="margin-bottom:3px"><a href="snatched.php?uid=<?php echo $user["id"]?>"><?php echo "<input type='submit' value='".T_("SNATCHLIST")."'>"; ?></a></div>
<?php } ?>
</td>
</tr>
<?php if ($CURUSER["edit_users"] == "yes") { ?>
......@@ -171,6 +184,7 @@ if ($user["privacy"] != "strong" || ($CURUSER["control_panel"] == "yes") || ($CU
end_frame();
if (get_user_class() > 7)
if ($user["privacy"] != "strong" || ($CURUSER["control_panel"] == "yes") || ($CURUSER["id"] == $user["id"])) {
begin_frame(T_("LOCAL_ACTIVITY"));
......@@ -246,6 +260,7 @@ if($CURUSER["edit_users"]=="yes"){
print("<input type='hidden' name='action' value='edituser' />\n");
print("<input type='hidden' name='userid' value='$id' />\n");
print("<table border='0' cellspacing='0' cellpadding='3'>\n");
if ($CURUSER["class"] > $user["class"]){
print("<tr><td>".T_("TITLE").": </td><td align='left'><input type='text' size='67' name='title' value=\"$user[title]\" /></td></tr>\n");
print("<tr><td>".T_("EMAIL")."</td><td align='left'><input type='text' size='67' name='email' value=\"$user[email]\" /></td></tr>\n");
print("<tr><td>".T_("SIGNATURE").": </td><td align='left'><textarea cols='50' rows='10' name='signature'>".htmlspecialchars($user["signature"])."</textarea></td></tr>\n");
......@@ -255,13 +270,11 @@ if($CURUSER["edit_users"]=="yes"){
print("<tr><td>".T_("IP_ADDRESS").": </td><td align='left'><input type='text' size='20' name='ip' value=\"$user[ip]\" /></td></tr>\n");
print("<tr><td>".T_("INVITES").": </td><td align='left'><input type='text' size='4' name='invites' value='".$user["invites"]."' /></td></tr>\n");
if ($CURUSER["class"] > $user["class"]){
print("<tr><td>".T_("CLASS").": </td><td align='left'><select name='class'>\n");
$maxclass = $CURUSER["class"];
for ($i = 1; $i < $maxclass; ++$i)
print("<option value='$i' " . ($user["class"] == $i ? " selected='selected'" : "") . ">$prefix" . get_user_class_name($i) . "\n");
print("</select></td></tr>\n");
}
print("<tr><td>".T_("DONATED_US").": </td><td align='left'><input type='text' size='4' name='donated' value='$user[donated]' /></td></tr>\n");
......@@ -273,6 +286,7 @@ if($CURUSER["edit_users"]=="yes"){
print("<tr><td>".T_("FORUM_BANNED").": </td><td align='left'><input name='forumbanned' value='yes' type='radio' " . ($forumbanned ? " checked='checked'" : "") . " />Yes <input name='forumbanned' value='no' type='radio' " . (!$forumbanned ? " checked='checked'" : "") . " />No</td></tr>\n");
print("<tr><td>".T_("PASSKEY").": </td><td align='left'>$user[passkey]<br /><input name='resetpasskey' value='yes' type='checkbox' />".T_("RESET_PASSKEY")." (".T_("RESET_PASSKEY_MSG").")</td></tr>\n");
print("<tr><td colspan='2' align='center'><input type='submit' value='".T_("SUBMIT")."' /></td></tr>\n");
}
print("</table>\n");
print("</form>\n");
......@@ -344,6 +358,48 @@ if($CURUSER["edit_users"]=="yes"){
end_frame();
}
// Members completed torrents list mod
if($CURUSER["edit_users"]=="yes"){
begin_frame("Torrents Completed");
$page = $_GET['page'];
$parpage = 25;
$count = get_row_count('completed', 'WHERE `userid` = \'' . $id . '\' ');
list($pagertop, $pagerbottom, $limit) = pager($parpage, $count, "account-details.php?id=$id&amp;");
$orderby = "ORDER BY id DESC";
if ($count > 0) {
echo "<table align='center' cellpadding=\"3\" cellspacing=\"0\" class=\"table_table\" width=\"100%\" >";
$fichier_torrent = "<table align='center' cellpadding=\"3\" cellspacing=\"3\" width=\"99%\" border=\"0\">\n" ."<tr>
<td class='arrondi1' align='center'>Title</td>
</tr>\n";
$torrent = SQL_Query_exec("SELECT torrentid FROM completed WHERE userid = ".$id." $orderby $limit ");
while($tor = mysqli_fetch_assoc($torrent)) {
$torrent2 = @SQL_Query_exec("SELECT id, name FROM torrents WHERE id = ".$tor["torrentid"]." ");
$tor2 = mysqli_fetch_assoc($torrent2);
$fichier_torrent .= "<tr>
<td class='arrondi' align='center'><b><a href='torrents-details.php?id=".$tor2["id"]."' target='_blank'>".$tor2["name"]."</a></b></td>
</tr>\n";
}
print("<tr>
<td align='left'>$fichier_torrent</td>
</tr>\n");
echo "</table>";
if($count>$parpage)
print($pagerbottom);
echo "</table>";
}
end_frame();
}
stdfoot();
?>
\ No newline at end of file
......@@ -2,6 +2,7 @@
require_once("backend/functions.php");
dbconn();
$site_config["LEFTNAV"] = $site_config["MIDDLENAV"] = $site_config["RIGHTNAV"] = false;
if (!empty($_REQUEST["returnto"])) {
if (!$_GET["nowarn"]) {
$nowarn = T_("MEMBERS_ONLY");
......
......@@ -2,6 +2,7 @@
require_once("backend/functions.php");
dbconn();
$site_config["LEFTNAV"] = $site_config["MIDDLENAV"] = $site_config["RIGHTNAV"] = false;
$kind = "0";
if (is_valid_id($_POST["id"]) && strlen($_POST["secret"]) == 32) {
......
......@@ -2,6 +2,7 @@
require_once("backend/functions.php");
dbconn();
$site_config["LEFTNAV"] = $site_config["MIDDLENAV"] = $site_config["RIGHTNAV"] = false;
$username_length = 15; // Max username length. You shouldn't set this higher without editing the database first
$password_minlength = 6;
$password_maxlength = 40;
......@@ -116,13 +117,19 @@ function validusername($username) {
//make first member admin
if ($numsitemembers == '0')
$signupclass = '7';
$signupclass = '11';
else
$signupclass = '1';
$signupclass = '2';
$msg_shout = sqlesc("New User: ".$wantusername." has joined.");
SQL_Query_exec("INSERT INTO shoutbox (userid, date, user, message) VALUES(0,NOW(), 'System' ,".$msg_shout.")");
SQL_Query_exec("INSERT INTO users (username, password, secret, email, status, added, last_access, age, country, gender, client, stylesheet, language, class, ip) VALUES (" .
implode(",", array_map("sqlesc", array($wantusername, $wantpassword, $secret, $email, $status, get_date_time(), get_date_time(), $age, $country, $gender, $client, $site_config["default_theme"], $site_config["default_language"], $signupclass, getip()))).")");
$id = mysqli_insert_id($GLOBALS["DBconnector"]);
$psecret = md5($secret);
......
......@@ -21,6 +21,10 @@ function navmenu(){
<?php print("<a href='account.php?action=mytorrents'><b>".T_("YOUR_TORRENTS")."</b></a>");?>
&nbsp;|&nbsp;
<?php print("<a href='mailbox.php'><b>".T_("YOUR_MESSAGES")."</b></a>");?>
&nbsp;|&nbsp;
<?php print("<a href='snatched.php'><b>".T_("YOUR_SNATCHLIST")."</b></a>");?>
&nbsp;|&nbsp;
<?php print("<a href='mybonus.php'><b>My Seedbonus</b></a>");?>
</th>
</tr>
</table>
......@@ -42,7 +46,7 @@ if (!$action){
<table class="f-border comment" cellpadding="10" border="0" width="100%">
<tr>
<td width="50%" valign="top">
<b><?php echo T_("USERNAME"); ?>:</b> <?php echo $CURUSER["username"]; ?><br />
<b><?php echo T_("USERNAME"); ?>:</b> <?php echo class_user($CURUSER["username"]); ?><br />
<b><?php echo T_("CLASS"); ?>:</b> <?php echo $CURUSER["level"]; ?><br />
<b><?php echo T_("EMAIL"); ?>:</b> <?php echo $CURUSER["email"]; ?><br />
<b><?php echo T_("JOINED"); ?>:</b> <?php echo utc_to_tz($CURUSER["added"]); ?><br />
......@@ -73,6 +77,9 @@ if (!$action){
echo "<b>".T_("INVITED").":</b> ".implode(", ", $rows)."<br />";
?>
<?php print("<b>".T_("IP").":</b> " . $CURUSER["ip"] . "\n"); ?><br />
<?php if ($CURUSER["edit_users"]=="yes" && $CURUSER["class"] > $user["class"]) { ?>
<div style="margin-bottom:3px"><a href="snatched.php?uid=<?php echo $user["id"]?>"><?php echo "<input type='submit' value='".T_("SNATCHLIST")."'>"; ?></a></div>
<?php } ?>
</td></tr>
</table>
<br /><br />
......
This diff is collapsed.
......@@ -283,14 +283,16 @@ if (!isset($self)){ //IF PEER IS NOT IN PEERS TABLE DO THE WAIT TIME CHECK
@fclose($sockres);
}else{
$elapsed = ($self['seeder'] == 'yes') ? $site_config['announce_interval'] - floor(($self['ez'] - time()) / 60) : 0;
$upthis = max(0, $uploaded - $self["uploaded"]);
$downthis = max(0, $downloaded - $self["downloaded"]);
if (($upthis > 0 || $downthis > 0) && is_valid_id($userid)){ // LIVE STATS!)
if (($upthis > 0 || $downthis > 0 || $elapsed > 0) && is_valid_id($userid)){ // LIVE STATS!)
if ($torrent["freeleech"] == 1){
SQL_Query_exec("UPDATE users SET uploaded = uploaded + $upthis WHERE id=$userid") or err("Tracker error: Unable to update stats");
}else{
SQL_Query_exec("UPDATE users SET uploaded = uploaded + $upthis, downloaded = downloaded + $downthis WHERE id=$userid") or err("Tracker error: Unable to update stats");
SQL_Query_exec("UPDATE LOW_PRIORITY `snatched` SET `uload` = `uload` + '$upthis', `dload` = `dload` + '$downthis', `utime` = '".gmtime()."', `ltime` = `ltime` + '$elapsed' WHERE `tid` = '$torrentid' AND `uid` = '$userid'");
}
}
}//END WAIT AND STATS UPDATE
......@@ -312,8 +314,11 @@ if ($event == "stopped") { // UPDATE "STOPPED" EVENT
if ($event == "completed") { // UPDATE "COMPLETED" EVENT
$updateset[] = "times_completed = times_completed + 1";
if ($MEMBERSONLY)
SQL_Query_exec("INSERT INTO completed (userid, torrentid, date) VALUES ($userid, $torrentid, '".get_date_time()."')");
if ( $MEMBERSONLY )
{
SQL_Query_exec("INSERT INTO completed (userid, torrentid, date) VALUES ($userid, $torrentid, '".get_date_time()."')");
SQL_Query_exec("UPDATE LOW_PRIORITY `snatched` SET `completed` = '1' WHERE `tid` = '$torrentid' AND `uid` = '$userid' AND `utime` = '" . gmtime() . "'");
}
}//END COMPLETED
if (isset($self)){// NO EVENT? THEN WE MUST BE A NEW PEER OR ARE NOW SEEDING A COMPLETED TORRENT
......@@ -333,7 +338,11 @@ if (isset($self)){// NO EVENT? THEN WE MUST BE A NEW PEER OR ARE NOW SEEDING A C
} else {
$ret = SQL_Query_exec("INSERT INTO peers (connectable, torrent, peer_id, ip, passkey, port, uploaded, downloaded, to_go, started, last_action, seeder, userid, client) VALUES ('$connectable', $torrentid, " . sqlesc($peer_id) . ", " . sqlesc($ip) . ", " . sqlesc($passkey) . ", $port, $uploaded, $downloaded, $left, '".get_date_time()."', '".get_date_time()."', '$seeder', '$userid', " . sqlesc($agent) . ")");
//snatch
if ( ($MEMBERSONLY) && (($seeder == 'no' && $torrent['freeleech'] == 0)) ) {
SQL_Query_exec("INSERT INTO `snatched` (`uid`, `tid`, `stime`, `utime`) VALUES ('$userid', '$torrentid', '".gmtime()."', '".gmtime()."') ON DUPLICATE KEY UPDATE `utime` = '" . gmtime() . "'");
}
if ($ret){
if ($seeder == "yes")
$updateset[] = "seeders = seeders + 1";
......
......@@ -65,6 +65,21 @@ switch(tag)
document.forms[form].elements[text].value = document.forms[form].elements[text].value + "[b][/b]";
}
break;
case '[align]':
var start = document.forms[form].elements[text].selectionStart;
var end = document.forms[form].elements[text].selectionEnd;
if (start != end) {
var body = document.forms[form].elements[text].value;
var left = body.substr(body, start);
var middle = "[align]" + body.substring(start, end) + "[/align]";
var right = body.substr(end, body.length);
document.forms[form].elements[text].value = left + middle + right;
} else {
document.forms[form].elements[text].value = document.forms[form].elements[text].value + "[align=center][/align]";
}
break;
case '[i]':
var start = document.forms[form].elements[text].selectionStart;
var end = document.forms[form].elements[text].selectionEnd;
......@@ -109,6 +124,7 @@ switch(tag)
<td align="center"><input type="button" name="quote" value="QUOTE " onclick="javascript: BBTag('[quote]','quote','<?php echo $name; ?>','<?php echo $form; ?>')" /></td>
<td align="center"><input type="button" name="url" value="URL " onclick="javascript: BBTag('[url]','url','<?php echo $name; ?>','<?php echo $form; ?>')" /></td>
<td align="center"><input type="button" name="img" value="IMG " onclick="javascript: BBTag('[img]','img','<?php echo $name; ?>','<?php echo $form; ?>')" /></td>
<td align="center"><input type="button" name="align" value="CENTER " onclick="javascript: BBTag('[align]','img','<?php echo $name; ?>','<?php echo $form; ?>')" /></td>
</tr>
</table>
</th> </tr>
......
This diff is collapsed.
......@@ -18,7 +18,7 @@ $site_config['INVITEONLY'] = false; //Only allow signups via invite
$site_config['ENABLEINVITES'] = true; // Enable invites regardless of INVITEONLY setting
$site_config['CONFIRMEMAIL'] = false; //Enable / Disable Signup confirmation email
$site_config['ACONFIRM'] = false; //Enable / Disable ADMIN CONFIRM ACCOUNT SIGNUP
$site_config['ANONYMOUSUPLOAD'] = false; //Enable / Disable anonymous uploads
$site_config['ANONYMOUSUPLOAD'] = true; //Enable / Disable anonymous uploads
$site_config['PASSKEYURL'] = "$site_config[SITEURL]/announce.php?passkey=%s"; // Announce URL to use for passkey
$site_config['UPLOADSCRAPE'] = true; // Scrape external torrents on upload? If using mega-scrape.php you should disable this
$site_config['FORUMS'] = true; // Enable / Disable Forums
......@@ -37,7 +37,8 @@ $site_config['BANNED_AGENTS'] = "-AZ21, -BC, LIME";
$site_config['torrent_dir'] = getcwd().'/uploads';
$site_config['nfo_dir'] = getcwd().'/uploads';
$site_config['blocks_dir'] = getcwd().'/blocks';
// bonus mod
$site_config["bonuspertime"] = 0.1;
// Image upload settings
$site_config['image_max_filesize'] = 524288; // Max uploaded image size in bytes (Default: 512 kB)
$site_config['allowed_image_types'] = array(
......@@ -56,7 +57,7 @@ $site_config['WELCOMEPMON'] = true; //Auto PM New members
$site_config['WELCOMEPMMSG'] = 'Thank you for registering at our tracker! Please remember to keep your ratio at 1.00 or greater :)';
$site_config['SITENOTICEON'] = true;
$site_config['SITENOTICE'] = 'Welcome To TorrentTrader v3.0';
$site_config['SITENOTICE'] = '<font color=#ff9900>Welcome To TorrentTrader v3.0</font> <br />';
$site_config['UPLOADRULES'] = 'You should also include a .nfo file wherever possible<br />Try to make sure your torrents are well-seeded for at least 24 hours<br />Do not re-release material that is still active';
......@@ -98,8 +99,8 @@ $site_config['max_dead_torrent_time'] = '21600';//Time until torrents that are d
//AUTO RATIO WARNING
$site_config["ratiowarn_enable"] = true; //Enable/Disable auto ratio warning
$site_config["ratiowarn_minratio"] = 0.4; //Min Ratio
$site_config["ratiowarn_mingigs"] = 4; //Min GB Downloaded
$site_config["ratiowarn_minratio"] = 0.9; //Min Ratio
$site_config["ratiowarn_mingigs"] = 2; //Min GB Downloaded
$site_config["ratiowarn_daystowarn"] = 14; //Days to ban
// category = Category Image/Name, name = Torrent Name, dl = Download Link, uploader, comments = # of comments, completed = times completed, size, seeders, leechers, health = seeder/leecher ratio, external, wait = Wait Time (if enabled), rating = Torrent Rating, added = Date Added, nfo = link to nfo (if exists)
......@@ -131,6 +132,24 @@ $site_config["passhash_method"] = "sha1"; // Hashing method (sha1, md5 or hmac).
// Only used for hmac.
$site_config["passhash_algorithm"] = "sha1"; // See http://php.net/hash_algos for a list of supported algorithms.
$site_config["passhash_salt"] = ""; // Shouldn't be blank. At least 20 characters of random text.
die("You didn't edit your config correctly."); // You MUST remove this line
// class colors
$site_config['owner_color'] = '#FF0000'; // Owner / Red
$site_config['admin_color'] = '#ff9900'; // Admin / Maroon
$site_config['super_mod_color'] = '#00ff00'; // Super Mod / Lime
$site_config['moderator_color'] = '#00cc00'; // Moderator / Green
$site_config['vip_color'] = '#d9bb24'; // VIP / Gold
$site_config['uploader_color'] = '#ffff00'; // Uploader / Yellow
$site_config['addict_color'] = '#0000ff'; // Addict / Blue
$site_config['pro_user_color'] = '#005080'; // Pro User / Navy
$site_config['power_user_color'] = '#008080'; // Power User / Teal
$site_config['member_color'] = '#fff'; // Member / Black
$site_config['leecher_color'] = '#ff00ff'; // Leecher / Pink[/quote]
//hit mod
$site_config["hnr_deadline"] = 14*86400; // 30 days to hit the seed target
$site_config["hnr_seedtime"] = 172800; // target is to seed for 48 hours
$site_config["hnr_warn"] = 10; // 10 hit & runs then warned
$site_config["hnr_stop_dl"] = 15; // After 15 H & R stop downloading
$site_config["hnr_ban"] = 20; // After 20 H&R they are banned
// hit end
?>
\ No newline at end of file
......@@ -13,7 +13,6 @@ if (ini_get("magic_quotes_gpc")) {
if (function_exists("date_default_timezone_set"))
date_default_timezone_set("Europe/London"); // Do NOT change this. All times are converted to user's chosen timezone.
/// each() replacement for php 7+. Change all instances of each() to thisEach() in all TT files. each() deprecated as of 7.2
function thisEach(&$arr) {
$key = key($arr);
......@@ -36,7 +35,7 @@ function mysqli_result($res,$row=0,$col=0){
return false;
}
///end mysql_result replacement
define("BASEPATH", str_replace("backend", "", dirname(__FILE__)));
$BASEPATH = BASEPATH;
define("BACKEND", dirname(__FILE__));
......@@ -524,6 +523,7 @@ function deletetorrent($id) {
SQL_Query_exec("DELETE FROM torrents WHERE id = $id");
SQL_Query_exec("DELETE FROM reports WHERE votedfor = $id AND type = 'torrent'");
SQL_Query_exec("DELETE FROM `snatched` WHERE `tid` = '$id'");
}
function deleteaccount($userid)
......@@ -537,6 +537,7 @@ function deleteaccount($userid)
SQL_Query_exec("DELETE FROM reports WHERE votedfor = $userid AND type = 'user'");
SQL_Query_exec("DELETE FROM forum_readposts WHERE userid = $userid");
SQL_Query_exec("DELETE FROM pollanswers WHERE userid = $userid");
SQL_Query_exec("DELETE FROM `snatched` WHERE `uid` = '$userid'");
}
function genrelist() {
......@@ -687,9 +688,9 @@ function encodehtml($s, $linebreaks = true) {
function format_urls($s){
return preg_replace(
"/(\A|[^=\]'\"a-zA-Z0-9])((http|ftp|https|ftps|irc):\/\/[^<>\s]+)/i",
"\\1<a href='\\2' target='_blank'>\\2</a>", $s);
return preg_replace(
"/(\A|[^=\]'\"a-zA-Z0-9])((http|ftp|https|ftps|irc):\/\/[^<>\s]+)/i",
"\\1<a href='\\2' target='_blank'>\\2</a>", $s);
}
function format_comment($text) {
......@@ -731,15 +732,15 @@ function format_comment($text) {
"/\[color=(#[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9])\]((\s|.)+?)\[\/color\]/i",
"<font color='\\1'>\\2</font>", $s);
// [url=http://www.example.com]Text[/url]
$s = preg_replace(
"/\[url=((http|ftp|https|ftps|irc):\/\/[^<>\s]+?)\]((\s|.)+?)\[\/url\]/i",
"<a href='\\1' target='_blank'>\\3</a>", $s);
// [url=http://www.example.com]Text[/url]
$s = preg_replace(
"/\[url=((http|ftp|https|ftps|irc):\/\/[^<>\s]+?)\]((\s|.)+?)\[\/url\]/i",
"<a href='\\1' target='_blank'>\\3</a>", $s);
// [url]http://www.example.com[/url]
$s = preg_replace(
"/\[url\]((http|ftp|https|ftps|irc):\/\/[^<>\s]+?)\[\/url\]/i",
"<a href='\\1' target='_blank'>\\1</a>", $s);
// [url]http://www.example.com[/url]
$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(
......@@ -779,6 +780,11 @@ function format_comment($text) {
$i++;
}
//[align=(center|left|right)]text[/align]
$s = preg_replace(
"/\[align=([a-zA-Z]+)\](.+?)\[\/align\]/is",
"<div style=\"text-align:\\1\">\\2</div>", $s);
//[hr]
$s = preg_replace("/\[hr\]/i", "<hr />", $s);
......@@ -932,13 +938,14 @@ function torrenttable($res) {
foreach ($cols as $col) {
switch ($col) {
case 'category':
print("<td class='ttable_col$x' align='center' valign='middle'>");
print("<td class='ttable_col$x' align='center' valign='middle' style=' background-color: -moz-linear-gradient(top, #272727 0%, #ff0000 100%);background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #272727), color-stop(100%, #ff0000));background: -webkit-linear-gradient(top, #272727 0%, #ff0000 100%);background: -o-linear-gradient(top, #272727 0%, #ff0000 100%);background: -ms-linear-gradient(top, #272727 0%, #ff0000 100%);background: linear-gradient(top, #272727 0%, #ff0000 100%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#272727', endColorstr='#ff0000', GradientType=0 )'>");
if (!empty($row["cat_name"])) {
print("<a href=\"torrents.php?cat=" . $row["category"] . "\">");
if (!empty($row["cat_pic"]) && $row["cat_pic"] != "")
print("<img border=\"0\"src=\"" . $site_config['SITEURL'] . "/images/categories/" . $row["cat_pic"] . "\" alt=\"" . $row["cat_name"] . "\" />");
else
print($row["cat_parent"].": ".$row["cat_name"]);
// remove cat image
// if (!empty($row["cat_pic"]) && $row["cat_pic"] != "")
// print("<img border=\"0\"src=\"" . $site_config['SITEURL'] . "/images/categories/" . $row["cat_pic"] . "\" alt=\"" . $row["cat_name"] . "\" />");
// else
print($row["cat_parent"]."<br/>".$row["cat_name"]);
print("</a>");
} else
print("-");
......@@ -958,6 +965,8 @@ function torrenttable($res) {
if ($row["freeleech"] == 1)
$dispname .= " <img src='images/free.gif' border='0' alt='' />";
if ($row["vip"] == "yes")
$dispname .= " <img src='images/vip.gif' border='0' alt='' />";
print("<td class='ttable_col$x' nowrap='nowrap'>".(count($expandrows)?"<a href=\"javascript: klappe_torrent('t".$row['id']."')\"><img border=\"0\" src=\"".$site_config["SITEURL"]."/images/plus.gif\" id=\"pict".$row['id']."\" alt=\"Show/Hide\" class=\"showthecross\" /></a>":"")."&nbsp;<a title=\"".$row["name"]."\" href=\"torrents-details.php?id=$id&amp;hit=1\">$dispname</a></td>");
break;
case 'dl':
......@@ -968,7 +977,7 @@ function torrenttable($res) {
if (($row["anon"] == "yes" || $row["privacy"] == "strong") && $CURUSER["id"] != $row["owner"] && $CURUSER["edit_torrents"] != "yes")
echo "Anonymous";
elseif ($row["username"])
echo "<a href='account-details.php?id=$row[owner]'>$row[username]</a>";
echo "<a href='account-details.php?id=$row[owner]'>".class_user($row[username])."</a>";
else
echo "Unknown";
echo "</td>";
......@@ -1435,5 +1444,69 @@ function passhash ($text) {
stdfoot();
exit;
}
////////////////////modcolor
//start class colors function
function class_user($name) {
global $site_config;
$a ="SELECT class, donated, warned, enabled FROM `users` WHERE username ='".$name."'";
$res = SQL_Query_exec($a);
$classy = @mysqli_fetch_row($res);
switch ($classy[0]) {
case 11: // Owner
$col = "".$site_config["owner_color"]."";
break;
case 10: // Admin
$col = "".$site_config["admin_color"]."";
break;
case 9: // Super Mod
$col = "".$site_config["super_mod_color"]."";
break;
case 8: // Moderator
$col = "".$site_config["moderator_color"]."";
break;
case 7: // VIP
$col = "".$site_config["vip_color"]."";
break;
case 6: // Uploader
$col = "".$site_config["uploader_color"]."";
break;
case 5: // Addict
$col = "".$site_config["addict_color"]."";
break;
case 4: // Pro User
$col = "".$site_config["pro_user_color"]."";
break;
case 3: // Power User
$col = "".$site_config["power_user_color"]."";
break;
case 2: // Member
$col = "".$site_config["member_color"]."";
break;
case 1: // Leecher
$col = "".$site_config["leecher_color"]."";
}if($classy[1]>0){
$star="<img src='".$site_config[SITEURL]."/images/star.png' alt='donated' border='0'>";
}else{ $star="";}
if($classy[2]=="yes"){
$warn="<img src='".$site_config[SITEURL]."/images/warned.png' alt='warned' border=0>";
}else{ $warn=""; }
if($classy[3]=="no"){
$disabled="<img src='".$site_config[SITEURL]."/images/disabled.png' alt='disabled' border=0>";
}else{ $disabled=""; }
return unesc("<font color='".$col."'>".$name."".$star."".$warn."".$disabled."</font>");
}
//end class colors function
//snatched
function seedtime($ts = 0)
{
$days = floor($ts / 86400);
$hours = floor($ts / 3600 ) % 24;
$mins = floor($ts / 60) % 60;
$secs = $ts % 60;
return sprintf( '%d days, %d hours, %d minutes, %d seconds...', $days, $hours, $mins, $secs);
}
?>
\ No newline at end of file
......@@ -35,7 +35,7 @@
// New (TorrentialStorm)
function insert_smilies_frame() {
GLOBAL $site_config, $smilies;
echo "<table><tr><td>Type...</td><td>To make a...</td></tr>";
foreach ($smilies as $code => $url) {
echo "<tr><td>$code</td><td><a href=\"javascript:window.opener.SmileIT('$code', '".cleanstr($_GET["form"])."', '".htmlspecialchars($_GET["text"])."')\"><img src=\"$site_config[SITEURL]/images/smilies/$url\" alt=\"$code\" title=\"$code\" border=\"0\"></a></td></tr>";
......
<?php
//# For Security Purposes if you wish to use it.
//if ( $_SERVER['PHP_AUTH_USER'] != 'username' && $_SERVER['PHP_AUTH_PASS'] != 'password' )
//{
// header('WWW-Authenticate: Basic realm="your_site"');
// header('HTTP/1.1 401 Unauthorized');
// die;
//}
require_once("backend/functions.php");
// CONNECT TO THE DATABASE
......@@ -57,7 +50,7 @@
for($j=0; $j<$num_fields; $j++)
{
$row[$j] = addslashes($row[$j]);
$row[$j] = preg_replace("/\n/","/\\n/",$row[$j]);
$row[$j] = preg_replace("\n","\\n",$row[$j]);
if (isset($row[$j])) { $return.= '"'.$row[$j].'"' ; } else { $return.= '""'; }
if ($j<($num_fields-1)) { $return.= ','; }
}
......
......@@ -325,11 +325,11 @@ while($blocks2 = mysqli_fetch_assoc($res)){
"<td rowspan=\"2\" class=\"$class\" align=\"center\"><input type=\"checkbox\" name=\"delete[]\" value=\"".$blocks2["id"]."\"/></td>".
"</tr>".
"<tr>".
"<td class=\"$class\" height=\"1%\">".((($blocks2["position"] != "left") && ($blocks2["enabled"] == 1)) ? "<a href=\"blocks-edit.php?edit=true&amp;position=left&amp;left=".$blocks2["id"]."\"><img border=\"0\" src=\"images/blocks/leftenable.gif\" width=\"18\" height=\"15\" /></a>" : "<img border=\"0\" src=\"images/blocks/leftdisable.gif\" width=\"18\" height=\"15\" ".($blocks2["enabled"] ? "alt=\"".T_("_AT_LEFT_")."\"" : "")." ".($blocks2["enabled"] ? "onclick=\"javascript: alert('".T_("_AT_LEFT_")."');\"" : "onclick=\"javascript: alert('".T_("_MUST_ENB_FIRST")."');\"")." />")."</td>".
"<td class=\"$class\" height=\"1%\">".((($blocks2["position"] != "middle") && ($blocks2["enabled"] == 1)) ? "<a href=\"blocks-edit.php?edit=true&amp;position=middle&amp;middle=".$blocks2["id"]."\"><img border=\"0\" src=\"images/blocks/middleenable.gif\" width=\"18\" height=\"15\" /></a>" : "<img border=\"0\" src=\"images/blocks/middledisable.gif\" width=\"18\" height=\"15\" ".($blocks2["enabled"] ? "alt=\"".T_("_AT_CENTER_")."\"" : "")." ".($blocks2["enabled"] ? "onclick=\"javascript: alert('".T_("_AT_CENTER_")."');\"" : "onclick=\"javascript: alert('".T_("_MUST_ENB_FIRST")."');\"")." />")."</td>".
"<td class=\"$class\" height=\"1%\">".((($blocks2["position"] != "right") && ($blocks2["enabled"] == 1)) ? "<a href=\"blocks-edit.php?edit=true&amp;position=right&amp;right=".$blocks2["id"]."\"><img border=\"0\" src=\"images/blocks/rightenable.gif\" width=\"18\" height=\"15\" /></a>" : "<img border=\"0\" src=\"images/blocks/rightdisable.gif\" width=\"18\" height=\"15\" ".($blocks2["enabled"] ? "alt=\"".T_("_AT_RIGHT_")."\"" : "")." ".($blocks2["enabled"] ? "onclick=\"javascript: alert('".T_("_AT_RIGHT_")."');\"" : "onclick=\"javascript: alert('".T_("_MUST_ENB_FIRST")."');\"")." />")."</td>".
"<td class=\"$class\" height=\"1%\">".((($blocks2["sort"]!= 1) && ($blocks2["enabled"] != 0)) ? "<a href=\"blocks-edit.php?edit=true&amp;position=".$blocks2["position"]."&amp;sort=".$blocks2["sort"]."&amp;up=".$blocks2["id"]."\"><img border=\"0\" src=\"images/blocks/upenable.gif\" width=\"18\" height=\"15\" /></a>" : "<img border='0' src=\"images/blocks/updisable.gif\" width=\"18\" height=\"15\" alt=\"".($blocks2["enabled"] ? "".T_("_AT_TOP_")."" : "")."\" ".($blocks2["enabled"] ? "onclick=\"javascript: alert('".T_("_AT_TOP_")."');\"" : "onclick=\"javascript: alert('".T_("_MUST_ENB_FIRST")."');\"")." />")."</td>".
"<td class=\"$class\" height=\"1%\">".(((($blocks2["sort"] != ($nextleft-1)) && ($blocks2["position"] == "left") || ($blocks2["sort"] != ($nextright-1)) && ($blocks2["position"] == "right") || ($blocks2["sort"] != ($nextmiddle-1)) && ($blocks2["position"] == "middle")) && ($blocks2["enabled"] != 0)) ? "<a href=\"blocks-edit.php?edit=true&amp;position=".$blocks2["position"]."&amp;sort=".$blocks2["sort"]."&amp;down=".$blocks2["id"]."\"><img border=\"0\" src=\"images/blocks/downenable.gif\" width=\"18\" height=\"15\" /></a>" : "<img border=\"0\" src=\"images/blocks/downdisable.gif\" width=\"18\" height=\"15\" alt=\"".($blocks2["enabled"] ? "".T_("_AT_BOTTOM_")."" : "")."\" ".($blocks2["enabled"] ? "onclick=\"javascript: alert('".T_("_AT_BOTTOM_")."');\"" : "onclick=\"javascript: alert('".T_("_MUST_ENB_FIRST")."');\"")." />")."</td>".
"<td class=\"$class\" height=\"1%\">".((($blocks2["position"] != "left") && ($blocks2["enabled"] == 1)) ? "<a href=\"blocks-edit.php?edit=true&amp;position=left&amp;left=".$blocks2["id"]."\"><img border=\"0\" src=\"images/blocks/leftenable.gif\" width=\"18\" height=\"15\" alt=\""._MOVE_LEFT_."\" /></a>" : "<img border=\"0\" src=\"images/blocks/leftdisable.gif\" width=\"18\" height=\"15\" ".($blocks2["enabled"] ? "alt=\"".T_("_AT_LEFT_")."\"" : "alt=\""._MUST_ENB_MOVE_."\"")." ".($blocks2["enabled"] ? "onclick=\"javascript: alert('".T_("_AT_LEFT_")."');\"" : "onclick=\"javascript: alert('".T_("_MUST_ENB_FIRST")."');\"")." />")."</td>".
"<td class=\"$class\" height=\"1%\">".((($blocks2["position"] != "middle") && ($blocks2["enabled"] == 1)) ? "<a href=\"blocks-edit.php?edit=true&amp;position=middle&amp;middle=".$blocks2["id"]."\"><img border=\"0\" src=\"images/blocks/middleenable.gif\" width=\"18\" height=\"15\" alt=\""._MOVE_CENTER_."\" /></a>" : "<img border=\"0\" src=\"images/blocks/middledisable.gif\" width=\"18\" height=\"15\" ".($blocks2["enabled"] ? "alt=\"".T_("_AT_CENTER_")."\"" : "alt=\""._MUST_ENB_MOVE_."\"")." ".($blocks2["enabled"] ? "onclick=\"javascript: alert('".T_("_AT_CENTER_")."');\"" : "onclick=\"javascript: alert('".T_("_MUST_ENB_FIRST")."');\"")." />")."</td>".
"<td class=\"$class\" height=\"1%\">".((($blocks2["position"] != "right") && ($blocks2["enabled"] == 1)) ? "<a href=\"blocks-edit.php?edit=true&amp;position=right&amp;right=".$blocks2["id"]."\"><img border=\"0\" src=\"images/blocks/rightenable.gif\" width=\"18\" height=\"15\" alt=\""._MOVE_RIGHT_."\" /></a>" : "<img border=\"0\" src=\"images/blocks/rightdisable.gif\" width=\"18\" height=\"15\" ".($blocks2["enabled"] ? "alt=\"".T_("_AT_RIGHT_")."\"" : "alt=\""._MUST_ENB_MOVE_."\"")." ".($blocks2["enabled"] ? "onclick=\"javascript: alert('".T_("_AT_RIGHT_")."');\"" : "onclick=\"javascript: alert('".T_("_MUST_ENB_FIRST")."');\"")." />")."</td>".
"<td class=\"$class\" height=\"1%\">".((($blocks2["sort"]!= 1) && ($blocks2["enabled"] != 0)) ? "<a href=\"blocks-edit.php?edit=true&amp;position=".$blocks2["position"]."&amp;sort=".$blocks2["sort"]."&amp;up=".$blocks2["id"]."\"><img border=\"0\" src=\"images/blocks/upenable.gif\" width=\"18\" height=\"15\" alt=\""._MOVE_UP_."\" /></a>" : "<img border='0' src=\"images/blocks/updisable.gif\" width=\"18\" height=\"15\" alt=\"".($blocks2["enabled"] ? "".T_("_AT_TOP_")."" : ""._MUST_ENB_SORT_."")."\" ".($blocks2["enabled"] ? "onclick=\"javascript: alert('".T_("_AT_TOP_")."');\"" : "onclick=\"javascript: alert('".T_("_MUST_ENB_FIRST")."');\"")." />")."</td>".
"<td class=\"$class\" height=\"1%\">".(((($blocks2["sort"] != ($nextleft-1)) && ($blocks2["position"] == "left") || ($blocks2["sort"] != ($nextright-1)) && ($blocks2["position"] == "right") || ($blocks2["sort"] != ($nextmiddle-1)) && ($blocks2["position"] == "middle")) && ($blocks2["enabled"] != 0)) ? "<a href=\"blocks-edit.php?edit=true&amp;position=".$blocks2["position"]."&amp;sort=".$blocks2["sort"]."&amp;down=".$blocks2["id"]."\"><img border=\"0\" src=\"images/blocks/downenable.gif\" width=\"18\" height=\"15\" alt=\""._MOVE_DOWN_."\" /></a>" : "<img border=\"0\" src=\"images/blocks/downdisable.gif\" width=\"18\" height=\"15\" alt=\"".($blocks2["enabled"] ? "".T_("_AT_BOTTOM_")."" : ""._MUST_ENB_SORT_."")."\" ".($blocks2["enabled"] ? "onclick=\"javascript: alert('".T_("_AT_BOTTOM_")."');\"" : "onclick=\"javascript: alert('".T_("_MUST_ENB_FIRST")."');\"")." />")."</td>".
"</tr>");
}
print("<tr>".
......
......@@ -14,6 +14,14 @@ if (($site_config["INVITEONLY"] || $site_config["ENABLEINVITES"]) && $CURUSER) {
<td align="center">
<a href="invite.php"><?php echo T_("SEND_AN_INVITE"); ?></a>
</td>
</tr>
<?php } ?>
<?php if ($CURUSER["invitees"] > 0 ){ ?>
<tr>
<td align="center">
<a href="invitetree.php"><?php echo T_("Invite Tree"); ?></a>
</td>
</tr>
<?php } ?>
</table>
......
......@@ -38,7 +38,7 @@ begin_block($CURUSER["username"]);
$userdownloaded = mksize($CURUSER["downloaded"]);
$useruploaded = mksize($CURUSER["uploaded"]);
$privacylevel = T_($CURUSER["privacy"]);
$bonus = $CURUSER['seedbonus'];
if ($CURUSER["uploaded"] > 0 && $CURUSER["downloaded"] == 0)
$userratio = "Inf.";
elseif ($CURUSER["downloaded"] > 0)
......@@ -46,14 +46,20 @@ begin_block($CURUSER["username"]);
else
$userratio = "---";
print ("<center><img width='80' height='80' src='$avatar' alt='' /></center><br />" . T_("DOWNLOADED") . ": $userdownloaded<br />" . T_("UPLOADED") . ": $useruploaded<br />".T_("CLASS").": ".T_($CURUSER["level"])."<br />" . T_("ACCOUNT_PRIVACY_LVL") . ": $privacylevel<br />". T_("RATIO") .": $userratio");
print ("<center><img width='80' height='80' src='$avatar' alt='' /></center><br />" . T_("DOWNLOADED") . ": $userdownloaded<br />" . T_("UPLOADED") . ": $useruploaded<br />".T_("CLASS").": ".T_($CURUSER["level"])."<br />" . T_("ACCOUNT_PRIVACY_LVL") . ": $privacylevel<br />". T_("RATIO") .": $userratio<br>Seedbonus : <b><a href=mybonus.php>".$bonus."</a></b>");
?>
<center><a href="account.php"><?php echo T_("ACCOUNT"); ?></a> <br />
<?php if ($CURUSER["control_panel"]=="yes") {print("<a href=\"admincp.php\">".T_("STAFFCP")."</a>");}?>
<center><a href="account.php"><?php echo T_("ACCOUNT"); ?></a>
<?php if($CURUSER["class"]=="8") {print ("<br/><a href=modcp.php>".T_("STAFFCP")."</a>");}?>
<?php if($CURUSER["class"]=="9") {print ("<br/><a href=smodcp.php>".T_("STAFFCP")."</a>");}?>
<?php if($CURUSER["class"]=="10") {print("<br/><a href=\"admincp.php\">".T_("STAFFCP")."</a>");}?>
<?php if($CURUSER["class"]=="11") {print("<br/><a href=\"ownercp.php\">".T_("STAFFCP")."</a>");}?>
</center>
<?php
end_block();
}
......
<?php
begin_block(T_("NAVIGATION"));
echo "<div id='navigate' class='bMenu'><ul>";
echo "<li><a href='index.php'>".T_("HOME")."</a></li>";
if ($CURUSER["view_torrents"]=="yes" || !$site_config["MEMBERSONLY"])
{
echo "<li><a href='torrents.php'>".T_("BROWSE_TORRENTS")."</a></li>";
echo "<li><a href='torrents-today.php'>".T_("TODAYS_TORRENTS")."</a></li>";
echo "<li><a href='torrents-search.php'>".T_("SEARCH")."</a></li>";
echo "<li><a href='torrents-needseed.php'>".T_("TORRENT_NEED_SEED")."</a></li>";
}
if ($CURUSER["edit_torrents"]=="yes")
{
echo "<li><a href='torrents-import.php'>".T_("MASS_TORRENT_IMPORT")."</a></li>";
}
if ($CURUSER && $CURUSER["view_users"]=="yes")
{
echo "<li><a href='teams-view.php'>".T_("TEAMS")."</a></li>";
echo "<li><a href='memberlist.php'>".T_("MEMBERS")."</a></li>";
}
echo "<li><a href='forums.php?action=viewtopic&topicid=268'><font color=#fff>Groups</font></a></li>";
echo "<li><a href='forums.php?action=viewtopic&topicid=269'><font color=#fff>Tips</font></a></li>";
echo "<li><a href='forums.php?action=viewtopic&topicid=270'><font color=#fff>Warnings</font></a></li>";
echo "<li><a href='forums.php?action=viewtopic&topicid=273'><font color=#fff>How 2 Upload</font></a></li>";
echo "<li><a href='rules.php'>".T_("SITE_RULES")."</a></li>";
echo "<li><a href='required.php'><font color=#fff>Hit & Runs</font></a></li>";
echo "<li><a href='mybonus.php'><font color=#fff>Seed Bonus</font></a></li>";
echo "<li><a href='snatched.php'><font color=#fff>Snatchlist</font></a></li>";
echo "<li><a href='topten.php'><font color=#fff>Top 10</font></a></li>";
echo "<li><a href='faq.php'>".T_("FAQ")."</a></li>";
if ($CURUSER && $CURUSER["view_users"]=="yes")
{
echo "<li><a href='memberlist.php'>".T_("MEMBERS")."</a></li>";
echo "<li><a href='staff.php'>".T_("STAFF")."</a></li>";
}
echo "</ul></div>";
......
......@@ -18,7 +18,7 @@ if (!$rows) {
} else {
echo "<div id='nMember' class='bMenu'><ul>\n";
foreach ($rows as $row) {
echo "<li><a href='account-details.php?id=$row[id]'>$row[username]</a></li>\n";
echo "<li><a href='account-details.php?id=$row[id]'>" . class_user($row["username"]) . "</a></li>\n";
}
echo "</ul></div>\n";
}
......
......@@ -20,7 +20,7 @@ if (!$rows) {
echo "<div id='uOnline' class='bMenu'><ul>\n";;
for ($i = 0, $cnt = count($rows), $n = $cnt - 1; $i < $cnt; $i++) {
$row = &$rows[$i];
echo "<li><a href='account-details.php?id=$row[id]'>$row[username]</a>".($i < $n ? ", " : "")."</li>\n";;
echo "<li><a href='account-details.php?id=$row[id]'>" . class_user($row[username]) . "</a>".($i < $n ? ", " : "")."</li>\n";;
}
echo "</ul></div>\n";;
}
......
<?php
require_once("backend/functions.php");
dbconn(true);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Infinite Carousel</title>
<style type="text/css" media="screen">
<!--
body { font: 1em "Trebuchet MS", verdana, arial, sans-serif; font-size: 100%; }
input, textarea { font-family: Arial; font-size: 125%; padding: 7px; }
label { display: block; }
a:link {color: transparent; text-decoration: underline; border:0; }
a:active {color: transparent; text-decoration: underline; border:0; }
a:visited {color: transparent; text-decoration: underline; border:0; }
a:hover {color: transparent; text-decoration: none; border:0; }
.infiniteCarousel {height:130px;width:830px;overflow:hidden;}
.infiniteCarousel .wrapper {width: 90%;overflow:hidden;min-height: 10em;margin: 0 40px;position: absolute;top: 0;}
.infiniteCarousel ul a img {border: 0px solid #000;border-radius: 14px;margin-left: auto;margin-right: auto;-moz-border-radius:14px;-webkit-border-radius:14px;}
.infiniteCarousel .wrapper ul {width: 9999px;list-style-image:none;list-style-position:outside;list-style-type:none;margin:0;padding:0;position: absolute;top: 0;}
.infiniteCarousel ul li {display:block;float:left;padding: 10px;height: 85px;width: 85px;}
.infiniteCarousel ul li a img {display:block;}
.infiniteCarousel .arrow {height: 36px;width: 37px;background: url(images/arrow.png) no-repeat 0 0;text-indent: -999px;position: absolute;top: 37px;cursor: pointer;}
.infiniteCarousel .forward {background-position: 0 0;right: 0;}
.infiniteCarousel .back {background-position: 0 -72px;left: 0;}
.infiniteCarousel .forward:hover {background-position: 0 -36px;}
.infiniteCarousel .back:hover {background-position: 0 -108px;}
-->
</style>
<script src="js/jquery-2.2.3.min.js"></script>
<script src="js/overlib.js"></script>
<script type="text/javascript">
(function () {
$.fn.infiniteCarousel = function () {
function repeat(str, n) {
return new Array( n + 1 ).join(str);
}
return this.each(function () {
// magic!
var $wrapper = $('> div', this).css('overflow', 'hidden'),
$slider = $wrapper.find('> ul').width(9999),
$items = $slider.find('> li'),
$single = $items.filter(':first')
singleWidth = $single.outerWidth(),
visible = Math.ceil($wrapper.innerWidth() / singleWidth),
currentPage = 1,
pages = Math.ceil($items.length / visible);
/* TASKS */
// 1. pad the pages with empty element if required
if ($items.length % visible != 0) {
// pad
$slider.append(repeat('<li class="empty" />', visible - ($items.length % visible)));
$items = $slider.find('> li');
}
// 2. create the carousel padding on left and right (cloned)
$items.filter(':first').before($items.slice(-visible).clone().addClass('cloned'));
$items.filter(':last').after($items.slice(0, visible).clone().addClass('cloned'));
$items = $slider.find('> li');
// 3. reset scroll
$wrapper.scrollLeft(singleWidth * visible);
// 4. paging function
function gotoPage(page) {
var dir = page < currentPage ? -1 : 1,
n = Math.abs(currentPage - page),
left = singleWidth * dir * visible * n;
$wrapper.filter(':not(:animated)').animate({
scrollLeft : '+=' + left
}, 500, function () {
// if page == last page - then reset position
if (page > pages) {
$wrapper.scrollLeft(singleWidth * visible);
page = 1;
} else if (page == 0) {
page = pages;
$wrapper.scrollLeft(singleWidth * visible * pages);
}
currentPage = page;
});
}
// 5. insert the back and forward link
$wrapper.after('<a href="#" class="arrow back" border=0>&lt;</a><a href="#" class="arrow forward" border=0>&gt;</a>');
// 6. bind the back and forward links
$('a.back', this).click(function () {
gotoPage(currentPage - 1);
return false;
});
$('a.forward', this).click(function () {
gotoPage(currentPage + 1);
return false;
});
$(this).bind('goto', function (event, page) {
gotoPage(page);
});
// THIS IS NEW CODE FOR THE AUTOMATIC INFINITE CAROUSEL
$(this).bind('next', function () {
gotoPage(currentPage + 1);
});
});
};
})(jQuery);
$(document).ready(function () {
// THIS IS NEW CODE FOR THE AUTOMATIC INFINITE CAROUSEL
var autoscrolling = true;
$('.infiniteCarousel').infiniteCarousel().mouseover(function () {
autoscrolling = false;
}).mouseout(function () {
autoscrolling = true;
});
setInterval(function () {
if (autoscrolling) {
$('.infiniteCarousel').trigger('next');
}
}, 5000);
});
</script>
</head>
<body>
<?php
if($CURUSER){
$query="SELECT id, name, image1 , seeders,leechers, category, size FROM torrents WHERE banned ='no' AND visible='yes' AND image1 <> '' ORDER BY added DESC limit 60";
$result = SQL_Query_exec($query);
$num = mysqli_num_rows($result);
{
?>
<div class="infiniteCarousel">
<div class="wrapper">
<ul>
<?php
while($row = mysqli_fetch_assoc($result)){
$name = substr(htmlspecialchars($row['name']), 0, 30)."...";
$res = SQL_Query_exec("SELECT name FROM categories WHERE id=$row[category]");
$arr = mysqli_fetch_assoc($res);
$cat = $arr["name"];
?>
<li><a href="torrents-details.php?id=<?php echo $row['id']; ?>" target="_top" onmouseover=" return overlib('<table><tr><td><center><?=$name?><br /><?=$cat?><br /><font color=#00FF7F><?=$row['seeders']?></font>&nbsp;<font color=#FFFFFF>Seed\'s /</font>&nbsp;<font color=#FF0000><?=$row['leechers']?></font>&nbsp;<font color=#FFFFFF>Leech\'s</font></center></td></tr></table>',BORDER, 2, CAPTIONSIZE, '0.5ems', TEXTFONT, 'Times Roman' ,CAPCOLOR, '#000000',FGCOLOR, '#000000', VAUTO); " onmouseout="return nd();"><img src="uploads/images/<?=$row["image1"] ?>" height="150" width="100"></a></li>
<?php
}
?>
</ul>
</div>
</div>
<?php
}
}
?>
</body>
</html>
<?php
?>
\ No newline at end of file
fuck
shit
cunt
whore
fuck
shit
cunt
whore
bitch
\ No newline at end of file
......@@ -47,13 +47,13 @@ td { vertical-align: top; }
<center>
<br /><b>TorrentTrader v3.0 Config Check<br /> - TorrentialStorm/MicrosoulV3<br /><br /></b>
<input type="button" class="button" value="Check Again" onclick="window.location=window.location" /><br /><br />
<input type="button" class="button" value="Check Again" onclick="window.location=window.location" /><br />
<a href="check.php?phpinfo=1">PHPInfo</a></center><br />
<a href="check.php?phpinfo=1">PHPInfo</a><br /><br />
<a href='index.php'>Return to your homepage</a></center><br />
<b>Required Settings Check:</b><br />
<p>If any of these items are highlighted in red then please take actions to correct them. <br />
Failure to do so could lead to your installation not functioning correctly.</p>
Failure to do so could lead to your TorrentTrader! installation not functioning correctly.</p>
<br />
This system check is designed for unix based servers, windows based servers may not give desired results<br />
<br />
......@@ -61,10 +61,10 @@ This system check is designed for unix based servers, windows based servers may
<table cellpadding="3" cellspacing="1" style="border-collapse: collapse" border="1">
<tr>
<td>PHP version >= 7.2.0</td>
<td>PHP version >= 7.3.0</td>
<td>
<?php
echo phpversion() < '7.2' ? '<b><font color="red">No</font> 7.2 or above required</b>' : '<b><font color="green">Yes</font></b>';
echo phpversion() < '7.3' ? '<b><font color="red">No</font> 7.1 or above required</b>' : '<b><font color="green">Yes</font></b>';
echo " - Your PHP version is ".phpversion();
?>
</td>
......@@ -90,7 +90,7 @@ This system check is designed for unix based servers, windows based servers may
<td><?php echo function_exists( 'curl_init' ) ? '<b><font color="green">Available</font></b>' : '<b><font color="red">Unavailable</font></b>'; ?></td>
</tr>
<tr>
<td>&nbsp; - openSSL (for the torrent encryption mod)</td>
<td>&nbsp; - openSSL (for torrent encryption if you use that mod)</td>
<td><?php echo extension_loaded( 'openssl' ) ? '<b><font color="green">Available</font></b>' : '<b><font color="red">Unavailable</font></b>'; ?></td>
</tr>
<tr>
......
......@@ -19,13 +19,20 @@ $id = (int)$_GET["id"];
if (!$id)
show_error_msg(T_("ID_NOT_FOUND"), T_("ID_NOT_FOUND_MSG_DL"), 1);
$res = SQL_Query_exec("SELECT filename, banned, external, announce FROM torrents WHERE id =".intval($id));
$res = SQL_Query_exec("SELECT filename, banned, external, announce, thanks, owner FROM torrents WHERE id =".intval($id));
$row = mysqli_fetch_assoc($res);
$torrent_dir = $site_config["torrent_dir"];
$fn = "$torrent_dir/$id.torrent";
$res = SQL_Query_exec("SELECT filename, vip FROM torrents WHERE id = $id");
$arr = mysqli_fetch_assoc($res);
$name = $arr['filename'];
$vip = $arr['vip'];
if ($vip == "yes" && $CURUSER["class"]<7 ){
show_error_msg("Error","<b>You can not download, you have to be VIP</b>",1);
}
if (!$row)
show_error_msg(T_("FILE_NOT_FOUND"), T_("ID_NOT_FOUND"),1);
if ($row["banned"] == "yes")
......@@ -36,6 +43,10 @@ if (!is_readable($fn))
show_error_msg(T_("FILE_NOT_FOUND"), T_("FILE_UNREADABLE"), 1);
$name = $row['filename'];
if ($CURUSER["id"] != $row["owner"] && !in_array($CURUSER["username"], explode(',', $row["thanks"])))
show_error_msg(T_("ERROR"), "You have to say thanks before you can Download.<br /><br /><a href='torrents-details.php?id=$id'>Return to the previous Page</a>",1);
$friendlyurl = str_replace("http://","",$site_config["SITEURL"]);
$friendlyname = str_replace(".torrent","",$name);
$friendlyext = ".torrent";
......
......@@ -2,6 +2,10 @@
require_once("backend/functions.php");
dbconn();
//$site_config["LEFTNAV"] = $site_config["MIDDLENAV"] = $site_config["RIGHTNAV"] = false;
if ($site_config["MEMBERSONLY"]){
loggedinonly();
}
stdhead(T_("FAQ"));
$faq_categ = null;
......@@ -36,7 +40,7 @@ if (isset($faq_categ)) {
print("<a name='top'></a>");
foreach ($faq_categ as $id => $temp) {
if ($faq_categ[$id]['flag'] == "1") {
//print("<ul>\n<li><a href=\"#". $id ."\"><b>". $faq_categ[$id]['title'] ."</b></a>\n<ul>\n");
//print("<ul>\n<li><a href=\"#". $id ."\"><b>". $faq_categ[$id][title] ."</b></a>\n<ul>\n");
print("<ul style='list-style: none'>\n<li><a href=\"#section". $id ."\"><b>". stripslashes($faq_categ[$id]['title']) ."</b></a>\n<ul style='list-style: none'>\n");
if (array_key_exists("items", $faq_categ[$id])) {
......
......@@ -266,7 +266,7 @@ $added = utc_to_tz($arr["added"]);
$res = SQL_Query_exec("SELECT id, username FROM users WHERE id=$userid");
if (mysqli_num_rows($res) == 1) {
$arr = mysqli_fetch_assoc($res);
$username = "<a href='account-details.php?id=$userid'>$arr[username]</a>";
$username = "<a href='account-details.php?id=$userid'>".class_user($arr['username'])."</a>";
}
else
$username = "Unknown[$topic_userid]";
......@@ -275,7 +275,7 @@ $username = "Unknown[$topic_userid]";
$res = SQL_Query_exec("SELECT username FROM users WHERE id=$topic_userid");
if (mysqli_num_rows($res) == 1) {
$arr = mysqli_fetch_assoc($res);
$author = "<a href='account-details.php?id=$topic_userid'>$arr[username]</a>";
$author = "<a href='account-details.php?id=$topic_userid'>".class_user($arr['username'])."</a>";
}
else
$author = "Unknown[$topic_userid]";
......@@ -1006,7 +1006,7 @@ if ($action == "viewforum") {
$res = SQL_Query_exec("SELECT * FROM users WHERE id=$lpuserid");
if (mysqli_num_rows($res) == 1) {
$arr = mysqli_fetch_assoc($res);
$lpusername = "<a href='account-details.php?id=$lpuserid'>$arr[username]</a>";
$lpusername = "<a href='account-details.php?id=$lpuserid'>".class_user($arr['username'])."</a>";
}
else
$lpusername = "Deluser";
......@@ -1019,7 +1019,7 @@ if ($action == "viewforum") {
$res = SQL_Query_exec("SELECT username FROM users WHERE id=$topic_userid");
if (mysqli_num_rows($res) == 1) {
$arr = mysqli_fetch_assoc($res);
$lpauthor = "<a href='account-details.php?id=$topic_userid'>$arr[username]</a>";
$lpauthor = "<a href='account-details.php?id=$topic_userid'>".class_user($arr['username'])."</a>";
}
else
$lpauthor = "Deluser";
......@@ -1268,7 +1268,7 @@ while ($forums_arr = mysqli_fetch_assoc($forums_res)){
$lasttopicid = $post_arr["topicid"];
$user_res = SQL_Query_exec("SELECT username FROM users WHERE id=$lastposterid");
$user_arr = mysqli_fetch_assoc($user_res);
$lastposter = htmlspecialchars($user_arr['username']);
$lastposter = class_user($user_arr["username"]);
$topic_res = SQL_Query_exec("SELECT subject FROM forum_topics WHERE id=$lasttopicid");
$topic_arr = mysqli_fetch_assoc($topic_res);
$lasttopic = stripslashes(htmlspecialchars($topic_arr['subject']));
......@@ -1324,4 +1324,4 @@ stdfoot();
showerror("Notice", "Unfortunatley the forums are not currently available.");
}
?>
?>
\ No newline at end of file
upload/images/admin/avatar_log.png

2.4 KB | W: | H:

upload/images/admin/avatar_log.png

34.3 KB | W: | H:

upload/images/admin/avatar_log.png
upload/images/admin/avatar_log.png
upload/images/admin/avatar_log.png
upload/images/admin/avatar_log.png
  • 2-up
  • Swipe
  • Onion skin
upload/images/admin/banned_torrents.png

2.81 KB | W: | H:

upload/images/admin/banned_torrents.png

44.9 KB | W: | H:

upload/images/admin/banned_torrents.png
upload/images/admin/banned_torrents.png
upload/images/admin/banned_torrents.png
upload/images/admin/banned_torrents.png
  • 2-up
  • Swipe
  • Onion skin
upload/images/admin/blocks.png

1.96 KB | W: | H:

upload/images/admin/blocks.png

31.5 KB | W: | H:

upload/images/admin/blocks.png
upload/images/admin/blocks.png
upload/images/admin/blocks.png
upload/images/admin/blocks.png
  • 2-up
  • Swipe
  • Onion skin
upload/images/admin/cheats.png

2.25 KB | W: | H:

upload/images/admin/cheats.png

42.9 KB | W: | H:

upload/images/admin/cheats.png
upload/images/admin/cheats.png
upload/images/admin/cheats.png
upload/images/admin/cheats.png
  • 2-up
  • Swipe
  • Onion skin
upload/images/admin/comments.png

2.3 KB | W: | H:

upload/images/admin/comments.png

36.5 KB | W: | H:

upload/images/admin/comments.png
upload/images/admin/comments.png
upload/images/admin/comments.png
upload/images/admin/comments.png
  • 2-up
  • Swipe
  • Onion skin
upload/images/admin/config.png

2.85 KB | W: | H:

upload/images/admin/config.png

46.6 KB | W: | H:

upload/images/admin/config.png
upload/images/admin/config.png
upload/images/admin/config.png
upload/images/admin/config.png
  • 2-up
  • Swipe
  • Onion skin
upload/images/admin/db_backup.png

2.09 KB | W: | H:

upload/images/admin/db_backup.png

51.8 KB | W: | H:

upload/images/admin/db_backup.png
upload/images/admin/db_backup.png
upload/images/admin/db_backup.png
upload/images/admin/db_backup.png
  • 2-up
  • Swipe
  • Onion skin
upload/images/admin/faq.png

2.74 KB | W: | H:

upload/images/admin/faq.png

41.4 KB | W: | H:

upload/images/admin/faq.png
upload/images/admin/faq.png
upload/images/admin/faq.png
upload/images/admin/faq.png
  • 2-up
  • Swipe
  • Onion skin
upload/images/admin/forums.png

2.71 KB | W: | H:

upload/images/admin/forums.png

41.5 KB | W: | H:

upload/images/admin/forums.png
upload/images/admin/forums.png
upload/images/admin/forums.png
upload/images/admin/forums.png
  • 2-up
  • Swipe
  • Onion skin