Hello everyone I installed the request function with the link below
https://torrenttrader.uk/post/9869
And when I make the modification as below in the file torrents-upload.php There is nothing displayed in the file torrents-upload.php
now open up torrents-upload.php find
Code :
under add
Code :
find in torrent-upload.php
Code :
under add
Code :
https://torrenttrader.uk/post/9869
And when I make the modification as below in the file torrents-upload.php There is nothing displayed in the file torrents-upload.php
now open up torrents-upload.php find
Code :
write_log( sprintf(T_("TORRENT_UPLOADED"), htmlspecialchars($name), $CURUSER["username"]) );under add
Code :
///////////////////////////// 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/////////////////////////////////////////////
find in torrent-upload.php
Code :
if ($site_config['ANONYMOUSUPLOAD'] && $site_config["MEMBERSONLY"] ){ ?>
<tr><td align="right"><?php echo T_("UPLOAD_ANONY");?>: </td><td><?php printf("<input name='anonycheck' value='yes' type='radio' " . ($anonycheck ? " checked='checked'" : "") . " />".T_("YES")." <input name='anonycheck' value='no' type='radio' " . (!$anonycheck ? " checked='checked'" : "") . " />".T_("NO").""); ?> <i><?php echo T_("UPLOAD_ANONY_MSG");?></i>
</td></tr>
<?php
}under add
Code :
//Request filled?
if ($site_config["REQUESTSON"] ){
$sql_request = "SELECT `id`, `request` FROM requests WHERE filledby=0 ORDER BY `request` ASC";
$res = SQL_Query_exec($sql_request);
if (mysqli_num_rows($res) > 0) {
$request = "<select name=\"request\">\n<option value=\"0\">(Chose the request to be filled)</option>\n";
while ($row = mysqli_fetch_array($res)) {
$request .= "<option value=\"" . $row["id"] . "\">" . htmlspecialchars($row["request"]) . "</option>\n";
}
$request .= "</select>\n";
print("<tr><td align=right>If your upload is to fill a request, select it here</td><td align=left>$request</td></tr>");
}
}
//end request filled?