Empty commit

This commit is contained in:
Git 2013-02-01 08:00:18 +00:00
parent 16435b18f2
commit e03aa41d03
6 changed files with 41 additions and 13 deletions

View File

@ -202,7 +202,7 @@
while(list($RequestID, $FillerID, $FillerName, $FilledTime) = $DB->next_record()) {
?>
<div style="text-align: right;">
<a href="user.php?id=<?=$FillerID?>"><?=$FillerName?></a> used this torrent to fill <a href="requests.php?action=view&amp;id=<?=$RequestID?>">this request</a> <?=time_diff($FilledTime)?>
<strong class="important_text"><a href="user.php?id=<?=$FillerID?>"><?=$FillerName?></a> used this torrent to fill <a href="requests.php?action=view&amp;id=<?=$RequestID?>">this request</a> <?=time_diff($FilledTime)?></strong>
</div>
<? }
}

View File

@ -351,7 +351,7 @@
while(list($RequestID, $FillerID, $FillerName, $FilledTime) = $DB->next_record()) {
?>
<div style="text-align: right;">
<a href="user.php?id=<?=$FillerID?>"><?=$FillerName?></a> used this torrent to fill <a href="requests.php?action=view&amp;id=<?=$RequestID?>">this request</a> <?=time_diff($FilledTime)?>
<strong class="important_text"><a href="user.php?id=<?=$FillerID?>"><?=$FillerName?></a> used this torrent to fill <a href="requests.php?action=view&amp;id=<?=$RequestID?>">this request</a> <?=time_diff($FilledTime)?></strong>
</div>
<? }
}

View File

@ -2,6 +2,12 @@
set_time_limit(50000);
ob_end_flush();
gc_enable();
$PCount = shell_exec("/usr/bin/pgrep -cf schedule.php");
if ($PCount >= 0) {
die();
}
//TODO: make it awesome, make it flexible!
//INSERT INTO users_geodistribution (Code, Users) SELECT g.Code, COUNT(u.ID) AS Users FROM geoip_country AS g JOIN users_main AS u ON INET_ATON(u.IP) BETWEEN g.StartIP AND g.EndIP WHERE u.Enabled='1' GROUP BY g.Code ORDER BY Users DESC
/*************************************************************************\

View File

@ -8,14 +8,36 @@
switch ($Type) {
case 'expiretoken':
$TorrentID = $_REQUEST['torrentid'];
$UserID = $_REQUEST['userid'];
if (!is_number($TorrentID) || !is_number($UserID)) {
error(403);
if (isset($_GET['tokens'])) {
$Tokens = explode(',', $_GET['tokens']);
if (empty($Tokens)) {
error(0);
}
$Cond = $UserIDs = array();
foreach ($Tokens as $Key => $Token) {
list($UserID, $TorrentID) = explode(':', $Token);
if (!is_number($UserID) || !is_number($TorrentID)) {
continue;
}
$Cond[] = "(UserID=$UserID AND TorrentID=$TorrentID)";
$UserIDs[] = $UserID;
}
if (!empty($Cond)) {
$Query = "UPDATE users_freeleeches SET Expired=TRUE WHERE ".implode(" OR ", $Cond);
$DB->query($Query);
foreach($UserIDs as $UserID) {
$Cache->delete_value('users_tokens_'.$UserID);
}
}
} else {
$TorrentID = $_REQUEST['torrentid'];
$UserID = $_REQUEST['userid'];
if (!is_number($TorrentID) || !is_number($UserID)) {
error(403);
}
$DB->query("UPDATE users_freeleeches SET Expired=TRUE WHERE UserID=$UserID AND TorrentID=$TorrentID");
$Cache->delete_value('users_tokens_'.$UserID);
}
$DB->query("UPDATE users_freeleeches SET Expired=TRUE WHERE UserID=$UserID AND TorrentID=$TorrentID");
$Cache->delete_value('users_tokens_'.$UserID);
break;
}
?>

View File

@ -215,7 +215,7 @@
// Fix Last.fm API returning more than one entry despite limit on certain conditions.
if ( typeof(json[0]) === "object" ) json = json[0];
html += '<li class="lastfm_essential">Last played: ';
html += '<a href="artist.php?artistname=' + escapeAmpUrl(json['artist']['#text']) + '">' + escapeHtml(json['artist']['#text']) + '</a> - <a href="torrents.php?searchstr=' + escapeAmpUrl(json['name']) + '">' + escapeHtml(json['name']) + '</a>';
html += '<a href="artist.php?artistname=' + escapeAmpUrl(json['artist']['#text']) + '">' + escapeHtml(json['artist']['#text']) + '</a> - <a href="torrents.php?filelist=' + escapeAmpUrl(json['name']) + '">' + escapeHtml(json['name']) + '</a>';
html += "</li>";
lastPlayedTrack = html;
}
@ -336,11 +336,11 @@
var k = initialCount;
if (j.length < 3) k = j.length;
for (var i = 0; i < k; i++) {
html += '<li><a href="artist.php?artistname=' + escapeAmpUrl(j[i]['artist']['name']) + '">' + escapeHtml(j[i]['artist']['name']) + '</a> - <a href="torrents.php?searchstr=' + escapeAmpUrl(j[i]['name']) + '">' + escapeHtml(j[i]['name']) + '</a></li>'
html += '<li><a href="artist.php?artistname=' + escapeAmpUrl(j[i]['artist']['name']) + '">' + escapeHtml(j[i]['artist']['name']) + '</a> - <a href="torrents.php?filelist=' + escapeAmpUrl(j[i]['name']) + '">' + escapeHtml(j[i]['name']) + '</a></li>'
}
if ( j.length>3 ){
for (i = 3; i < j.length; i++) {
html += '<li class="hidden"><a href="artist.php?artistname=' + escapeAmpUrl(j[i]['artist']['name']) + '">' + escapeHtml(j[i]['artist']['name']) + '</a> - <a href="torrents.php?searchstr=' + escapeAmpUrl(j[i]['name']) + '">' + escapeHtml(j[i]['name']) + '</a></li>'
html += '<li class="hidden"><a href="artist.php?artistname=' + escapeAmpUrl(j[i]['artist']['name']) + '">' + escapeHtml(j[i]['artist']['name']) + '</a> - <a href="torrents.php?filelist=' + escapeAmpUrl(j[i]['name']) + '">' + escapeHtml(j[i]['name']) + '</a></li>'
}
html+= '<li>[<a href="#toptracks" id="lastfm_expand" onclick="return false">Expand</a>]</li>'
}

View File

@ -1 +1 @@
@import url('https://whatimg.com/htrd/darkmono2/darkmono2.css');
@import url('https://www.htrd.info/darkmono2/darkmono2.css');