$email = $_POST["email"];$seedbonus = $_POST["seedbonus"];SQL_Query_exec("UPDATE users SET email='$email', title=$title, downloaded='$downloaded', uploaded='$uploaded', signature=$signature, avatar=$avatar, ip=$ip, donated=$donated, forumbanned=$forumbanned, warned=$warned, modcomment=$modcomment, enabled=$enabled, invites=$invites WHERE id=$userid");, seedbonus=$seedbonusprint("<tr><td>".T_("INVITES").": </td><td align='left'><input type='text' size='4' name='invites' value='".$user["invites"]."' /></td></tr>\n");print("<tr><td>Seed Bonus</td><td align='left'><input type='text' size='4' name='seedbonus' value='".$user["seedbonus"]."' /></td></tr>\n"); if ($_GET["hit"]) {
SQL_Query_exec("UPDATE torrents SET views = views + 1 WHERE id = $id");
header("Location: torrents-details.php?id=$id");
die;
}$id = (int) $_GET["id"];$id = (int) $_GET["id"];
if ($_GET["hit"]) {
SQL_Query_exec("UPDATE torrents SET views = views + 1 WHERE id = $id");
header("Location: torrents-details.php?id=$id");
die;
} $email = $_POST["email"];
$seedbonus = $_POST["seedbonus"];
SQL_Query_exec("UPDATE users SET email='$email', title=$title, downloaded='$downloaded', uploaded='$uploaded', signature=$signature, avatar=$avatar, ip=$ip, donated=$donated, forumbanned=$forumbanned, warned=$warned, modcomment=$modcomment, enabled=$enabled, invites=$invites WHERE id=$userid");
, seedbonus=$seedbonus//torrent is availiable so do some stuff
if ($CURUSER) {
if ($_GET["hit"]) {
SQL_Query_exec("UPDATE torrents SET views = views + 1 WHERE id = $id");
header("Location: torrents-details.php?id=$id");
die;
}
/////////////////// //=== BigMax ===//
$query = (mysqli_fetch_row(SQL_Query_exec("SELECT COUNT(*) FROM `trackerviews` WHERE `viewer` = " . $CURUSER["id"] . " AND `subject` = '$id' AND `type` = 'torrent'")));
if ($query[0] == 0) {
SQL_Query_exec("INSERT INTO `trackerviews` (`subject`, `viewer`, `count`, `type`)
VALUES (" . $id . ", " . $CURUSER["id"] . ", '1', 'torrent')");
} else {
SQL_Query_exec("UPDATE `trackerviews` SET `count` = `count` + '1' WHERE `subject` = '$id' AND `viewer` = " . $CURUSER["id"] . " AND `type` = 'torrent'");
}
///////////////////
} if ($_GET["hit"]) {
SQL_Query_exec("UPDATE torrents SET views = views + 1 WHERE id = $id");
header("Location: torrents-details.php?id=$id");
die;
}
if ($CURUSER) {SQL_Query_exec("UPDATE torrents SET hits = hits + 1 WHERE id = $id");if ($_GET["hit"]) {
SQL_Query_exec("UPDATE torrents SET views = views + 1 WHERE id = $id");
header("Location: torrents-details.php?id=$id");
die;
} $announce = $TorrentInfo[0];
$infohash = $TorrentInfo[1];
$creationdate = $TorrentInfo[2];
$internalname = $TorrentInfo[3];
$torrentsize = $TorrentInfo[4];
$filecount = $TorrentInfo[5];
$annlist = $TorrentInfo[6];
$comment = $TorrentInfo[7];
$filelist = $TorrentInfo[8]; if ($anonyupload == "yes") {
$anon = "yes";
} else {
$anon = "no";
} $filecounts = (int) $filecount;$filecounts
$ret = SQL_Query_exec("INSERT INTO torrents (filename, owner, name, descr, image1, image2, category, added, info_hash, size, numfiles, save_as, announce, external, nfo, torrentlang, anon, last_action) VALUES (".sqlesc($fname).", '".$CURUSER['id']."', ".sqlesc($name).", ".sqlesc($descr).", '".$inames[0]."', '".$inames[1]."', '".$catid."', '" . get_date_time() . "', '".$infohash."', '".$torrentsize."', '".$filecounts."', ".sqlesc($fname).", '".$announce."', '".$external."', '".$nfo."', '".$langid."','$anon', '".get_date_time()."')");
SQL_Query_exec("INSERT INTO completed (userid, torrentid, date) VALUES ($userid, $torrentid, '".get_date_time()."') ON DUPLICATE KEY UPDATE date = ".get_date_time().""); {"info_hash":"ba82ce499378a34841d707b1618daba9b03689d8","peer_id":"2d7142343335302d5a325a47345f6a29624c5157","port":"51492","uploaded":"0","downloaded":"0","left":"0","event":"stopped","no_peer_id":"1","compact":"1","numwant":"0","corrupt":"0","key":"9F15FCC2","ip":"66.28.208.92"}$site_config['vip_cats'] = array('22', '28');$mycats = $site_config['vip_cats'];
if ($CURUSER['class'] < 3 && in_array($row['category'], $mycats)) {
autolink('index.php', 'Error For VIP');
}$res = SQL_Query_exec("SELECT torrents.category, filename, banned, external, announce FROM torrents WHERE id =".intval($id));
$row = mysqli_fetch_assoc($res)$mycats = $site_config['vip_cats'];
if ($CURUSER['class'] < 3 && in_array($row['category'], $mycats)) {
autolink('index.php', 'Error For VIP');
} $res = SQL_Query_exec("SELECT torrents.anon, torrents.seeders, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, torrents.nfo, torrents.last_action, torrents.numratings, torrents.name, torrents.owner, torrents.save_as, torrents.descr, torrents.visible, torrents.size, torrents.added, torrents.views, torrents.hits, torrents.times_completed, torrents.id, torrents.type, torrents.external, torrents.image1, torrents.image2, torrents.announce, torrents.numfiles, torrents.freeleech, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, torrents.numratings, categories.name AS cat_name, torrentlang.name AS lang_name, torrentlang.image AS lang_image, categories.parent_cat as cat_parent, users.username, users.privacy FROM torrents LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN torrentlang ON torrents.torrentlang = torrentlang.id LEFT JOIN users ON torrents.owner = users.id WHERE torrents.id = $id");
$row = mysqli_fetch_assoc($res);$res = SQL_Query_exec("SELECT torrents.category, torrents.anon, torrents.seeders, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, torrents.nfo, torrents.last_action, torrents.numratings, torrents.name, torrents.owner, torrents.save_as, torrents.descr, torrents.visible, torrents.size, torrents.added, torrents.views, torrents.hits, torrents.times_completed, torrents.id, torrents.type, torrents.external, torrents.image1, torrents.image2, torrents.announce, torrents.numfiles, torrents.freeleech, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, torrents.numratings, categories.name AS cat_name, torrentlang.name AS lang_name, torrentlang.image AS lang_image, categories.parent_cat as cat_parent, users.username, users.privacy FROM torrents LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN torrentlang ON torrents.torrentlang = torrentlang.id LEFT JOIN users ON torrents.owner = users.id WHERE torrents.id = $id");
$row = mysqli_fetch_assoc($res); $mycats = array(22, 28);
if ($CURUSER['class'] < 3 && in_array($row['category'], $mycats)) {
autolink('index.php', 'Error For VIP');
} $site_config['vip_cats] = array(22, 28);$mycats = $site_config['vip_cats']; $mycats = array(22, 28);
if ($CURUSER['class'] <3 && in_array($row['category'], $mycats)) {
autolink('index.php', 'Error For VIP');
} if ($commented == 0
&& $CURUSER["id"] != $row["owner"] && $CURUSER["class"] < 7) {SHOW VARIABLES LIKE 'sql_mode';SET sql_mode='ALLOW_INVALID_DATES';
datetime NOT NULL DEFAULT '0000-00-00 00:00:00'datetime DEFAULT NULL'0000-00-00 00:00:00'NULL $fn = "$torrent_dir/$id.torrent";$commented = get_row_count("comments", "WHERE torrent = $id AND user = $CURUSER[id]");
if ($commented == 0) { // or try if (!$commented ) {
show_error_msg("Error", "You must add a comment before download.",1);
}$r = mysqli_query($link, "SHOW TABLES");
$stmt = mysqli_query($link, "SHOW VARIABLES LIKE 'sql_mode'")->fetch_row();
if (!$stmt) {
echo "<font color='#ff0000'><b>Error Getting SQL Mode:</b></font><br><br>";
} else {
echo "<font color='#00cc00'><b>SQL Mode:</b></font><br>";
echo var_dump($stmt[1])."<br><br>";
}SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";list(, $val) = thisEach($this->params); $val = current($this->params);
next($this->params);