mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-13 19:06:27 +00:00
Empty commit
This commit is contained in:
parent
c05d706ce2
commit
0b71f53227
@ -63,7 +63,6 @@
|
|||||||
require(SERVER_ROOT.'/classes/mysql.class.php'); //Require the database wrapper
|
require(SERVER_ROOT.'/classes/mysql.class.php'); //Require the database wrapper
|
||||||
require(SERVER_ROOT.'/classes/cache.class.php'); //Require the caching class
|
require(SERVER_ROOT.'/classes/cache.class.php'); //Require the caching class
|
||||||
require(SERVER_ROOT.'/classes/encrypt.class.php'); //Require the encryption class
|
require(SERVER_ROOT.'/classes/encrypt.class.php'); //Require the encryption class
|
||||||
require(SERVER_ROOT.'/classes/useragent.class.php'); //Require the useragent class
|
|
||||||
require(SERVER_ROOT.'/classes/time.class.php'); //Require the time class
|
require(SERVER_ROOT.'/classes/time.class.php'); //Require the time class
|
||||||
require(SERVER_ROOT.'/classes/search.class.php'); //Require the searching class
|
require(SERVER_ROOT.'/classes/search.class.php'); //Require the searching class
|
||||||
require(SERVER_ROOT.'/classes/paranoia.class.php'); //Require the paranoia check_paranoia function
|
require(SERVER_ROOT.'/classes/paranoia.class.php'); //Require the paranoia check_paranoia function
|
||||||
@ -77,13 +76,12 @@
|
|||||||
$DB = new DB_MYSQL;
|
$DB = new DB_MYSQL;
|
||||||
$Cache = new CACHE($MemcachedServers);
|
$Cache = new CACHE($MemcachedServers);
|
||||||
$Enc = new CRYPT;
|
$Enc = new CRYPT;
|
||||||
$UA = new USER_AGENT;
|
|
||||||
$SS = new SPHINX_SEARCH;
|
$SS = new SPHINX_SEARCH;
|
||||||
|
|
||||||
// Autoload classes.
|
// Autoload classes.
|
||||||
|
|
||||||
spl_autoload_register(function ($ClassName) {
|
spl_autoload_register(function ($ClassName) {
|
||||||
$FileName='';
|
$FileName = '';
|
||||||
switch ($ClassName) {
|
switch ($ClassName) {
|
||||||
case 'Artists':
|
case 'Artists':
|
||||||
$FileName = 'artists.class';
|
$FileName = 'artists.class';
|
||||||
@ -174,6 +172,9 @@
|
|||||||
case 'Tracker':
|
case 'Tracker':
|
||||||
$FileName = 'tracker.class';
|
$FileName = 'tracker.class';
|
||||||
break;
|
break;
|
||||||
|
case 'UserAgent':
|
||||||
|
$FileName = 'useragent.class';
|
||||||
|
break;
|
||||||
case 'UserRank':
|
case 'UserRank':
|
||||||
$FileName = 'user_rank.class';
|
$FileName = 'user_rank.class';
|
||||||
break;
|
break;
|
||||||
@ -186,6 +187,9 @@
|
|||||||
case 'Votes':
|
case 'Votes':
|
||||||
$FileName = 'votes.class';
|
$FileName = 'votes.class';
|
||||||
break;
|
break;
|
||||||
|
case 'Wiki':
|
||||||
|
$FileName = 'wiki.class';
|
||||||
|
break;
|
||||||
case 'Zip':
|
case 'Zip':
|
||||||
$FileName = 'zip.class';
|
$FileName = 'zip.class';
|
||||||
break;
|
break;
|
||||||
@ -198,9 +202,9 @@
|
|||||||
|
|
||||||
//Begin browser identification
|
//Begin browser identification
|
||||||
|
|
||||||
$Browser = $UA->browser($_SERVER['HTTP_USER_AGENT']);
|
$Browser = UserAgent::browser($_SERVER['HTTP_USER_AGENT']);
|
||||||
$OperatingSystem = $UA->operating_system($_SERVER['HTTP_USER_AGENT']);
|
$OperatingSystem = UserAgent::operating_system($_SERVER['HTTP_USER_AGENT']);
|
||||||
//$Mobile = $UA->mobile($_SERVER['HTTP_USER_AGENT']);
|
//$Mobile = UserAgent::mobile($_SERVER['HTTP_USER_AGENT']);
|
||||||
$Mobile = in_array($_SERVER['HTTP_HOST'], array('m.'.NONSSL_SITE_URL, 'm.'.NONSSL_SITE_URL));
|
$Mobile = in_array($_SERVER['HTTP_HOST'], array('m.'.NONSSL_SITE_URL, 'm.'.NONSSL_SITE_URL));
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?
|
<?
|
||||||
class USER_AGENT {
|
class UserAgent {
|
||||||
var $Browsers = array(
|
var $Browsers = array(
|
||||||
//Less popular
|
//Less popular
|
||||||
'Shiira' => 'Shiira',
|
'Shiira' => 'Shiira',
|
||||||
@ -110,11 +110,11 @@ class USER_AGENT {
|
|||||||
'mac' => 'Mac OS X'
|
'mac' => 'Mac OS X'
|
||||||
);
|
);
|
||||||
|
|
||||||
public function operating_system(&$UserAgentString) {
|
public static function operating_system(&$UserAgentString) {
|
||||||
if (empty($UserAgentString)) {
|
if (empty($UserAgentString)) {
|
||||||
return 'Hidden';
|
return 'Hidden';
|
||||||
}
|
}
|
||||||
foreach ($this->OperatingSystems as $String => $OperatingSystem) {
|
foreach ($OperatingSystems as $String => $OperatingSystem) {
|
||||||
if (stripos($UserAgentString, $String) !== false) {
|
if (stripos($UserAgentString, $String) !== false) {
|
||||||
return $OperatingSystem;
|
return $OperatingSystem;
|
||||||
}
|
}
|
||||||
@ -122,7 +122,7 @@ public function operating_system(&$UserAgentString) {
|
|||||||
return 'Unknown';
|
return 'Unknown';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function mobile(&$UserAgentString) {
|
public static function mobile(&$UserAgentString) {
|
||||||
if (strpos($UserAgentString, 'iPad')) {
|
if (strpos($UserAgentString, 'iPad')) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -134,18 +134,18 @@ public function mobile(&$UserAgentString) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function browser(&$UserAgentString) {
|
public static function browser(&$UserAgentString) {
|
||||||
if (empty($UserAgentString)) {
|
if (empty($UserAgentString)) {
|
||||||
return 'Hidden';
|
return 'Hidden';
|
||||||
}
|
}
|
||||||
$Return = 'Unknown';
|
$Return = 'Unknown';
|
||||||
foreach ($this->Browsers as $String => $Browser) {
|
foreach ($Browsers as $String => $Browser) {
|
||||||
if (strpos($UserAgentString, $String) !== false) {
|
if (strpos($UserAgentString, $String) !== false) {
|
||||||
$Return = $Browser;
|
$Return = $Browser;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($this->mobile($UserAgentString)) {
|
if (self::mobile($UserAgentString)) {
|
||||||
$Return .= ' Mobile';
|
$Return .= ' Mobile';
|
||||||
}
|
}
|
||||||
return $Return;
|
return $Return;
|
||||||
|
@ -30,30 +30,21 @@
|
|||||||
|
|
||||||
########################################################################*/
|
########################################################################*/
|
||||||
|
|
||||||
class WIKI {
|
class Wiki {
|
||||||
var $Table = '';
|
|
||||||
var $PageID = 0;
|
|
||||||
var $BaseURL = '';
|
|
||||||
function WIKI($Table, $PageID, $BaseURL = '') {
|
|
||||||
$this->Table = $Table;
|
|
||||||
$this->PageID = $PageID;
|
|
||||||
$this->BaseURL = $BaseURL;
|
|
||||||
}
|
|
||||||
|
|
||||||
function revision_history() {
|
public static function revision_history($Table = '', $PageID = 0, $BaseURL = '') {
|
||||||
global $DB;
|
global $DB;
|
||||||
|
|
||||||
$BaseURL = $this->BaseURL;
|
|
||||||
$DB->query("
|
$DB->query("
|
||||||
SELECT
|
SELECT
|
||||||
RevisionID,
|
RevisionID,
|
||||||
Summary,
|
Summary,
|
||||||
Time,
|
Time,
|
||||||
UserID
|
UserID
|
||||||
FROM ".$this->Table." AS wiki
|
FROM $Table AS wiki
|
||||||
WHERE wiki.PageID = ".$this->PageID."
|
WHERE wiki.PageID = $PageID
|
||||||
ORDER BY RevisionID DESC");
|
ORDER BY RevisionID DESC");
|
||||||
//----------------------------------------------- ?>
|
?>
|
||||||
<table cellpadding="6" cellspacing="1" border="0" width="100%" class="border">
|
<table cellpadding="6" cellspacing="1" border="0" width="100%" class="border">
|
||||||
<tr class="colhead">
|
<tr class="colhead">
|
||||||
<td>Revision</td>
|
<td>Revision</td>
|
||||||
@ -61,11 +52,11 @@ function revision_history() {
|
|||||||
<td>User</td>
|
<td>User</td>
|
||||||
<td>Summary</td>
|
<td>Summary</td>
|
||||||
</tr>
|
</tr>
|
||||||
<? //-----------------------------------------
|
<?
|
||||||
$Row = 'a';
|
$Row = 'a';
|
||||||
while (list($RevisionID, $Summary, $Time, $UserID, $Username) = $DB->next_record()) {
|
while (list($RevisionID, $Summary, $Time, $UserID, $Username) = $DB->next_record()) {
|
||||||
$Row = (($Row == 'a') ? 'b' : 'a');
|
$Row = (($Row == 'a') ? 'b' : 'a');
|
||||||
//------------------------------------------------------ ?>
|
?>
|
||||||
<tr class="row<?=$Row?>">
|
<tr class="row<?=$Row?>">
|
||||||
<td>
|
<td>
|
||||||
<?= "<a href=\"$BaseURL&revisionid=$RevisionID\">#$RevisionID</a>" ?>
|
<?= "<a href=\"$BaseURL&revisionid=$RevisionID\">#$RevisionID</a>" ?>
|
||||||
@ -80,12 +71,9 @@ function revision_history() {
|
|||||||
<?=($Summary ? $Summary : '(empty)')?>
|
<?=($Summary ? $Summary : '(empty)')?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<? //---------------------------------------------------
|
<? } // while ?>
|
||||||
}
|
|
||||||
//-------------------------------------------- ?>
|
|
||||||
</table>
|
</table>
|
||||||
<?
|
<?
|
||||||
|
} // function
|
||||||
}
|
|
||||||
} // class
|
} // class
|
||||||
?>
|
?>
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
2013-06-19 by alderaan
|
||||||
|
UI revisions on the artist and torrent group edit pages, with the most significant changes occurring in the artist aliases section%
|
||||||
|
|
||||||
2013-06-16 by porkpie
|
2013-06-16 by porkpie
|
||||||
Require a click and an ajax call to view some of the stats on profile pages
|
Require a click and an ajax call to view some of the stats on profile pages
|
||||||
|
|
||||||
|
@ -31,10 +31,11 @@ function check_paranoia_here($Setting) {
|
|||||||
GROUP BY Type");
|
GROUP BY Type");
|
||||||
$PeerCount = $DB->to_array(0, MYSQLI_NUM, false);
|
$PeerCount = $DB->to_array(0, MYSQLI_NUM, false);
|
||||||
if (check_paranoia('seeding+')) {
|
if (check_paranoia('seeding+')) {
|
||||||
$CommStats['seeding'] = isset($PeerCount['Seeding']) ? $PeerCount['Seeding'][1] : 0;
|
$Seeding = isset($PeerCount['Seeding']) ? $PeerCount['Seeding'][1] : 0;
|
||||||
|
$CommStats['seeding'] = number_format($Seeding);
|
||||||
}
|
}
|
||||||
if (check_paranoia('leeching+')) {
|
if (check_paranoia('leeching+')) {
|
||||||
$CommStats['leeching'] = isset($PeerCount['Leeching']) ? $PeerCount['Leeching'][1] : 0;
|
$CommStats['leeching'] = isset($PeerCount['Leeching']) ? number_format($PeerCount['Leeching'][1]) : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (check_paranoia_here('snatched+')) {
|
if (check_paranoia_here('snatched+')) {
|
||||||
@ -44,12 +45,12 @@ function check_paranoia_here($Setting) {
|
|||||||
INNER JOIN torrents AS t ON t.ID=x.fid
|
INNER JOIN torrents AS t ON t.ID=x.fid
|
||||||
WHERE x.uid = '$UserID'");
|
WHERE x.uid = '$UserID'");
|
||||||
list($Snatched, $UniqueSnatched) = $DB->next_record(MYSQLI_NUM, false);
|
list($Snatched, $UniqueSnatched) = $DB->next_record(MYSQLI_NUM, false);
|
||||||
$CommStats['snatched'] = $Snatched;
|
$CommStats['snatched'] = number_format($Snatched);
|
||||||
if (check_perms('site_view_torrent_snatchlist', $User['Class'])) {
|
if (check_perms('site_view_torrent_snatchlist', $User['Class'])) {
|
||||||
$CommStats['usnatched'] = $UniqueSnatched;
|
$CommStats['usnatched'] = number_format($UniqueSnatched);
|
||||||
}
|
}
|
||||||
if (check_paranoia_here('seeding') && check_paranoia_here('snatched')) {
|
if (check_paranoia_here('seeding') && check_paranoia_here('snatched') && $UniqueSnatched > 0) {
|
||||||
$CommStats['seedingperc'] = $UniqueSnatched > 0 ? 100 * min(1, round($CommStats['seeding'] / $UniqueSnatched, 2)) : -1;
|
$CommStats['seedingperc'] = 100 * min(1, round($Seeding / $UniqueSnatched, 2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (check_perms('site_view_torrent_snatchlist', $Class)) {
|
if (check_perms('site_view_torrent_snatchlist', $Class)) {
|
||||||
@ -59,16 +60,8 @@ function check_paranoia_here($Setting) {
|
|||||||
JOIN torrents AS t ON t.ID=ud.TorrentID
|
JOIN torrents AS t ON t.ID=ud.TorrentID
|
||||||
WHERE ud.UserID='$UserID'");
|
WHERE ud.UserID='$UserID'");
|
||||||
list($NumDownloads, $UniqueDownloads) = $DB->next_record(MYSQLI_NUM, false);
|
list($NumDownloads, $UniqueDownloads) = $DB->next_record(MYSQLI_NUM, false);
|
||||||
$CommStats['downloaded'] = $NumDownloads;
|
$CommStats['downloaded'] = number_format($NumDownloads);
|
||||||
$CommStats['udownloaded'] = $UniqueDownloads;
|
$CommStats['udownloaded'] = number_format($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);
|
json_die('success', $CommStats);
|
||||||
|
@ -13,12 +13,15 @@
|
|||||||
/* AJAX_LIMIT = array(x,y) = 'x' requests every 'y' seconds.
|
/* AJAX_LIMIT = array(x,y) = 'x' requests every 'y' seconds.
|
||||||
e.g. array(5,10) = 5 requests every 10 seconds */
|
e.g. array(5,10) = 5 requests every 10 seconds */
|
||||||
$AJAX_LIMIT = array(5,10);
|
$AJAX_LIMIT = array(5,10);
|
||||||
$Limited_Pages = array('tcomments','user','forum','top10','browse','usersearch','requests','artist','inbox','subscriptions','bookmarks','announcements','notifications','request','better','similar_artists','userhistory','votefavorite','wiki','torrentgroup','news_ajax');
|
$LimitedPages = array('tcomments','user','forum','top10','browse','usersearch','requests','artist','inbox','subscriptions','bookmarks','announcements','notifications','request','better','similar_artists','userhistory','votefavorite','wiki','torrentgroup','news_ajax');
|
||||||
|
// These users aren't rate limited.
|
||||||
|
$UserExceptions = array(
|
||||||
|
|
||||||
|
);
|
||||||
|
$UserID = $LoggedUser['ID'];
|
||||||
header('Content-Type: application/json; charset=utf-8');
|
header('Content-Type: application/json; charset=utf-8');
|
||||||
|
|
||||||
// Enforce rate limiting everywhere except info.php
|
// Enforce rate limiting everywhere except info.php
|
||||||
if (isset($_GET['action']) && in_array($_GET['action'],$Limited_Pages)) {
|
if (!in_array($UserID, $UserExceptions) && isset($_GET['action']) && in_array($_GET['action'],$LimitedPages)) {
|
||||||
if (!$userrequests = $Cache->get_value('ajax_requests_'.$UserID)) {
|
if (!$userrequests = $Cache->get_value('ajax_requests_'.$UserID)) {
|
||||||
$userrequests = 0;
|
$userrequests = 0;
|
||||||
$Cache->cache_value('ajax_requests_'.$UserID,'0',$AJAX_LIMIT[1]);
|
$Cache->cache_value('ajax_requests_'.$UserID,'0',$AJAX_LIMIT[1]);
|
||||||
|
@ -21,13 +21,13 @@ function compare($X, $Y) {
|
|||||||
|
|
||||||
|
|
||||||
if (!empty($_GET['revisionid'])) { // if they're viewing an old revision
|
if (!empty($_GET['revisionid'])) { // if they're viewing an old revision
|
||||||
$RevisionID=$_GET['revisionid'];
|
$RevisionID = $_GET['revisionid'];
|
||||||
if (!is_number($RevisionID)) {
|
if (!is_number($RevisionID)) {
|
||||||
error(0);
|
error(0);
|
||||||
}
|
}
|
||||||
$Data = $Cache->get_value("artist_$ArtistID"."_revision_$RevisionID", true);
|
$Data = $Cache->get_value("artist_{$ArtistID}_revision_$RevisionID", true);
|
||||||
} else { // viewing the live version
|
} else { // viewing the live version
|
||||||
$Data = $Cache->get_value('artist_'.$ArtistID, true);
|
$Data = $Cache->get_value("artist_$ArtistID", true);
|
||||||
$RevisionID = false;
|
$RevisionID = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,8 +42,8 @@ function compare($X, $Y) {
|
|||||||
wiki.body,
|
wiki.body,
|
||||||
a.VanityHouse
|
a.VanityHouse
|
||||||
FROM wiki_artists AS wiki
|
FROM wiki_artists AS wiki
|
||||||
LEFT JOIN artists_group AS a ON wiki.RevisionID=a.RevisionID
|
LEFT JOIN artists_group AS a ON wiki.RevisionID = a.RevisionID
|
||||||
WHERE wiki.RevisionID='$RevisionID' ";
|
WHERE wiki.RevisionID = '$RevisionID' ";
|
||||||
} else {
|
} else {
|
||||||
$sql = "
|
$sql = "
|
||||||
SELECT
|
SELECT
|
||||||
@ -52,10 +52,11 @@ function compare($X, $Y) {
|
|||||||
wiki.body,
|
wiki.body,
|
||||||
a.VanityHouse
|
a.VanityHouse
|
||||||
FROM artists_group AS a
|
FROM artists_group AS a
|
||||||
LEFT JOIN wiki_artists AS wiki ON wiki.RevisionID=a.RevisionID
|
LEFT JOIN wiki_artists AS wiki ON wiki.RevisionID = a.RevisionID
|
||||||
WHERE a.ArtistID='$ArtistID' ";
|
WHERE a.ArtistID = '$ArtistID' ";
|
||||||
}
|
}
|
||||||
$sql .= " GROUP BY a.ArtistID";
|
$sql .= "
|
||||||
|
GROUP BY a.ArtistID";
|
||||||
$DB->query($sql);
|
$DB->query($sql);
|
||||||
|
|
||||||
if ($DB->record_count() == 0) {
|
if ($DB->record_count() == 0) {
|
||||||
@ -73,7 +74,7 @@ function compare($X, $Y) {
|
|||||||
// Requests
|
// Requests
|
||||||
$Requests = array();
|
$Requests = array();
|
||||||
if (empty($LoggedUser['DisableRequests'])) {
|
if (empty($LoggedUser['DisableRequests'])) {
|
||||||
$Requests = $Cache->get_value('artists_requests_'.$ArtistID);
|
$Requests = $Cache->get_value("artists_requests_$ArtistID");
|
||||||
if (!is_array($Requests)) {
|
if (!is_array($Requests)) {
|
||||||
$DB->query("
|
$DB->query("
|
||||||
SELECT
|
SELECT
|
||||||
@ -85,9 +86,9 @@ function compare($X, $Y) {
|
|||||||
COUNT(rv.UserID) AS Votes,
|
COUNT(rv.UserID) AS Votes,
|
||||||
SUM(rv.Bounty) AS Bounty
|
SUM(rv.Bounty) AS Bounty
|
||||||
FROM requests AS r
|
FROM requests AS r
|
||||||
LEFT JOIN requests_votes AS rv ON rv.RequestID=r.ID
|
LEFT JOIN requests_votes AS rv ON rv.RequestID = r.ID
|
||||||
LEFT JOIN requests_artists AS ra ON r.ID=ra.RequestID
|
LEFT JOIN requests_artists AS ra ON r.ID = ra.RequestID
|
||||||
WHERE ra.ArtistID = ".$ArtistID."
|
WHERE ra.ArtistID = $ArtistID
|
||||||
AND r.TorrentID = 0
|
AND r.TorrentID = 0
|
||||||
GROUP BY r.ID
|
GROUP BY r.ID
|
||||||
ORDER BY Votes DESC");
|
ORDER BY Votes DESC");
|
||||||
@ -97,23 +98,23 @@ function compare($X, $Y) {
|
|||||||
} else {
|
} else {
|
||||||
$Requests = array();
|
$Requests = array();
|
||||||
}
|
}
|
||||||
$Cache->cache_value('artists_requests_'.$ArtistID, $Requests);
|
$Cache->cache_value("artists_requests_$ArtistID", $Requests);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$NumRequests = count($Requests);
|
$NumRequests = count($Requests);
|
||||||
|
|
||||||
|
|
||||||
if (($Importances = $Cache->get_value('artist_groups_'.$ArtistID)) === false) {
|
if (($Importances = $Cache->get_value("artist_groups_$ArtistID")) === false) {
|
||||||
$DB->query("
|
$DB->query("
|
||||||
SELECT
|
SELECT
|
||||||
DISTINCTROW ta.GroupID, ta.Importance, tg.VanityHouse, tg.Year
|
DISTINCTROW ta.GroupID, ta.Importance, tg.VanityHouse, tg.Year
|
||||||
FROM torrents_artists AS ta
|
FROM torrents_artists AS ta
|
||||||
JOIN torrents_group AS tg ON tg.ID=ta.GroupID
|
JOIN torrents_group AS tg ON tg.ID = ta.GroupID
|
||||||
WHERE ta.ArtistID='$ArtistID'
|
WHERE ta.ArtistID = '$ArtistID'
|
||||||
ORDER BY tg.Year DESC, tg.Name DESC");
|
ORDER BY tg.Year DESC, tg.Name DESC");
|
||||||
$GroupIDs = $DB->collect('GroupID');
|
$GroupIDs = $DB->collect('GroupID');
|
||||||
$Importances = $DB->to_array(false, MYSQLI_BOTH, false);
|
$Importances = $DB->to_array(false, MYSQLI_BOTH, false);
|
||||||
$Cache->cache_value('artist_groups_'.$ArtistID, $Importances, 0);
|
$Cache->cache_value("artist_groups_$ArtistID", $Importances, 0);
|
||||||
} else {
|
} else {
|
||||||
$GroupIDs = array();
|
$GroupIDs = array();
|
||||||
foreach ($Importances as $Group) {
|
foreach ($Importances as $Group) {
|
||||||
@ -173,16 +174,16 @@ function compare($X, $Y) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($GuestAlbums)) {
|
if (!empty($GuestAlbums)) {
|
||||||
$ReleaseTypes[1024] = "Guest Appearance";
|
$ReleaseTypes[1024] = 'Guest Appearance';
|
||||||
}
|
}
|
||||||
if (!empty($RemixerAlbums)) {
|
if (!empty($RemixerAlbums)) {
|
||||||
$ReleaseTypes[1023] = "Remixed By";
|
$ReleaseTypes[1023] = 'Remixed By';
|
||||||
}
|
}
|
||||||
if (!empty($ComposerAlbums)) {
|
if (!empty($ComposerAlbums)) {
|
||||||
$ReleaseTypes[1022] = "Composition";
|
$ReleaseTypes[1022] = 'Composition';
|
||||||
}
|
}
|
||||||
if (!empty($ProducerAlbums)) {
|
if (!empty($ProducerAlbums)) {
|
||||||
$ReleaseTypes[1021] = "Produced By";
|
$ReleaseTypes[1021] = 'Produced By';
|
||||||
}
|
}
|
||||||
|
|
||||||
//Custom sorting for releases
|
//Custom sorting for releases
|
||||||
@ -200,9 +201,9 @@ function compare($X, $Y) {
|
|||||||
}
|
}
|
||||||
uasort($Importances, function ($A, $B) use ($SortOrder) {
|
uasort($Importances, function ($A, $B) use ($SortOrder) {
|
||||||
if ($SortOrder[$A['ReleaseType']] == $SortOrder[$B['ReleaseType']]) {
|
if ($SortOrder[$A['ReleaseType']] == $SortOrder[$B['ReleaseType']]) {
|
||||||
return $A['Sort'] < $B['Sort'] ? -1 : 1;
|
return (($A['Sort'] < $B['Sort']) ? -1 : 1);
|
||||||
}
|
}
|
||||||
return $SortOrder[$A['ReleaseType']] < $SortOrder[$B['ReleaseType']] ? -1 : 1;
|
return (($SortOrder[$A['ReleaseType']] < $SortOrder[$B['ReleaseType']]) ? -1 : 1);
|
||||||
});
|
});
|
||||||
// Sort the anchors at the top of the page the same way as release types
|
// Sort the anchors at the top of the page the same way as release types
|
||||||
$UsedReleases = array_flip(array_intersect_key($SortOrder, $UsedReleases));
|
$UsedReleases = array_flip(array_intersect_key($SortOrder, $UsedReleases));
|
||||||
@ -213,17 +214,17 @@ function compare($X, $Y) {
|
|||||||
<?
|
<?
|
||||||
foreach ($UsedReleases as $ReleaseID) {
|
foreach ($UsedReleases as $ReleaseID) {
|
||||||
switch ($ReleaseTypes[$ReleaseID]) {
|
switch ($ReleaseTypes[$ReleaseID]) {
|
||||||
case "Remix" :
|
case 'Remix':
|
||||||
$DisplayName = "Remixes";
|
$DisplayName = 'Remixes';
|
||||||
break;
|
break;
|
||||||
case "Anthology" :
|
case 'Anthology':
|
||||||
$DisplayName = "Anthologies";
|
$DisplayName = 'Anthologies';
|
||||||
break;
|
break;
|
||||||
case "DJ Mix" :
|
case 'DJ Mix':
|
||||||
$DisplayName = "DJ Mixes";
|
$DisplayName = 'DJ Mixes';
|
||||||
break;
|
break;
|
||||||
default :
|
default:
|
||||||
$DisplayName = $ReleaseTypes[$ReleaseID]."s";
|
$DisplayName = $ReleaseTypes[$ReleaseID].'s';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -262,9 +263,9 @@ function compare($X, $Y) {
|
|||||||
$Torrent['Leechers'] = (int)$Torrent['Leechers'];
|
$Torrent['Leechers'] = (int)$Torrent['Leechers'];
|
||||||
$Torrent['Snatched'] = (int)$Torrent['Snatched'];
|
$Torrent['Snatched'] = (int)$Torrent['Snatched'];
|
||||||
|
|
||||||
$NumSeeders+=$Torrent['Seeders'];
|
$NumSeeders += $Torrent['Seeders'];
|
||||||
$NumLeechers+=$Torrent['Leechers'];
|
$NumLeechers += $Torrent['Leechers'];
|
||||||
$NumSnatches+=$Torrent['Snatched'];
|
$NumSnatches += $Torrent['Snatched'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -302,21 +303,21 @@ function compare($X, $Y) {
|
|||||||
|
|
||||||
if ($ReleaseType != $LastReleaseType) {
|
if ($ReleaseType != $LastReleaseType) {
|
||||||
switch ($ReleaseTypes[$ReleaseType]) {
|
switch ($ReleaseTypes[$ReleaseType]) {
|
||||||
case "Remix" :
|
case 'Remix':
|
||||||
$DisplayName = "Remixes";
|
$DisplayName = 'Remixes';
|
||||||
break;
|
break;
|
||||||
case "Anthology" :
|
case 'Anthology':
|
||||||
$DisplayName = "Anthologies";
|
$DisplayName = 'Anthologies';
|
||||||
break;
|
break;
|
||||||
case "DJ Mix" :
|
case 'DJ Mix':
|
||||||
$DisplayName = "DJ Mixes";
|
$DisplayName = 'DJ Mixes';
|
||||||
break;
|
break;
|
||||||
default :
|
default:
|
||||||
$DisplayName = $ReleaseTypes[$ReleaseType]."s";
|
$DisplayName = $ReleaseTypes[$ReleaseType].'s';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$ReleaseTypeLabel = strtolower(str_replace(' ','_',$ReleaseTypes[$ReleaseType]));
|
$ReleaseTypeLabel = strtolower(str_replace(' ', '_', $ReleaseTypes[$ReleaseType]));
|
||||||
if ($OpenTable) { ?>
|
if ($OpenTable) { ?>
|
||||||
</table>
|
</table>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
@ -334,7 +335,7 @@ function compare($X, $Y) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$DisplayName ='<a href="torrents.php?id='.$GroupID.'" title="View Torrent">'.$GroupName.'</a>';
|
$DisplayName = "<a href=\"torrents.php?id=$GroupID\" title=\"View Torrent\">$GroupName</a>";
|
||||||
if (check_perms('users_mod') || check_perms('torrents_fix_ghosts')) {
|
if (check_perms('users_mod') || check_perms('torrents_fix_ghosts')) {
|
||||||
$DisplayName .= ' <a href="torrents.php?action=fix_group&groupid='.$GroupID.'&artistid='.$ArtistID.'&auth='.$LoggedUser['AuthKey'].'" class="brackets" title="Fix ghost DB entry">Fix</a>';
|
$DisplayName .= ' <a href="torrents.php?action=fix_group&groupid='.$GroupID.'&artistid='.$ArtistID.'&auth='.$LoggedUser['AuthKey'].'" class="brackets" title="Fix ghost DB entry">Fix</a>';
|
||||||
}
|
}
|
||||||
@ -370,14 +371,14 @@ function compare($X, $Y) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($GroupYear > 0) {
|
if ($GroupYear > 0) {
|
||||||
$DisplayName = $GroupYear. ' - '.$DisplayName;
|
$DisplayName = "$GroupYear - $DisplayName";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($GroupVanityHouse) {
|
if ($GroupVanityHouse) {
|
||||||
$DisplayName .= ' [<abbr title="This is a Vanity House release">VH</abbr>]';
|
$DisplayName .= ' [<abbr title="This is a Vanity House release">VH</abbr>]';
|
||||||
}
|
}
|
||||||
|
|
||||||
$SnatchedGroupClass = $GroupFlags['IsSnatched'] ? ' snatched_group' : '';
|
$SnatchedGroupClass = ($GroupFlags['IsSnatched'] ? ' snatched_group' : '');
|
||||||
?>
|
?>
|
||||||
<tr class="releases_<?=$ReleaseType?> group discog<?=$SnatchedGroupClass . $HideDiscog?>">
|
<tr class="releases_<?=$ReleaseType?> group discog<?=$SnatchedGroupClass . $HideDiscog?>">
|
||||||
<td class="center">
|
<td class="center">
|
||||||
@ -386,19 +387,19 @@ function compare($X, $Y) {
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td colspan="5" class="big_info">
|
<td colspan="5" class="big_info">
|
||||||
<? if ($LoggedUser['CoverArt']) : ?>
|
<? if ($LoggedUser['CoverArt']) : ?>
|
||||||
<div class="group_image float_left clear">
|
<div class="group_image float_left clear">
|
||||||
<? ImageTools::cover_thumb($WikiImage, $GroupCategoryID) ?>
|
<? ImageTools::cover_thumb($WikiImage, $GroupCategoryID) ?>
|
||||||
</div>
|
</div>
|
||||||
<? endif; ?>
|
<? endif; ?>
|
||||||
<div class="group_info clear">
|
<div class="group_info clear">
|
||||||
<strong><?=$DisplayName?></strong>
|
<strong><?=$DisplayName?></strong>
|
||||||
<? if (Bookmarks::has_bookmarked('torrent', $GroupID)) {
|
<? if (Bookmarks::has_bookmarked('torrent', $GroupID)) {
|
||||||
echo " <a style = \"float: right;\" href=\"#\" id=\"bookmarklink_torrent_$GroupID\" class=\"remove_bookmark brackets\" title=\"Unbookmark\" onclick=\"Unbookmark('torrent',$GroupID,'Bookmark');return false;\">Unbookmark</a>";
|
echo "<a style=\"float: right;\" href=\"#\" id=\"bookmarklink_torrent_$GroupID\" class=\"remove_bookmark brackets\" title=\"Unbookmark\" onclick=\"Unbookmark('torrent', $GroupID, 'Bookmark'); return false;\">Unbookmark</a>";
|
||||||
} else {
|
} else {
|
||||||
echo " <a style = \"float: right;\" href=\"#\" id=\"bookmarklink_torrent_$GroupID\" class=\"add_bookmark brackets\" title=\"Bookmark\" onclick=\"Bookmark('torrent',$GroupID,'Unbookmark');return false;\">Bookmark</a>";
|
echo "<a style=\"float: right;\" href=\"#\" id=\"bookmarklink_torrent_$GroupID\" class=\"add_bookmark brackets\" title=\"Bookmark\" onclick=\"Bookmark('torrent', $GroupID, 'Unbookmark'); return false;\">Bookmark</a>";
|
||||||
} ?>
|
} ?>
|
||||||
<?Votes::vote_link($GroupID,$UserVotes[$GroupID]['Type']);?>
|
<?Votes::vote_link($GroupID, $UserVotes[$GroupID]['Type']);?>
|
||||||
<div class="tags"><?=$TorrentTags->format('torrents.php?taglist=', $Name)?></div>
|
<div class="tags"><?=$TorrentTags->format('torrents.php?taglist=', $Name)?></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@ -417,11 +418,12 @@ function compare($X, $Y) {
|
|||||||
if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) {
|
if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) {
|
||||||
$FirstUnknown = !isset($FirstUnknown);
|
$FirstUnknown = !isset($FirstUnknown);
|
||||||
}
|
}
|
||||||
$SnatchedTorrentClass = $Torrent['IsSnatched'] ? ' snatched_torrent' : '';
|
$SnatchedTorrentClass = ($Torrent['IsSnatched'] ? ' snatched_torrent' : '');
|
||||||
|
|
||||||
if ($Torrent['RemasterTitle'] != $LastRemasterTitle || $Torrent['RemasterYear'] != $LastRemasterYear ||
|
if ($Torrent['RemasterTitle'] != $LastRemasterTitle || $Torrent['RemasterYear'] != $LastRemasterYear ||
|
||||||
$Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] !=
|
$Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] !=
|
||||||
$LastRemasterCatalogueNumber || $FirstUnknown || $Torrent['Media'] != $LastMedia) {
|
$LastRemasterCatalogueNumber || $FirstUnknown || $Torrent['Media'] != $LastMedia
|
||||||
|
) {
|
||||||
|
|
||||||
$EditionID++;
|
$EditionID++;
|
||||||
|
|
||||||
@ -458,7 +460,8 @@ function compare($X, $Y) {
|
|||||||
if (!empty($TorrentList)) { ?>
|
if (!empty($TorrentList)) { ?>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<? }
|
<?
|
||||||
|
}
|
||||||
|
|
||||||
$TorrentDisplayList = ob_get_clean();
|
$TorrentDisplayList = ob_get_clean();
|
||||||
|
|
||||||
@ -470,22 +473,26 @@ function compare($X, $Y) {
|
|||||||
<div class="header">
|
<div class="header">
|
||||||
<h2><?=display_str($Name)?><? if ($RevisionID) { ?> (Revision #<?=$RevisionID?>)<? } if ($VanityHouseArtist) { ?> [Vanity House] <? } ?></h2>
|
<h2><?=display_str($Name)?><? if ($RevisionID) { ?> (Revision #<?=$RevisionID?>)<? } if ($VanityHouseArtist) { ?> [Vanity House] <? } ?></h2>
|
||||||
<div class="linkbox">
|
<div class="linkbox">
|
||||||
<? if (check_perms('site_submit_requests')) { ?>
|
<? if (check_perms('site_submit_requests')) { ?>
|
||||||
<a href="requests.php?action=new&artistid=<?=$ArtistID?>" class="brackets">Add request</a>
|
<a href="requests.php?action=new&artistid=<?=$ArtistID?>" class="brackets">Add request</a>
|
||||||
<? }
|
<?
|
||||||
|
}
|
||||||
|
|
||||||
if (check_perms('site_torrents_notify')) {
|
if (check_perms('site_torrents_notify')) {
|
||||||
if (($Notify = $Cache->get_value('notify_artists_'.$LoggedUser['ID'])) === false) {
|
if (($Notify = $Cache->get_value('notify_artists_'.$LoggedUser['ID'])) === false) {
|
||||||
$DB->query("SELECT ID, Artists FROM users_notify_filters WHERE UserID='$LoggedUser[ID]' AND Label='Artist notifications' LIMIT 1");
|
$DB->query("
|
||||||
|
SELECT ID, Artists
|
||||||
|
FROM users_notify_filters
|
||||||
|
WHERE UserID = '$LoggedUser[ID]'
|
||||||
|
AND Label = 'Artist notifications'
|
||||||
|
LIMIT 1");
|
||||||
$Notify = $DB->next_record(MYSQLI_ASSOC, false);
|
$Notify = $DB->next_record(MYSQLI_ASSOC, false);
|
||||||
$Cache->cache_value('notify_artists_'.$LoggedUser['ID'], $Notify, 0);
|
$Cache->cache_value('notify_artists_'.$LoggedUser['ID'], $Notify, 0);
|
||||||
}
|
}
|
||||||
if (stripos($Notify['Artists'], '|'.$Name.'|') === false) {
|
if (stripos($Notify['Artists'], '|'.$Name.'|') === false) {
|
||||||
?>
|
?>
|
||||||
<a href="artist.php?action=notify&artistid=<?=$ArtistID?>&auth=<?=$LoggedUser['AuthKey']?>" class="brackets">Notify of new uploads</a>
|
<a href="artist.php?action=notify&artistid=<?=$ArtistID?>&auth=<?=$LoggedUser['AuthKey']?>" class="brackets">Notify of new uploads</a>
|
||||||
<?
|
<? } else { ?>
|
||||||
} else {
|
|
||||||
?>
|
|
||||||
<a href="artist.php?action=notifyremove&artistid=<?=$ArtistID?>&auth=<?=$LoggedUser['AuthKey']?>" class="brackets">Do not notify of new uploads</a>
|
<a href="artist.php?action=notifyremove&artistid=<?=$ArtistID?>&auth=<?=$LoggedUser['AuthKey']?>" class="brackets">Do not notify of new uploads</a>
|
||||||
<?
|
<?
|
||||||
}
|
}
|
||||||
@ -493,15 +500,10 @@ function compare($X, $Y) {
|
|||||||
|
|
||||||
if (Bookmarks::has_bookmarked('artist', $ArtistID)) {
|
if (Bookmarks::has_bookmarked('artist', $ArtistID)) {
|
||||||
?>
|
?>
|
||||||
<a href="#" id="bookmarklink_artist_<?=$ArtistID?>" onclick="Unbookmark('artist', <?=$ArtistID?>,'Bookmark');return false;" class="brackets">Remove bookmark</a>
|
<a href="#" id="bookmarklink_artist_<?=$ArtistID?>" onclick="Unbookmark('artist', <?=$ArtistID?>, 'Bookmark'); return false;" class="brackets">Remove bookmark</a>
|
||||||
|
<? } else { ?>
|
||||||
<?
|
<a href="#" id="bookmarklink_artist_<?=$ArtistID?>" onclick="Bookmark('artist', <?=$ArtistID?>, 'Remove bookmark'); return false;" class="brackets">Bookmark</a>
|
||||||
} else {
|
<? } ?>
|
||||||
?>
|
|
||||||
<a href="#" id="bookmarklink_artist_<?=$ArtistID?>" onclick="Bookmark('artist', <?=$ArtistID?>,'Remove bookmark');return false;" class="brackets">Bookmark</a>
|
|
||||||
<?
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<!-- <a href="#" id="recommend" class="brackets">Recommend</a> -->
|
<!-- <a href="#" id="recommend" class="brackets">Recommend</a> -->
|
||||||
<?
|
<?
|
||||||
if (check_perms('site_edit_wiki')) {
|
if (check_perms('site_edit_wiki')) {
|
||||||
@ -509,6 +511,9 @@ function compare($X, $Y) {
|
|||||||
<a href="artist.php?action=edit&artistid=<?=$ArtistID?>" class="brackets">Edit</a>
|
<a href="artist.php?action=edit&artistid=<?=$ArtistID?>" class="brackets">Edit</a>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
<a href="artist.php?action=history&artistid=<?=$ArtistID?>" class="brackets">View history</a>
|
<a href="artist.php?action=history&artistid=<?=$ArtistID?>" class="brackets">View history</a>
|
||||||
|
<? if ($RevisionID && check_perms('site_edit_wiki')) { ?>
|
||||||
|
<a href="artist.php?action=revert&artistid=<?=$ArtistID?>&revisionid=<?=$RevisionID?>&auth=<?=$LoggedUser['AuthKey']?>" class="brackets">Revert to this revision</a>
|
||||||
|
<? } ?>
|
||||||
<a href="artist.php?id=<?=$ArtistID?>#info" class="brackets">Info</a>
|
<a href="artist.php?id=<?=$ArtistID?>#info" class="brackets">Info</a>
|
||||||
<? if (defined('LASTFM_API_KEY')) { ?>
|
<? if (defined('LASTFM_API_KEY')) { ?>
|
||||||
<a href="artist.php?id=<?=$ArtistID?>#concerts" class="brackets">Concerts</a>
|
<a href="artist.php?id=<?=$ArtistID?>#concerts" class="brackets">Concerts</a>
|
||||||
@ -516,11 +521,6 @@ function compare($X, $Y) {
|
|||||||
<a href="artist.php?id=<?=$ArtistID?>#artistcomments" class="brackets">Comments</a>
|
<a href="artist.php?id=<?=$ArtistID?>#artistcomments" class="brackets">Comments</a>
|
||||||
<? if (check_perms('site_delete_artist') && check_perms('torrents_delete')) { ?>
|
<? if (check_perms('site_delete_artist') && check_perms('torrents_delete')) { ?>
|
||||||
<a href="artist.php?action=delete&artistid=<?=$ArtistID?>&auth=<?=$LoggedUser['AuthKey']?>" class="brackets">Delete</a>
|
<a href="artist.php?action=delete&artistid=<?=$ArtistID?>&auth=<?=$LoggedUser['AuthKey']?>" class="brackets">Delete</a>
|
||||||
<? }
|
|
||||||
|
|
||||||
if ($RevisionID && check_perms('site_edit_wiki')) {
|
|
||||||
?>
|
|
||||||
<a href="artist.php?action=revert&artistid=<?=$ArtistID?>&revisionid=<?=$RevisionID?>&auth=<?=$LoggedUser['AuthKey']?>" class="brackets">Revert to this revision</a>
|
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -530,7 +530,7 @@ function compare($X, $Y) {
|
|||||||
<div class="box box_image">
|
<div class="box box_image">
|
||||||
<div class="head"><strong><?=$Name?></strong></div>
|
<div class="head"><strong><?=$Name?></strong></div>
|
||||||
<div style="text-align: center; padding: 10px 0px;">
|
<div style="text-align: center; padding: 10px 0px;">
|
||||||
<img style="max-width: 220px;" src="<?=ImageTools::process($Image, true)?>" alt="<?=$Name?>" onclick="lightbox.init('<?=ImageTools::process($Image)?>',220);" />
|
<img style="max-width: 220px;" src="<?=ImageTools::process($Image, true)?>" alt="<?=$Name?>" onclick="lightbox.init('<?=ImageTools::process($Image)?>', 220);" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
|
@ -23,11 +23,11 @@
|
|||||||
Body,
|
Body,
|
||||||
VanityHouse
|
VanityHouse
|
||||||
FROM artists_group AS a
|
FROM artists_group AS a
|
||||||
LEFT JOIN wiki_artists ON wiki_artists.RevisionID=a.RevisionID
|
LEFT JOIN wiki_artists ON wiki_artists.RevisionID = a.RevisionID
|
||||||
WHERE a.ArtistID='$ArtistID'");
|
WHERE a.ArtistID = '$ArtistID'");
|
||||||
|
|
||||||
if ($DB->record_count() < 1) {
|
if ($DB->record_count() < 1) {
|
||||||
error("Cannot find the artist with the ID ".$ArtistID.': See the <a href="log.php?search=Artist+'.$ArtistID.'">log</a>.');
|
error("Cannot find an artist with the ID {$ArtistID}: See the <a href=\"log.php?search=Artist+$ArtistID\">site log</a>.");
|
||||||
}
|
}
|
||||||
|
|
||||||
list($Name, $Image, $Body, $VanityHouse) = $DB->next_record(MYSQLI_NUM, true);
|
list($Name, $Image, $Body, $VanityHouse) = $DB->next_record(MYSQLI_NUM, true);
|
||||||
@ -45,12 +45,14 @@
|
|||||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||||
<input type="hidden" name="artistid" value="<?=$ArtistID?>" />
|
<input type="hidden" name="artistid" value="<?=$ArtistID?>" />
|
||||||
<div>
|
<div>
|
||||||
<h3>Image</h3>
|
<h3>Image:</h3>
|
||||||
<input type="text" name="image" size="92" value="<?=$Image?>" /><br />
|
<input type="text" name="image" size="92" value="<?=$Image?>" /><br />
|
||||||
<h3>Artist info</h3>
|
<h3>Artist information:</h3>
|
||||||
<textarea name="body" cols="91" rows="20"><?=$Body?></textarea> <br />
|
<textarea name="body" cols="91" rows="20"><?=$Body?></textarea> <br />
|
||||||
<h3>Vanity House <input type="checkbox" name="vanity_house" value="1"<?=(check_perms('artist_edit_vanityhouse') ? '' : ' disabled="disabled"' )?><?=($VanityHouse ? ' checked="checked"' : '')?> /></h3>
|
<h3>
|
||||||
<h3>Edit summary</h3>
|
<label>Vanity House: <input type="checkbox" name="vanity_house" value="1"<?=(check_perms('artist_edit_vanityhouse') ? '' : ' disabled="disabled"' )?><?=($VanityHouse ? ' checked="checked"' : '')?> /></label>
|
||||||
|
</h3>
|
||||||
|
<h3>Edit summary:</h3>
|
||||||
<input type="text" name="summary" size="92" /><br />
|
<input type="text" name="summary" size="92" /><br />
|
||||||
<div style="text-align: center;">
|
<div style="text-align: center;">
|
||||||
<input type="submit" value="Submit" />
|
<input type="submit" value="Submit" />
|
||||||
@ -59,7 +61,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<? if (check_perms('torrents_edit')) { ?>
|
<? if (check_perms('torrents_edit')) { ?>
|
||||||
<h2>Rename</h2>
|
<h2>Rename this artist</h2>
|
||||||
<div class="box pad">
|
<div class="box pad">
|
||||||
<form class="rename_form" name="artist" action="artist.php" method="post">
|
<form class="rename_form" name="artist" action="artist.php" method="post">
|
||||||
<input type="hidden" name="action" value="rename" />
|
<input type="hidden" name="action" value="rename" />
|
||||||
@ -70,7 +72,6 @@
|
|||||||
<div style="text-align: center;">
|
<div style="text-align: center;">
|
||||||
<input type="submit" value="Rename" />
|
<input type="submit" value="Rename" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@ -82,7 +83,7 @@
|
|||||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||||
<input type="hidden" name="artistid" value="<?=$ArtistID?>" />
|
<input type="hidden" name="artistid" value="<?=$ArtistID?>" />
|
||||||
<div>
|
<div>
|
||||||
<em>Merges this artist (<?=$Name?>) into the artist specified below (without redirection), so that "<?=$Name?>" (and its aliases) will appear as a non-redirecting alias of the artist entered in the text box below.</em><br /><br />
|
<p>Merges this artist ("<?=$Name?>") into the artist specified below (without redirection), so that ("<?=$Name?>") and its aliases will appear as a non-redirecting alias of the artist entered in the text box below.</p><br />
|
||||||
<div style="text-align: center;">
|
<div style="text-align: center;">
|
||||||
<label for="newartistid">Artist ID:</label> <input type="text" id="newartistid" name="newartistid" size="40" value="" /><br />
|
<label for="newartistid">Artist ID:</label> <input type="text" id="newartistid" name="newartistid" size="40" value="" /><br />
|
||||||
<strong>OR</strong><br />
|
<strong>OR</strong><br />
|
||||||
@ -94,41 +95,59 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>Aliases</h2>
|
<h2>Artist aliases</h2>
|
||||||
<div class="box pad">
|
<div class="box pad">
|
||||||
<ul>
|
<h3>List of existing artist aliases</h3>
|
||||||
|
<div class="pad">
|
||||||
|
<ul>
|
||||||
|
|
||||||
<?
|
<?
|
||||||
$DB->query("SELECT AliasID, Name, UserID, Redirect FROM artists_alias WHERE ArtistID='$ArtistID'");
|
$DB->query("
|
||||||
|
SELECT AliasID, Name, UserID, Redirect
|
||||||
|
FROM artists_alias
|
||||||
|
WHERE ArtistID = '$ArtistID'");
|
||||||
while (list($AliasID, $AliasName, $User, $Redirect) = $DB->next_record(MYSQLI_NUM, true)) {
|
while (list($AliasID, $AliasName, $User, $Redirect) = $DB->next_record(MYSQLI_NUM, true)) {
|
||||||
if ($AliasName == $Name) {
|
if ($AliasName == $Name) {
|
||||||
$DefaultRedirectID = $AliasID;
|
$DefaultRedirectID = $AliasID;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<li>
|
<li>
|
||||||
<span title="Alias ID"><?=$AliasID?></span>. <span title="Alias name"><?=$AliasName?></span>
|
<span title="Alias ID"><?=$AliasID?></span>. <span title="Alias name"><?=$AliasName?></span>
|
||||||
<? if ($User) { ?>
|
<? if ($User) { ?>
|
||||||
<a href="user.php?id=<?=$User?>" title="Alias creator" class="brackets">User</a>
|
<a href="user.php?id=<?=$User?>" title="Alias creator" class="brackets">User</a>
|
||||||
<? }
|
<? }
|
||||||
if ($Redirect) { ?>
|
if ($Redirect) { ?>
|
||||||
(writes redirect to <span title="Target alias ID"><?=$Redirect?></span>)
|
(writes redirect to <span title="Target alias ID"><?=$Redirect?></span>)
|
||||||
<? } ?>
|
<? } ?>
|
||||||
<a href="artist.php?action=delete_alias&aliasid=<?=$AliasID?>&auth=<?=$LoggedUser['AuthKey']?>" title="Delete this alias" class="brackets">X</a>
|
<a href="artist.php?action=delete_alias&aliasid=<?=$AliasID?>&auth=<?=$LoggedUser['AuthKey']?>" title="Delete this alias" class="brackets">X</a>
|
||||||
</li>
|
</li>
|
||||||
<? }
|
<? }
|
||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
<form class="add_form" name="aliases" action="artist.php" method="post">
|
</div>
|
||||||
<input type="hidden" name="action" value="add_alias" />
|
<br />
|
||||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
<h3>Add a new artist alias</h3>
|
||||||
<input type="hidden" name="artistid" value="<?=$ArtistID?>" />
|
<div class="pad">
|
||||||
<h3>Name:</h3>
|
<p>This redirects artist names as they are written (e.g. when new torrents are uploaded or artists added). All uses of this new alias will be redirected to the alias ID you enter here. Use for common misspellings, inclusion of diacritical marks, etc.</p>
|
||||||
<input type="text" name="name" size="40" value="<?=$Name?>" /><br />
|
<form class="add_form" name="aliases" action="artist.php" method="post">
|
||||||
<h3>Writes redirect to (enter an Alias ID; leave blank or enter "0" for no redirect):</h3>
|
<input type="hidden" name="action" value="add_alias" />
|
||||||
<input type="text" name="redirect" size="40" value="<?=$DefaultRedirectID?>" /><br />
|
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||||
<em>This redirects artist names as they are written (e.g. when new torrents are uploaded or artists added). All uses of this new alias will be redirected to the alias ID you enter here. Use for common misspellings, etc.</em><br />
|
<input type="hidden" name="artistid" value="<?=$ArtistID?>" />
|
||||||
<input type="submit" value="Add alias" />
|
<div class="field_div">
|
||||||
</form>
|
<span class="label"><strong>Name:</strong></span>
|
||||||
|
<br />
|
||||||
|
<input type="text" name="name" size="40" value="<?=$Name?>" />
|
||||||
|
</div>
|
||||||
|
<div class="field_div">
|
||||||
|
<span class="label"><strong>Writes redirect to (enter an Alias ID; leave blank or enter "0" for no redirect):</strong></span>
|
||||||
|
<br />
|
||||||
|
<input type="text" name="redirect" size="40" value="<?=$DefaultRedirectID?>" /><br />
|
||||||
|
</div>
|
||||||
|
<div class="submit_div">
|
||||||
|
<input type="submit" value="Add alias" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</div>
|
</div>
|
||||||
|
@ -16,11 +16,11 @@
|
|||||||
error(0);
|
error(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
include(SERVER_ROOT.'/classes/wiki.class.php'); // Wiki class
|
|
||||||
$Wiki = new WIKI('wiki_artists', $ArtistID, "artist.php?id=$ArtistID");
|
|
||||||
|
|
||||||
// Get the artist name and the body of the last revision
|
// Get the artist name and the body of the last revision
|
||||||
$DB->query("SELECT Name FROM artists_group WHERE ArtistID='$ArtistID'");
|
$DB->query("
|
||||||
|
SELECT Name
|
||||||
|
FROM artists_group
|
||||||
|
WHERE ArtistID = '$ArtistID'");
|
||||||
list($Name) = $DB->next_record(MYSQLI_NUM, true);
|
list($Name) = $DB->next_record(MYSQLI_NUM, true);
|
||||||
|
|
||||||
View::show_header("Revision history for $Name"); // Set title
|
View::show_header("Revision history for $Name"); // Set title
|
||||||
@ -32,7 +32,8 @@
|
|||||||
<h2>Revision history for <a href="artist.php?id=<?=$ArtistID?>"><?=$Name?></a></h2>
|
<h2>Revision history for <a href="artist.php?id=<?=$ArtistID?>"><?=$Name?></a></h2>
|
||||||
</div>
|
</div>
|
||||||
<?
|
<?
|
||||||
$Wiki->revision_history(); // the wiki class takes over from here
|
// the Wiki class takes over from here
|
||||||
|
Wiki::revision_history('wiki_artists', $ArtistID, "artist.php?id=$ArtistID");
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?
|
<?
|
||||||
|
@ -563,9 +563,9 @@ function generate_torrent_table($Caption, $Tag, $Details, $Limit) {
|
|||||||
<?
|
<?
|
||||||
if ($IsBookmarked) {
|
if ($IsBookmarked) {
|
||||||
?>
|
?>
|
||||||
<a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="remove_bookmark" title="Remove bookmark" onclick="Unbookmark('torrent',<?=$GroupID?>,'Bookmark');return false;">Unbookmark</a>
|
<a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="remove_bookmark brackets" title="Remove bookmark" onclick="Unbookmark('torrent', <?=$GroupID?>, 'Bookmark'); return false;">Unbookmark</a>
|
||||||
<? } else { ?>
|
<? } else { ?>
|
||||||
<a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="add_bookmark" title="Add bookmark" onclick="Bookmark('torrent',<?=$GroupID?>,'Unbookmark');return false;">Bookmark</a>
|
<a href="#" id="bookmarklink_torrent_<?=$GroupID?>" class="add_bookmark brackets" title="Add bookmark" onclick="Bookmark('torrent', <?=$GroupID?>, 'Unbookmark'); return false;">Bookmark</a>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</span>
|
</span>
|
||||||
<div class="tags"><?=$TorrentTags->format()?></div>
|
<div class="tags"><?=$TorrentTags->format()?></div>
|
||||||
|
@ -163,7 +163,7 @@ function compare($X, $Y) {
|
|||||||
<div id="covers">
|
<div id="covers">
|
||||||
<div id="cover_div_<?=$Index?>" class="pad">
|
<div id="cover_div_<?=$Index?>" class="pad">
|
||||||
<? if ($WikiImage != '') { ?>
|
<? if ($WikiImage != '') { ?>
|
||||||
<p align="center"><img width="100%" src="<?=ImageTools::process($WikiImage, true)?>" alt="<?=$AltName?>" onclick="lightbox.init('<?=ImageTools::process($WikiImage)?>',220);" /></p>
|
<p align="center"><img width="100%" src="<?=ImageTools::process($WikiImage, true)?>" alt="<?=$AltName?>" onclick="lightbox.init('<?=ImageTools::process($WikiImage)?>', 220);" /></p>
|
||||||
<? } else { ?>
|
<? } else { ?>
|
||||||
<p align="center"><img src="<?=STATIC_SERVER?>common/noartwork/<?=$CategoryIcons[$GroupCategoryID - 1]?>" alt="<?=$Categories[$GroupCategoryID - 1]?>" title="<?=$Categories[$GroupCategoryID - 1]?>" width="220" height="220" border="0" /></p>
|
<p align="center"><img src="<?=STATIC_SERVER?>common/noartwork/<?=$CategoryIcons[$GroupCategoryID - 1]?>" alt="<?=$Categories[$GroupCategoryID - 1]?>" title="<?=$Categories[$GroupCategoryID - 1]?>" width="220" height="220" border="0" /></p>
|
||||||
<?
|
<?
|
||||||
@ -188,7 +188,7 @@ function compare($X, $Y) {
|
|||||||
<li>
|
<li>
|
||||||
<?=$Summary?>
|
<?=$Summary?>
|
||||||
<?=(check_perms('users_mod') ? ' added by ' . Users::format_username($AddedBy, false, false, false, false, false) : '')?>
|
<?=(check_perms('users_mod') ? ' added by ' . Users::format_username($AddedBy, false, false, false, false, false) : '')?>
|
||||||
<span class="remove remove_cover_art"><a href="#" onclick="ajax.get('torrents.php?action=remove_cover_art&auth=<?=$LoggedUser['AuthKey']?>&id=<?=$ImageID?>&groupid=<?=$GroupID?>');this.parentNode.parentNode.parentNode.style.display = 'none';this.parentNode.parentNode.parentNode.previousElementSibling.style.display = 'none';" class="brackets" title="Remove Image">X</a></span>
|
<span class="remove remove_cover_art"><a href="#" onclick="ajax.get('torrents.php?action=remove_cover_art&auth=<?=$LoggedUser['AuthKey']?>&id=<?=$ImageID?>&groupid=<?=$GroupID?>'); this.parentNode.parentNode.parentNode.style.display = 'none'; this.parentNode.parentNode.parentNode.previousElementSibling.style.display = 'none';" class="brackets" title="Remove Image">X</a></span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -244,8 +244,8 @@ function compare($X, $Y) {
|
|||||||
$AliasID = $Artist['id'];
|
$AliasID = $Artist['id'];
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
(<?=$AliasID?>)
|
(<span title="Artist alias ID"><?=$AliasID?></span>)
|
||||||
<span class="remove remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&auth=' + authkey + '&groupid=<?=$GroupID?>&artistid=<?=$Artist['id']?>&importance=4');this.parentNode.parentNode.style.display = 'none';" class="brackets" title="Remove artist">X</a></span>
|
<span class="remove remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&auth=' + authkey + '&groupid=<?=$GroupID?>&artistid=<?=$Artist['id']?>&importance=4'); this.parentNode.parentNode.style.display = 'none';" class="brackets" title="Remove artist">X</a></span>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</li>
|
</li>
|
||||||
<? }
|
<? }
|
||||||
@ -257,14 +257,19 @@ function compare($X, $Y) {
|
|||||||
<li class="artists_dj">
|
<li class="artists_dj">
|
||||||
<?=Artists::display_artist($Artist).' ‎'?>
|
<?=Artists::display_artist($Artist).' ‎'?>
|
||||||
<? if (check_perms('torrents_edit')) {
|
<? if (check_perms('torrents_edit')) {
|
||||||
$DB->query("SELECT AliasID FROM artists_alias WHERE ArtistID = ".$Artist['id']." AND ArtistID != AliasID AND Name = '".db_string($Artist['name'])."'");
|
$DB->query("
|
||||||
|
SELECT AliasID
|
||||||
|
FROM artists_alias
|
||||||
|
WHERE ArtistID = ".$Artist['id']."
|
||||||
|
AND ArtistID != AliasID
|
||||||
|
AND Name = '".db_string($Artist['name'])."'");
|
||||||
list($AliasID) = $DB->next_record();
|
list($AliasID) = $DB->next_record();
|
||||||
if (empty($AliasID)) {
|
if (empty($AliasID)) {
|
||||||
$AliasID = $Artist['id'];
|
$AliasID = $Artist['id'];
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
(<?=$AliasID?>)
|
(<span title="Artist alias ID"><?=$AliasID?></span>)
|
||||||
<span class="remove remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&auth=' + authkey + '&groupid=<?=$GroupID?>&artistid=<?=$Artist['id']?>&importance=6');this.parentNode.parentNode.style.display = 'none';" class="brackets" title="Remove artist">X</a></span>
|
<span class="remove remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&auth=' + authkey + '&groupid=<?=$GroupID?>&artistid=<?=$Artist['id']?>&importance=6'); this.parentNode.parentNode.style.display = 'none';" class="brackets" title="Remove artist">X</a></span>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</li>
|
</li>
|
||||||
<?
|
<?
|
||||||
@ -285,8 +290,8 @@ function compare($X, $Y) {
|
|||||||
$AliasID = $Artist['id'];
|
$AliasID = $Artist['id'];
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
(<?=$AliasID?>)
|
(<span title="Artist alias ID"><?=$AliasID?></span>)
|
||||||
<span class="remove remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&auth=' + authkey + '&groupid=<?=$GroupID?>&artistid=<?=$Artist['id']?>&importance=1');this.parentNode.parentNode.style.display = 'none';" class="brackets" title="Remove artist">X</a></span>
|
<span class="remove remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&auth=' + authkey + '&groupid=<?=$GroupID?>&artistid=<?=$Artist['id']?>&importance=1'); this.parentNode.parentNode.style.display = 'none';" class="brackets" title="Remove artist">X</a></span>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</li>
|
</li>
|
||||||
<?
|
<?
|
||||||
@ -298,14 +303,19 @@ function compare($X, $Y) {
|
|||||||
<li class="artist_guest">
|
<li class="artist_guest">
|
||||||
<?=Artists::display_artist($Artist).' ‎'?>
|
<?=Artists::display_artist($Artist).' ‎'?>
|
||||||
<? if (check_perms('torrents_edit')) {
|
<? if (check_perms('torrents_edit')) {
|
||||||
$DB->query("SELECT AliasID FROM artists_alias WHERE ArtistID = ".$Artist['id']." AND ArtistID != AliasID AND Name = '".db_string($Artist['name'])."'");
|
$DB->query("
|
||||||
|
SELECT AliasID
|
||||||
|
FROM artists_alias
|
||||||
|
WHERE ArtistID = ".$Artist['id']."
|
||||||
|
AND ArtistID != AliasID
|
||||||
|
AND Name = '".db_string($Artist['name'])."'");
|
||||||
list($AliasID) = $DB->next_record();
|
list($AliasID) = $DB->next_record();
|
||||||
if (empty($AliasID)) {
|
if (empty($AliasID)) {
|
||||||
$AliasID = $Artist['id'];
|
$AliasID = $Artist['id'];
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
(<?=$AliasID?>)
|
(<span title="Artist alias ID"><?=$AliasID?></span>)
|
||||||
<span class="remove remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&auth=' + authkey + '&groupid=<?=$GroupID?>&artistid=<?=$Artist['id']?>&importance=2');this.parentNode.parentNode.style.display = 'none';" class="brackets" title="Remove artist">X</a></span>
|
<span class="remove remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&auth=' + authkey + '&groupid=<?=$GroupID?>&artistid=<?=$Artist['id']?>&importance=2'); this.parentNode.parentNode.style.display = 'none';" class="brackets" title="Remove artist">X</a></span>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</li>
|
</li>
|
||||||
<?
|
<?
|
||||||
@ -318,14 +328,19 @@ function compare($X, $Y) {
|
|||||||
<li class="artists_conductors">
|
<li class="artists_conductors">
|
||||||
<?=Artists::display_artist($Artist).' ‎'?>
|
<?=Artists::display_artist($Artist).' ‎'?>
|
||||||
<? if (check_perms('torrents_edit')) {
|
<? if (check_perms('torrents_edit')) {
|
||||||
$DB->query("SELECT AliasID FROM artists_alias WHERE ArtistID = ".$Artist['id']." AND ArtistID != AliasID AND Name = '".db_string($Artist['name'])."'");
|
$DB->query("
|
||||||
|
SELECT AliasID
|
||||||
|
FROM artists_alias
|
||||||
|
WHERE ArtistID = ".$Artist['id']."
|
||||||
|
AND ArtistID != AliasID
|
||||||
|
AND Name = '".db_string($Artist['name'])."'");
|
||||||
list($AliasID) = $DB->next_record();
|
list($AliasID) = $DB->next_record();
|
||||||
if (empty($AliasID)) {
|
if (empty($AliasID)) {
|
||||||
$AliasID = $Artist['id'];
|
$AliasID = $Artist['id'];
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
(<?=$AliasID?>)
|
(<span title="Artist alias ID"><?=$AliasID?></span>)
|
||||||
<span class="remove remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&auth=' + authkey + '&groupid=<?=$GroupID?>&artistid=<?=$Artist['id']?>&importance=5');this.parentNode.parentNode.style.display = 'none';" class="brackets" title="Remove conductor">X</a></span>
|
<span class="remove remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&auth=' + authkey + '&groupid=<?=$GroupID?>&artistid=<?=$Artist['id']?>&importance=5'); this.parentNode.parentNode.style.display = 'none';" class="brackets" title="Remove conductor">X</a></span>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</li>
|
</li>
|
||||||
<?
|
<?
|
||||||
@ -338,14 +353,19 @@ function compare($X, $Y) {
|
|||||||
<li class="artists_remix">
|
<li class="artists_remix">
|
||||||
<?=Artists::display_artist($Artist).' ‎'?>
|
<?=Artists::display_artist($Artist).' ‎'?>
|
||||||
<? if (check_perms('torrents_edit')) {
|
<? if (check_perms('torrents_edit')) {
|
||||||
$DB->query("SELECT AliasID FROM artists_alias WHERE ArtistID = ".$Artist['id']." AND ArtistID != AliasID AND Name = '".db_string($Artist['name'])."'");
|
$DB->query("
|
||||||
|
SELECT AliasID
|
||||||
|
FROM artists_alias
|
||||||
|
WHERE ArtistID = ".$Artist['id']."
|
||||||
|
AND ArtistID != AliasID
|
||||||
|
AND Name = '".db_string($Artist['name'])."'");
|
||||||
list($AliasID) = $DB->next_record();
|
list($AliasID) = $DB->next_record();
|
||||||
if (empty($AliasID)) {
|
if (empty($AliasID)) {
|
||||||
$AliasID = $Artist['id'];
|
$AliasID = $Artist['id'];
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
(<?=$AliasID?>)
|
(<span title="Artist alias ID"><?=$AliasID?></span>)
|
||||||
<span class="remove remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&auth=' + authkey + '&groupid=<?=$GroupID?>&artistid=<?=$Artist['id']?>&importance=3');this.parentNode.parentNode.style.display = 'none';" class="brackets" title="Remove artist">X</a></span>
|
<span class="remove remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&auth=' + authkey + '&groupid=<?=$GroupID?>&artistid=<?=$Artist['id']?>&importance=3'); this.parentNode.parentNode.style.display = 'none';" class="brackets" title="Remove artist">X</a></span>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</li>
|
</li>
|
||||||
<?
|
<?
|
||||||
@ -357,20 +377,21 @@ function compare($X, $Y) {
|
|||||||
?>
|
?>
|
||||||
<li class="artists_producer">
|
<li class="artists_producer">
|
||||||
<?=Artists::display_artist($Artist).' ‎'?>
|
<?=Artists::display_artist($Artist).' ‎'?>
|
||||||
<? if (check_perms('torrents_edit')) {
|
<?
|
||||||
$DB->query("
|
if (check_perms('torrents_edit')) {
|
||||||
SELECT AliasID
|
$DB->query("
|
||||||
FROM artists_alias
|
SELECT AliasID
|
||||||
WHERE ArtistID = ".$Artist['id']."
|
FROM artists_alias
|
||||||
AND ArtistID != AliasID
|
WHERE ArtistID = ".$Artist['id']."
|
||||||
AND Name = '".db_string($Artist['name'])."'");
|
AND ArtistID != AliasID
|
||||||
list($AliasID) = $DB->next_record();
|
AND Name = '".db_string($Artist['name'])."'");
|
||||||
if (empty($AliasID)) {
|
list($AliasID) = $DB->next_record();
|
||||||
$AliasID = $Artist['id'];
|
if (empty($AliasID)) {
|
||||||
}
|
$AliasID = $Artist['id'];
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
(<?=$AliasID?>)
|
(<span title="Artist alias ID"><?=$AliasID?></span>)
|
||||||
<span class="remove remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&auth=' + authkey + '&groupid=<?=$GroupID?>&artistid=<?=$Artist['id']?>&importance=7');this.parentNode.parentNode.style.display = 'none';" class="brackets" title="Remove producer">X</a></span>
|
<span class="remove remove_artist"><a href="javascript:void(0);" onclick="ajax.get('torrents.php?action=delete_alias&auth=' + authkey + '&groupid=<?=$GroupID?>&artistid=<?=$Artist['id']?>&importance=7'); this.parentNode.parentNode.style.display = 'none';" class="brackets" title="Remove producer">X</a></span>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</li>
|
</li>
|
||||||
<?
|
<?
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
<?
|
<?
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
||------------|| Edit artist wiki page ||------------------------------||
|
||------------|| Edit torrent group wiki page ||-----------------------||
|
||||||
|
|
||||||
This page is the page that is displayed when someone feels like editing
|
This page is the page that is displayed when someone feels like editing
|
||||||
an artist's wiki page.
|
a torrent group's wiki page.
|
||||||
|
|
||||||
It is called when $_GET['action'] == 'edit'. $_GET['artistid'] is the
|
It is called when $_GET['action'] == 'edit'. $_GET['groupid'] is the
|
||||||
ID of the artist, and must be set.
|
ID of the torrent group and must be set.
|
||||||
|
|
||||||
The page inserts a new revision into the wiki_artists table, and clears
|
The page inserts a new revision into the wiki_torrents table, and clears
|
||||||
the cache for the artist page.
|
the cache for the torrent group page.
|
||||||
|
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
@ -18,7 +18,7 @@
|
|||||||
error(0);
|
error(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the artist name and the body of the last revision
|
// Get the torrent group name and the body of the last revision
|
||||||
$DB->query("
|
$DB->query("
|
||||||
SELECT
|
SELECT
|
||||||
tg.Name,
|
tg.Name,
|
||||||
@ -59,9 +59,9 @@
|
|||||||
<input type="hidden" name="action" value="takegroupedit" />
|
<input type="hidden" name="action" value="takegroupedit" />
|
||||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||||
<input type="hidden" name="groupid" value="<?=$GroupID?>" />
|
<input type="hidden" name="groupid" value="<?=$GroupID?>" />
|
||||||
<h3>Image</h3>
|
<h3>Image:</h3>
|
||||||
<input type="text" name="image" size="92" value="<?=$Image?>" /><br />
|
<input type="text" name="image" size="92" value="<?=$Image?>" /><br />
|
||||||
<h3>Description</h3>
|
<h3>Torrent group description:</h3>
|
||||||
<textarea name="body" cols="91" rows="20"><?=$Body?></textarea><br />
|
<textarea name="body" cols="91" rows="20"><?=$Body?></textarea><br />
|
||||||
<? if ($CategoryID == 1) { ?>
|
<? if ($CategoryID == 1) { ?>
|
||||||
<select id="releasetype" name="releasetype">
|
<select id="releasetype" name="releasetype">
|
||||||
@ -78,7 +78,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<h3>Edit summary</h3>
|
<h3>Edit summary:</h3>
|
||||||
<input type="text" name="summary" size="92" /><br />
|
<input type="text" name="summary" size="92" /><br />
|
||||||
<div style="text-align: center;">
|
<div style="text-align: center;">
|
||||||
<input type="submit" value="Submit" />
|
<input type="submit" value="Submit" />
|
||||||
@ -93,7 +93,7 @@
|
|||||||
WHERE GroupID = $GroupID");
|
WHERE GroupID = $GroupID");
|
||||||
//Users can edit the group info if they've uploaded a torrent to the group or have torrents_edit
|
//Users can edit the group info if they've uploaded a torrent to the group or have torrents_edit
|
||||||
if (in_array($LoggedUser['ID'], $DB->collect('UserID')) || check_perms('torrents_edit')) { ?>
|
if (in_array($LoggedUser['ID'], $DB->collect('UserID')) || check_perms('torrents_edit')) { ?>
|
||||||
<h3>Non-wiki group editing</h3>
|
<h3>Non-wiki torrent group editing</h3>
|
||||||
<div class="box pad">
|
<div class="box pad">
|
||||||
<form class="edit_form" name="torrent_group" action="torrents.php" method="post">
|
<form class="edit_form" name="torrent_group" action="torrents.php" method="post">
|
||||||
<input type="hidden" name="action" value="nonwikiedit" />
|
<input type="hidden" name="action" value="nonwikiedit" />
|
||||||
@ -146,7 +146,7 @@
|
|||||||
}
|
}
|
||||||
if (check_perms('torrents_edit')) {
|
if (check_perms('torrents_edit')) {
|
||||||
?>
|
?>
|
||||||
<h3>Rename (won't merge)</h3>
|
<h3>Rename (will not merge)</h3>
|
||||||
<div class="box pad">
|
<div class="box pad">
|
||||||
<form class="rename_form" name="torrent_group" action="torrents.php" method="post">
|
<form class="rename_form" name="torrent_group" action="torrents.php" method="post">
|
||||||
<div>
|
<div>
|
||||||
@ -167,7 +167,7 @@
|
|||||||
<input type="hidden" name="action" value="merge" />
|
<input type="hidden" name="action" value="merge" />
|
||||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||||
<input type="hidden" name="groupid" value="<?=$GroupID?>" />
|
<input type="hidden" name="groupid" value="<?=$GroupID?>" />
|
||||||
<h3>Target Group ID</h3>
|
<h3>Target torrent group ID</h3>
|
||||||
<input type="text" name="targetgroupid" size="10" />
|
<input type="text" name="targetgroupid" size="10" />
|
||||||
<div style="text-align: center;">
|
<div style="text-align: center;">
|
||||||
<input type="submit" value="Merge" />
|
<input type="submit" value="Merge" />
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<?
|
<?
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
||------------|| Artist wiki history page ||---------------------------||
|
||------------|| Torrent group wiki history page ||--------------------||
|
||||||
|
|
||||||
This page lists previous revisions of the artists page. It gets called
|
This page lists previous revisions of the torrent group page. It gets
|
||||||
if $_GET['action'] == 'history'.
|
called if $_GET['action'] == 'history'.
|
||||||
|
|
||||||
It also requires $_GET['artistid'].
|
It also requires $_GET['groupid'].
|
||||||
|
|
||||||
The wiki class is used here to generate the page history.
|
The Wiki class is used here to generate the page history.
|
||||||
|
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
@ -16,11 +16,11 @@
|
|||||||
error(0);
|
error(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
include(SERVER_ROOT.'/classes/wiki.class.php'); // Wiki class
|
// Get the torrent group name and the body of the last revision
|
||||||
$Wiki = new WIKI('wiki_torrents', $GroupID, "/torrents.php?id=$GroupID");
|
$DB->query("
|
||||||
|
SELECT Name
|
||||||
// Get the artist name and the body of the last revision
|
FROM torrents_group
|
||||||
$DB->query("SELECT Name FROM torrents_group WHERE ID='$GroupID'");
|
WHERE ID = '$GroupID'");
|
||||||
list($Name) = $DB->next_record();
|
list($Name) = $DB->next_record();
|
||||||
|
|
||||||
if (!$Name) {
|
if (!$Name) {
|
||||||
@ -36,7 +36,8 @@
|
|||||||
<h2>Revision history for <a href="torrents.php?id=<?=$GroupID?>"><?=$Name?></a></h2>
|
<h2>Revision history for <a href="torrents.php?id=<?=$GroupID?>"><?=$Name?></a></h2>
|
||||||
</div>
|
</div>
|
||||||
<?
|
<?
|
||||||
$Wiki->revision_history(); // the wiki class takes over from here
|
// the Wiki class takes over from here
|
||||||
|
Wiki::revision_history('wiki_torrents', $GroupID, "/torrents.php?id=$GroupID");
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?
|
<?
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?
|
<?
|
||||||
|
|
||||||
//TODO: restrict to viewing bellow class, username in h2
|
//TODO: restrict to viewing below class, username in h2
|
||||||
if (isset($_GET['userid']) && check_perms('users_view_ips') && check_perms('users_logout')) {
|
if (isset($_GET['userid']) && check_perms('users_view_ips') && check_perms('users_logout')) {
|
||||||
if (!is_number($_GET['userid'])) {
|
if (!is_number($_GET['userid'])) {
|
||||||
error(404);
|
error(404);
|
||||||
@ -13,15 +13,21 @@
|
|||||||
if (isset($_POST['all'])) {
|
if (isset($_POST['all'])) {
|
||||||
authorize();
|
authorize();
|
||||||
|
|
||||||
$DB->query("DELETE FROM users_sessions WHERE UserID='$UserID' AND SessionID != '$SessionID'");
|
$DB->query("
|
||||||
$Cache->delete_value('users_sessions_'.$UserID);
|
DELETE FROM users_sessions
|
||||||
|
WHERE UserID = '$UserID'
|
||||||
|
AND SessionID != '$SessionID'");
|
||||||
|
$Cache->delete_value('users_sessions_'.$UserID);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['session'])) {
|
if (isset($_POST['session'])) {
|
||||||
authorize();
|
authorize();
|
||||||
|
|
||||||
$DB->query("DELETE FROM users_sessions WHERE UserID='$UserID' AND SessionID='".db_string($_POST['session'])."'");
|
$DB->query("
|
||||||
$Cache->delete_value('users_sessions_'.$UserID);
|
DELETE FROM users_sessions
|
||||||
|
WHERE UserID = '$UserID'
|
||||||
|
AND SessionID = '".db_string($_POST['session'])."'");
|
||||||
|
$Cache->delete_value('users_sessions_'.$UserID);
|
||||||
}
|
}
|
||||||
|
|
||||||
$UserSessions = $Cache->get_value('users_sessions_'.$UserID);
|
$UserSessions = $Cache->get_value('users_sessions_'.$UserID);
|
||||||
@ -34,9 +40,9 @@
|
|||||||
IP,
|
IP,
|
||||||
LastUpdate
|
LastUpdate
|
||||||
FROM users_sessions
|
FROM users_sessions
|
||||||
WHERE UserID='$UserID'
|
WHERE UserID = '$UserID'
|
||||||
ORDER BY LastUpdate DESC");
|
ORDER BY LastUpdate DESC");
|
||||||
$UserSessions = $DB->to_array('SessionID',MYSQLI_ASSOC);
|
$UserSessions = $DB->to_array('SessionID', MYSQLI_ASSOC);
|
||||||
$Cache->cache_value('users_sessions_'.$UserID, $UserSessions, 0);
|
$Cache->cache_value('users_sessions_'.$UserID, $UserSessions, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,17 +50,17 @@
|
|||||||
View::show_header($Username.' > Sessions');
|
View::show_header($Username.' > Sessions');
|
||||||
?>
|
?>
|
||||||
<div class="thin">
|
<div class="thin">
|
||||||
<h2><?=Users::format_username($UserID,$Username)?> > Sessions</h2>
|
<h2><?=Users::format_username($UserID, $Username)?> > Sessions</h2>
|
||||||
<div class="box pad">
|
<div class="box pad">
|
||||||
<p>Note: Clearing cookies can result in ghost sessions which are automatically removed after 30 days.</p>
|
<p>Note: Clearing cookies can result in ghost sessions which are automatically removed after 30 days.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="box pad">
|
<div class="box pad">
|
||||||
<table cellpadding="5" cellspacing="1" border="0" class="session_table border" width="100%">
|
<table cellpadding="5" cellspacing="1" border="0" class="session_table border" width="100%">
|
||||||
<tr class="colhead">
|
<tr class="colhead">
|
||||||
<td><strong>IP</strong></td>
|
<td><strong>IP address</strong></td>
|
||||||
<td><strong>Browser</strong></td>
|
<td><strong>Browser</strong></td>
|
||||||
<td><strong>Platform</strong></td>
|
<td><strong>Platform</strong></td>
|
||||||
<td><strong>Last Activity</strong></td>
|
<td><strong>Last activity</strong></td>
|
||||||
<td>
|
<td>
|
||||||
<form class="manage_form" name="sessions" action="" method="post">
|
<form class="manage_form" name="sessions" action="" method="post">
|
||||||
<input type="hidden" name="action" value="sessions" />
|
<input type="hidden" name="action" value="sessions" />
|
||||||
@ -67,7 +73,7 @@
|
|||||||
<?
|
<?
|
||||||
$Row = 'a';
|
$Row = 'a';
|
||||||
foreach ($UserSessions as $Session) {
|
foreach ($UserSessions as $Session) {
|
||||||
list($ThisSessionID,$Browser,$OperatingSystem,$IP,$LastUpdate) = array_values($Session);
|
list($ThisSessionID, $Browser, $OperatingSystem, $IP, $LastUpdate) = array_values($Session);
|
||||||
$Row = ($Row == 'a') ? 'b' : 'a';
|
$Row = ($Row == 'a') ? 'b' : 'a';
|
||||||
?>
|
?>
|
||||||
<tr class="row<?=$Row?>">
|
<tr class="row<?=$Row?>">
|
||||||
@ -84,7 +90,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -212,9 +212,7 @@ function displayCommStats(stats) {
|
|||||||
$(baseid + x).html('(' + stats[x] + ')');
|
$(baseid + x).html('(' + stats[x] + ')');
|
||||||
break;
|
break;
|
||||||
case 'seedingperc':
|
case 'seedingperc':
|
||||||
if (stats[x] !== -1) {
|
$(baseid + x).html('(' + stats[x] + '%)');
|
||||||
$(baseid + x).html('(' + stats[x] + '%)');
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -302,13 +302,11 @@ ul.votedalbums li {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tr.torrent .bookmark>a:before {
|
tr.torrent .bookmark>a:before {
|
||||||
content: "[ ";
|
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.torrent .bookmark>a:after {
|
tr.torrent .bookmark>a:after {
|
||||||
content: " ]";
|
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user