mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-31 02:21:36 +00:00
Empty commit
This commit is contained in:
parent
7c8f48be3d
commit
95e1d6266c
27
classes/class_reports.php
Normal file
27
classes/class_reports.php
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
class Reports {
|
||||||
|
/**
|
||||||
|
* This function formats a string containing a torrent's remaster information
|
||||||
|
* to be used in Reports v2.
|
||||||
|
*
|
||||||
|
* @param boolean $Remastered - whether the torrent contains remaster information
|
||||||
|
* @param string $RemasterTitle - the title of the remaster information
|
||||||
|
* @param string $RemasterYear - the year of the remaster information
|
||||||
|
*/
|
||||||
|
public static function format_reports_remaster_info($Remastered, $RemasterTitle, $RemasterYear) {
|
||||||
|
if ($Remastered) {
|
||||||
|
$RemasterDisplayString = ' <';
|
||||||
|
if ($RemasterTitle != '' && $RemasterYear != '') {
|
||||||
|
$RemasterDisplayString .= "$RemasterTitle - $RemasterYear";
|
||||||
|
} else if ($RemasterTitle != '' && $RemasterYear == '') {
|
||||||
|
$RemasterDisplayString .= $RemasterTitle;
|
||||||
|
} else if ($RemasterTitle == '' && $RemasterYear != '') {
|
||||||
|
$RemasterDisplayString .= $RemasterYear;
|
||||||
|
}
|
||||||
|
$RemasterDisplayString .= '>';
|
||||||
|
} else {
|
||||||
|
$RemasterDisplayString = '';
|
||||||
|
}
|
||||||
|
return $RemasterDisplayString;
|
||||||
|
}
|
||||||
|
}
|
@ -15,7 +15,7 @@
|
|||||||
* // returns a tag link list of tags ordered by amount
|
* // returns a tag link list of tags ordered by amount
|
||||||
* Tags::format_top();
|
* Tags::format_top();
|
||||||
* ?></pre>
|
* ?></pre>
|
||||||
* eg:
|
* e.g.:
|
||||||
* pop (2)
|
* pop (2)
|
||||||
* rock (2)
|
* rock (2)
|
||||||
* hip.hop (1)
|
* hip.hop (1)
|
||||||
@ -24,8 +24,7 @@
|
|||||||
* Each time a new Tags object is instantiated, the tag list is merged with the
|
* Each time a new Tags object is instantiated, the tag list is merged with the
|
||||||
* overall total amount of tags to provide the top tags. Merging is optional.
|
* overall total amount of tags to provide the top tags. Merging is optional.
|
||||||
*/
|
*/
|
||||||
class Tags
|
class Tags {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Collects all tags processed by the Tags Class
|
* Collects all tags processed by the Tags Class
|
||||||
* @static
|
* @static
|
||||||
@ -124,12 +123,16 @@ public static function sorted() {
|
|||||||
/**
|
/**
|
||||||
* Formats tags
|
* Formats tags
|
||||||
* @param string $Link Link to a taglist page
|
* @param string $Link Link to a taglist page
|
||||||
|
* @param string $ArtistName Restrict tag search by this artist
|
||||||
* @return string List of tag links
|
* @return string List of tag links
|
||||||
*/
|
*/
|
||||||
public function format($Link = 'torrents.php?taglist=') {
|
public function format($Link = 'torrents.php?taglist=', $ArtistName = '') {
|
||||||
|
if (!empty($ArtistName)) {
|
||||||
|
$ArtistName = "&artistname=" . urlencode($ArtistName) . "&action=advanced&searchsubmit=1";
|
||||||
|
}
|
||||||
foreach ($this->Tags as $Tag) {
|
foreach ($this->Tags as $Tag) {
|
||||||
if (empty($this->TagLink[$Tag])) {
|
if (empty($this->TagLink[$Tag])) {
|
||||||
$this->TagLink[$Tag] = '<a href="' . $Link . $Tag . '">' . $Tag . '</a>';
|
$this->TagLink[$Tag] = '<a href="' . $Link . $Tag . $ArtistName . '">' . $Tag . '</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return implode(', ', $this->TagLink);
|
return implode(', ', $this->TagLink);
|
||||||
@ -139,13 +142,17 @@ public function format($Link = 'torrents.php?taglist=') {
|
|||||||
* Format a list of top tags
|
* Format a list of top tags
|
||||||
* @param int $Max Max number of items to get
|
* @param int $Max Max number of items to get
|
||||||
*/
|
*/
|
||||||
public static function format_top($Max = 5, $Link = 'torrents.php?taglist=') {
|
public static function format_top($Max = 5, $Link = 'torrents.php?taglist=', $ArtistName = '') {
|
||||||
if (empty(self::$All)) { ?>
|
if (empty(self::$All)) { ?>
|
||||||
<li>No torrent tags</li>
|
<li>No torrent tags</li>
|
||||||
<? return;
|
<?
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!empty($ArtistName)) {
|
||||||
|
$ArtistName = '&artistname=' . urlencode($ArtistName) . '&action=advanced&searchsubmit=1';
|
||||||
}
|
}
|
||||||
foreach (array_slice(self::sorted(), 0, $Max) as $TagName => $Total) { ?>
|
foreach (array_slice(self::sorted(), 0, $Max) as $TagName => $Total) { ?>
|
||||||
<li><a href="<?=$Link . display_str($TagName)?>"><?=display_str($TagName)?></a> (<?=$Total?>)</li>
|
<li><a href="<?=$Link . display_str($TagName) . $ArtistName?>"><?=display_str($TagName)?></a> (<?=$Total?>)</li>
|
||||||
<? }
|
<? }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -504,7 +504,7 @@ function show() {
|
|||||||
</tr>
|
</tr>
|
||||||
<? if (!$this->NewTorrent && check_perms('users_mod')) { ?>
|
<? if (!$this->NewTorrent && check_perms('users_mod')) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="label">Log/Cue:</td>
|
<td class="label">Log/cue:</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="checkbox" id="flac_log" name="flac_log"<? if ($HasLog) { echo ' checked="checked"';} ?> /> <label for="flac_log">Check this box if the torrent has, or should have, a log file.</label><br />
|
<input type="checkbox" id="flac_log" name="flac_log"<? if ($HasLog) { echo ' checked="checked"';} ?> /> <label for="flac_log">Check this box if the torrent has, or should have, a log file.</label><br />
|
||||||
<input type="checkbox" id="flac_cue" name="flac_cue"<? if ($HasCue) { echo ' checked="checked"';} ?> /> <label for="flac_cue">Check this box if the torrent has, or should have, a cue file.</label><br />
|
<input type="checkbox" id="flac_cue" name="flac_cue"<? if ($HasCue) { echo ' checked="checked"';} ?> /> <label for="flac_cue">Check this box if the torrent has, or should have, a cue file.</label><br />
|
||||||
|
@ -52,7 +52,11 @@ class USER_AGENT {
|
|||||||
'android' => 'Android',
|
'android' => 'Android',
|
||||||
'palm' => 'Palm',
|
'palm' => 'Palm',
|
||||||
'mot-razr' => 'Motorola Razr',
|
'mot-razr' => 'Motorola Razr',
|
||||||
|
'tablet PC' => 'Windows RT',
|
||||||
|
'ARM; Trident' => 'Windows RT',
|
||||||
//Windows
|
//Windows
|
||||||
|
'Windows NT 6.2' => 'Windows 8',
|
||||||
|
'Windows 8' => 'Windows 8',
|
||||||
'Windows NT 6.1' => 'Windows 7',
|
'Windows NT 6.1' => 'Windows 7',
|
||||||
'Windows 7' => 'Windows 7',
|
'Windows 7' => 'Windows 7',
|
||||||
'Windows NT 6.0' => 'Windows Vista',
|
'Windows NT 6.0' => 'Windows Vista',
|
||||||
@ -110,14 +114,12 @@ public function operating_system(&$UserAgentString) {
|
|||||||
if (empty($UserAgentString)) {
|
if (empty($UserAgentString)) {
|
||||||
return 'Hidden';
|
return 'Hidden';
|
||||||
}
|
}
|
||||||
$Return = 'Unknown';
|
|
||||||
foreach ($this->OperatingSystems as $String => $OperatingSystem) {
|
foreach ($this->OperatingSystems as $String => $OperatingSystem) {
|
||||||
if (stripos($UserAgentString, $String) !== false) {
|
if (stripos($UserAgentString, $String) !== false) {
|
||||||
$Return = $OperatingSystem;
|
return $OperatingSystem;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $Return;
|
return 'Unknown';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function mobile(&$UserAgentString) {
|
public function mobile(&$UserAgentString) {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
<?
|
<?
|
||||||
class View
|
class View {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* @var string Path relative to where (P)HTML templates reside
|
* @var string Path relative to where (P)HTML templates reside
|
||||||
*/
|
*/
|
||||||
@ -14,8 +13,7 @@ class View
|
|||||||
* the page. ONLY PUT THE RELATIVE LOCATION WITHOUT '.js'
|
* the page. ONLY PUT THE RELATIVE LOCATION WITHOUT '.js'
|
||||||
* example: 'somefile,somedir/somefile'
|
* example: 'somefile,somedir/somefile'
|
||||||
*/
|
*/
|
||||||
public static function show_header($PageTitle='',$JSIncludes='')
|
public static function show_header($PageTitle = '', $JSIncludes = '') {
|
||||||
{
|
|
||||||
global $Document, $Cache, $DB, $LoggedUser, $Mobile, $Classes;
|
global $Document, $Cache, $DB, $LoggedUser, $Mobile, $Classes;
|
||||||
|
|
||||||
if ($PageTitle != '') {
|
if ($PageTitle != '') {
|
||||||
@ -43,11 +41,13 @@ public static function show_header($PageTitle='',$JSIncludes='')
|
|||||||
* Here is a list of parameters that work in the $Options array:
|
* Here is a list of parameters that work in the $Options array:
|
||||||
* ['disclaimer'] = [boolean] (False) Displays the disclaimer in the footer
|
* ['disclaimer'] = [boolean] (False) Displays the disclaimer in the footer
|
||||||
*/
|
*/
|
||||||
public static function show_footer ($Options=array())
|
public static function show_footer ($Options = array()) {
|
||||||
{
|
|
||||||
global $ScriptStartTime, $LoggedUser, $Cache, $DB, $SessionID, $UserSessions, $Debug, $Time;
|
global $ScriptStartTime, $LoggedUser, $Cache, $DB, $SessionID, $UserSessions, $Debug, $Time;
|
||||||
if (!is_array($LoggedUser)) { require(SERVER_ROOT.'/design/publicfooter.php'); }
|
if (!is_array($LoggedUser)) {
|
||||||
else { require(SERVER_ROOT.'/design/privatefooter.php'); }
|
require(SERVER_ROOT.'/design/publicfooter.php');
|
||||||
|
} else {
|
||||||
|
require(SERVER_ROOT.'/design/privatefooter.php');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -65,8 +65,7 @@ public static function show_footer ($Options=array())
|
|||||||
* @param string $TemplateName The name of the template, in underscore_format
|
* @param string $TemplateName The name of the template, in underscore_format
|
||||||
* @param array $Args the arguments passed to the template.
|
* @param array $Args the arguments passed to the template.
|
||||||
*/
|
*/
|
||||||
public static function render_template ($TemplateName, $Args)
|
public static function render_template ($TemplateName, $Args) {
|
||||||
{
|
|
||||||
static $LoadedTemplates; // Keep track of templates we've already loaded.
|
static $LoadedTemplates; // Keep track of templates we've already loaded.
|
||||||
$ClassName = '';
|
$ClassName = '';
|
||||||
if (isset($LoadedTemplates[$TemplateName])) {
|
if (isset($LoadedTemplates[$TemplateName])) {
|
||||||
@ -114,8 +113,7 @@ public static function render_template ($TemplateName, $Args)
|
|||||||
* echo $SavedTemplate; // Output the buffer
|
* echo $SavedTemplate; // Output the buffer
|
||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
public static function parse ($TemplateFile, array $Variables = null, $Buffer = false)
|
public static function parse ($TemplateFile, array $Variables = null, $Buffer = false) {
|
||||||
{
|
|
||||||
$Template = self::IncludePath . $TemplateFile;
|
$Template = self::IncludePath . $TemplateFile;
|
||||||
if (file_exists($Template)) {
|
if (file_exists($Template)) {
|
||||||
extract($Variables);
|
extract($Variables);
|
||||||
|
@ -44,7 +44,8 @@ function revision_history() {
|
|||||||
global $DB;
|
global $DB;
|
||||||
|
|
||||||
$BaseURL = $this->BaseURL;
|
$BaseURL = $this->BaseURL;
|
||||||
$DB->query("SELECT
|
$DB->query("
|
||||||
|
SELECT
|
||||||
RevisionID,
|
RevisionID,
|
||||||
Summary,
|
Summary,
|
||||||
Time,
|
Time,
|
||||||
@ -63,11 +64,11 @@ function revision_history() {
|
|||||||
<? //-----------------------------------------
|
<? //-----------------------------------------
|
||||||
$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>" ?>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?=$Time?>
|
<?=$Time?>
|
||||||
|
@ -23,8 +23,7 @@
|
|||||||
* Globals are required as this template is included within a
|
* Globals are required as this template is included within a
|
||||||
* function scope.
|
* function scope.
|
||||||
*/
|
*/
|
||||||
global $LoggedUser, $HeavyInfo, $UserSubscriptions, $ThreadInfo,
|
global $LoggedUser, $HeavyInfo, $UserSubscriptions, $ThreadInfo, $ForumsDoublePost;
|
||||||
$ForumsDoublePost;
|
|
||||||
|
|
||||||
if ($LoggedUser['DisablePosting']) {
|
if ($LoggedUser['DisablePosting']) {
|
||||||
return;
|
return;
|
||||||
@ -68,8 +67,8 @@
|
|||||||
<col class="col_post_body" />
|
<col class="col_post_body" />
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tr class="colhead_dark">
|
<tr class="colhead_dark">
|
||||||
<td colspan="<?=Users::has_avatars_enabled() ? 2 : 1?>">
|
<td colspan="<?=(Users::has_avatars_enabled() ? 2 : 1)?>">
|
||||||
<div style="float: left;"><a href='#quickreplypreview'>#XXXXXX</a>
|
<div style="float: left;"><a href="#quickreplypreview">#XXXXXX</a>
|
||||||
by <strong><?=Users::format_username($LoggedUser['ID'], true, true, true, true)?></strong> Just now
|
by <strong><?=Users::format_username($LoggedUser['ID'], true, true, true, true)?></strong> Just now
|
||||||
</div>
|
</div>
|
||||||
<div style="float: right;">
|
<div style="float: right;">
|
||||||
|
@ -27,8 +27,8 @@
|
|||||||
json_die("failure");
|
json_die("failure");
|
||||||
}
|
}
|
||||||
|
|
||||||
list($RequestID, $RequestorID, $RequestorName, $TimeAdded, $LastVote, $CategoryID, $Title, $Year, $Image, $Description, $CatalogueNumber, $ReleaseType,
|
list($RequestID, $RequestorID, $RequestorName, $TimeAdded, $LastVote, $CategoryID, $Title, $Year, $Image, $Description, $CatalogueNumber, $RecordLabel, $ReleaseType,
|
||||||
$BitrateList, $FormatList, $MediaList, $LogCue, $FillerID, $FillerName, $TorrentID, $TimeFilled) = $Request;
|
$BitrateList, $FormatList, $MediaList, $LogCue, $FillerID, $FillerName, $TorrentID, $TimeFilled, $GroupID, $OCLC) = $Request;
|
||||||
|
|
||||||
//Convenience variables
|
//Convenience variables
|
||||||
$IsFilled = !empty($TorrentID);
|
$IsFilled = !empty($TorrentID);
|
||||||
@ -46,35 +46,11 @@
|
|||||||
$ArtistName = Artists::display_artists($ArtistForm, false, true);
|
$ArtistName = Artists::display_artists($ArtistForm, false, true);
|
||||||
$ArtistLink = Artists::display_artists($ArtistForm, true, true);
|
$ArtistLink = Artists::display_artists($ArtistForm, true, true);
|
||||||
|
|
||||||
if ($IsFilled) {
|
|
||||||
$DisplayLink = $ArtistLink."<a href=\"torrents.php?torrentid=".$TorrentID."\">".$Title."</a> [$Year]";
|
|
||||||
} else {
|
|
||||||
$DisplayLink = $ArtistLink.$Title." [$Year]";
|
|
||||||
}
|
|
||||||
$FullName = $ArtistName.$Title." [$Year]";
|
|
||||||
|
|
||||||
if ($BitrateList != '') {
|
|
||||||
$BitrateString = implode(', ', explode('|', $BitrateList));
|
|
||||||
$FormatString = implode(', ', explode('|', $FormatList));
|
|
||||||
$MediaString = implode(', ', explode('|', $MediaList));
|
|
||||||
} else {
|
|
||||||
$BitrateString = 'Unknown, please read the description.';
|
|
||||||
$FormatString = 'Unknown, please read the description.';
|
|
||||||
$MediaString = 'Unknown, please read the description.';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($ReleaseType)) {
|
if (empty($ReleaseType)) {
|
||||||
$ReleaseName = 'Unknown';
|
$ReleaseName = 'Unknown';
|
||||||
} else {
|
} else {
|
||||||
$ReleaseName = $ReleaseTypes[$ReleaseType];
|
$ReleaseName = $ReleaseTypes[$ReleaseType];
|
||||||
}
|
}
|
||||||
|
|
||||||
} elseif ($CategoryName == 'Audiobooks' || $CategoryName == 'Comedy') {
|
|
||||||
$FullName = $Title." [$Year]";
|
|
||||||
$DisplayLink = $Title." [$Year]";
|
|
||||||
} else {
|
|
||||||
$FullName = $Title;
|
|
||||||
$DisplayLink = $Title;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Votes time
|
//Votes time
|
||||||
@ -118,19 +94,19 @@
|
|||||||
|
|
||||||
$Results = $Cache->get_value('request_comments_'.$RequestID);
|
$Results = $Cache->get_value('request_comments_'.$RequestID);
|
||||||
if ($Results === false) {
|
if ($Results === false) {
|
||||||
$DB->query("SELECT
|
$DB->query("
|
||||||
COUNT(c.ID)
|
SELECT COUNT(c.ID)
|
||||||
FROM requests_comments as c
|
FROM requests_comments as c
|
||||||
WHERE c.RequestID = '$RequestID'");
|
WHERE c.RequestID = '$RequestID'");
|
||||||
list($Results) = $DB->next_record();
|
list($Results) = $DB->next_record();
|
||||||
$Cache->cache_value('request_comments_'.$RequestID, $Results, 0);
|
$Cache->cache_value('request_comments_'.$RequestID, $Results, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
list($Page,$Limit) = Format::page_limit(TORRENT_COMMENTS_PER_PAGE,$Results);
|
list($Page, $Limit) = Format::page_limit(TORRENT_COMMENTS_PER_PAGE, $Results);
|
||||||
|
|
||||||
//Get the cache catalogue
|
// Get the cache catalogue
|
||||||
$CatalogueID = floor((TORRENT_COMMENTS_PER_PAGE * $Page - TORRENT_COMMENTS_PER_PAGE) / THREAD_CATALOGUE);
|
$CatalogueID = floor((TORRENT_COMMENTS_PER_PAGE * $Page - TORRENT_COMMENTS_PER_PAGE) / THREAD_CATALOGUE);
|
||||||
$CatalogueLimit=$CatalogueID*THREAD_CATALOGUE . ', ' . THREAD_CATALOGUE;
|
$CatalogueLimit = $CatalogueID * THREAD_CATALOGUE . ', ' . THREAD_CATALOGUE;
|
||||||
|
|
||||||
//---------- Get some data to start processing
|
//---------- Get some data to start processing
|
||||||
|
|
||||||
@ -156,7 +132,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//This is a hybrid to reduce the catalogue down to the page elements: We use the page limit % catalogue
|
//This is a hybrid to reduce the catalogue down to the page elements: We use the page limit % catalogue
|
||||||
$Thread = array_slice($Catalogue,((TORRENT_COMMENTS_PER_PAGE * $Page - TORRENT_COMMENTS_PER_PAGE) % THREAD_CATALOGUE),TORRENT_COMMENTS_PER_PAGE,true);
|
$Thread = array_slice($Catalogue, ((TORRENT_COMMENTS_PER_PAGE * $Page - TORRENT_COMMENTS_PER_PAGE) % THREAD_CATALOGUE), TORRENT_COMMENTS_PER_PAGE, true);
|
||||||
|
|
||||||
$JsonRequestComments = array();
|
$JsonRequestComments = array();
|
||||||
foreach ($Thread as $Key => $Post) {
|
foreach ($Thread as $Key => $Post) {
|
||||||
@ -209,10 +185,10 @@
|
|||||||
'catalogueNumber' => $CatalogueNumber,
|
'catalogueNumber' => $CatalogueNumber,
|
||||||
'releaseType' => (int) $ReleaseType,
|
'releaseType' => (int) $ReleaseType,
|
||||||
'releaseName' => $ReleaseName,
|
'releaseName' => $ReleaseName,
|
||||||
'bitrateList' => $BitrateList,
|
'bitrateList' => preg_split('/\|/', $BitrateList, NULL, PREG_SPLIT_NO_EMPTY),
|
||||||
'formatList' => $FormatList,
|
'formatList' => preg_split('/\|/', $FormatList, NULL, PREG_SPLIT_NO_EMPTY),
|
||||||
'mediaList' => $MediaList,
|
'mediaList' => preg_split('/\|/', $MediaList, NULL, PREG_SPLIT_NO_EMPTY),
|
||||||
'logCue' => $LogCue,
|
'logCue' => html_entity_decode($LogCue),
|
||||||
'isFilled' => $IsFilled,
|
'isFilled' => $IsFilled,
|
||||||
'fillerId' => (int) $FillerID,
|
'fillerId' => (int) $FillerID,
|
||||||
'fillerName' => $FillerName,
|
'fillerName' => $FillerName,
|
||||||
@ -221,7 +197,9 @@
|
|||||||
'tags' => $JsonTags,
|
'tags' => $JsonTags,
|
||||||
'comments' => $JsonRequestComments,
|
'comments' => $JsonRequestComments,
|
||||||
'commentPage' => (int) $Page,
|
'commentPage' => (int) $Page,
|
||||||
'commentPages' => (int) ceil($Results / TORRENT_COMMENTS_PER_PAGE)
|
'commentPages' => (int) ceil($Results / TORRENT_COMMENTS_PER_PAGE),
|
||||||
|
'recordLabel' => $RecordLabel,
|
||||||
|
'oclc' => $OCLC
|
||||||
));
|
));
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -402,7 +402,7 @@ function compare($X, $Y) {
|
|||||||
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()?></div>
|
<div class="tags"><?=$TorrentTags->format('torrents.php?taglist=', $Name)?></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -617,7 +617,7 @@ function compare($X, $Y) {
|
|||||||
<div class="head"><strong>Tags</strong></div>
|
<div class="head"><strong>Tags</strong></div>
|
||||||
<ul class="stats nobullet">
|
<ul class="stats nobullet">
|
||||||
<?
|
<?
|
||||||
Tags::format_top(50);
|
Tags::format_top(50, "torrents.php?taglist=", $Name);
|
||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -967,7 +967,7 @@ function require(file, callback) {
|
|||||||
</colgroup>
|
</colgroup>
|
||||||
<tr class="colhead_dark">
|
<tr class="colhead_dark">
|
||||||
<td colspan="<?=(Users::has_avatars_enabled() ? 2 : 1)?>">
|
<td colspan="<?=(Users::has_avatars_enabled() ? 2 : 1)?>">
|
||||||
<div style="float: left;"><a class="post_id" href='artist.php?id=<?=$ArtistID?>&postid=<?=$PostID?>#post<?=$PostID?>'>#<?=$PostID?></a>
|
<div style="float: left;"><a class="post_id" href="artist.php?id=<?=$ArtistID?>&postid=<?=$PostID?>#post<?=$PostID?>">#<?=$PostID?></a>
|
||||||
<strong><?=Users::format_username($AuthorID, true, true, true, true)?></strong> <?=time_diff($AddedTime)?>
|
<strong><?=Users::format_username($AuthorID, true, true, true, true)?></strong> <?=time_diff($AddedTime)?>
|
||||||
- <a href="#quickpost" onclick="Quote('<?=$PostID?>','<?=$Username?>');" class="brackets">Quote</a>
|
- <a href="#quickpost" onclick="Quote('<?=$PostID?>','<?=$Username?>');" class="brackets">Quote</a>
|
||||||
<? if ($AuthorID == $LoggedUser['ID'] || check_perms('site_moderate_forums')) { ?>
|
<? if ($AuthorID == $LoggedUser['ID'] || check_perms('site_moderate_forums')) { ?>
|
||||||
|
@ -40,13 +40,13 @@ function make_concert_link($Event) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$Date = get_date_title($Event['startDate']);
|
$Date = get_date_title($Event['startDate']);
|
||||||
$ConcertTitle = $Date . " - " . $Event['venue']['name'] . " at " .
|
$ConcertTitle = $Date . ' - ' . $Event['venue']['name'] . ' at ' .
|
||||||
$Event['venue']['location']['city'] . ', ' . $Event['venue']['location']['country'];
|
$Event['venue']['location']['city'] . ', ' . $Event['venue']['location']['country'];
|
||||||
$Concert = "<a href='" . $Event['url'] . "'>" . $ConcertTitle . "</a>";
|
$Concert = "<a href=\"" . $Event['url'] . "\">$ConcertTitle</a>";
|
||||||
?>
|
?>
|
||||||
<form class="hidden" action="" id="concert<?=$Event['id']?>" method="post">
|
<form class="hidden" action="" id="concert<?=$Event['id']?>" method="post">
|
||||||
<input type="hidden" name="action" value="concert_thread" />
|
<input type="hidden" name="action" value="concert_thread" />
|
||||||
<input type="hidden" name="concert_title" value="<?="[Concert] " . display_str($Name) . " - " . $ConcertTitle?>" />
|
<input type="hidden" name="concert_title" value="<?='[Concert] ' . display_str($Name) . ' - ' . $ConcertTitle?>" />
|
||||||
<input type="hidden" name="concert_id" value="<?=$Event['id']?>" />
|
<input type="hidden" name="concert_id" value="<?=$Event['id']?>" />
|
||||||
<input type="hidden" name="concert_template" value="<?=get_concert_post_template($Name, $Event)?>" />
|
<input type="hidden" name="concert_template" value="<?=get_concert_post_template($Name, $Event)?>" />
|
||||||
</form>
|
</form>
|
||||||
|
@ -318,6 +318,4 @@
|
|||||||
</table>
|
</table>
|
||||||
<div class="linkbox"><?=$Pages?></div>
|
<div class="linkbox"><?=$Pages?></div>
|
||||||
</div>
|
</div>
|
||||||
<?
|
<? View::show_footer(); ?>
|
||||||
View::show_footer();
|
|
||||||
?>
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
if (!check_forumperm($ForumID, 'Write') || !check_forumperm($ForumID, 'Create')) {
|
if (!check_forumperm($ForumID, 'Write') || !check_forumperm($ForumID, 'Create')) {
|
||||||
error(403);
|
error(403);
|
||||||
}
|
}
|
||||||
View::show_header('Forums > '.$Forum['Name'].' > New Topic','comments,bbcode');
|
View::show_header('Forums > '.$Forum['Name'].' > New Topic','comments,bbcode,jquery,jquery.validate,form_validate');
|
||||||
?>
|
?>
|
||||||
<div class="thin">
|
<div class="thin">
|
||||||
<h2><a href="forums.php">Forums</a> > <a href="forums.php?action=viewforum&forumid=<?=$ForumID?>"><?=$Forum['Name']?></a> > <span id="newthreadtitle">New Topic</span></h2>
|
<h2><a href="forums.php">Forums</a> > <a href="forums.php?action=viewforum&forumid=<?=$ForumID?>"><?=$Forum['Name']?></a> > <span id="newthreadtitle">New Topic</span></h2>
|
||||||
@ -77,18 +77,18 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="box pad">
|
<div class="box pad">
|
||||||
<form class="create_form" name="forum_thread" action="" id="newthreadform" onsubmit="newthreadform.submit_button.disabled=true;" method="post">
|
<form class="create_form" name="forum_thread" action="" id="newthreadform" method="post">
|
||||||
<input type="hidden" name="action" value="new" />
|
<input type="hidden" name="action" value="new" />
|
||||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||||
<input type="hidden" name="forum" value="<?=$ForumID?>" />
|
<input type="hidden" name="forum" value="<?=$ForumID?>" />
|
||||||
<table id="newthreadtext" class="layout">
|
<table id="newthreadtext" class="layout">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="label">Title:</td>
|
<td class="label">Title:</td>
|
||||||
<td><input id="title" type="text" name="title" style="width: 98%;" /></td>
|
<td><input id="title" class="required" type="text" name="title" style="width: 98%;" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="label">Body:</td>
|
<td class="label">Body:</td>
|
||||||
<td><textarea id="posttext" style="width: 98%;" onkeyup="resize('posttext');" name="body" cols="90" rows="8"></textarea></td>
|
<td><textarea id="posttext" class="required" style="width: 98%;" onkeyup="resize('posttext');" name="body" cols="90" rows="8"></textarea></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
@ -111,6 +111,7 @@ function AddAnswerField() {
|
|||||||
var AnswerField = document.createElement("input");
|
var AnswerField = document.createElement("input");
|
||||||
AnswerField.type = "text";
|
AnswerField.type = "text";
|
||||||
AnswerField.id = "answer_"+AnswerCount;
|
AnswerField.id = "answer_"+AnswerCount;
|
||||||
|
AnswerField.className = "required";
|
||||||
AnswerField.name = "answers[]";
|
AnswerField.name = "answers[]";
|
||||||
AnswerField.style.width = "90%";
|
AnswerField.style.width = "90%";
|
||||||
|
|
||||||
@ -140,12 +141,12 @@ function RemoveAnswerField() {
|
|||||||
</tr>
|
</tr>
|
||||||
<tr id="poll_question" class="hidden">
|
<tr id="poll_question" class="hidden">
|
||||||
<td class="label">Question:</td>
|
<td class="label">Question:</td>
|
||||||
<td><input type="text" name="question" id="pollquestionfield" style="width: 98%;" /></td>
|
<td><input type="text" name="question" id="pollquestionfield" class="required" style="width: 98%;" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="poll_answers" class="hidden">
|
<tr id="poll_answers" class="hidden">
|
||||||
<td class="label">Answers:</td>
|
<td class="label">Answers:</td>
|
||||||
<td id="answer_block">
|
<td id="answer_block">
|
||||||
<input type="text" name="answers[]" style="width: 90%;" />
|
<input type="text" name="answers[]" class="required" style="width: 90%;" />
|
||||||
<a href="#" onclick="AddAnswerField();return false;" class="brackets">+</a>
|
<a href="#" onclick="AddAnswerField();return false;" class="brackets">+</a>
|
||||||
<a href="#" onclick="RemoveAnswerField();return false;" class="brackets">−</a>
|
<a href="#" onclick="RemoveAnswerField();return false;" class="brackets">−</a>
|
||||||
</td>
|
</td>
|
||||||
@ -159,7 +160,7 @@ function RemoveAnswerField() {
|
|||||||
<div id="buttons" class="center">
|
<div id="buttons" class="center">
|
||||||
<input type="button" value="Preview" onclick="Newthread_Preview(1);" id="newthreadpreviewbutton" />
|
<input type="button" value="Preview" onclick="Newthread_Preview(1);" id="newthreadpreviewbutton" />
|
||||||
<input type="button" value="Editor" onclick="Newthread_Preview(0);" id="newthreadeditbutton" class="hidden" />
|
<input type="button" value="Editor" onclick="Newthread_Preview(0);" id="newthreadeditbutton" class="hidden" />
|
||||||
<input type="submit" id="submit_button" value="Create thread" />
|
<input type="submit" class="submit" id="submit_button" value="Create thread" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
include(SERVER_ROOT.'/classes/class_text.php');
|
include(SERVER_ROOT.'/classes/class_text.php');
|
||||||
$Text = new TEXT;
|
$Text = new TEXT;
|
||||||
|
|
||||||
list($Page,$Limit) = Format::page_limit(POSTS_PER_PAGE);
|
list($Page, $Limit) = Format::page_limit(POSTS_PER_PAGE);
|
||||||
|
|
||||||
if ($LoggedUser['CustomForums']) {
|
if ($LoggedUser['CustomForums']) {
|
||||||
unset($LoggedUser['CustomForums']['']);
|
unset($LoggedUser['CustomForums']['']);
|
||||||
@ -70,11 +70,11 @@
|
|||||||
if (!empty($RestrictedForums)) {
|
if (!empty($RestrictedForums)) {
|
||||||
$SQL .= " AND f.ID NOT IN ('$RestrictedForums')";
|
$SQL .= " AND f.ID NOT IN ('$RestrictedForums')";
|
||||||
}
|
}
|
||||||
$SQL .= ")";
|
$SQL .= ')';
|
||||||
if (!empty($PermittedForums)) {
|
if (!empty($PermittedForums)) {
|
||||||
$SQL .= " OR f.ID IN ('$PermittedForums')";
|
$SQL .= " OR f.ID IN ('$PermittedForums')";
|
||||||
}
|
}
|
||||||
$SQL .= ")";
|
$SQL .= ')';
|
||||||
$DB->query($SQL);
|
$DB->query($SQL);
|
||||||
if (list($Title) = $DB->next_record()) {
|
if (list($Title) = $DB->next_record()) {
|
||||||
$Title = " > <a href=\"forums.php?action=viewthread&threadid=$ThreadID\">$Title</a>";
|
$Title = " > <a href=\"forums.php?action=viewthread&threadid=$ThreadID\">$Title</a>";
|
||||||
@ -86,10 +86,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Let's hope we got some results - start printing out the content.
|
// Let's hope we got some results - start printing out the content.
|
||||||
View::show_header('Forums > Search', 'bbcode');
|
View::show_header('Forums > Search', 'bbcode,jquery,forum_search');
|
||||||
?>
|
?>
|
||||||
<div class="thin">
|
<div class="thin">
|
||||||
|
<div class="header">
|
||||||
<h2><a href="forums.php">Forums</a> > Search<?=$Title?></h2>
|
<h2><a href="forums.php">Forums</a> > Search<?=$Title?></h2>
|
||||||
|
</div>
|
||||||
<form class="search_form" name="forums" action="" method="get">
|
<form class="search_form" name="forums" action="" method="get">
|
||||||
<input type="hidden" name="action" value="search" />
|
<input type="hidden" name="action" value="search" />
|
||||||
<table cellpadding="6" cellspacing="1" border="0" class="layout border" width="100%">
|
<table cellpadding="6" cellspacing="1" border="0" class="layout border" width="100%">
|
||||||
@ -116,11 +118,11 @@
|
|||||||
<table class="cat_list layout">
|
<table class="cat_list layout">
|
||||||
|
|
||||||
|
|
||||||
<?// List of forums
|
<? // List of forums
|
||||||
$Open = false;
|
$Open = false;
|
||||||
$LastCategoryID = -1;
|
$LastCategoryID = -1;
|
||||||
$Columns = 0;
|
$Columns = 0;
|
||||||
|
$i = 0;
|
||||||
foreach ($Forums as $Forum) {
|
foreach ($Forums as $Forum) {
|
||||||
if (!check_forumperm($Forum['ID'])) {
|
if (!check_forumperm($Forum['ID'])) {
|
||||||
continue;
|
continue;
|
||||||
@ -142,9 +144,13 @@
|
|||||||
}
|
}
|
||||||
$Columns = 0;
|
$Columns = 0;
|
||||||
$Open = true;
|
$Open = true;
|
||||||
|
$i++;
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="5"><strong><?=$ForumCats[$Forum['CategoryID']]?></strong></td>
|
<td colspan="5">
|
||||||
|
<strong><?=$ForumCats[$Forum['CategoryID']]?></strong>
|
||||||
|
<a href="#" class="brackets forum_category" id="forum_category_<?=$i?>">Check all</a>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<? } elseif ($Columns % 5 == 0) { ?>
|
<? } elseif ($Columns % 5 == 0) { ?>
|
||||||
@ -152,7 +158,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
<td>
|
<td>
|
||||||
<input type="checkbox" name="forums[]" value="<?=$Forum['ID']?>" id="forum_<?=$Forum['ID']?>"<? if (isset($_GET['forums']) && in_array($Forum['ID'], $_GET['forums'])) { echo ' checked="checked"';} ?> />
|
<input type="checkbox" name="forums[]" value="<?=$Forum['ID']?>" data-category="forum_category_<?=$i?>" id="forum_<?=$Forum['ID']?>"<? if (isset($_GET['forums']) && in_array($Forum['ID'], $_GET['forums'])) { echo ' checked="checked"';} ?> />
|
||||||
<label for="forum_<?=$Forum['ID']?>"><?=htmlspecialchars($Forum['Name'])?></label>
|
<label for="forum_<?=$Forum['ID']?>"><?=htmlspecialchars($Forum['Name'])?></label>
|
||||||
</td>
|
</td>
|
||||||
<? }
|
<? }
|
||||||
@ -278,7 +284,7 @@
|
|||||||
<table cellpadding="6" cellspacing="1" border="0" class="forum_list border" width="100%">
|
<table cellpadding="6" cellspacing="1" border="0" class="forum_list border" width="100%">
|
||||||
<tr class="colhead">
|
<tr class="colhead">
|
||||||
<td>Forum</td>
|
<td>Forum</td>
|
||||||
<td><?=(!empty($ThreadID)) ? 'Post begins' : 'Topic' ?></td>
|
<td><?=((!empty($ThreadID)) ? 'Post begins' : 'Topic')?></td>
|
||||||
<td>Time</td>
|
<td>Time</td>
|
||||||
</tr>
|
</tr>
|
||||||
<? if ($DB->record_count() == 0) { ?>
|
<? if ($DB->record_count() == 0) { ?>
|
||||||
|
@ -183,6 +183,8 @@
|
|||||||
<div style="display: inline-block;">
|
<div style="display: inline-block;">
|
||||||
<h3>Search this thread:</h3>
|
<h3>Search this thread:</h3>
|
||||||
<form class="search_form" name="forum_thread" action="forums.php" method="get">
|
<form class="search_form" name="forum_thread" action="forums.php" method="get">
|
||||||
|
<input type="hidden" name="action" value="search" />
|
||||||
|
<input type="hidden" name="threadid" value="<?=$ThreadID?>" />
|
||||||
<table cellpadding="6" cellspacing="1" border="0" class="layout border">
|
<table cellpadding="6" cellspacing="1" border="0" class="layout border">
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>Search for:</strong></td>
|
<td><strong>Search for:</strong></td>
|
||||||
@ -194,8 +196,6 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" style="text-align: center;">
|
<td colspan="2" style="text-align: center;">
|
||||||
<input type="hidden" name="action" value="search" />
|
|
||||||
<input type="hidden" name="threadid" value="<?=$ThreadID?>" />
|
|
||||||
<input type="submit" name="submit" value="Search" />
|
<input type="submit" name="submit" value="Search" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
if (!$Username) {
|
if (!$Username) {
|
||||||
error(404);
|
error(404);
|
||||||
}
|
}
|
||||||
View::show_header('Compose', 'inbox,bbcode');
|
View::show_header('Compose', 'inbox,bbcode,jquery,jquery.validate,form_validate');
|
||||||
?>
|
?>
|
||||||
<div class="thin">
|
<div class="thin">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
@ -34,9 +34,9 @@
|
|||||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||||
<div id="quickpost">
|
<div id="quickpost">
|
||||||
<h3>Subject</h3>
|
<h3>Subject</h3>
|
||||||
<input type="text" name="subject" size="95" value="<?=(!empty($Subject) ? $Subject : '')?>" /><br />
|
<input type="text" class="required" name="subject" size="95" value="<?=(!empty($Subject) ? $Subject : '')?>" /><br />
|
||||||
<h3>Body</h3>
|
<h3>Body</h3>
|
||||||
<textarea id="body" name="body" cols="95" rows="10" onkeyup="resize('body')"><?=(!empty($Body) ? $Body : '')?></textarea>
|
<textarea id="body" class="required" name="body" cols="95" rows="10" onkeyup="resize('body')"><?=(!empty($Body) ? $Body : '')?></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div id="preview" class="hidden"></div>
|
<div id="preview" class="hidden"></div>
|
||||||
<div id="buttons" class="center">
|
<div id="buttons" class="center">
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
$Cache->decrement('inbox_new_'.$UserID);
|
$Cache->decrement('inbox_new_'.$UserID);
|
||||||
}
|
}
|
||||||
|
|
||||||
View::show_header('View conversation '.$Subject, 'comments,inbox,bbcode');
|
View::show_header('View conversation '.$Subject, 'comments,inbox,bbcode,jquery,jquery.validate,form_validate');
|
||||||
|
|
||||||
// Get messages
|
// Get messages
|
||||||
$DB->query("SELECT SentDate, SenderID, Body, ID FROM pm_messages AS m WHERE ConvID='$ConvID' ORDER BY ID");
|
$DB->query("SELECT SentDate, SenderID, Body, ID FROM pm_messages AS m WHERE ConvID='$ConvID' ORDER BY ID");
|
||||||
@ -102,7 +102,7 @@
|
|||||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||||
<input type="hidden" name="toid" value="<?=implode(',',$ReceiverIDs)?>" />
|
<input type="hidden" name="toid" value="<?=implode(',',$ReceiverIDs)?>" />
|
||||||
<input type="hidden" name="convid" value="<?=$ConvID?>" />
|
<input type="hidden" name="convid" value="<?=$ConvID?>" />
|
||||||
<textarea id="quickpost" name="body" cols="90" rows="10" onkeyup="resize('quickpost')"></textarea> <br />
|
<textarea id="quickpost" class="required" name="body" cols="90" rows="10" onkeyup="resize('quickpost')"></textarea> <br />
|
||||||
<div id="preview" class="box vertical_space body hidden"></div>
|
<div id="preview" class="box vertical_space body hidden"></div>
|
||||||
<div id="buttons" class="center">
|
<div id="buttons" class="center">
|
||||||
<input type="button" value="Preview" onclick="Quick_Preview();" />
|
<input type="button" value="Preview" onclick="Quick_Preview();" />
|
||||||
|
@ -101,7 +101,7 @@
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
View::show_header('Report a '.$Type['title'],'bbcode');
|
View::show_header('Report a '.$Type['title'],'bbcode,jquery,jquery.validate,form_validate');
|
||||||
?>
|
?>
|
||||||
<div class="thin">
|
<div class="thin">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
@ -150,7 +150,7 @@
|
|||||||
|
|
||||||
<div class="box pad center">
|
<div class="box pad center">
|
||||||
<p><strong>It will greatly increase the turnover rate of the updates if you can fill in as much of the following details as possible.</strong></p>
|
<p><strong>It will greatly increase the turnover rate of the updates if you can fill in as much of the following details as possible.</strong></p>
|
||||||
<form class="create_form" name="report" action="" method="post">
|
<form class="create_form" id="report_form" name="report" action="" method="post">
|
||||||
<input type="hidden" name="action" value="takereport" />
|
<input type="hidden" name="action" value="takereport" />
|
||||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||||
<input type="hidden" name="id" value="<?=$ID?>" />
|
<input type="hidden" name="id" value="<?=$ID?>" />
|
||||||
@ -159,7 +159,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="label">Year (required)</td>
|
<td class="label">Year (required)</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" size="4" name="year" />
|
<input type="text" size="4" name="year" class="required" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -179,7 +179,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="label">Comment</td>
|
<td class="label">Comment</td>
|
||||||
<td>
|
<td>
|
||||||
<textarea rows="8" cols="80" name="comment"></textarea>
|
<textarea rows="8" cols="80" name="comment" class="required"></textarea>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -275,12 +275,12 @@
|
|||||||
?>
|
?>
|
||||||
<h3>Reason</h3>
|
<h3>Reason</h3>
|
||||||
<div class="box pad center">
|
<div class="box pad center">
|
||||||
<form class="create_form" name="report" action="" method="post">
|
<form class="create_form" name="report" id="report_form" action="" method="post">
|
||||||
<input type="hidden" name="action" value="takereport" />
|
<input type="hidden" name="action" value="takereport" />
|
||||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||||
<input type="hidden" name="id" value="<?=$ID?>" />
|
<input type="hidden" name="id" value="<?=$ID?>" />
|
||||||
<input type="hidden" name="type" value="<?=$Short?>" />
|
<input type="hidden" name="type" value="<?=$Short?>" />
|
||||||
<textarea rows="10" cols="95" name="reason"></textarea><br /><br />
|
<textarea class="required" rows="10" cols="95" name="reason"></textarea><br /><br />
|
||||||
<input type="submit" value="Submit report" />
|
<input type="submit" value="Submit report" />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -45,7 +45,8 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$Reports = $DB->query("SELECT SQL_CALC_FOUND_ROWS
|
$Reports = $DB->query("
|
||||||
|
SELECT SQL_CALC_FOUND_ROWS
|
||||||
r.ID,
|
r.ID,
|
||||||
r.UserID,
|
r.UserID,
|
||||||
um.Username,
|
um.Username,
|
||||||
@ -59,9 +60,9 @@
|
|||||||
r.ResolverID
|
r.ResolverID
|
||||||
FROM reports AS r
|
FROM reports AS r
|
||||||
JOIN users_main AS um ON r.UserID=um.ID
|
JOIN users_main AS um ON r.UserID=um.ID
|
||||||
WHERE " . $Where . "
|
WHERE $Where
|
||||||
ORDER BY ReportedTime
|
ORDER BY ReportedTime DESC
|
||||||
DESC LIMIT " . $Limit);
|
LIMIT $Limit");
|
||||||
|
|
||||||
// Number of results (for pagination)
|
// Number of results (for pagination)
|
||||||
$DB->query('SELECT FOUND_ROWS()');
|
$DB->query('SELECT FOUND_ROWS()');
|
||||||
@ -75,7 +76,6 @@
|
|||||||
<div class="thin">
|
<div class="thin">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<h2>Active Reports</h2>
|
<h2>Active Reports</h2>
|
||||||
|
|
||||||
<div class="linkbox">
|
<div class="linkbox">
|
||||||
<a href="reports.php">New</a> |
|
<a href="reports.php">New</a> |
|
||||||
<a href="reports.php?view=old">Old</a> |
|
<a href="reports.php?view=old">Old</a> |
|
||||||
@ -110,38 +110,38 @@
|
|||||||
case "user" :
|
case "user" :
|
||||||
$DB->query("SELECT Username FROM users_main WHERE ID=" . $ThingID);
|
$DB->query("SELECT Username FROM users_main WHERE ID=" . $ThingID);
|
||||||
if ($DB->record_count() < 1) {
|
if ($DB->record_count() < 1) {
|
||||||
echo "No user with the reported ID found";
|
echo 'No user with the reported ID found';
|
||||||
} else {
|
} else {
|
||||||
list($Username) = $DB->next_record();
|
list($Username) = $DB->next_record();
|
||||||
echo "<a href='user.php?id=" . $ThingID . "'>" . display_str($Username) . "</a>";
|
echo "<a href=\"user.php?id=$ThingID\">" . display_str($Username) . '</a>';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "request" :
|
case "request" :
|
||||||
case "request_update" :
|
case "request_update" :
|
||||||
$DB->query("SELECT Title FROM requests WHERE ID=" . $ThingID);
|
$DB->query("SELECT Title FROM requests WHERE ID=" . $ThingID);
|
||||||
if ($DB->record_count() < 1) {
|
if ($DB->record_count() < 1) {
|
||||||
echo "No request with the reported ID found";
|
echo 'No request with the reported ID found';
|
||||||
} else {
|
} else {
|
||||||
list($Name) = $DB->next_record();
|
list($Name) = $DB->next_record();
|
||||||
echo "<a href='requests.php?action=view&id=" . $ThingID . "'>" . display_str($Name) . "</a>";
|
echo "<a href=\"requests.php?action=view&id=$ThingID\">" . display_str($Name) . '</a>';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "collage" :
|
case "collage" :
|
||||||
$DB->query("SELECT Name FROM collages WHERE ID=" . $ThingID);
|
$DB->query("SELECT Name FROM collages WHERE ID=" . $ThingID);
|
||||||
if ($DB->record_count() < 1) {
|
if ($DB->record_count() < 1) {
|
||||||
echo "No collage with the reported ID found";
|
echo 'No collage with the reported ID found';
|
||||||
} else {
|
} else {
|
||||||
list($Name) = $DB->next_record();
|
list($Name) = $DB->next_record();
|
||||||
echo "<a href='collages.php?id=" . $ThingID . "'>" . display_str($Name) . "</a>";
|
echo "<a href=\"collages.php?id=$ThingID\">" . display_str($Name) . '</a>';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "thread" :
|
case "thread" :
|
||||||
$DB->query("SELECT Title FROM forums_topics WHERE ID=" . $ThingID);
|
$DB->query("SELECT Title FROM forums_topics WHERE ID=" . $ThingID);
|
||||||
if ($DB->record_count() < 1) {
|
if ($DB->record_count() < 1) {
|
||||||
echo "No forum thread with the reported ID found";
|
echo 'No forum thread with the reported ID found';
|
||||||
} else {
|
} else {
|
||||||
list($Title) = $DB->next_record();
|
list($Title) = $DB->next_record();
|
||||||
echo "<a href='forums.php?action=viewthread&threadid=" . $ThingID . "'>" . display_str($Title) . "</a>";
|
echo "<a href=\"forums.php?action=viewthread&threadid=$ThingID\">" . display_str($Title) . '</a>';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "post" :
|
case "post" :
|
||||||
@ -150,54 +150,105 @@
|
|||||||
} else {
|
} else {
|
||||||
$PerPage = POSTS_PER_PAGE;
|
$PerPage = POSTS_PER_PAGE;
|
||||||
}
|
}
|
||||||
$DB->query("SELECT p.ID, p.Body, p.TopicID, (SELECT COUNT(ID) FROM forums_posts WHERE forums_posts.TopicID = p.TopicID AND forums_posts.ID<=p.ID) AS PostNum FROM forums_posts AS p WHERE ID=" . $ThingID);
|
$DB->query("
|
||||||
|
SELECT
|
||||||
|
p.ID,
|
||||||
|
p.Body,
|
||||||
|
p.TopicID,
|
||||||
|
( SELECT COUNT(ID)
|
||||||
|
FROM forums_posts
|
||||||
|
WHERE forums_posts.TopicID = p.TopicID
|
||||||
|
AND forums_posts.ID<=p.ID
|
||||||
|
) AS PostNum
|
||||||
|
FROM forums_posts AS p
|
||||||
|
WHERE ID=$ThingID");
|
||||||
if ($DB->record_count() < 1) {
|
if ($DB->record_count() < 1) {
|
||||||
echo "No forum post with the reported ID found";
|
echo 'No forum post with the reported ID found';
|
||||||
} else {
|
} else {
|
||||||
list($PostID, $Body, $TopicID, $PostNum) = $DB->next_record();
|
list($PostID, $Body, $TopicID, $PostNum) = $DB->next_record();
|
||||||
echo "<a href='forums.php?action=viewthread&threadid=" . $TopicID . "&post=" . $PostNum . "#post" . $PostID . "'>FORUM POST</a>";
|
echo "<a href=\"forums.php?action=viewthread&threadid=" . $TopicID . "&post=" . $PostNum . "#post" . $PostID . "\">FORUM POST</a>";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "requests_comment" :
|
case "requests_comment" :
|
||||||
$DB->query("SELECT rc.RequestID, rc.Body, (SELECT COUNT(ID) FROM requests_comments WHERE ID <= " . $ThingID . " AND requests_comments.RequestID = rc.RequestID) AS CommentNum FROM requests_comments AS rc WHERE ID=" . $ThingID);
|
$DB->query("
|
||||||
|
SELECT
|
||||||
|
rc.RequestID,
|
||||||
|
rc.Body,
|
||||||
|
( SELECT COUNT(ID)
|
||||||
|
FROM requests_comments
|
||||||
|
WHERE ID <= $ThingID
|
||||||
|
AND requests_comments.RequestID = rc.RequestID
|
||||||
|
) AS CommentNum
|
||||||
|
FROM requests_comments AS rc
|
||||||
|
WHERE ID=$ThingID");
|
||||||
if ($DB->record_count() < 1) {
|
if ($DB->record_count() < 1) {
|
||||||
echo "No request comment with the reported ID found";
|
echo 'No request comment with the reported ID found';
|
||||||
} else {
|
} else {
|
||||||
list($RequestID, $Body, $PostNum) = $DB->next_record();
|
list($RequestID, $Body, $PostNum) = $DB->next_record();
|
||||||
$PageNum = ceil($PostNum / TORRENT_COMMENTS_PER_PAGE);
|
$PageNum = ceil($PostNum / TORRENT_COMMENTS_PER_PAGE);
|
||||||
echo "<a href='requests.php?action=view&id=" . $RequestID . "&page=" . $PageNum . "#post" . $ThingID . "'>REQUEST COMMENT</a>";
|
echo "<a href=\"requests.php?action=view&id=" . $RequestID . "&page=" . $PageNum . "#post" . $ThingID . "\">REQUEST COMMENT</a>";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "torrents_comment" :
|
case "torrents_comment" :
|
||||||
$DB->query("SELECT tc.GroupID, tc.Body, (SELECT COUNT(ID) FROM torrents_comments WHERE ID <= " . $ThingID . " AND torrents_comments.GroupID = tc.GroupID) AS CommentNum FROM torrents_comments AS tc WHERE ID=" . $ThingID);
|
$DB->query("
|
||||||
|
SELECT
|
||||||
|
tc.GroupID,
|
||||||
|
tc.Body,
|
||||||
|
( SELECT COUNT(ID)
|
||||||
|
FROM torrents_comments
|
||||||
|
WHERE ID <= $ThingID
|
||||||
|
AND torrents_comments.GroupID = tc.GroupID
|
||||||
|
) AS CommentNum
|
||||||
|
FROM torrents_comments AS tc
|
||||||
|
WHERE ID=$ThingID");
|
||||||
if ($DB->record_count() < 1) {
|
if ($DB->record_count() < 1) {
|
||||||
echo "No torrent comment with the reported ID found";
|
echo 'No torrent comment with the reported ID found';
|
||||||
} else {
|
} else {
|
||||||
list($GroupID, $Body, $PostNum) = $DB->next_record();
|
list($GroupID, $Body, $PostNum) = $DB->next_record();
|
||||||
$PageNum = ceil($PostNum / TORRENT_COMMENTS_PER_PAGE);
|
$PageNum = ceil($PostNum / TORRENT_COMMENTS_PER_PAGE);
|
||||||
echo "<a href='torrents.php?id=" . $GroupID . "&page=" . $PageNum . "#post" . $ThingID . "'>TORRENT COMMENT</a>";
|
echo "<a href=\"torrents.php?id=" . $GroupID . "&page=" . $PageNum . "#post" . $ThingID . "\">TORRENT COMMENT</a>";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "artist_comment" :
|
case "artist_comment" :
|
||||||
$DB->query("SELECT ac.ArtistID, ac.Body, (SELECT COUNT(ID) FROM artist_comments WHERE ID <= " . $ThingID . " AND artist_comments.ArtistID = ac.ArtistID) AS CommentNum FROM artist_comments AS ac WHERE ID=" . $ThingID);
|
$DB->query("
|
||||||
|
SELECT
|
||||||
|
ac.ArtistID,
|
||||||
|
ac.Body,
|
||||||
|
( SELECT COUNT(ID)
|
||||||
|
FROM artist_comments
|
||||||
|
WHERE ID <= $ThingID
|
||||||
|
AND artist_comments.ArtistID = ac.ArtistID
|
||||||
|
) AS CommentNum
|
||||||
|
FROM artist_comments AS ac
|
||||||
|
WHERE ID=$ThingID");
|
||||||
if ($DB->record_count() < 1) {
|
if ($DB->record_count() < 1) {
|
||||||
echo "No comment with the reported ID found";
|
echo 'No comment with the reported ID found';
|
||||||
} else {
|
} else {
|
||||||
list($ArtistID, $Body, $PostNum) = $DB->next_record();
|
list($ArtistID, $Body, $PostNum) = $DB->next_record();
|
||||||
$PageNum = ceil($PostNum / TORRENT_COMMENTS_PER_PAGE);
|
$PageNum = ceil($PostNum / TORRENT_COMMENTS_PER_PAGE);
|
||||||
echo "<a href='artist.php?id=" . $ArtistID . "&page=" . $PageNum . "#post" . $ThingID . "'>ARTIST COMMENT</a>";
|
echo "<a href=\"artist.php?id=" . $ArtistID . "&page=" . $PageNum . "#post" . $ThingID . "\">ARTIST COMMENT</a>";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "collages_comment" :
|
case "collages_comment" :
|
||||||
$DB->query("SELECT cc.CollageID, cc.Body, (SELECT COUNT(ID) FROM collages_comments WHERE ID <= " . $ThingID . " AND collages_comments.CollageID = cc.CollageID) AS CommentNum FROM collages_comments AS cc WHERE ID=" . $ThingID);
|
$DB->query("
|
||||||
|
SELECT
|
||||||
|
cc.CollageID,
|
||||||
|
cc.Body,
|
||||||
|
( SELECT COUNT(ID)
|
||||||
|
FROM collages_comments
|
||||||
|
WHERE ID <= $ThingID
|
||||||
|
AND collages_comments.CollageID = cc.CollageID
|
||||||
|
) AS CommentNum
|
||||||
|
FROM collages_comments AS cc
|
||||||
|
WHERE ID=$ThingID");
|
||||||
if ($DB->record_count() < 1) {
|
if ($DB->record_count() < 1) {
|
||||||
echo "No collage comment with the reported ID found";
|
echo 'No collage comment with the reported ID found';
|
||||||
} else {
|
} else {
|
||||||
list($CollageID, $Body, $PostNum) = $DB->next_record();
|
list($CollageID, $Body, $PostNum) = $DB->next_record();
|
||||||
$PerPage = POSTS_PER_PAGE;
|
$PerPage = POSTS_PER_PAGE;
|
||||||
$PageNum = ceil($PostNum / $PerPage);
|
$PageNum = ceil($PostNum / $PerPage);
|
||||||
echo "<a href='collage.php?action=comments&collageid=" . $CollageID . "&page=" . $PageNum . "#post" . $ThingID . "'>COLLAGE COMMENT</a>";
|
echo "<a href=\"collage.php?action=comments&collageid=" . $CollageID . "&page=" . $PageNum . "#post" . $ThingID . "\">COLLAGE COMMENT</a>";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -227,13 +278,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<? if ($Status != "Resolved") { ?>
|
<? if ($Status != 'Resolved') { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="center" colspan="2">
|
<td class="center" colspan="2">
|
||||||
<form id="report_form_<?=$ReportID?>" action="">
|
<form id="report_form_<?=$ReportID?>" action="">
|
||||||
<input type="hidden" name="reportid" value="<?=$ReportID?>" />
|
<input type="hidden" name="reportid" value="<?=$ReportID?>" />
|
||||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||||
<input type="submit" onclick="return resolve(<?=$ReportID?>, <?=($ClaimerID == $LoggedUser['ID'] || !$ClaimerID) ? 'true' : 'false' ?>)" name="submit" value="Resolve" />
|
<input type="submit" onclick="return resolve(<?=$ReportID?>, <?=(($ClaimerID == $LoggedUser['ID'] || !$ClaimerID) ? 'true' : 'false')?>)" name="submit" value="Resolve" />
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -105,7 +105,8 @@
|
|||||||
<?
|
<?
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
$DB->query("UPDATE reportsv2
|
$DB->query("
|
||||||
|
UPDATE reportsv2
|
||||||
SET Status='InProgress',
|
SET Status='InProgress',
|
||||||
ResolverID=".$LoggedUser['ID']."
|
ResolverID=".$LoggedUser['ID']."
|
||||||
WHERE ID=".$ReportID);
|
WHERE ID=".$ReportID);
|
||||||
@ -119,23 +120,25 @@
|
|||||||
$Type = 'other';
|
$Type = 'other';
|
||||||
$ReportType = $Types['master']['other'];
|
$ReportType = $Types['master']['other'];
|
||||||
}
|
}
|
||||||
|
$RemasterDisplayString = Reports::format_reports_remaster_info($Remastered, $RemasterTitle, $RemasterYear);
|
||||||
|
|
||||||
if ($ArtistID == 0 && empty($ArtistName)) {
|
if ($ArtistID == 0 && empty($ArtistName)) {
|
||||||
$RawName = $GroupName.($Year ? " ($Year)" : "").($Format || $Encoding || $Media ? " [$Format/$Encoding/$Media]" : "").($Remastered ? " <$RemasterTitle - $RemasterYear>" : "").($HasCue ? " (Cue)" : '').($HasLog ? " (Log: $LogScore %)" : "")." (".number_format($Size/(1024*1024), 2)." MB)";
|
$RawName = $GroupName.($Year ? " ($Year)" : '').($Format || $Encoding || $Media ? " [$Format/$Encoding/$Media]" : '') . $RemasterDisplayString . ($HasCue ? ' (Cue)' : '').($HasLog ? " (Log: {$LogScore}%)" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||||
$LinkName = "<a href='torrents.php?id=$GroupID'>$GroupName".($Year ? " ($Year)" : "")."</a> <a href='torrents.php?torrentid=$TorrentID'>".($Format || $Encoding || $Media ? " [$Format/$Encoding/$Media]" : "").($Remastered ? " <$RemasterTitle - $RemasterYear>" : "")."</a> ".($HasCue ? " (Cue)" : '').($HasLog ? " <a href='torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID'>(Log: $LogScore %)</a>" : "")." (".number_format($Size/(1024*1024), 2)." MB)";
|
$LinkName = "<a href=\"torrents.php?id=$GroupID\">$GroupName".($Year ? " ($Year)" : '')."</a> <a href=\"torrents.php?torrentid=$TorrentID\">".($Format || $Encoding || $Media ? " [$Format/$Encoding/$Media]" : '') . $RemasterDisplayString . '</a> '.($HasCue ? ' (Cue)' : '').($HasLog ? " <a href=\"torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID\">(Log: {$LogScore}%)</a>" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||||
$BBName = "[url=torrents.php?id=$GroupID]$GroupName".($Year ? " ($Year)" : "")."[/url] [url=torrents.php?torrentid=$TorrentID][$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : "")."[/url] ".($HasCue ? " (Cue)" : '').($HasLog ? " [url=torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID'](Log: $LogScore %)[/url]" : "")." (".number_format($Size/(1024*1024), 2)." MB)";
|
$BBName = "[url=torrents.php?id=$GroupID]$GroupName".($Year ? " ($Year)" : '')."[/url] [url=torrents.php?torrentid=$TorrentID][$Format/$Encoding/$Media]{$RemasterDisplayString}[/url] ".($HasCue ? ' (Cue)' : '').($HasLog ? " [url=torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID](Log: {$LogScore}%)[/url]" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||||
} elseif ($ArtistID == 0 && $ArtistName == 'Various Artists') {
|
} elseif ($ArtistID == 0 && $ArtistName == 'Various Artists') {
|
||||||
$RawName = "Various Artists - $GroupName".($Year ? " ($Year)" : "")." [$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : "").($HasCue ? " (Cue)" : '').($HasLog ? " (Log: $LogScore %)" : "")." (".number_format($Size/(1024*1024), 2)." MB)";
|
$RawName = "Various Artists - $GroupName".($Year ? " ($Year)" : '')." [$Format/$Encoding/$Media]$RemasterDisplayString" . ($HasCue ? ' (Cue)' : '').($HasLog ? " (Log: {$LogScore}%)" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||||
$LinkName = "Various Artists - <a href='torrents.php?id=$GroupID'>$GroupName".($Year ? " ($Year)" : "")."</a> <a href='torrents.php?torrentid=$TorrentID'> [$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : "")."</a> ".($HasCue ? " (Cue)" : '').($HasLog ? " <a href='torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID'>(Log: $LogScore %)</a>" : "")." (".number_format($Size/(1024*1024), 2)." MB)";
|
$LinkName = "Various Artists - <a href=\"torrents.php?id=$GroupID\">$GroupName".($Year ? " ($Year)" : '')."</a> <a href=\"torrents.php?torrentid=$TorrentID\"> [$Format/$Encoding/$Media]$RemasterDisplayString</a> ".($HasCue ? ' (Cue)' : '').($HasLog ? " <a href=\"torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID\">(Log: {$LogScore}%)</a>" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||||
$BBName = "Various Artists - [url=torrents.php?id=$GroupID]$GroupName".($Year ? " ($Year)" : "")."[/url] [url=torrents.php?torrentid=$TorrentID][$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : "")."[/url] ".($HasCue ? " (Cue)" : '').($HasLog ? " [url=torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID'](Log: $LogScore %)[/url]" : "")." (".number_format($Size/(1024*1024), 2)." MB)";
|
$BBName = "Various Artists - [url=torrents.php?id=$GroupID]$GroupName".($Year ? " ($Year)" : '')."[/url] [url=torrents.php?torrentid=$TorrentID][$Format/$Encoding/$Media]{$RemasterDisplayString}[/url] ".($HasCue ? ' (Cue)' : '').($HasLog ? " [url=torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID](Log: {$LogScore}%)[/url]" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||||
} else {
|
} else {
|
||||||
$RawName = "$ArtistName - $GroupName".($Year ? " ($Year)" : "")." [$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : "").($HasCue ? " (Cue)" : '').($HasLog ? " (Log: $LogScore %)" : "")." (".number_format($Size/(1024*1024), 2)." MB)";
|
$RawName = "$ArtistName - $GroupName".($Year ? " ($Year)" : '')." [$Format/$Encoding/$Media]$RemasterDisplayString" . ($HasCue ? ' (Cue)' : '').($HasLog ? " (Log: {$LogScore}%)" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||||
$LinkName = "<a href='artist.php?id=$ArtistID'>$ArtistName</a> - <a href='torrents.php?id=$GroupID'>$GroupName".($Year ? " ($Year)" : "")."</a> <a href='torrents.php?torrentid=$TorrentID'> [$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : "")."</a> ".($HasCue ? " (Cue)" : '').($HasLog ? " <a href='torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID'>(Log: $LogScore %)</a>" : "")." (".number_format($Size/(1024*1024), 2)." MB)";
|
$LinkName = "<a href=\"artist.php?id=$ArtistID\">$ArtistName</a> - <a href=\"torrents.php?id=$GroupID\">$GroupName".($Year ? " ($Year)" : '')."</a> <a href=\"torrents.php?torrentid=$TorrentID\"> [$Format/$Encoding/$Media]$RemasterDisplayString</a> ".($HasCue ? ' (Cue)' : '').($HasLog ? " <a href=\"torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID\">(Log: {$LogScore}%)</a>" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||||
$BBName = "[url=artist.php?id=$ArtistID]".$ArtistName."[/url] - [url=torrents.php?id=$GroupID]$GroupName".($Year ? " ($Year)" : "")."[/url] [url=torrents.php?torrentid=$TorrentID][$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : "")."[/url] ".($HasCue ? " (Cue)" : '').($HasLog ? " [url=torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID'](Log: $LogScore %)[/url]" : "")." (".number_format($Size/(1024*1024), 2)." MB)";
|
$BBName = "[url=artist.php?id=$ArtistID]".$ArtistName."[/url] - [url=torrents.php?id=$GroupID]$GroupName".($Year ? " ($Year)" : '')."[/url] [url=torrents.php?torrentid=$TorrentID][$Format/$Encoding/$Media]{$RemasterDisplayString}[/url] ".($HasCue ? ' (Cue)' : '').($HasLog ? " [url=torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID](Log: {$LogScore}%)[/url]" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div id="report<?=$ReportID?>">
|
<div id="report<?=$ReportID?>">
|
||||||
<form class="edit_form" name="report" id="reportform_<?=$ReportID?>" action="reports.php" method="post">
|
<form class="edit_form" name="report" id="reportform_<?=$ReportID?>" action="reports.php" method="post">
|
||||||
<?
|
<?
|
||||||
/*
|
/*
|
||||||
* Some of these are for takeresolve, some for the JavaScript.
|
* Some of these are for takeresolve, some for the JavaScript.
|
||||||
*/
|
*/
|
||||||
@ -293,12 +296,14 @@
|
|||||||
|
|
||||||
|
|
||||||
if ($ExtraGroupName) {
|
if ($ExtraGroupName) {
|
||||||
|
$ExtraRemasterDisplayString = Reports::format_reports_remaster_info($ExtraRemastered, $ExtraRemasterTitle, $ExtraRemasterYear);
|
||||||
|
|
||||||
if ($ArtistID == 0 && empty($ArtistName)) {
|
if ($ArtistID == 0 && empty($ArtistName)) {
|
||||||
$ExtraLinkName = "<a href=\"torrents.php?id=$ExtraGroupID\">$ExtraGroupName".($ExtraYear ? " ($ExtraYear)" : '')."</a> <a href=\"torrents.php?torrentid=$ExtraID\"> [$ExtraFormat/$ExtraEncoding/$ExtraMedia]".($ExtraRemastered ? " <$ExtraRemasterTitle - $ExtraRemasterYear>" : '').'</a> '.($ExtraHasLog == '1' ? " <a href=\"torrents.php?action=viewlog&torrentid=$ExtraID&groupid=$ExtraGroupID\">(Log: $ExtraLogScore %)</a>" : '').' ('.number_format($ExtraSize / (1024 * 1024), 2).' MB)';
|
$ExtraLinkName = "<a href=\"torrents.php?id=$ExtraGroupID\">$ExtraGroupName".($ExtraYear ? " ($ExtraYear)" : '')."</a> <a href=\"torrents.php?torrentid=$ExtraID\"> [$ExtraFormat/$ExtraEncoding/$ExtraMedia]$ExtraRemasterDisplayString</a> " . ($ExtraHasLog == '1' ? " <a href=\"torrents.php?action=viewlog&torrentid=$ExtraID&groupid=$ExtraGroupID\">(Log: {$ExtraLogScore}%)</a>" : '').' ('.number_format($ExtraSize / (1024 * 1024), 2).' MB)';
|
||||||
} elseif ($ArtistID == 0 && $ArtistName == 'Various Artists') {
|
} elseif ($ArtistID == 0 && $ArtistName == 'Various Artists') {
|
||||||
$ExtraLinkName = "Various Artists - <a href=\"torrents.php?id=$ExtraGroupID\">$ExtraGroupName".($ExtraYear ? " ($ExtraYear)" : '')."</a> <a href=\"torrents.php?torrentid=$ExtraID\"> [$ExtraFormat/$ExtraEncoding/$ExtraMedia]".($ExtraRemastered ? " <$ExtraRemasterTitle - $ExtraRemasterYear>" : '')."</a> ".($ExtraHasLog == '1' ? " <a href=\"torrents.php?action=viewlog&torrentid=$ExtraID&groupid=$ExtraGroupID\">(Log: $ExtraLogScore %)</a>" : '').' ('.number_format($ExtraSize / (1024 * 1024), 2).' MB)';
|
$ExtraLinkName = "Various Artists - <a href=\"torrents.php?id=$ExtraGroupID\">$ExtraGroupName".($ExtraYear ? " ($ExtraYear)" : '')."</a> <a href=\"torrents.php?torrentid=$ExtraID\"> [$ExtraFormat/$ExtraEncoding/$ExtraMedia]$ExtraRemasterDisplayString</a> " . ($ExtraHasLog == '1' ? " <a href=\"torrents.php?action=viewlog&torrentid=$ExtraID&groupid=$ExtraGroupID\">(Log: {$ExtraLogScore}%)</a>" : '').' ('.number_format($ExtraSize / (1024 * 1024), 2).' MB)';
|
||||||
} else {
|
} else {
|
||||||
$ExtraLinkName = "<a href=\"artist.php?id=$ExtraArtistID\">$ExtraArtistName</a> - <a href=\"torrents.php?id=$ExtraGroupID\">$ExtraGroupName".($ExtraYear ? " ($ExtraYear)" : '')."</a> <a href=\"torrents.php?torrentid=$ExtraID\"> [$ExtraFormat/$ExtraEncoding/$ExtraMedia]".($ExtraRemastered ? " <$ExtraRemasterTitle - $ExtraRemasterYear>" : '').'</a> '.($ExtraHasLog == '1' ? " <a href=\"torrents.php?action=viewlog&torrentid=$ExtraID&groupid=$ExtraGroupID\">(Log: $ExtraLogScore %)</a>" : '').' ('.number_format($ExtraSize / (1024 * 1024), 2).' MB)';
|
$ExtraLinkName = "<a href=\"artist.php?id=$ExtraArtistID\">$ExtraArtistName</a> - <a href=\"torrents.php?id=$ExtraGroupID\">$ExtraGroupName".($ExtraYear ? " ($ExtraYear)" : '')."</a> <a href=\"torrents.php?torrentid=$ExtraID\"> [$ExtraFormat/$ExtraEncoding/$ExtraMedia]$ExtraRemasterDisplayString</a> " . ($ExtraHasLog == '1' ? " <a href=\"torrents.php?action=viewlog&torrentid=$ExtraID&groupid=$ExtraGroupID\">(Log: {$ExtraLogScore}%)</a>" : '').' ('.number_format($ExtraSize / (1024 * 1024), 2).' MB)';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?=($First ? '' : '<br />')?>
|
<?=($First ? '' : '<br />')?>
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
include(SERVER_ROOT.'/classes/class_text.php');
|
include(SERVER_ROOT.'/classes/class_text.php');
|
||||||
|
include(SERVER_ROOT.'/classes/class_reports.php');
|
||||||
$Text = NEW TEXT;
|
$Text = NEW TEXT;
|
||||||
|
|
||||||
define('REPORTS_PER_PAGE', '10');
|
define('REPORTS_PER_PAGE', '10');
|
||||||
@ -264,29 +265,31 @@
|
|||||||
$ReportType = $Types['master']['other'];
|
$ReportType = $Types['master']['other'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$RemasterDisplayString = Reports::format_reports_remaster_info($Remastered, $RemasterTitle, $RemasterYear);
|
||||||
|
|
||||||
if ($ArtistID == 0 && empty($ArtistName)) {
|
if ($ArtistID == 0 && empty($ArtistName)) {
|
||||||
$RawName = $GroupName.($Year ? " ($Year)" : '').($Format || $Encoding || $Media ? " [$Format/$Encoding/$Media]" : '').($Remastered ? " <$RemasterTitle - $RemasterYear>" : '').($HasCue ? ' (Cue)' : '').($HasLog ? " (Log: $LogScore %)" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
$RawName = $GroupName.($Year ? " ($Year)" : '').($Format || $Encoding || $Media ? " [$Format/$Encoding/$Media]" : '') . $RemasterDisplayString . ($HasCue ? ' (Cue)' : '').($HasLog ? " (Log: {$LogScore}%)" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||||
|
|
||||||
$LinkName = "<a href=\"torrents.php?id=$GroupID\">$GroupName".($Year ? " ($Year)" : '')."</a> <a href=\"torrents.php?torrentid=$TorrentID\">".($Format || $Encoding || $Media ? " [$Format/$Encoding/$Media]" : '').($Remastered ? " <$RemasterTitle - $RemasterYear>" : '').'</a> '.($HasCue ? ' (Cue)' : '').($HasLog ? " <a href=\"torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID\">(Log: $LogScore %)</a>" : '')." (".number_format($Size/(1024*1024), 2)." MB)";
|
$LinkName = "<a href=\"torrents.php?id=$GroupID\">$GroupName".($Year ? " ($Year)" : '')."</a> <a href=\"torrents.php?torrentid=$TorrentID\">".($Format || $Encoding || $Media ? " [$Format/$Encoding/$Media]" : '') . $RemasterDisplayString . '</a> '.($HasCue ? ' (Cue)' : '').($HasLog ? " <a href=\"torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID\">(Log: {$LogScore}%)</a>" : '').' ('.number_format($Size / (1024 * 1024), 2)." MB)";
|
||||||
|
|
||||||
$BBName = "[url=torrents.php?id=$GroupID]$GroupName".($Year ? " ($Year)" : '')."[/url] [url=torrents.php?torrentid=$TorrentID][$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : '').'[/url] '.($HasCue ? ' (Cue)' : '').($HasLog ? " [url=torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID](Log: $LogScore %)[/url]" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
$BBName = "[url=torrents.php?id=$GroupID]$GroupName".($Year ? " ($Year)" : '')."[/url] [url=torrents.php?torrentid=$TorrentID][$Format/$Encoding/$Media]{$RemasterDisplayString}[/url] ".($HasCue ? ' (Cue)' : '').($HasLog ? " [url=torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID](Log: {$LogScore}%)[/url]" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||||
} elseif ($ArtistID == 0 && $ArtistName == 'Various Artists') {
|
} elseif ($ArtistID == 0 && $ArtistName == 'Various Artists') {
|
||||||
$RawName = "Various Artists - $GroupName".($Year ? " ($Year)" : '')." [$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : '').($HasCue ? ' (Cue)' : '').($HasLog ? " (Log: $LogScore %)" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
$RawName = "Various Artists - $GroupName".($Year ? " ($Year)" : '')." [$Format/$Encoding/$Media]{$RemasterDisplayString}" . ($HasCue ? ' (Cue)' : '').($HasLog ? " (Log: {$LogScore}%)" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||||
|
|
||||||
$LinkName = "Various Artists - <a href=\"torrents.php?id=$GroupID\">$GroupName".($Year ? " ($Year)" : '')."</a> <a href=\"torrents.php?torrentid=$TorrentID\"> [$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : '').'</a> '.($HasCue ? ' (Cue)' : '').($HasLog ? " <a href=\"torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID\">(Log: $LogScore %)</a>" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
$LinkName = "Various Artists - <a href=\"torrents.php?id=$GroupID\">$GroupName".($Year ? " ($Year)" : '')."</a> <a href=\"torrents.php?torrentid=$TorrentID\"> [$Format/$Encoding/$Media]$RemasterDisplayString</a> ".($HasCue ? ' (Cue)' : '').($HasLog ? " <a href=\"torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID\">(Log: {$LogScore}%)</a>" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||||
|
|
||||||
$BBName = "Various Artists - [url=torrents.php?id=$GroupID]$GroupName".($Year ? " ($Year)" : '')."[/url] [url=torrents.php?torrentid=$TorrentID][$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : '').'[/url] '.($HasCue ? ' (Cue)' : '').($HasLog ? " [url=torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID](Log: $LogScore %)[/url]" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
$BBName = "Various Artists - [url=torrents.php?id=$GroupID]$GroupName".($Year ? " ($Year)" : '')."[/url] [url=torrents.php?torrentid=$TorrentID][$Format/$Encoding/$Media]{$RemasterDisplayString}[/url] ".($HasCue ? ' (Cue)' : '').($HasLog ? " [url=torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID](Log: {$LogScore}%)[/url]" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||||
} else {
|
} else {
|
||||||
$RawName = "$ArtistName - $GroupName".($Year ? " ($Year)" : '')." [$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : '').($HasCue ? ' (Cue)' : '').($HasLog ? " (Log: $LogScore %)" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
$RawName = "$ArtistName - $GroupName".($Year ? " ($Year)" : '')." [$Format/$Encoding/$Media]{$RemasterDisplayString}" . ($HasCue ? ' (Cue)' : '').($HasLog ? " (Log: {$LogScore}%)" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||||
|
|
||||||
$LinkName = "<a href='artist.php?id=$ArtistID'>$ArtistName</a> - <a href=\"torrents.php?id=$GroupID\">$GroupName".($Year ? " ($Year)" : '')."</a> <a href=\"torrents.php?torrentid=$TorrentID\"> [$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : '').'</a> '.($HasCue ? ' (Cue)' : '').($HasLog ? " <a href=\"torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID\">(Log: $LogScore %)</a>" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
$LinkName = "<a href=\"artist.php?id=$ArtistID\">$ArtistName</a> - <a href=\"torrents.php?id=$GroupID\">$GroupName".($Year ? " ($Year)" : '')."</a> <a href=\"torrents.php?torrentid=$TorrentID\"> [$Format/$Encoding/$Media]{$RemasterDisplayString}</a> ".($HasCue ? ' (Cue)' : '').($HasLog ? " <a href=\"torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID\">(Log: {$LogScore}%)</a>" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||||
|
|
||||||
$BBName = "[url=artist.php?id=$ArtistID]".$ArtistName."[/url] - [url=torrents.php?id=$GroupID]$GroupName".($Year ? " ($Year)" : '')."[/url] [url=torrents.php?torrentid=$TorrentID][$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : '').'[/url] '.($HasCue ? ' (Cue)' : '').($HasLog ? " [url=torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID](Log: $LogScore %)[/url]" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
$BBName = "[url=artist.php?id=$ArtistID]".$ArtistName."[/url] - [url=torrents.php?id=$GroupID]$GroupName".($Year ? " ($Year)" : '')."[/url] [url=torrents.php?torrentid=$TorrentID][$Format/$Encoding/$Media]{$RemasterDisplayString}[/url] ".($HasCue ? ' (Cue)' : '').($HasLog ? " [url=torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID](Log: {$LogScore}%)[/url]" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div id="report<?=$ReportID?>">
|
<div id="report<?=$ReportID?>">
|
||||||
<form class="manage_form" name="report" id="reportform_<?=$ReportID?>" action="reports.php" method="post">
|
<form class="manage_form" name="report" id="reportform_<?=$ReportID?>" action="reports.php" method="post">
|
||||||
<?
|
<?
|
||||||
/*
|
/*
|
||||||
* Some of these are for takeresolve, namely the ones that aren't inputs, some for the JavaScript.
|
* Some of these are for takeresolve, namely the ones that aren't inputs, some for the JavaScript.
|
||||||
*/
|
*/
|
||||||
@ -449,12 +452,14 @@
|
|||||||
$ExtraRemasterYear, $ExtraMedia, $ExtraFormat, $ExtraEncoding, $ExtraSize, $ExtraHasCue, $ExtraHasLog, $ExtraLogScore, $ExtraUploaderID, $ExtraUploaderName) = Misc::display_array($DB->next_record());
|
$ExtraRemasterYear, $ExtraMedia, $ExtraFormat, $ExtraEncoding, $ExtraSize, $ExtraHasCue, $ExtraHasLog, $ExtraLogScore, $ExtraUploaderID, $ExtraUploaderName) = Misc::display_array($DB->next_record());
|
||||||
|
|
||||||
if ($ExtraGroupName) {
|
if ($ExtraGroupName) {
|
||||||
|
$ExtraRemasterDisplayString = Reports::format_reports_remaster_info($ExtraRemastered, $ExtraRemasterTitle, $ExtraRemasterYear);
|
||||||
|
|
||||||
if ($ArtistID == 0 && empty($ArtistName)) {
|
if ($ArtistID == 0 && empty($ArtistName)) {
|
||||||
$ExtraLinkName = "<a href=\"torrents.php?id=$ExtraGroupID\">$ExtraGroupName".($ExtraYear ? " ($ExtraYear)" : '')."</a> <a href=\"torrents.php?torrentid=$ExtraID\"> [$ExtraFormat/$ExtraEncoding/$ExtraMedia]".($ExtraRemastered ? " <$ExtraRemasterTitle - $ExtraRemasterYear>" : '').'</a> '.($ExtraHasCue == '1' ? ' (Cue)' : '').($ExtraHasLog == '1' ? " <a href=\"torrents.php?action=viewlog&torrentid=$ExtraID&groupid=$ExtraGroupID\">(Log: $ExtraLogScore %)</a>" : '').' ('.number_format($ExtraSize / (1024 * 1024), 2).' MB)';
|
$ExtraLinkName = "<a href=\"torrents.php?id=$ExtraGroupID\">$ExtraGroupName".($ExtraYear ? " ($ExtraYear)" : '')."</a> <a href=\"torrents.php?torrentid=$ExtraID\"> [$ExtraFormat/$ExtraEncoding/$ExtraMedia]$ExtraRemasterDisplayString</a> " . ($ExtraHasCue == '1' ? ' (Cue)' : '').($ExtraHasLog == '1' ? " <a href=\"torrents.php?action=viewlog&torrentid=$ExtraID&groupid=$ExtraGroupID\">(Log: $ExtraLogScore %)</a>" : '').' ('.number_format($ExtraSize / (1024 * 1024), 2).' MB)';
|
||||||
} elseif ($ArtistID == 0 && $ArtistName == 'Various Artists') {
|
} elseif ($ArtistID == 0 && $ArtistName == 'Various Artists') {
|
||||||
$ExtraLinkName = "Various Artists - <a href=\"torrents.php?id=$ExtraGroupID\">$ExtraGroupName".($ExtraYear ? " ($ExtraYear)" : '')."</a> <a href=\"torrents.php?torrentid=$ExtraID\"> [$ExtraFormat/$ExtraEncoding/$ExtraMedia]".($ExtraRemastered ? " <$ExtraRemasterTitle - $ExtraRemasterYear>" : '').'</a> '.($ExtraHasCue == '1' ? ' (Cue)' : '').($ExtraHasLog == '1' ? " <a href=\"torrents.php?action=viewlog&torrentid=$ExtraID&groupid=$ExtraGroupID\">(Log: $ExtraLogScore %)</a>" : '').' ('.number_format($ExtraSize / (1024 * 1024), 2).' MB)';
|
$ExtraLinkName = "Various Artists - <a href=\"torrents.php?id=$ExtraGroupID\">$ExtraGroupName".($ExtraYear ? " ($ExtraYear)" : '')."</a> <a href=\"torrents.php?torrentid=$ExtraID\"> [$ExtraFormat/$ExtraEncoding/$ExtraMedia]$ExtraRemasterDisplayString</a> " . ($ExtraHasCue == '1' ? ' (Cue)' : '').($ExtraHasLog == '1' ? " <a href=\"torrents.php?action=viewlog&torrentid=$ExtraID&groupid=$ExtraGroupID\">(Log: $ExtraLogScore %)</a>" : '').' ('.number_format($ExtraSize / (1024 * 1024), 2).' MB)';
|
||||||
} else {
|
} else {
|
||||||
$ExtraLinkName = "<a href=\"artist.php?id=$ExtraArtistID\">$ExtraArtistName</a> - <a href=\"torrents.php?id=$ExtraGroupID\">$ExtraGroupName".($ExtraYear ? " ($ExtraYear)" : '')."</a> <a href=\"torrents.php?torrentid=$ExtraID\"> [$ExtraFormat/$ExtraEncoding/$ExtraMedia]".($ExtraRemastered ? " <$ExtraRemasterTitle - $ExtraRemasterYear>" : '').'</a> '.($ExtraHasCue == '1' ? ' (Cue)' : '').($ExtraHasLog == '1' ? " <a href=\"torrents.php?action=viewlog&torrentid=$ExtraID&groupid=$ExtraGroupID\">(Log: $ExtraLogScore %)</a>" : '').' ('.number_format($ExtraSize / (1024 * 1024), 2).' MB)';
|
$ExtraLinkName = "<a href=\"artist.php?id=$ExtraArtistID\">$ExtraArtistName</a> - <a href=\"torrents.php?id=$ExtraGroupID\">$ExtraGroupName".($ExtraYear ? " ($ExtraYear)" : '')."</a> <a href=\"torrents.php?torrentid=$ExtraID\"> [$ExtraFormat/$ExtraEncoding/$ExtraMedia]$ExtraRemasterDisplayString</a> " . ($ExtraHasCue == '1' ? ' (Cue)' : '').($ExtraHasLog == '1' ? " <a href=\"torrents.php?action=viewlog&torrentid=$ExtraID&groupid=$ExtraGroupID\">(Log: $ExtraLogScore %)</a>" : '').' ('.number_format($ExtraSize / (1024 * 1024), 2).' MB)';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?=($First ? '' : '<br />')?>
|
<?=($First ? '' : '<br />')?>
|
||||||
@ -588,51 +593,48 @@
|
|||||||
<td colspan="4" style="text-align: center;">
|
<td colspan="4" style="text-align: center;">
|
||||||
<input type="button" value="Invalidate report" onclick="Dismiss(<?=$ReportID?>);" />
|
<input type="button" value="Invalidate report" onclick="Dismiss(<?=$ReportID?>);" />
|
||||||
<input type="button" value="Resolve report manually" onclick="ManualResolve(<?=$ReportID?>);" />
|
<input type="button" value="Resolve report manually" onclick="ManualResolve(<?=$ReportID?>);" />
|
||||||
<? if ($Status == 'InProgress' && $LoggedUser['ID'] == $ResolverID) { ?>
|
<? if ($Status == 'InProgress' && $LoggedUser['ID'] == $ResolverID) { ?>
|
||||||
| <input type="button" value="Unclaim" onclick="GiveBack(<?=$ReportID?>);" />
|
| <input type="button" value="Unclaim" onclick="GiveBack(<?=$ReportID?>);" />
|
||||||
<? } else { ?>
|
<? } else { ?>
|
||||||
| <input id="grab<?=$ReportID?>" type="button" value="Claim" onclick="Grab(<?=$ReportID?>);" />
|
| <input id="grab<?=$ReportID?>" type="button" value="Claim" onclick="Grab(<?=$ReportID?>);" />
|
||||||
<? } ?>
|
<? } ?>
|
||||||
| Multi-resolve <input type="checkbox" name="multi" id="multi<?=$ReportID?>" checked="checked" />
|
| Multi-resolve <input type="checkbox" name="multi" id="multi<?=$ReportID?>" checked="checked" />
|
||||||
| <input type="button" id="submit_<?=$ReportID?>" value="Submit" onclick="TakeResolve(<?=$ReportID?>);" />
|
| <input type="button" id="submit_<?=$ReportID?>" value="Submit" onclick="TakeResolve(<?=$ReportID?>);" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?
|
<? } else { ?>
|
||||||
} else {
|
|
||||||
?>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="label">Resolver</td>
|
<td class="label">Resolver:</td>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<a href="user.php?id=<?=$ResolverID?>"><?=$ResolverName?></a>
|
<a href="user.php?id=<?=$ResolverID?>"><?=$ResolverName?></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="label">Resolve time</td>
|
<td class="label">Resolve time:</td>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<?=time_diff($LastChangeTime)?>
|
<?=time_diff($LastChangeTime); echo "\n"; ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="label">Report comments</td>
|
<td class="label">Report comments:</td>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<?=$ModComment?>
|
<?=$ModComment; echo "\n"; ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="label">Log message</td>
|
<td class="label">Log message:</td>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<?=$LogMessage?>
|
<?=$LogMessage; echo "\n"; ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<? if ($GroupID) { ?>
|
<? if ($GroupID) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4" style="text-align: center;">
|
<td colspan="4" style="text-align: center;">
|
||||||
<input id="grab<?=$ReportID?>" type="button" value="Claim" onclick="Grab(<?=$ReportID?>);" />
|
<input id="grab<?=$ReportID?>" type="button" value="Claim" onclick="Grab(<?=$ReportID?>);" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<? }
|
<? }
|
||||||
}
|
} ?>
|
||||||
?>
|
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
<br />
|
<br />
|
||||||
@ -647,9 +649,8 @@
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<div class="linkbox">
|
<? if ($PageLinks) { ?>
|
||||||
<?=$PageLinks?>
|
<div class="linkbox pager"><?=$PageLinks?></div>
|
||||||
|
<? } ?>
|
||||||
</div>
|
</div>
|
||||||
<?
|
<? View::show_footer(); ?>
|
||||||
View::show_footer();
|
|
||||||
?>
|
|
||||||
|
@ -115,6 +115,7 @@
|
|||||||
<?
|
<?
|
||||||
$DB->query("
|
$DB->query("
|
||||||
SELECT
|
SELECT
|
||||||
|
um.ID,
|
||||||
um.Username,
|
um.Username,
|
||||||
COUNT(r.ID) AS Reports
|
COUNT(r.ID) AS Reports
|
||||||
FROM reportsv2 AS r
|
FROM reportsv2 AS r
|
||||||
@ -130,10 +131,10 @@
|
|||||||
<td class="head colhead_dark">Reports</td>
|
<td class="head colhead_dark">Reports</td>
|
||||||
</tr>
|
</tr>
|
||||||
<? foreach ($Results as $Result) {
|
<? foreach ($Results as $Result) {
|
||||||
list($Username, $Reports) = $Result;
|
list($UserID, $Username, $Reports) = $Result;
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?=$Username?></td>
|
<td><a href="reportsv2.php?view=resolver&id=<?=$UserID?>"><?=$Username?></a></td>
|
||||||
<td><?=number_format($Reports)?></td>
|
<td><?=number_format($Reports)?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
error(404);
|
error(404);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If you change this line, make sure to do the same change to the corresponding line in sections/ajax/request.php
|
||||||
list($RequestID, $RequestorID, $RequestorName, $TimeAdded, $LastVote, $CategoryID, $Title, $Year, $Image, $Description, $CatalogueNumber, $RecordLabel, $ReleaseType,
|
list($RequestID, $RequestorID, $RequestorName, $TimeAdded, $LastVote, $CategoryID, $Title, $Year, $Image, $Description, $CatalogueNumber, $RecordLabel, $ReleaseType,
|
||||||
$BitrateList, $FormatList, $MediaList, $LogCue, $FillerID, $FillerName, $TorrentID, $TimeFilled, $GroupID, $OCLC) = $Request;
|
$BitrateList, $FormatList, $MediaList, $LogCue, $FillerID, $FillerName, $TorrentID, $TimeFilled, $GroupID, $OCLC) = $Request;
|
||||||
|
|
||||||
@ -42,7 +43,7 @@
|
|||||||
$ArtistLink = Artists::display_artists($ArtistForm, true, true);
|
$ArtistLink = Artists::display_artists($ArtistForm, true, true);
|
||||||
|
|
||||||
if ($IsFilled) {
|
if ($IsFilled) {
|
||||||
$DisplayLink = $ArtistLink."<a href='torrents.php?torrentid=".$TorrentID."'>$Title</a> [$Year]";
|
$DisplayLink = $ArtistLink."<a href=\"torrents.php?torrentid=$TorrentID\">$Title</a> [$Year]";
|
||||||
} else {
|
} else {
|
||||||
$DisplayLink = $ArtistLink.$Title." [$Year]";
|
$DisplayLink = $ArtistLink.$Title." [$Year]";
|
||||||
}
|
}
|
||||||
@ -99,23 +100,22 @@
|
|||||||
<? } ?>
|
<? } ?>
|
||||||
<a href="reports.php?action=report&type=request&id=<?=$RequestID?>" class="brackets">Report request</a>
|
<a href="reports.php?action=report&type=request&id=<?=$RequestID?>" class="brackets">Report request</a>
|
||||||
<? if (!$IsFilled) { ?>
|
<? if (!$IsFilled) { ?>
|
||||||
<a href="upload.php?requestid=<?=$RequestID?><?= ($GroupID ? "&groupid=$GroupID" : '') ?>" class="brackets">Upload request</a>
|
<a href="upload.php?requestid=<?=$RequestID?><?=($GroupID ? "&groupid=$GroupID" : '')?>" class="brackets">Upload request</a>
|
||||||
<? }
|
<? }
|
||||||
if (!$IsFilled && (($CategoryID == 0) || ($CategoryName == 'Music' && $Year == 0))) { ?>
|
if (!$IsFilled && (($CategoryID == 0) || ($CategoryName == 'Music' && $Year == 0))) { ?>
|
||||||
<a href="reports.php?action=report&type=request_update&id=<?=$RequestID?>" class="brackets">Request update</a>
|
<a href="reports.php?action=report&type=request_update&id=<?=$RequestID?>" class="brackets">Request update</a>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
|
|
||||||
<?
|
<?
|
||||||
//create a search url to worldcat and google based on title
|
//create a search URL to WorldCat and google based on title
|
||||||
$encoded_title = urlencode(preg_replace("/\([^\)]+\)/", "", $Title));
|
$encoded_title = urlencode(preg_replace("/\([^\)]+\)/", '', $Title));
|
||||||
$encoded_artist = substr(str_replace("&","and",$ArtistName), 0, -3);
|
$encoded_artist = substr(str_replace('&', 'and', $ArtistName), 0, -3);
|
||||||
$encoded_artist = str_ireplace("Performed By", "", $encoded_artist);
|
$encoded_artist = str_ireplace('Performed By', '', $encoded_artist);
|
||||||
$encoded_artist = preg_replace("/\([^\)]+\)/", "", $encoded_artist);
|
$encoded_artist = preg_replace("/\([^\)]+\)/", '', $encoded_artist);
|
||||||
$encoded_artist = urlencode($encoded_artist);
|
$encoded_artist = urlencode($encoded_artist);
|
||||||
|
|
||||||
$worldcat_url = "http://worldcat.org/search?q=" . $encoded_artist . " " . $encoded_title;
|
$worldcat_url = "http://worldcat.org/search?q=" . "$encoded_artist $encoded_title";
|
||||||
$google_url = "https://www.google.com/search?&tbm=shop&q=" . $encoded_artist . " " . $encoded_title;
|
$google_url = "https://www.google.com/search?&tbm=shop&q=" . "$encoded_artist $encoded_title";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<a href="<? echo $worldcat_url; ?>" class="brackets">Find in library</a>
|
<a href="<? echo $worldcat_url; ?>" class="brackets">Find in library</a>
|
||||||
<a href="<? echo $google_url; ?>" class="brackets">Find in stores</a>
|
<a href="<? echo $google_url; ?>" class="brackets">Find in stores</a>
|
||||||
@ -131,7 +131,7 @@
|
|||||||
?>
|
?>
|
||||||
<p align="center"><img style="max-width: 220px;" src="<?=$Image?>" alt="<?=$FullName?>" onclick="lightbox.init('<?=$Image?>',220);" /></p>
|
<p align="center"><img style="max-width: 220px;" src="<?=$Image?>" alt="<?=$FullName?>" onclick="lightbox.init('<?=$Image?>',220);" /></p>
|
||||||
<? } else { ?>
|
<? } else { ?>
|
||||||
<p align="center"><img src="<?=STATIC_SERVER?>common/noartwork/<?=$CategoryIcons[$CategoryID-1]?>" alt="<?=$CategoryName?>" title="<?=$CategoryName?>" width="220" height="220" border="0" /></p>
|
<p align="center"><img src="<?=STATIC_SERVER?>common/noartwork/<?=$CategoryIcons[$CategoryID - 1]?>" alt="<?=$CategoryName?>" title="<?=$CategoryName?>" width="220" height="220" border="0" /></p>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</div>
|
</div>
|
||||||
<? }
|
<? }
|
||||||
@ -224,7 +224,7 @@
|
|||||||
<? foreach ($Request['Tags'] as $TagID => $TagName) { ?>
|
<? foreach ($Request['Tags'] as $TagID => $TagName) { ?>
|
||||||
<li>
|
<li>
|
||||||
<a href="torrents.php?taglist=<?=$TagName?>"><?=display_str($TagName)?></a>
|
<a href="torrents.php?taglist=<?=$TagName?>"><?=display_str($TagName)?></a>
|
||||||
<br style="clear:both" />
|
<br style="clear: both;" />
|
||||||
</li>
|
</li>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</ul>
|
</ul>
|
||||||
@ -244,10 +244,10 @@
|
|||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="user.php?id=<?=$User['UserID']?>"><?=$Boldify?'<strong>':''?><?=display_str($User['Username'])?><?=$Boldify?'</strong>':''?></a>
|
<a href="user.php?id=<?=$User['UserID']?>"><?=($Boldify ? '<strong>' : '')?><?=display_str($User['Username'])?><?=($Boldify ? '</strong>' : '')?></a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?=$Boldify?'<strong>':''?><?=Format::get_size($User['Bounty'])?><?=$Boldify?'</strong>':''?>
|
<?=($Boldify ? '<strong>' : '')?><?=Format::get_size($User['Bounty'])?><?=($Boldify ? '</strong>' : '')?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<? }
|
<? }
|
||||||
@ -278,7 +278,7 @@
|
|||||||
<?=time_diff($TimeAdded)?> by <strong><?=Users::format_username($RequestorID, false, false, false)?></strong>
|
<?=time_diff($TimeAdded)?> by <strong><?=Users::format_username($RequestorID, false, false, false)?></strong>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<? if ($CategoryName == "Music") {
|
<? if ($CategoryName == 'Music') {
|
||||||
if (!empty($RecordLabel)) { ?>
|
if (!empty($RecordLabel)) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="label">Record label</td>
|
<td class="label">Record label</td>
|
||||||
@ -328,10 +328,10 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<? }
|
<? }
|
||||||
}
|
}
|
||||||
$Worldcat = "";
|
$Worldcat = '';
|
||||||
$OCLC = str_replace(" ", "", $OCLC);
|
$OCLC = str_replace(' ', '', $OCLC);
|
||||||
if ($OCLC != "") {
|
if ($OCLC != '') {
|
||||||
$OCLCs = explode(",", $OCLC);
|
$OCLCs = explode(',', $OCLC);
|
||||||
for ($i = 0; $i < count($OCLCs); $i++) {
|
for ($i = 0; $i < count($OCLCs); $i++) {
|
||||||
if (!empty($Worldcat)) {
|
if (!empty($Worldcat)) {
|
||||||
$Worldcat .= ', <a href="http://www.worldcat.org/oclc/'.$OCLCs[$i].'">'.$OCLCs[$i].'</a>';
|
$Worldcat .= ', <a href="http://www.worldcat.org/oclc/'.$OCLCs[$i].'">'.$OCLCs[$i].'</a>';
|
||||||
@ -558,11 +558,13 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<? } ?>
|
<? }
|
||||||
<div class="linkbox">
|
|
||||||
<?=$Pages?>
|
if ($Pages) { ?>
|
||||||
</div>
|
<div class="linkbox pager"><?=$Pages?></div>
|
||||||
<?
|
<?
|
||||||
|
}
|
||||||
|
|
||||||
View::parse('generic/reply/quickreply.php', array(
|
View::parse('generic/reply/quickreply.php', array(
|
||||||
'InputName' => 'requestid',
|
'InputName' => 'requestid',
|
||||||
'InputID' => $RequestID));
|
'InputID' => $RequestID));
|
||||||
|
@ -678,6 +678,4 @@
|
|||||||
<?=$PageLinks?>
|
<?=$PageLinks?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?
|
<? View::show_footer(); ?>
|
||||||
View::show_footer();
|
|
||||||
?>
|
|
||||||
|
@ -374,15 +374,13 @@ foreach ($Categories as $CatKey => $CatName) {
|
|||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="linkbox">
|
<div class="linkbox">
|
||||||
<?=$PageLinks?>
|
<?=$PageLinks?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<table id="request_table" class="request_table" cellpadding="6" cellspacing="1" border="0" class="border" width="100%">
|
<table id="request_table" class="request_table" cellpadding="6" cellspacing="1" border="0" class="border" width="100%">
|
||||||
<tr class="colhead_dark">
|
<tr class="colhead_dark">
|
||||||
<td style="width: 38%;">
|
<td style="width: 38%;">
|
||||||
<a href="requests.php?order=name&sort=<?=(($CurrentOrder == 'name') ? $NewSort : 'asc')?>&<?=$CurrentURL ?>"><strong>Request Name</strong></a>
|
<a href="requests.php?order=name&sort=<?=(($CurrentOrder == 'name') ? $NewSort : 'asc')?>&<?=$CurrentURL ?>"><strong>Request name</strong></a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<strong><a href="requests.php?order=votes&sort=<?=(($CurrentOrder == 'votes') ? $NewSort : 'asc')?>&<?=$CurrentURL ?>">Vote (20MB)</a></strong></td>
|
<strong><a href="requests.php?order=votes&sort=<?=(($CurrentOrder == 'votes') ? $NewSort : 'asc')?>&<?=$CurrentURL ?>">Vote (20MB)</a></strong></td>
|
||||||
@ -401,7 +399,7 @@ foreach ($Categories as $CatKey => $CatName) {
|
|||||||
<a href="requests.php?order=created&sort=<?=(($CurrentOrder == 'created') ? $NewSort : 'asc')?>&<?=$CurrentURL ?>"><strong>Created</strong></a>
|
<a href="requests.php?order=created&sort=<?=(($CurrentOrder == 'created') ? $NewSort : 'asc')?>&<?=$CurrentURL ?>"><strong>Created</strong></a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="requests.php?order=lastvote&sort=<?=(($CurrentOrder == 'lastvote') ? $NewSort : 'asc')?>&<?=$CurrentURL ?>"><strong>Last Vote</strong></a>
|
<a href="requests.php?order=lastvote&sort=<?=(($CurrentOrder == 'lastvote') ? $NewSort : 'asc')?>&<?=$CurrentURL ?>"><strong>Last vote</strong></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@ -422,14 +420,14 @@ foreach ($Categories as $CatKey => $CatName) {
|
|||||||
if ($CategoryName == "Music") {
|
if ($CategoryName == "Music") {
|
||||||
$ArtistForm = Requests::get_artists($RequestID);
|
$ArtistForm = Requests::get_artists($RequestID);
|
||||||
$ArtistLink = display_artists($ArtistForm, true, true);
|
$ArtistLink = display_artists($ArtistForm, true, true);
|
||||||
$FullName = $ArtistLink."<a href='requests.php?action=view&id=".$RequestID."'>".$Title." [".$Year."]</a>";
|
$FullName = $ArtistLink."<a href=\"requests.php?action=view&id=$RequestID\">$Title [$Year]</a>";
|
||||||
} elseif ($CategoryName == 'Audiobooks' || $CategoryName == 'Comedy') {
|
} elseif ($CategoryName == 'Audiobooks' || $CategoryName == 'Comedy') {
|
||||||
$FullName = "<a href='requests.php?action=view&id=".$RequestID."'>".$Title." [".$Year."]</a>";
|
$FullName = "<a href=\"requests.php?action=view&id=$RequestID\">$Title [$Year]</a>";
|
||||||
} else {
|
} else {
|
||||||
$FullName ="<a href='requests.php?action=view&id=".$RequestID."'>".$Title."</a>";
|
$FullName ="<a href=\"requests.php?action=view&id=$RequestID\">$Title</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$Row = ($Row == 'a') ? 'b' : 'a';
|
$Row = (($Row == 'a') ? 'b' : 'a');
|
||||||
|
|
||||||
$Tags = Requests::get_tags($RequestID);
|
$Tags = Requests::get_tags($RequestID);
|
||||||
?>
|
?>
|
||||||
@ -440,7 +438,7 @@ foreach ($Categories as $CatKey => $CatName) {
|
|||||||
<?
|
<?
|
||||||
$TagList = array();
|
$TagList = array();
|
||||||
foreach ($Tags as $TagID => $TagName) {
|
foreach ($Tags as $TagID => $TagName) {
|
||||||
$TagList[] = "<a href='requests.php?tag=".$TagID."'>".display_str($TagName)."</a>";
|
$TagList[] = "<a href=\"requests.php?tag=$TagID\">" . display_str($TagName) . '</a>';
|
||||||
}
|
}
|
||||||
$TagList = implode(', ', $TagList);
|
$TagList = implode(', ', $TagList);
|
||||||
?>
|
?>
|
||||||
|
@ -99,7 +99,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</table>
|
</table>
|
||||||
<div class="linkbox">
|
<? if ($Pages) { ?>
|
||||||
<? echo $Pages; ?>
|
<div class="linkbox pager"><?=($Pages)?></div>
|
||||||
</div>
|
<? }
|
||||||
<? View::show_footer(); ?>
|
View::show_footer(); ?>
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
<?
|
<?
|
||||||
View::show_header('Batch Tag Editor','validate');
|
View::show_header('Batch Tag Editor', 'validate');
|
||||||
if (!check_perms('users_mod')) {
|
if (!check_perms('users_mod')) {
|
||||||
error(403);
|
error(403);
|
||||||
}
|
}
|
||||||
|
|
||||||
// validation functions
|
// validation functions
|
||||||
$Val->SetFields('tag',true,'string','Enter a single tag to search for.',array('maxlength'=>'200','minlength'=>'2'));
|
$Val->SetFields('tag', true, 'string', 'Enter a single tag to search for.', array('maxlength'=>'200', 'minlength'=>'2'));
|
||||||
$Val->SetFields('replace',true,'string','Enter a single replacement tag.',array('maxlength'=>'200','minlength'=>'2'));
|
$Val->SetFields('replace', true, 'string', 'Enter a single replacement tag.', array('maxlength'=>'200', 'minlength'=>'2'));
|
||||||
|
|
||||||
echo $Val->GenerateJS('tagform');
|
echo $Val->GenerateJS('tagform');
|
||||||
|
|
||||||
// some constants to make programmers' lives easier
|
// some constants to make programmers' lives easier
|
||||||
define('MODE_RENAME',0);
|
define('MODE_RENAME', 0);
|
||||||
define('MODE_MERGE',1);
|
define('MODE_MERGE', 1);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div class="thin">
|
<div class="thin">
|
||||||
@ -69,9 +69,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 1) make sure tag exists
|
// 1) make sure tag exists
|
||||||
$DB->query("SELECT ID
|
$DB->query("
|
||||||
|
SELECT ID
|
||||||
FROM tags
|
FROM tags
|
||||||
WHERE Name = '".$Tag."'
|
WHERE Name = '$Tag'
|
||||||
LIMIT 1;");
|
LIMIT 1;");
|
||||||
if ($DB->record_count() == 0) {
|
if ($DB->record_count() == 0) {
|
||||||
echo " <div class=\"box pad center\">
|
echo " <div class=\"box pad center\">
|
||||||
@ -84,9 +85,10 @@
|
|||||||
list($TagID) = $DB->next_record();
|
list($TagID) = $DB->next_record();
|
||||||
|
|
||||||
// 2) check if replacement exists
|
// 2) check if replacement exists
|
||||||
$DB->query("SELECT ID
|
$DB->query("
|
||||||
|
SELECT ID
|
||||||
FROM tags
|
FROM tags
|
||||||
WHERE Name = '".$Replacement."'
|
WHERE Name = '$Replacement'
|
||||||
LIMIT 1;");
|
LIMIT 1;");
|
||||||
if ($DB->record_count() == 0 ) {
|
if ($DB->record_count() == 0 ) {
|
||||||
$Mode = MODE_RENAME;
|
$Mode = MODE_RENAME;
|
||||||
@ -98,7 +100,8 @@
|
|||||||
if ($_GET['list']) {
|
if ($_GET['list']) {
|
||||||
$AffectedTorrents = array();
|
$AffectedTorrents = array();
|
||||||
// 3) get a list of affected torrents
|
// 3) get a list of affected torrents
|
||||||
$DB->query("SELECT
|
$DB->query("
|
||||||
|
SELECT
|
||||||
tg.ID,
|
tg.ID,
|
||||||
ag.ArtistID,
|
ag.ArtistID,
|
||||||
ag.Name,
|
ag.Name,
|
||||||
@ -107,14 +110,15 @@
|
|||||||
LEFT JOIN artists_group AS ag ON ag.ArtistID=tg.ArtistID
|
LEFT JOIN artists_group AS ag ON ag.ArtistID=tg.ArtistID
|
||||||
JOIN torrents_tags AS t ON t.GroupID=tg.ID
|
JOIN torrents_tags AS t ON t.GroupID=tg.ID
|
||||||
WHERE t.TagID=$TagID;");
|
WHERE t.TagID=$TagID;");
|
||||||
while (list($TorrentID,$ArtistID,$ArtistName,$TorrentName) = $DB->next_record()) {
|
while (list($TorrentID, $ArtistID, $ArtistName, $TorrentName) = $DB->next_record()) {
|
||||||
$Row = ($ArtistName ? "<a href=\"artist.php?id=$ArtistID\">$ArtistName</a> - " : '');
|
$Row = ($ArtistName ? "<a href=\"artist.php?id=$ArtistID\">$ArtistName</a> - " : '');
|
||||||
$Row.= "<a href='torrents.php?id=$TorrentID'>".display_str($TorrentName)."</a>";
|
$Row.= "<a href=\"torrents.php?id=$TorrentID\">".display_str($TorrentName).'</a>';
|
||||||
$AffectedTorrents[] = $Row;
|
$AffectedTorrents[] = $Row;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4) get a list of affected requests
|
// 4) get a list of affected requests
|
||||||
$DB->query("SELECT
|
$DB->query("
|
||||||
|
SELECT
|
||||||
ra.RequestID,
|
ra.RequestID,
|
||||||
ag.ArtistID,
|
ag.ArtistID,
|
||||||
ag.Name,
|
ag.Name,
|
||||||
@ -124,9 +128,9 @@
|
|||||||
LEFT JOIN artists_group AS ag ON ag.ArtistID=ra.ArtistID
|
LEFT JOIN artists_group AS ag ON ag.ArtistID=ra.ArtistID
|
||||||
JOIN requests_tags AS t ON t.RequestID=r.ID
|
JOIN requests_tags AS t ON t.RequestID=r.ID
|
||||||
WHERE t.TagID=$TagID;");
|
WHERE t.TagID=$TagID;");
|
||||||
while (list($RequestID,$ArtistID,$ArtistName,$RequestName) = $DB->next_record()) {
|
while (list($RequestID, $ArtistID, $ArtistName, $RequestName) = $DB->next_record()) {
|
||||||
$Row = ($ArtistName ? "<a href=\"artist.php?id=$ArtistID\">$ArtistName</a> - " : '');
|
$Row = ($ArtistName ? "<a href=\"artist.php?id=$ArtistID\">$ArtistName</a> - " : '');
|
||||||
$Row.= "<a href='requests.php?action=viewrequest&id=$RequestID'>".display_str($RequestName)."</a>";
|
$Row.= "<a href=\"requests.php?action=viewrequest&id=$RequestID\">".display_str($RequestName).'</a>';
|
||||||
$AffectedRequests[] = $Row;
|
$AffectedRequests[] = $Row;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -135,8 +139,9 @@
|
|||||||
if ($Mode == MODE_RENAME) {
|
if ($Mode == MODE_RENAME) {
|
||||||
// EASY! just rename the tag
|
// EASY! just rename the tag
|
||||||
// 5) rename the tag
|
// 5) rename the tag
|
||||||
$DB->query("UPDATE tags
|
$DB->query("
|
||||||
SET Name = '".$Replacement."'
|
UPDATE tags
|
||||||
|
SET Name = '$Replacement'
|
||||||
WHERE ID = $TagID
|
WHERE ID = $TagID
|
||||||
LIMIT 1;");
|
LIMIT 1;");
|
||||||
$TotalAffected = $DB->affected_rows();
|
$TotalAffected = $DB->affected_rows();
|
||||||
@ -146,20 +151,21 @@
|
|||||||
// (torrents that have both "old tag" and "replacement tag" set)
|
// (torrents that have both "old tag" and "replacement tag" set)
|
||||||
$DB->query("SELECT GroupID FROM torrents_tags WHERE TagID=$ReplacementID;");
|
$DB->query("SELECT GroupID FROM torrents_tags WHERE TagID=$ReplacementID;");
|
||||||
if ($DB->record_count() > 0 ) {
|
if ($DB->record_count() > 0 ) {
|
||||||
$Query = "DELETE
|
$Query = "
|
||||||
FROM torrents_tags
|
DELETE FROM torrents_tags
|
||||||
WHERE TagID=$TagID
|
WHERE TagID=$TagID
|
||||||
AND GroupID IN (";
|
AND GroupID IN (";
|
||||||
while (list($GroupID) = $DB->next_record()) {
|
while (list($GroupID) = $DB->next_record()) {
|
||||||
$Query.= $GroupID.',';
|
$Query.= $GroupID.',';
|
||||||
}
|
}
|
||||||
$Query = substr($Query,0,-1).");";
|
$Query = substr($Query, 0, -1) . ');';
|
||||||
$DB->query($Query);
|
$DB->query($Query);
|
||||||
$TotalAffected = $DB->affected_rows();
|
$TotalAffected = $DB->affected_rows();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 6) replace old tag in torrents
|
// 6) replace old tag in torrents
|
||||||
$DB->query("UPDATE torrents_tags
|
$DB->query("
|
||||||
|
UPDATE torrents_tags
|
||||||
SET TagID=$ReplacementID
|
SET TagID=$ReplacementID
|
||||||
WHERE TagID=$TagID;");
|
WHERE TagID=$TagID;");
|
||||||
$UsageChange = $DB->affected_rows();
|
$UsageChange = $DB->affected_rows();
|
||||||
@ -167,20 +173,21 @@
|
|||||||
// 7) remove dupe tags from artists
|
// 7) remove dupe tags from artists
|
||||||
$DB->query("SELECT ArtistID FROM artists_tags WHERE TagID=$ReplacementID;");
|
$DB->query("SELECT ArtistID FROM artists_tags WHERE TagID=$ReplacementID;");
|
||||||
if ($DB->record_count() > 0 ) {
|
if ($DB->record_count() > 0 ) {
|
||||||
$Query = "DELETE
|
$Query = "
|
||||||
FROM artists_tags
|
DELETE FROM artists_tags
|
||||||
WHERE TagID=$TagID
|
WHERE TagID=$TagID
|
||||||
AND ArtistID IN (";
|
AND ArtistID IN (";
|
||||||
while (list($ArtistID) = $DB->next_record()) {
|
while (list($ArtistID) = $DB->next_record()) {
|
||||||
$Query.= $ArtistID.',';
|
$Query.= $ArtistID.',';
|
||||||
}
|
}
|
||||||
$Query = substr($Query,0,-1).");";
|
$Query = substr($Query, 0, -1) . ');';
|
||||||
$DB->query($Query);
|
$DB->query($Query);
|
||||||
$TotalAffected += $DB->affected_rows();
|
$TotalAffected += $DB->affected_rows();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 8) replace old tag in artists
|
// 8) replace old tag in artists
|
||||||
$DB->query("UPDATE artists_tags
|
$DB->query("
|
||||||
|
UPDATE artists_tags
|
||||||
SET TagID=$ReplacementID
|
SET TagID=$ReplacementID
|
||||||
WHERE TagID=$TagID;");
|
WHERE TagID=$TagID;");
|
||||||
$UsageChange += $DB->affected_rows();
|
$UsageChange += $DB->affected_rows();
|
||||||
@ -188,33 +195,35 @@
|
|||||||
// 9) remove dupe tags from requests
|
// 9) remove dupe tags from requests
|
||||||
$DB->query("SELECT RequestID FROM requests_tags WHERE TagID=$ReplacementID;");
|
$DB->query("SELECT RequestID FROM requests_tags WHERE TagID=$ReplacementID;");
|
||||||
if ($DB->record_count() > 0) {
|
if ($DB->record_count() > 0) {
|
||||||
$Query = "DELETE
|
$Query = "
|
||||||
FROM requests_tags
|
DELETE FROM requests_tags
|
||||||
WHERE TagID=$TagID
|
WHERE TagID=$TagID
|
||||||
AND RequestID IN (";
|
AND RequestID IN (";
|
||||||
while (list($RequestID) = $DB->next_record()) {
|
while (list($RequestID) = $DB->next_record()) {
|
||||||
$Query.= $RequestID.',';
|
$Query.= $RequestID.',';
|
||||||
}
|
}
|
||||||
$Query = substr($Query,0,-1).");";
|
$Query = substr($Query, 0, -1) . ');';
|
||||||
$DB->query($Query);
|
$DB->query($Query);
|
||||||
$TotalAffected += $DB->affected_rows();
|
$TotalAffected += $DB->affected_rows();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 10) replace old tag in requests
|
// 10) replace old tag in requests
|
||||||
$DB->query("UPDATE requests_tags
|
$DB->query("
|
||||||
|
UPDATE requests_tags
|
||||||
SET TagID=$ReplacementID
|
SET TagID=$ReplacementID
|
||||||
WHERE TagID=$TagID;");
|
WHERE TagID=$TagID;");
|
||||||
$UsageChange += $DB->affected_rows();
|
$UsageChange += $DB->affected_rows();
|
||||||
$TotalAffected += $UsageChange;
|
$TotalAffected += $UsageChange;
|
||||||
|
|
||||||
// 11) finally, remove old tag completely
|
// 11) finally, remove old tag completely
|
||||||
$DB->query("DELETE
|
$DB->query("
|
||||||
FROM tags
|
DELETE FROM tags
|
||||||
WHERE ID=$TagID
|
WHERE ID=$TagID
|
||||||
LIMIT 1");
|
LIMIT 1");
|
||||||
|
|
||||||
// 12) update usage count for replacement tag
|
// 12) update usage count for replacement tag
|
||||||
$DB->query("UPDATE tags
|
$DB->query("
|
||||||
|
UPDATE tags
|
||||||
SET Uses=Uses+$UsageChange
|
SET Uses=Uses+$UsageChange
|
||||||
WHERE ID=$ReplacementID
|
WHERE ID=$ReplacementID
|
||||||
LIMIT 1");
|
LIMIT 1");
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
<?
|
<?
|
||||||
if (!check_perms('users_mod')
|
if (!check_perms('users_mod')) {
|
||||||
|
|
||||||
) {
|
|
||||||
error(403);
|
error(403);
|
||||||
}
|
}
|
||||||
View::show_header('Staff Tools');
|
View::show_header('Staff Tools');
|
||||||
@ -16,7 +14,6 @@
|
|||||||
<tr><td><a href="tools.php?action=whitelist">Client whitelist</a></td></tr>
|
<tr><td><a href="tools.php?action=whitelist">Client whitelist</a></td></tr>
|
||||||
<? } if (check_perms('admin_manage_ipbans')) { ?>
|
<? } if (check_perms('admin_manage_ipbans')) { ?>
|
||||||
<tr><td><a href="tools.php?action=ip_ban">IP address bans</a></td></tr>
|
<tr><td><a href="tools.php?action=ip_ban">IP address bans</a></td></tr>
|
||||||
|
|
||||||
<? } if (check_perms('admin_login_watch')) { ?>
|
<? } if (check_perms('admin_login_watch')) { ?>
|
||||||
<tr><td><a href="tools.php?action=login_watch">Login watch</a></td></tr>
|
<tr><td><a href="tools.php?action=login_watch">Login watch</a></td></tr>
|
||||||
<? } if (check_perms('admin_manage_forums')) { ?>
|
<? } if (check_perms('admin_manage_forums')) { ?>
|
||||||
@ -27,31 +24,25 @@
|
|||||||
<tr><td><a href="tools.php?action=dnu">"Do Not Upload" list</a></td></tr>
|
<tr><td><a href="tools.php?action=dnu">"Do Not Upload" list</a></td></tr>
|
||||||
<? } if (check_perms('site_recommend_own') || check_perms('site_manage_recommendations')) { ?>
|
<? } if (check_perms('site_recommend_own') || check_perms('site_manage_recommendations')) { ?>
|
||||||
<tr><td><a href="tools.php?action=recommend">Vanity House additions</a></td></tr>
|
<tr><td><a href="tools.php?action=recommend">Vanity House additions</a></td></tr>
|
||||||
|
|
||||||
<? } if (check_perms('users_view_email')) { ?>
|
<? } if (check_perms('users_view_email')) { ?>
|
||||||
<tr><td><a href="tools.php?action=email_blacklist">Email blacklist</a></td></tr>
|
<tr><td><a href="tools.php?action=email_blacklist">Email blacklist</a></td></tr>
|
||||||
<? } if (check_perms('users_mod')) { ?>
|
<? } if (check_perms('users_mod')) { ?>
|
||||||
<tr><td><a href="tools.php?action=tokens">Manage freeleech tokens</a></td></tr>
|
<tr><td><a href="tools.php?action=tokens">Manage freeleech tokens</a></td></tr>
|
||||||
<tr><td><a href="tools.php?action=official_tags">Official tags manager</a></td></tr>
|
<tr><td><a href="tools.php?action=official_tags">Official tags manager</a></td></tr>
|
||||||
<tr><td><a href="tools.php?action=tag_aliases">Tag aliases</a></td></tr>
|
<tr><td><a href="tools.php?action=tag_aliases">Tag aliases</a></td></tr>
|
||||||
|
|
||||||
|
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="permission_container">
|
<div class="permission_container">
|
||||||
<table class="layout">
|
<table class="layout">
|
||||||
<tr class="colhead"><td>Data</td></tr>
|
<tr class="colhead"><td>Data</td></tr>
|
||||||
|
<? if (check_perms('admin_donor_log')) { ?>
|
||||||
<?
|
|
||||||
if (check_perms('admin_donor_log')) { ?>
|
|
||||||
<tr><td><a href="tools.php?action=donation_log">Donation log</a></td></tr>
|
<tr><td><a href="tools.php?action=donation_log">Donation log</a></td></tr>
|
||||||
<tr><td><a href="tools.php?action=bitcoin_balance">Bitcoin donation balance</a></td></tr>
|
<tr><td><a href="tools.php?action=bitcoin_balance">Bitcoin donation balance</a></td></tr>
|
||||||
<? } if (check_perms('users_view_ips') && check_perms('users_view_email')) { ?>
|
<? } if (check_perms('users_view_ips') && check_perms('users_view_email')) { ?>
|
||||||
<tr><td><a href="tools.php?action=registration_log">Registration log</a></td></tr>
|
<tr><td><a href="tools.php?action=registration_log">Registration log</a></td></tr>
|
||||||
<? } if (check_perms('users_view_invites')) { ?>
|
<? } if (check_perms('users_view_invites')) { ?>
|
||||||
<tr><td><a href="tools.php?action=invite_pool">Invite pool</a></td></tr>
|
<tr><td><a href="tools.php?action=invite_pool">Invite pool</a></td></tr>
|
||||||
|
|
||||||
<? } if (check_perms('site_view_flow')) { ?>
|
<? } if (check_perms('site_view_flow')) { ?>
|
||||||
<tr><td><a href="tools.php?action=upscale_pool">Upscale pool</a></td></tr>
|
<tr><td><a href="tools.php?action=upscale_pool">Upscale pool</a></td></tr>
|
||||||
<tr><td><a href="tools.php?action=user_flow">User flow</a></td></tr>
|
<tr><td><a href="tools.php?action=user_flow">User flow</a></td></tr>
|
||||||
@ -62,7 +53,6 @@
|
|||||||
<tr><td><a href="tools.php?action=service_stats">Service stats</a></td></tr>
|
<tr><td><a href="tools.php?action=service_stats">Service stats</a></td></tr>
|
||||||
<? } if (check_perms('admin_manage_permissions')) { ?>
|
<? } if (check_perms('admin_manage_permissions')) { ?>
|
||||||
<tr><td><a href="tools.php?action=special_users">Special users</a></td></tr>
|
<tr><td><a href="tools.php?action=special_users">Special users</a></td></tr>
|
||||||
|
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@ -71,8 +61,7 @@
|
|||||||
<tr class="colhead"><td>Misc</td></tr>
|
<tr class="colhead"><td>Misc</td></tr>
|
||||||
<? if (check_perms('users_mod')) { ?>
|
<? if (check_perms('users_mod')) { ?>
|
||||||
<tr><td><a href="tools.php?action=edit_tags">Batch tag editor</a></td></tr>
|
<tr><td><a href="tools.php?action=edit_tags">Batch tag editor</a></td></tr>
|
||||||
<? }
|
<? } if (check_perms('users_mod')) { ?>
|
||||||
if (check_perms('users_mod')) { ?>
|
|
||||||
<tr><td><a href="tools.php?action=manipulate_tree">Manipulate tree</a></td></tr>
|
<tr><td><a href="tools.php?action=manipulate_tree">Manipulate tree</a></td></tr>
|
||||||
<? }
|
<? }
|
||||||
if (check_perms('admin_update_geoip')) { ?>
|
if (check_perms('admin_update_geoip')) { ?>
|
||||||
@ -83,7 +72,6 @@
|
|||||||
<tr><td><a href="tools.php?action=clear_cache">Clear/view a cache key</a></td></tr>
|
<tr><td><a href="tools.php?action=clear_cache">Clear/view a cache key</a></td></tr>
|
||||||
<? } if (check_perms('users_view_ips')) { ?>
|
<? } if (check_perms('users_view_ips')) { ?>
|
||||||
<tr><td><a href="tools.php?action=dupe_ips">Duplicate IP addresses</a></td></tr>
|
<tr><td><a href="tools.php?action=dupe_ips">Duplicate IP addresses</a></td></tr>
|
||||||
|
|
||||||
<? } if (check_perms('site_debug')) { ?>
|
<? } if (check_perms('site_debug')) { ?>
|
||||||
<tr><td><a href="tools.php?action=sandbox1">Sandbox (1)</a></td></tr>
|
<tr><td><a href="tools.php?action=sandbox1">Sandbox (1)</a></td></tr>
|
||||||
<tr><td><a href="tools.php?action=sandbox2">Sandbox (2)</a></td></tr>
|
<tr><td><a href="tools.php?action=sandbox2">Sandbox (2)</a></td></tr>
|
||||||
@ -93,7 +81,6 @@
|
|||||||
<tr><td><a href="tools.php?action=sandbox6">Sandbox (6)</a></td></tr>
|
<tr><td><a href="tools.php?action=sandbox6">Sandbox (6)</a></td></tr>
|
||||||
<tr><td><a href="tools.php?action=sandbox7">Sandbox (7)</a></td></tr>
|
<tr><td><a href="tools.php?action=sandbox7">Sandbox (7)</a></td></tr>
|
||||||
<tr><td><a href="tools.php?action=sandbox8">Sandbox (8)</a></td></tr>
|
<tr><td><a href="tools.php?action=sandbox8">Sandbox (8)</a></td></tr>
|
||||||
|
|
||||||
<tr><td><a href="schedule.php?auth=<?=$LoggedUser['AuthKey']?>">Schedule</a></td></tr>
|
<tr><td><a href="schedule.php?auth=<?=$LoggedUser['AuthKey']?>">Schedule</a></td></tr>
|
||||||
<? } if (check_perms('admin_clear_cache') || check_perms('users_mod')) { ?>
|
<? } if (check_perms('admin_clear_cache') || check_perms('users_mod')) { ?>
|
||||||
<tr><td><a href="tools.php?action=rerender_gallery">Rerender stylesheet gallery images</a></td></tr>
|
<tr><td><a href="tools.php?action=rerender_gallery">Rerender stylesheet gallery images</a></td></tr>
|
||||||
|
@ -120,7 +120,7 @@
|
|||||||
$DisplayName = Artists::display_artists($Artists, true, true);
|
$DisplayName = Artists::display_artists($Artists, true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$DisplayName .= "<a href='torrents.php?id=$GroupID&torrentid=$TorrentID' title='View Torrent'>$GroupName</a>";
|
$DisplayName .= "<a href=\"torrents.php?id=$GroupID&torrentid=$TorrentID\" title=\"View Torrent\">$GroupName</a>";
|
||||||
|
|
||||||
if ($GroupCategoryID == 1 && $GroupYear > 0) {
|
if ($GroupCategoryID == 1 && $GroupYear > 0) {
|
||||||
$DisplayName.= " [$GroupYear]";
|
$DisplayName.= " [$GroupYear]";
|
||||||
@ -130,36 +130,36 @@
|
|||||||
$ExtraInfo = '';
|
$ExtraInfo = '';
|
||||||
$AddExtra = '';
|
$AddExtra = '';
|
||||||
if ($Format) {
|
if ($Format) {
|
||||||
$ExtraInfo.=$Format;
|
$ExtraInfo.= $Format;
|
||||||
$AddExtra = ' / ';
|
$AddExtra = ' / ';
|
||||||
}
|
}
|
||||||
if ($Encoding) {
|
if ($Encoding) {
|
||||||
$ExtraInfo.=$AddExtra.$Encoding;
|
$ExtraInfo.= $AddExtra.$Encoding;
|
||||||
$AddExtra = ' / ';
|
$AddExtra = ' / ';
|
||||||
}
|
}
|
||||||
//"FLAC / Lossless / Log (100%) / Cue / CD";
|
//"FLAC / Lossless / Log (100%) / Cue / CD";
|
||||||
if ($HasLog) {
|
if ($HasLog) {
|
||||||
$ExtraInfo.=$AddExtra."Log (".$LogScore."%)";
|
$ExtraInfo.= "$AddExtra Log ($LogScore".'%)';
|
||||||
$AddExtra = ' / ';
|
$AddExtra = ' / ';
|
||||||
}
|
}
|
||||||
if ($HasCue) {
|
if ($HasCue) {
|
||||||
$ExtraInfo.=$AddExtra."Cue";
|
$ExtraInfo.= $AddExtra.'Cue';
|
||||||
$AddExtra = ' / ';
|
$AddExtra = ' / ';
|
||||||
}
|
}
|
||||||
if ($Media) {
|
if ($Media) {
|
||||||
$ExtraInfo.=$AddExtra.$Media;
|
$ExtraInfo.= $AddExtra.$Media;
|
||||||
$AddExtra = ' / ';
|
$AddExtra = ' / ';
|
||||||
}
|
}
|
||||||
if ($Scene) {
|
if ($Scene) {
|
||||||
$ExtraInfo.=$AddExtra.'Scene';
|
$ExtraInfo.= $AddExtra.'Scene';
|
||||||
$AddExtra = ' / ';
|
$AddExtra = ' / ';
|
||||||
}
|
}
|
||||||
if ($Year > 0) {
|
if ($Year > 0) {
|
||||||
$ExtraInfo.=$AddExtra.$Year;
|
$ExtraInfo.= $AddExtra.$Year;
|
||||||
$AddExtra = ' ';
|
$AddExtra = ' ';
|
||||||
}
|
}
|
||||||
if ($RemasterTitle) {
|
if ($RemasterTitle) {
|
||||||
$ExtraInfo.=$AddExtra.$RemasterTitle;
|
$ExtraInfo.= $AddExtra.$RemasterTitle;
|
||||||
}
|
}
|
||||||
if ($ExtraInfo != '') {
|
if ($ExtraInfo != '') {
|
||||||
$ExtraInfo = "- [$ExtraInfo]";
|
$ExtraInfo = "- [$ExtraInfo]";
|
||||||
|
@ -11,6 +11,11 @@
|
|||||||
error(0);
|
error(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Delete cached tag used for undos
|
||||||
|
if(isset($_POST['undo'])) {
|
||||||
|
$Cache->delete_value('deleted_tags_'.$GroupID.'_'.$LoggedUser['ID']);
|
||||||
|
}
|
||||||
|
|
||||||
$Tags = explode(',', $_POST['tagname']);
|
$Tags = explode(',', $_POST['tagname']);
|
||||||
foreach ($Tags as $TagName) {
|
foreach ($Tags as $TagName) {
|
||||||
$TagName = Misc::sanitize_tag($TagName);
|
$TagName = Misc::sanitize_tag($TagName);
|
||||||
@ -45,6 +50,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Torrents::update_hash($GroupID); // Delete torrent group cache
|
Torrents::update_hash($GroupID); // Delete torrent group cache
|
||||||
header('Location: '.$_SERVER['HTTP_REFERER']);
|
header('Location: '.$_SERVER['HTTP_REFERER']);
|
||||||
?>
|
?>
|
||||||
|
@ -781,7 +781,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
|||||||
<label for="group_results">Group by release:</label>
|
<label for="group_results">Group by release:</label>
|
||||||
</td>
|
</td>
|
||||||
<td colspan="3" class="ft_group_results">
|
<td colspan="3" class="ft_group_results">
|
||||||
<input type="checkbox" value="1" name="group_results" id="group_results"<?Format::selected('group_results',1,'checked')?> />
|
<input type="checkbox" value="1" name="group_results" id="group_results"<?Format::selected('group_results', 1, 'checked')?> />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@ -801,8 +801,8 @@ function header_link($SortKey,$DefaultWay="desc") {
|
|||||||
$x++;
|
$x++;
|
||||||
?>
|
?>
|
||||||
<td>
|
<td>
|
||||||
<input type="checkbox" name="filter_cat[<?=($CatKey + 1) ?>]" id="cat_<?=($CatKey + 1) ?>" value="1"<? if (isset($_GET['filter_cat'][$CatKey + 1])) { ?> checked="checked" <? } ?>/>
|
<input type="checkbox" name="filter_cat[<?=($CatKey + 1)?>]" id="cat_<?=($CatKey + 1)?>" value="1"<? if (isset($_GET['filter_cat'][$CatKey + 1])) { ?> checked="checked"<? } ?> />
|
||||||
<label for="cat_<?=($CatKey + 1) ?>"><?=$CatName?></label>
|
<label for="cat_<?=($CatKey + 1)?>"><?=$CatName?></label>
|
||||||
</td>
|
</td>
|
||||||
<?
|
<?
|
||||||
}
|
}
|
||||||
@ -834,21 +834,21 @@ function header_link($SortKey,$DefaultWay="desc") {
|
|||||||
}
|
}
|
||||||
if ($x % 7 != 0) { // Padding
|
if ($x % 7 != 0) { // Padding
|
||||||
?>
|
?>
|
||||||
<td colspan="<?=7 - ($x % 7) ?>"> </td>
|
<td colspan="<?=(7 - ($x % 7))?>"> </td>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<table class="layout cat_list" width="100%">
|
<table class="layout cat_list" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="label">
|
<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').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>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<div class="submit ft_submit">
|
<div class="submit ft_submit">
|
||||||
<span style="float: left;"><?=number_format($TorrentCount)?> Results</span>
|
<span style="float: left;"><?=number_format($TorrentCount)?> Results</span>
|
||||||
<input type="submit" value="Filter torrents" />
|
<input type="submit" value="Filter torrents" />
|
||||||
<input type="hidden" name="action" id="ft_type" value="<?=$AdvancedSearch ? 'advanced' : 'basic'?>" />
|
<input type="hidden" name="action" id="ft_type" value="<?=($AdvancedSearch ? 'advanced' : 'basic')?>" />
|
||||||
<input type="hidden" name="searchsubmit" value="1" />
|
<input type="hidden" name="searchsubmit" value="1" />
|
||||||
<input type="button" value="Reset" onclick="location.href='torrents.php<? if (isset($_GET['action']) && $_GET['action'] == 'advanced') { ?>?action=advanced<? } ?>'" />
|
<input type="button" value="Reset" onclick="location.href='torrents.php<? if (isset($_GET['action']) && $_GET['action'] == 'advanced') { ?>?action=advanced<? } ?>'" />
|
||||||
|
|
||||||
|
@ -6,7 +6,15 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
$DB->query("SELECT t.UserID, t.Time, COUNT(x.uid) FROM torrents AS t LEFT JOIN xbt_snatched AS x ON x.fid=t.ID WHERE t.ID=".$TorrentID." GROUP BY t.UserID");
|
$DB->query("
|
||||||
|
SELECT
|
||||||
|
t.UserID,
|
||||||
|
t.Time,
|
||||||
|
COUNT(x.uid)
|
||||||
|
FROM torrents AS t
|
||||||
|
LEFT JOIN xbt_snatched AS x ON x.fid=t.ID
|
||||||
|
WHERE t.ID=$TorrentID
|
||||||
|
GROUP BY t.UserID");
|
||||||
|
|
||||||
if ($DB->record_count() < 1) {
|
if ($DB->record_count() < 1) {
|
||||||
error('Torrent already deleted.');
|
error('Torrent already deleted.');
|
||||||
@ -22,15 +30,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_SESSION['logged_user']['multi_delete']) && $_SESSION['logged_user']['multi_delete'] >= 3 && !check_perms('torrents_delete_fast')) {
|
if (isset($_SESSION['logged_user']['multi_delete']) && $_SESSION['logged_user']['multi_delete'] >= 3 && !check_perms('torrents_delete_fast')) {
|
||||||
error('You have recently deleted 3 torrents, please contact a staff member if you need to delete more.');
|
error('You have recently deleted 3 torrents. Please contact a staff member if you need to delete more.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (time_ago($Time) > 3600 * 24 * 7 && !check_perms('torrents_delete')) { // Should this be torrents_delete or torrents_delete_fast?
|
if (time_ago($Time) > 3600 * 24 * 7 && !check_perms('torrents_delete')) { // Should this be torrents_delete or torrents_delete_fast?
|
||||||
error('You can no longer delete this torrent as it has been uploaded for over a week with no problems. If you now think there is a problem, please report it instead.');
|
error('You can no longer delete this torrent as it has been uploaded for over a week. If you now think there is a problem, please report the torrent instead.');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($Snatches > 4 && !check_perms('torrents_delete')) { // Should this be torrents_delete or torrents_delete_fast?
|
if ($Snatches > 4 && !check_perms('torrents_delete')) { // Should this be torrents_delete or torrents_delete_fast?
|
||||||
error('You can no longer delete this torrent as it has been snatched by 5 or more users. If you believe there is a problem with the torrent please report it instead.');
|
error('You can no longer delete this torrent as it has been snatched by 5 or more users. If you believe there is a problem with this torrent, please report it instead.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -67,6 +75,8 @@
|
|||||||
?>
|
?>
|
||||||
<div id="all_reports" style="width: 80%; margin-left: auto; margin-right: auto;">
|
<div id="all_reports" style="width: 80%; margin-left: auto; margin-right: auto;">
|
||||||
<?
|
<?
|
||||||
|
include(SERVER_ROOT.'/classes/class_reports.php');
|
||||||
|
|
||||||
require(SERVER_ROOT.'/sections/reportsv2/array.php');
|
require(SERVER_ROOT.'/sections/reportsv2/array.php');
|
||||||
require(SERVER_ROOT.'/classes/class_text.php');
|
require(SERVER_ROOT.'/classes/class_text.php');
|
||||||
$Text = NEW TEXT;
|
$Text = NEW TEXT;
|
||||||
@ -123,25 +133,27 @@
|
|||||||
$Type = 'other';
|
$Type = 'other';
|
||||||
$ReportType = $Types['master']['other'];
|
$ReportType = $Types['master']['other'];
|
||||||
}
|
}
|
||||||
|
$RemasterDisplayString = Reports::format_reports_remaster_info($Remastered, $RemasterTitle, $RemasterYear);
|
||||||
|
|
||||||
if ($ArtistID == 0 && empty($ArtistName)) {
|
if ($ArtistID == 0 && empty($ArtistName)) {
|
||||||
$RawName = $GroupName.($Year ? " ($Year)" : '').($Format || $Encoding || $Media ? " [$Format/$Encoding/$Media]" : '').($Remastered ? " <$RemasterTitle - $RemasterYear>" : '').($HasLog ? " ($LogScore %)" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
$RawName = $GroupName.($Year ? " ($Year)" : '').($Format || $Encoding || $Media ? " [$Format/$Encoding/$Media]" : '') . $RemasterDisplayString . ($HasLog ? " ({$LogScore}%)" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||||
$LinkName = "<a href='torrents.php?id=$GroupID'>$GroupName".($Year ? " ($Year)" : "")."</a> <a href='torrents.php?torrentid=$TorrentID'>".($Format || $Encoding || $Media ? " [$Format/$Encoding/$Media]" : "").($Remastered ? " <$RemasterTitle - $RemasterYear>" : "")."</a>".($HasLog ? " <a href='torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID'>(Log: $LogScore %)</a>" : "")." (".number_format($Size/(1024*1024), 2)." MB)";
|
$LinkName = "<a href=\"torrents.php?id=$GroupID\">$GroupName".($Year ? " ($Year)" : '')."</a> <a href=\"torrents.php?torrentid=$TorrentID\">".($Format || $Encoding || $Media ? " [$Format/$Encoding/$Media]" : '') . "$RemasterDisplayString</a>" . ($HasLog ? " <a href=\"torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID\">(Log: {$LogScore}%)</a>" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||||
$BBName = "[url=torrents.php?id=$GroupID]$GroupName".($Year ? " ($Year)" : "")."[/url] [url=torrents.php?torrentid=$TorrentID][$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : "")."[/url] ".($HasLog ? " [url=torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID'](Log: $LogScore %)[/url]" : "")." (".number_format($Size/(1024*1024), 2)." MB)";
|
$BBName = "[url=torrents.php?id=$GroupID]$GroupName".($Year ? " ($Year)" : '')."[/url] [url=torrents.php?torrentid=$TorrentID][$Format/$Encoding/$Media]{$RemasterDisplayString}[/url] " . ($HasLog ? " [url=torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID](Log: {$LogScore}%)[/url]" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||||
} elseif ($ArtistID == 0 && $ArtistName == 'Various Artists') {
|
} elseif ($ArtistID == 0 && $ArtistName == 'Various Artists') {
|
||||||
$RawName = "Various Artists - $GroupName".($Year ? " ($Year)" : "")." [$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : "").($HasLog ? " ($LogScore %)" : "")." (".number_format($Size/(1024*1024), 2)." MB)";
|
$RawName = "Various Artists - $GroupName".($Year ? " ($Year)" : '')." [$Format/$Encoding/$Media]$RemasterDisplayString" . ($HasLog ? " ({$LogScore}%)" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||||
$LinkName = "Various Artists - <a href='torrents.php?id=$GroupID'>$GroupName".($Year ? " ($Year)" : "")."</a> <a href='torrents.php?torrentid=$TorrentID'> [$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : "")."</a> ".($HasLog ? " <a href='torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID'>(Log: $LogScore %)</a>" : "")." (".number_format($Size/(1024*1024), 2)." MB)";
|
$LinkName = "Various Artists - <a href=\"torrents.php?id=$GroupID\">$GroupName".($Year ? " ($Year)" : '')."</a> <a href=\"torrents.php?torrentid=$TorrentID\"> [$Format/$Encoding/$Media]$RemasterDisplayString</a> ".($HasLog ? " <a href=\"torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID\">(Log: {$LogScore}%)</a>" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||||
$BBName = "Various Artists - [url=torrents.php?id=$GroupID]$GroupName".($Year ? " ($Year)" : "")."[/url] [url=torrents.php?torrentid=$TorrentID][$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : "")."[/url] ".($HasLog ? " [url=torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID'](Log: $LogScore %)[/url]" : "")." (".number_format($Size/(1024*1024), 2)." MB)";
|
$BBName = "Various Artists - [url=torrents.php?id=$GroupID]$GroupName".($Year ? " ($Year)" : '')."[/url] [url=torrents.php?torrentid=$TorrentID][$Format/$Encoding/$Media]{$RemasterDisplayString}[/url] ".($HasLog ? " [url=torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID](Log: {$LogScore}%)[/url]" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||||
} else {
|
} else {
|
||||||
$RawName = "$ArtistName - $GroupName".($Year ? " ($Year)" : "")." [$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : "").($HasLog ? " ($LogScore %)" : "")." (".number_format($Size/(1024*1024), 2)." MB)";
|
$RawName = "$ArtistName - $GroupName".($Year ? " ($Year)" : '')." [$Format/$Encoding/$Media]$RemasterDisplayString" . ($HasLog ? " ({$LogScore}%)" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||||
$LinkName = "<a href='artist.php?id=$ArtistID'>$ArtistName</a> - <a href='torrents.php?id=$GroupID'>$GroupName".($Year ? " ($Year)" : "")."</a> <a href='torrents.php?torrentid=$TorrentID'> [$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : "")."</a> ".($HasLog ? " <a href='torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID'>(Log: $LogScore %)</a>" : "")." (".number_format($Size/(1024*1024), 2)." MB)";
|
$LinkName = "<a href=\"artist.php?id=$ArtistID\">$ArtistName</a> - <a href=\"torrents.php?id=$GroupID\">$GroupName".($Year ? " ($Year)" : '')."</a> <a href=\"torrents.php?torrentid=$TorrentID\"> [$Format/$Encoding/$Media]$RemasterDisplayString</a> ".($HasLog ? " <a href=\"torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID\">(Log: {$LogScore}%)</a>" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||||
$BBName = "[url=artist.php?id=$ArtistID]".$ArtistName."[/url] - [url=torrents.php?id=$GroupID]$GroupName".($Year ? " ($Year)" : "")."[/url] [url=torrents.php?torrentid=$TorrentID][$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : "")."[/url] ".($HasLog ? " [url=torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID'](Log: $LogScore %)[/url]" : "")." (".number_format($Size/(1024*1024), 2)." MB)";
|
$BBName = "[url=artist.php?id=$ArtistID]".$ArtistName."[/url] - [url=torrents.php?id=$GroupID]$GroupName".($Year ? " ($Year)" : '')."[/url] [url=torrents.php?torrentid=$TorrentID][$Format/$Encoding/$Media]{$RemasterDisplayString}[/url] " . ($HasLog ? " [url=torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID](Log: {$LogScore}%)[/url]" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div id="report<?=$ReportID?>">
|
<div id="report<?=$ReportID?>">
|
||||||
<form class="create_form" name="report" id="reportform_<?=$ReportID?>" action="reports.php" method="post">
|
<form class="create_form" name="report" id="reportform_<?=$ReportID?>" action="reports.php" method="post">
|
||||||
<?
|
<?
|
||||||
/*
|
/*
|
||||||
* Some of these are for takeresolve, some for the javascript.
|
* Some of these are for takeresolve, some for the JavaScript.
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<div>
|
<div>
|
||||||
@ -169,7 +181,8 @@
|
|||||||
<a href="torrents.php?action=download&id=<?=$TorrentID?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>" class="brackets" title="Download">DL</a>
|
<a href="torrents.php?action=download&id=<?=$TorrentID?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>" class="brackets" title="Download">DL</a>
|
||||||
uploaded by <a href="user.php?id=<?=$UploaderID?>"><?=$UploaderName?></a> <?=time_diff($Time)?>
|
uploaded by <a href="user.php?id=<?=$UploaderID?>"><?=$UploaderName?></a> <?=time_diff($Time)?>
|
||||||
<br />
|
<br />
|
||||||
<? $DB->query("SELECT r.ID
|
<? $DB->query("
|
||||||
|
SELECT r.ID
|
||||||
FROM reportsv2 AS r
|
FROM reportsv2 AS r
|
||||||
LEFT JOIN torrents AS t ON t.ID=r.TorrentID
|
LEFT JOIN torrents AS t ON t.ID=r.TorrentID
|
||||||
WHERE r.Status != 'Resolved'
|
WHERE r.Status != 'Resolved'
|
||||||
@ -182,7 +195,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<? }
|
<? }
|
||||||
|
|
||||||
$DB->query("SELECT t.UserID
|
$DB->query("
|
||||||
|
SELECT t.UserID
|
||||||
FROM reportsv2 AS r
|
FROM reportsv2 AS r
|
||||||
JOIN torrents AS t ON t.ID=r.TorrentID
|
JOIN torrents AS t ON t.ID=r.TorrentID
|
||||||
WHERE r.Status != 'Resolved'
|
WHERE r.Status != 'Resolved'
|
||||||
@ -195,7 +209,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<? }
|
<? }
|
||||||
|
|
||||||
$DB->query("SELECT DISTINCT req.ID,
|
$DB->query("
|
||||||
|
SELECT DISTINCT req.ID,
|
||||||
req.FillerID,
|
req.FillerID,
|
||||||
um.Username,
|
um.Username,
|
||||||
req.TimeFilled
|
req.TimeFilled
|
||||||
@ -232,7 +247,7 @@
|
|||||||
|
|
||||||
foreach ($TypeList as $IType => $Data) {
|
foreach ($TypeList as $IType => $Data) {
|
||||||
?>
|
?>
|
||||||
<option value="<?=$IType?>"<?=(($Type == $IType) ? ' selected="selected"' : '') ?>><?=$Data['title']?></option>
|
<option value="<?=$IType?>"<?=(($Type == $IType) ? ' selected="selected"' : '')?>><?=$Data['title']?></option>
|
||||||
<?
|
<?
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
$DB->query("DELETE FROM tags WHERE ID=".$TagID);
|
$DB->query("DELETE FROM tags WHERE ID=".$TagID);
|
||||||
}
|
}
|
||||||
|
// Cache the deleted tag for 5 minutes
|
||||||
|
$Cache->cache_value('deleted_tags_'.$GroupID.'_'.$LoggedUser['ID'], $TagName, 300);
|
||||||
header('Location: '.$_SERVER['HTTP_REFERER']);
|
header('Location: '.$_SERVER['HTTP_REFERER']);
|
||||||
?>
|
?>
|
||||||
|
@ -311,7 +311,22 @@ function compare($X, $Y) {
|
|||||||
include(SERVER_ROOT.'/sections/torrents/vote.php');
|
include(SERVER_ROOT.'/sections/torrents/vote.php');
|
||||||
?>
|
?>
|
||||||
<div class="box box_tags">
|
<div class="box box_tags">
|
||||||
<div class="head"><strong>Tags</strong></div>
|
<div class="head">
|
||||||
|
<strong>Tags</strong>
|
||||||
|
<?
|
||||||
|
$DeletedTag = $Cache->get_value('deleted_tags_'.$GroupID.'_'.$LoggedUser['ID']);
|
||||||
|
if(!empty($DeletedTag)) { ?>
|
||||||
|
<form style="display: none;" id="undo_tag_delete_form" name="tags" action="torrents.php" method="post">
|
||||||
|
<input type="hidden" name="action" value="add_tag" />
|
||||||
|
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||||
|
<input type="hidden" name="groupid" value="<?=$GroupID?>" />
|
||||||
|
<input type="hidden" name="tagname" value="<?=$DeletedTag?>" />
|
||||||
|
<input type="hidden" name="undo" value="true" />
|
||||||
|
</form>
|
||||||
|
<a class="brackets" href="#" onclick="$('#undo_tag_delete_form').raw().submit(); return false;";>Undo Delete</a>
|
||||||
|
|
||||||
|
<? } ?>
|
||||||
|
</div>
|
||||||
<?
|
<?
|
||||||
if (count($Tags) > 0) {
|
if (count($Tags) > 0) {
|
||||||
?>
|
?>
|
||||||
@ -443,7 +458,7 @@ function filelist($Str) {
|
|||||||
//There was a type but it wasn't an option!
|
//There was a type but it wasn't an option!
|
||||||
$ReportType = $Types['master']['other'];
|
$ReportType = $Types['master']['other'];
|
||||||
}
|
}
|
||||||
$ReportInfo .= "<tr><td>".(check_perms('admin_reports') ? "<a href='user.php?id=$ReporterID'>$ReporterName</a> <a href='reportsv2.php?view=report&id=$ReportID'>reported it</a> " : "Someone reported it ").time_diff($ReportedTime,2,true,true)." for the reason '".$ReportType['title']."':";
|
$ReportInfo .= "<tr><td>".(check_perms('admin_reports') ? "<a href=\"user.php?id=$ReporterID\">$ReporterName</a> <a href=\"reportsv2.php?view=report&id=$ReportID\">reported it</a> " : 'Someone reported it ') . time_diff($ReportedTime, 2, true, true) . ' for the reason "' . $ReportType['title'] . '":';
|
||||||
$ReportInfo .= "<blockquote>".$Text->full_format($ReportReason)."</blockquote></td></tr>";
|
$ReportInfo .= "<blockquote>".$Text->full_format($ReportReason)."</blockquote></td></tr>";
|
||||||
}
|
}
|
||||||
$ReportInfo .= "</table>";
|
$ReportInfo .= "</table>";
|
||||||
@ -468,7 +483,7 @@ function filelist($Str) {
|
|||||||
if ($Spaces = strspn($Name, ' ')) {
|
if ($Spaces = strspn($Name, ' ')) {
|
||||||
$Name = str_replace(' ', ' ', substr($Name, 0, $Spaces)) . substr($Name, $Spaces);
|
$Name = str_replace(' ', ' ', substr($Name, 0, $Spaces)) . substr($Name, $Spaces);
|
||||||
}
|
}
|
||||||
$FileSize = substr($File, $NameEnd+3, -3);
|
$FileSize = substr($File, $NameEnd + 3, -3);
|
||||||
$FileTable .= sprintf("\n<tr><td>%s</td><td>%s</td></tr>",
|
$FileTable .= sprintf("\n<tr><td>%s</td><td>%s</td></tr>",
|
||||||
$Name, Format::get_size($FileSize));
|
$Name, Format::get_size($FileSize));
|
||||||
}
|
}
|
||||||
@ -483,8 +498,8 @@ function filelist($Str) {
|
|||||||
$FileTable .= '
|
$FileTable .= '
|
||||||
</table>';
|
</table>';
|
||||||
|
|
||||||
$ExtraInfo=''; // String that contains information on the torrent (e.g. format and encoding)
|
$ExtraInfo = ''; // String that contains information on the torrent (e.g. format and encoding)
|
||||||
$AddExtra=''; // Separator between torrent properties
|
$AddExtra = ''; // Separator between torrent properties
|
||||||
|
|
||||||
$TorrentUploader = $Username; // Save this for "Uploaded by:" below
|
$TorrentUploader = $Username; // Save this for "Uploaded by:" below
|
||||||
|
|
||||||
@ -533,9 +548,9 @@ function filelist($Str) {
|
|||||||
$LastMedia = $Media;
|
$LastMedia = $Media;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr class="torrent_row releases_<?=$ReleaseType?> groupid_<?=$GroupID?> edition_<?=$EditionID?> group_torrent<?=$IsSnatched ? ' snatched_torrent' : ''?>" style="font-weight: normal;" id="torrent<?=$TorrentID?>">
|
<tr class="torrent_row releases_<?=$ReleaseType?> groupid_<?=$GroupID?> edition_<?=$EditionID?> group_torrent<?=($IsSnatched ? ' snatched_torrent' : '')?>" style="font-weight: normal;" id="torrent<?=$TorrentID?>">
|
||||||
<td>
|
<td>
|
||||||
<span>[ <a href="torrents.php?action=download&id=<?=$TorrentID ?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download"><?=$HasFile ? 'DL' : 'Missing'?></a>
|
<span>[ <a href="torrents.php?action=download&id=<?=$TorrentID ?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>" title="Download"><?=($HasFile ? 'DL' : 'Missing')?></a>
|
||||||
<? if (Torrents::can_use_token($Torrent)) { ?>
|
<? if (Torrents::can_use_token($Torrent)) { ?>
|
||||||
| <a href="torrents.php?action=download&id=<?=$TorrentID ?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>&usetoken=1" title="Use a FL Token" onclick="return confirm('Are you sure you want to use a freeleech token here?');">FL</a>
|
| <a href="torrents.php?action=download&id=<?=$TorrentID ?>&authkey=<?=$LoggedUser['AuthKey']?>&torrent_pass=<?=$LoggedUser['torrent_pass']?>&usetoken=1" title="Use a FL Token" onclick="return confirm('Are you sure you want to use a freeleech token here?');">FL</a>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
|
@ -16,7 +16,8 @@
|
|||||||
|
|
||||||
$TorrentID = $_GET['id'];
|
$TorrentID = $_GET['id'];
|
||||||
|
|
||||||
$DB->query("SELECT
|
$DB->query("
|
||||||
|
SELECT
|
||||||
t.Media,
|
t.Media,
|
||||||
t.Format,
|
t.Format,
|
||||||
t.Encoding AS Bitrate,
|
t.Encoding AS Bitrate,
|
||||||
@ -64,7 +65,7 @@
|
|||||||
error(404);
|
error(404);
|
||||||
}
|
}
|
||||||
|
|
||||||
$UploadForm = $Categories[$Properties['CategoryID']-1];
|
$UploadForm = $Categories[$Properties['CategoryID'] - 1];
|
||||||
|
|
||||||
if (($LoggedUser['ID'] != $Properties['UserID'] && !check_perms('torrents_edit')) || $LoggedUser['DisableWiki']) {
|
if (($LoggedUser['ID'] != $Properties['UserID'] && !check_perms('torrents_edit')) || $LoggedUser['DisableWiki']) {
|
||||||
error(403);
|
error(403);
|
||||||
@ -94,6 +95,7 @@
|
|||||||
case 'E-Learning Videos':
|
case 'E-Learning Videos':
|
||||||
$TorrentForm->simple_form($Properties['CategoryID']);
|
$TorrentForm->simple_form($Properties['CategoryID']);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$TorrentForm->music_form('');
|
$TorrentForm->music_form('');
|
||||||
}
|
}
|
||||||
@ -105,7 +107,9 @@
|
|||||||
<?
|
<?
|
||||||
if ($Properties['CategoryID'] == 1) {
|
if ($Properties['CategoryID'] == 1) {
|
||||||
?>
|
?>
|
||||||
|
<div class="header">
|
||||||
<h2>Change group</h2>
|
<h2>Change group</h2>
|
||||||
|
</div>
|
||||||
<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="editgroupid" />
|
<input type="hidden" name="action" value="editgroupid" />
|
||||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||||
@ -175,7 +179,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<select id="newcategoryid" name="newcategoryid" onchange="ChangeCategory(this.value);">
|
<select id="newcategoryid" name="newcategoryid" onchange="ChangeCategory(this.value);">
|
||||||
<? foreach ($Categories as $CatID => $CatName) { ?>
|
<? foreach ($Categories as $CatID => $CatName) { ?>
|
||||||
<option value="<?=$CatID+1?>"<?Format::selected('CategoryID',$CatID+1,'selected',$Properties)?>><?=$CatName?></option>
|
<option value="<?=($CatID + 1)?>"<?Format::selected('CategoryID', $CatID + 1, 'selected', $Properties)?>><?=($CatName)?></option>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
@ -184,7 +188,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<select name="releasetype">
|
<select name="releasetype">
|
||||||
<? foreach ($ReleaseTypes as $RTID => $ReleaseType) { ?>
|
<? foreach ($ReleaseTypes as $RTID => $ReleaseType) { ?>
|
||||||
<option value="<?=$RTID?>"><?=$ReleaseType?></option>
|
<option value="<?=($RTID)?>"><?=($ReleaseType)?></option>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
|
@ -223,12 +223,10 @@ function header_link($SortKey, $DefaultWay = "desc") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$MatchingArtistsText = !empty($MatchingArtists)
|
$MatchingArtistsText = (!empty($MatchingArtists) ? 'Caught by filter for '.implode(', ', $MatchingArtists) : '');
|
||||||
? 'Caught by filter for '.implode(', ', $MatchingArtists)
|
|
||||||
: '';
|
|
||||||
$DisplayName = Artists::display_artists($GroupInfo['ExtendedArtists'], true, true);
|
$DisplayName = Artists::display_artists($GroupInfo['ExtendedArtists'], true, true);
|
||||||
}
|
}
|
||||||
$DisplayName .= "<a href='torrents.php?id=$GroupID&torrentid=$TorrentID#torrent$TorrentID' title='View Torrent' dir='ltr'>".$GroupInfo['Name']."</a>";
|
$DisplayName .= "<a href=\"torrents.php?id=$GroupID&torrentid=$TorrentID#torrent$TorrentID\" title=\"View Torrent\" dir=\"ltr\">" . $GroupInfo['Name'] . '</a>';
|
||||||
|
|
||||||
$GroupCategoryID = $GroupInfo['CategoryID'];
|
$GroupCategoryID = $GroupInfo['CategoryID'];
|
||||||
if ($GroupCategoryID == 1) {
|
if ($GroupCategoryID == 1) {
|
||||||
@ -236,7 +234,7 @@ function header_link($SortKey, $DefaultWay = "desc") {
|
|||||||
$DisplayName .= " [$GroupInfo[Year]]";
|
$DisplayName .= " [$GroupInfo[Year]]";
|
||||||
}
|
}
|
||||||
if ($GroupInfo['ReleaseType'] > 0) {
|
if ($GroupInfo['ReleaseType'] > 0) {
|
||||||
$DisplayName.= " [".$ReleaseTypes[$GroupInfo['ReleaseType']]."]";
|
$DisplayName.= ' ['.$ReleaseTypes[$GroupInfo['ReleaseType']].']';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -246,12 +244,12 @@ function header_link($SortKey, $DefaultWay = "desc") {
|
|||||||
$TorrentTags = new Tags($GroupInfo['TagList']);
|
$TorrentTags = new Tags($GroupInfo['TagList']);
|
||||||
|
|
||||||
if ($GroupInfo['TagList'] == '')
|
if ($GroupInfo['TagList'] == '')
|
||||||
$TorrentTags->set_primary($Categories[$GroupCategoryID-1]);
|
$TorrentTags->set_primary($Categories[$GroupCategoryID - 1]);
|
||||||
|
|
||||||
// print row
|
// print row
|
||||||
?>
|
?>
|
||||||
<tr class="torrent torrent_row<?=($TorrentInfo['IsSnatched'] ? ' snatched_torrent' : '') . ($GroupInfo['Flags']['IsSnatched'] ? ' snatched_group' : '')?>" id="torrent<?=$TorrentID?>"<?=$MatchingArtistsText ? 'title="'.display_str($MatchingArtistsText).'"' : ''?>>
|
<tr class="torrent torrent_row<?=($TorrentInfo['IsSnatched'] ? ' snatched_torrent' : '') . ($GroupInfo['Flags']['IsSnatched'] ? ' snatched_group' : '')?>" id="torrent<?=$TorrentID?>"<?=($MatchingArtistsText ? 'title="'.display_str($MatchingArtistsText).'"' : '')?>>
|
||||||
<td style="text-align: center"><input type="checkbox" class="notify_box notify_box_<?=$FilterID?>" value="<?=$TorrentID?>" id="clear_<?=$TorrentID?>" /></td>
|
<td style="text-align: center;"><input type="checkbox" class="notify_box notify_box_<?=$FilterID?>" value="<?=$TorrentID?>" id="clear_<?=$TorrentID?>" /></td>
|
||||||
<td class="center cats_col"><div title="<?=$TorrentTags->title()?>"class="<?=Format::css_category($GroupCategoryID)?> <?=$TorrentTags->css_name()?>"></div></td>
|
<td class="center cats_col"><div title="<?=$TorrentTags->title()?>"class="<?=Format::css_category($GroupCategoryID)?> <?=$TorrentTags->css_name()?>"></div></td>
|
||||||
<td class="big_info">
|
<td class="big_info">
|
||||||
<? if ($LoggedUser['CoverArt']) : ?>
|
<? if ($LoggedUser['CoverArt']) : ?>
|
||||||
@ -293,9 +291,8 @@ function header_link($SortKey, $DefaultWay = "desc") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
if ($Pages) { ?>
|
||||||
<div class="linkbox">
|
<div class="linkbox"><?=$Pages?></div>
|
||||||
<?=$Pages?>
|
<? } ?>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<? View::show_footer(); ?>
|
<? View::show_footer(); ?>
|
||||||
|
@ -52,12 +52,10 @@
|
|||||||
<div class="header">
|
<div class="header">
|
||||||
<h3>Search results</h3>
|
<h3>Search results</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="linkbox">
|
<? $Pages = Format::get_pages($Page, $NumResults, USERS_PER_PAGE, 9);
|
||||||
<?
|
if ($Pages) { ?>
|
||||||
$Pages = Format::get_pages($Page, $NumResults, USERS_PER_PAGE, 9);
|
<div class="linkbox pager"><?=($Pages)?></div>
|
||||||
echo $Pages;
|
<? } ?>
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
<form class="search_form" name="users" action="user.php" method="get">
|
<form class="search_form" name="users" action="user.php" method="get">
|
||||||
<input type="hidden" name="action" value="search" />
|
<input type="hidden" name="action" value="search" />
|
||||||
<table class="layout" width="100%">
|
<table class="layout" width="100%">
|
||||||
|
@ -764,11 +764,11 @@ function check_paranoia_here($Setting) {
|
|||||||
if ($CategoryName == 'Music') {
|
if ($CategoryName == 'Music') {
|
||||||
$ArtistForm = Requests::get_artists($RequestID);
|
$ArtistForm = Requests::get_artists($RequestID);
|
||||||
$ArtistLink = Artists::display_artists($ArtistForm, true, true);
|
$ArtistLink = Artists::display_artists($ArtistForm, true, true);
|
||||||
$FullName = $ArtistLink."<a href=\"requests.php?action=view&id=".$RequestID."\">$Title [$Year]</a>";
|
$FullName = $ArtistLink."<a href=\"requests.php?action=view&id=$RequestID\">$Title [$Year]</a>";
|
||||||
} elseif ($CategoryName == 'Audiobooks' || $CategoryName == 'Comedy') {
|
} elseif ($CategoryName == 'Audiobooks' || $CategoryName == 'Comedy') {
|
||||||
$FullName = "<a href=\"requests.php?action=view&id=".$RequestID."\">$Title [$Year]</a>";
|
$FullName = "<a href=\"requests.php?action=view&id=$RequestID\">$Title [$Year]</a>";
|
||||||
} else {
|
} else {
|
||||||
$FullName ="<a href=\"requests.php?action=view&id=".$RequestID."\">$Title</a>";
|
$FullName ="<a href=\"requests.php?action=view&id=$RequestID\">$Title</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$Row = (empty($Row) || $Row == 'a') ? 'b' : 'a';
|
$Row = (empty($Row) || $Row == 'a') ? 'b' : 'a';
|
||||||
@ -781,11 +781,11 @@ function check_paranoia_here($Setting) {
|
|||||||
$Tags = $Request['Tags'];
|
$Tags = $Request['Tags'];
|
||||||
$TagList = array();
|
$TagList = array();
|
||||||
foreach ($Tags as $TagID => $TagName) {
|
foreach ($Tags as $TagID => $TagName) {
|
||||||
$TagList[] = "<a href='requests.php?tags=".$TagName."'>".display_str($TagName)."</a>";
|
$TagList[] = "<a href=\"requests.php?tags=$TagName\">".display_str($TagName).'</a>';
|
||||||
}
|
}
|
||||||
$TagList = implode(', ', $TagList);
|
$TagList = implode(', ', $TagList);
|
||||||
?>
|
?>
|
||||||
<?=$TagList ?>
|
<?=($TagList)?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -140,15 +140,16 @@ function UnBan(ip, id, elemID) {
|
|||||||
<div class="thin">
|
<div class="thin">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<h2>IP address history for <a href="/user.php?id=<?=$UserID?>"><?=$Username?></a></h2>
|
<h2>IP address history for <a href="/user.php?id=<?=$UserID?>"><?=$Username?></a></h2>
|
||||||
</div>
|
|
||||||
<div class="linkbox">
|
<div class="linkbox">
|
||||||
<? if ($UsersOnly) { ?>
|
<? if ($UsersOnly) { ?>
|
||||||
<a href="userhistory.php?action=ips&userid=<?=$UserID?>" class="brackets">View all IP addresses</a>
|
<a href="userhistory.php?action=ips&userid=<?=$UserID?>" class="brackets">View all IP addresses</a>
|
||||||
<? } else { ?>
|
<? } else { ?>
|
||||||
<a href="userhistory.php?action=ips&userid=<?=$UserID?>&usersonly=1" class="brackets">View IP addresses with users</a>
|
<a href="userhistory.php?action=ips&userid=<?=$UserID?>&usersonly=1" class="brackets">View IP addresses with users</a>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
<br />
|
</div>
|
||||||
<?=$Pages?>
|
<? if ($Pages) { ?>
|
||||||
|
<div class="linkbox pager"><?=$Pages?></div>
|
||||||
|
<? } ?>
|
||||||
</div>
|
</div>
|
||||||
<table>
|
<table>
|
||||||
<tr class="colhead">
|
<tr class="colhead">
|
||||||
|
@ -317,8 +317,4 @@
|
|||||||
</div>
|
</div>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</div>
|
</div>
|
||||||
<?
|
<? View::show_footer(); ?>
|
||||||
|
|
||||||
View::show_footer();
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
@ -15,9 +15,9 @@
|
|||||||
<div class="thin">
|
<div class="thin">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<h2><a href="wiki.php?action=article&id=<?=$ArticleID?>"><?=$Title?></a> Aliases</h2>
|
<h2><a href="wiki.php?action=article&id=<?=$ArticleID?>"><?=$Title?></a> Aliases</h2>
|
||||||
<div class="linkbox">
|
<p>
|
||||||
Aliases are exact search strings or names that can be used to link to an article. [[Alias]]
|
Aliases are exact search strings or names that can be used to link to an article. [[Alias]]
|
||||||
</div>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<form class="add_form" name="aliases" action="wiki.php" method="get">
|
<form class="add_form" name="aliases" action="wiki.php" method="get">
|
||||||
<input type="hidden" name="action" id="action" value="compare" />
|
<input type="hidden" name="action" id="action" value="compare" />
|
||||||
|
@ -111,12 +111,10 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div class="linkbox">
|
<? $Pages = Format::get_pages($Page, $NumResults, ARTICLES_PER_PAGE);
|
||||||
<?
|
if ($Pages) { ?>
|
||||||
$Pages = Format::get_pages($Page, $NumResults, ARTICLES_PER_PAGE);
|
<div class="linkbox pager"><?=($Pages)?></div>
|
||||||
echo $Pages;
|
<? } ?>
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
<table width="100%">
|
<table width="100%">
|
||||||
<tr class="colhead">
|
<tr class="colhead">
|
||||||
<td>Article</td>
|
<td>Article</td>
|
||||||
|
@ -117,9 +117,9 @@ var ajax = {
|
|||||||
//Bookmarks
|
//Bookmarks
|
||||||
function Bookmark(type, id, newName) {
|
function Bookmark(type, id, newName) {
|
||||||
if (window.location.pathname.indexOf('top10.php') != -1) {
|
if (window.location.pathname.indexOf('top10.php') != -1) {
|
||||||
var oldName = $('.bookmarklink_' + type + '_' + id).raw().innerHTML;
|
var oldName = $('#bookmarklink_' + type + '_' + id).raw().innerHTML;
|
||||||
ajax.get("bookmarks.php?action=add&type=" + type + "&auth=" + authkey + "&id=" + id, function() {
|
ajax.get("bookmarks.php?action=add&type=" + type + "&auth=" + authkey + "&id=" + id, function() {
|
||||||
var bookmarklinks = $('.bookmarklink_' + type + '_' + id).objects;
|
var bookmarklinks = $('#bookmarklink_' + type + '_' + id).objects;
|
||||||
for (var i = 0; i < bookmarklinks.length; i++) {
|
for (var i = 0; i < bookmarklinks.length; i++) {
|
||||||
$(bookmarklinks[i].parentNode.parentNode.parentNode).add_class('bookmarked');
|
$(bookmarklinks[i].parentNode.parentNode.parentNode).add_class('bookmarked');
|
||||||
bookmarklinks[i].onclick = function() { Unbookmark(type, id, oldName); return false; };
|
bookmarklinks[i].onclick = function() { Unbookmark(type, id, oldName); return false; };
|
||||||
@ -146,9 +146,9 @@ function Unbookmark(type, id, newName) {
|
|||||||
$('.bookmark_' + id).remove();
|
$('.bookmark_' + id).remove();
|
||||||
});
|
});
|
||||||
} else if (window.location.pathname.indexOf('top10.php') != -1) {
|
} else if (window.location.pathname.indexOf('top10.php') != -1) {
|
||||||
var oldName = $('.bookmarklink_' + type + '_' + id).raw().innerHTML;
|
var oldName = $('#bookmarklink_' + type + '_' + id).raw().innerHTML;
|
||||||
ajax.get("bookmarks.php?action=remove&type=" + type + "&auth=" + authkey + "&id=" + id, function() {
|
ajax.get("bookmarks.php?action=remove&type=" + type + "&auth=" + authkey + "&id=" + id, function() {
|
||||||
var bookmarklinks = $('.bookmarklink_' + type + '_' + id).objects;
|
var bookmarklinks = $('#bookmarklink_' + type + '_' + id).objects;
|
||||||
for (var i = 0; i < bookmarklinks.length; i++) {
|
for (var i = 0; i < bookmarklinks.length; i++) {
|
||||||
$(bookmarklinks[i].parentNode.parentNode.parentNode).remove_class('bookmarked');
|
$(bookmarklinks[i].parentNode.parentNode.parentNode).remove_class('bookmarked');
|
||||||
bookmarklinks[i].onclick = function() { Bookmark(type, id, oldName); return false; };
|
bookmarklinks[i].onclick = function() { Bookmark(type, id, oldName); return false; };
|
||||||
|
32
static/functions/form_validate.js
Normal file
32
static/functions/form_validate.js
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
(function ($) {
|
||||||
|
$(document).ready(function() {
|
||||||
|
var parts = window.location.pathname.split('/');
|
||||||
|
var page = parts[parts.length - 1].split(".")[0];
|
||||||
|
var splitted = window.location.search.substr(1).split("&");
|
||||||
|
var query = {};
|
||||||
|
for (var i = 0; i < splitted.length; i++) {
|
||||||
|
var q = splitted[i].split("=");
|
||||||
|
query[q[0]] = q[1];
|
||||||
|
};
|
||||||
|
|
||||||
|
switch(page) {
|
||||||
|
case "forums":
|
||||||
|
if(query['action'] == "new") {
|
||||||
|
$("#newthreadform").validate();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "reports":
|
||||||
|
if(query['action'] == "report") {
|
||||||
|
$("#report_form").validate();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "inbox":
|
||||||
|
if(query['action'] == "viewconv" || query['action'] == "compose") {
|
||||||
|
$("#messageform").validate();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} (jQuery));
|
11
static/functions/forum_search.js
Normal file
11
static/functions/forum_search.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
(function ($) {
|
||||||
|
$(document).ready(function() {
|
||||||
|
$(".forum_category").click(function(e) {
|
||||||
|
var id = this.id;
|
||||||
|
var isChecked = $(this).text() != "Check all";
|
||||||
|
isChecked ? $(this).text("Check all") : $(this).text("Uncheck all");
|
||||||
|
$("input[data-category='" + id + "']").attr("checked", !isChecked);
|
||||||
|
e.preventDefault();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}(jQuery));
|
1230
static/functions/jquery.validate.js
vendored
Normal file
1230
static/functions/jquery.validate.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user