"spiritblue, post: 66590, member: 401":
mini error
<script src="https://www.google.com/recaptcha/api.js" [color=rgb(184, 49, 47)]async defer[/color]></script>
;)
<script type="text/javascript" src="https://www.google.com/recaptcha/api.js"></script>
"ambrosia, post: 66557, member: 20305":
could you help me, I have a problem with the invitation mode, it generates a msyql error
Database Error in account-signup.php on line 196: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' confirmed='no' WHERE invite= '616c176464f3ec232802c82eb29d7617'' at line 1. Query was: UPDATE invites SET inviteid = , confirmed='no' WHERE invite= '616c176464f3ec232802c82eb29d7617'.
# Don't display yourself, Privacy is determined on acceptpms - (From All or Staff Only).
$res = SQL_Query_exec("SELECT id, username FROM users WHERE id != $CURUSER[id] AND enabled = 'yes' AND status = 'confirmed' $where ORDER BY username");
if (mysqli_num_rows($res))
{
$to = "<select name=\"userid\">\n";
while ($arr = mysqli_fetch_assoc($res)) $to .= "<option value=\"$arr[id]\">$arr[username]</option>\n";
$to .= "</select>\n";
} "MicroMonkey, post: 66547, member: 311":
there is a mysql_ left in that code. Change it to mysqli_
//EXTERNAL SCRAPE
if ($external=='yes' && $site_config['UPLOADSCRAPE']){
$tracker=str_replace("/announce","/scrape",$announce);
$stats = torrent_scrape_url($tracker, $infohash);
$seeders = (int) strip_tags($stats['seeds']);
$leechers = (int) strip_tags($stats['peers']);
$downloaded = (int) strip_tags($stats['downloaded']);
SQL_Query_exec("UPDATE torrents SET leechers='".$leechers."', seeders='".$seeders."',times_completed='".$downloaded."',last_action= '".get_date_time()."',visible='yes' WHERE id='".$id."'");
}
//END SCRAPE//===| Scrape External Torrents
if ($row["external"]=='yes')
{
print ("<td width='160' align='right' valign='top'><table><tr>");
if ($scrape =='1')
{
print("<td class='table_col1' width='150' valign='middle'>
<div style='margin-top:5px; margin-bottom:10px; font:bold 16px Times' align='center'><font color='#FF2000'>".T_("EXTERNAL_TORRENT")."</font></div>");
//===| UDP Scraper
$resu = SQL_Query_exec("SELECT id, info_hash FROM torrents WHERE external = 'yes' AND id = $id");
while ($rowu = mysqli_fetch_array($resu))
{
$TorrentInfo = ParseTorrent("$site_config[torrent_dir]/$rowu[id].torrent");
$ann = $TorrentInfo[0];
$annlist = array();
if ($TorrentInfo[6])
{
foreach ($TorrentInfo[6] as $ann)
{
$annlist[] = $ann[0];
}
}
else
$annlist = array($ann);
$seeders = $leechers = $downloaded = null;
foreach ($annlist as $ann)
{
$tracker = explode("/", $ann);
$path = array_pop($tracker);
$oldpath = $path;
$path = str_replace("announce", "scrape", $path);
$tracker = implode("/", $tracker)."/".$path;
if ($oldpath == $path)
{
continue;
}
if ($openbittorrent_done)
continue;
if (preg_match("/thepiratebay.org/i", $tracker) || preg_match("/prq.to/", $tracker))
{
$tracker = "http://tracker.openbittorrent.com/scrape";
$openbittorrent_done = 1;
}
if(preg_match('/udp:\/\//', $tracker))
{
$udp=true;
try
{
$timeout = 5;
$udp= new udptscraper($timeout);
$stats=$udp->scrape($tracker,$rowu["info_hash"]);
//print_r($stats); exit();
foreach ($stats as $idu=>$scrape)
{
$seeders += $scrape['seeders'];
$leechers += $scrape['leechers'];
$downloaded += $scrape['completed'];
}
}
catch(ScraperException $e)
{
$e->isConnectionError();
}
}
else
{
$stats = torrent_scrape_url($tracker, $rowu["info_hash"]);
}
if ($stats['seeds'] != -1)
{
$seeders += $stats['seeds'];
$leechers += $stats['peers'];
$downloaded += $stats['downloaded'];
SQL_Query_exec("UPDATE `announce` SET `online` = 'yes', `seeders` = '".$stats[seeds]."', `leechers` = '".$stats[peers]."', `times_completed` = '".$stats[downloaded]."' WHERE `url` = ".sqlesc($ann)." AND `torrent` = $rowu[id]");
}
else
{
SQL_Query_exec("UPDATE `announce` SET `online` = 'no' WHERE `url` = ".sqlesc($ann)." AND `torrent` = $rowu[id]");
}
}
if ($seeders !== null)
{
SQL_Query_exec("UPDATE torrents SET leechers = '".$leechers."', seeders = '".$seeders."', times_completed = '".$downloaded."', last_action = '".get_date_time()."', visible = 'yes' WHERE id = '".$rowu['id']."'");
}
else
{
SQL_Query_exec("UPDATE torrents SET last_action = '".get_date_time()."' WHERE id='".$rowu['id']."'");
}
}
//===| End UDP Scraperif (!is_valid_id($id))
show_error_msg(T_("NO_SHOW_DETAILS"), "Bad ID.",1);$id2 = $_GET['name'];
$r2 = @SQL_Query_exec("SELECT * FROM `users` WHERE `username` = '$id2'");
$user2 = mysqli_fetch_array($r2) or show_error_msg(T_("NO_SHOW_DETAILS"), T_("NO_USER_WITH_ID")." $id2.",1);"MicroMonkey, post: 66540, member: 311":
since I cant test this mod, I read the code and this needs changed
mega_scrape
while ($row = mysqli_fetch_array($res))
just change mysql_ to mysqli_
"MicroMonkey, post: 66534, member: 311":
probably $row['username']
"MicroMonkey, post: 66535, member: 311":
does mega scrape work on ttv3? I never looked at it before. Can you link me to it?
"MicroMonkey, post: 66532, member: 311":
try what these people are saying. https://stackoverflow.com/questions/1039725/how-to-do-url-re-writing-in-php
function is_valid_id($id){
return is_numeric($id) && ($id > 0) && (floor($id) == $id);
}
function is_valid_int($id){
return is_numeric($id) && (floor($id) == $id);
}[/code[