Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
Enchanced Requests
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Mods Completed

2021-06-07 11:16:27
Thanks @MicroMonkey and thanks @spiritblue,
how I can be so blind to miss just one damn ' off all possible similary things on this ADDON   :crylol

PS
Like someone say before here, time to by new glasses or bigger screen monitor


www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2021-07-01 10:33:15
To all of you who do not want to show fulfilled requests, you can change the following line:

if ($filter == "true")
$filter = "AND requests.filledby = 0";
else
$filter = "";




to

if ($filter == "true")
$filter = "";
else
$filter = "AND requests.filledby = 0";




limitation to last 5 request

$res = SQL_Query_exec("SELECT users.downloaded, users.uploaded, users.username, users.privacy, requests.filled, requests.comments,
requests.filledby, requests.id, requests.userid, requests.request, requests.requestime, requests.added, requests.hits, categories.parent_cat as parent_cat, categories.name AS cat_name, categories.image AS cat_pic
FROM requests inner join categories on requests.cat = categories.id inner join users on requests.userid = users.id  $categ
$filter $search $sort LIMIT 5") or sqlerr();


Have a nice day guys


www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2023-09-07 22:54:48
error
 	Database Error in reqall.php on line 1028: Field 'comments' doesn't have a default value. Query was: INSERT INTO requests (hits, userid, cat, request, descr, poster, added) VALUES(0,1, 96, 'erte5t', 'ertert', '\n', '2023-09-07 22:51:22').


This time I am lost and understand the mistake, thank you for your help
Last edited by spiritblue on 2023-09-07 22:55:45
2023-09-08 19:16:47
You should never ever see a image in a exception message. Inserting raw input without handling, can crash the table and cause data loss among other problems.

INSERT : htmlentities($string)

READ: html_entity_decode($string)
Last edited by STorrents2020 on 2023-09-08 19:17:13
2023-09-08 22:26:06
Hi STorrents2020

it doesn't work, line 1028
reqall.rar
Download

Last edited by spiritblue on 2023-09-08 23:11:14
2023-09-09 13:06:50
@spiritblue

read PM from me

Regards


www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2023-09-09 17:15:10

$poster = (isset($pic) ? $pic : "");
$poster = sqlesc($poster);
$userid = sqlesc($userid);
$request = sqlesc($request);
$descr = sqlesc(htmlentities($descr)); //  <-----
$cat = sqlesc($cat);

SQL_Query_exec("INSERT INTO requests (hits, userid, cat, request, descr, poster, added) VALUES(1, $CURUSER[id], $cat, $request, $descr, $poster, '" . get_date_time() . "')");
$id = mysqli_insert_id($GLOBALS["DBconnector"]);


Also, preg_match can be replaced with better ways and greater efficiency using a predefined filter array. Currently Its not checking MIME, header data or filesize. This can be quite vulnerable at a first glance. That is just image insertion.

Someone should audit this file if they have the time.
Last edited by STorrents2020 on 2023-09-09 17:22:01
2023-09-10 05:57:12
Thank you STorrents2020 and yes, this mode should be a nice update, at the moment, it's a mess  😞 lol
2023-09-11 16:48:52
Its very messy, most code I review on here is messy and buggy - all part of learning!
2023-09-11 18:47:58
Big thanks Botanicar,,, résolu!! 😊
2024-05-13 12:23:27
Working on 2.0.8 ;
2024-05-13 13:07:41
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, resource given in /www/wwwroot/tt208.local/reqall.php on line 697
MAKE_REQUEST
-

Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, resource given in /www/wwwroot/tt208.local/reqall.php on line 712
Στιγμιότυπο οθόνης 2024-05-13 160720.png
Στιγμιότυπο οθόνης 2024-05-13 160720.png
2024-05-15 18:23:23
Blank page on TT 3 Master.
2025-02-08 17:45:01
Hello I just made the modification and when I have the code in torrents-upload.php there is nothing visible in torrents-upload.php

Thank you for your help


Bonjour je viens de faire les modification et quand je mes le code dans torrents-upload.php il n'y a rien qui est visible dans torrents-upload.php

merci pour votre aide
2025-02-09 13:22:56
Niki, do you have that part of code on torrent-uppload.php?



///////////////////////////// REQUESTS///////////////////

if (is_valid_id($_POST["request"])) {
/* Fill request */
$filledurl = "$site_config[SITEURL]/torrents-details.php?id=$id&hit=1";
SQL_Query_exec ("UPDATE requests SET filled = '$filledurl', filledby = $CURUSER[id] WHERE id = ". $_POST['request'] ."") or die(mysqli_connect_error($GLOBALS["DBconnector"]));
SQL_Query_exec("DELETE FROM `addedrequests` WHERE `requestid` = ". ($_POST['request'] + 0));
write_log("The request ($torrent) was filled by " . $CURUSER["username"] . "");
/* PM for requested user */
$requestid = $_POST['request'];
$resp = SQL_Query_exec("SELECT users.username, requests.userid, requests.request FROM requests inner join users on requests.userid = users.id where requests.id = $requestid");
$arr = mysqli_fetch_assoc($resp);
$res = SQL_Query_exec("SELECT `userid` FROM `requests` WHERE `id` = ". intval($_POST['request'])) or die(mysqli_connect_error($GLOBALS["DBconnector"]));
$msg = "".T_("REQ_MSG1").", [url=$site_config[SITEURL]/reqall.php?Section=Request_Details&id=" . $requestid . "]" . $arr['request'] . "[/url], ".T_("REQ_MSG2")." [url=$site_config[SITEURL]/account-details.php?id=" . $CURUSER['id'] . "]" . $arr['username'] . "[/url].  ".T_("REQ_MSG3")."  [url=" . $filledurl. "]" . $filledurl. "[/url].  ".T_("REQ_MSG4")." [url=$site_config[SITEURL]/reqall.php?Section=Reset&requestid=" . $requestid . "]".T_("REQ_MSG5")."[/url].  ".T_("REQ_MSG6")."";
$subject = "Your request has been filled";
if ($row = mysqli_fetch_assoc($res)) {
SQL_Query_exec("INSERT INTO messages (poster, sender, receiver, added, subject, msg) VALUES(0, 0, $row[userid], '" . get_date_time() . "', " . sqlesc($subject) . ", " . sqlesc($msg) . ")");
SQL_Query_exec("UPDATE requests SET done = '".get_date_time()."' WHERE requests.id = $requestid ");
}
}
//////////////REQUEST END/////////////////////////////////////////////


and do you have "addedrequests" table?


www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728