<?php
require_once("backend/functions.php");
dbconn();
stdhead(T_("SPOTLIGHT"));
begin_frame(T_("THE_GALLERY"));
?>
<h1 itemprop="name">
<i class="material-icons">star</i> Spotlight
</h1>
<script type="text/javascript">
$(document).ready(function() {
$("#cd-name").keyup(function() {
var a = $(this).val().trim();
if ("" != a) {
$("#uname_response").show();
$.ajax({
url: "https://WEBSITE.com/ajax_gallery.php",
type: "post",
data: {
username: a
},
success: function(a) {
$("#uname_response").html(a);
$(".comments").hide();
}
});
} else $("#uname_response").hide();
$(".comments").show();
});
});
</script>
<div style="padding-left:40px">
<form class="cd-form floating-labels">
<fieldset>
<div class="icon">
<label class="cd-label" for="cd-name">History (beta)</label>
<input class="user" type="text" name="username" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" id="cd-name" placeholder="Search Spotlight History">
</div>
</fieldset>
</form>
</div>
<!-- AJAX Search/Response -->
<center>
<div id="uname_response"></div>
</center>
<br />
<br />
<!-- Spotlight Section -->
<div class="card-action ng-scope" ng-if="item.comment_count">
<!-- interactionCount -->
<span itemprop="interactionCount" class="comments">
<h1 itemprop="name" style="text-align:center;padding-bottom:23px">
Last 50
</h1>
<center>
<?
$total_covers = 50;
$query = "SELECT id, name, image1, image2 FROM torrents ORDER BY id DESC LIMIT $total_covers";
$res = SQL_Query_exec($query);
while ($arr = @mysqli_fetch_assoc($res)) {
if (!$arr['image1'])
echo "<a title=\"" . $arr['name'] . "\" href=\"torrents-details.php?id=" . $arr['id'] . "/\"><img itemprop=\"image\" class=\"responsive-img\" src=\"" . $site_config['SITEURL'] . "/images/switch_cover_none.png\" alt=\"" . $arr['name'] . "\" style=\"width: 107px; height: 176px; margin-right: 10px\" border=\"0\" /></a>";
else
echo "<a title=\"" . $arr['name'] . "\" href=\"" . $site_config['SITEURL'] . "/details/" . $arr['id'] . "/\"><img itemprop=\"image\" class=\"responsive-img\" src=\"" . $site_config['SITEURL'] . "/uploads/images/" . htmlspecialchars($arr["image1"]) . "\" alt=\"" . $arr['name'] . "\" style=\"width: 107px; height: 176px; margin-right: 10px\" border=\"0\" /></a>";
}
if ($CURUSER)
SQL_Query_exec("UPDATE users SET last_browse=" . gmtime() . " WHERE id=$CURUSER[id]");
?>
</center>
</span>
</div> <?php
require_once("backend/functions.php");
dbconn();
stdhead(T_("SPOTLIGHT"));
begin_frame(T_("THE_GALLERY"));
?>
<h1 itemprop="name">
<i class="material-icons">star</i> Spotlight
</h1>
<script type="text/javascript">
$(document).ready(function() {
$("#cd-name").keyup(function() {
var a = $(this).val().trim();
if ("" != a) {
$("#uname_response").show();
$.ajax({
url: "https://WEBSITE.com/ajax_gallery.php",
type: "post",
data: {
username: a
},
success: function(a) {
$("#uname_response").html(a);
$(".comments").hide();
}
});
} else $("#uname_response").hide();
$(".comments").show();
});
});
</script>
<div style="padding-left:40px">
<form class="cd-form floating-labels">
<fieldset>
<div class="icon">
<label class="cd-label" for="cd-name">History (beta)</label>
<input class="user" type="text" name="username" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" id="cd-name" placeholder="Search Spotlight History">
</div>
</fieldset>
</form>
</div>
<!-- AJAX Search/Response -->
<center>
<div id="uname_response"></div>
</center>
<br />
<br />
<!-- Spotlight Section -->
<div class="card-action ng-scope" ng-if="item.comment_count">
<!-- interactionCount -->
<span itemprop="interactionCount" class="comments">
<h1 itemprop="name" style="text-align:center;padding-bottom:23px">
Last 50
</h1>
<center>
<?
$total_covers = 50;
$query = "SELECT id, name, image1, image2 FROM torrents ORDER BY id DESC LIMIT $total_covers";
$res = SQL_Query_exec($query);
while ($arr = @mysqli_fetch_assoc($res)) {
if (!$arr['cover1'])
echo "<a title=\"" . $arr['name'] . "\" href=\"torrents-details.php?id=" . $arr['id'] . "/\"><img itemprop=\"image\" class=\"responsive-img\" src=\"" . $site_config['SITEURL'] . "/images/switch_cover_none.png\" alt=\"" . $arr['name'] . "\" style=\"width: 107px; height: 176px; margin-right: 10px\" border=\"0\" /></a>";
else
echo "<a title=\"" . $arr['name'] . "\" href=\"" . $site_config['SITEURL'] . "/details/" . $arr['id'] . "/\"><img itemprop=\"image\" class=\"responsive-img\" src=\"" . $site_config['SITEURL'] . "/uploads/images/" . htmlspecialchars($arr["image1"]) . "\" alt=\"" . $arr['name'] . "\" style=\"width: 107px; height: 176px; margin-right: 10px\" border=\"0\" /></a>";
}
if ($CURUSER)
SQL_Query_exec("UPDATE users SET last_browse=" . gmtime() . " WHERE id=$CURUSER[id]");
?>
</center>
</span>
</div>
end_frame();
<? stdfoot(); ?> <table border='0' cellpadding='3' width='100%'>
<td>
<table border='0' cellpadding='1' width='100%'>
<td width=10 class=ttable_col2 align=center><a href=\"download.php?id=$id&name=" . rawurlencode($arr["filename"]) . "\"><img src='" . $site_config['SITEURL'] . "/images/download_torrent3.png
' border='0' title='".T_("DIRECT_DOWN")."' alt=\"Download torrent\" /></a></td>
<td class=ttable_col2 align='center'><b>Lang: </b>
<span style='color:#9E5412'><b>" . $row["lang_name"] . "</b></span>
<td class=ttable_col2 align='center'><b>" .T_("CATEGORY"). " : </b><span style='color:#9E5412'><b>
" . $row["cat_parent"] . "</b> " . $row["cat_pic"] . " </span>
<td class=ttable_col2 align='center'><b>Genre : </b>
<span style='color:#9E5412'><b>" . $row["cat_name"] . "</b></span>
<td class=ttable_col2 align='center'>
<b>" .T_("TOTAL_SIZE"). " : </b>
<b><span style='color:#9E5412'>" . mksize($row["size"]) . "</b></span></td>
</font>
</b></div></td>
</b></th></tr>
</table> <table border='0' cellpadding='3' width='100%'>
<td>
<table border='0' cellpadding='1' width='100%'>
<td width=10 class=ttable_col2 align=center><a href=\"download.php?id=$id&name=" . rawurlencode($arr["filename"]) . "\"><img src='" . $site_config['SITEURL'] . "/images/download_torrent3.png
' border='0' title='".T_("DIRECT_DOWN")."' alt=\"Download torrent\" /></a></td>
<td class=ttable_col2 align='center'><b>Lang: </b>
<span style='color:#9E5412'>" . $row["lang_name"] . "</span>
je cherche a mettre le logo des catégorie a la place de movie sur cette image de capture ci-dessous
<td class=ttable_col2 align='center'><b>" .T_("CATEGORY"). " : </b><span style='color:#9E5412'>
<b>" . $row["cat_parent"] . "</b>
</span>
<td class=ttable_col2 align='center'><b>Genre : </b>
<span style='color:#9E5412'>" . $row["cat_name"] . "</span>
<td class=ttable_col2 align='center'>
<b>" .T_("TOTAL_SIZE"). " : </b>
<span style='color:#9E5412'>" . mksize($row["size"]) . "</span></td>
</font>
</b></div></td>
</b></th></tr>
</table> //START THANKS\\\\
$thanksl = explode(",", $row['thanks']);
if ($CURUSER['username'] == $row['username']) {
$leftthanks = true;
$leftthanks2 = true;
} else {
foreach ($thanksl as $u) {
$thanks .= ($i > 0) ? ", $u" : $u;
if ($u == $CURUSER['username']) {
$leftthanks2 = true;
$leftthanks = true;
}
$i++;
}
}
if (!$leftthanks2) {
$button='<br/><input type="image" src="images/dire-merci.png" id="refresh">';
} else {
$button='';
}
echo '<tr><td align="left"><b>remercié par : </b></td><td><div id="thankput"></div>'.$button.'
<script type="text/javascript" src="'.$site_config["SITEURL"].'/js/thanks.js"></script>
<script type="text/javascript">
var $s = jQuery.noConflict();
$s("#thankput").load("thanks.php?id='.$id.'");
$s(function() {
$s("#refresh").click(function() {
$s("#thankput").empty().html(\'<center><img src="'.$site_config["SITEURL"].'/images/ajax-loader.gif"></center>\');
$s("#thankput").load("thanks.php?id='.$id.'&to=give&torrent='.$id.'")
return false;
})
})
</script></td>';
////END THANKS\\\\\ <?php if (!$site_config["MEMBERSONLY"] || $CURUSER) { ?>
//START THANKS\\\\
$thanksl = explode(",", $row['thanks']);
if ($CURUSER['username'] == $row['username']) {
$leftthanks = true;
$leftthanks2 = true;
} else {
foreach ($thanksl as $u) {
$thanks .= ($i > 0) ? ", $u" : $u;
if ($u == $CURUSER['username']) {
$leftthanks2 = true;
$leftthanks = true;
}
$i++;
}
}
if (!$leftthanks2) {
$button='<br/><input type="image" src="images/dire-merci.png" id="refresh">';
} else {
$button='';
}
echo '<tr><td align="left"><b>remercié par : </b></td><td><div id="thankput"></div>'.$button.'
<script type="text/javascript" src="'.$site_config["SITEURL"].'/js/thanks.js"></script>
<script type="text/javascript">
var $s = jQuery.noConflict();
$s("#thankput").load("thanks.php?id='.$id.'");
$s(function() {
$s("#refresh").click(function() {
$s("#thankput").empty().html(\'<center><img src="'.$site_config["SITEURL"].'/images/ajax-loader.gif"></center>\');
$s("#thankput").load("thanks.php?id='.$id.'&to=give&torrent='.$id.'")
return false;
})
})
</script></td></tr>';
////END THANKS\\\\\
<?php } ?>