mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-18 12:11:36 +00:00
Empty commit
This commit is contained in:
parent
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
|
||||
* Tags::format_top();
|
||||
* ?></pre>
|
||||
* eg:
|
||||
* e.g.:
|
||||
* pop (2)
|
||||
* rock (2)
|
||||
* hip.hop (1)
|
||||
@ -24,8 +24,7 @@
|
||||
* 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.
|
||||
*/
|
||||
class Tags
|
||||
{
|
||||
class Tags {
|
||||
/**
|
||||
* Collects all tags processed by the Tags Class
|
||||
* @static
|
||||
@ -124,12 +123,16 @@ public static function sorted() {
|
||||
/**
|
||||
* Formats tags
|
||||
* @param string $Link Link to a taglist page
|
||||
* @param string $ArtistName Restrict tag search by this artist
|
||||
* @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) {
|
||||
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);
|
||||
@ -139,13 +142,17 @@ public function format($Link = 'torrents.php?taglist=') {
|
||||
* Format a list of top tags
|
||||
* @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)) { ?>
|
||||
<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) { ?>
|
||||
<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>
|
||||
<? if (!$this->NewTorrent && check_perms('users_mod')) { ?>
|
||||
<tr>
|
||||
<td class="label">Log/Cue:</td>
|
||||
<td class="label">Log/cue:</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_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',
|
||||
'palm' => 'Palm',
|
||||
'mot-razr' => 'Motorola Razr',
|
||||
'tablet PC' => 'Windows RT',
|
||||
'ARM; Trident' => 'Windows RT',
|
||||
//Windows
|
||||
'Windows NT 6.2' => 'Windows 8',
|
||||
'Windows 8' => 'Windows 8',
|
||||
'Windows NT 6.1' => 'Windows 7',
|
||||
'Windows 7' => 'Windows 7',
|
||||
'Windows NT 6.0' => 'Windows Vista',
|
||||
@ -110,14 +114,12 @@ public function operating_system(&$UserAgentString) {
|
||||
if (empty($UserAgentString)) {
|
||||
return 'Hidden';
|
||||
}
|
||||
$Return = 'Unknown';
|
||||
foreach ($this->OperatingSystems as $String => $OperatingSystem) {
|
||||
if (stripos($UserAgentString, $String) !== false) {
|
||||
$Return = $OperatingSystem;
|
||||
break;
|
||||
return $OperatingSystem;
|
||||
}
|
||||
}
|
||||
return $Return;
|
||||
return 'Unknown';
|
||||
}
|
||||
|
||||
public function mobile(&$UserAgentString) {
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?
|
||||
class View
|
||||
{
|
||||
class View {
|
||||
/**
|
||||
* @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'
|
||||
* 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;
|
||||
|
||||
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:
|
||||
* ['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;
|
||||
if (!is_array($LoggedUser)) { require(SERVER_ROOT.'/design/publicfooter.php'); }
|
||||
else { require(SERVER_ROOT.'/design/privatefooter.php'); }
|
||||
if (!is_array($LoggedUser)) {
|
||||
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 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.
|
||||
$ClassName = '';
|
||||
if (isset($LoadedTemplates[$TemplateName])) {
|
||||
@ -114,8 +113,7 @@ public static function render_template ($TemplateName, $Args)
|
||||
* echo $SavedTemplate; // Output the buffer
|
||||
* </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;
|
||||
if (file_exists($Template)) {
|
||||
extract($Variables);
|
||||
|
@ -44,7 +44,8 @@ function revision_history() {
|
||||
global $DB;
|
||||
|
||||
$BaseURL = $this->BaseURL;
|
||||
$DB->query("SELECT
|
||||
$DB->query("
|
||||
SELECT
|
||||
RevisionID,
|
||||
Summary,
|
||||
Time,
|
||||
@ -63,11 +64,11 @@ function revision_history() {
|
||||
<? //-----------------------------------------
|
||||
$Row = 'a';
|
||||
while (list($RevisionID, $Summary, $Time, $UserID, $Username) = $DB->next_record()) {
|
||||
$Row = ($Row == 'a') ? 'b' : 'a';
|
||||
$Row = (($Row == 'a') ? 'b' : 'a');
|
||||
//------------------------------------------------------ ?>
|
||||
<tr class="row<?=$Row?>">
|
||||
<td>
|
||||
<?= "<a href='$BaseURL&revisionid=$RevisionID'>#$RevisionID</a>" ?>
|
||||
<?= "<a href=\"$BaseURL&revisionid=$RevisionID\">#$RevisionID</a>" ?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$Time?>
|
||||
|
@ -23,8 +23,7 @@
|
||||
* Globals are required as this template is included within a
|
||||
* function scope.
|
||||
*/
|
||||
global $LoggedUser, $HeavyInfo, $UserSubscriptions, $ThreadInfo,
|
||||
$ForumsDoublePost;
|
||||
global $LoggedUser, $HeavyInfo, $UserSubscriptions, $ThreadInfo, $ForumsDoublePost;
|
||||
|
||||
if ($LoggedUser['DisablePosting']) {
|
||||
return;
|
||||
@ -68,8 +67,8 @@
|
||||
<col class="col_post_body" />
|
||||
</colgroup>
|
||||
<tr class="colhead_dark">
|
||||
<td colspan="<?=Users::has_avatars_enabled() ? 2 : 1?>">
|
||||
<div style="float: left;"><a href='#quickreplypreview'>#XXXXXX</a>
|
||||
<td colspan="<?=(Users::has_avatars_enabled() ? 2 : 1)?>">
|
||||
<div style="float: left;"><a href="#quickreplypreview">#XXXXXX</a>
|
||||
by <strong><?=Users::format_username($LoggedUser['ID'], true, true, true, true)?></strong> Just now
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
|
@ -27,8 +27,8 @@
|
||||
json_die("failure");
|
||||
}
|
||||
|
||||
list($RequestID, $RequestorID, $RequestorName, $TimeAdded, $LastVote, $CategoryID, $Title, $Year, $Image, $Description, $CatalogueNumber, $ReleaseType,
|
||||
$BitrateList, $FormatList, $MediaList, $LogCue, $FillerID, $FillerName, $TorrentID, $TimeFilled) = $Request;
|
||||
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;
|
||||
|
||||
//Convenience variables
|
||||
$IsFilled = !empty($TorrentID);
|
||||
@ -46,35 +46,11 @@
|
||||
$ArtistName = Artists::display_artists($ArtistForm, false, 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)) {
|
||||
$ReleaseName = 'Unknown';
|
||||
} else {
|
||||
$ReleaseName = $ReleaseTypes[$ReleaseType];
|
||||
}
|
||||
|
||||
} elseif ($CategoryName == 'Audiobooks' || $CategoryName == 'Comedy') {
|
||||
$FullName = $Title." [$Year]";
|
||||
$DisplayLink = $Title." [$Year]";
|
||||
} else {
|
||||
$FullName = $Title;
|
||||
$DisplayLink = $Title;
|
||||
}
|
||||
|
||||
//Votes time
|
||||
@ -118,19 +94,19 @@
|
||||
|
||||
$Results = $Cache->get_value('request_comments_'.$RequestID);
|
||||
if ($Results === false) {
|
||||
$DB->query("SELECT
|
||||
COUNT(c.ID)
|
||||
$DB->query("
|
||||
SELECT COUNT(c.ID)
|
||||
FROM requests_comments as c
|
||||
WHERE c.RequestID = '$RequestID'");
|
||||
list($Results) = $DB->next_record();
|
||||
$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);
|
||||
$CatalogueLimit=$CatalogueID*THREAD_CATALOGUE . ', ' . THREAD_CATALOGUE;
|
||||
$CatalogueLimit = $CatalogueID * THREAD_CATALOGUE . ', ' . THREAD_CATALOGUE;
|
||||
|
||||
//---------- 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
|
||||
$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();
|
||||
foreach ($Thread as $Key => $Post) {
|
||||
@ -209,10 +185,10 @@
|
||||
'catalogueNumber' => $CatalogueNumber,
|
||||
'releaseType' => (int) $ReleaseType,
|
||||
'releaseName' => $ReleaseName,
|
||||
'bitrateList' => $BitrateList,
|
||||
'formatList' => $FormatList,
|
||||
'mediaList' => $MediaList,
|
||||
'logCue' => $LogCue,
|
||||
'bitrateList' => preg_split('/\|/', $BitrateList, NULL, PREG_SPLIT_NO_EMPTY),
|
||||
'formatList' => preg_split('/\|/', $FormatList, NULL, PREG_SPLIT_NO_EMPTY),
|
||||
'mediaList' => preg_split('/\|/', $MediaList, NULL, PREG_SPLIT_NO_EMPTY),
|
||||
'logCue' => html_entity_decode($LogCue),
|
||||
'isFilled' => $IsFilled,
|
||||
'fillerId' => (int) $FillerID,
|
||||
'fillerName' => $FillerName,
|
||||
@ -221,7 +197,9 @@
|
||||
'tags' => $JsonTags,
|
||||
'comments' => $JsonRequestComments,
|
||||
'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>";
|
||||
} ?>
|
||||
<?Votes::vote_link($GroupID,$UserVotes[$GroupID]['Type']);?>
|
||||
<div class="tags"><?=$TorrentTags->format()?></div>
|
||||
<div class="tags"><?=$TorrentTags->format('torrents.php?taglist=', $Name)?></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@ -617,7 +617,7 @@ function compare($X, $Y) {
|
||||
<div class="head"><strong>Tags</strong></div>
|
||||
<ul class="stats nobullet">
|
||||
<?
|
||||
Tags::format_top(50);
|
||||
Tags::format_top(50, "torrents.php?taglist=", $Name);
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
@ -967,7 +967,7 @@ function require(file, callback) {
|
||||
</colgroup>
|
||||
<tr class="colhead_dark">
|
||||
<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)?>
|
||||
- <a href="#quickpost" onclick="Quote('<?=$PostID?>','<?=$Username?>');" class="brackets">Quote</a>
|
||||
<? if ($AuthorID == $LoggedUser['ID'] || check_perms('site_moderate_forums')) { ?>
|
||||
|
@ -40,13 +40,13 @@ function make_concert_link($Event) {
|
||||
return;
|
||||
}
|
||||
$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'];
|
||||
$Concert = "<a href='" . $Event['url'] . "'>" . $ConcertTitle . "</a>";
|
||||
$Concert = "<a href=\"" . $Event['url'] . "\">$ConcertTitle</a>";
|
||||
?>
|
||||
<form class="hidden" action="" id="concert<?=$Event['id']?>" method="post">
|
||||
<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_template" value="<?=get_concert_post_template($Name, $Event)?>" />
|
||||
</form>
|
||||
|
@ -318,6 +318,4 @@
|
||||
</table>
|
||||
<div class="linkbox"><?=$Pages?></div>
|
||||
</div>
|
||||
<?
|
||||
View::show_footer();
|
||||
?>
|
||||
<? View::show_footer(); ?>
|
||||
|
@ -22,7 +22,7 @@
|
||||
if (!check_forumperm($ForumID, 'Write') || !check_forumperm($ForumID, 'Create')) {
|
||||
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">
|
||||
<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>
|
||||
</div>
|
||||
<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="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||
<input type="hidden" name="forum" value="<?=$ForumID?>" />
|
||||
<table id="newthreadtext" class="layout">
|
||||
<tr>
|
||||
<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>
|
||||
<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>
|
||||
<td></td>
|
||||
@ -111,6 +111,7 @@ function AddAnswerField() {
|
||||
var AnswerField = document.createElement("input");
|
||||
AnswerField.type = "text";
|
||||
AnswerField.id = "answer_"+AnswerCount;
|
||||
AnswerField.className = "required";
|
||||
AnswerField.name = "answers[]";
|
||||
AnswerField.style.width = "90%";
|
||||
|
||||
@ -140,12 +141,12 @@ function RemoveAnswerField() {
|
||||
</tr>
|
||||
<tr id="poll_question" class="hidden">
|
||||
<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 id="poll_answers" class="hidden">
|
||||
<td class="label">Answers:</td>
|
||||
<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="RemoveAnswerField();return false;" class="brackets">−</a>
|
||||
</td>
|
||||
@ -159,7 +160,7 @@ function RemoveAnswerField() {
|
||||
<div id="buttons" class="center">
|
||||
<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="submit" id="submit_button" value="Create thread" />
|
||||
<input type="submit" class="submit" id="submit_button" value="Create thread" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -6,7 +6,7 @@
|
||||
include(SERVER_ROOT.'/classes/class_text.php');
|
||||
$Text = new TEXT;
|
||||
|
||||
list($Page,$Limit) = Format::page_limit(POSTS_PER_PAGE);
|
||||
list($Page, $Limit) = Format::page_limit(POSTS_PER_PAGE);
|
||||
|
||||
if ($LoggedUser['CustomForums']) {
|
||||
unset($LoggedUser['CustomForums']['']);
|
||||
@ -70,11 +70,11 @@
|
||||
if (!empty($RestrictedForums)) {
|
||||
$SQL .= " AND f.ID NOT IN ('$RestrictedForums')";
|
||||
}
|
||||
$SQL .= ")";
|
||||
$SQL .= ')';
|
||||
if (!empty($PermittedForums)) {
|
||||
$SQL .= " OR f.ID IN ('$PermittedForums')";
|
||||
}
|
||||
$SQL .= ")";
|
||||
$SQL .= ')';
|
||||
$DB->query($SQL);
|
||||
if (list($Title) = $DB->next_record()) {
|
||||
$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.
|
||||
View::show_header('Forums > Search', 'bbcode');
|
||||
View::show_header('Forums > Search', 'bbcode,jquery,forum_search');
|
||||
?>
|
||||
<div class="thin">
|
||||
<div class="header">
|
||||
<h2><a href="forums.php">Forums</a> > Search<?=$Title?></h2>
|
||||
</div>
|
||||
<form class="search_form" name="forums" action="" method="get">
|
||||
<input type="hidden" name="action" value="search" />
|
||||
<table cellpadding="6" cellspacing="1" border="0" class="layout border" width="100%">
|
||||
@ -116,11 +118,11 @@
|
||||
<table class="cat_list layout">
|
||||
|
||||
|
||||
<?// List of forums
|
||||
<? // List of forums
|
||||
$Open = false;
|
||||
$LastCategoryID = -1;
|
||||
$Columns = 0;
|
||||
|
||||
$i = 0;
|
||||
foreach ($Forums as $Forum) {
|
||||
if (!check_forumperm($Forum['ID'])) {
|
||||
continue;
|
||||
@ -142,9 +144,13 @@
|
||||
}
|
||||
$Columns = 0;
|
||||
$Open = true;
|
||||
$i++;
|
||||
?>
|
||||
<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>
|
||||
<? } elseif ($Columns % 5 == 0) { ?>
|
||||
@ -152,7 +158,7 @@
|
||||
<tr>
|
||||
<? } ?>
|
||||
<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>
|
||||
</td>
|
||||
<? }
|
||||
@ -278,7 +284,7 @@
|
||||
<table cellpadding="6" cellspacing="1" border="0" class="forum_list border" width="100%">
|
||||
<tr class="colhead">
|
||||
<td>Forum</td>
|
||||
<td><?=(!empty($ThreadID)) ? 'Post begins' : 'Topic' ?></td>
|
||||
<td><?=((!empty($ThreadID)) ? 'Post begins' : 'Topic')?></td>
|
||||
<td>Time</td>
|
||||
</tr>
|
||||
<? if ($DB->record_count() == 0) { ?>
|
||||
|
@ -183,6 +183,8 @@
|
||||
<div style="display: inline-block;">
|
||||
<h3>Search this thread:</h3>
|
||||
<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">
|
||||
<tr>
|
||||
<td><strong>Search for:</strong></td>
|
||||
@ -194,8 +196,6 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<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" />
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -21,7 +21,7 @@
|
||||
if (!$Username) {
|
||||
error(404);
|
||||
}
|
||||
View::show_header('Compose', 'inbox,bbcode');
|
||||
View::show_header('Compose', 'inbox,bbcode,jquery,jquery.validate,form_validate');
|
||||
?>
|
||||
<div class="thin">
|
||||
<div class="header">
|
||||
@ -34,9 +34,9 @@
|
||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||
<div id="quickpost">
|
||||
<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>
|
||||
<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 id="preview" class="hidden"></div>
|
||||
<div id="buttons" class="center">
|
||||
|
@ -61,7 +61,7 @@
|
||||
$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
|
||||
$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="toid" value="<?=implode(',',$ReceiverIDs)?>" />
|
||||
<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="buttons" class="center">
|
||||
<input type="button" value="Preview" onclick="Quick_Preview();" />
|
||||
|
@ -101,7 +101,7 @@
|
||||
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="header">
|
||||
@ -150,7 +150,7 @@
|
||||
|
||||
<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>
|
||||
<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="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||
<input type="hidden" name="id" value="<?=$ID?>" />
|
||||
@ -159,7 +159,7 @@
|
||||
<tr>
|
||||
<td class="label">Year (required)</td>
|
||||
<td>
|
||||
<input type="text" size="4" name="year" />
|
||||
<input type="text" size="4" name="year" class="required" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -179,7 +179,7 @@
|
||||
<tr>
|
||||
<td class="label">Comment</td>
|
||||
<td>
|
||||
<textarea rows="8" cols="80" name="comment"></textarea>
|
||||
<textarea rows="8" cols="80" name="comment" class="required"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -275,12 +275,12 @@
|
||||
?>
|
||||
<h3>Reason</h3>
|
||||
<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="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||
<input type="hidden" name="id" value="<?=$ID?>" />
|
||||
<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" />
|
||||
</form>
|
||||
</div>
|
||||
|
@ -45,7 +45,8 @@
|
||||
|
||||
}
|
||||
|
||||
$Reports = $DB->query("SELECT SQL_CALC_FOUND_ROWS
|
||||
$Reports = $DB->query("
|
||||
SELECT SQL_CALC_FOUND_ROWS
|
||||
r.ID,
|
||||
r.UserID,
|
||||
um.Username,
|
||||
@ -59,9 +60,9 @@
|
||||
r.ResolverID
|
||||
FROM reports AS r
|
||||
JOIN users_main AS um ON r.UserID=um.ID
|
||||
WHERE " . $Where . "
|
||||
ORDER BY ReportedTime
|
||||
DESC LIMIT " . $Limit);
|
||||
WHERE $Where
|
||||
ORDER BY ReportedTime DESC
|
||||
LIMIT $Limit");
|
||||
|
||||
// Number of results (for pagination)
|
||||
$DB->query('SELECT FOUND_ROWS()');
|
||||
@ -75,7 +76,6 @@
|
||||
<div class="thin">
|
||||
<div class="header">
|
||||
<h2>Active Reports</h2>
|
||||
|
||||
<div class="linkbox">
|
||||
<a href="reports.php">New</a> |
|
||||
<a href="reports.php?view=old">Old</a> |
|
||||
@ -110,38 +110,38 @@
|
||||
case "user" :
|
||||
$DB->query("SELECT Username FROM users_main WHERE ID=" . $ThingID);
|
||||
if ($DB->record_count() < 1) {
|
||||
echo "No user with the reported ID found";
|
||||
echo 'No user with the reported ID found';
|
||||
} else {
|
||||
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;
|
||||
case "request" :
|
||||
case "request_update" :
|
||||
$DB->query("SELECT Title FROM requests WHERE ID=" . $ThingID);
|
||||
if ($DB->record_count() < 1) {
|
||||
echo "No request with the reported ID found";
|
||||
echo 'No request with the reported ID found';
|
||||
} else {
|
||||
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;
|
||||
case "collage" :
|
||||
$DB->query("SELECT Name FROM collages WHERE ID=" . $ThingID);
|
||||
if ($DB->record_count() < 1) {
|
||||
echo "No collage with the reported ID found";
|
||||
echo 'No collage with the reported ID found';
|
||||
} else {
|
||||
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;
|
||||
case "thread" :
|
||||
$DB->query("SELECT Title FROM forums_topics WHERE ID=" . $ThingID);
|
||||
if ($DB->record_count() < 1) {
|
||||
echo "No forum thread with the reported ID found";
|
||||
echo 'No forum thread with the reported ID found';
|
||||
} else {
|
||||
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;
|
||||
case "post" :
|
||||
@ -150,54 +150,105 @@
|
||||
} else {
|
||||
$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) {
|
||||
echo "No forum post with the reported ID found";
|
||||
echo 'No forum post with the reported ID found';
|
||||
} else {
|
||||
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;
|
||||
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) {
|
||||
echo "No request comment with the reported ID found";
|
||||
echo 'No request comment with the reported ID found';
|
||||
} else {
|
||||
list($RequestID, $Body, $PostNum) = $DB->next_record();
|
||||
$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;
|
||||
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) {
|
||||
echo "No torrent comment with the reported ID found";
|
||||
echo 'No torrent comment with the reported ID found';
|
||||
} else {
|
||||
list($GroupID, $Body, $PostNum) = $DB->next_record();
|
||||
$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;
|
||||
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) {
|
||||
echo "No comment with the reported ID found";
|
||||
echo 'No comment with the reported ID found';
|
||||
} else {
|
||||
list($ArtistID, $Body, $PostNum) = $DB->next_record();
|
||||
$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;
|
||||
|
||||
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) {
|
||||
echo "No collage comment with the reported ID found";
|
||||
echo 'No collage comment with the reported ID found';
|
||||
} else {
|
||||
list($CollageID, $Body, $PostNum) = $DB->next_record();
|
||||
$PerPage = POSTS_PER_PAGE;
|
||||
$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;
|
||||
}
|
||||
@ -227,13 +278,13 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<? if ($Status != "Resolved") { ?>
|
||||
<? if ($Status != 'Resolved') { ?>
|
||||
<tr>
|
||||
<td class="center" colspan="2">
|
||||
<form id="report_form_<?=$ReportID?>" action="">
|
||||
<input type="hidden" name="reportid" value="<?=$ReportID?>" />
|
||||
<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>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -105,7 +105,8 @@
|
||||
<?
|
||||
die();
|
||||
}
|
||||
$DB->query("UPDATE reportsv2
|
||||
$DB->query("
|
||||
UPDATE reportsv2
|
||||
SET Status='InProgress',
|
||||
ResolverID=".$LoggedUser['ID']."
|
||||
WHERE ID=".$ReportID);
|
||||
@ -119,23 +120,25 @@
|
||||
$Type = 'other';
|
||||
$ReportType = $Types['master']['other'];
|
||||
}
|
||||
$RemasterDisplayString = Reports::format_reports_remaster_info($Remastered, $RemasterTitle, $RemasterYear);
|
||||
|
||||
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)";
|
||||
$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)";
|
||||
$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)";
|
||||
$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]" : '') . $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]{$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') {
|
||||
$RawName = "Various Artists - $GroupName".($Year ? " ($Year)" : "")." [$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : "").($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)";
|
||||
$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)";
|
||||
$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]$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]{$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 {
|
||||
$RawName = "$ArtistName - $GroupName".($Year ? " ($Year)" : "")." [$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : "").($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)";
|
||||
$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)";
|
||||
$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]$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]{$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?>">
|
||||
<form class="edit_form" name="report" id="reportform_<?=$ReportID?>" action="reports.php" method="post">
|
||||
<?
|
||||
<?
|
||||
/*
|
||||
* Some of these are for takeresolve, some for the JavaScript.
|
||||
*/
|
||||
@ -293,12 +296,14 @@
|
||||
|
||||
|
||||
if ($ExtraGroupName) {
|
||||
$ExtraRemasterDisplayString = Reports::format_reports_remaster_info($ExtraRemastered, $ExtraRemasterTitle, $ExtraRemasterYear);
|
||||
|
||||
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') {
|
||||
$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 {
|
||||
$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 />')?>
|
||||
|
@ -14,6 +14,7 @@
|
||||
}
|
||||
|
||||
include(SERVER_ROOT.'/classes/class_text.php');
|
||||
include(SERVER_ROOT.'/classes/class_reports.php');
|
||||
$Text = NEW TEXT;
|
||||
|
||||
define('REPORTS_PER_PAGE', '10');
|
||||
@ -264,29 +265,31 @@
|
||||
$ReportType = $Types['master']['other'];
|
||||
}
|
||||
}
|
||||
$RemasterDisplayString = Reports::format_reports_remaster_info($Remastered, $RemasterTitle, $RemasterYear);
|
||||
|
||||
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') {
|
||||
$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 {
|
||||
$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?>">
|
||||
<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.
|
||||
*/
|
||||
@ -449,12 +452,14 @@
|
||||
$ExtraRemasterYear, $ExtraMedia, $ExtraFormat, $ExtraEncoding, $ExtraSize, $ExtraHasCue, $ExtraHasLog, $ExtraLogScore, $ExtraUploaderID, $ExtraUploaderName) = Misc::display_array($DB->next_record());
|
||||
|
||||
if ($ExtraGroupName) {
|
||||
$ExtraRemasterDisplayString = Reports::format_reports_remaster_info($ExtraRemastered, $ExtraRemasterTitle, $ExtraRemasterYear);
|
||||
|
||||
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') {
|
||||
$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 {
|
||||
$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 />')?>
|
||||
@ -588,51 +593,48 @@
|
||||
<td colspan="4" style="text-align: center;">
|
||||
<input type="button" value="Invalidate report" onclick="Dismiss(<?=$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?>);" />
|
||||
<? } else { ?>
|
||||
<? } else { ?>
|
||||
| <input id="grab<?=$ReportID?>" type="button" value="Claim" onclick="Grab(<?=$ReportID?>);" />
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
| Multi-resolve <input type="checkbox" name="multi" id="multi<?=$ReportID?>" checked="checked" />
|
||||
| <input type="button" id="submit_<?=$ReportID?>" value="Submit" onclick="TakeResolve(<?=$ReportID?>);" />
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
} else {
|
||||
?>
|
||||
<? } else { ?>
|
||||
<tr>
|
||||
<td class="label">Resolver</td>
|
||||
<td class="label">Resolver:</td>
|
||||
<td colspan="3">
|
||||
<a href="user.php?id=<?=$ResolverID?>"><?=$ResolverName?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Resolve time</td>
|
||||
<td class="label">Resolve time:</td>
|
||||
<td colspan="3">
|
||||
<?=time_diff($LastChangeTime)?>
|
||||
<?=time_diff($LastChangeTime); echo "\n"; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Report comments</td>
|
||||
<td class="label">Report comments:</td>
|
||||
<td colspan="3">
|
||||
<?=$ModComment?>
|
||||
<?=$ModComment; echo "\n"; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Log message</td>
|
||||
<td class="label">Log message:</td>
|
||||
<td colspan="3">
|
||||
<?=$LogMessage?>
|
||||
<?=$LogMessage; echo "\n"; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<? if ($GroupID) { ?>
|
||||
<? if ($GroupID) { ?>
|
||||
<tr>
|
||||
<td colspan="4" style="text-align: center;">
|
||||
<input id="grab<?=$ReportID?>" type="button" value="Claim" onclick="Grab(<?=$ReportID?>);" />
|
||||
</td>
|
||||
</tr>
|
||||
<? }
|
||||
}
|
||||
?>
|
||||
<? }
|
||||
} ?>
|
||||
</table>
|
||||
</form>
|
||||
<br />
|
||||
@ -647,9 +649,8 @@
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="linkbox">
|
||||
<?=$PageLinks?>
|
||||
<? if ($PageLinks) { ?>
|
||||
<div class="linkbox pager"><?=$PageLinks?></div>
|
||||
<? } ?>
|
||||
</div>
|
||||
<?
|
||||
View::show_footer();
|
||||
?>
|
||||
<? View::show_footer(); ?>
|
||||
|
@ -115,6 +115,7 @@
|
||||
<?
|
||||
$DB->query("
|
||||
SELECT
|
||||
um.ID,
|
||||
um.Username,
|
||||
COUNT(r.ID) AS Reports
|
||||
FROM reportsv2 AS r
|
||||
@ -130,10 +131,10 @@
|
||||
<td class="head colhead_dark">Reports</td>
|
||||
</tr>
|
||||
<? foreach ($Results as $Result) {
|
||||
list($Username, $Reports) = $Result;
|
||||
list($UserID, $Username, $Reports) = $Result;
|
||||
?>
|
||||
<tr>
|
||||
<td><?=$Username?></td>
|
||||
<td><a href="reportsv2.php?view=resolver&id=<?=$UserID?>"><?=$Username?></a></td>
|
||||
<td><?=number_format($Reports)?></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
|
@ -22,6 +22,7 @@
|
||||
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,
|
||||
$BitrateList, $FormatList, $MediaList, $LogCue, $FillerID, $FillerName, $TorrentID, $TimeFilled, $GroupID, $OCLC) = $Request;
|
||||
|
||||
@ -42,7 +43,7 @@
|
||||
$ArtistLink = Artists::display_artists($ArtistForm, true, true);
|
||||
|
||||
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 {
|
||||
$DisplayLink = $ArtistLink.$Title." [$Year]";
|
||||
}
|
||||
@ -99,23 +100,22 @@
|
||||
<? } ?>
|
||||
<a href="reports.php?action=report&type=request&id=<?=$RequestID?>" class="brackets">Report request</a>
|
||||
<? 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))) { ?>
|
||||
<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
|
||||
$encoded_title = urlencode(preg_replace("/\([^\)]+\)/", "", $Title));
|
||||
$encoded_artist = substr(str_replace("&","and",$ArtistName), 0, -3);
|
||||
$encoded_artist = str_ireplace("Performed By", "", $encoded_artist);
|
||||
$encoded_artist = preg_replace("/\([^\)]+\)/", "", $encoded_artist);
|
||||
//create a search URL to WorldCat and google based on title
|
||||
$encoded_title = urlencode(preg_replace("/\([^\)]+\)/", '', $Title));
|
||||
$encoded_artist = substr(str_replace('&', 'and', $ArtistName), 0, -3);
|
||||
$encoded_artist = str_ireplace('Performed By', '', $encoded_artist);
|
||||
$encoded_artist = preg_replace("/\([^\)]+\)/", '', $encoded_artist);
|
||||
$encoded_artist = urlencode($encoded_artist);
|
||||
|
||||
$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;
|
||||
|
||||
$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";
|
||||
?>
|
||||
<a href="<? echo $worldcat_url; ?>" class="brackets">Find in library</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>
|
||||
<? } 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>
|
||||
<? }
|
||||
@ -224,7 +224,7 @@
|
||||
<? foreach ($Request['Tags'] as $TagID => $TagName) { ?>
|
||||
<li>
|
||||
<a href="torrents.php?taglist=<?=$TagName?>"><?=display_str($TagName)?></a>
|
||||
<br style="clear:both" />
|
||||
<br style="clear: both;" />
|
||||
</li>
|
||||
<? } ?>
|
||||
</ul>
|
||||
@ -244,10 +244,10 @@
|
||||
?>
|
||||
<tr>
|
||||
<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>
|
||||
<?=$Boldify?'<strong>':''?><?=Format::get_size($User['Bounty'])?><?=$Boldify?'</strong>':''?>
|
||||
<?=($Boldify ? '<strong>' : '')?><?=Format::get_size($User['Bounty'])?><?=($Boldify ? '</strong>' : '')?>
|
||||
</td>
|
||||
</tr>
|
||||
<? }
|
||||
@ -278,7 +278,7 @@
|
||||
<?=time_diff($TimeAdded)?> by <strong><?=Users::format_username($RequestorID, false, false, false)?></strong>
|
||||
</td>
|
||||
</tr>
|
||||
<? if ($CategoryName == "Music") {
|
||||
<? if ($CategoryName == 'Music') {
|
||||
if (!empty($RecordLabel)) { ?>
|
||||
<tr>
|
||||
<td class="label">Record label</td>
|
||||
@ -328,10 +328,10 @@
|
||||
</tr>
|
||||
<? }
|
||||
}
|
||||
$Worldcat = "";
|
||||
$OCLC = str_replace(" ", "", $OCLC);
|
||||
if ($OCLC != "") {
|
||||
$OCLCs = explode(",", $OCLC);
|
||||
$Worldcat = '';
|
||||
$OCLC = str_replace(' ', '', $OCLC);
|
||||
if ($OCLC != '') {
|
||||
$OCLCs = explode(',', $OCLC);
|
||||
for ($i = 0; $i < count($OCLCs); $i++) {
|
||||
if (!empty($Worldcat)) {
|
||||
$Worldcat .= ', <a href="http://www.worldcat.org/oclc/'.$OCLCs[$i].'">'.$OCLCs[$i].'</a>';
|
||||
@ -558,11 +558,13 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<? } ?>
|
||||
<div class="linkbox">
|
||||
<?=$Pages?>
|
||||
</div>
|
||||
<? }
|
||||
|
||||
if ($Pages) { ?>
|
||||
<div class="linkbox pager"><?=$Pages?></div>
|
||||
<?
|
||||
}
|
||||
|
||||
View::parse('generic/reply/quickreply.php', array(
|
||||
'InputName' => 'requestid',
|
||||
'InputID' => $RequestID));
|
||||
|
@ -678,6 +678,4 @@
|
||||
<?=$PageLinks?>
|
||||
</div>
|
||||
</div>
|
||||
<?
|
||||
View::show_footer();
|
||||
?>
|
||||
<? View::show_footer(); ?>
|
||||
|
@ -374,15 +374,13 @@ foreach ($Categories as $CatKey => $CatName) {
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="linkbox">
|
||||
<?=$PageLinks?>
|
||||
</div>
|
||||
|
||||
<table id="request_table" class="request_table" cellpadding="6" cellspacing="1" border="0" class="border" width="100%">
|
||||
<tr class="colhead_dark">
|
||||
<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>
|
||||
<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>
|
||||
</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>
|
||||
</tr>
|
||||
|
||||
@ -422,14 +420,14 @@ foreach ($Categories as $CatKey => $CatName) {
|
||||
if ($CategoryName == "Music") {
|
||||
$ArtistForm = Requests::get_artists($RequestID);
|
||||
$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') {
|
||||
$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 {
|
||||
$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);
|
||||
?>
|
||||
@ -440,7 +438,7 @@ foreach ($Categories as $CatKey => $CatName) {
|
||||
<?
|
||||
$TagList = array();
|
||||
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);
|
||||
?>
|
||||
|
@ -99,7 +99,7 @@
|
||||
</tr>
|
||||
<? } ?>
|
||||
</table>
|
||||
<div class="linkbox">
|
||||
<? echo $Pages; ?>
|
||||
</div>
|
||||
<? View::show_footer(); ?>
|
||||
<? if ($Pages) { ?>
|
||||
<div class="linkbox pager"><?=($Pages)?></div>
|
||||
<? }
|
||||
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')) {
|
||||
error(403);
|
||||
}
|
||||
|
||||
// validation functions
|
||||
$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('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'));
|
||||
|
||||
echo $Val->GenerateJS('tagform');
|
||||
|
||||
// some constants to make programmers' lives easier
|
||||
define('MODE_RENAME',0);
|
||||
define('MODE_MERGE',1);
|
||||
define('MODE_RENAME', 0);
|
||||
define('MODE_MERGE', 1);
|
||||
|
||||
?>
|
||||
<div class="thin">
|
||||
@ -69,9 +69,10 @@
|
||||
}
|
||||
|
||||
// 1) make sure tag exists
|
||||
$DB->query("SELECT ID
|
||||
$DB->query("
|
||||
SELECT ID
|
||||
FROM tags
|
||||
WHERE Name = '".$Tag."'
|
||||
WHERE Name = '$Tag'
|
||||
LIMIT 1;");
|
||||
if ($DB->record_count() == 0) {
|
||||
echo " <div class=\"box pad center\">
|
||||
@ -84,9 +85,10 @@
|
||||
list($TagID) = $DB->next_record();
|
||||
|
||||
// 2) check if replacement exists
|
||||
$DB->query("SELECT ID
|
||||
$DB->query("
|
||||
SELECT ID
|
||||
FROM tags
|
||||
WHERE Name = '".$Replacement."'
|
||||
WHERE Name = '$Replacement'
|
||||
LIMIT 1;");
|
||||
if ($DB->record_count() == 0 ) {
|
||||
$Mode = MODE_RENAME;
|
||||
@ -98,7 +100,8 @@
|
||||
if ($_GET['list']) {
|
||||
$AffectedTorrents = array();
|
||||
// 3) get a list of affected torrents
|
||||
$DB->query("SELECT
|
||||
$DB->query("
|
||||
SELECT
|
||||
tg.ID,
|
||||
ag.ArtistID,
|
||||
ag.Name,
|
||||
@ -107,14 +110,15 @@
|
||||
LEFT JOIN artists_group AS ag ON ag.ArtistID=tg.ArtistID
|
||||
JOIN torrents_tags AS t ON t.GroupID=tg.ID
|
||||
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.= "<a href='torrents.php?id=$TorrentID'>".display_str($TorrentName)."</a>";
|
||||
$Row.= "<a href=\"torrents.php?id=$TorrentID\">".display_str($TorrentName).'</a>';
|
||||
$AffectedTorrents[] = $Row;
|
||||
}
|
||||
|
||||
// 4) get a list of affected requests
|
||||
$DB->query("SELECT
|
||||
$DB->query("
|
||||
SELECT
|
||||
ra.RequestID,
|
||||
ag.ArtistID,
|
||||
ag.Name,
|
||||
@ -124,9 +128,9 @@
|
||||
LEFT JOIN artists_group AS ag ON ag.ArtistID=ra.ArtistID
|
||||
JOIN requests_tags AS t ON t.RequestID=r.ID
|
||||
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.= "<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;
|
||||
}
|
||||
}
|
||||
@ -135,8 +139,9 @@
|
||||
if ($Mode == MODE_RENAME) {
|
||||
// EASY! just rename the tag
|
||||
// 5) rename the tag
|
||||
$DB->query("UPDATE tags
|
||||
SET Name = '".$Replacement."'
|
||||
$DB->query("
|
||||
UPDATE tags
|
||||
SET Name = '$Replacement'
|
||||
WHERE ID = $TagID
|
||||
LIMIT 1;");
|
||||
$TotalAffected = $DB->affected_rows();
|
||||
@ -146,20 +151,21 @@
|
||||
// (torrents that have both "old tag" and "replacement tag" set)
|
||||
$DB->query("SELECT GroupID FROM torrents_tags WHERE TagID=$ReplacementID;");
|
||||
if ($DB->record_count() > 0 ) {
|
||||
$Query = "DELETE
|
||||
FROM torrents_tags
|
||||
$Query = "
|
||||
DELETE FROM torrents_tags
|
||||
WHERE TagID=$TagID
|
||||
AND GroupID IN (";
|
||||
while (list($GroupID) = $DB->next_record()) {
|
||||
$Query.= $GroupID.',';
|
||||
}
|
||||
$Query = substr($Query,0,-1).");";
|
||||
$Query = substr($Query, 0, -1) . ');';
|
||||
$DB->query($Query);
|
||||
$TotalAffected = $DB->affected_rows();
|
||||
}
|
||||
|
||||
// 6) replace old tag in torrents
|
||||
$DB->query("UPDATE torrents_tags
|
||||
$DB->query("
|
||||
UPDATE torrents_tags
|
||||
SET TagID=$ReplacementID
|
||||
WHERE TagID=$TagID;");
|
||||
$UsageChange = $DB->affected_rows();
|
||||
@ -167,20 +173,21 @@
|
||||
// 7) remove dupe tags from artists
|
||||
$DB->query("SELECT ArtistID FROM artists_tags WHERE TagID=$ReplacementID;");
|
||||
if ($DB->record_count() > 0 ) {
|
||||
$Query = "DELETE
|
||||
FROM artists_tags
|
||||
$Query = "
|
||||
DELETE FROM artists_tags
|
||||
WHERE TagID=$TagID
|
||||
AND ArtistID IN (";
|
||||
while (list($ArtistID) = $DB->next_record()) {
|
||||
$Query.= $ArtistID.',';
|
||||
}
|
||||
$Query = substr($Query,0,-1).");";
|
||||
$Query = substr($Query, 0, -1) . ');';
|
||||
$DB->query($Query);
|
||||
$TotalAffected += $DB->affected_rows();
|
||||
}
|
||||
|
||||
// 8) replace old tag in artists
|
||||
$DB->query("UPDATE artists_tags
|
||||
$DB->query("
|
||||
UPDATE artists_tags
|
||||
SET TagID=$ReplacementID
|
||||
WHERE TagID=$TagID;");
|
||||
$UsageChange += $DB->affected_rows();
|
||||
@ -188,33 +195,35 @@
|
||||
// 9) remove dupe tags from requests
|
||||
$DB->query("SELECT RequestID FROM requests_tags WHERE TagID=$ReplacementID;");
|
||||
if ($DB->record_count() > 0) {
|
||||
$Query = "DELETE
|
||||
FROM requests_tags
|
||||
$Query = "
|
||||
DELETE FROM requests_tags
|
||||
WHERE TagID=$TagID
|
||||
AND RequestID IN (";
|
||||
while (list($RequestID) = $DB->next_record()) {
|
||||
$Query.= $RequestID.',';
|
||||
}
|
||||
$Query = substr($Query,0,-1).");";
|
||||
$Query = substr($Query, 0, -1) . ');';
|
||||
$DB->query($Query);
|
||||
$TotalAffected += $DB->affected_rows();
|
||||
}
|
||||
|
||||
// 10) replace old tag in requests
|
||||
$DB->query("UPDATE requests_tags
|
||||
$DB->query("
|
||||
UPDATE requests_tags
|
||||
SET TagID=$ReplacementID
|
||||
WHERE TagID=$TagID;");
|
||||
$UsageChange += $DB->affected_rows();
|
||||
$TotalAffected += $UsageChange;
|
||||
|
||||
// 11) finally, remove old tag completely
|
||||
$DB->query("DELETE
|
||||
FROM tags
|
||||
$DB->query("
|
||||
DELETE FROM tags
|
||||
WHERE ID=$TagID
|
||||
LIMIT 1");
|
||||
|
||||
// 12) update usage count for replacement tag
|
||||
$DB->query("UPDATE tags
|
||||
$DB->query("
|
||||
UPDATE tags
|
||||
SET Uses=Uses+$UsageChange
|
||||
WHERE ID=$ReplacementID
|
||||
LIMIT 1");
|
||||
|
@ -1,7 +1,5 @@
|
||||
<?
|
||||
if (!check_perms('users_mod')
|
||||
|
||||
) {
|
||||
if (!check_perms('users_mod')) {
|
||||
error(403);
|
||||
}
|
||||
View::show_header('Staff Tools');
|
||||
@ -16,7 +14,6 @@
|
||||
<tr><td><a href="tools.php?action=whitelist">Client whitelist</a></td></tr>
|
||||
<? } if (check_perms('admin_manage_ipbans')) { ?>
|
||||
<tr><td><a href="tools.php?action=ip_ban">IP address bans</a></td></tr>
|
||||
|
||||
<? } if (check_perms('admin_login_watch')) { ?>
|
||||
<tr><td><a href="tools.php?action=login_watch">Login watch</a></td></tr>
|
||||
<? } 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>
|
||||
<? } 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>
|
||||
|
||||
<? } if (check_perms('users_view_email')) { ?>
|
||||
<tr><td><a href="tools.php?action=email_blacklist">Email blacklist</a></td></tr>
|
||||
<? } 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=official_tags">Official tags manager</a></td></tr>
|
||||
<tr><td><a href="tools.php?action=tag_aliases">Tag aliases</a></td></tr>
|
||||
|
||||
|
||||
<? } ?>
|
||||
</table>
|
||||
</div>
|
||||
<div class="permission_container">
|
||||
<table class="layout">
|
||||
<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=bitcoin_balance">Bitcoin donation balance</a></td></tr>
|
||||
<? } 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>
|
||||
<? } if (check_perms('users_view_invites')) { ?>
|
||||
<tr><td><a href="tools.php?action=invite_pool">Invite pool</a></td></tr>
|
||||
|
||||
<? } 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=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>
|
||||
<? } if (check_perms('admin_manage_permissions')) { ?>
|
||||
<tr><td><a href="tools.php?action=special_users">Special users</a></td></tr>
|
||||
|
||||
<? } ?>
|
||||
</table>
|
||||
</div>
|
||||
@ -71,8 +61,7 @@
|
||||
<tr class="colhead"><td>Misc</td></tr>
|
||||
<? if (check_perms('users_mod')) { ?>
|
||||
<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>
|
||||
<? }
|
||||
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>
|
||||
<? } if (check_perms('users_view_ips')) { ?>
|
||||
<tr><td><a href="tools.php?action=dupe_ips">Duplicate IP addresses</a></td></tr>
|
||||
|
||||
<? } 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=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=sandbox7">Sandbox (7)</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>
|
||||
<? } 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>
|
||||
|
@ -120,7 +120,7 @@
|
||||
$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) {
|
||||
$DisplayName.= " [$GroupYear]";
|
||||
@ -130,36 +130,36 @@
|
||||
$ExtraInfo = '';
|
||||
$AddExtra = '';
|
||||
if ($Format) {
|
||||
$ExtraInfo.=$Format;
|
||||
$ExtraInfo.= $Format;
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if ($Encoding) {
|
||||
$ExtraInfo.=$AddExtra.$Encoding;
|
||||
$ExtraInfo.= $AddExtra.$Encoding;
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
//"FLAC / Lossless / Log (100%) / Cue / CD";
|
||||
if ($HasLog) {
|
||||
$ExtraInfo.=$AddExtra."Log (".$LogScore."%)";
|
||||
$ExtraInfo.= "$AddExtra Log ($LogScore".'%)';
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if ($HasCue) {
|
||||
$ExtraInfo.=$AddExtra."Cue";
|
||||
$ExtraInfo.= $AddExtra.'Cue';
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if ($Media) {
|
||||
$ExtraInfo.=$AddExtra.$Media;
|
||||
$ExtraInfo.= $AddExtra.$Media;
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if ($Scene) {
|
||||
$ExtraInfo.=$AddExtra.'Scene';
|
||||
$ExtraInfo.= $AddExtra.'Scene';
|
||||
$AddExtra = ' / ';
|
||||
}
|
||||
if ($Year > 0) {
|
||||
$ExtraInfo.=$AddExtra.$Year;
|
||||
$ExtraInfo.= $AddExtra.$Year;
|
||||
$AddExtra = ' ';
|
||||
}
|
||||
if ($RemasterTitle) {
|
||||
$ExtraInfo.=$AddExtra.$RemasterTitle;
|
||||
$ExtraInfo.= $AddExtra.$RemasterTitle;
|
||||
}
|
||||
if ($ExtraInfo != '') {
|
||||
$ExtraInfo = "- [$ExtraInfo]";
|
||||
|
@ -11,6 +11,11 @@
|
||||
error(0);
|
||||
}
|
||||
|
||||
//Delete cached tag used for undos
|
||||
if(isset($_POST['undo'])) {
|
||||
$Cache->delete_value('deleted_tags_'.$GroupID.'_'.$LoggedUser['ID']);
|
||||
}
|
||||
|
||||
$Tags = explode(',', $_POST['tagname']);
|
||||
foreach ($Tags as $TagName) {
|
||||
$TagName = Misc::sanitize_tag($TagName);
|
||||
@ -45,6 +50,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Torrents::update_hash($GroupID); // Delete torrent group cache
|
||||
header('Location: '.$_SERVER['HTTP_REFERER']);
|
||||
?>
|
||||
|
@ -781,7 +781,7 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
<label for="group_results">Group by release:</label>
|
||||
</td>
|
||||
<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>
|
||||
</tr>
|
||||
</table>
|
||||
@ -801,8 +801,8 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
$x++;
|
||||
?>
|
||||
<td>
|
||||
<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>
|
||||
<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>
|
||||
</td>
|
||||
<?
|
||||
}
|
||||
@ -834,21 +834,21 @@ function header_link($SortKey,$DefaultWay="desc") {
|
||||
}
|
||||
if ($x % 7 != 0) { // Padding
|
||||
?>
|
||||
<td colspan="<?=7 - ($x % 7) ?>"> </td>
|
||||
<td colspan="<?=(7 - ($x % 7))?>"> </td>
|
||||
<? } ?>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="layout cat_list" width="100%">
|
||||
<tr>
|
||||
<td class="label">
|
||||
<a class="brackets" href="#" onclick="$('#taglist').toggle(); if (this.innerHTML=='View tags') {this.innerHTML='Hide tags';} else {this.innerHTML='View tags';}; return false;"><?=(empty($LoggedUser['ShowTags'])) ? 'View tags' : 'Hide tags'?></a>
|
||||
<a class="brackets" href="#" onclick="$('#taglist').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>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="submit ft_submit">
|
||||
<span style="float: left;"><?=number_format($TorrentCount)?> Results</span>
|
||||
<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="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) {
|
||||
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')) {
|
||||
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?
|
||||
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?
|
||||
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;">
|
||||
<?
|
||||
include(SERVER_ROOT.'/classes/class_reports.php');
|
||||
|
||||
require(SERVER_ROOT.'/sections/reportsv2/array.php');
|
||||
require(SERVER_ROOT.'/classes/class_text.php');
|
||||
$Text = NEW TEXT;
|
||||
@ -123,25 +133,27 @@
|
||||
$Type = 'other';
|
||||
$ReportType = $Types['master']['other'];
|
||||
}
|
||||
$RemasterDisplayString = Reports::format_reports_remaster_info($Remastered, $RemasterTitle, $RemasterYear);
|
||||
|
||||
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)';
|
||||
$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)";
|
||||
$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)";
|
||||
$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]" : '') . "$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]{$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') {
|
||||
$RawName = "Various Artists - $GroupName".($Year ? " ($Year)" : "")." [$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : "").($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)";
|
||||
$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)";
|
||||
$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]$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]{$RemasterDisplayString}[/url] ".($HasLog ? " [url=torrents.php?action=viewlog&torrentid=$TorrentID&groupid=$GroupID](Log: {$LogScore}%)[/url]" : '').' ('.number_format($Size / (1024 * 1024), 2).' MB)';
|
||||
} else {
|
||||
$RawName = "$ArtistName - $GroupName".($Year ? " ($Year)" : "")." [$Format/$Encoding/$Media]".($Remastered ? " <$RemasterTitle - $RemasterYear>" : "").($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)";
|
||||
$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)";
|
||||
$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]$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]{$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?>">
|
||||
<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>
|
||||
@ -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>
|
||||
uploaded by <a href="user.php?id=<?=$UploaderID?>"><?=$UploaderName?></a> <?=time_diff($Time)?>
|
||||
<br />
|
||||
<? $DB->query("SELECT r.ID
|
||||
<? $DB->query("
|
||||
SELECT r.ID
|
||||
FROM reportsv2 AS r
|
||||
LEFT JOIN torrents AS t ON t.ID=r.TorrentID
|
||||
WHERE r.Status != 'Resolved'
|
||||
@ -182,7 +195,8 @@
|
||||
</div>
|
||||
<? }
|
||||
|
||||
$DB->query("SELECT t.UserID
|
||||
$DB->query("
|
||||
SELECT t.UserID
|
||||
FROM reportsv2 AS r
|
||||
JOIN torrents AS t ON t.ID=r.TorrentID
|
||||
WHERE r.Status != 'Resolved'
|
||||
@ -195,7 +209,8 @@
|
||||
</div>
|
||||
<? }
|
||||
|
||||
$DB->query("SELECT DISTINCT req.ID,
|
||||
$DB->query("
|
||||
SELECT DISTINCT req.ID,
|
||||
req.FillerID,
|
||||
um.Username,
|
||||
req.TimeFilled
|
||||
@ -232,7 +247,7 @@
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
// Cache the deleted tag for 5 minutes
|
||||
$Cache->cache_value('deleted_tags_'.$GroupID.'_'.$LoggedUser['ID'], $TagName, 300);
|
||||
header('Location: '.$_SERVER['HTTP_REFERER']);
|
||||
?>
|
||||
|
@ -311,7 +311,22 @@ function compare($X, $Y) {
|
||||
include(SERVER_ROOT.'/sections/torrents/vote.php');
|
||||
?>
|
||||
<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) {
|
||||
?>
|
||||
@ -443,7 +458,7 @@ function filelist($Str) {
|
||||
//There was a type but it wasn't an option!
|
||||
$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 .= "</table>";
|
||||
@ -468,7 +483,7 @@ function filelist($Str) {
|
||||
if ($Spaces = strspn($Name, ' ')) {
|
||||
$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>",
|
||||
$Name, Format::get_size($FileSize));
|
||||
}
|
||||
@ -483,8 +498,8 @@ function filelist($Str) {
|
||||
$FileTable .= '
|
||||
</table>';
|
||||
|
||||
$ExtraInfo=''; // String that contains information on the torrent (e.g. format and encoding)
|
||||
$AddExtra=''; // Separator between torrent properties
|
||||
$ExtraInfo = ''; // String that contains information on the torrent (e.g. format and encoding)
|
||||
$AddExtra = ''; // Separator between torrent properties
|
||||
|
||||
$TorrentUploader = $Username; // Save this for "Uploaded by:" below
|
||||
|
||||
@ -533,9 +548,9 @@ function filelist($Str) {
|
||||
$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>
|
||||
<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)) { ?>
|
||||
| <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'];
|
||||
|
||||
$DB->query("SELECT
|
||||
$DB->query("
|
||||
SELECT
|
||||
t.Media,
|
||||
t.Format,
|
||||
t.Encoding AS Bitrate,
|
||||
@ -64,7 +65,7 @@
|
||||
error(404);
|
||||
}
|
||||
|
||||
$UploadForm = $Categories[$Properties['CategoryID']-1];
|
||||
$UploadForm = $Categories[$Properties['CategoryID'] - 1];
|
||||
|
||||
if (($LoggedUser['ID'] != $Properties['UserID'] && !check_perms('torrents_edit')) || $LoggedUser['DisableWiki']) {
|
||||
error(403);
|
||||
@ -94,6 +95,7 @@
|
||||
case 'E-Learning Videos':
|
||||
$TorrentForm->simple_form($Properties['CategoryID']);
|
||||
break;
|
||||
|
||||
default:
|
||||
$TorrentForm->music_form('');
|
||||
}
|
||||
@ -105,7 +107,9 @@
|
||||
<?
|
||||
if ($Properties['CategoryID'] == 1) {
|
||||
?>
|
||||
<div class="header">
|
||||
<h2>Change group</h2>
|
||||
</div>
|
||||
<form class="edit_form" name="torrent_group" action="torrents.php" method="post">
|
||||
<input type="hidden" name="action" value="editgroupid" />
|
||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||
@ -175,7 +179,7 @@
|
||||
<td>
|
||||
<select id="newcategoryid" name="newcategoryid" onchange="ChangeCategory(this.value);">
|
||||
<? 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>
|
||||
</td>
|
||||
@ -184,7 +188,7 @@
|
||||
<td>
|
||||
<select name="releasetype">
|
||||
<? foreach ($ReleaseTypes as $RTID => $ReleaseType) { ?>
|
||||
<option value="<?=$RTID?>"><?=$ReleaseType?></option>
|
||||
<option value="<?=($RTID)?>"><?=($ReleaseType)?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
</td>
|
||||
|
@ -223,12 +223,10 @@ function header_link($SortKey, $DefaultWay = "desc") {
|
||||
}
|
||||
}
|
||||
}
|
||||
$MatchingArtistsText = !empty($MatchingArtists)
|
||||
? 'Caught by filter for '.implode(', ', $MatchingArtists)
|
||||
: '';
|
||||
$MatchingArtistsText = (!empty($MatchingArtists) ? 'Caught by filter for '.implode(', ', $MatchingArtists) : '');
|
||||
$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'];
|
||||
if ($GroupCategoryID == 1) {
|
||||
@ -236,7 +234,7 @@ function header_link($SortKey, $DefaultWay = "desc") {
|
||||
$DisplayName .= " [$GroupInfo[Year]]";
|
||||
}
|
||||
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']);
|
||||
|
||||
if ($GroupInfo['TagList'] == '')
|
||||
$TorrentTags->set_primary($Categories[$GroupCategoryID-1]);
|
||||
$TorrentTags->set_primary($Categories[$GroupCategoryID - 1]);
|
||||
|
||||
// print row
|
||||
?>
|
||||
<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>
|
||||
<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 class="center cats_col"><div title="<?=$TorrentTags->title()?>"class="<?=Format::css_category($GroupCategoryID)?> <?=$TorrentTags->css_name()?>"></div></td>
|
||||
<td class="big_info">
|
||||
<? if ($LoggedUser['CoverArt']) : ?>
|
||||
@ -293,9 +291,8 @@ function header_link($SortKey, $DefaultWay = "desc") {
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="linkbox">
|
||||
<?=$Pages?>
|
||||
</div>
|
||||
if ($Pages) { ?>
|
||||
<div class="linkbox"><?=$Pages?></div>
|
||||
<? } ?>
|
||||
</div>
|
||||
<? View::show_footer(); ?>
|
||||
|
@ -52,12 +52,10 @@
|
||||
<div class="header">
|
||||
<h3>Search results</h3>
|
||||
</div>
|
||||
<div class="linkbox">
|
||||
<?
|
||||
$Pages = Format::get_pages($Page, $NumResults, USERS_PER_PAGE, 9);
|
||||
echo $Pages;
|
||||
?>
|
||||
</div>
|
||||
<? $Pages = Format::get_pages($Page, $NumResults, USERS_PER_PAGE, 9);
|
||||
if ($Pages) { ?>
|
||||
<div class="linkbox pager"><?=($Pages)?></div>
|
||||
<? } ?>
|
||||
<form class="search_form" name="users" action="user.php" method="get">
|
||||
<input type="hidden" name="action" value="search" />
|
||||
<table class="layout" width="100%">
|
||||
|
@ -764,11 +764,11 @@ function check_paranoia_here($Setting) {
|
||||
if ($CategoryName == 'Music') {
|
||||
$ArtistForm = Requests::get_artists($RequestID);
|
||||
$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') {
|
||||
$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 {
|
||||
$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';
|
||||
@ -781,11 +781,11 @@ function check_paranoia_here($Setting) {
|
||||
$Tags = $Request['Tags'];
|
||||
$TagList = array();
|
||||
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 ?>
|
||||
<?=($TagList)?>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
|
@ -140,15 +140,16 @@ function UnBan(ip, id, elemID) {
|
||||
<div class="thin">
|
||||
<div class="header">
|
||||
<h2>IP address history for <a href="/user.php?id=<?=$UserID?>"><?=$Username?></a></h2>
|
||||
</div>
|
||||
<div class="linkbox">
|
||||
<? if ($UsersOnly) { ?>
|
||||
<a href="userhistory.php?action=ips&userid=<?=$UserID?>" class="brackets">View all IP addresses</a>
|
||||
<? } else { ?>
|
||||
<a href="userhistory.php?action=ips&userid=<?=$UserID?>&usersonly=1" class="brackets">View IP addresses with users</a>
|
||||
<? } ?>
|
||||
<br />
|
||||
<?=$Pages?>
|
||||
</div>
|
||||
<? if ($Pages) { ?>
|
||||
<div class="linkbox pager"><?=$Pages?></div>
|
||||
<? } ?>
|
||||
</div>
|
||||
<table>
|
||||
<tr class="colhead">
|
||||
|
@ -317,8 +317,4 @@
|
||||
</div>
|
||||
<? } ?>
|
||||
</div>
|
||||
<?
|
||||
|
||||
View::show_footer();
|
||||
|
||||
?>
|
||||
<? View::show_footer(); ?>
|
||||
|
@ -15,9 +15,9 @@
|
||||
<div class="thin">
|
||||
<div class="header">
|
||||
<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]]
|
||||
</div>
|
||||
</p>
|
||||
</div>
|
||||
<form class="add_form" name="aliases" action="wiki.php" method="get">
|
||||
<input type="hidden" name="action" id="action" value="compare" />
|
||||
|
@ -111,12 +111,10 @@
|
||||
</form>
|
||||
</div>
|
||||
<br />
|
||||
<div class="linkbox">
|
||||
<?
|
||||
$Pages = Format::get_pages($Page, $NumResults, ARTICLES_PER_PAGE);
|
||||
echo $Pages;
|
||||
?>
|
||||
</div>
|
||||
<? $Pages = Format::get_pages($Page, $NumResults, ARTICLES_PER_PAGE);
|
||||
if ($Pages) { ?>
|
||||
<div class="linkbox pager"><?=($Pages)?></div>
|
||||
<? } ?>
|
||||
<table width="100%">
|
||||
<tr class="colhead">
|
||||
<td>Article</td>
|
||||
|
@ -117,9 +117,9 @@ var ajax = {
|
||||
//Bookmarks
|
||||
function Bookmark(type, id, newName) {
|
||||
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() {
|
||||
var bookmarklinks = $('.bookmarklink_' + type + '_' + id).objects;
|
||||
var bookmarklinks = $('#bookmarklink_' + type + '_' + id).objects;
|
||||
for (var i = 0; i < bookmarklinks.length; i++) {
|
||||
$(bookmarklinks[i].parentNode.parentNode.parentNode).add_class('bookmarked');
|
||||
bookmarklinks[i].onclick = function() { Unbookmark(type, id, oldName); return false; };
|
||||
@ -146,9 +146,9 @@ function Unbookmark(type, id, newName) {
|
||||
$('.bookmark_' + id).remove();
|
||||
});
|
||||
} 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() {
|
||||
var bookmarklinks = $('.bookmarklink_' + type + '_' + id).objects;
|
||||
var bookmarklinks = $('#bookmarklink_' + type + '_' + id).objects;
|
||||
for (var i = 0; i < bookmarklinks.length; i++) {
|
||||
$(bookmarklinks[i].parentNode.parentNode.parentNode).remove_class('bookmarked');
|
||||
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