mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-18 12:11:36 +00:00
Empty commit
This commit is contained in:
parent
39956ded1f
commit
b139eca03b
@ -314,7 +314,7 @@ public function perf_table($Perf = false) {
|
||||
?>
|
||||
<table class="layout" width="100%">
|
||||
<tr>
|
||||
<td align="left"><strong><a href="#" onclick="$('#debug_perf').toggle();return false;" class="brackets">View</a> Performance stats:</strong></td>
|
||||
<td align="left"><strong><a href="#" onclick="$('#debug_perf').gtoggle(); return false;" class="brackets">View</a> Performance stats:</strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="debug_perf" class="debug_table hidden" width="100%">
|
||||
@ -339,7 +339,7 @@ public function include_table($Includes = false) {
|
||||
?>
|
||||
<table class="layout" width="100%">
|
||||
<tr>
|
||||
<td align="left"><strong><a href="#" onclick="$('#debug_include').toggle();return false;" class="brackets">View</a> <?=number_format(count($Includes))?> Includes:</strong></td>
|
||||
<td align="left"><strong><a href="#" onclick="$('#debug_include').gtoggle(); return false;" class="brackets">View</a> <?=number_format(count($Includes))?> Includes:</strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="debug_include" class="debug_table hidden" width="100%">
|
||||
@ -363,7 +363,7 @@ public function class_table($Classes = false) {
|
||||
?>
|
||||
<table class="layout" width="100%">
|
||||
<tr>
|
||||
<td align="left"><strong><a href="#" onclick="$('#debug_classes').toggle();return false;" class="brackets">View</a> Classes:</strong></td>
|
||||
<td align="left"><strong><a href="#" onclick="$('#debug_classes').gtoggle(); return false;" class="brackets">View</a> Classes:</strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="debug_classes" class="debug_table hidden" width="100%">
|
||||
@ -380,7 +380,7 @@ public function extension_table() {
|
||||
?>
|
||||
<table class="layout" width="100%">
|
||||
<tr>
|
||||
<td align="left"><strong><a href="#" onclick="$('#debug_extensions').toggle();return false;" class="brackets">View</a> Extensions:</strong></td>
|
||||
<td align="left"><strong><a href="#" onclick="$('#debug_extensions').gtoggle(); return false;" class="brackets">View</a> Extensions:</strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="debug_extensions" class="debug_table hidden" width="100%">
|
||||
@ -403,7 +403,7 @@ public function flag_table($Flags = false) {
|
||||
?>
|
||||
<table class="layout" width="100%">
|
||||
<tr>
|
||||
<td align="left"><strong><a href="#" onclick="$('#debug_flags').toggle();return false;" class="brackets">View</a> Flags:</strong></td>
|
||||
<td align="left"><strong><a href="#" onclick="$('#debug_flags').gtoggle(); return false;" class="brackets">View</a> Flags:</strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="debug_flags" class="debug_table hidden" width="100%">
|
||||
@ -441,7 +441,7 @@ public function constant_table($Constants = false) {
|
||||
?>
|
||||
<table class="layout" width="100%">
|
||||
<tr>
|
||||
<td align="left"><strong><a href="#" onclick="$('#debug_constants').toggle();return false;" class="brackets">View</a> Constants:</strong></td>
|
||||
<td align="left"><strong><a href="#" onclick="$('#debug_constants').gtoggle(); return false;" class="brackets">View</a> Constants:</strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="debug_constants" class="debug_table hidden" width="100%">
|
||||
@ -469,14 +469,14 @@ public function cache_table($CacheKeys = false) {
|
||||
?>
|
||||
<table class="layout" width="100%">
|
||||
<tr>
|
||||
<td align="left"><strong><a href="#" onclick="$('#debug_cache').toggle();return false;" class="brackets">View</a><?=$Header?></strong></td>
|
||||
<td align="left"><strong><a href="#" onclick="$('#debug_cache').gtoggle(); return false;" class="brackets">View</a><?=$Header?></strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="debug_cache" class="debug_table hidden" width="100%">
|
||||
<? foreach ($CacheKeys as $Key) { ?>
|
||||
<tr>
|
||||
<td align="left" class="debug_info debug_cache_key">
|
||||
<a href="#" onclick="$('#debug_cache_<?=$Key?>').toggle(); return false;"><?=display_str($Key)?></a>
|
||||
<a href="#" onclick="$('#debug_cache_<?=$Key?>').gtoggle(); return false;"><?=display_str($Key)?></a>
|
||||
</td>
|
||||
<td align="left" class="debug_data debug_cache_data">
|
||||
<pre id="debug_cache_<?=$Key?>" class="hidden"><?=display_str(print_r($Cache->get_value($Key, true), true))?></pre>
|
||||
@ -497,7 +497,7 @@ public function error_table($Errors = false) {
|
||||
?>
|
||||
<table class="layout" width="100%">
|
||||
<tr>
|
||||
<td align="left"><strong><a href="#" onclick="$('#debug_error').toggle();return false;" class="brackets">View</a> <?=number_format(count($Errors))?> Errors:</strong></td>
|
||||
<td align="left"><strong><a href="#" onclick="$('#debug_error').gtoggle(); return false;" class="brackets">View</a> <?=number_format(count($Errors))?> Errors:</strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="debug_error" class="debug_table hidden" width="100%">
|
||||
@ -536,7 +536,7 @@ public function query_table($Queries=false) {
|
||||
?>
|
||||
<table class="layout" width="100%">
|
||||
<tr>
|
||||
<td align="left"><strong><a href="#" onclick="$('#debug_database').toggle();return false;" class="brackets">View</a><?=$Header?></strong></td>
|
||||
<td align="left"><strong><a href="#" onclick="$('#debug_database').gtoggle(); return false;" class="brackets">View</a><?=$Header?></strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="debug_database" class="debug_table hidden" width="100%">
|
||||
@ -571,7 +571,7 @@ public function sphinx_table($Queries = false) {
|
||||
?>
|
||||
<table class="layout" width="100%">
|
||||
<tr>
|
||||
<td align="left"><strong><a href="#" onclick="$('#debug_sphinx').toggle();return false;" class="brackets">View</a><?=$Header?></strong></td>
|
||||
<td align="left"><strong><a href="#" onclick="$('#debug_sphinx').gtoggle(); return false;" class="brackets">View</a><?=$Header?></strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="debug_sphinx" class="debug_table hidden" width="100%">
|
||||
@ -603,7 +603,7 @@ public function vars_table($Vars = false) {
|
||||
?>
|
||||
<table class="layout" width="100%">
|
||||
<tr>
|
||||
<td align="left"><strong><a href="#" onclick="$('#debug_loggedvars').toggle();return false;" class="brackets">View</a><?=$Header?></strong></td>
|
||||
<td align="left"><strong><a href="#" onclick="$('#debug_loggedvars').gtoggle(); return false;" class="brackets">View</a><?=$Header?></strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="debug_loggedvars" class="debug_table hidden" width="100%">
|
||||
@ -614,7 +614,7 @@ public function vars_table($Vars = false) {
|
||||
?>
|
||||
<tr>
|
||||
<td align="left" class="debug_info debug_loggedvars_name">
|
||||
<a href="#" onclick="$('#debug_loggedvars_<?=$ID?>').toggle(); return false;"><?=display_str($Key)?></a> (<?=$Size . ($Size == 1 ? ' element' : ' elements')?>)
|
||||
<a href="#" onclick="$('#debug_loggedvars_<?=$ID?>').gtoggle(); return false;"><?=display_str($Key)?></a> (<?=$Size . ($Size == 1 ? ' element' : ' elements')?>)
|
||||
<div><?=$Data['bt']['path'].':'.$Data['bt']['line'];?></div>
|
||||
</td>
|
||||
<td class="debug_data debug_loggedvars_data" align="left">
|
||||
|
@ -1,5 +1,33 @@
|
||||
<?php
|
||||
class Rules {
|
||||
|
||||
/**
|
||||
* Displays the site's "Golden Rules".
|
||||
*
|
||||
*/
|
||||
public static function display_golden_rules() {
|
||||
?>
|
||||
<ul>
|
||||
<li>All staff decisions must be respected. If you take issue with a decision, you must do so privately with the staff member who issued the decision or with an administrator of the site. Complaining about staff decisions in public or otherwise disrespecting staff members will not be taken lightly.</li>
|
||||
<li>Access to this web site is a privilege, not a right, and it can be taken away from you for any reason.</li>
|
||||
<li>One account per person per lifetime. Anyone creating additional accounts will be banned. Additionally, unless your account is immune to <a href="wiki.php?action=article&id=8">inactivity pruning</a>, accounts are automatically disabled if one page load is not made at least once every four months.</li>
|
||||
<li>Avatars must not exceed 256 kB or be vertically longer than 400 pixels. Avatars must be safe for work, be entirely unoffensive, and cannot contain any nudity or religious imagery. Use common sense.</li>
|
||||
<li>Do not post our .torrent files on other sites. Every .torrent file has your personal passkey embedded in it. The tracker will automatically disable your account if you share your torrent files with others. You will not get your account back. This doesn't prohibit you from sharing the content on other sites, but does prohibit you from sharing the .torrent file.</li>
|
||||
<li>Any torrent you are seeding to this tracker must only have our tracker's URL in it. Adding another tracker's URL will cause incorrect data to be sent to our tracker, and will lead to your getting disabled for cheating. Similarly, your client must have DHT and PEX (peer exchange) disabled for all <?=SITE_NAME?> torrents.</li>
|
||||
<li>This is a torrent site which promotes sharing amongst the community. If you are not willing to give back to the community what you take from it, this site is not for you. In other words, we expect you to have an acceptable share ratio. If you download a torrent, please, seed the copy you have until there are sufficient people seeding the torrent data before you stop.</li>
|
||||
<li>Do not browse the site using proxies or Tor. The site will automatically alert us. This includes VPNs with dynamic IP addresses.</li>
|
||||
<li>Asking for invites to any site is not allowed anywhere on <?=SITE_NAME?> or our IRC network. Invites may be offered in the Invites forum, and nowhere else.</li>
|
||||
<li>Trading and selling invites is strictly prohibited, as is offering them in public - this includes on any forum which is not a class-restricted section on an invitation-only torrent site. Responding to public requests for invites may also jeopardize your account and those whom you invite from a public request.</li>
|
||||
<li>Trading, selling, sharing, or giving away your account is prohibited. If you no longer want your account, send a staff PM requesting that it be disabled.</li>
|
||||
<li>You're completely responsible for the people you invite. If your invitees are caught cheating or trading/selling invites, not only will they be banned, so will you. Be careful who you invite. Invites are a precious commodity.</li>
|
||||
<li>Be careful when sharing an IP address or a computer with a friend if they have (or have had) an account. From then on your accounts will be inherently linked and if one of you violates the rules, both accounts will be disabled along with any other accounts linked by IP address. This rule applies to logging into the site.</li>
|
||||
<li>Attempting to find or exploit a bug in the site code is the worst possible offense you can commit. We have automatic systems in place for monitoring these activities, and committing them will result in the banning of you, your inviter, and your inviter's entire invite tree.</li>
|
||||
<li>We're a community. Working together is what makes this place what it is. There are well over a thousand new torrents uploaded every day and sadly the staff aren't psychic. If you come across something that violates a rule, report it and help us better organize the site for you.</li>
|
||||
<li>We respect the wishes of other sites here, as we wish for them to do the same. Please refrain from posting links to or full names for sites that do not want to be mentioned.</li>
|
||||
</ul>
|
||||
<?
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the site's rules for tags.
|
||||
*
|
||||
|
@ -98,7 +98,7 @@ public static function get_host_by_ip($IP) {
|
||||
* Gets an hostname using AJAX
|
||||
*
|
||||
* @param $IP the IP to fetch
|
||||
* @return a span with javascript code
|
||||
* @return a span with JavaScript code
|
||||
*/
|
||||
public static function get_host_by_ajax($IP) {
|
||||
static $ID = 0;
|
||||
|
@ -1,7 +1,10 @@
|
||||
CHANGELOG
|
||||
|
||||
2013-06-16 by porkpie
|
||||
Require a click and an ajax call to view some of the stats on profile pages
|
||||
|
||||
2013-06-15 by Ajax
|
||||
Adding &artistreleases=1 to artist api url will display only releases by the current artist
|
||||
Adding &artistreleases=1 to artist api url will display only releases by the current artist
|
||||
|
||||
2013-06-15 by Ajax
|
||||
Added artist and extended artist information to torrent groups in artist json output
|
||||
|
@ -154,16 +154,16 @@ function compare($X, $Y) {
|
||||
}
|
||||
|
||||
if (!empty($GuestAlbums)) {
|
||||
$ReleaseTypes[1024] = "Guest Appearance";
|
||||
$ReleaseTypes[1024] = 'Guest Appearance';
|
||||
}
|
||||
if (!empty($RemixerAlbums)) {
|
||||
$ReleaseTypes[1023] = "Remixed By";
|
||||
$ReleaseTypes[1023] = 'Remixed By';
|
||||
}
|
||||
if (!empty($ComposerAlbums)) {
|
||||
$ReleaseTypes[1022] = "Composition";
|
||||
$ReleaseTypes[1022] = 'Composition';
|
||||
}
|
||||
if (!empty($ProducerAlbums)) {
|
||||
$ReleaseTypes[1021] = "Produced By";
|
||||
$ReleaseTypes[1021] = 'Produced By';
|
||||
}
|
||||
|
||||
reset($TorrentList);
|
||||
@ -173,13 +173,13 @@ function compare($X, $Y) {
|
||||
foreach ($TorrentList as $GroupID => $Group) {
|
||||
extract(Torrents::array_group($Group));
|
||||
|
||||
foreach($Artists as &$Artist) {
|
||||
foreach ($Artists as &$Artist) {
|
||||
$Artist['id'] = (int) $Artist['id'];
|
||||
$Artist['aliasid'] = (int) $Artist['aliasid'];
|
||||
}
|
||||
|
||||
foreach($ExtendedArtists as &$ArtistGroup) {
|
||||
foreach($ArtistGroup as &$Artist) {
|
||||
foreach ($ExtendedArtists as &$ArtistGroup) {
|
||||
foreach ($ArtistGroup as &$Artist) {
|
||||
$Artist['id'] = (int) $Artist['id'];
|
||||
$Artist['aliasid'] = (int) $Artist['aliasid'];
|
||||
|
||||
|
74
sections/ajax/community_stats.php
Normal file
74
sections/ajax/community_stats.php
Normal file
@ -0,0 +1,74 @@
|
||||
<?
|
||||
if (!isset($_GET['userid']) || !is_number($_GET['userid'])) {
|
||||
json_die('failure');
|
||||
}
|
||||
|
||||
$UserID = $_GET['userid'];
|
||||
$CommStats = array(
|
||||
'leeching' => false,
|
||||
'seeding' => false,
|
||||
'snatched' => false,
|
||||
'usnatched' => false,
|
||||
'downloaded' => false,
|
||||
'udownloaded' => false,
|
||||
'seedingperc' => false,
|
||||
);
|
||||
|
||||
$User = Users::user_info($UserID);
|
||||
|
||||
function check_paranoia_here($Setting) {
|
||||
global $User;
|
||||
return check_paranoia($Setting, $User['Paranoia'], $User['Class'], $User['ID']);
|
||||
}
|
||||
|
||||
if (check_paranoia_here('seeding+') || check_paranoia_here('leeching+')) {
|
||||
$DB->query("
|
||||
SELECT IF(remaining=0,'Seeding','Leeching') AS Type, COUNT(x.uid)
|
||||
FROM xbt_files_users AS x
|
||||
INNER JOIN torrents AS t ON t.ID=x.fid
|
||||
WHERE x.uid='$UserID'
|
||||
AND x.active=1
|
||||
GROUP BY Type");
|
||||
$PeerCount = $DB->to_array(0, MYSQLI_NUM, false);
|
||||
if (check_paranoia('seeding+')) {
|
||||
$CommStats['seeding'] = isset($PeerCount['Seeding']) ? $PeerCount['Seeding'][1] : 0;
|
||||
}
|
||||
if (check_paranoia('leeching+')) {
|
||||
$CommStats['leeching'] = isset($PeerCount['Leeching']) ? $PeerCount['Leeching'][1] : 0;
|
||||
}
|
||||
}
|
||||
if (check_paranoia_here('snatched+')) {
|
||||
$DB->query("
|
||||
SELECT COUNT(x.uid), COUNT(DISTINCT x.fid)
|
||||
FROM xbt_snatched AS x
|
||||
INNER JOIN torrents AS t ON t.ID=x.fid
|
||||
WHERE x.uid = '$UserID'");
|
||||
list($Snatched, $UniqueSnatched) = $DB->next_record(MYSQLI_NUM, false);
|
||||
$CommStats['snatched'] = $Snatched;
|
||||
if (check_perms('site_view_torrent_snatchlist', $User['Class'])) {
|
||||
$CommStats['usnatched'] = $UniqueSnatched;
|
||||
}
|
||||
if (check_paranoia_here('seeding') && check_paranoia_here('snatched')) {
|
||||
$CommStats['seedingperc'] = $UniqueSnatched > 0 ? 100 * min(1, round($CommStats['seeding'] / $UniqueSnatched, 2)) : -1;
|
||||
}
|
||||
}
|
||||
if (check_perms('site_view_torrent_snatchlist', $Class)) {
|
||||
$DB->query("
|
||||
SELECT COUNT(ud.UserID), COUNT(DISTINCT ud.TorrentID)
|
||||
FROM users_downloads AS ud
|
||||
JOIN torrents AS t ON t.ID=ud.TorrentID
|
||||
WHERE ud.UserID='$UserID'");
|
||||
list($NumDownloads, $UniqueDownloads) = $DB->next_record(MYSQLI_NUM, false);
|
||||
$CommStats['downloaded'] = $NumDownloads;
|
||||
$CommStats['udownloaded'] = $UniqueDownloads;
|
||||
}
|
||||
|
||||
$CommStats['leeching'] = number_format($CommStats['leeching']);
|
||||
$CommStats['seeding'] = number_format($CommStats['seeding']);
|
||||
$CommStats['snatched'] = number_format($CommStats['snatched']);
|
||||
$CommStats['usnatched'] = number_format($CommStats['usnatched']);
|
||||
$CommStats['downloaded'] = number_format($CommStats['downloaded']);
|
||||
$CommStats['udownloaded'] = number_format($CommStats['udownloaded']);
|
||||
$CommStats['seedingperc'] = number_format($CommStats['seedingperc']);
|
||||
|
||||
json_die('success', $CommStats);
|
@ -147,6 +147,9 @@
|
||||
case 'news_ajax':
|
||||
require(SERVER_ROOT . '/sections/ajax/news_ajax.php');
|
||||
break;
|
||||
case 'community_stats':
|
||||
require(SERVER_ROOT . '/sections/ajax/community_stats.php');
|
||||
break;
|
||||
default:
|
||||
// If they're screwing around with the query string
|
||||
json_die("failure");
|
||||
|
@ -228,12 +228,12 @@ function compare($X, $Y) {
|
||||
}
|
||||
|
||||
if (!empty($LoggedUser['DiscogView']) || (isset($LoggedUser['SortHide']) && array_key_exists($ReleaseType, $LoggedUser['SortHide']) && $LoggedUser['SortHide'][$ReleaseType] == 1)) {
|
||||
$ToggleStr = " onclick=\"$('.releases_$ReleaseID').show(); return true;\"";
|
||||
$ToggleStr = " onclick=\"$('.releases_$ReleaseID').gshow(); return true;\"";
|
||||
} else {
|
||||
$ToggleStr = '';
|
||||
}
|
||||
?>
|
||||
<a href="#torrents_<?=str_replace(" ", "_", strtolower($ReleaseTypes[$ReleaseID]))?>" class="brackets"<?=$ToggleStr?>><?=$DisplayName?></a>
|
||||
<a href="#torrents_<?=str_replace(' ', '_', strtolower($ReleaseTypes[$ReleaseID]))?>" class="brackets"<?=$ToggleStr?>><?=$DisplayName?></a>
|
||||
<?
|
||||
}
|
||||
if ($NumRequests > 0) {
|
||||
@ -323,7 +323,7 @@ function compare($X, $Y) {
|
||||
<table class="torrent_table grouped release_table" id="torrents_<?=$ReleaseTypeLabel?>">
|
||||
<tr class="colhead_dark">
|
||||
<td class="small"><!-- expand/collapse --></td>
|
||||
<td width="70%"><a href="#">↑</a> <strong><?=$DisplayName?></strong> (<a href="#" onclick="$('.releases_<?=$ReleaseType?>').toggle(true);return false;">View</a>)</td>
|
||||
<td width="70%"><a href="#">↑</a> <strong><?=$DisplayName?></strong> (<a href="#" onclick="$('.releases_<?=$ReleaseType?>').gtoggle(true); return false;">View</a>)</td>
|
||||
<td>Size</td>
|
||||
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/snatched.png" alt="Snatches" title="Snatches" /></td>
|
||||
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/seeders.png" alt="Seeders" title="Seeders" /></td>
|
||||
@ -717,7 +717,7 @@ function compare($X, $Y) {
|
||||
AND Deleted='0'
|
||||
AND CategoryID = '7'");
|
||||
$Collages = $DB->to_array();
|
||||
$Cache->cache_value('artists_collages_'.$ArtistID, $Collages, 3600*6);
|
||||
$Cache->cache_value('artists_collages_'.$ArtistID, $Collages, 3600 * 6);
|
||||
}
|
||||
if (count($Collages) > 0) {
|
||||
if (count($Collages) > MAX_COLLAGES) {
|
||||
@ -725,7 +725,7 @@ function compare($X, $Y) {
|
||||
$Range = range(0,count($Collages) - 1);
|
||||
shuffle($Range);
|
||||
$Indices = array_slice($Range, 0, MAX_COLLAGES);
|
||||
$SeeAll = ' <a href="#" onclick="$(\'.collage_rows\').toggle(); return false;">(See all)</a>';
|
||||
$SeeAll = ' <a href="#" onclick="$(\'.collage_rows\').gtoggle(); return false;">(See all)</a>';
|
||||
} else {
|
||||
$Indices = range(0, count($Collages)-1);
|
||||
$SeeAll = '';
|
||||
@ -929,7 +929,7 @@ function require(file, callback) {
|
||||
<div id="info" class="head">
|
||||
<a href="#">↑</a>
|
||||
<strong>Artist info</strong>
|
||||
<a href="#" class="brackets" onclick="$('#body').toggle(); return false;">Toggle</a>
|
||||
<a href="#" class="brackets" onclick="$('#body').gtoggle(); return false;">Toggle</a>
|
||||
</div>
|
||||
<div id="body" class="body"><?=$Text->full_format($Body)?></div>
|
||||
</div>
|
||||
|
@ -26,7 +26,7 @@
|
||||
<div class="box">
|
||||
<div id="concerts" class="head">
|
||||
<a href="#">↑</a> <strong>Upcoming concerts</strong>
|
||||
<a href="#" class="brackets" onclick="$('#concertsbody').toggle(); return false;">Toggle</a>
|
||||
<a href="#" class="brackets" onclick="$('#concertsbody').gtoggle(); return false;">Toggle</a>
|
||||
</div>
|
||||
<div id="concertsbody"<?=$Hidden ? ' class="hidden"' : '' ?>>
|
||||
<?=$Concerts?>
|
||||
|
@ -2,7 +2,7 @@
|
||||
View::show_header('Create a collage');
|
||||
|
||||
if (!check_perms('site_collages_renamepersonal')) {
|
||||
$ChangeJS = " onchange=\"if ( this.options[this.selectedIndex].value == '0') { $('#namebox').hide(); $('#personal').show(); } else { $('#namebox').show(); $('#personal').hide(); }\"";
|
||||
$ChangeJS = " onchange=\"if ( this.options[this.selectedIndex].value == '0') { $('#namebox').ghide(); $('#personal').gshow(); } else { $('#namebox').gshow(); $('#personal').ghide(); }\"";
|
||||
}
|
||||
|
||||
$Name = $_REQUEST['name'];
|
||||
|
@ -85,7 +85,7 @@
|
||||
<? if (check_forumperm($ForumID, 'Write') && check_forumperm($ForumID, 'Create')) { ?>
|
||||
<a href="forums.php?action=new&forumid=<?=$ForumID?>" class="brackets">New thread</a>
|
||||
<? } ?>
|
||||
<a href="#" onclick="$('#searchforum').toggle(); this.innerHTML = (this.innerHTML == 'Search this forum' ? 'Hide search' : 'Search this forum'); return false;" class="brackets">Search this forum</a>
|
||||
<a href="#" onclick="$('#searchforum').gtoggle(); this.innerHTML = (this.innerHTML == 'Search this forum' ? 'Hide search' : 'Search this forum'); return false;" class="brackets">Search this forum</a>
|
||||
<div id="searchforum" class="hidden center">
|
||||
<div style="display: inline-block;">
|
||||
<h3>Search this forum:</h3>
|
||||
|
@ -35,7 +35,7 @@
|
||||
</div>
|
||||
<? if (check_perms('forums_polls_create')) { ?>
|
||||
<div class="box thin clear hidden" id="pollpreview">
|
||||
<div class="head colhead_dark"><strong>Poll</strong> <a href="#" onclick="$('#threadpoll').toggle();return false;" class="brackets">View</a></div>
|
||||
<div class="head colhead_dark"><strong>Poll</strong> <a href="#" onclick="$('#threadpoll').gtoggle(); return false;" class="brackets">View</a></div>
|
||||
<div class="pad" id="threadpoll">
|
||||
<p><strong id="pollquestion"></strong></p>
|
||||
<div id="pollanswers"></div>
|
||||
@ -135,7 +135,7 @@ function RemoveAnswerField() {
|
||||
<tr>
|
||||
<td colspan="2" class="center">
|
||||
<strong>Poll Settings</strong>
|
||||
<a href="#" onclick="$('#poll_question, #poll_answers').toggle();return false;" class="brackets">View</a>
|
||||
<a href="#" onclick="$('#poll_question, #poll_answers').gtoggle(); return false;" class="brackets">View</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="poll_question" class="hidden">
|
||||
|
@ -311,7 +311,7 @@
|
||||
<?=Format::cut_string($Title, 80); ?>
|
||||
<? }
|
||||
if ($Type == 'body') { ?>
|
||||
<a href="#" onclick="$('#post_<?=$PostID?>_text').toggle(); return false;">(show)</a> <span style="float: right;" class="last_read" title="Jump to post"><a href="forums.php?action=viewthread&threadid=<?=$ID?><? if (!empty($PostID)) { echo '&postid='.$PostID.'#post'.$PostID; } ?>"></a></span>
|
||||
<a href="#" onclick="$('#post_<?=$PostID?>_text').gtoggle(); return false;">(show)</a> <span style="float: right;" class="last_read" title="Jump to post"><a href="forums.php?action=viewthread&threadid=<?=$ID?><? if (!empty($PostID)) { echo '&postid='.$PostID.'#post'.$PostID; } ?>"></a></span>
|
||||
<? } ?>
|
||||
</td>
|
||||
<td>
|
||||
|
@ -176,7 +176,7 @@
|
||||
<div class="center">
|
||||
<a href="reports.php?action=report&type=thread&id=<?=$ThreadID?>" class="brackets">Report thread</a>
|
||||
<a href="#" onclick="Subscribe(<?=$ThreadID?>);return false;" id="subscribelink<?=$ThreadID?>" class="brackets"><?=(in_array($ThreadID, $UserSubscriptions) ? 'Unsubscribe' : 'Subscribe')?></a>
|
||||
<a href="#" onclick="$('#searchthread').toggle(); this.innerHTML = (this.innerHTML == 'Search this thread' ? 'Hide search' : 'Search this thread'); return false;" class="brackets">Search this thread</a>
|
||||
<a href="#" onclick="$('#searchthread').gtoggle(); this.innerHTML = (this.innerHTML == 'Search this thread' ? 'Hide search' : 'Search this thread'); return false;" class="brackets">Search this thread</a>
|
||||
</div>
|
||||
<div id="searchthread" class="hidden center">
|
||||
<div style="display: inline-block;">
|
||||
@ -264,7 +264,7 @@
|
||||
|
||||
?>
|
||||
<div class="box thin clear">
|
||||
<div class="head colhead_dark"><strong>Poll<? if ($Closed) { echo ' [Closed]'; } ?><? if ($Featured && $Featured !== '0000-00-00 00:00:00') { echo ' [Featured]'; } ?></strong> <a href="#" onclick="$('#threadpoll').toggle();log_hit();return false;" class="brackets">View</a></div>
|
||||
<div class="head colhead_dark"><strong>Poll<? if ($Closed) { echo ' [Closed]'; } ?><? if ($Featured && $Featured !== '0000-00-00 00:00:00') { echo ' [Featured]'; } ?></strong> <a href="#" onclick="$('#threadpoll').gtoggle(); log_hit(); return false;" class="brackets">View</a></div>
|
||||
<div class="pad<? if (/*$LastRead !== null || */$ThreadInfo['IsLocked']) { echo ' hidden'; } ?>" id="threadpoll">
|
||||
<p><strong><?=display_str($Question)?></strong></p>
|
||||
<? if ($UserResponse !== null || $Closed || $ThreadInfo['IsLocked'] || !check_forumperm($ForumID)) { ?>
|
||||
|
@ -408,7 +408,7 @@
|
||||
<div class="box" id="recommended">
|
||||
<div class="head colhead_dark">
|
||||
<strong>Latest Vanity House additions</strong>
|
||||
<a href="#" onclick="$('#vanityhouse').toggle(); this.innerHTML = (this.innerHTML == 'Hide' ? 'Show' : 'Hide'); return false;" class="brackets">Show</a>
|
||||
<a href="#" onclick="$('#vanityhouse').gtoggle(); this.innerHTML = (this.innerHTML == 'Hide' ? 'Show' : 'Hide'); return false;" class="brackets">Show</a>
|
||||
</div>
|
||||
|
||||
<table class="torrent_table hidden" id="vanityhouse">
|
||||
@ -455,7 +455,7 @@
|
||||
<? if (check_perms('admin_manage_news')) { ?>
|
||||
- <a href="tools.php?action=editnews&id=<?=$NewsID?>" class="brackets">Edit</a>
|
||||
<? } ?>
|
||||
<span style="float: right;"><a href="#" onclick="$('#newsbody<?=$NewsID?>').toggle(); this.innerHTML=(this.innerHTML == 'Hide' ? 'Show' : 'Hide'); return false;" class="brackets">Hide</a></span>
|
||||
<span style="float: right;"><a href="#" onclick="$('#newsbody<?=$NewsID?>').gtoggle(); this.innerHTML=(this.innerHTML == 'Hide' ? 'Show' : 'Hide'); return false;" class="brackets">Hide</a></span>
|
||||
</div>
|
||||
|
||||
<div id="newsbody<?=$NewsID?>" class="pad"><?=$Text->full_format($Body)?></div>
|
||||
|
@ -22,29 +22,14 @@ function toggle_visibility(id) {
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="golden_rules" style="width: 35%; font-weight: bold; display: none;">
|
||||
<ul>
|
||||
<li>All staff decisions must be respected. If you take issue with a decision, you must do so privately with the staff member who issued the decision or with an administrator of the site. Complaining about staff decisions in public or otherwise disrespecting staff members will not be taken lightly.</li>
|
||||
<li>Access to this web site is a privilege, not a right, and it can be taken away from you for any reason.</li>
|
||||
<li>One account per person per lifetime. Anyone creating additional accounts will be banned.</li>
|
||||
<li>Avatars must not exceed 256 kB or be vertically longer than 400 pixels. Avatars must be safe for work, be entirely unoffensive, and cannot contain any nudity or religious imagery. Use common sense.</li>
|
||||
A <li>Do not post our .torrent files on other sites. Every .torrent file has your personal passkey embedded in it. The tracker will automatically disable your account if you share your torrent files with others. You will not get your account back. This doesn't prohibit you from sharing the content on other sites, but it does prohibit you from sharing the .torrent file.</li>
|
||||
<li>Any torrent you are seeding to this tracker must only have our tracker's URL in it. Adding another tracker's URL will cause incorrect data to be sent to our tracker and will lead to you getting disabled for cheating. Similarly, your client must have DHT and PEX (peer exchange) disabled for all What.CD torrents.</li>
|
||||
<li>This is a torrent site which promotes sharing amongst the community. If you are not willing to give back to the community what you take from it, this site is not for you. In other words, we expect you to have an acceptable share </li>
|
||||
<li>Do not browse the site using proxies or TOR. The site will automatically alert us. This includes VPNs with dynamic IP addresses.</li>
|
||||
<li>Asking for invites to any site is not allowed anywhere on What.CD or our IRC network. Invites may be offered in the Invites forum, and nowhere else.</li>
|
||||
<li>Trading, selling, sharing, or giving away your account is prohibited. If you no longer want your account, send a staff PM requesting that it be disabled.</li>
|
||||
<li>You're completely responsible for the people you invite. If your invitees are caught cheating or trading/selling invites, not only will they be banned, so will you. Be careful who you invite. Invites are a precious commodity.</li>
|
||||
<li>Be careful when sharing an IP address or a computer with a friend if they have (or have had) an account. From then on your accounts will be inherently linked and if one of you violates the rules, both accounts will be disabled along with any other accounts linked by IP. This rule applies to logging into the site.</li>
|
||||
<li>Attempting to find or exploit a bug in the site code is the worst possible offense you can commit. We have automatic systems in place for monitoring these activities, and committing them will result in the banning of you, your inviter, and your inviter's entire invite tree.</li>
|
||||
<li>We're a community. Working together is what makes this place what it is. There are well over a thousand new torrents uploaded every day and sadly the staff aren't psychic. If you come across something that violates a rule, report it and help us better organize the site for you.</li>
|
||||
<li>We respect the wishes of other sites here, as we wish for them to do the same. Please refrain from posting links to or full names for sites that do not want to be mentioned.</li>
|
||||
</ul>
|
||||
<div id="golden_rules" class="rule_summary" style="width: 35%; font-weight: bold; display: none; text-align: left;">
|
||||
<? Rules::display_golden_rules(); ?>
|
||||
<br /><br />
|
||||
</div>
|
||||
|
||||
<p class="strong">
|
||||
If you do not have access to an IRC client, you can use the WebIRC interface provided below.<br />
|
||||
Please use your What.CD username.
|
||||
Please use your <?=SITE_NAME?> username.
|
||||
</p>
|
||||
<br />
|
||||
<form class="confirm_form" name="chat" action="" method="post">
|
||||
@ -79,7 +64,7 @@ function toggle_visibility(id) {
|
||||
<param name="host" value="<?=(BOT_SERVER)?>" />
|
||||
<param name="multiserver" value="false" />
|
||||
<param name="autorejoin" value="false" />
|
||||
|
||||
<param name="command1" value="JOIN <?=BOT_DISABLED_CHAN?>" />
|
||||
<param name="gui" value="sbox" />
|
||||
<param name="pixx:highlight" value="true" />
|
||||
<param name="pixx:highlightnick" value="true" />
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
// Check if IP is banned
|
||||
if (Tools::site_ban_ip($_SERVER['REMOTE_ADDR'])) {
|
||||
error('Your IP has been banned.');
|
||||
error('Your IP address has been banned.');
|
||||
}
|
||||
|
||||
require(SERVER_ROOT."/classes/validate.class.php");
|
||||
@ -26,7 +26,7 @@
|
||||
die();
|
||||
}
|
||||
|
||||
if (isset($_REQUEST['act']) && $_REQUEST['act']=="recover") {
|
||||
if (isset($_REQUEST['act']) && $_REQUEST['act'] == 'recover') {
|
||||
// Recover password
|
||||
if (!empty($_REQUEST['key'])) {
|
||||
// User has entered a new password, use step 2
|
||||
@ -41,18 +41,18 @@
|
||||
WHERE i.ResetKey='".db_string($_REQUEST['key'])."'
|
||||
AND i.ResetKey != ''
|
||||
AND m.Enabled='1'");
|
||||
list($UserID,$Email,$Country,$Expires)=$DB->next_record();
|
||||
list($UserID, $Email, $Country, $Expires) = $DB->next_record();
|
||||
|
||||
if ($UserID && strtotime($Expires)>time()) {
|
||||
if ($UserID && strtotime($Expires) > time()) {
|
||||
// If the user has requested a password change, and his key has not expired
|
||||
$Validate->SetFields('password','1','regex','You entered an invalid password. A strong password is between 8 and 40 characters long, contains at least 1 lowercase and uppercase letter, contains at least a number or symbol',array('regex' => '/(?=^.{8,}$)(?=.*[^a-zA-Z])(?=.*[A-Z])(?=.*[a-z]).*$/'));
|
||||
$Validate->SetFields('verifypassword','1','compare','Your passwords did not match.',array('comparefield'=>'password'));
|
||||
$Validate->SetFields('password', '1', 'regex', 'You entered an invalid password. A strong password is between 8 and 40 characters long, contains at least 1 lowercase and uppercase letter, contains at least a number or symbol', array('regex' => '/(?=^.{8,}$)(?=.*[^a-zA-Z])(?=.*[A-Z])(?=.*[a-z]).*$/'));
|
||||
$Validate->SetFields('verifypassword', '1', 'compare', 'Your passwords did not match.', array('comparefield' => 'password'));
|
||||
|
||||
if (!empty($_REQUEST['password'])) {
|
||||
// If the user has entered a password.
|
||||
// If the user has not entered a password, $Reset is not set to 1, and the success message is not shown
|
||||
$Err=$Validate->ValidateForm($_REQUEST);
|
||||
if ($Err=='') {
|
||||
$Err = $Validate->ValidateForm($_REQUEST);
|
||||
if ($Err == '') {
|
||||
// Form validates without error, set new secret and password.
|
||||
$DB->query("
|
||||
UPDATE
|
||||
@ -84,7 +84,7 @@
|
||||
SET ResetKey='',
|
||||
ResetExpires='0000-00-00 00:00:00'
|
||||
WHERE UserID='$UserID'");
|
||||
$_SESSION['reseterr'] = "The link you were given has expired."; // Error message to display on form
|
||||
$_SESSION['reseterr'] = 'The link you were given has expired.'; // Error message to display on form
|
||||
}
|
||||
// Show him the first form (enter email address)
|
||||
header('Location: login.php?act=recover');
|
||||
@ -94,7 +94,7 @@
|
||||
|
||||
// User has not clicked the link in his email, use step 1
|
||||
else {
|
||||
$Validate->SetFields('email','1','email','You entered an invalid email address.');
|
||||
$Validate->SetFields('email', '1', 'email', 'You entered an invalid email address.');
|
||||
|
||||
if (!empty($_REQUEST['email'])) {
|
||||
// User has entered email and submitted form
|
||||
@ -108,31 +108,33 @@
|
||||
Username,
|
||||
Email
|
||||
FROM users_main
|
||||
WHERE Email='".db_string($_REQUEST['email'])."'
|
||||
AND Enabled='1'");
|
||||
list($UserID,$Username,$Email)=$DB->next_record();
|
||||
WHERE Email = '".db_string($_REQUEST['email'])."'
|
||||
AND Enabled = '1'");
|
||||
list($UserID, $Username, $Email) = $DB->next_record();
|
||||
|
||||
if ($UserID) {
|
||||
// Email exists in the database
|
||||
// Set ResetKey, send out email, and set $Sent to 1 to show success page
|
||||
$ResetKey=Users::make_secret();
|
||||
$DB->query("UPDATE users_info SET
|
||||
ResetKey='".db_string($ResetKey)."',
|
||||
ResetExpires='".time_plus(60 * 60)."'
|
||||
WHERE UserID='$UserID'");
|
||||
$ResetKey = Users::make_secret();
|
||||
$DB->query("
|
||||
UPDATE users_info
|
||||
SET
|
||||
ResetKey = '".db_string($ResetKey)."',
|
||||
ResetExpires = '".time_plus(60 * 60)."'
|
||||
WHERE UserID = '$UserID'");
|
||||
|
||||
require(SERVER_ROOT.'/classes/templates.class.php');
|
||||
$TPL=NEW TEMPLATE;
|
||||
$TPL = NEW TEMPLATE;
|
||||
$TPL->open(SERVER_ROOT.'/templates/password_reset.tpl'); // Password reset template
|
||||
|
||||
$TPL->set('Username',$Username);
|
||||
$TPL->set('ResetKey',$ResetKey);
|
||||
$TPL->set('IP',$_SERVER['REMOTE_ADDR']);
|
||||
$TPL->set('SITE_NAME',SITE_NAME);
|
||||
$TPL->set('SITE_URL',NONSSL_SITE_URL);
|
||||
$TPL->set('Username', $Username);
|
||||
$TPL->set('ResetKey', $ResetKey);
|
||||
$TPL->set('IP', $_SERVER['REMOTE_ADDR']);
|
||||
$TPL->set('SITE_NAME', SITE_NAME);
|
||||
$TPL->set('SITE_URL', NONSSL_SITE_URL);
|
||||
|
||||
Misc::send_email($Email,'Password reset information for '.SITE_NAME,$TPL->get(),'noreply');
|
||||
$Sent=1; // If $Sent is 1, recover_step1.php displays a success message
|
||||
Misc::send_email($Email, 'Password reset information for '.SITE_NAME, $TPL->get(),'noreply');
|
||||
$Sent = 1; // If $Sent is 1, recover_step1.php displays a success message
|
||||
|
||||
//Log out all of the users current sessions
|
||||
$Cache->delete_value('user_info_'.$UserID);
|
||||
@ -140,15 +142,22 @@
|
||||
$Cache->delete_value('user_stats_'.$UserID);
|
||||
$Cache->delete_value('enabled_'.$UserID);
|
||||
|
||||
$DB->query("SELECT SessionID FROM users_sessions WHERE UserID='$UserID'");
|
||||
$DB->query("
|
||||
SELECT SessionID
|
||||
FROM users_sessions
|
||||
WHERE UserID='$UserID'");
|
||||
while (list($SessionID) = $DB->next_record()) {
|
||||
$Cache->delete_value('session_'.$UserID.'_'.$SessionID);
|
||||
}
|
||||
$DB->query("UPDATE users_sessions SET Active = 0 WHERE UserID='$UserID' AND Active = 1");
|
||||
$DB->query("
|
||||
UPDATE users_sessions
|
||||
SET Active = 0
|
||||
WHERE UserID = '$UserID'
|
||||
AND Active = 1");
|
||||
|
||||
|
||||
} else {
|
||||
$Err="There is no user with that email address.";
|
||||
$Err = 'There is no user with that email address.';
|
||||
}
|
||||
}
|
||||
|
||||
@ -168,11 +177,14 @@
|
||||
|
||||
// Normal login
|
||||
else {
|
||||
$Validate->SetFields('username',true,'regex','You did not enter a valid username.',array('regex' => USERNAME_REGEX));
|
||||
$Validate->SetFields('password','1','string','You entered an invalid password.',array('minlength'=>'6','maxlength'=>'150'));
|
||||
$Validate->SetFields('username', true, 'regex', 'You did not enter a valid username.', array('regex' => USERNAME_REGEX));
|
||||
$Validate->SetFields('password', '1', 'string', 'You entered an invalid password.', array('minlength' => '6', 'maxlength' => '150'));
|
||||
|
||||
$DB->query("SELECT ID, Attempts, Bans, BannedUntil FROM login_attempts WHERE IP='".db_string($_SERVER['REMOTE_ADDR'])."'");
|
||||
list($AttemptID,$Attempts,$Bans,$BannedUntil)=$DB->next_record();
|
||||
$DB->query("
|
||||
SELECT ID, Attempts, Bans, BannedUntil
|
||||
FROM login_attempts
|
||||
WHERE IP = '".db_string($_SERVER['REMOTE_ADDR'])."'");
|
||||
list($AttemptID, $Attempts, $Bans, $BannedUntil) = $DB->next_record();
|
||||
|
||||
// Function to log a user's login attempt
|
||||
function log_attempt($UserID) {
|
||||
@ -251,12 +263,15 @@ function log_attempt($UserID) {
|
||||
FROM users_main
|
||||
WHERE Username='".db_string($_POST['username'])."'
|
||||
AND Username != ''");
|
||||
list($UserID,$PermissionID,$CustomPermissions,$PassHash,$Secret,$Enabled) = $DB->next_record(MYSQLI_NUM, array(2));
|
||||
if (strtotime($BannedUntil)<time()) {
|
||||
list($UserID, $PermissionID, $CustomPermissions, $PassHash, $Secret, $Enabled) = $DB->next_record(MYSQLI_NUM, array(2));
|
||||
if (strtotime($BannedUntil) < time()) {
|
||||
if ($UserID && Users::check_password($_POST['password'], $PassHash, $Secret)) {
|
||||
if (!Users::is_crypt_hash($PassHash)) {
|
||||
$CryptHash = Users::make_crypt_hash($_POST['password']);
|
||||
$DB->query("UPDATE users_main SET passhash = '".db_string($CryptHash)."' WHERE ID = $UserID");
|
||||
$DB->query("
|
||||
UPDATE users_main
|
||||
SET passhash = '".db_string($CryptHash)."'
|
||||
WHERE ID = $UserID");
|
||||
}
|
||||
if ($Enabled == 1) {
|
||||
$SessionID = Users::make_secret();
|
||||
@ -264,7 +279,7 @@ function log_attempt($UserID) {
|
||||
|
||||
if (isset($_POST['keeplogged']) && $_POST['keeplogged']) {
|
||||
$KeepLogged = 1;
|
||||
setcookie('session', $Cookie, time()+60*60*24*365, '/', '', $SSL, true);
|
||||
setcookie('session', $Cookie, time() + 60 * 60 * 24 * 365, '/', '', $SSL, true);
|
||||
} else {
|
||||
$KeepLogged = 0;
|
||||
setcookie('session', $Cookie, 0, '/', '', $SSL, true);
|
||||
@ -281,9 +296,11 @@ function log_attempt($UserID) {
|
||||
|
||||
|
||||
|
||||
$DB->query("INSERT INTO users_sessions
|
||||
$DB->query("
|
||||
INSERT INTO users_sessions
|
||||
(UserID, SessionID, KeepLogged, Browser, OperatingSystem, IP, LastUpdate, FullUA)
|
||||
VALUES ('$UserID', '".db_string($SessionID)."', '$KeepLogged', '$Browser','$OperatingSystem', '".db_string($_SERVER['REMOTE_ADDR'])."', '".sqltime()."', '".db_string($_SERVER['HTTP_USER_AGENT'])."')");
|
||||
VALUES
|
||||
('$UserID', '".db_string($SessionID)."', '$KeepLogged', '$Browser','$OperatingSystem', '".db_string($_SERVER['REMOTE_ADDR'])."', '".sqltime()."', '".db_string($_SERVER['HTTP_USER_AGENT'])."')");
|
||||
|
||||
$Cache->begin_transaction('users_sessions_'.$UserID);
|
||||
$Cache->insert_front($SessionID,array(
|
||||
@ -301,13 +318,14 @@ function log_attempt($UserID) {
|
||||
LastLogin='".sqltime()."',
|
||||
LastAccess='".sqltime()."'";
|
||||
|
||||
$Sql .= " WHERE ID='".db_string($UserID)."'";
|
||||
$Sql .= "
|
||||
WHERE ID='".db_string($UserID)."'";
|
||||
|
||||
$DB->query($Sql);
|
||||
|
||||
if (!empty($_COOKIE['redirect'])) {
|
||||
$URL = $_COOKIE['redirect'];
|
||||
setcookie('redirect','',time() - 60 * 60 * 24,'/','',false);
|
||||
setcookie('redirect', '', time() - 60 * 60 * 24, '/', '', false);
|
||||
header('Location: '.$URL);
|
||||
die();
|
||||
} else {
|
||||
@ -320,26 +338,26 @@ function log_attempt($UserID) {
|
||||
|
||||
header('location:login.php?action=disabled');
|
||||
} elseif ($Enabled == 0) {
|
||||
$Err = "Your account has not been confirmed.<br />Please check your email.";
|
||||
$Err = 'Your account has not been confirmed.<br />Please check your email.';
|
||||
}
|
||||
setcookie('keeplogged','',time() + 60 * 60 * 24 * 365,'/','',false);
|
||||
setcookie('keeplogged', '', time() + 60 * 60 * 24 * 365, '/', '', false);
|
||||
}
|
||||
} else {
|
||||
log_attempt($UserID);
|
||||
|
||||
$Err = "Your username or password was incorrect.";
|
||||
setcookie('keeplogged','',time() + 60 * 60 * 24 * 365,'/','',false);
|
||||
$Err = 'Your username or password was incorrect.';
|
||||
setcookie('keeplogged', '', time() + 60 * 60 * 24 * 365, '/', '', false);
|
||||
}
|
||||
|
||||
} else {
|
||||
log_attempt($UserID);
|
||||
setcookie('keeplogged','',time() + 60 * 60 * 24 * 365,'/','',false);
|
||||
setcookie('keeplogged', '', time() + 60 * 60 * 24 * 365, '/', '', false);
|
||||
}
|
||||
|
||||
} else {
|
||||
log_attempt('0');
|
||||
setcookie('keeplogged','',time() + 60 * 60 * 24 * 365,'/','',false);
|
||||
setcookie('keeplogged', '', time() + 60 * 60 * 24 * 365, '/', '', false);
|
||||
}
|
||||
}
|
||||
require("sections/login/login.php");
|
||||
require('sections/login/login.php');
|
||||
}
|
||||
|
@ -8,7 +8,10 @@
|
||||
<?
|
||||
|
||||
if (!empty($BannedUntil) && $BannedUntil != '0000-00-00 00:00:00') {
|
||||
$DB->query("UPDATE login_attempts SET BannedUntil='0000-00-00 00:00:00', Attempts='0' WHERE ID='".db_string($AttemptID)."'");
|
||||
$DB->query("
|
||||
UPDATE login_attempts
|
||||
SET BannedUntil='0000-00-00 00:00:00', Attempts='0'
|
||||
WHERE ID='".db_string($AttemptID)."'");
|
||||
$Attempts = 0;
|
||||
}
|
||||
if (isset($Err)) {
|
||||
@ -53,14 +56,15 @@
|
||||
?>
|
||||
<br /><br />
|
||||
Lost your password? <a href="login.php?act=recover">Recover it here!</a>
|
||||
<? } ?>
|
||||
<?
|
||||
} ?>
|
||||
<script type="text/javascript" src="static/functions/detect_mobile.js"></script>
|
||||
<script type="text/javascript">
|
||||
cookie.set('cookie_test',1,1);
|
||||
cookie.set('cookie_test', 1, 1);
|
||||
if (cookie.get('cookie_test') != null) {
|
||||
cookie.del('cookie_test');
|
||||
} else {
|
||||
$('#no-cookies').show();
|
||||
$('#no-cookies').gshow();
|
||||
}
|
||||
</script>
|
||||
<? View::show_footer(); ?>
|
||||
|
@ -8,24 +8,7 @@
|
||||
<h3 id="general">Golden Rules</h3>
|
||||
</div>
|
||||
<div class="box pad rule_summary" style="padding: 10px 10px 10px 20px;">
|
||||
<ul>
|
||||
<li>All staff decisions must be respected. If you take issue with a decision, you must do so privately with the staff member who issued the decision or with an administrator of the site. Complaining about staff decisions in public or otherwise disrespecting staff members will not be taken lightly.</li>
|
||||
<li>Access to this web site is a privilege, not a right, and it can be taken away from you for any reason.</li>
|
||||
<li>One account per person per lifetime. Anyone creating additional accounts will be banned. Additionally, unless your account is immune to <a href="wiki.php?action=article&id=8">inactivity pruning</a>, accounts are automatically disabled if one page load is not made at least once every four months.</li>
|
||||
<li>Avatars must not exceed 256 kB or be vertically longer than 400 pixels. Avatars must be safe for work, be entirely unoffensive, and cannot contain any nudity or religious imagery. Use common sense.</li>
|
||||
<li>Do not post our .torrent files on other sites. Every .torrent file has your personal passkey embedded in it. The tracker will automatically disable your account if you share your torrent files with others. You will not get your account back. This doesn't prohibit you from sharing the content on other sites, but does prohibit you from sharing the .torrent file.</li>
|
||||
<li>Any torrent you are seeding to this tracker must only have our tracker's URL in it. Adding another tracker's URL will cause incorrect data to be sent to our tracker, and will lead to your getting disabled for cheating. Similarly, your client must have DHT and PEX (peer exchange) disabled for all What.CD torrents.</li>
|
||||
<li>This is a torrent site which promotes sharing amongst the community. If you are not willing to give back to the community what you take from it, this site is not for you. In other words, we expect you to have an acceptable share ratio. If you download a torrent, please, seed the copy you have until there are sufficient people seeding the torrent data before you stop.</li>
|
||||
<li>Do not browse the site using proxies or Tor. The site will automatically alert us. This includes VPNs with dynamic IP addresses.</li>
|
||||
<li>Asking for invites to any site is not allowed anywhere on What.CD or our IRC network. Invites may be offered in the Invites forum, and nowhere else.</li>
|
||||
<li>Trading and selling invites is strictly prohibited, as is offering them in public - this includes on any forum which is not a class-restricted section on an invitation-only torrent site. Responding to public requests for invites may also jeopardize your account and those whom you invite from a public request.</li>
|
||||
<li>Trading, selling, sharing, or giving away your account is prohibited. If you no longer want your account, send a staff PM requesting that it be disabled.</li>
|
||||
<li>You're completely responsible for the people you invite. If your invitees are caught cheating or trading/selling invites, not only will they be banned, so will you. Be careful who you invite. Invites are a precious commodity.</li>
|
||||
<li>Be careful when sharing an IP address or a computer with a friend if they have (or have had) an account. From then on your accounts will be inherently linked and if one of you violates the rules, both accounts will be disabled along with any other accounts linked by IP address. This rule applies to logging into the site.</li>
|
||||
<li>Attempting to find or exploit a bug in the site code is the worst possible offense you can commit. We have automatic systems in place for monitoring these activities, and committing them will result in the banning of you, your inviter, and your inviter's entire invite tree.</li>
|
||||
<li>We're a community. Working together is what makes this place what it is. There are well over a thousand new torrents uploaded every day and sadly the staff aren't psychic. If you come across something that violates a rule, report it and help us better organize the site for you.</li>
|
||||
<li>We respect the wishes of other sites here, as we wish for them to do the same. Please refrain from posting links to or full names for sites that do not want to be mentioned.</li>
|
||||
</ul>
|
||||
<? Rules::display_golden_rules(); ?>
|
||||
</div>
|
||||
<!-- END General Rules -->
|
||||
<? include('jump.php'); ?>
|
||||
|
@ -181,30 +181,42 @@ function next_hour() {
|
||||
//------------- Record who's seeding how much, used for ratio watch
|
||||
|
||||
$DB->query("TRUNCATE TABLE users_torrent_history_temp");
|
||||
|
||||
// Find seeders that have announced within the last hour
|
||||
$DB->query("
|
||||
INSERT INTO users_torrent_history_temp
|
||||
(UserID, NumTorrents)
|
||||
SELECT uid,
|
||||
COUNT(DISTINCT fid)
|
||||
FROM xbt_files_users
|
||||
WHERE mtime>unix_timestamp(now()-interval 1 hour)
|
||||
WHERE mtime>unix_timestamp(NOW()-INTERVAL 1 HOUR)
|
||||
AND Remaining=0
|
||||
GROUP BY uid;");
|
||||
GROUP BY uid");
|
||||
|
||||
// Mark new records as "checked" and set the current time as the time
|
||||
// the user started seeding <NumTorrents> seeded.
|
||||
// Finished = 1 means that the user hasn't been seeding exactly <NumTorrents> earlier today.
|
||||
// This query will only do something if the next one inserted new rows last hour.
|
||||
$DB->query("
|
||||
UPDATE users_torrent_history AS h
|
||||
JOIN users_torrent_history_temp AS t ON t.UserID=h.UserID AND t.NumTorrents=h.NumTorrents
|
||||
JOIN users_torrent_history_temp AS t ON t.UserID=h.UserID
|
||||
AND t.NumTorrents=h.NumTorrents
|
||||
SET h.Finished='0',
|
||||
h.LastTime=unix_timestamp(now())
|
||||
h.LastTime=UNIX_TIMESTAMP(NOW())
|
||||
WHERE h.Finished='1'
|
||||
AND h.Date=UTC_DATE()+0;");
|
||||
AND h.Date=UTC_DATE()+0");
|
||||
|
||||
// Insert new rows for users who haven't been seeding exactly <NumTorrents> torrents earlier today
|
||||
// and update the time spent seeding <NumTorrents> torrents for the others.
|
||||
// Primary table index: (UserID, NumTorrents, Date).
|
||||
$DB->query("
|
||||
INSERT INTO users_torrent_history
|
||||
(UserID, NumTorrents, Date)
|
||||
SELECT UserID, NumTorrents, UTC_DATE()+0
|
||||
FROM users_torrent_history_temp
|
||||
ON DUPLICATE KEY UPDATE
|
||||
Time=Time+(unix_timestamp(NOW())-LastTime),
|
||||
LastTime=unix_timestamp(NOW());");
|
||||
Time=Time+UNIX_TIMESTAMP(NOW())-LastTime,
|
||||
LastTime=UNIX_TIMESTAMP(NOW())");
|
||||
|
||||
//------------- Promote users -------------------------------------------//
|
||||
sleep(5);
|
||||
@ -447,35 +459,48 @@ function next_hour() {
|
||||
|
||||
//------------- Ratio requirements
|
||||
|
||||
|
||||
// Clear old seed time history
|
||||
$DB->query("
|
||||
DELETE FROM users_torrent_history
|
||||
WHERE Date < date('".sqltime()."'-interval 7 day) + 0");
|
||||
$DB->query("TRUNCATE TABLE users_torrent_history_temp;");
|
||||
WHERE Date<DATE('".sqltime()."'-INTERVAL 7 DAY)+0");
|
||||
|
||||
// Store total seeded time for each user in a temp table
|
||||
$DB->query("TRUNCATE TABLE users_torrent_history_temp");
|
||||
$DB->query("
|
||||
INSERT INTO users_torrent_history_temp
|
||||
(UserID, SumTime)
|
||||
SELECT UserID, SUM(Time)
|
||||
FROM users_torrent_history
|
||||
GROUP BY UserID;");
|
||||
GROUP BY UserID");
|
||||
|
||||
// Insert new row with <NumTorrents> = 0 with <Time> being number of seconds short of 72 hours.
|
||||
// This is where we penalize torrents seeded for less than 72 hours
|
||||
$DB->query("
|
||||
INSERT INTO users_torrent_history
|
||||
(UserID, NumTorrents, Date, Time)
|
||||
SELECT UserID, 0, UTC_DATE()+0, 259200-SumTime
|
||||
FROM users_torrent_history_temp
|
||||
WHERE SumTime<259200;");
|
||||
WHERE SumTime<259200");
|
||||
|
||||
// Set <Weight> to the time seeding <NumTorrents> torrents
|
||||
$DB->query("
|
||||
UPDATE users_torrent_history
|
||||
SET Weight = NumTorrents * Time;");
|
||||
$DB->query("TRUNCATE TABLE users_torrent_history_temp;");
|
||||
SET Weight=NumTorrents*Time");
|
||||
|
||||
// Calculate average time spent seeding each of the currently active torrents.
|
||||
// This rounds the results to the nearest integer because SeedingAvg is an int column.
|
||||
$DB->query("TRUNCATE TABLE users_torrent_history_temp");
|
||||
$DB->query("
|
||||
INSERT INTO users_torrent_history_temp
|
||||
(UserID, SeedingAvg)
|
||||
SELECT UserID, SUM(Weight)/SUM(Time)
|
||||
FROM users_torrent_history
|
||||
GROUP BY UserID;");
|
||||
GROUP BY UserID");
|
||||
|
||||
// Remove dummy entry for torrents seeded less than 72 hours
|
||||
$DB->query("DELETE FROM users_torrent_history WHERE NumTorrents='0'");
|
||||
$DB->query("TRUNCATE TABLE users_torrent_history_snatch;");
|
||||
|
||||
// Get each user's amount of snatches of existing torrents
|
||||
$DB->query("
|
||||
INSERT INTO users_torrent_history_snatch
|
||||
(UserID, NumSnatches)
|
||||
@ -484,13 +509,16 @@ function next_hour() {
|
||||
COUNT(DISTINCT xs.fid)
|
||||
FROM xbt_snatched AS xs
|
||||
JOIN torrents on torrents.ID=xs.fid
|
||||
GROUP BY xs.uid;");
|
||||
GROUP BY xs.uid");
|
||||
|
||||
// Get the fraction of snatched torrents seeded for at least 72 hours this week
|
||||
// Essentially take the total number of hours seeded this week and divide that by 72 hours*<NumSnatches>
|
||||
$DB->query("
|
||||
UPDATE users_main AS um
|
||||
JOIN users_torrent_history_temp AS t ON t.UserID=um.ID
|
||||
JOIN users_torrent_history_snatch AS s ON s.UserID=um.ID
|
||||
SET um.RequiredRatioWork = (1 - (t.SeedingAvg / s.NumSnatches))
|
||||
WHERE s.NumSnatches > 0;");
|
||||
WHERE s.NumSnatches > 0");
|
||||
|
||||
$RatioRequirements = array(
|
||||
array(80 * 1024 * 1024 * 1024, 0.60, 0.50),
|
||||
@ -503,14 +531,13 @@ function next_hour() {
|
||||
array(5 * 1024 * 1024 * 1024, 0.15, 0.0)
|
||||
);
|
||||
|
||||
$DownloadBarrier = 100 * 1024 * 1024 * 1024;
|
||||
$DB->query("
|
||||
UPDATE users_main
|
||||
SET RequiredRatio = 0.60
|
||||
WHERE Downloaded > 100*1024*1024*1024");
|
||||
WHERE Downloaded > $DownloadBarrier");
|
||||
|
||||
|
||||
|
||||
$DownloadBarrier = 100 * 1024 * 1024 * 1024;
|
||||
foreach ($RatioRequirements as $Requirement) {
|
||||
list($Download, $Ratio, $MinRatio) = $Requirement;
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
<h3>Contact Staff</h3>
|
||||
<div id="below_box">
|
||||
<p>If you are looking for help with a general question, we appreciate it if you would only message through the staff inbox, where we can all help you.</p>
|
||||
<p>You can do that by <strong><a href="#" onclick="$('#compose').toggle();">sending a message to the Staff Inbox</a></strong>.</p>
|
||||
<p>You can do that by <strong><a href="#" onclick="$('#compose').gtoggle();">sending a message to the Staff Inbox</a></strong>.</p>
|
||||
</div>
|
||||
<? View::parse('generic/reply/staffpm.php', array('Hidden' => true)); ?>
|
||||
<br />
|
||||
|
@ -68,7 +68,7 @@
|
||||
<div class="head">
|
||||
<?=((empty($_GET['action'])) ? 'Create a staff blog post' : 'Edit staff blog post')?>
|
||||
<span style="float: right;">
|
||||
<a href="#" onclick="$('#postform').toggle(); this.innerHTML=(this.innerHTML=='Hide'?'Show':'Hide'); return false;" class="bracket"><?=($_REQUEST['action'] != 'editblog') ? 'Show' : 'Hide' ?></a>
|
||||
<a href="#" onclick="$('#postform').gtoggle(); this.innerHTML = (this.innerHTML == 'Hide' ? 'Show' : 'Hide'); return false;" class="bracket"><?=(($_REQUEST['action'] != 'editblog') ? 'Show' : 'Hide')?></a>
|
||||
</span>
|
||||
</div>
|
||||
<form class="<?=((empty($_GET['action'])) ? 'create_form' : 'edit_form')?>" name="blog_post" action="staffblog.php" method="post">
|
||||
|
@ -26,7 +26,7 @@
|
||||
<div class="header">
|
||||
<h2>Staff PMs</h2>
|
||||
<div class="linkbox">
|
||||
<a href="#" onclick="$('#compose').toggle();" class="brackets">Compose new</a>
|
||||
<a href="#" onclick="$('#compose').gtoggle();" class="brackets">Compose new</a>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
@ -213,7 +213,7 @@
|
||||
if ($Status != 'Resolved') { ?>
|
||||
<input type="button" value="Resolve" onclick="location.href='staffpm.php?action=resolve&id=<?=$ConvID?>';" />
|
||||
<? if ($IsFLS) { //Moved by request ?>
|
||||
<input type="button" value="Common answers" onclick="$('#common_answers').toggle();" />
|
||||
<input type="button" value="Common answers" onclick="$('#common_answers').gtoggle();" />
|
||||
<? } ?>
|
||||
<input type="button" id="previewbtn" value="Preview" class="hidden button_preview_<?=$TextPrev->getID()?>" title="Preview text" />
|
||||
<input type="submit" value="Send message" />
|
||||
|
@ -46,7 +46,7 @@
|
||||
?>
|
||||
</div>
|
||||
<? if ($CanEdit) { ?>
|
||||
<div class="box2 edit_changelog">
|
||||
<div class="box box2 edit_changelog">
|
||||
<div class="head">
|
||||
<strong>Manually submit a new change to the change log</strong>
|
||||
</div>
|
||||
@ -71,7 +71,7 @@
|
||||
<? }
|
||||
|
||||
foreach ($ChangeLog as $Change) { ?>
|
||||
<div class="box2">
|
||||
<div class="box box2">
|
||||
<div class="head">
|
||||
<span><?=$Change['Time']?> by <?=$Change['Author']?></span>
|
||||
<? if ($CanEdit) { ?>
|
||||
|
@ -9,10 +9,12 @@
|
||||
if (!is_number($_POST['id']) || $_POST['id'] == '') {
|
||||
error(0);
|
||||
}
|
||||
$DB->query('DELETE FROM do_not_upload WHERE ID='.$_POST['id']);
|
||||
$DB->query('
|
||||
DELETE FROM do_not_upload
|
||||
WHERE ID = '.$_POST['id']);
|
||||
} else { //Edit & Create, Shared Validation
|
||||
$Val->SetFields('name', '1','string','The name must be set, and has a max length of 40 characters', array('maxlength'=>40, 'minlength'=>1));
|
||||
$Val->SetFields('comment', '0','string','The description has a max length of 255 characters', array('maxlength'=>255));
|
||||
$Val->SetFields('name', '1', 'string', 'The name must be set, has a maximum length of 100 characters, and has a minimum length of 5 characters.', array('maxlength' => 100, 'minlength' => 5));
|
||||
$Val->SetFields('comment', '0', 'string', 'The description has a maximum length of 255 characters.', array('maxlength' => 255));
|
||||
$Err = $Val->ValidateForm($_POST); // Validate the form
|
||||
if ($Err) {
|
||||
error($Err);
|
||||
@ -28,14 +30,16 @@
|
||||
$DB->query("
|
||||
UPDATE do_not_upload
|
||||
SET
|
||||
Name='$P[name]',
|
||||
Comment='$P[comment]',
|
||||
UserID='$LoggedUser[ID]',
|
||||
Time='".sqltime()."'
|
||||
WHERE ID='$P[id]'");
|
||||
Name = '$P[name]',
|
||||
Comment = '$P[comment]',
|
||||
UserID = '$LoggedUser[ID]',
|
||||
Time = '".sqltime()."'
|
||||
WHERE ID = '$P[id]'");
|
||||
} else { //Create
|
||||
$DB->query("INSERT INTO do_not_upload
|
||||
(Name, Comment, UserID, Time) VALUES
|
||||
$DB->query("
|
||||
INSERT INTO do_not_upload
|
||||
(Name, Comment, UserID, Time)
|
||||
VALUES
|
||||
('$P[name]','$P[comment]','$LoggedUser[ID]','".sqltime()."')");
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@
|
||||
<input type="hidden" name="action" value="dnu_alter" />
|
||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||
<td>
|
||||
<input type="text" name="name" size="30" />
|
||||
<input type="text" name="name" size="40" />
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<input type="text" name="comment" size="60" />
|
||||
@ -51,7 +51,7 @@
|
||||
<input type="hidden" name="action" value="dnu_alter" />
|
||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||
<input type="hidden" name="id" value="<?=$ID?>" />
|
||||
<input type="text" name="name" value="<?=display_str($Name)?>" size="30" />
|
||||
<input type="text" name="name" value="<?=display_str($Name)?>" size="40" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="comment" value="<?=display_str($Comment)?>" size="60" />
|
||||
|
@ -90,8 +90,8 @@
|
||||
<input type="hidden" name="action" value="tokens" />
|
||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||
Tokens to set: <input type="text" name="numtokens" size="5" style="text-align: right;" value="0" /><br /><br />
|
||||
<span id="droptokens" class=""><label for="onlydrop">Only affect users with at least this many tokens: </label><input type="checkbox" id="onlydrop" name="onlydrop" value="1" onchange="$('#disabled').toggle();return true;" /></span><br />
|
||||
<span id="disabled" class=""><label for="leechdisabled">Also add tokens (as needed) to leech disabled users: </label><input type="checkbox" id="leechdisabled" name="leechdisabled" value="1" onchange="$('#droptokens').toggle();return true;" /></span><br /><br />
|
||||
<span id="droptokens" class=""><label for="onlydrop">Only affect users with at least this many tokens: </label><input type="checkbox" id="onlydrop" name="onlydrop" value="1" onchange="$('#disabled').gtoggle(); return true;" /></span><br />
|
||||
<span id="disabled" class=""><label for="leechdisabled">Also add tokens (as needed) to leech disabled users: </label><input type="checkbox" id="leechdisabled" name="leechdisabled" value="1" onchange="$('#droptokens').gtoggle(); return true;" /></span><br /><br />
|
||||
<input type="submit" name="cleartokens" value="Set token total" />
|
||||
</form>
|
||||
</div>
|
||||
|
@ -857,7 +857,7 @@ function header_link($SortKey, $DefaultWay = 'DESC') {
|
||||
$x = 0;
|
||||
foreach ($GenreTags as $Tag) :
|
||||
?>
|
||||
<td width="12.5%"><a href="#" onclick="add_tag('<?=$Tag?>');return false;"><?=$Tag?></a></td>
|
||||
<td width="12.5%"><a href="#" onclick="add_tag('<?=$Tag?>'); return false;"><?=$Tag?></a></td>
|
||||
<?
|
||||
$x++;
|
||||
if ($x % 7 == 0) {
|
||||
@ -876,7 +876,7 @@ function header_link($SortKey, $DefaultWay = 'DESC') {
|
||||
</table>
|
||||
<table class="layout cat_list" width="100%">
|
||||
<tr>
|
||||
<td class="label"><a href="#" onclick="$('#taglist').toggle();return false;" class="brackets">View tags</a></td>
|
||||
<td class="label"><a href="#" onclick="$('#taglist').gtoggle(); return false;" class="brackets">View tags</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="submit">
|
||||
@ -991,7 +991,7 @@ function header_link($SortKey, $DefaultWay = 'DESC') {
|
||||
}
|
||||
?>
|
||||
<tr class="group">
|
||||
<td class="center"><div title="<?=$ActionTitle?>" id="showimg_<?=$GroupID?>" class="<?=$ActionURL?>_torrents"><a href="#" class="show_torrents_link" onclick="$('.groupid_<?=$GroupID?>').toggle(); return false;"></a></div></td>
|
||||
<td class="center"><div title="<?=$ActionTitle?>" id="showimg_<?=$GroupID?>" class="<?=$ActionURL?>_torrents"><a href="#" class="show_torrents_link" onclick="$('.groupid_<?=$GroupID?>').gtoggle(); return false;"></a></div></td>
|
||||
<td class="center cats_col"><div title="<?=$TorrentTags->title()?>" class="<?=Format::css_category($GroupCategoryID)?> <?=$TorrentTags->css_name()?>"></div></td>
|
||||
<td colspan="2" class="big_info">
|
||||
<?
|
||||
|
@ -857,7 +857,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
<table class="layout cat_list" width="100%">
|
||||
<tr>
|
||||
<td class="label">
|
||||
<a class="brackets" href="#" onclick="$('#taglist').toggle(); if (this.innerHTML=='View tags') {this.innerHTML='Hide tags';} else {this.innerHTML='View tags';}; return false;"><?=((empty($LoggedUser['ShowTags'])) ? 'View tags' : 'Hide tags')?></a>
|
||||
<a class="brackets" href="#" onclick="$('#taglist').gtoggle(); if (this.innerHTML=='View tags') {this.innerHTML='Hide tags';} else {this.innerHTML='View tags';}; return false;"><?=((empty($LoggedUser['ShowTags'])) ? 'View tags' : 'Hide tags')?></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -661,7 +661,7 @@ function filelist($Str) {
|
||||
<? }?>
|
||||
| <a href="torrents.php?torrentid=<?=$TorrentID ?>" title="Permalink">PL</a>
|
||||
]</span>
|
||||
» <a href="#" onclick="$('#torrent_<?=$TorrentID?>').toggle(); return false;"><?=$ExtraInfo; ?></a>
|
||||
» <a href="#" onclick="$('#torrent_<?=$TorrentID?>').gtoggle(); return false;"><?=$ExtraInfo; ?></a>
|
||||
</td>
|
||||
<td class="nobr"><?=Format::get_size($Size)?></td>
|
||||
<td><?=number_format($Snatched)?></td>
|
||||
@ -724,7 +724,7 @@ function filelist($Str) {
|
||||
$i = 0;
|
||||
?>
|
||||
<div class="box">
|
||||
<div class="head"><span style="font-weight: bold;">Requests (<?=number_format(count($Requests))?>)</span> <a href="#" style="float: right;" onclick="$('#requests').toggle(); this.innerHTML=(this.innerHTML=='Hide'?'Show':'Hide'); return false;" class="brackets">Show</a></div>
|
||||
<div class="head"><span style="font-weight: bold;">Requests (<?=number_format(count($Requests))?>)</span> <a href="#" style="float: right;" onclick="$('#requests').gtoggle(); this.innerHTML = (this.innerHTML == 'Hide' ? 'Show' : 'Hide'); return false;" class="brackets">Show</a></div>
|
||||
<table id="requests" class="request_table hidden">
|
||||
<tr class="colhead">
|
||||
<td>Format / Bitrate / Media</td>
|
||||
@ -780,7 +780,7 @@ function filelist($Str) {
|
||||
$Range = range(0, count($Collages) - 1);
|
||||
shuffle($Range);
|
||||
$Indices = array_slice($Range, 0, MAX_COLLAGES);
|
||||
$SeeAll = ' <a href="#" onclick="$(\'.collage_rows\').toggle(); return false;">(See all)</a>';
|
||||
$SeeAll = ' <a href="#" onclick="$(\'.collage_rows\').gtoggle(); return false;">(See all)</a>';
|
||||
} else {
|
||||
$Indices = range(0, count($Collages) - 1);
|
||||
$SeeAll = '';
|
||||
@ -831,7 +831,7 @@ function filelist($Str) {
|
||||
$Range = range(0,count($PersonalCollages) - 1);
|
||||
shuffle($Range);
|
||||
$Indices = array_slice($Range, 0, MAX_PERS_COLLAGES);
|
||||
$SeeAll = ' <a href="#" onclick="$(\'.personal_rows\').toggle(); return false;">(See all)</a>';
|
||||
$SeeAll = ' <a href="#" onclick="$(\'.personal_rows\').gtoggle(); return false;">(See all)</a>';
|
||||
} else {
|
||||
$Indices = range(0, count($PersonalCollages) - 1);
|
||||
$SeeAll = '';
|
||||
|
@ -484,7 +484,7 @@ function filelist($Str) {
|
||||
<? } ?>
|
||||
| <a href="torrents.php?torrentid=<?=($TorrentID)?>" title="Permalink">PL</a>
|
||||
]</span>
|
||||
» <a href="#" onclick="$('#torrent_<?=($TorrentID)?>').toggle(); return false;"><?=($ExtraInfo)?></a>
|
||||
» <a href="#" onclick="$('#torrent_<?=($TorrentID)?>').gtoggle(); return false;"><?=($ExtraInfo)?></a>
|
||||
</td>
|
||||
<td class="nobr"><?=(Format::get_size($Size))?></td>
|
||||
<td><?=(number_format($Snatched))?></td>
|
||||
|
@ -39,7 +39,7 @@
|
||||
?>
|
||||
<table class="vote_matches_table" id="vote_matches">
|
||||
<tr class="colhead">
|
||||
<td><a href="#">↑</a> People who like this album also liked... <a href="#" onclick="$('.votes_rows').toggle(); return false;">(Show)</a></td>
|
||||
<td><a href="#">↑</a> People who like this album also liked... <a href="#" onclick="$('.votes_rows').gtoggle(); return false;">(Show)</a></td>
|
||||
</tr>
|
||||
<?
|
||||
$Top10Groups = array_keys($Top10);
|
||||
|
@ -111,7 +111,7 @@
|
||||
<p><?=$NewDNU ? '<strong class="important_text">' : '' ?>Last updated: <?=time_diff($Updated)?><?=$NewDNU ? '</strong>' : '' ?></p>
|
||||
<p>The following releases are currently forbidden from being uploaded to the site. Do not upload them unless your torrent meets a condition specified in the comment.
|
||||
<? if ($HideDNU) { ?>
|
||||
<span id="showdnu"><a href="#" onclick="$('#dnulist').toggle(); this.innerHTML=(this.innerHTML=='Hide'?'Show':'Hide'); return false;" class="brackets">Show</a></span>
|
||||
<span id="showdnu"><a href="#" onclick="$('#dnulist').gtoggle(); this.innerHTML = (this.innerHTML == 'Hide' ? 'Show' : 'Hide'); return false;" class="brackets">Show</a></span>
|
||||
<? } ?>
|
||||
</p>
|
||||
<table id="dnulist" class="<?=($HideDNU ? 'hidden' : '')?>">
|
||||
|
@ -1,14 +1,4 @@
|
||||
<?
|
||||
// These stats used to be all together in one UNION'd query
|
||||
// But we broke them up because they had a habit of locking each other to death.
|
||||
// They all run really quickly anyways.
|
||||
$DB->query("
|
||||
SELECT COUNT(x.uid), COUNT(DISTINCT x.fid)
|
||||
FROM xbt_snatched AS x
|
||||
INNER JOIN torrents AS t ON t.ID=x.fid
|
||||
WHERE x.uid = '$UserID'");
|
||||
list($Snatched, $UniqueSnatched) = $DB->next_record();
|
||||
|
||||
$DB->query("
|
||||
SELECT COUNT(ID)
|
||||
FROM torrents_comments
|
||||
@ -73,7 +63,7 @@
|
||||
<div class="head colhead_dark">Community</div>
|
||||
<ul class="stats nobullet">
|
||||
<li>Forum posts: <?=number_format($ForumPosts)?> <a href="userhistory.php?action=posts&userid=<?=$UserID?>" class="brackets" title="View">View</a></li>
|
||||
<? if (($Override = check_paranoia_here('torrentcomments+'))) { ?>
|
||||
<? if ($Override = check_paranoia_here('torrentcomments+')) { ?>
|
||||
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Torrent comments: <?=number_format($NumComments)?>
|
||||
<? if ($Override = check_paranoia_here('torrentcomments')) { ?>
|
||||
<a href="comments.php?id=<?=$UserID?>" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="View">View</a>
|
||||
@ -97,23 +87,24 @@
|
||||
<? }
|
||||
if (($Override = check_paranoia_here('collages+'))) { ?>
|
||||
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Collages started: <?=number_format($NumCollages)?>
|
||||
<? if (($Override = check_paranoia_here('collages'))) { ?>
|
||||
<? if ($Override = check_paranoia_here('collages')) { ?>
|
||||
<a href="collages.php?userid=<?=$UserID?>" class="brackets<?=(($Override === 2) ? ' paranoia_override' : '')?>" title="View">View</a>
|
||||
<? } ?>
|
||||
</li>
|
||||
<? }
|
||||
if (($Override = check_paranoia_here('collagecontribs+'))) { ?>
|
||||
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Collages contributed to: <? echo number_format($NumCollageContribs); ?>
|
||||
<? if (($Override = check_paranoia_here('collagecontribs'))) { ?>
|
||||
<? if ($Override = check_paranoia_here('collagecontribs')) { ?>
|
||||
<a href="collages.php?userid=<?=$UserID?>&contrib=1" class="brackets<?=(($Override === 2) ? ' paranoia_override' : '')?>" title="View">View</a>
|
||||
<? } ?>
|
||||
</li>
|
||||
<? }
|
||||
<?
|
||||
}
|
||||
|
||||
//Let's see if we can view requests because of reasons
|
||||
$ViewAll = check_paranoia_here('requestsfilled_list');
|
||||
$ViewCount = check_paranoia_here('requestsfilled_count');
|
||||
$ViewBounty = check_paranoia_here('requestsfilled_bounty');
|
||||
//Let's see if we can view requests because of reasons
|
||||
$ViewAll = check_paranoia_here('requestsfilled_list');
|
||||
$ViewCount = check_paranoia_here('requestsfilled_count');
|
||||
$ViewBounty = check_paranoia_here('requestsfilled_bounty');
|
||||
|
||||
if ($ViewCount && !$ViewBounty && !$ViewAll) { ?>
|
||||
<li>Requests filled: <?=number_format($RequestsFilled)?></li>
|
||||
@ -123,16 +114,16 @@
|
||||
<li>Requests filled: <?=number_format($RequestsFilled)?> for <?=Format::get_size($TotalBounty)?></li>
|
||||
<? } elseif ($ViewAll) { ?>
|
||||
<li>
|
||||
<span<?=(($ViewCount === 2) ? ' class="paranoia_override"' : '')?>>Requests filled: <?=number_format($RequestsFilled)?></span>
|
||||
<span<?=(($ViewBounty === 2) ? ' class="paranoia_override"' : '')?>> for <?=Format::get_size($TotalBounty) ?></span>
|
||||
<span<?=($ViewCount === 2 ? ' class="paranoia_override"' : '')?>>Requests filled: <?=number_format($RequestsFilled)?></span>
|
||||
<span<?=($ViewBounty === 2 ? ' class="paranoia_override"' : '')?>> for <?=Format::get_size($TotalBounty) ?></span>
|
||||
<a href="requests.php?type=filled&userid=<?=$UserID?>" class="brackets<?=(($ViewAll === 2) ? ' paranoia_override' : '')?>" title="View">View</a>
|
||||
</li>
|
||||
<? }
|
||||
|
||||
//Let's see if we can view requests because of reasons
|
||||
$ViewAll = check_paranoia_here('requestsvoted_list');
|
||||
$ViewCount = check_paranoia_here('requestsvoted_count');
|
||||
$ViewBounty = check_paranoia_here('requestsvoted_bounty');
|
||||
//Let's see if we can view requests because of reasons
|
||||
$ViewAll = check_paranoia_here('requestsvoted_list');
|
||||
$ViewCount = check_paranoia_here('requestsvoted_count');
|
||||
$ViewBounty = check_paranoia_here('requestsvoted_bounty');
|
||||
|
||||
if ($ViewCount && !$ViewBounty && !$ViewAll) { ?>
|
||||
<li>Requests created: <?=number_format($RequestsCreated)?></li>
|
||||
@ -145,19 +136,19 @@
|
||||
<li>Requests voted: <?=number_format($RequestsVoted)?> for <?=Format::get_size($TotalSpent)?></li>
|
||||
<? } elseif ($ViewAll) { ?>
|
||||
<li>
|
||||
<span<?=(($ViewCount === 2) ? ' class="paranoia_override"' : '')?>>Requests created: <?=number_format($RequestsCreated)?></span>
|
||||
<span<?=(($ViewBounty === 2) ? ' class="paranoia_override"' : '')?>> for <?=Format::get_size($RequestsCreatedSpent)?></span>
|
||||
<a href="requests.php?type=created&userid=<?=$UserID?>" class="brackets<?=(($ViewAll === 2) ? ' paranoia_override' : '')?>" title="View">View</a>
|
||||
<span<?=($ViewCount === 2 ? ' class="paranoia_override"' : '')?>>Requests created: <?=number_format($RequestsCreated)?></span>
|
||||
<span<?=($ViewBounty === 2 ? ' class="paranoia_override"' : '')?>> for <?=Format::get_size($RequestsCreatedSpent)?></span>
|
||||
<a href="requests.php?type=created&userid=<?=$UserID?>" class="brackets<?=($ViewAll === 2 ? ' paranoia_override' : '')?>" title="View">View</a>
|
||||
</li>
|
||||
<li>
|
||||
<span<?=(($ViewCount === 2) ? ' class="paranoia_override"' : '')?>>Requests voted: <?=number_format($RequestsVoted)?></span>
|
||||
<span<?=(($ViewBounty === 2) ? ' class="paranoia_override"' : '')?>> for <?=Format::get_size($TotalSpent)?></span>
|
||||
<a href="requests.php?type=voted&userid=<?=$UserID?>" class="brackets<?=(($ViewAll === 2) ? ' paranoia_override' : '')?>" title="View">View</a>
|
||||
<span<?=($ViewCount === 2 ? ' class="paranoia_override"' : '')?>>Requests voted: <?=number_format($RequestsVoted)?></span>
|
||||
<span<?=($ViewBounty === 2 ? ' class="paranoia_override"' : '')?>> for <?=Format::get_size($TotalSpent)?></span>
|
||||
<a href="requests.php?type=voted&userid=<?=$UserID?>" class="brackets<?=($ViewAll === 2 ? ' paranoia_override' : '')?>" title="View">View</a>
|
||||
</li>
|
||||
<? }
|
||||
if (($Override = check_paranoia_here('uploads+'))) { ?>
|
||||
if ($Override = check_paranoia_here('uploads+')) { ?>
|
||||
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Uploaded: <?=number_format($Uploads)?>
|
||||
<? if (($Override = check_paranoia_here('uploads'))) { ?>
|
||||
<? if ($Override = check_paranoia_here('uploads')) { ?>
|
||||
<a href="torrents.php?type=uploaded&userid=<?=$UserID?>" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="View">View</a>
|
||||
<? if (check_perms('zip_downloader')) { ?>
|
||||
<a href="torrents.php?action=redownload&type=uploads&userid=<?=$UserID?>" onclick="return confirm('If you no longer have the content, your ratio WILL be affected; be sure to check the size of all torrents before redownloading.');" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="Download">Download</a>
|
||||
@ -166,80 +157,79 @@
|
||||
?>
|
||||
</li>
|
||||
<? }
|
||||
if (($Override = check_paranoia_here('uniquegroups+'))) { ?>
|
||||
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Unique groups: <? echo number_format($UniqueGroups); ?>
|
||||
<? if (($Override = check_paranoia_here('uniquegroups'))) { ?>
|
||||
if ($Override = check_paranoia_here('uniquegroups+')) { ?>
|
||||
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Unique groups: <?=number_format($UniqueGroups)?>
|
||||
<? if ($Override = check_paranoia_here('uniquegroups')) { ?>
|
||||
<a href="torrents.php?type=uploaded&userid=<?=$UserID?>&filter=uniquegroup" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="View">View</a>
|
||||
<? } ?>
|
||||
</li>
|
||||
<? }
|
||||
if (($Override = check_paranoia_here('perfectflacs+'))) { ?>
|
||||
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>"Perfect" FLACs: <? echo number_format($PerfectFLACs); ?>
|
||||
<? if (($Override = check_paranoia_here('perfectflacs'))) { ?>
|
||||
if ($Override = check_paranoia_here('perfectflacs+')) { ?>
|
||||
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>"Perfect" FLACs: <?=number_format($PerfectFLACs)?>
|
||||
<? if ($Override = check_paranoia_here('perfectflacs')) { ?>
|
||||
<a href="torrents.php?type=uploaded&userid=<?=$UserID?>&filter=perfectflac" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="View">View</a>
|
||||
<? } ?>
|
||||
</li>
|
||||
<? }
|
||||
if (check_paranoia_here('seeding+') || check_paranoia_here('leeching+')) {
|
||||
$DB->query("
|
||||
SELECT IF(remaining=0,'Seeding','Leeching') AS Type, COUNT(x.uid)
|
||||
FROM xbt_files_users AS x
|
||||
INNER JOIN torrents AS t ON t.ID=x.fid
|
||||
WHERE x.uid='$UserID'
|
||||
AND x.active=1
|
||||
GROUP BY Type");
|
||||
$PeerCount = $DB->to_array(0, MYSQLI_NUM, false);
|
||||
$Seeding = (isset($PeerCount['Seeding'][1]) ? $PeerCount['Seeding'][1] : 0);
|
||||
$Leeching = (isset($PeerCount['Leeching'][1]) ? $PeerCount['Leeching'][1] : 0);
|
||||
} ?>
|
||||
<? if (($Override = check_paranoia_here('seeding+'))) { ?>
|
||||
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Seeding: <?=number_format($Seeding)?>
|
||||
<? if (($AOverride = check_paranoia_here('seeding'))) {
|
||||
echo ((($Override = check_paranoia_here('snatched')) && $UniqueSnatched > 0 )
|
||||
? '<span'.($Override === 2 ? ' class="paranoia_override"' : '').'> (' . 100 * min(1, round($Seeding / $UniqueSnatched, 2)).'%)</span>' : ''); ?>
|
||||
<?
|
||||
}
|
||||
if ($Override = check_paranoia_here('seeding+')) {
|
||||
?>
|
||||
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Seeding:
|
||||
<span class="user_commstats" id="user_commstats_seeding"><a href="#" class="brackets" onclick="commStats(<?=$UserID?>); return false;">Stats</a></span>
|
||||
<?
|
||||
if ($AOverride = check_paranoia_here('seeding')) {
|
||||
if ($Override = check_paranoia_here('snatched')) {
|
||||
?>
|
||||
<span<?=($Override === 2 ? ' class="paranoia_override"' : '')?> id="user_commstats_seedingperc"></span>
|
||||
<? } ?>
|
||||
<a href="torrents.php?type=seeding&userid=<?=$UserID?>" class="brackets<?=($AOverride === 2 ? ' paranoia_override' : '')?>" title="View">View</a>
|
||||
<? if (check_perms('zip_downloader')) { ?>
|
||||
<a href="torrents.php?action=redownload&type=seeding&userid=<?=$UserID?>" onclick="return confirm('If you no longer have the content, your ratio WILL be affected; be sure to check the size of all torrents before redownloading.');" class="brackets" title="Download">Download</a>
|
||||
<? }
|
||||
<?
|
||||
}
|
||||
}
|
||||
?>
|
||||
</li>
|
||||
<? }
|
||||
if (($Override = check_paranoia_here('leeching+'))) { ?>
|
||||
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Leeching: <? echo number_format($Leeching); ?>
|
||||
<? if (($Override = check_paranoia_here('leeching'))) { ?>
|
||||
<a href="torrents.php?type=leeching&userid=<?=$UserID?>" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="View">View</a>
|
||||
<? }
|
||||
echo ($DisableLeech == 0 && check_perms('users_view_ips')) ? ' <strong>(Disabled)</strong>' : ''
|
||||
<?
|
||||
}
|
||||
if ($Override = check_paranoia_here('leeching+')) {
|
||||
?>
|
||||
<li<?=$Override === 2 ? ' class="paranoia_override"' : ''?>>Leeching:
|
||||
<span class="user_commstats" id="user_commstats_leeching"><a href="#" class="brackets" onclick="commStats(<?=$UserID?>); return false;">Stats</a></span>
|
||||
<? if ($Override = check_paranoia_here('leeching')) { ?>
|
||||
<a href="torrents.php?type=leeching&userid=<?=$UserID?>" class="brackets<?=$Override === 2 ? ' paranoia_override' : ''?>" title="View">View</a>
|
||||
<?
|
||||
}
|
||||
if ($DisableLeech == 0 && check_perms('users_view_ips')) {
|
||||
?>
|
||||
<strong>(Disabled)</strong>
|
||||
<? } ?>
|
||||
</li>
|
||||
<? }
|
||||
if (($Override = check_paranoia_here('snatched+'))) { ?>
|
||||
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Snatched: <?=number_format($Snatched)?>
|
||||
<? if (($Override = check_perms('site_view_torrent_snatchlist', $Class))) { ?>
|
||||
(<?=($Override === 2 ? '<span class="paranoia_override">'.number_format($UniqueSnatched).'</span>' : number_format($UniqueSnatched))?>)
|
||||
<?
|
||||
}
|
||||
if ($Override = check_paranoia_here('snatched+')) { ?>
|
||||
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Snatched:
|
||||
<span class="user_commstats" id="user_commstats_snatched"><a href="#" class="brackets" onclick="commStats(<?=$UserID?>); return false;">Stats</a></span>
|
||||
<? if ($Override = check_perms('site_view_torrent_snatchlist', $Class)) { ?>
|
||||
<span id="user_commstats_usnatched"<?=$Override === 2 ? ' class="paranoia_override"' : ''?>></span>
|
||||
<? }
|
||||
}
|
||||
if (($Override = check_paranoia_here('snatched'))) { ?>
|
||||
if ($Override = check_paranoia_here('snatched')) { ?>
|
||||
<a href="torrents.php?type=snatched&userid=<?=$UserID?>" class="brackets<?=($Override === 2 ? ' paranoia_override' : '')?>" title="View">View</a>
|
||||
<? if (check_perms('zip_downloader')) { ?>
|
||||
<a href="torrents.php?action=redownload&type=snatches&userid=<?=$UserID?>" onclick="return confirm('If you no longer have the content, your ratio WILL be affected, be sure to check the size of all torrents before redownloading.');" class="brackets" title="Download">Download</a>
|
||||
<? } ?>
|
||||
</li>
|
||||
<? }
|
||||
if (($Override = check_perms('site_view_torrent_snatchlist', $Class))) {
|
||||
$DB->query("
|
||||
SELECT COUNT(ud.UserID), COUNT(DISTINCT ud.TorrentID)
|
||||
FROM users_downloads AS ud
|
||||
INNER JOIN torrents AS t ON t.ID=ud.TorrentID
|
||||
WHERE ud.UserID='$UserID'");
|
||||
list($NumDownloads, $UniqueDownloads) = $DB->next_record();
|
||||
if (check_perms('site_view_torrent_snatchlist', $Class)) {
|
||||
?>
|
||||
<li<?=($Override === 2 ? ' class="paranoia_override"' : '')?>>Downloaded: <?=number_format($NumDownloads)?> (<?=number_format($UniqueDownloads)?>)
|
||||
<li>Downloaded:
|
||||
<span class="user_commstats" id="user_commstats_downloaded"><a href="#" class="brackets" onclick="commStats(<?=$UserID?>); return false;">Stats</a></span>
|
||||
<span id="user_commstats_udownloaded"></span>
|
||||
<a href="torrents.php?type=downloaded&userid=<?=$UserID?>" class="brackets" title="View">View</a>
|
||||
</li>
|
||||
<? }
|
||||
if (($Override = check_paranoia_here('invitedcount'))) {
|
||||
if ($Override = check_paranoia_here('invitedcount')) {
|
||||
$DB->query("
|
||||
SELECT COUNT(UserID)
|
||||
FROM users_info
|
||||
@ -251,4 +241,9 @@
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<? if ($LoggedUser['AutoloadCommStats']) { ?>
|
||||
<script type="text/javascript">
|
||||
commStats(<?=$UserID?>);
|
||||
</script>
|
||||
<? } ?>
|
||||
</div>
|
||||
|
@ -116,6 +116,17 @@ function checked($Checked) {
|
||||
<p>This is an experimental feature, and some stylesheets will have display issues.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<? if (check_perms('users_mod')) { ?>
|
||||
<tr>
|
||||
<td class="label"><strong>Profile stats</strong></td>
|
||||
<td>
|
||||
<label>
|
||||
<input type="checkbox" name="autoload_comm_stats" <?Format::selected('AutoloadCommStats', 1, 'checked', $SiteOptions);?>>
|
||||
Automatically fetch the snatch and peer stats on profile pages.
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<tr class="colhead_dark">
|
||||
<td colspan="2">
|
||||
<strong>Torrent options</strong>
|
||||
@ -528,7 +539,7 @@ function checked($Checked) {
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><a href="#" id="preview_paranoia" class="brackets">Preview paranoia</a><noscript> (Requires Javascript)</noscript></td>
|
||||
<td><a href="#" id="preview_paranoia" class="brackets">Preview paranoia</a><noscript> (Requires JavaScript)</noscript></td>
|
||||
</tr>
|
||||
<tr class="colhead_dark">
|
||||
<td colspan="2">
|
||||
|
@ -200,9 +200,9 @@ function user_dupes_table($UserID) {
|
||||
<input type="hidden" name="userid" value="<?=$UserID?>" />
|
||||
<input type="hidden" id="auth" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||
<input type="hidden" id="form_comment_hash" name="form_comment_hash" value="<?=$CommentHash?>" />
|
||||
<div class="box" id="l_a_box">
|
||||
<div class="box box2" id="l_a_box">
|
||||
<div class="head">
|
||||
<a href="#l_a_box" class="brackets anchor">#</a> <?=max($DupeCount - 1, 0)?> Linked account<?=(($DupeCount == 2) ? '' : 's')?> <a href="#" onclick="$('.linkedaccounts').toggle(); return false;" class="brackets">View</a>
|
||||
<a href="#l_a_box" class="brackets anchor">#</a> <?=max($DupeCount - 1, 0)?> Linked account<?=(($DupeCount == 2) ? '' : 's')?> <a href="#" onclick="$('.linkedaccounts').gtoggle(); return false;" class="brackets">View</a>
|
||||
</div>
|
||||
<table width="100%" class="layout hidden linkedaccounts">
|
||||
<?=($DupeCount ? '<tr>' : '')?>
|
||||
@ -238,7 +238,7 @@ function user_dupes_table($UserID) {
|
||||
<div id="editdupecomments" class="<?=($DupeCount ? 'hidden' : '')?>">
|
||||
<textarea name="dupecomments" onkeyup="resize('dupecommentsbox');" id="dupecommentsbox" cols="65" rows="5" style="width: 98%;"><?=display_str($Comments)?></textarea>
|
||||
</div>
|
||||
<span style="float: right; font-style: italic;"><a href="#" onclick="$('#dupecomments').toggle(); $('#editdupecomments').toggle(); resize('dupecommentsbox'); return false;" class="brackets">Edit linked account comments</a></span>
|
||||
<span style="float: right; font-style: italic;"><a href="#" onclick="$('#dupecomments').gtoggle(); $('#editdupecomments').gtoggle(); resize('dupecommentsbox'); return false;" class="brackets">Edit linked account comments</a></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -89,7 +89,7 @@
|
||||
<a href="feeds.php?feed=torrents_notify_<?=$N['ID']?>_<?=$LoggedUser['torrent_pass']?>&user=<?=$LoggedUser['ID']?>&auth=<?=$LoggedUser['RSS_Auth']?>&passkey=<?=$LoggedUser['torrent_pass']?>&authkey=<?=$LoggedUser['AuthKey']?>&name=<?=urlencode($N['Label'])?>"><img src="<?=STATIC_SERVER?>/common/symbols/rss.png" alt="RSS feed" /></a>
|
||||
<?=display_str($N['Label'])?>
|
||||
<a href="user.php?action=notify_delete&id=<?=$N['ID']?>&auth=<?=$LoggedUser['AuthKey']?>" onclick="return confirm('Are you sure you want to delete this notification filter?')" class="brackets">Delete</a>
|
||||
<a href="#" onclick="$('#filter_<?=$N['ID']?>').toggle(); return false;" class="brackets">Show</a>
|
||||
<a href="#" onclick="$('#filter_<?=$N['ID']?>').gtoggle(); return false;" class="brackets">Show</a>
|
||||
</h3>
|
||||
<? } ?>
|
||||
<form class="<?=($NewFilter ? 'create_form' : 'edit_form')?>" id="<?=($NewFilter ? 'filter_form' : '')?>" name="notification" action="user.php" method="post">
|
||||
|
@ -207,6 +207,7 @@
|
||||
$Options['DisableSmileys'] = (!empty($_POST['disablesmileys']) ? 1 : 0);
|
||||
$Options['EnableMatureContent'] = (!empty($_POST['enablematurecontent']) ? 1 : 0);
|
||||
$Options['UseOpenDyslexic'] = (!empty($_POST['useopendyslexic']) ? 1 : 0);
|
||||
$Options['AutoloadCommStats'] = (check_perms('users_mod') && !empty($_POST['autoload_comm_stats']) ? 1 : 0);
|
||||
$Options['DisableAvatars'] = db_string($_POST['disableavatars']);
|
||||
$Options['Identicons'] = (!empty($_POST['identicons']) ? (int) $_POST['identicons'] : 0);
|
||||
$Options['DisablePMAvatars'] = (!empty($_POST['disablepmavatars']) ? 1 : 0);
|
||||
|
@ -554,7 +554,7 @@ function check_paranoia_here($Setting) {
|
||||
<div class="head">
|
||||
<span style="float: left;">Profile<? if ($CustomTitle) { ?> - </span>
|
||||
<span class="user_title"><? echo html_entity_decode($DisplayCustomTitle); } ?></span>
|
||||
<span style="float: right;"><?=(!empty($Badges) ? "$Badges " : '')?><a href="#" onclick="$('#profilediv').toggle(); this.innerHTML=(this.innerHTML == 'Hide' ? 'Show' : 'Hide'); return false;" class="brackets">Hide</a></span>
|
||||
<span style="float: right;"><?=(!empty($Badges) ? "$Badges " : '')?><a href="#" onclick="$('#profilediv').gtoggle(); this.innerHTML = (this.innerHTML == 'Hide' ? 'Show' : 'Hide'); return false;" class="brackets">Hide</a></span>
|
||||
</div>
|
||||
<div class="pad" id="profilediv">
|
||||
<? if (!$Info) { ?>
|
||||
@ -568,9 +568,9 @@ function check_paranoia_here($Setting) {
|
||||
</div>
|
||||
</div>
|
||||
<?
|
||||
if ($Snatched > 4 && check_paranoia_here('snatched')) {
|
||||
if (check_paranoia_here('snatched')) {
|
||||
$RecentSnatches = $Cache->get_value('recent_snatches_'.$UserID);
|
||||
if (!is_array($RecentSnatches)) {
|
||||
if ($RecentSnatches === false) {
|
||||
$DB->query("
|
||||
SELECT
|
||||
g.ID,
|
||||
@ -593,6 +593,7 @@ function check_paranoia_here($Setting) {
|
||||
}
|
||||
$Cache->cache_value('recent_snatches_'.$UserID, $RecentSnatches, 0); //inf cache
|
||||
}
|
||||
if (!empty($RecentSnatches)) {
|
||||
?>
|
||||
<table class="layout recent" id="recent_snatches" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr class="colhead">
|
||||
@ -609,14 +610,12 @@ function check_paranoia_here($Setting) {
|
||||
</tr>
|
||||
</table>
|
||||
<?
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($Uploads)) {
|
||||
$Uploads = 0;
|
||||
}
|
||||
if ($Uploads > 4 && check_paranoia_here('uploads')) {
|
||||
if (check_paranoia_here('uploads')) {
|
||||
$RecentUploads = $Cache->get_value('recent_uploads_'.$UserID);
|
||||
if (!is_array($RecentUploads)) {
|
||||
if ($RecentUploads === false) {
|
||||
$DB->query("
|
||||
SELECT
|
||||
g.ID,
|
||||
@ -637,6 +636,7 @@ function check_paranoia_here($Setting) {
|
||||
}
|
||||
$Cache->cache_value('recent_uploads_'.$UserID, $RecentUploads, 0); //inf cache
|
||||
}
|
||||
if (!empty($RecentUploads)) {
|
||||
?>
|
||||
<table class="layout recent" id="recent_uploads" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr class="colhead">
|
||||
@ -653,6 +653,7 @@ function check_paranoia_here($Setting) {
|
||||
</tr>
|
||||
</table>
|
||||
<?
|
||||
}
|
||||
}
|
||||
|
||||
$DB->query("
|
||||
@ -684,7 +685,7 @@ function check_paranoia_here($Setting) {
|
||||
<a href="#collage<?=$CollageID?>_box" class="brackets anchor">#</a> <?=display_str($CName)?> - <a href="collages.php?id=<?=$CollageID?>" class="brackets">See full</a>
|
||||
</span>
|
||||
<span style="float: right;">
|
||||
<a href="#" onclick="$('#collage<?=$CollageID?>_box .images').toggle(); this.innerHTML=(this.innerHTML=='Hide'?'Show':'Hide'); return false;" class="brackets"><?=$FirstCol ? 'Hide' : 'Show' ?></a>
|
||||
<a href="#" onclick="$('#collage<?=$CollageID?>_box .images').gtoggle(); this.innerHTML = (this.innerHTML == 'Hide' ? 'Show' : 'Hide'); return false;" class="brackets"><?=$FirstCol ? 'Hide' : 'Show' ?></a>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
@ -721,7 +722,7 @@ function check_paranoia_here($Setting) {
|
||||
?>
|
||||
<div class="box" id="invitetree_box">
|
||||
<div class="head">
|
||||
<a href="#invitetree_box" class="brackets anchor">#</a> Invite tree <a href="#" onclick="$('#invitetree').toggle();return false;" class="brackets">View</a>
|
||||
<a href="#invitetree_box" class="brackets anchor">#</a> Invite tree <a href="#" onclick="$('#invitetree').gtoggle(); return false;" class="brackets">View</a>
|
||||
</div>
|
||||
<div id="invitetree" class="hidden">
|
||||
<? $Tree->make_tree(); ?>
|
||||
@ -754,7 +755,7 @@ function check_paranoia_here($Setting) {
|
||||
?>
|
||||
<div class="box" id="requests_box">
|
||||
<div class="head">
|
||||
<a href="#requests_box" class="brackets anchor">#</a> Requests <a href="#" onclick="$('#requests').toggle();return false;" class="brackets">View</a>
|
||||
<a href="#requests_box" class="brackets anchor">#</a> Requests <a href="#" onclick="$('#requests').gtoggle(); return false;" class="brackets">View</a>
|
||||
</div>
|
||||
<div id="requests" class="request_table hidden">
|
||||
<table cellpadding="6" cellspacing="1" border="0" class="border" width="100%">
|
||||
@ -857,7 +858,7 @@ function check_paranoia_here($Setting) {
|
||||
?>
|
||||
<div class="box" id="staffpms_box">
|
||||
<div class="head">
|
||||
<a href="#staffpms_box" class="brackets anchor">#</a> Staff PMs <a href="#" onclick="$('#staffpms').toggle();return false;" class="brackets">View</a>
|
||||
<a href="#staffpms_box" class="brackets anchor">#</a> Staff PMs <a href="#" onclick="$('#staffpms').gtoggle(); return false;" class="brackets">View</a>
|
||||
</div>
|
||||
<table width="100%" class="message_table hidden" id="staffpms">
|
||||
<tr class="colhead">
|
||||
@ -900,9 +901,6 @@ function check_paranoia_here($Setting) {
|
||||
</div>
|
||||
<? }
|
||||
}
|
||||
?>
|
||||
<br />
|
||||
<?
|
||||
|
||||
// Displays a table of forum warnings viewable only to Forum Moderators
|
||||
if ($LoggedUser['Class'] == 650 && check_perms('users_warn', $Class)) {
|
||||
@ -919,7 +917,6 @@ function check_paranoia_here($Setting) {
|
||||
<div id="forumwarningslinks" class="AdminComment box" style="width: 98%;"><?=$Text->full_format($ForumWarnings)?></div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<?
|
||||
}
|
||||
}
|
||||
@ -929,11 +926,11 @@ function check_paranoia_here($Setting) {
|
||||
<input type="hidden" name="userid" value="<?=$UserID?>" />
|
||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||
|
||||
<div class="box" id="staff_notes_box">
|
||||
<div class="box box2" id="staff_notes_box">
|
||||
<div class="head">
|
||||
<a href="#staff_notes_box" class="brackets anchor">#</a> Staff notes
|
||||
<a href="#" name="admincommentbutton" onclick="ChangeTo('text'); return false;" class="brackets">Edit</a>
|
||||
<a href="#" onclick="$('#staffnotes').toggle(); return false;" class="brackets">Toggle</a>
|
||||
<a href="#" onclick="$('#staffnotes').gtoggle(); return false;" class="brackets">Toggle</a>
|
||||
</div>
|
||||
<div id="staffnotes" class="pad">
|
||||
<input type="hidden" name="comment_hash" value="<?=$CommentHash?>" />
|
||||
@ -1129,7 +1126,7 @@ function check_paranoia_here($Setting) {
|
||||
</td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
</table><br />
|
||||
</table>
|
||||
|
||||
<? if (check_perms('users_warn')) { ?>
|
||||
<table class="layout" id="warn_user_box">
|
||||
@ -1190,7 +1187,7 @@ function check_paranoia_here($Setting) {
|
||||
</td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
</table><br />
|
||||
</table>
|
||||
<table class="layout" id="user_privs_box">
|
||||
<tr class="colhead">
|
||||
<td colspan="2">
|
||||
@ -1279,7 +1276,7 @@ function check_paranoia_here($Setting) {
|
||||
</tr>
|
||||
|
||||
<? } ?>
|
||||
</table><br />
|
||||
</table>
|
||||
<? if (check_perms('users_logout')) { ?>
|
||||
<table class="layout" id="session_box">
|
||||
<tr class="colhead">
|
||||
|
@ -255,7 +255,7 @@
|
||||
ob_end_clean();
|
||||
?>
|
||||
<tr class="rowa">
|
||||
<td><?=display_str($Record['Email'])?><?=(($MatchCount > 0) ? ' <a href="#" onclick="$(\'#matches_'.$j.'\').toggle();return false;">('.$MatchCount.')</a>' : '')?></td>
|
||||
<td><?=display_str($Record['Email'])?><?=(($MatchCount > 0) ? ' <a href="#" onclick="$(\'#matches_'.$j.'\').gtoggle(); return false;">('.$MatchCount.')</a>' : '')?></td>
|
||||
<td><?=time_diff($Record['StartTime'])?></td>
|
||||
<td><?=time_diff($Record['EndTime'])?></td>
|
||||
<td><?=time_diff($Record['ElapsedTime'])?></td>
|
||||
@ -312,7 +312,7 @@
|
||||
}
|
||||
?>
|
||||
<tr class="rowa">
|
||||
<td><?=display_str($Invite['Email'])?><?=(($MatchCount > 0) ? ' <a href="#" onclick="$(\'#matches_invite\').toggle();return false;">('.$MatchCount.')</a>' : '')?></td>
|
||||
<td><?=display_str($Invite['Email'])?><?=(($MatchCount > 0) ? ' <a href="#" onclick="$(\'#matches_invite\').gtoggle(); return false;">('.$MatchCount.')</a>' : '')?></td>
|
||||
<td>Never</td>
|
||||
<td><?=time_diff($Invite['EndTime'])?></td>
|
||||
<td><?=time_diff($Invite['AccountAge'])?></td>
|
||||
|
@ -41,7 +41,7 @@
|
||||
?>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
function ShowIPs(rowname) {
|
||||
$('tr[name="'+rowname+'"]').toggle();
|
||||
$('tr[name="'+rowname+'"]').gtoggle();
|
||||
|
||||
}
|
||||
function Ban(ip, id, elemID) {
|
||||
@ -169,8 +169,8 @@ function UnBan(ip, id, elemID) {
|
||||
<table id="iphistory">
|
||||
<tr class="colhead">
|
||||
<td>IP address</td>
|
||||
<td>Started <a href="#" onclick="$('#iphistory td:nth-child(2), #iphistory td:nth-child(4)').hide(); $('#iphistory td:nth-child(3), #iphistory td:nth-child(5)').show(); return false;" class="brackets">Toggle</a></td>
|
||||
<td class="hidden">Started <a href="#" onclick="$('#iphistory td:nth-child(2), #iphistory td:nth-child(4)').show(); $('#iphistory td:nth-child(3), #iphistory td:nth-child(5)').hide(); return false;" class="brackets">Toggle</a></td>
|
||||
<td>Started <a href="#" onclick="$('#iphistory td:nth-child(2), #iphistory td:nth-child(4)').ghide(); $('#iphistory td:nth-child(3), #iphistory td:nth-child(5)').gshow(); return false;" class="brackets">Toggle</a></td>
|
||||
<td class="hidden">Started <a href="#" onclick="$('#iphistory td:nth-child(2), #iphistory td:nth-child(4)').gshow(); $('#iphistory td:nth-child(3), #iphistory td:nth-child(5)').ghide(); return false;" class="brackets">Toggle</a></td>
|
||||
<td>Ended</td>
|
||||
<td class="hidden">Ended</td>
|
||||
<td>Elapsed</td>
|
||||
|
@ -39,7 +39,7 @@
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
function ShowIPs(rowname) {
|
||||
$('tr[name="'+rowname+'"]').toggle();
|
||||
$('tr[name="'+rowname+'"]').gtoggle();
|
||||
}
|
||||
</script>
|
||||
<?
|
||||
|
@ -251,7 +251,7 @@
|
||||
<strong><a href="collage.php?id=<?=$CollageID?>"><?=$CollageName?></a></strong> (<?=$NewTorrentCount?> new torrent<?=($NewTorrentCount == 1 ? '' : 's')?>)
|
||||
</span>
|
||||
<span style="float: right;">
|
||||
<a href="#" onclick="$('#discog_table_<?=$CollageID?>').toggle(); this.innerHTML=(this.innerHTML=='Hide'?'Show':'Hide'); return false;" class="brackets"><?=$ShowAll ? 'Show' : 'Hide' ?></a> <a href="userhistory.php?action=catchup_collages&auth=<?=$LoggedUser['AuthKey']?>&collageid=<?=$CollageID?>" class="brackets">Catch up</a> <a href="#" onclick="CollageSubscribe(<?=$CollageID?>); return false;" id="subscribelink<?=$CollageID?>" class="brackets">Unsubscribe</a>
|
||||
<a href="#" onclick="$('#discog_table_<?=$CollageID?>').gtoggle(); this.innerHTML = (this.innerHTML == 'Hide' ? 'Show' : 'Hide'); return false;" class="brackets"><?=($ShowAll ? 'Show' : 'Hide')?></a> <a href="userhistory.php?action=catchup_collages&auth=<?=$LoggedUser['AuthKey']?>&collageid=<?=$CollageID?>" class="brackets">Catch up</a> <a href="#" onclick="CollageSubscribe(<?=$CollageID?>); return false;" id="subscribelink<?=$CollageID?>" class="brackets">Unsubscribe</a>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -9,7 +9,7 @@
|
||||
Example usage 1:
|
||||
ajax.handle = function () {
|
||||
$('#preview' + postid).raw().innerHTML = ajax.response;
|
||||
$('#editbox' + postid).hide();
|
||||
$('#editbox' + postid).ghide();
|
||||
}
|
||||
ajax.post("ajax.php?action=preview","#form-id" + postid);
|
||||
|
||||
|
@ -2,50 +2,52 @@ var dragObjects = null;
|
||||
var dragObjectPlaceholder = null;
|
||||
|
||||
function editOrdering() {
|
||||
$('#editlayout').hide();
|
||||
$('#releasetypes').hide();
|
||||
$('#linkbox').hide();
|
||||
$('.sidebar').hide();
|
||||
$('.main_column > .box').hide(); // Artist info
|
||||
$('.main_column > #requests').hide();
|
||||
$('#editlayout').ghide();
|
||||
$('#releasetypes').ghide();
|
||||
$('#linkbox').ghide();
|
||||
$('.sidebar').ghide();
|
||||
$('.main_column > .box').ghide(); // Artist info
|
||||
$('.main_column > #requests').ghide();
|
||||
|
||||
$('#savelayout').show();
|
||||
$('#emptylinkbox').show();
|
||||
$('#torrents_allopenclose').show();
|
||||
$('#savelayout').gshow();
|
||||
$('#emptylinkbox').gshow();
|
||||
$('#torrents_allopenclose').gshow();
|
||||
|
||||
dragObjects = new Array();
|
||||
|
||||
var elems = $('#torrents_tables table').objects;
|
||||
for(i in elems) {
|
||||
for (i in elems) {
|
||||
var elemID = elems[i].id;
|
||||
if (elemID == undefined) {
|
||||
continue;
|
||||
}
|
||||
if (elemID.indexOf('torrents_') == 0) {
|
||||
$('#'+elemID).show();
|
||||
$('#' + elemID).gshow();
|
||||
dragObjects[elemID] = new dragObject(elemID, elemID+'_handle', startDrag, moveDrag, endDrag);
|
||||
var classes = elems[i].className.split(' ');
|
||||
for(var j=0; classes.length; j++) {
|
||||
for (var j = 0; classes.length; j++) {
|
||||
if (classes[j].indexOf('releases_') == 0) {
|
||||
$('.'+classes[j].replace('_table', '')).hide();
|
||||
$('.artist_editcol').show();
|
||||
$('.artist_normalcol').hide();
|
||||
$('.'+classes[j].replace('_table', '')).ghide();
|
||||
$('.artist_editcol').gshow();
|
||||
$('.artist_normalcol').ghide();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(i in dragObjects) { dragObjects[i].StartListening(); }
|
||||
for (i in dragObjects) {
|
||||
dragObjects[i].StartListening();
|
||||
}
|
||||
}
|
||||
|
||||
function saveOrdering() {
|
||||
$('#savelayout').hide();
|
||||
$('#savinglayout').show();
|
||||
$('#savelayout').ghide();
|
||||
$('#savinglayout').gshow();
|
||||
|
||||
var elems = $('#torrents_tables table').objects;
|
||||
var releaseTypes = "{";
|
||||
for(i in elems) {
|
||||
for (i in elems) {
|
||||
var elemID = elems[i].id;
|
||||
var releaseType = null;
|
||||
if (elemID == undefined) {
|
||||
@ -87,7 +89,7 @@ function saveOrderingCallback(response) {
|
||||
|
||||
//Ordering in linkbox
|
||||
var prevOrderedLink = null;
|
||||
for(releaseType in releaseTypes) {
|
||||
for (releaseType in releaseTypes) {
|
||||
var elem = $('#torrents_' + releaseType + '_anchorlink').raw();
|
||||
if (elem == undefined) {
|
||||
continue;
|
||||
@ -102,7 +104,7 @@ function saveOrderingCallback(response) {
|
||||
|
||||
//Now let's return to the non editing layout.
|
||||
var elems = $('#torrents_tables table').objects;
|
||||
for(i in elems) {
|
||||
for (i in elems) {
|
||||
var elemID = elems[i].id;
|
||||
if (elemID == undefined) {
|
||||
continue;
|
||||
@ -110,45 +112,45 @@ function saveOrderingCallback(response) {
|
||||
if (elemID.indexOf('torrents_') == 0) {
|
||||
var classes = elems[i].className.split(' ');
|
||||
var empty = false;
|
||||
for(var j=0; classes.length; j++) {
|
||||
for (var j = 0; classes.length; j++) {
|
||||
if (classes[j] == null) {
|
||||
break;
|
||||
}
|
||||
if (classes[j].indexOf('releases_') == 0) {
|
||||
$('.artist_editcol').hide();
|
||||
$('.artist_normalcol').show();
|
||||
$('.artist_editcol').ghide();
|
||||
$('.artist_normalcol').gshow();
|
||||
}
|
||||
if (classes[j].indexOf('empty') == 0) {
|
||||
empty = true;
|
||||
}
|
||||
}
|
||||
if (empty) {
|
||||
$('#'+elemID).hide();
|
||||
$('#' + elemID).ghide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(i in dragObjects) {
|
||||
for (i in dragObjects) {
|
||||
dragObjects[i].StopListening();
|
||||
}
|
||||
dragObjects = null;
|
||||
|
||||
$('#savinglayout').hide();
|
||||
$('#emptylinkbox').hide();
|
||||
$('#torrents_allopenclose').hide();
|
||||
$('#savinglayout').ghide();
|
||||
$('#emptylinkbox').ghide();
|
||||
$('#torrents_allopenclose').ghide();
|
||||
|
||||
$('#editlayout').show();
|
||||
$('#releasetypes').show();
|
||||
$('#linkbox').show();
|
||||
$('.sidebar').show();
|
||||
$('.main_column > .box').show(); // Artist info
|
||||
$('.main_column > #requests').show();
|
||||
$('#editlayout').gshow();
|
||||
$('#releasetypes').gshow();
|
||||
$('#linkbox').gshow();
|
||||
$('.sidebar').gshow();
|
||||
$('.main_column > .box').gshow(); // Artist info
|
||||
$('.main_column > #requests').gshow();
|
||||
}
|
||||
|
||||
function setDefaultShow(id, show) {
|
||||
if (id == 'all') {
|
||||
var elems = $('#torrents_tables table').objects;
|
||||
for(i in elems) {
|
||||
for (i in elems) {
|
||||
var elemID = elems[i].id;
|
||||
var releaseType = null;
|
||||
if (elemID == undefined) {
|
||||
@ -156,7 +158,7 @@ function setDefaultShow(id, show) {
|
||||
}
|
||||
if (elemID.indexOf('torrents_') == 0) {
|
||||
var classes = elems[i].className.split(' ');
|
||||
for(var j=0; classes.length; j++) {
|
||||
for (var j = 0; classes.length; j++) {
|
||||
if (classes[j] == null) {
|
||||
break;
|
||||
}
|
||||
@ -168,25 +170,25 @@ function setDefaultShow(id, show) {
|
||||
setDefaultShow(releaseType, show);
|
||||
}
|
||||
} else if (show) {
|
||||
$('#releases_'+id+'_openlink').hide();
|
||||
$('#releases_'+id+'_closedlink').show();
|
||||
$('#releases_'+id+'_openlink').ghide();
|
||||
$('#releases_'+id+'_closedlink').gshow();
|
||||
$('#releases_'+id+'_defaultopen').raw().checked = 'checked';
|
||||
} else {
|
||||
$('#releases_'+id+'_openlink').show();
|
||||
$('#releases_'+id+'_closedlink').hide();
|
||||
$('#releases_'+id+'_openlink').gshow();
|
||||
$('#releases_'+id+'_closedlink').ghide();
|
||||
$('#releases_'+id+'_defaultopen').raw().checked = '';
|
||||
}
|
||||
}
|
||||
|
||||
function setShow(id, show) {
|
||||
if (show) {
|
||||
$('#releases_'+id+'_viewlink').hide();
|
||||
$('#releases_'+id+'_hidelink').show();
|
||||
$('.releases_'+id).show();
|
||||
$('#releases_'+id+'_viewlink').ghide();
|
||||
$('#releases_'+id+'_hidelink').gshow();
|
||||
$('.releases_'+id).gshow();
|
||||
} else {
|
||||
$('#releases_'+id+'_viewlink').show();
|
||||
$('#releases_'+id+'_hidelink').hide();
|
||||
$('.releases_'+id).hide();
|
||||
$('#releases_'+id+'_viewlink').gshow();
|
||||
$('#releases_'+id+'_hidelink').ghide();
|
||||
$('.releases_'+id).ghide();
|
||||
}
|
||||
}
|
||||
|
||||
@ -215,7 +217,7 @@ function moveDrag(element) {
|
||||
var bestItem = 'END';
|
||||
elems = element.parentNode.childNodes;
|
||||
|
||||
for(var i=0; i < elems.length; i++) {
|
||||
for (var i = 0; i < elems.length; i++) {
|
||||
elem = elems[i];
|
||||
if (elem == element || elem.nodeName != 'TABLE') {
|
||||
continue;
|
||||
|
@ -1,10 +1,10 @@
|
||||
var BBCode = {
|
||||
spoiler: function(link) {
|
||||
if ($(link.nextSibling).has_class('hidden')) {
|
||||
$(link.nextSibling).show();
|
||||
$(link.nextSibling).gshow();
|
||||
$(link).html('Hide');
|
||||
} else {
|
||||
$(link.nextSibling).hide();
|
||||
$(link.nextSibling).ghide();
|
||||
$(link).html('Show');
|
||||
}
|
||||
}
|
||||
|
@ -1,80 +1,80 @@
|
||||
function show_peers (TorrentID, Page) {
|
||||
if (Page > 0) {
|
||||
ajax.get('torrents.php?action=peerlist&page='+Page+'&torrentid=' + TorrentID,function(response) {
|
||||
$('#peers_' + TorrentID).show().raw().innerHTML=response;
|
||||
$('#peers_' + TorrentID).gshow().raw().innerHTML=response;
|
||||
});
|
||||
} else {
|
||||
if ($('#peers_' + TorrentID).raw().innerHTML === '') {
|
||||
$('#peers_' + TorrentID).show().raw().innerHTML = '<h4>Loading...</h4>';
|
||||
$('#peers_' + TorrentID).gshow().raw().innerHTML = '<h4>Loading...</h4>';
|
||||
ajax.get('torrents.php?action=peerlist&torrentid=' + TorrentID,function(response) {
|
||||
$('#peers_' + TorrentID).show().raw().innerHTML=response;
|
||||
$('#peers_' + TorrentID).gshow().raw().innerHTML=response;
|
||||
});
|
||||
} else {
|
||||
$('#peers_' + TorrentID).toggle();
|
||||
$('#peers_' + TorrentID).gtoggle();
|
||||
}
|
||||
}
|
||||
$('#snatches_' + TorrentID).hide();
|
||||
$('#downloads_' + TorrentID).hide();
|
||||
$('#files_' + TorrentID).hide();
|
||||
$('#reported_' + TorrentID).hide();
|
||||
$('#snatches_' + TorrentID).ghide();
|
||||
$('#downloads_' + TorrentID).ghide();
|
||||
$('#files_' + TorrentID).ghide();
|
||||
$('#reported_' + TorrentID).ghide();
|
||||
}
|
||||
|
||||
function show_snatches (TorrentID, Page) {
|
||||
if (Page > 0) {
|
||||
ajax.get('torrents.php?action=snatchlist&page='+Page+'&torrentid=' + TorrentID,function(response) {
|
||||
$('#snatches_' + TorrentID).show().raw().innerHTML=response;
|
||||
$('#snatches_' + TorrentID).gshow().raw().innerHTML=response;
|
||||
});
|
||||
} else {
|
||||
if ($('#snatches_' + TorrentID).raw().innerHTML === '') {
|
||||
$('#snatches_' + TorrentID).show().raw().innerHTML = '<h4>Loading...</h4>';
|
||||
$('#snatches_' + TorrentID).gshow().raw().innerHTML = '<h4>Loading...</h4>';
|
||||
ajax.get('torrents.php?action=snatchlist&torrentid=' + TorrentID,function(response) {
|
||||
$('#snatches_' + TorrentID).show().raw().innerHTML=response;
|
||||
$('#snatches_' + TorrentID).gshow().raw().innerHTML=response;
|
||||
});
|
||||
} else {
|
||||
$('#snatches_' + TorrentID).toggle();
|
||||
$('#snatches_' + TorrentID).gtoggle();
|
||||
}
|
||||
}
|
||||
$('#peers_' + TorrentID).hide();
|
||||
$('#downloads_' + TorrentID).hide();
|
||||
$('#files_' + TorrentID).hide();
|
||||
$('#reported_' + TorrentID).hide();
|
||||
$('#peers_' + TorrentID).ghide();
|
||||
$('#downloads_' + TorrentID).ghide();
|
||||
$('#files_' + TorrentID).ghide();
|
||||
$('#reported_' + TorrentID).ghide();
|
||||
}
|
||||
|
||||
function show_downloads (TorrentID, Page) {
|
||||
if (Page > 0) {
|
||||
ajax.get('torrents.php?action=downloadlist&page='+Page+'&torrentid=' + TorrentID,function(response) {
|
||||
$('#downloads_' + TorrentID).show().raw().innerHTML=response;
|
||||
$('#downloads_' + TorrentID).gshow().raw().innerHTML=response;
|
||||
});
|
||||
} else {
|
||||
if ($('#downloads_' + TorrentID).raw().innerHTML === '') {
|
||||
$('#downloads_' + TorrentID).show().raw().innerHTML = '<h4>Loading...</h4>';
|
||||
$('#downloads_' + TorrentID).gshow().raw().innerHTML = '<h4>Loading...</h4>';
|
||||
ajax.get('torrents.php?action=downloadlist&torrentid=' + TorrentID,function(response) {
|
||||
$('#downloads_' + TorrentID).raw().innerHTML=response;
|
||||
});
|
||||
} else {
|
||||
$('#downloads_' + TorrentID).toggle();
|
||||
$('#downloads_' + TorrentID).gtoggle();
|
||||
}
|
||||
}
|
||||
$('#peers_' + TorrentID).hide();
|
||||
$('#snatches_' + TorrentID).hide();
|
||||
$('#files_' + TorrentID).hide();
|
||||
$('#reported_' + TorrentID).hide();
|
||||
$('#peers_' + TorrentID).ghide();
|
||||
$('#snatches_' + TorrentID).ghide();
|
||||
$('#files_' + TorrentID).ghide();
|
||||
$('#reported_' + TorrentID).ghide();
|
||||
}
|
||||
|
||||
function show_files(TorrentID) {
|
||||
$('#files_' + TorrentID).toggle();
|
||||
$('#peers_' + TorrentID).hide();
|
||||
$('#snatches_' + TorrentID).hide();
|
||||
$('#downloads_' + TorrentID).hide();
|
||||
$('#reported_' + TorrentID).hide();
|
||||
$('#files_' + TorrentID).gtoggle();
|
||||
$('#peers_' + TorrentID).ghide();
|
||||
$('#snatches_' + TorrentID).ghide();
|
||||
$('#downloads_' + TorrentID).ghide();
|
||||
$('#reported_' + TorrentID).ghide();
|
||||
}
|
||||
|
||||
function show_reported(TorrentID) {
|
||||
$('#files_' + TorrentID).hide();
|
||||
$('#peers_' + TorrentID).hide();
|
||||
$('#snatches_' + TorrentID).hide();
|
||||
$('#downloads_' + TorrentID).hide();
|
||||
$('#reported_' + TorrentID).toggle();
|
||||
$('#files_' + TorrentID).ghide();
|
||||
$('#peers_' + TorrentID).ghide();
|
||||
$('#snatches_' + TorrentID).ghide();
|
||||
$('#downloads_' + TorrentID).ghide();
|
||||
$('#reported_' + TorrentID).gtoggle();
|
||||
}
|
||||
|
||||
function add_tag(tag) {
|
||||
@ -111,17 +111,17 @@ function toggle_group(groupid, link, event) {
|
||||
if (showing) {
|
||||
// show the row depending on whether the edition it's in is collapsed or not
|
||||
if (row.has_class('edition')) {
|
||||
row.show();
|
||||
row.gshow();
|
||||
showRow = ($('a', row.raw()).raw().innerHTML != '+');
|
||||
} else {
|
||||
if (showRow) {
|
||||
row.show();
|
||||
row.gshow();
|
||||
} else {
|
||||
row.hide();
|
||||
row.ghide();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
row.hide();
|
||||
row.ghide();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -151,9 +151,9 @@ function toggle_edition(groupid, editionid, lnk, event) {
|
||||
}
|
||||
if (allEditions || row.has_class('edition_' + editionid)) {
|
||||
if (showing && !row.has_class('torrentdetails')) {
|
||||
row.show();
|
||||
row.gshow();
|
||||
} else {
|
||||
row.hide();
|
||||
row.ghide();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -167,27 +167,27 @@ function toggle_edition(groupid, editionid, lnk, event) {
|
||||
function toggleTorrentSearch(mode) {
|
||||
if (mode == 0) {
|
||||
var link = $('#ft_toggle').raw();
|
||||
$('#ft_container').toggle();
|
||||
$('#ft_container').gtoggle();
|
||||
link.innerHTML = link.textContent == 'Hide' ? 'Show' : 'Hide';
|
||||
} if (mode == 'basic') {
|
||||
$('.fti_advanced').disable();
|
||||
$('.fti_basic').enable();
|
||||
$('.ftr_advanced').hide(true);
|
||||
$('.ftr_basic').show();
|
||||
$('#ft_advanced_link').show();
|
||||
$('#ft_advanced_text').hide();
|
||||
$('#ft_basic_link').hide();
|
||||
$('#ft_basic_text').show();
|
||||
$('.ftr_advanced').ghide(true);
|
||||
$('.ftr_basic').gshow();
|
||||
$('#ft_advanced_link').gshow();
|
||||
$('#ft_advanced_text').ghide();
|
||||
$('#ft_basic_link').ghide();
|
||||
$('#ft_basic_text').gshow();
|
||||
$('#ft_type').raw().value = 'basic';
|
||||
} else if (mode == 'advanced') {
|
||||
$('.fti_advanced').enable();
|
||||
$('.fti_basic').disable();
|
||||
$('.ftr_advanced').show();
|
||||
$('.ftr_basic').hide();
|
||||
$('#ft_advanced_link').hide();
|
||||
$('#ft_advanced_text').show();
|
||||
$('#ft_basic_link').show();
|
||||
$('#ft_basic_text').hide();
|
||||
$('.ftr_advanced').gshow();
|
||||
$('.ftr_basic').ghide();
|
||||
$('#ft_advanced_link').ghide();
|
||||
$('#ft_advanced_text').gshow();
|
||||
$('#ft_basic_link').gshow();
|
||||
$('#ft_basic_text').ghide();
|
||||
$('#ft_type').raw().value = 'advanced';
|
||||
}
|
||||
return false;
|
||||
@ -197,9 +197,9 @@ function toggleTorrentSearch(mode) {
|
||||
function Bitrate() {
|
||||
$('#other_bitrate').raw().value = '';
|
||||
if ($('#bitrate').raw().options[$('#bitrate').raw().selectedIndex].value == 'Other') {
|
||||
$('#other_bitrate_span').show();
|
||||
$('#other_bitrate_span').gshow();
|
||||
} else {
|
||||
$('#other_bitrate_span').hide();
|
||||
$('#other_bitrate_span').ghide();
|
||||
}
|
||||
}
|
||||
|
||||
@ -256,11 +256,10 @@ function addCoverField() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function ToggleEditionRows() {
|
||||
$('#edition_title').toggle();
|
||||
$('#edition_label').toggle();
|
||||
$('#edition_catalogue').toggle();
|
||||
$('#edition_title').gtoggle();
|
||||
$('#edition_label').gtoggle();
|
||||
$('#edition_catalogue').gtoggle();
|
||||
}
|
||||
|
||||
function check_private(TorrentID) {
|
||||
|
@ -65,10 +65,10 @@ var collageShow = {
|
||||
lists = $('.collage_images').objects;
|
||||
i = lists.length;
|
||||
while (i--) {
|
||||
$(lists[i]).hide();
|
||||
$(lists[i]).ghide();
|
||||
}
|
||||
|
||||
$(ul).show();
|
||||
$(ul).gshow();
|
||||
if (s) {
|
||||
$(s).remove_class('selected');
|
||||
}
|
||||
@ -84,13 +84,13 @@ var collageShow = {
|
||||
}
|
||||
last = Math.min(first + 4, this.max);
|
||||
for (i = 0; i < first; i++) {
|
||||
$('#pagelink' + i).hide();
|
||||
$('#pagelink' + i).ghide();
|
||||
}
|
||||
for (i = first; i <= last; i++) {
|
||||
$('#pagelink' + i).show();
|
||||
$('#pagelink' + i).gshow();
|
||||
}
|
||||
for (i = last + 1; i <= this.max; i++) {
|
||||
$('#pagelink' + i).hide();
|
||||
$('#pagelink' + i).ghide();
|
||||
}
|
||||
|
||||
// Toggle the first, prev, next, and last links
|
||||
@ -117,9 +117,9 @@ var collageShow = {
|
||||
|
||||
// Toggle the bar
|
||||
if ((last == this.max) && (this.pg != this.max)) {
|
||||
$('#nextbar').show();
|
||||
$('#nextbar').gshow();
|
||||
} else {
|
||||
$('#nextbar').hide();
|
||||
$('#nextbar').ghide();
|
||||
}
|
||||
},
|
||||
nextPage:function() {
|
||||
|
@ -38,7 +38,7 @@ function Edit_Form(post,key) {
|
||||
postid = post;
|
||||
//If no edit is already going underway or a previous edit was finished, make the necessary dom changes.
|
||||
if (!$('#editbox' + postid).objects[0] || $('#editbox' + postid + '.hidden').objects[0]) {
|
||||
$('#reply_box').hide();
|
||||
$('#reply_box').ghide();
|
||||
if (location.href.match(/torrents\.php/) ||
|
||||
location.href.match(/artist\.php/)) {
|
||||
boxWidth="50";
|
||||
@ -74,7 +74,7 @@ function Edit_Form(post,key) {
|
||||
function Cancel_Edit(postid) {
|
||||
var answer = confirm("Are you sure you want to cancel?");
|
||||
if (answer) {
|
||||
$('#reply_box').show();
|
||||
$('#reply_box').gshow();
|
||||
$('#bar' + postid).raw().innerHTML = $('#bar' + postid).raw().oldbar;
|
||||
$('#content' + postid).raw().innerHTML = $('#bar' + postid).raw().cancel;
|
||||
}
|
||||
@ -84,48 +84,48 @@ function Preview_Edit(postid) {
|
||||
$('#bar' + postid).raw().innerHTML = "<input type=\"button\" value=\"Editor\" onclick=\"Cancel_Preview(" + postid + ");\" /><input type=\"button\" value=\"Post\" onclick=\"Save_Edit(" + postid + ")\" /><input type=\"button\" value=\"Cancel\" onclick=\"Cancel_Edit(" + postid + ");\" />";
|
||||
ajax.post("ajax.php?action=preview","form" + postid, function(response) {
|
||||
$('#preview' + postid).raw().innerHTML = response;
|
||||
$('#editbox' + postid).hide();
|
||||
$('#editbox' + postid).ghide();
|
||||
});
|
||||
}
|
||||
|
||||
function Cancel_Preview(postid) {
|
||||
$('#bar' + postid).raw().innerHTML = "<input type=\"button\" value=\"Preview\" onclick=\"Preview_Edit(" + postid + ");\" /><input type=\"button\" value=\"Post\" onclick=\"Save_Edit(" + postid + ")\" /><input type=\"button\" value=\"Cancel\" onclick=\"Cancel_Edit(" + postid + ");\" />";
|
||||
$('#preview' + postid).raw().innerHTML = "";
|
||||
$('#editbox' + postid).show();
|
||||
$('#editbox' + postid).gshow();
|
||||
}
|
||||
|
||||
function Save_Edit(postid) {
|
||||
$('#reply_box').show();
|
||||
$('#reply_box').gshow();
|
||||
if (location.href.match(/forums\.php/)) {
|
||||
ajax.post("forums.php?action=takeedit","form" + postid, function (response) {
|
||||
$('#bar' + postid).raw().innerHTML = "<a href=\"reports.php?action=report&type=post&id="+postid+"\" class=\"brackets\">Report</a> <a href=\"#\">↑</a>";
|
||||
$('#preview' + postid).raw().innerHTML = response;
|
||||
$('#editbox' + postid).hide();
|
||||
$('#pmbox' + postid).hide();
|
||||
$('#editbox' + postid).ghide();
|
||||
$('#pmbox' + postid).ghide();
|
||||
});
|
||||
} else if (location.href.match(/collages?\.php/)) {
|
||||
ajax.post("collages.php?action=takeedit_comment","form" + postid, function (response) {
|
||||
$('#bar' + postid).raw().innerHTML = "";
|
||||
$('#preview' + postid).raw().innerHTML = response;
|
||||
$('#editbox' + postid).hide();
|
||||
$('#editbox' + postid).ghide();
|
||||
});
|
||||
} else if (location.href.match(/requests\.php/)) {
|
||||
ajax.post("requests.php?action=takeedit_comment","form" + postid, function (response) {
|
||||
$('#bar' + postid).raw().innerHTML = "";
|
||||
$('#preview' + postid).raw().innerHTML = response;
|
||||
$('#editbox' + postid).hide();
|
||||
$('#editbox' + postid).ghide();
|
||||
});
|
||||
} else if (location.href.match(/artist\.php/)) {
|
||||
ajax.post("artist.php?action=takeedit_post","form" + postid, function (response) {
|
||||
$('#bar' + postid).raw().innerHTML = "";
|
||||
$('#preview' + postid).raw().innerHTML = response;
|
||||
$('#editbox' + postid).hide();
|
||||
$('#editbox' + postid).ghide();
|
||||
});
|
||||
} else {
|
||||
ajax.post("torrents.php?action=takeedit_post","form" + postid, function (response) {
|
||||
$('#bar' + postid).raw().innerHTML = "";
|
||||
$('#preview' + postid).raw().innerHTML = response;
|
||||
$('#editbox' + postid).hide();
|
||||
$('#editbox' + postid).ghide();
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -135,23 +135,23 @@ function Delete(post) {
|
||||
if (confirm('Are you sure you wish to delete this post?') == true) {
|
||||
if (location.href.match(/forums\.php/)) {
|
||||
ajax.get("forums.php?action=delete&auth=" + authkey + "&postid=" + postid, function () {
|
||||
$('#post' + postid).hide();
|
||||
$('#post' + postid).ghide();
|
||||
});
|
||||
} else if (location.href.match(/collages?\.php/)) {
|
||||
ajax.get("collages.php?action=delete_comment&auth=" + authkey + "&postid=" + postid, function () {
|
||||
$('#post' + postid).hide();
|
||||
$('#post' + postid).ghide();
|
||||
});
|
||||
} else if (location.href.match(/requests\.php/)) {
|
||||
ajax.get("requests.php?action=delete_comment&auth=" + authkey + "&postid=" + postid, function () {
|
||||
$('#post' + postid).hide();
|
||||
$('#post' + postid).ghide();
|
||||
});
|
||||
} else if (location.href.match(/artist\.php/)) {
|
||||
ajax.get("artist.php?action=delete_comment&auth="+authkey+ "&postid=" + postid, function () {
|
||||
$('#post' + postid).hide();
|
||||
$('#post' + postid).ghide();
|
||||
});
|
||||
} else {
|
||||
ajax.get("torrents.php?action=delete_post&auth=" + authkey + "&postid=" + postid, function () {
|
||||
$('#post' + postid).hide();
|
||||
$('#post' + postid).ghide();
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -162,9 +162,9 @@ function Quick_Preview() {
|
||||
$('#post_preview').raw().value = "Make changes";
|
||||
$('#post_preview').raw().preview = true;
|
||||
ajax.post("ajax.php?action=preview","quickpostform", function(response) {
|
||||
$('#quickreplypreview').show();
|
||||
$('#quickreplypreview').gshow();
|
||||
$('#contentpreview').raw().innerHTML = response;
|
||||
$('#quickreplytext').hide();
|
||||
$('#quickreplytext').ghide();
|
||||
});
|
||||
}
|
||||
|
||||
@ -172,13 +172,13 @@ function Quick_Edit() {
|
||||
var quickreplybuttons;
|
||||
$('#post_preview').raw().value = "Preview";
|
||||
$('#post_preview').raw().preview = false;
|
||||
$('#quickreplypreview').hide();
|
||||
$('#quickreplytext').show();
|
||||
$('#quickreplypreview').ghide();
|
||||
$('#quickreplytext').gshow();
|
||||
}
|
||||
|
||||
function Newthread_Preview(mode) {
|
||||
$('#newthreadpreviewbutton').toggle();
|
||||
$('#newthreadeditbutton').toggle();
|
||||
$('#newthreadpreviewbutton').gtoggle();
|
||||
$('#newthreadeditbutton').gtoggle();
|
||||
if (mode) { // Preview
|
||||
ajax.post("ajax.php?action=preview","newthreadform", function(response) {
|
||||
$('#contentpreview').raw().innerHTML = response;
|
||||
@ -205,11 +205,11 @@ function Newthread_Preview(mode) {
|
||||
$('#pollanswers').raw().appendChild(document.createElement('br'));
|
||||
}
|
||||
if ($('#pollanswers').raw().children.length > 4) {
|
||||
$('#pollpreview').show();
|
||||
$('#pollpreview').gshow();
|
||||
}
|
||||
}
|
||||
} else { // Back to editor
|
||||
$('#pollpreview').hide();
|
||||
$('#pollpreview').ghide();
|
||||
$('#newthreadtitle').raw().innerHTML = 'New Topic';
|
||||
var pollanswers = $('#pollanswers').raw();
|
||||
if (pollanswers) {
|
||||
@ -218,9 +218,9 @@ function Newthread_Preview(mode) {
|
||||
pollanswers.parentNode.replaceChild(el, pollanswers);
|
||||
}
|
||||
}
|
||||
$('#newthreadtext').toggle();
|
||||
$('#newthreadpreview').toggle();
|
||||
$('#subscribediv').toggle();
|
||||
$('#newthreadtext').gtoggle();
|
||||
$('#newthreadpreview').gtoggle();
|
||||
$('#subscribediv').gtoggle();
|
||||
}
|
||||
|
||||
function LoadEdit(type, post, depth) {
|
||||
|
@ -21,9 +21,9 @@ function toggleChecks(formElem,masterElem) {
|
||||
var lightbox = {
|
||||
init: function (image, size) {
|
||||
if (typeof(image) == 'string') {
|
||||
$('#lightbox').show().listen('click',lightbox.unbox).raw().innerHTML =
|
||||
$('#lightbox').gshow().listen('click',lightbox.unbox).raw().innerHTML =
|
||||
'<p size="7" style="color: gray; font-size: 50px;">Loading...<p>';
|
||||
$('#curtain').show().listen('click',lightbox.unbox);
|
||||
$('#curtain').gshow().listen('click',lightbox.unbox);
|
||||
var src = image;
|
||||
image = new Image();
|
||||
image.onload = function() {
|
||||
@ -48,8 +48,8 @@ var lightbox = {
|
||||
hasA = true;
|
||||
}
|
||||
if (!hasA) {
|
||||
$('#lightbox').show().listen('click',lightbox.unbox).raw().innerHTML = '<img src="' + image.src + '" />';
|
||||
$('#curtain').show().listen('click',lightbox.unbox);
|
||||
$('#lightbox').gshow().listen('click',lightbox.unbox).raw().innerHTML = '<img src="' + image.src + '" alt="" />';
|
||||
$('#curtain').gshow().listen('click',lightbox.unbox);
|
||||
}
|
||||
},
|
||||
box_async: function (image) {
|
||||
@ -58,12 +58,12 @@ var lightbox = {
|
||||
hasA = true;
|
||||
}
|
||||
if (!hasA) {
|
||||
$('#lightbox').raw().innerHTML = '<img src="' + image.src + '" />';
|
||||
$('#lightbox').raw().innerHTML = '<img src="' + image.src + '" alt="" />';
|
||||
}
|
||||
},
|
||||
unbox: function (data) {
|
||||
$('#curtain').hide();
|
||||
$('#lightbox').hide().raw().innerHTML = '';
|
||||
$('#curtain').ghide();
|
||||
$('#lightbox').ghide().raw().innerHTML = '';
|
||||
}
|
||||
};
|
||||
|
||||
@ -79,7 +79,7 @@ function caps_check(e) {
|
||||
return;
|
||||
}
|
||||
if ((e.which > 64 && e.which < 91 && !e.shiftKey) || (e.which > 96 && e.which < 123 && e.shiftKey)) {
|
||||
$('#capslock').show();
|
||||
$('#capslock').gshow();
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
@ -3,14 +3,14 @@
|
||||
function Quick_Preview() {
|
||||
$('#buttons').raw().innerHTML = "<input type=\"button\" value=\"Editor\" onclick=\"Quick_Edit();\" /><input type=\"submit\" value=\"Send Message\" />";
|
||||
ajax.post("ajax.php?action=preview","messageform", function(response) {
|
||||
$('#quickpost').hide();
|
||||
$('#quickpost').ghide();
|
||||
$('#preview').raw().innerHTML = response;
|
||||
$('#preview').show();
|
||||
$('#preview').gshow();
|
||||
});
|
||||
}
|
||||
|
||||
function Quick_Edit() {
|
||||
$('#buttons').raw().innerHTML = "<input type=\"button\" value=\"Preview\" onclick=\"Quick_Preview();\" /><input type=\"submit\" value=\"Send Message\" />";
|
||||
$('#preview').hide();
|
||||
$('#quickpost').show();
|
||||
$('#preview').ghide();
|
||||
$('#quickpost').gshow();
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
//Couldn't use an associative array because javascript sorting is stupid http://dev-answers.blogspot.com/2012/03/javascript-object-keys-being-sorted-in.html
|
||||
//Couldn't use an associative array because JavaScript sorting is stupid http://dev-answers.blogspot.com/2012/03/javascript-object-keys-being-sorted-in.html
|
||||
|
||||
jQuery(document).ready(function ($) {
|
||||
var serialize = function () {
|
||||
|
@ -122,32 +122,32 @@ function RemoveArtistField() {
|
||||
function Categories() {
|
||||
var cat = $('#categories').raw().options[$('#categories').raw().selectedIndex].value;
|
||||
if (cat == "Music") {
|
||||
$('#artist_tr').show();
|
||||
$('#releasetypes_tr').show();
|
||||
$('#formats_tr').show();
|
||||
$('#bitrates_tr').show();
|
||||
$('#media_tr').show();
|
||||
$('#artist_tr').gshow();
|
||||
$('#releasetypes_tr').gshow();
|
||||
$('#formats_tr').gshow();
|
||||
$('#bitrates_tr').gshow();
|
||||
$('#media_tr').gshow();
|
||||
ToggleLogCue();
|
||||
$('#year_tr').show();
|
||||
$('#cataloguenumber_tr').show();
|
||||
$('#year_tr').gshow();
|
||||
$('#cataloguenumber_tr').gshow();
|
||||
} else if (cat == "Audiobooks" || cat == "Comedy") {
|
||||
$('#year_tr').show();
|
||||
$('#artist_tr').hide();
|
||||
$('#releasetypes_tr').hide();
|
||||
$('#formats_tr').hide();
|
||||
$('#bitrates_tr').hide();
|
||||
$('#media_tr').hide();
|
||||
$('#logcue_tr').hide();
|
||||
$('#cataloguenumber_tr').hide();
|
||||
$('#year_tr').gshow();
|
||||
$('#artist_tr').ghide();
|
||||
$('#releasetypes_tr').ghide();
|
||||
$('#formats_tr').ghide();
|
||||
$('#bitrates_tr').ghide();
|
||||
$('#media_tr').ghide();
|
||||
$('#logcue_tr').ghide();
|
||||
$('#cataloguenumber_tr').ghide();
|
||||
} else {
|
||||
$('#artist_tr').hide();
|
||||
$('#releasetypes_tr').hide();
|
||||
$('#formats_tr').hide();
|
||||
$('#bitrates_tr').hide();
|
||||
$('#media_tr').hide();
|
||||
$('#logcue_tr').hide();
|
||||
$('#year_tr').hide();
|
||||
$('#cataloguenumber_tr').hide();
|
||||
$('#artist_tr').ghide();
|
||||
$('#releasetypes_tr').ghide();
|
||||
$('#formats_tr').ghide();
|
||||
$('#bitrates_tr').ghide();
|
||||
$('#media_tr').ghide();
|
||||
$('#logcue_tr').ghide();
|
||||
$('#year_tr').ghide();
|
||||
$('#cataloguenumber_tr').ghide();
|
||||
}
|
||||
}
|
||||
|
||||
@ -184,17 +184,17 @@ function ToggleLogCue() {
|
||||
}
|
||||
|
||||
if (flac) {
|
||||
$('#logcue_tr').show();
|
||||
$('#logcue_tr').gshow();
|
||||
} else {
|
||||
$('#logcue_tr').hide();
|
||||
$('#logcue_tr').ghide();
|
||||
}
|
||||
ToggleLogScore();
|
||||
}
|
||||
|
||||
function ToggleLogScore() {
|
||||
if ($('#needlog').raw().checked) {
|
||||
$('#minlogscore_span').show();
|
||||
$('#minlogscore_span').gshow();
|
||||
} else {
|
||||
$('#minlogscore_span').hide();
|
||||
$('#minlogscore_span').ghide();
|
||||
}
|
||||
}
|
||||
|
@ -177,9 +177,15 @@ util.fn = util.prototype = {
|
||||
show: function () {
|
||||
return this.remove_class('hidden');
|
||||
},
|
||||
gshow: function () {
|
||||
return this.remove_class('hidden');
|
||||
},
|
||||
hide: function (force) {
|
||||
return this.add_class('hidden', force);
|
||||
},
|
||||
ghide: function (force) {
|
||||
return this.add_class('hidden', force);
|
||||
},
|
||||
toggle: function (force) {
|
||||
//Should we interate and invert all entries, or just go by the first?
|
||||
if (!in_array('hidden', this.objects[0].className.split(' '))) {
|
||||
@ -189,6 +195,15 @@ util.fn = util.prototype = {
|
||||
}
|
||||
return this;
|
||||
},
|
||||
gtoggle: function (force) {
|
||||
//Should we interate and invert all entries, or just go by the first?
|
||||
if (!in_array('hidden', this.objects[0].className.split(' '))) {
|
||||
this.add_class('hidden', force);
|
||||
} else {
|
||||
this.remove_class('hidden');
|
||||
}
|
||||
return this;
|
||||
},
|
||||
listen: function (event, callback) {
|
||||
for (var i = 0, il = this.objects.length; i < il; i++) {
|
||||
var object = this.objects[i];
|
||||
|
@ -3,7 +3,7 @@ function SetMessage() {
|
||||
|
||||
ajax.get("?action=get_response&plain=1&id=" + id, function (data) {
|
||||
$('#quickpost').raw().value = data;
|
||||
$('#common_answers').hide();
|
||||
$('#common_answers').ghide();
|
||||
});
|
||||
}
|
||||
|
||||
@ -32,8 +32,8 @@ function SaveMessage(id) {
|
||||
} else {
|
||||
document.getElementById(ajax_message).textContent = 'Something went wrong.';
|
||||
}
|
||||
$('#' + ajax_message).show();
|
||||
var t = setTimeout("$('#" + ajax_message + "').hide()", 2000);
|
||||
$('#' + ajax_message).gshow();
|
||||
var t = setTimeout("$('#" + ajax_message + "').ghide()", 2000);
|
||||
}
|
||||
);
|
||||
}
|
||||
@ -46,14 +46,14 @@ function DeleteMessage(id) {
|
||||
ToPost['id'] = id;
|
||||
|
||||
ajax.post("?action=delete_response", ToPost, function (data) {
|
||||
$(div).hide();
|
||||
$(div).ghide();
|
||||
if (data == '1') {
|
||||
document.getElementById(ajax_message).textContent = 'Response successfully deleted.';
|
||||
} else {
|
||||
document.getElementById(ajax_message).textContent = 'Something went wrong.';
|
||||
}
|
||||
$('#'+ajax_message).show();
|
||||
var t = setTimeout("$('#" + ajax_message + "').hide()", 2000);
|
||||
$('#'+ajax_message).gshow();
|
||||
var t = setTimeout("$('#" + ajax_message + "').ghide()", 2000);
|
||||
});
|
||||
}
|
||||
|
||||
@ -68,8 +68,8 @@ function Assign() {
|
||||
} else {
|
||||
document.getElementById('ajax_message').textContent = 'Something went wrong.';
|
||||
}
|
||||
$('#ajax_message').show();
|
||||
var t = setTimeout("$('#ajax_message').hide()", 2000);
|
||||
$('#ajax_message').gshow();
|
||||
var t = setTimeout("$('#ajax_message').ghide()", 2000);
|
||||
});
|
||||
}
|
||||
|
||||
@ -80,12 +80,12 @@ function PreviewResponse(id) {
|
||||
ToPost['message'] = document.getElementById('response_message_'+id).value;
|
||||
ajax.post('?action=preview', ToPost, function (data) {
|
||||
document.getElementById('response_div_'+id).innerHTML = data;
|
||||
$(div).toggle();
|
||||
$('#response_message_'+id).toggle();
|
||||
$(div).gtoggle();
|
||||
$('#response_message_'+id).gtoggle();
|
||||
});
|
||||
} else {
|
||||
$(div).toggle();
|
||||
$('#response_message_'+id).toggle();
|
||||
$(div).gtoggle();
|
||||
$('#response_message_'+id).gtoggle();
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,13 +95,13 @@ function PreviewMessage() {
|
||||
ToPost['message'] = document.getElementById('quickpost').value;
|
||||
ajax.post('?action=preview', ToPost, function (data) {
|
||||
document.getElementById('preview').innerHTML = data;
|
||||
$('#preview').toggle();
|
||||
$('#quickpost').toggle();
|
||||
$('#preview').gtoggle();
|
||||
$('#quickpost').gtoggle();
|
||||
$('#previewbtn').raw().value = "Edit";
|
||||
});
|
||||
} else {
|
||||
$('#preview').toggle();
|
||||
$('#quickpost').toggle();
|
||||
$('#preview').gtoggle();
|
||||
$('#quickpost').gtoggle();
|
||||
$('#previewbtn').raw().value = "Preview";
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ function Collapse() {
|
||||
var collapseLink = $('#collapselink').raw();
|
||||
var hide = (collapseLink.innerHTML.substr(0,1) == 'H' ? 1 : 0);
|
||||
if ($('.row').results() > 0) {
|
||||
$('.row').toggle();
|
||||
$('.row').gtoggle();
|
||||
}
|
||||
if (hide) {
|
||||
collapseLink.innerHTML = 'Show post bodies';
|
||||
|
@ -1,16 +1,16 @@
|
||||
function ChangeCategory(catid) {
|
||||
if (catid == 1) {
|
||||
$('#split_releasetype').show();
|
||||
$('#split_artist').show();
|
||||
$('#split_year').show();
|
||||
$('#split_releasetype').gshow();
|
||||
$('#split_artist').gshow();
|
||||
$('#split_year').gshow();
|
||||
} else if (catid == 4 || catid == 6) {
|
||||
$('#split_releasetype').hide();
|
||||
$('#split_year').show();
|
||||
$('#split_artist').hide();
|
||||
$('#split_releasetype').ghide();
|
||||
$('#split_year').gshow();
|
||||
$('#split_artist').ghide();
|
||||
} else {
|
||||
$('#split_releasetype').hide();
|
||||
$('#split_artist').hide();
|
||||
$('#split_year').hide();
|
||||
$('#split_releasetype').ghide();
|
||||
$('#split_artist').ghide();
|
||||
$('#split_year').ghide();
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,8 +25,8 @@ function ArtistManager() {
|
||||
if (!(ArtistList = $('#artist_list').raw())) {
|
||||
return false;
|
||||
} else if ($('#artistmanager').raw()) {
|
||||
$('#artistmanager').toggle();
|
||||
$('#artist_list').toggle();
|
||||
$('#artistmanager').gtoggle();
|
||||
$('#artist_list').gtoggle();
|
||||
} else {
|
||||
MainArtistCount = 0;
|
||||
var elArtistManager = document.createElement('div');
|
||||
@ -156,7 +156,7 @@ function ArtistManager() {
|
||||
elArtistForm.appendChild(elSubmitDiv);
|
||||
elArtistManager.appendChild(elArtistForm);
|
||||
ArtistList.parentNode.appendChild(elArtistManager);
|
||||
$('#artist_list').hide();
|
||||
$('#artist_list').ghide();
|
||||
}
|
||||
}
|
||||
|
||||
@ -267,10 +267,10 @@ function DownVoteGroup(groupid, authkey) {
|
||||
}
|
||||
}
|
||||
);
|
||||
$('#vote_message').hide();
|
||||
$('#unvote_message').show();
|
||||
$('#upvoted').hide();
|
||||
$('#downvoted').show();
|
||||
$('#vote_message').ghide();
|
||||
$('#unvote_message').gshow();
|
||||
$('#upvoted').ghide();
|
||||
$('#downvoted').gshow();
|
||||
voteLock = false;
|
||||
}
|
||||
|
||||
@ -289,10 +289,10 @@ function UpVoteGroup(groupid, authkey) {
|
||||
}
|
||||
}
|
||||
);
|
||||
$('#vote_message').hide();
|
||||
$('#unvote_message').show();
|
||||
$('#upvoted').show();
|
||||
$('#downvoted').hide();
|
||||
$('#vote_message').ghide();
|
||||
$('#unvote_message').gshow();
|
||||
$('#upvoted').gshow();
|
||||
$('#downvoted').ghide();
|
||||
voteLock = false;
|
||||
}
|
||||
|
||||
@ -312,9 +312,9 @@ function UnvoteGroup(groupid, authkey) {
|
||||
}
|
||||
}
|
||||
);
|
||||
$('#vote_message').show();
|
||||
$('#unvote_message').hide();
|
||||
$('#upvoted').hide();
|
||||
$('#downvoted').hide();
|
||||
$('#vote_message').gshow();
|
||||
$('#unvote_message').ghide();
|
||||
$('#upvoted').ghide();
|
||||
$('#downvoted').ghide();
|
||||
voteLock = false;
|
||||
}
|
||||
|
@ -8,9 +8,9 @@ function Categories() {
|
||||
|
||||
function Remaster() {
|
||||
if ($('#remaster').raw().checked) {
|
||||
$('#remaster_true').show();
|
||||
$('#remaster_true').gshow();
|
||||
} else {
|
||||
$('#remaster_true').hide();
|
||||
$('#remaster_true').ghide();
|
||||
}
|
||||
|
||||
}
|
||||
@ -22,11 +22,11 @@ function Format() {
|
||||
$('#bitrate').raw()[i].selected = true;
|
||||
}
|
||||
}
|
||||
$('#upload_logs').show();
|
||||
$('#other_bitrate_span').hide();
|
||||
$('#upload_logs').gshow();
|
||||
$('#other_bitrate_span').ghide();
|
||||
} else {
|
||||
$('#bitrate').raw()[0].selected = true;
|
||||
$('#upload_logs').hide();
|
||||
$('#upload_logs').ghide();
|
||||
}
|
||||
|
||||
if ($('#format').raw().options[$('#format').raw().selectedIndex].value == 'AAC') {
|
||||
@ -39,9 +39,9 @@ function Format() {
|
||||
function Bitrate() {
|
||||
$('#other_bitrate').raw().value = '';
|
||||
if ($('#bitrate').raw().options[$('#bitrate').raw().selectedIndex].value == 'Other') {
|
||||
$('#other_bitrate_span').show();
|
||||
$('#other_bitrate_span').gshow();
|
||||
} else {
|
||||
$('#other_bitrate_span').hide();
|
||||
$('#other_bitrate_span').ghide();
|
||||
}
|
||||
}
|
||||
|
||||
@ -251,9 +251,9 @@ function RemoveArtistField() {
|
||||
|
||||
function CheckVA () {
|
||||
if ($('#artist').raw().value.toLowerCase().trim().match(/^(va|various(\sa|a)rtis(t|ts)|various)$/)) {
|
||||
$('#vawarning').show();
|
||||
$('#vawarning').gshow();
|
||||
} else {
|
||||
$('#vawarning').hide();
|
||||
$('#vawarning').ghide();
|
||||
}
|
||||
}
|
||||
|
||||
@ -264,15 +264,15 @@ function CheckYear() {
|
||||
}
|
||||
var x = $('#year').raw();
|
||||
if (x.value < 1982 && x.value != '' && media != "old" && !$('#unknown').raw().checked) {
|
||||
$('#yearwarning').show();
|
||||
$('#yearwarning').gshow();
|
||||
$('#remaster').raw().checked = true;
|
||||
$('#remaster_true').show();
|
||||
$('#remaster_true').gshow();
|
||||
} else if ($('#unknown').raw().checked) {
|
||||
$('#remaster').raw().checked = true;
|
||||
$('#yearwarning').hide();
|
||||
$('#remaster_true').show();
|
||||
$('#yearwarning').ghide();
|
||||
$('#remaster_true').gshow();
|
||||
} else {
|
||||
$('#yearwarning').hide();
|
||||
$('#yearwarning').ghide();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
function ChangeTo(to) {
|
||||
if (to == "text") {
|
||||
$('#admincommentlinks').hide();
|
||||
$('#admincomment').show();
|
||||
$('#admincommentlinks').ghide();
|
||||
$('#admincomment').gshow();
|
||||
resize('admincomment');
|
||||
var buttons = document.getElementsByName('admincommentbutton');
|
||||
for (var i = 0; i < buttons.length; i++) {
|
||||
@ -10,8 +10,8 @@ function ChangeTo(to) {
|
||||
} else if (to == "links") {
|
||||
ajax.post("ajax.php?action=preview","form", function(response) {
|
||||
$('#admincommentlinks').raw().innerHTML = response;
|
||||
$('#admincomment').hide();
|
||||
$('#admincommentlinks').show();
|
||||
$('#admincomment').ghide();
|
||||
$('#admincommentlinks').gshow();
|
||||
var buttons = document.getElementsByName('admincommentbutton');
|
||||
for (var i = 0; i < buttons.length; i++) {
|
||||
buttons[i].setAttribute('onclick',"ChangeTo('text'); return false;");
|
||||
@ -138,10 +138,10 @@ addDOMLoadEvent(AlterParanoia);
|
||||
|
||||
function ToggleWarningAdjust(selector) {
|
||||
if (selector.options[selector.selectedIndex].value == '---') {
|
||||
$('#ReduceWarningTR').show();
|
||||
$('#ReduceWarningTR').gshow();
|
||||
$('#ReduceWarning').raw().disabled = false;
|
||||
} else {
|
||||
$('#ReduceWarningTR').hide();
|
||||
$('#ReduceWarningTR').ghide();
|
||||
$('#ReduceWarning').raw().disabled = true;
|
||||
}
|
||||
}
|
||||
@ -150,9 +150,9 @@ addDOMLoadEvent(ToggleIdenticons);
|
||||
function ToggleIdenticons() {
|
||||
var selected = $('#disableavatars').raw().selectedIndex;
|
||||
if (selected == 2 || selected == 3) {
|
||||
$('#identicons').show();
|
||||
$('#identicons').gshow();
|
||||
} else {
|
||||
$('#identicons').hide();
|
||||
$('#identicons').ghide();
|
||||
}
|
||||
}
|
||||
|
||||
@ -173,3 +173,49 @@ function togglePassKey(key) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function commStats(userid) {
|
||||
$('.user_commstats').html('Loading...');
|
||||
ajax.get('ajax.php?action=community_stats&userid=' + userid, function(JSONresponse) {
|
||||
var response = JSON.parse(JSONresponse) || false;
|
||||
if (!response || response.status == 'failure') {
|
||||
$('.user_commstats').html('An error occured');
|
||||
return;
|
||||
}
|
||||
displayCommStats(response.response);
|
||||
});
|
||||
}
|
||||
|
||||
function displayCommStats(stats) {
|
||||
var baseid = '#user_commstats_';
|
||||
for (x in stats) {
|
||||
if (stats[x] === false) {
|
||||
continue;
|
||||
}
|
||||
switch (x) {
|
||||
case 'leeching':
|
||||
$(baseid + x).html(stats[x]);
|
||||
break;
|
||||
case 'seeding':
|
||||
$(baseid + x).html(stats[x]);
|
||||
break;
|
||||
case 'downloaded':
|
||||
$(baseid + x).html(stats[x]);
|
||||
break;
|
||||
case 'snatched':
|
||||
$(baseid + x).html(stats[x]);
|
||||
break;
|
||||
case 'usnatched':
|
||||
$(baseid + x).html('(' + stats[x] + ')');
|
||||
break;
|
||||
case 'udownloaded':
|
||||
$(baseid + x).html('(' + stats[x] + ')');
|
||||
break;
|
||||
case 'seedingperc':
|
||||
if (stats[x] !== -1) {
|
||||
$(baseid + x).html('(' + stats[x] + '%)');
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ function DownVoteGroup(groupid, authkey) {
|
||||
}
|
||||
voteLock = true;
|
||||
ajax.get('ajax.php?action=votefavorite&do=vote&groupid='+groupid+'&vote=down'+'&auth='+authkey, function (response) {return});
|
||||
$('.vote_link_'+groupid).hide();
|
||||
$('.vote_clear_'+groupid).show();
|
||||
$('.voted_down_'+groupid).show();
|
||||
$('.voted_up_'+groupid).hide();
|
||||
$('.vote_link_'+groupid).ghide();
|
||||
$('.vote_clear_'+groupid).gshow();
|
||||
$('.voted_down_'+groupid).gshow();
|
||||
$('.voted_up_'+groupid).ghide();
|
||||
voteLock = false;
|
||||
}
|
||||
|
||||
@ -18,10 +18,10 @@ function UpVoteGroup(groupid, authkey) {
|
||||
}
|
||||
voteLock = true;
|
||||
ajax.get('ajax.php?action=votefavorite&do=vote&groupid='+groupid+'&vote=up'+'&auth='+authkey, function (response) {return});
|
||||
$('.vote_link_'+groupid).hide();
|
||||
$('.vote_clear_'+groupid).show();
|
||||
$('.voted_down_'+groupid).hide();
|
||||
$('.voted_up_'+groupid).show();
|
||||
$('.vote_link_'+groupid).ghide();
|
||||
$('.vote_clear_'+groupid).gshow();
|
||||
$('.voted_down_'+groupid).ghide();
|
||||
$('.voted_up_'+groupid).gshow();
|
||||
voteLock = false;
|
||||
}
|
||||
|
||||
@ -31,9 +31,9 @@ function UnvoteGroup(groupid, authkey) {
|
||||
}
|
||||
voteLock = true;
|
||||
ajax.get('ajax.php?action=votefavorite&do=unvote&groupid='+groupid+'&auth='+authkey, function (response) {return});
|
||||
$('.vote_link_'+groupid).show();
|
||||
$('.vote_clear_'+groupid).hide();
|
||||
$('.voted_down_'+groupid).hide();
|
||||
$('.voted_up_'+groupid).hide();
|
||||
$('.vote_link_'+groupid).gshow();
|
||||
$('.vote_clear_'+groupid).ghide();
|
||||
$('.voted_down_'+groupid).ghide();
|
||||
$('.voted_up_'+groupid).ghide();
|
||||
voteLock = false;
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
function Remove_Alias(alias) {
|
||||
ajax.get("wiki.php?action=delete_alias&auth=" + authkey + "&alias=" + alias, function(response) {
|
||||
$('#alias_' + alias).hide();
|
||||
$('#alias_' + alias).ghide();
|
||||
});
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ a img {
|
||||
|
||||
#footer p {
|
||||
float: left;
|
||||
width: 120px;
|
||||
width: 130px;
|
||||
height: 50px;
|
||||
border-right: 1px solid #4f4f4f;
|
||||
margin: 0 0 0 20px;
|
||||
|
Loading…
Reference in New Issue
Block a user