case 'uploader': case 'tmdb':
echo "<td class='table_head'> TMDB</td>";
break;
if ($row["freeleech"] == 1) //==| TMDB Link
if (!empty($row["tmdb"])) { $tmdb = "<a href=".$row["tmdb"]." target='blank'><img src='images/tmdb.png' border='0' title='".T_("T_TMDB")."'></a>"; } else { $tmdb = ""; } case 'speed': case 'tmdb':
if ($row["tmdb"])
print("<td class='ttable_col$x' align='center'><a href=".$row['tmdb']." target='_blank'><".htmlspecialchars($row['tmdb'])."><img src='" . $site_config['SITEURL'] . "/images/tmdb.png' border='0' width='50' height='50' alt=\"\" /></a></td>");
else
print("<td class='ttable_colx' align='center'>-</td>");
break; tmdb, $site_config["torrenttable_columns"] = "category,name,tmdb,youtube,comment"; $site_config["torrenttable_columns"] = "category,name,tmdb,youtube,comment";
//New user shoutbox
$res = SQL_Query_exec("SELECT users.*, groups.level FROM users INNER JOIN groups ON groups.group_id=users.class ORDER BY id DESC LIMIT 1");
$arr = mysqli_fetch_assoc($res);
$query = "INSERT INTO `ajchat` (`uid`, `date`, `name`, `text`) VALUES (100000, '".get_date_time()."', 'RegOp' ,'" .T_("WELCOME_TO_OUR_NEWEST_USER").": [url=".$site_config['SITEURL']."/account-details.php?id=".$arr[id]."]".$wantusername."[/url] ')";
SQL_Query_exec($query);
//End new user shoutbox
<?php
#================================#
# TorrentTrader 2.08 #
# http://torrenttrader.uk #
#--------------------------- #
# Uppdated by M-Jay #
#================================#
require_once("backend/functions.php");
dbconn();
?>
<script type="text/javascript">
<!--
function bbshout(repdeb, repfin) {
var input = document.forms['shoutboxform'].elements['message'];
input.focus();
if(typeof document.selection != 'undefined') {
var range = document.selection.createRange();
var insText = range.text;
range.text = repdeb + insText + repfin;
range = document.selection.createRange();
if (insText.length == 0) {
range.move('character', -repfin.length);
} else {
range.moveStart('character', repdeb.length + insText.length + repfin.length);
}
range.select();
}
else if(typeof input.selectionStart != 'undefined')
{
var start = input.selectionStart;
var end = input.selectionEnd;
var insText = input.value.substring(start, end);
input.value = input.value.substr(0, start) + repdeb + insText + repfin + input.value.substr(end);
var pos;
if (insText.length == 0) {
pos = start + repdeb.length;
} else {
pos = start + repdeb.length + insText.length + repfin.length;
}
input.selectionStart = pos;
input.selectionEnd = pos;
}
else
{
var pos;
var re = new RegExp('^[0-9]{0,3}$');
while(!re.test(pos)) {
pos = prompt("Insertion àla position (0.." + input.value.length + "):", "0");
}
if(pos > input.value.length) {
pos = input.value.length;
}
var insText = prompt("Veuillez entrer le texte àformater:");
input.value = input.value.substr(0, pos) + repdeb + insText + repfin + input.value.substr(pos);
}
}
function bbcolor() {
var colorvalue = document.forms['shoutboxform'].elements['color'].value;
bbshout("[color="+colorvalue+"]", "[/color]");
}
function bbfont() {
var fontvalue = document.forms['shoutboxform'].elements['font'].value;
bbshout("[font="+fontvalue+"]", "[/font]");
}
function bbsize() {
var sizevalue = document.forms['shoutboxform'].elements['size'].value;
bbshout("[size="+sizevalue+"]", "[/size]");
}
function bbimg() {
var imgvalue = document.forms['shoutboxform'].elements['img'].value;
bbshout("[img="+sizevalue+"]", "[/img]");
}
function bbblink() {
var blink = document.forms['shoutboxform'].elements['blink'].value;
bbshout("[blink="+blinkvalue+"]", "[/blink");
}
function bbdf() {
var df = document.forms['shoutboxform'].elements['df'].value;
bbshout("[df="+dfvalue+"]", "[/df");
}
//-->
</script>
<script type="text/javascript">
function blink() {
var blinks = document.getElementsByTagName('blink');
for (var i = blinks.length - 1; i >= 0; i--) {
var s = blinks;
s.style.visibility = (s.style.visibility === 'visible') ? 'hidden' : 'visible';
}
window.setTimeout(blink, 1000);
}
if (document.addEventListener) document.addEventListener("DOMContentLoaded", blink, false);
else if (window.addEventListener) window.addEventListener("load", blink, false);
else if (window.attachEvent) window.attachEvent("onload", blink);
else window.onload = blink;
</script>
<script language='javascript'>
function SmileIT(smile,form,text){
document.forms[form].elements[text].value = document.forms[form].elements[text].value+" "+smile+" ";
document.forms[form].elements[text].focus();
}
</script>
<script language='javascript'><!--
function mySubmit() {
setTimeout('document.shbox.reset()',350);
}
function Smilies(Smilie)
{
document.shoutboxform.message.value+=Smilie+" ";
document.shoutboxform.message.focus();
}
//--></script>
<script src="https://kit.fontawesome.com/8514806850.js" crossorigin="anonymous"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<script type="text/javascript" src="scripts/ncode_imageresizer.js"></script>
<script type="text/javascript">
<!--
NcodeImageResizer.MODE = 'newwindow';
NcodeImageResizer.MAXWIDTH = 350;
NcodeImageResizer.MAXHEIGHT = 0;
NcodeImageResizer.Msg1 = 'Click for full image.';
NcodeImageResizer.Msg2 = 'This image has been resized. Click this bar to view the full image.';
NcodeImageResizer.Msg3 = 'This image has been resized. Click this bar to view the full image.';
NcodeImageResizer.Msg4 = 'Click for small image.';
//-->
</script>
<script language="Javascript" type="text/javascript">
<!--
function Reply_code(smile,form,text){
document.forms[form].elements[text].value = document.forms[form].elements[text].value+" "+smile+" ";
document.forms[form].elements[text].focus();
}
//-->
</script>
<?php
if ($site_config['SHOUTBOX']){
function quickbbshout()
{
echo "<table align='center' border=0 cellpadding=2 cellspacing=2><tr>";
echo "<td style='padding-top:5px' align='center'>";
echo "
<a href=\"javascript:bbshout('', '')\" class='btn btn-dark'> <i class='fa-solid fa-bold'></i> </a>
<a href=\"javascript:bbshout('[i]', '')\" class='btn btn-dark'> <i class='fa-solid fa-italic'></i></a>
<a href=\"javascript:bbshout('', '')\" class='btn btn-dark'> <i class='fa-solid fa-underline'></i></a>
<a href=\"javascript:bbshout('', '')\" class='btn btn-dark'> <i class='fa-solid fa-align-center'></i></a>
<a href=\"javascript:bbshout('[url]', '[/url]')\" class='btn btn-dark'> <i class='fa-solid fa-code'></i></a>
<a href=\"javascript:bbshout('[img]', '[/img]')\" class='btn btn-dark'> <i class='fa-solid fa-image'></i></a>
<a href=\"javascript:bbshout('[videow=', '')\" class='btn btn-dark'> <i class='fa-solid fa-video'></i></a> ";
echo "
<select name='color' class='bb_icon' onChange=\"javascript:bbcolor()\">
<option selected='selected'>".T_("COLOR")."</option>
<option value=mediumturquoise style=color:mediumturquoise>Medium-Turquoise</option>
<option value=dodgerblue style=color:dodgerblue>Dodger-Blue</option>
<option value=slateblue style=color:slateblue>Slate-Blue</option>
<option value=royalblue style=color:royalblue>Royal-Blue</option>
<option value=orange style=color:orange>Orange</option>
<option value=orangered style=color:orangered>Orange-Red</option>
<option value=crimson style=color:crimson>Crimson</option>
<option value=red style=color:red>Red</option>
<option value=indianred style=color:indianred>Indian-Red</option>
<option value=firebrick style=color:firebrick>Fire-Brick</option>
<option value=green style=color:green>Green</option>
<option value=limegreen style=color:limegreen>Lime-Green</option>
<option value=seagreen style=color:seagreen>Sea-Green</option>
<option value=hotpink style=color:hotpink>Hotpink</option>
<option value=tomato style=color:tomato>Tomato</option>
<option value=coral style=color:coral>Coral</option>
<option value=mediumorchid style=color:mediumorchid>Medium-Orchid</option>
<option value=magenta style=color:magenta>Magenta</option>
<option value=burlywood style=color:burlywood>Burlywood</option>
<option value=sandybrown style=color:sandybrown>Sandy-Brown</option>
<option value=sienna style=color:sienna>Sienna</option>
<option value=goldenrod style=color:goldenrod>Golden-Rod</option>
<option value=teal style=color:teal>Teal</option>
<option value=silver style=color:silver>Silver</option>
</select>";
echo "
<select name='font' class='bb_icon' onChange=\"javascript:bbfont()\">
<option selected='selected'>Font</option>
<option value='Arial'>Arial</option>
<option value='Arial Black'>Arial Black</option>
<option value='Comic Sans MS'>Comic Sans MS</option>
<option value='Courier New'>Courier New</option>
<option value='Franklin Gothic Medium'>Franklin Gothic Medium</option>
<option value='Georgia'>Georgia</option>
<option value='Helvetica'>Helvetica</option>
<option value='Impact'>Impact</option>
<option value='Lucida Console'>Lucida Console</option>
<option value='Lucida Sans Unicode'>Lucida Sans Unicode</option>
<option value='Microsoft Sans Serif'>Microsoft Sans Serif</option>
<option value='Palatino Linotype'>Palatino Linotype</option>
<option value='Tahoma' style='font-family: Tahoma;'>Tahoma</option>
<option value='Times New Roman'>Times New Roman</option>
<option value='Trebuchet MS'>Trebuchet MS</option>
<option value='Verdana'>Verdana</option>
<option value='Symbol'>Symbol</option>
</select>";
echo "
<select name='size' class='bb_icon' onChange=\"javascript:bbsize()\">
<option selected='selected'>".T_("SIZE")."</option>
<option value=1>1</option>
<option value=2>2</option>
<option value=3>3</option>
<option value=4>4</option>
<option value=5>5</option>
<option value=6>6</option>
<option value=7>7</option>
</select>";
echo "</td></tr><tr><td align='center'>";
echo "
<a href=\"javascript: SmileIT(':-)','shoutboxform','message')\"><img border=0 src=images/smilies/smile.gif></a>
<a href=\"javascript: SmileIT(':-D','shoutboxform','message')\"><img border=0 src=images/smilies/grin.gif></a>
<a href=\"javascript: SmileIT(':lol:','shoutboxform','message')\"><img border=0 src=images/smilies/lol.gif></a>
<a href=\"javascript: SmileIT(':rofl:','shoutboxform','message')\"><img border=0 src=images/smilies/rofl.gif></a>
<a href=\"javascript: SmileIT(':-S','shoutboxform','message')\"><img border=0 src=images/smilies/sarcastic.gif></a>
<a href=\"javascript: SmileIT(':w00t:','shoutboxform','message')\"><img border=0 src=images/smilies/w00t.gif></a>
<a href=\"javascript: SmileIT(':-/','shoutboxform','message')\"><img border=0 src=images/smilies/confused.gif></a>
<a href=\"javascript: SmileIT(':-|','shoutboxform','message')\"><img border=0 src=images/smilies/noexpression.gif></a>
<a href=\"javascript: SmileIT(':-(','shoutboxform','message')\"><img border=0 src=images/smilies/sad.gif></a>
<a href=\"javascript: SmileIT(':cry:','shoutboxform','message')\"><img border=0 src=images/smilies/cry.gif></a>
<a href=\"javascript: SmileIT(':-P','shoutboxform','message')\"><img border=0 src=images/smilies/ras.gif></a>
<a href=\"javascript: SmileIT(':pardon:','shoutboxform','message')\"><img border=0 src=images/smilies/pardon.gif></a>
<a href=\"javascript: SmileIT(':-8)','shoutboxform','message')\"><img border=0 src=images/smilies/cool.gif></a>
<a href=\"javascript: SmileIT(':wave:','shoutboxform','message')\"><img border=0 src=images/smilies/wave.gif></a>
<a href=\"javascript: SmileIT(':ok:','shoutboxform','message')\"><img border=0 src=images/smilies/ok.gif></a>
<a href=\"javascript: SmileIT(':hmm:','shoutboxform','message')\"><img border=0 src=images/smilies/hmm.gif></a>";
echo "</td></tr></table>";
}
//DELETE MESSAGES
if (isset($_GET['del'])){
if (is_numeric($_GET['del'])){
$query = "SELECT * FROM shoutbox WHERE msgid=".$_GET['del'] ;
$result = SQL_Query_exec($query);
}else{
echo "invalid msg id STOP TRYING TO INJECT SQL";
exit;
}
$row = mysqli_fetch_row($result);
if ($row && ($CURUSER["edit_users"]=="yes" || $CURUSER['username'] == $row[1])) {
$query = "DELETE FROM shoutbox WHERE msgid=".$_GET['del'] ;
write_log("<b><font color='orange'>Shout Deleted: </font> Deleted by ".$CURUSER['username']."</b>");
SQL_Query_exec($query);
}
}
//INSERT MESSAGE
if (!empty($_POST['message']) && $CURUSER) {
$_POST['message'] = sqlesc($_POST['message']);
$query = "SELECT COUNT(*) FROM shoutbox WHERE message=" . $_POST['message'] . " AND user='" . class_user($CURUSER["username"]) . "' AND UNIX_TIMESTAMP('" . get_date_time() . "')-UNIX_TIMESTAMP(date) < 30";
$result = SQL_Query_exec($query);
$row = mysqli_fetch_row($result);
if ($row[0] == '0') {
$query = "INSERT INTO shoutbox (msgid, user, message, date, userid) VALUES (NULL, '".$CURUSER['username']."', ".$_POST['message'].", '".get_date_time()."', '".$CURUSER['id']."')";
SQL_Query_exec($query);
}
}
//GET CURRENT USERS THEME AND LANGUAGE
if ($CURUSER){
$ss_a = @mysqli_fetch_assoc(@SQL_Query_exec("select uri from stylesheets where id=" . $CURUSER["stylesheet"]));
if ($ss_a)
$THEME = $ss_a["uri"];
}else{//not logged in so get default theme/language
$ss_a = mysqli_fetch_assoc(SQL_Query_exec("select uri from stylesheets where id='" . $site_config['default_theme'] . "'"));
if ($ss_a)
$THEME = $ss_a["uri"];
}
if(!isset($_GET['history'])){
?>
<html>
<head>
<title><?php echo $site_config['SITENAME'] . T_("SHOUTBOX"); ?></title>
<?php /* If you do change the refresh interval, you should also change index.php printf(T_("SHOUTBOX_REFRESH"), 5) the 5 is in minutes */ ?>
<meta http-equiv="refresh" content="300" />
<link rel="stylesheet" type="text/css" href="<?php echo $site_config['SITEURL']?>/themes/<?php echo $THEME; ?>/theme.css" />
<script type="text/javascript" src="<?php echo $site_config['SITEURL']; ?>/backend/java_klappe.js"></script>
</head>
<body class="shoutbox_body">
<?php
echo '<div class="shoutbox_contain"><table border="0" style="width: 99%; table-layout:fixed">';
}else{
if ($site_config["MEMBERSONLY"]) {
loggedinonly();
}
stdhead();
begin_frame(T_("SHOUTBOX_HISTORY"));
echo '<div class="shoutbox_history">';
$query = 'SELECT COUNT(*) FROM shoutbox';
$result = SQL_Query_exec($query);
$row = mysqli_fetch_row($result);
echo '<div align="center">Pages: ';
$pages = round($row[0] / 100) + 1;
$i = 1;
while ($pages > 0){
echo "<a href='".$site_config['SITEURL']."/shoutbox.php?history=1&page=".$i."'>[".$i."]</a> ";
$i++;
$pages--;
}
echo '</div><br /><table border="0" style="width: 99%; table-layout:fixed">';
}
if (isset($_GET['history'])) {
if (isset($_GET['page'])) {
if($_GET['page'] > '1') {
$lowerlimit = $_GET['page'] * 100 - 100;
$upperlimit = $_GET['page'] * 100;
}else{
$lowerlimit = 0;
$upperlimit = 100;
}
}else{
$lowerlimit = 0;
$upperlimit = 100;
}
$query = 'SELECT * FROM shoutbox ORDER BY msgid DESC LIMIT '.$lowerlimit.','.$upperlimit;
}else{
$query = 'SELECT * FROM shoutbox ORDER BY msgid DESC LIMIT 20';
}
$donated = ($CURUSER["donated"]);
$userdownloaded = mksize($CURUSER["downloaded"]);
$useruploaded = mksize($CURUSER["uploaded"]);
$privacylevel = $CURUSER["privacy"];
if ($CURUSER["downloaded"] > 0) {
$userratio = number_format($CURUSER["uploaded"] / $CURUSER["downloaded"], 2);
}else{
$userratio = "---";
}
print ("<br>
<div align='center'>
<img src='images/leech.png' title='Downloaded'> :
<font size=4 color=#f55c65>
$userdownloaded
</font>
<font size=4 color=#3790ba>
<-Vos statistiques->
</font>
<img src='images/seed.png' title='Uploaded'> :
<font size=4 color=#4fdf19>
$useruploaded
</font>
<font size=4 color=#3790ba> [
". Ratio .":
$userratio ]
</font>
<br><br>
");
$result = SQL_Query_exec($query);
$alt = false;
while ($row = mysqli_fetch_assoc($result)) {
if ($alt){
echo '<tr class="shoutbox_noalt">';
$alt = false;
}else{
echo '<tr class="shoutbox_alt">';
$alt = true;
}
echo '<td style="font-size: 9px; width: 118px;">';
echo "<div align='left' style='float: left'>";
echo date('jS M, g:ia', utc_to_tz_time($row['date']));
echo "</div>";
if ( ($CURUSER["edit_users"]=="yes") || ($CURUSER['username'] == ($row['user'])) ){
echo "<div align='right' style='float: right'><a href='".$site_config['SITEURL']."/shoutedit.php?action=edit&msgid=".$row['msgid']."' style='font-size: 8px'><img src='images/shoutbox/shout_edit.png'></a> <a href='".$site_config['SITEURL']."/shoutedit.php?action=delete&msgid=".$row['msgid']."' style='font-size: 8px'><img src='images/shoutbox/shout_delete.png'></a> ".$av."<div>";
//echo "<div align='right' style='float: right'><a href='".$site_config['SITEURL']."/shoutbox.php?del=".$row['msgid']."' style='font-size: 8px'>[D]</a></div>";
}
echo "<div align='right' style='float: right'></div>";
echo '</td><td style="font-size: 12px; padding-left: 5px"><a href="'.$site_config['SITEURL'].'/account-details.php?id='.$row['userid'].'" target="_parent"><b>'.class_user($row['user']).':</b></a> '.nl2br(format_comment($row['message']));
echo '</td></tr>';
}
?>
</table>
</div>
<br />
<?php
//if the user is logged in, show the shoutbox, if not, dont.
if(!isset($_GET['history'])) {
if (isset($_COOKIE["pass"])){
echo "<form name='shoutboxform' action='shoutbox.php' method='post'>";
echo "<center><table width='100%' border='0' cellpadding='1' cellspacing='1'>";
echo "<tr class='shoutbox_messageboxback'>";
echo "<td width='75%' align='center'>";
echo "<input type='text' name='message' class='shoutbox_msgbox' />";
echo "</td>";
echo "<td>";
echo "<input type='submit' name='submit' value='".T_("SHOUT")."' class='shoutbox_shoutbtn' />";
echo "</td>";
echo "<td>";
echo '<a href="javascript:PopMoreSmiles(\'shoutboxform\', \'message\');" class="btn btn-dark"> <i class="fa-solid fa-face-smile-wink" style="color:white"></i> </a>';
echo ' <small>-</small> <a href="javascript:PopMoreTags();" class="btn btn-dark"><i class="fa-solid fa-hashtag" style="color:white"></i></a>';
echo "<br />";
echo "<a href='shoutbox.php' class='btn btn-dark'><i class='fa-solid fa-rotate' style='color:white'></i></a>";
echo " <small>-</small> <a href='".$site_config['SITEURL']."/shoutbox.php?history=1' target='_blank' class='btn btn-dark'><i class='fa-solid fa-clock-rotate-left' style='color:white'></i></a>";
echo "</td>";
echo "</tr>";
echo "</table></center>";
echo quickbbshout();
echo "</form>";
}else{
echo "<br /><div class='shoutbox_error'>".T_("SHOUTBOX_MUST_LOGIN")."</div>";
}
}
if(!isset($_GET['history'])){
echo "</body></html>";
}else{
end_frame();
stdfoot();
}
}//END IF $SHOUTBOX
else{
echo T_("SHOUTBOX_DISABLED");
}
?>
<?php
#================================#
# TorrentTrader 2.08 #
# http://torrenttrader.uk #
#--------------------------- #
# Uppdated by M-Jay #
#================================#
require_once("backend/functions.php");
dbconn();
?>
<script type="text/javascript">
<!--
function bbshout(repdeb, repfin) {
var input = document.forms['shoutboxform'].elements['message'];
input.focus();
if(typeof document.selection != 'undefined') {
var range = document.selection.createRange();
var insText = range.text;
range.text = repdeb + insText + repfin;
range = document.selection.createRange();
if (insText.length == 0) {
range.move('character', -repfin.length);
} else {
range.moveStart('character', repdeb.length + insText.length + repfin.length);
}
range.select();
}
else if(typeof input.selectionStart != 'undefined')
{
var start = input.selectionStart;
var end = input.selectionEnd;
var insText = input.value.substring(start, end);
input.value = input.value.substr(0, start) + repdeb + insText + repfin + input.value.substr(end);
var pos;
if (insText.length == 0) {
pos = start + repdeb.length;
} else {
pos = start + repdeb.length + insText.length + repfin.length;
}
input.selectionStart = pos;
input.selectionEnd = pos;
}
else
{
var pos;
var re = new RegExp('^[0-9]{0,3}$');
while(!re.test(pos)) {
pos = prompt("Insertion àla position (0.." + input.value.length + "):", "0");
}
if(pos > input.value.length) {
pos = input.value.length;
}
var insText = prompt("Veuillez entrer le texte àformater:");
input.value = input.value.substr(0, pos) + repdeb + insText + repfin + input.value.substr(pos);
}
}
function bbcolor() {
var colorvalue = document.forms['shoutboxform'].elements['color'].value;
bbshout("[color="+colorvalue+"]", "[/color]");
}
function bbfont() {
var fontvalue = document.forms['shoutboxform'].elements['font'].value;
bbshout("[font="+fontvalue+"]", "[/font]");
}
function bbsize() {
var sizevalue = document.forms['shoutboxform'].elements['size'].value;
bbshout("[size="+sizevalue+"]", "[/size]");
}
function bbimg() {
var imgvalue = document.forms['shoutboxform'].elements['img'].value;
bbshout("[img="+sizevalue+"]", "[/img]");
}
function bbblink() {
var blink = document.forms['shoutboxform'].elements['blink'].value;
bbshout("[blink="+blinkvalue+"]", "[/blink");
}
function bbdf() {
var df = document.forms['shoutboxform'].elements['df'].value;
bbshout("[df="+dfvalue+"]", "[/df");
}
//-->
</script>
<script type="text/javascript">
function blink() {
var blinks = document.getElementsByTagName('blink');
for (var i = blinks.length - 1; i >= 0; i--) {
var s = blinks;
s.style.visibility = (s.style.visibility === 'visible') ? 'hidden' : 'visible';
}
window.setTimeout(blink, 1000);
}
if (document.addEventListener) document.addEventListener("DOMContentLoaded", blink, false);
else if (window.addEventListener) window.addEventListener("load", blink, false);
else if (window.attachEvent) window.attachEvent("onload", blink);
else window.onload = blink;
</script>
<script language='javascript'>
function SmileIT(smile,form,text){
document.forms[form].elements[text].value = document.forms[form].elements[text].value+" "+smile+" ";
document.forms[form].elements[text].focus();
}
</script>
<script language='javascript'><!--
function mySubmit() {
setTimeout('document.shbox.reset()',350);
}
function Smilies(Smilie)
{
document.shoutboxform.message.value+=Smilie+" ";
document.shoutboxform.message.focus();
}
//--></script>
<script src="https://kit.fontawesome.com/8514806850.js" crossorigin="anonymous"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<script type="text/javascript" src="scripts/ncode_imageresizer.js"></script>
<script type="text/javascript">
<!--
NcodeImageResizer.MODE = 'newwindow';
NcodeImageResizer.MAXWIDTH = 350;
NcodeImageResizer.MAXHEIGHT = 0;
NcodeImageResizer.Msg1 = 'Click for full image.';
NcodeImageResizer.Msg2 = 'This image has been resized. Click this bar to view the full image.';
NcodeImageResizer.Msg3 = 'This image has been resized. Click this bar to view the full image.';
NcodeImageResizer.Msg4 = 'Click for small image.';
//-->
</script>
<script language="Javascript" type="text/javascript">
<!--
function Reply_code(smile,form,text){
document.forms[form].elements[text].value = document.forms[form].elements[text].value+" "+smile+" ";
document.forms[form].elements[text].focus();
}
//-->
</script>
<?php
if ($site_config['SHOUTBOX'])
{
function quickbbshout()
{
echo "<table align='center' border=0 cellpadding=2 cellspacing=2><tr>";
echo "<td style='padding-top:5px' align='center'>";
echo "
<a href=\"javascript:bbshout('', '')\" class='btn btn-dark'> <i class='fa-solid fa-bold'></i> </a>
<a href=\"javascript:bbshout('[i]', '')\" class='btn btn-dark'> <i class='fa-solid fa-italic'></i></a>
<a href=\"javascript:bbshout('', '')\" class='btn btn-dark'> <i class='fa-solid fa-underline'></i></a>
<a href=\"javascript:bbshout('', '')\" class='btn btn-dark'> <i class='fa-solid fa-align-center'></i></a>
<a href=\"javascript:bbshout('[url]', '[/url]')\" class='btn btn-dark'> <i class='fa-solid fa-code'></i></a>
<a href=\"javascript:bbshout('[img]', '[/img]')\" class='btn btn-dark'> <i class='fa-solid fa-image'></i></a>
<a href=\"javascript:bbshout('[videow=', '')\" class='btn btn-dark'> <i class='fa-solid fa-video'></i></a> ";
echo "
<select name='color' class='bb_icon' onChange=\"javascript:bbcolor()\">
<option selected='selected'>".T_("COLOR")."</option>
<option value=mediumturquoise style=color:mediumturquoise>Medium-Turquoise</option>
<option value=dodgerblue style=color:dodgerblue>Dodger-Blue</option>
<option value=slateblue style=color:slateblue>Slate-Blue</option>
<option value=royalblue style=color:royalblue>Royal-Blue</option>
<option value=orange style=color:orange>Orange</option>
<option value=orangered style=color:orangered>Orange-Red</option>
<option value=crimson style=color:crimson>Crimson</option>
<option value=red style=color:red>Red</option>
<option value=indianred style=color:indianred>Indian-Red</option>
<option value=firebrick style=color:firebrick>Fire-Brick</option>
<option value=green style=color:green>Green</option>
<option value=limegreen style=color:limegreen>Lime-Green</option>
<option value=seagreen style=color:seagreen>Sea-Green</option>
<option value=hotpink style=color:hotpink>Hotpink</option>
<option value=tomato style=color:tomato>Tomato</option>
<option value=coral style=color:coral>Coral</option>
<option value=mediumorchid style=color:mediumorchid>Medium-Orchid</option>
<option value=magenta style=color:magenta>Magenta</option>
<option value=burlywood style=color:burlywood>Burlywood</option>
<option value=sandybrown style=color:sandybrown>Sandy-Brown</option>
<option value=sienna style=color:sienna>Sienna</option>
<option value=goldenrod style=color:goldenrod>Golden-Rod</option>
<option value=teal style=color:teal>Teal</option>
<option value=silver style=color:silver>Silver</option>
</select>";
echo "
<select name='font' class='bb_icon' onChange=\"javascript:bbfont()\">
<option selected='selected'>Font</option>
<option value='Arial'>Arial</option>
<option value='Arial Black'>Arial Black</option>
<option value='Comic Sans MS'>Comic Sans MS</option>
<option value='Courier New'>Courier New</option>
<option value='Franklin Gothic Medium'>Franklin Gothic Medium</option>
<option value='Georgia'>Georgia</option>
<option value='Helvetica'>Helvetica</option>
<option value='Impact'>Impact</option>
<option value='Lucida Console'>Lucida Console</option>
<option value='Lucida Sans Unicode'>Lucida Sans Unicode</option>
<option value='Microsoft Sans Serif'>Microsoft Sans Serif</option>
<option value='Palatino Linotype'>Palatino Linotype</option>
<option value='Tahoma' style='font-family: Tahoma;'>Tahoma</option>
<option value='Times New Roman'>Times New Roman</option>
<option value='Trebuchet MS'>Trebuchet MS</option>
<option value='Verdana'>Verdana</option>
<option value='Symbol'>Symbol</option>
</select>";
echo "
<select name='size' class='bb_icon' onChange=\"javascript:bbsize()\">
<option selected='selected'>".T_("SIZE")."</option>
<option value=1>1</option>
<option value=2>2</option>
<option value=3>3</option>
<option value=4>4</option>
<option value=5>5</option>
<option value=6>6</option>
<option value=7>7</option>
</select>";
echo "</td></tr><tr><td align='center'>";
echo "
<a href=\"javascript: SmileIT(':-)','shoutboxform','message')\"><img border=0 src=images/smilies/smile.gif></a>
<a href=\"javascript: SmileIT(':-D','shoutboxform','message')\"><img border=0 src=images/smilies/grin.gif></a>
<a href=\"javascript: SmileIT(':lol:','shoutboxform','message')\"><img border=0 src=images/smilies/lol.gif></a>
<a href=\"javascript: SmileIT(':rofl:','shoutboxform','message')\"><img border=0 src=images/smilies/rofl.gif></a>
<a href=\"javascript: SmileIT(':-S','shoutboxform','message')\"><img border=0 src=images/smilies/sarcastic.gif></a>
<a href=\"javascript: SmileIT(':w00t:','shoutboxform','message')\"><img border=0 src=images/smilies/w00t.gif></a>
<a href=\"javascript: SmileIT(':-/','shoutboxform','message')\"><img border=0 src=images/smilies/confused.gif></a>
<a href=\"javascript: SmileIT(':-|','shoutboxform','message')\"><img border=0 src=images/smilies/noexpression.gif></a>
<a href=\"javascript: SmileIT(':-(','shoutboxform','message')\"><img border=0 src=images/smilies/sad.gif></a>
<a href=\"javascript: SmileIT(':cry:','shoutboxform','message')\"><img border=0 src=images/smilies/cry.gif></a>
<a href=\"javascript: SmileIT(':-P','shoutboxform','message')\"><img border=0 src=images/smilies/ras.gif></a>
<a href=\"javascript: SmileIT(':pardon:','shoutboxform','message')\"><img border=0 src=images/smilies/pardon.gif></a>
<a href=\"javascript: SmileIT(':-8)','shoutboxform','message')\"><img border=0 src=images/smilies/cool.gif></a>
<a href=\"javascript: SmileIT(':wave:','shoutboxform','message')\"><img border=0 src=images/smilies/wave.gif></a>
<a href=\"javascript: SmileIT(':ok:','shoutboxform','message')\"><img border=0 src=images/smilies/ok.gif></a>
<a href=\"javascript: SmileIT(':hmm:','shoutboxform','message')\"><img border=0 src=images/smilies/hmm.gif></a>";
echo "</td></tr></table>";
}
//ROOMS
$room = ($_REQUEST['room']) ? (int) $_REQUEST['room'] : 0;
function therooms()
{
if ( get_user_class() == 4 )
{
$data = '<select name="room" class="bb_icon" onchange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }">
<option value="shoutbox.php?room=0" ' . ($GLOBALS['room'] == 0 ? 'selected="selected"' : null) . '>'.T_("PUBLIC").'</option>
<option value="shoutbox.php?room=1" ' . ($GLOBALS['room'] == 1 ? 'selected="selected"' : null) . '>'.T_("VIP_CLASS").'</option>
</select>';
}
elseif ( get_user_class() == 5 )
{
$data = '<select name="room" class="bb_icon" onchange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }">
<option value="shoutbox.php?room=0" ' . ($GLOBALS['room'] == 0 ? 'selected="selected"' : null) . '>'.T_("PUBLIC").'</option>
<option value="shoutbox.php?room=2" ' . ($GLOBALS['room'] == 2 ? 'selected="selected"' : null) . '>'.T_("UPLOADER_CLASS").'</option>
</select>';
}
elseif ( get_user_class() >= 6 )
{
$data = '<select name="room" class="bb_icon" onchange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }">
<option value="shoutbox.php?room=0" ' . ($GLOBALS['room'] == 0 ? 'selected="selected"' : null) . '>'.T_("PUBLIC").'</option>
<option value="shoutbox.php?room=1" ' . ($GLOBALS['room'] == 1 ? 'selected="selected"' : null) . '>'.T_("VIP_CLASS").'</option>
<option value="shoutbox.php?room=2" ' . ($GLOBALS['room'] == 2 ? 'selected="selected"' : null) . '>'.T_("UPLOADER_CLASS").'</option>
</select>';
}
else
{
$data = '<select name="room" class="bb_icon" onchange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }">
<option value="shoutbox.php?room=0" ' . ($GLOBALS['room'] == 0 ? 'selected="selected"' : null) . '>'.T_("PUBLIC").'</option>
</select>';
}
return $data;
}
function theroomsh()
{
if ( get_user_class() == 4 )
{
$data = '<select name="room" class="bb_icon" onchange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }">
<option value="shoutbox.php?history=0&room=0" ' . ($GLOBALS['room'] == 0 ? 'selected="selected"' : null) . '>'.T_("PUBLIC").'</option>
<option value="shoutbox.php?history=0&room=1" ' . ($GLOBALS['room'] == 1 ? 'selected="selected"' : null) . '>'.T_("VIP_CLASS").'</option>
</select>';
}
elseif ( get_user_class() == 5 )
{
$data = '<select name="room" class="bb_icon" onchange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }">
<option value="shoutbox.php?history=0&room=0" ' . ($GLOBALS['room'] == 0 ? 'selected="selected"' : null) . '>'.T_("PUBLIC").'</option>
<option value="shoutbox.php?history=1&room=2" ' . ($GLOBALS['room'] == 2 ? 'selected="selected"' : null) . '>'.T_("UPLOADER_CLASS").'</option>
</select>';
}
elseif ( get_user_class() >= 6 )
{
$data = '<select name="room" class="bb_icon" onchange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }">
<option value="shoutbox.php?history=0&room=0" ' . ($GLOBALS['room'] == 0 ? 'selected="selected"' : null) . '>'.T_("PUBLIC").'</option>
<option value="shoutbox.php?history=0&room=1" ' . ($GLOBALS['room'] == 1 ? 'selected="selected"' : null) . '>'.T_("VIP_CLASS").'</option>
<option value="shoutbox.php?history=1&room=2" ' . ($GLOBALS['room'] == 2 ? 'selected="selected"' : null) . '>'.T_("UPLOADER_CLASS").'</option>
</select>';
}
else
{
$data = '<select name="room" class="bb_icon" onchange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }">
<option value="shoutbox.php?history=0&room=0" ' . ($GLOBALS['room'] == 0 ? 'selected="selected"' : null) . '>'.T_("PUBLIC").'</option>
</select>';
}
return $data;
}
//EDIT MESSAGE
function linkit($al_url, $al_msg) // create autolink
{
echo "\n<meta http-equiv=\"refresh\" content=\"3; url=$al_url\">\n";
echo "<center>\n";
echo "<b>$al_msg</b>\n";
echo "\n<b>Redirection ...</b>\n";
echo "\n[ <a href='$al_url'>lien</a> ]\n";
echo "</td>\n</tr>\n</table>\n</td>\n</tr>\n</table>\n</body>\n</html>\n";
echo "</center>\n";
exit;
}
//DELETE MESSAGES
if (isset($_GET['del']))
{
if (is_numeric($_GET['del']))
{
$query = "SELECT * FROM shoutbox WHERE msgid=" . $_GET['del'];
$result = SQL_Query_exec($query);
} else {
echo "invalid msg id STOP TRYING TO INJECT SQL";
exit;
}
$row = mysqli_fetch_row($result);
if ($row && ($CURUSER["edit_users"] == "yes" || $CURUSER['username'] == $row[1])) {
$query = "DELETE FROM shoutbox WHERE msgid=" . $_GET['del'];
SQL_Query_exec($query);
}
}
//INSERT MESSAGE
if (!empty($_POST['message']) && $CURUSER) {
$_POST['message'] = sqlesc($_POST['message']);
$query = "SELECT COUNT(*) FROM shoutbox WHERE message=" . $_POST['message'] . " AND user='" . $CURUSER['username'] . "' AND UNIX_TIMESTAMP('" . get_date_time() . "')-UNIX_TIMESTAMP(date) < 30";
$result = SQL_Query_exec($query);
$row = mysqli_fetch_row($result);
if ($row[0] == '0') {
$query = "INSERT INTO shoutbox (msgid, user, message, date, userid, room) VALUES (NULL, '" . $CURUSER['username'] . "', " . $_POST['message'] . ", '" . get_date_time() . "', '" . $CURUSER['id'] . "', '" . (int) $_POST['room'] . "')";
SQL_Query_exec($query);
//member of the month
if ($site_config['MOTM'])
{
$motm_value = 1;
motmadd($CURUSER["id"],$motm_value,$CURUSER['class'],$site_config['maxmotm']);
}
}
}
//GET CURRENT USERS THEME AND LANGUAGE
if ($CURUSER) {
$ss_a = @mysqli_fetch_assoc(@SQL_Query_exec("select uri from stylesheets where id=" . $CURUSER["stylesheet"]));
if ($ss_a)
$THEME = $ss_a["uri"];
} else { //not logged in so get default theme/language
$ss_a = mysqli_fetch_assoc(SQL_Query_exec("select uri from stylesheets where id='" . $site_config['default_theme'] . "'"));
if ($ss_a)
$THEME = $ss_a["uri"];
}
//===| Alert if exists messages in others rooms
$viproom = 'SELECT message FROM shoutbox WHERE room = "1"';
$vipresult = SQL_Query_exec($viproom);
$row = mysqli_fetch_row($vipresult);
if ($row[0] != "") {
$vipmessages = "<font style='background-color:#A70000; color:#E7E7E7'> ".T_("MESSAGES_IN_VIP_SECTION")." </font> ";
} else { $vipmessages = ""; }
$uproom = 'SELECT message FROM shoutbox WHERE room = "2"';
$upresult = SQL_Query_exec($uproom);
$row = mysqli_fetch_row($upresult);
if ($row[0] != "") {
$upmessages = "<font style='background-color:#A70000; color:#E7E7E7'> ".T_("MESSAGES_IN_UPLOADER_SECTION")." </font> ";
} else { $upmessages = ""; }
if (get_user_class() >= 6) { $messages = "".$vipmessages."".$upmessages.""; }
elseif (get_user_class() == 4) { $messages = "".$vipmessages.""; }
elseif (get_user_class() == 5) { $messages = "".$upmessages.""; }
else $messages = "";
//===| End
if (!isset($_GET['history']))
{
?>
<html>
<head>
<title><?php
echo $site_config['SITENAME'] . T_("SHOUTBOX");
?></title>
<?php
/* If you do change the refresh interval, you should also change index.php printf(T_("SHOUTBOX_REFRESH"), 5) the 5 is in minutes */
?>
<meta http-equiv="refresh" content="300" />
<link rel="stylesheet" type="text/css" href="<?php echo $site_config['SITEURL'];?>/themes/<?php echo $THEME;?>/theme.css" /><script type="text/javascript" src="<?php echo $site_config['SITEURL'];?>/backend/java_klappe.js"></script>
</head>
<body class="shoutbox_body">
<?php
echo '<div class="shoutbox_contain"><table border="0" style="width: 100%; table-layout:fixed">';
//rooms
if (get_user_class() >= 4) {
echo '<tr><td><table width="100%"><tr>';
echo '<td align="left">'.$messages.'</td>';
echo '<td align="right"><b>'.T_("SHOUTBOX_FOR").'</b>: ';
echo therooms();
echo '</td>';
echo '</tr></table></td></tr>';
}
//rooms
}
else
{
if ($site_config["MEMBERSONLY"]) {
loggedinonly();
}
stdhead();
begin_frame(T_("SHOUTBOX_HISTORY"));
//rooms
if (get_user_class() >= 4) {
echo '<table width="100%"><tr>';
echo '<td align="left">'.$messages.'</td>';
echo '<td align="right"><b>'.T_("SHOUTBOX_FOR").'</b>:';
echo theroomsh();
echo '</td>';
echo '</tr></table><br />';
}
//rooms
echo '<div class="shoutbox_history">';
$query = 'SELECT COUNT(*) FROM shoutbox WHERE room = ".$room."';
$result = SQL_Query_exec($query);
$row = mysqli_fetch_row($result);
$pages = round($row[0] / 100) + 1;
$i = 1;
echo '<div align="center">';
while ($pages > 0 && $row["room"] == $room) {
echo "<a href='" . $site_config['SITEURL'] . "/shoutbox.php?history=1&room=" . $room . "&page=" . $i . "'>[" . $i . "]</a> ";
$i++;
$pages--;
}
echo '</div><br /><table border="0" style="width: 99%; table-layout:fixed">';
}
if (isset($_GET['history'])) {
if (isset($_GET['page'])) {
if ($_GET['page'] > '1') {
$lowerlimit = $_GET['page'] * 100 - 100;
$upperlimit = $_GET['page'] * 100;
} else {
$lowerlimit = 0;
$upperlimit = 100;
}
} else {
$lowerlimit = 0;
$upperlimit = 100;
}
$query = 'SELECT s.* FROM shoutbox s INNER JOIN users u ON u.id = s.userid AND s.room = ' . $room . ' ORDER BY s.msgid DESC LIMIT ' . $lowerlimit . ',' . $upperlimit;
} else {
$query = 'SELECT s.* FROM shoutbox s INNER JOIN users u ON u.id = s.userid AND s.room = ' . $room . ' ORDER BY s.msgid DESC LIMIT 50';
}
$result = SQL_Query_exec($query);
$alt = false;
while ($row = mysqli_fetch_assoc($result))
{
if ($alt) {
echo '<tr class="shoutbox_noalt">';
$alt = false;
}
else
{
echo '<tr class="shoutbox_alt">';
$alt = true;
}
$date = "<font style='font: 12px Tahoma' color='4dff55'>".date('<\\b>d M</\\b>. H:i', utc_to_tz_time($row['date']))."</font> •";
$reply = "<a href=javascript:Reply_code('• ".$row['user'].",','shoutboxform','message')><img src ='".$site_config['SITEURL']."/images/blue reply.png' height='12' border='0' title='".T_("REPLY")."'></a>";
if ($CURUSER["edit_users"] == "yes")
{
$edit = " <a href='".$site_config['SITEURL']."/shoutedit.php?action=edit&msgid=".$row['msgid']."'><img src ='".$site_config['SITEURL']."/images/edit.png' height='12' border='0' title='".T_("EDIT")."'></a>";
}
else
{
$edit = "";
}
if ($CURUSER["edit_users"] == "yes")
{
$delete = " <a href='".$site_config['SITEURL']."/shoutbox.php?del=".$row['msgid']."'><img src ='".$site_config['SITEURL']."/images/delete.png' height='12' border='0' title='".T_("DELETE")."'></a> ";
}
else
{
$delete = "";
}
if ($row['user'] == "System")
{
$name = '<font color='.$site_config['system_color'].'><b>System</b></font> ';
}
else
{
$name = '<a href="'.$site_config['SITEURL'].'/account-details.php?id='.$row['userid'].'" target="_parent"><b>'.class_user($row['user']).'</b></a> ';
}
echo '<tr><td style="font-size:12px">'.$date.' '.$name.' '.$edit.' '.$delete.''.$reply.' '.nl2br(format_comment($row['message']));
echo '</td></tr>';
}
?>
</table>
</div>
<?php
//if the user is logged in, show the shoutbox, if not, dont.
if (!isset($_GET['history'])) {
if (isset($_COOKIE["pass"])) {
echo "<form name='shoutboxform' action='shoutbox.php' method='post'>";
echo "<center><table width='100%' border='0' cellpadding='1' cellspacing='1'>";
echo "<tr class='shoutbox_messageboxback'>";
echo "<td width='75%' align='center'>";
echo "<input type='text' name='message' class='shoutbox_msgbox' />";
echo "</td>";
echo "<td>";
echo "<input type='submit' name='submit' value='".T_("SHOUT")."' class='shoutbox_shoutbtn' />";
echo "</td>";
echo "<td>";
echo '<a href="javascript:PopMoreSmiles(\'shoutboxform\', \'message\');" class="btn btn-dark"> <i class="fa-solid fa-face-smile-wink" style="color:white"></i> </a>';
echo ' <small>-</small> <a href="javascript:PopMoreTags();" class="btn btn-dark"><i class="fa-solid fa-hashtag" style="color:white"></i></a>';
echo "<br />";
echo "<a href='shoutbox.php' class='btn btn-dark'><i class='fa-solid fa-rotate' style='color:white'></i></a>";
echo " <small>-</small> <a href='".$site_config['SITEURL']."/shoutbox.php?history=1' target='_blank' class='btn btn-dark'><i class='fa-solid fa-clock-rotate-left' style='color:white'></i></a>";
echo "</td>";
echo "</tr>";
echo "</table></center>";
echo quickbbshout();
echo "</form>";
} else {
echo "<br /><div class='shoutbox_error'>" . T_("SHOUTBOX_MUST_LOGIN") . "</div>";
}
}
if (!isset($_GET['history'])) {
echo "</body></html>";
} else {
end_frame();
stdfoot();
}
} //END IF $SHOUTBOX
else {
echo T_("SHOUTBOX_DISABLED");
}
?>
$thisdomain = preg_replace('/^www\./is', "", $thishost);
//New user shoutbox
$query = "INSERT INTO `shoutbox` (`msgid`, `user`, `message`, `date`, `userid`) VALUES (null, 'RegOp' ,'" .T_("WELCOME_TO_OUR_NEWEST_USER").": ".$wantusername." ', '".get_date_time()."', '0')";
SQL_Query_exec($query);
//End new user shoutbox
$LANG["WELCOME_TO_OUR_NEWEST_USER"] = "Welcome to our newest memmber";
<?php
#================================#
# TorrentTrader 3 #
# http://www.torrenttrader.org #
#--------------------------------#
# Modified by djlive #
#================================#
require_once("backend/functions.php");
dbconn();
//check permissions
if ($site_config["MEMBERSONLY"]){
loggedinonly();
if($CURUSER["view_torrents"]=="no")
show_error_msg(T_("ERROR"), T_("NO_TORRENT_VIEW"), 1);
}
function sqlwildcardesc($x){
return str_replace(array("%","_"), array("\\%","\\_"), mysqli_real_escape_string($GLOBALS["DBconnector"],$x));
}
//Register searched words
$searched_at = sqlesc(get_date_time());
$text = sqlesc($_GET["search"]);
if ($_GET["search"]) { SQL_Query_exec("INSERT INTO searched_words (searched_at, searched_by, text) VALUES($searched_at, $CURUSER[id], $text)"); }
//GET SEARCH STRING
$searchstr = trim($_GET["search"]);
$cleansearchstr = searchfield($searchstr);
if (empty($cleansearchstr))
unset($cleansearchstr);
$thisurl = "torrents-search-5.php?";
$addparam = "";
$wherea = array();
$wherecatina = array();
$wherea[] = "banned = 'no'";
$wherecatina = array();
$wherecatin = "";
$res = SQL_Query_exec("SELECT id FROM categories");
while($row = mysqli_fetch_assoc($res)){
if ($_GET["c$row[id]"]) {
$wherecatina[] = $row[id];
$addparam .= "c$row[id]=1&";
$addparam .= "c$row[id]=1&";
$thisurl .= "c$row[id]=1&";
}
$wherecatin = implode(", ", $wherecatina);
}
if ($wherecatin)
$wherea[] = "category IN ($wherecatin)";
//include dead
if ($_GET["incldead"] == 1) {
$addparam .= "incldead=1&";
$thisurl .= "incldead=1&";
}else
if ($_GET["incldead"] == 2){
$wherea[] = "visible = 'no'";
$addparam .= "incldead=2&";
$thisurl .= "incldead=2&";
}else
$wherea[] = "visible = 'yes'";
// Include freeleech
if ($_GET["freeleech"] == 1) {
$addparam .= "freeleech=1&";
$thisurl .= "freeleech=1&";
$wherea[] = "freeleech = '0'";
} else
if ($_GET["freeleech"] == 2) {
$addparam .= "freeleech=2&";
$thisurl .= "freeleech=2&";
$wherea[] = "freeleech = '1'";
}
//include external
if ($_GET["inclexternal"] == 1) {
$addparam .= "inclexternal=1&";
$wherea[] = "external = 'no'";
}
if ($_GET["inclexternal"] == 2) {
$addparam .= "inclexternal=2&";
$wherea[] = "external = 'yes'";
}
//include sticky
if ($_GET["sticky"] == 1) {
$addparam .= "sticky=1&";
$thisurl .= "sticky=1&";
$wherea[] = "sticky = 'no'";
} elseif ($_GET["sticky"] == 2) {
$addparam .= "sticky=2&";
$thisurl .= "sticky=2&";
$wherea[] = "sticky = 'yes'";
}
//cat
if ($_GET["cat"]) {
$wherea[] = "category = " . sqlesc($_GET["cat"]);
$wherecatina[] = sqlesc($_GET["cat"]);
$addparam .= "cat=" . urlencode($_GET["cat"]) . "&";
$thisurl .= "cat=".urlencode($_GET["cat"])."&";
}
//language
if ($_GET["lang"]) {
$wherea[] = "torrentlang = " . sqlesc($_GET["lang"]);
$addparam .= "lang=" . urlencode($_GET["lang"]) . "&";
$thisurl .= "lang=".urlencode($_GET["lang"])."&";
}
//parent cat
if ($_GET["parent_cat"]) {
$addparam .= "parent_cat=" . urlencode($_GET["parent_cat"]) . "&";
$thisurl .= "parent_cat=".urlencode($_GET["parent_cat"])."&";
}
$parent_cat = $_GET["parent_cat"];
$wherebase = $wherea;
////////////////////////////////MOD HIDE PORNO/////////////////////////////////////
$wherea[] = "category != '65'";
///////////////////////////////////////////////////////////////////////////////////
//===| Start Get Search
if ($_GET["incldesc"] == 0)
{
if (isset($cleansearchstr))
{
//$wherea[] = "MATCH (torrents.name, torrents.descr) AGAINST ('".mysql_real_escape_string($searchstr)."' IN BOOLEAN MODE)";
$wherea[] = "MATCH (torrents.name) AGAINST ('".mysqli_real_escape_string($GLOBALS["DBconnector"],$searchstr)."' IN BOOLEAN MODE)";
$addparam .= "search=" . urlencode($searchstr)."&";
$thisurl .= "search=".urlencode($searchstr)."&";
}
}
if ($_GET["incldesc"] == 1)
{
if (isset($cleansearchstr))
{
//$wherea[] = "MATCH (torrents.name) AGAINST ('".mysql_real_escape_string($searchstr)."' IN BOOLEAN MODE)";
$wherea[] = "MATCH (torrents.name, torrents.descr) AGAINST ('".mysqli_real_escape_string($GLOBALS["DBconnector"],$searchstr)."' IN BOOLEAN MODE)";
$addparam .= "search=" . urlencode($searchstr)."&";
$thisurl .= "search=".urlencode($searchstr)."&";
}
}
if ($_GET["incldesc"] == 2)
{
if (isset($cleansearchstr))
{
//$wherea[] = "MATCH (torrents.descr) AGAINST ('".mysql_real_escape_string($searchstr)."' IN BOOLEAN MODE)";
$wherea[] = "MATCH (torrents.descr) AGAINST ('".mysqli_real_escape_string($GLOBALS["DBconnector"],$searchstr)."' IN BOOLEAN MODE)";
$addparam .= "search=" . urlencode($searchstr)."&";
$thisurl .= "search=".urlencode($searchstr)."&";
}
}
/*if ($_GET["incldesc"] == 3)
{
if (isset($cleansearchstr))
{
//$wherea[] = "MATCH (torrents.genre) AGAINST ('".mysql_real_escape_string($searchstr)."' IN BOOLEAN MODE)";
$wherea[] = "MATCH (torrents.descr) AGAINST ('".mysqli_real_escape_string($GLOBALS["DBconnector"],$searchstr)."' IN BOOLEAN MODE)";
$addparam .= "search=" . urlencode($searchstr)."&";
$thisurl .= "search=".urlencode($searchstr)."&";
}
}
if ($_GET["incldesc"] == 4)
{
if (isset($cleansearchstr))
{
//$wherea[] = "MATCH (torrents.genre) AGAINST ('".mysql_real_escape_string($searchstr)."' IN BOOLEAN MODE)";
$wherea[] = "MATCH (torrents.imdb) AGAINST ('".mysqli_real_escape_string($GLOBALS["DBconnector"],$searchstr)."' IN BOOLEAN MODE)";
$addparam .= "search=" . urlencode($searchstr)."&";
$thisurl .= "search=".urlencode($searchstr)."&";
}
}*/
//===| End Get Search
// Order by
if ($_GET['sort'] && $_GET['order']) {
$column = '';
$ascdesc = '';
switch($_GET['sort']) {
case 'id': $column = "id"; break;
case 'name': $column = "name"; break;
case 'description': $column = "descr"; break;
case 'comments': $column = "comments"; break;
case 'size': $column = "size"; break;
case 'times_completed': $column = "times_completed"; break;
case 'seeders': $column = "seeders"; break;
case 'leechers': $column = "leechers"; break;
case 'category': $column = "category"; break;
default: $column = "id"; break;
}
switch($_GET['order']) {
case 'asc': $ascdesc = "ASC"; break;
case 'desc': $ascdesc = "DESC"; break;
default: $ascdesc = "DESC"; break;
}
} else {
$_GET["sort"] = "id";
$_GET["order"] = "desc";
$column = "id";
$ascdesc = "DESC";
}
$orderby = "ORDER BY sticky ASC, torrents." . $column . " " . $ascdesc;
$pagerlink = "sort=" . $_GET['sort'] . "&order=" . $_GET['order'] . "&";
if (is_valid_id($_GET["page"]))
$thisurl .= "page=$_GET[page]&";
$where = implode(" AND ", $wherea);
if ($where != "")
$where = "WHERE $where";
$parent_check = "";
if ($parent_cat){
$parent_check = " AND categories.parent_cat=".sqlesc($parent_cat);
}
// GET NUMBER FOUND FOR PAGER
$res = SQL_Query_exec("SELECT COUNT(*) FROM torrents $where $parent_check");
$row = mysqli_fetch_array($res);
$count = $row[0];
if (!$count && isset($cleansearchstr)) {
$wherea = $wherebase;
$searcha = explode(" ", $cleansearchstr);
$sc = 0;
foreach ($searcha as $searchss) {
if (strlen($searchss) <= 1)
continue;
$sc++;
if ($sc > 5)
break;
$ssa = array();
foreach (array("torrents.name", "torrents.descr") as $sss)
$ssa[] = "$sss LIKE '%" . sqlwildcardesc($searchss) . "%'";
$wherea[] = "(" . implode(" OR ", $ssa) . ")";
}
if ($sc) {
$where = implode(" AND ", $wherea);
if ($where != "")
$where = "WHERE $where";
$res = SQL_Query_exec("SELECT COUNT(*) FROM torrents $where $parent_check");
$row = mysqli_fetch_array($res);
$count = $row[0];
}
}
// Sort by
if ($addparam != "") {
if ($pagerlink != "") {
if ($addparam{strlen($addparam)-1} != ";") { // & = &
$addparam = $addparam . "&" . $pagerlink;
} else {
$addparam = $addparam . $pagerlink;
}
}
} else {
$addparam = $pagerlink;
}
if ($count) {
// SEARCH QUERIES!
list($pagertop, $pagerbottom, $limit) = pager(50, $count, "torrents-search-5.php?" . $addparam);
if ($CURUSER["language"] == 2) {
$query = "SELECT torrents.id, torrents.anon, torrents.announce, torrents.sticky, torrents.descr, torrents.webseed, torrents.recommended, torrents.imdb, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.external, torrents.freeleech, categories.name AS cat_name, categories.parent_cat AS cat_parent, categories.image AS cat_pic, users.username, users.privacy, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id $where $parent_check $orderby $limit";
}
else{
$query = "SELECT torrents.id, torrents.anon, torrents.announce, torrents.sticky, torrents.descr, torrents.webseed, torrents.recommended, torrents.imdb, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.external, torrents.freeleech, categories.name AS cat_name, categories.parent_cat AS cat_parent, categories.image AS cat_pic, users.username, users.privacy, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id $where $parent_check $orderby $limit";
}
$res = SQL_Query_exec($query);
}else{
unset($res);
}
if (isset($cleansearchstr))
stdhead(T_("SEARCH_RESULTS_FOR")." \"" . htmlspecialchars($searchstr) . "\"");
else
stdhead(T_("BROWSE_TORRENTS"));
//===== Start Banners Mod ====================================================================== BigMax =====//
if ($site_config['TORRENTS_BANNERS']){
begin_frame(T_("ADVERTISING"));
/*/--| Fixed Banners
?>
<table class="table_table" align="center" border="0" cellspacing="0" cellpadding="5"><?
print("<td align=center>");
$query = "SELECT * FROM banners_t WHERE 1=1";
$sql = SQL_Query_exec($query);
while ($row = mysql_fetch_array($sql)) {
$link = $row['link'];
$banner = $row['banner'];
print("<div style='margin-top:5px; margin-bottom:5px' align='center'><a href='$link' target='_blank'><img alt='' border='0' src='$banner'></a></div>");
}
print("</tr></table>"); //*/
//--| Dinamic Banners
?>
<style type="text/css">
#marqueecontainer{
position: relative;
height: 120px; /* marquee height */
background-color: transparent;
overflow: hidden;
padding: 4px;
}
</style>
<script type="text/javascript">
var delayb4scroll=1000 //--| Specify initial delay before marquee starts to scroll on page (1000 = 1 sec.)
var marqueespeed=1 //--| Specify marquee scroll speed (larger is faster 1-10)
var pauseit=1 //--| Pause marquee onMousever (0 = no | 1 = yes)
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var actualheight=''
function scrollmarquee(){
if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8))
cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
else
cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
}
function initializemarquee(){
cross_marquee=document.getElementById("vmarquee")
cross_marquee.style.top=0
marqueeheight=document.getElementById("marqueecontainer").offsetHeight
actualheight=cross_marquee.offsetHeight
if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){
cross_marquee.style.height=marqueeheight+"px"
cross_marquee.style.overflow="scroll"
return
}
setTimeout('lefttime=setInterval("scrollmarquee()",30)', delayb4scroll)
}
if (window.addEventListener)
window.addEventListener("load", initializemarquee, false)
else if (window.attachEvent)
window.attachEvent("onload", initializemarquee)
else if (document.getElementById)
window.onload=initializemarquee
</script>
<div id="marqueecontainer" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">
<div id="vmarquee" style="position: absolute; width: 100%;">
<?php
print("<table align=center cellpadding=0 cellspacing=0 width=100% border=0>");
$query = "SELECT * FROM banners_t WHERE 1=1";
$sql = SQL_Query_exec($query);
while ($row = mysqli_fetch_array($sql)) {
$link = $row['link'];
$banner = $row['banner'];
print("<div style='margin-top:5px; margin-bottom:5px' align='center'><a href='$link' target='_blank'><img alt='' border='0' src='$banner'></a></div>");
}
print("</table>");
?>
</div>
</div>
<?php
end_frame();
}
//===== End Banners Mod ======================================================================== BigMax =====//
/* begin_frame("".T_("BONUS_POINTS_FOR_SEEDING")."");
?>
<div style="margin-top:10px; margin-bottom:10px" align="center">
<font size="2" color="FF2400">
<?php echo T_("FOR_EACH_TORRENT_YOU_RECEIVE"); ?> <b><?php echo $site_config['bonuspertime']; ?></b>
<?php echo T_("POINTS_AT_EVERY"); ?> <b><?php echo floor($site_config['autoclean_interval'] / 60); ?></b>
<?php echo T_("MINUTES"); ?>.
</font>
</div>
<?php
end_frame();
*/
begin_frame(T_("SEARCH_TORRENTS"));
?>
<center>
<form method="get" action="torrents-search-5.php">
<div style="margin-bottom:20px"><table border="0" align="center"><tr align="right">
<?php
$i = 0;
if ($CURUSER["language"] == 2) {
$cats = SQL_Query_exec("SELECT * FROM categories ORDER BY sort_index ASC");
}
else{
$cats = SQL_Query_exec("SELECT * FROM categories ORDER BY sort_index ASC");
}
while ($cat = mysqli_fetch_assoc($cats)) {
$catsperrow = 6;
print(($i && $i % $catsperrow == 0) ? "</tr><tr align='right'>" : "");
print("<td style=\"padding-bottom: 5px;padding-left: 5px;padding-right: 5px\"><a href='torrents-search-5.php?cat={$cat["id"]}'><font color='#26c4ec'><b>".htmlspecialchars($cat["parent_cat"])."</b></font> " . htmlspecialchars($cat["name"]) . "</a> <input name='c{$cat["id"]}' type=\"checkbox\" " . (in_array($cat["id"], $wherecatina) || $_GET["cat"] == $cat["id"] ? "checked='checked' " : "") . "value='1' /></td>\n");
$i++;
}
echo "</tr></table></div>";
if ($parent_cat){
echo "<br /><br /><b>".T_("YOU_ARE_IN")."</b>: <a href='torrents-search-5.php?parent_cat=$parent_cat'>$parent_cat</a><br /><b>".T_("SUBCATEGORIES")."</b>: ";
if ($CURUSER["language"] == 2) {
$subcatsquery = SQL_Query_exec("SELECT id, name, tmdb, imdb, parent_cat FROM categories WHERE parent_cat='$parent_cat' ORDER BY sort_index ASC");
} else {
$subcatsquery = SQL_Query_exec("SELECT id, name, tmdb, imdb, parent_cat FROM categories WHERE parent_cat='$parent_cat' ORDER BY sort_index ASC");
}
while($subcatsrow = mysqli_fetch_assoc($subcatsquery)){
$name = $subcatsrow['name'];
echo " - <a href='torrents-search-5.php?cat=$subcatsrow[id]'>$name</a>";
}
}
?>
<table class="f-border f-title" cellpadding="5" align="center">
<tr>
<td>
<table align="center">
<tr>
<td align="left">
<div style="margin-top:5px; margin-bottom:5px">
<?php print("<b>".T_("SEARCH")."</b>"); ?>
<?php if ($site_config["ALLOWEXTERNAL"]) { ?>
<?php if ($CURUSER["language"] == 2) {?>
<input type="text" name="search" placeholder="Cauta dupa nume, gen, imdb sau tmdb" class="btnSearch" value="<?php echo stripslashes(htmlspecialchars($searchstr)) ?>" style="width: 300px;" />
<?php } else { ?>
<input type="text" name="search" placeholder="Search by name, genre, imdb or tmdb" class="btnSearch" value="<?php echo stripslashes(htmlspecialchars($searchstr)) ?>" style="width: 300px;"/>
<?php } ?>
<?php } else { ?>
<input type="text" name="search" placeholder="Search by name, genre, imdb or tmdb" class="btnSearch" value="<?php echo stripslashes(htmlspecialchars($searchstr)) ?>" style="width: 300px;" />
<?php } ?>
<?php print("<b>".T_("IN")."</b>:"); ?>
</div>
</td>
</tr>
</table>
<table align="center">
<tr>
<!--<td align="left">
<select name="cat">
<option value="0"><?php echo T_("S_ALL_CATS"); ?></option>
<?php
if ($CURUSER["language"] == 2) { $cats = genrelist(); } else { $cats = genrelist(); }
$catdropdown = "";
foreach ($cats as $cat) {
$catdropdown .= "<option value=\"" . $cat["id"] . "\"";
if ($cat["id"] == $_GET["cat"])
$catdropdown .= " selected=\"selected\"";
$catdropdown .= ">" . htmlspecialchars($cat["parent_cat"]) . ": " . htmlspecialchars($cat["name"]) . "</option>\n";
}
?>
<?php echo $catdropdown ?>
</select>
</td>-->
<td align="left">
<div style="margin-top:4px; margin-bottom:4px">
<!--| Start Name/Description |-->
<select name="incldesc">
<option value="0" <?php if ($_GET["incldesc"] == 0) echo "selected='selected'"; ?>><?php echo T_("S_TOR_NAME"); ?></option>
<option value="1" <?php if ($_GET["incldesc"] == 1) echo "selected='selected'"; ?>><?php echo T_("S_NAME_DESCR"); ?></option>
<option value="2" <?php if ($_GET["incldesc"] == 2) echo "selected='selected'"; ?>><?php echo T_("S_TOR_DESCR"); ?></option>
</select>
<!--| End Name/Description |-->
</div>
</td>
<?php if ($site_config["ALLOWEXTERNAL"]) { ?>
<td align="left">
<select name="inclexternal">
<option value="0"><?php echo T_("S_LOCAL_EXT"); ?></option>
<option value="1" <?php if ($_GET["inclexternal"] == 1) echo "selected='selected'"; ?>><?php echo T_("S_LOCAL_ONLY"); ?></option>
<option value="2" <?php if ($_GET["inclexternal"] == 2) echo "selected='selected'"; ?>><?php echo T_("S_EXT_ONLY"); ?></option>
</select>
</td>
<?php } ?>
<td align="left">
<select name="incldead">
<option value="0"><?php echo T_("S_ACTIVE_TOR"); ?></option>
<option value="1" <?php if ($_GET["incldead"] == 1) echo "selected='selected'"; ?>><?php echo T_("S_INCL_DEAD"); ?></option>
<option value="2" <?php if ($_GET["incldead"] == 2) echo "selected='selected'"; ?>><?php echo T_("S_ONLY_DEAD"); ?></option>
</select>
</td>
<td align="left">
<select name="freeleech">
<option value="0"><?php echo T_("S_FREE_OR_NOT"); ?></option>
<option value="1" <?php if ($_GET["freeleech"] == 1) echo "selected='selected'"; ?>><?php echo T_("S_NOT_FREE"); ?></option>
<option value="2" <?php if ($_GET["freeleech"] == 2) echo "selected='selected'"; ?>><?php echo T_("S_ONLY_FREE"); ?></option>
</select>
</td>
<td align="left">
<select name="lang">
<option value="0" selected="selected"><?php echo T_("S_ALL_LANGUAGES"); ?></option>
<?php
// Fetch the language list from the database
$lang = langlist();
$langdropdown = "";
foreach ($lang as $language) {
$langdropdown .= "<option value=\"" . $language["id"] . "\"";
if (isset($_GET["lang"]) && $_GET["lang"] == $language["id"]) {
$langdropdown .= " selected=\"selected\"";
}
$langdropdown .= ">" . htmlspecialchars($language["name"]) . "</option>\n";
}
echo $langdropdown;
// If no language ID is provided, add the "No Language" option
if (!isset($_GET["lang"])) {
echo "<option value=\"none\">No Language</option>";
}
?>
</select>
</td>
</tr>
</table>
<table align="center">
<tr>
<td align="center">
<div style="margin-top:4px; margin-bottom:4px">
<input type="submit" class="btnSubmit2" value="<?php print ("".T_("SEARCH")." ".T_("TORRENT").""); ?>" />
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<?php print ("<div style='margin-top:5px' align='center'>".T_("SEARCH_RULES")."</div>"); ?>
</center>
<?php if($CURUSER){ ?>
<div style="margin-top:20px; margin-bottom:10px" align="center">
<table class="embeded" align="center" cellpadding="1">
<?php if ($site_config["ALLOWEXTERNAL"]) { ?>
<tr>
<td class="embeded" width="40" align="center">
</td>
<td class="embeded">
</td>
</tr>
<tr>
<td class="embeded" width="40" align="center">
</td>
<td class="embeded">
</td>
</tr>
<?php } ?>
<tr>
<td class="embeded" width="40" align="center">
</td>
<td class="embeded">
</td>
</tr>
<tr>
<td class="embeded" width="40" align="center">
</td>
<td class="embeded">
</td>
</tr>
<tr>
<td class="embeded" width="40" align="center">
</td>
<td class="embeded">
</td>
</tr>
</table>
</div>
<?php
}
if ($count) {
print ("<br />");
print($pagertop);
// New code (TorrentialStorm)
echo "<form id='sort' action=''><div align='right'>".T_("SORT_BY").": <select name='sort' onchange='window.location=\"{$thisurl}sort=\"+this.options[this.selectedIndex].value+\"&order=\"+document.forms[\"sort\"].order.options[document.forms[\"sort\"].order.selectedIndex].value'>";
echo "<option value='id'" . ($_GET["sort"] == "id" ? " selected='selected'" : "") . ">".T_("ADDED")."</option>";
echo "<option value='name'" . ($_GET["sort"] == "name" ? " selected='selected'" : "") . ">".T_("NAME")."</option>";
echo "<option value='doubleupload'" . ($_GET["sort"] == "doubleupload" ? "selected" : "") . ">Double upload</option>";
echo "<option value='comments'" . ($_GET["sort"] == "comments" ? " selected='selected'" : "") . ">".T_("COMMENTS")."</option>";
echo "<option value='size'" . ($_GET["sort"] == "size" ? " selected='selected'" : "") . ">".T_("SIZE")."</option>";
echo "<option value='times_completed'" . ($_GET["sort"] == "times_completed" ? " selected='selected'" : "") . ">".T_("COMPLETED")."</option>";
echo "<option value='seeders'" . ($_GET["sort"] == "seeders" ? " selected='selected'" : "") . ">".T_("SEEDERS")."</option>";
echo "<option value='leechers'" . ($_GET["sort"] == "leechers" ? " selected='selected'" : "") . ">".T_("LEECHERS")."</option>";
echo "</select> ";
echo "<select name='order' onchange='window.location=\"{$thisurl}order=\"+this.options[this.selectedIndex].value+\"&sort=\"+document.forms[\"sort\"].sort.options[document.forms[\"sort\"].sort.selectedIndex].value'>";
echo "<option selected='selected' value='asc'" . ($_GET["order"] == "asc" ? " selected='selected'" : "") . ">".T_("ASCEND")."</option>";
echo "<option value='desc'" . ($_GET["order"] == "desc" ? " selected='selected'" : "") . ">".T_("DESCEND")."</option>";
echo "</select>";
echo "</div>";
echo "</form>";
// End
torrenttable($res);
print($pagerbottom);
}
else
{
print("<div style='margin-top:20px; margin-bottom:10px' class='f-border' align='center'>");
print("<div style='margin-top:10px'><font size='2' color='red'><b>".T_("NOTHING_FOUND")."</b></font></div>");
print("<div style='margin-top:10px; margin-bottom:10px'><b>".T_("NO_UPLOADS")."</b></div>");
print("</div>");
//show_error_msg(T_("NOTHING_FOUND"), T_("NO_UPLOADS"), 0);
}
if ($CURUSER)
SQL_Query_exec("UPDATE users SET last_browse=".gmtime()." WHERE id=$CURUSER[id]");
end_frame();
stdfoot();
?>
$query = "SELECT torrents.id, torrents.anon, torrents.announce, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.external, torrents.freeleech, categories.name AS cat_name, categories.parent_cat AS cat_parent, categories.image AS cat_pic, users.username, users.privacy, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id $where $parent_check $orderby $limit";