mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-18 04:01:35 +00:00
Empty commit
This commit is contained in:
parent
562d4e3f49
commit
3e8fc731cc
@ -13,9 +13,9 @@ public static function format_reports_remaster_info($Remastered, $RemasterTitle,
|
||||
$RemasterDisplayString = ' <';
|
||||
if ($RemasterTitle != '' && $RemasterYear != '') {
|
||||
$RemasterDisplayString .= "$RemasterTitle - $RemasterYear";
|
||||
} else if ($RemasterTitle != '' && $RemasterYear == '') {
|
||||
} elseif ($RemasterTitle != '' && $RemasterYear == '') {
|
||||
$RemasterDisplayString .= $RemasterTitle;
|
||||
} else if ($RemasterTitle == '' && $RemasterYear != '') {
|
||||
} elseif ($RemasterTitle == '' && $RemasterYear != '') {
|
||||
$RemasterDisplayString .= $RemasterYear;
|
||||
}
|
||||
$RemasterDisplayString .= '>';
|
||||
|
@ -10,13 +10,13 @@ public static function update_sphinx_requests($RequestID) {
|
||||
G::$DB->query("
|
||||
REPLACE INTO sphinx_requests_delta (
|
||||
ID, UserID, TimeAdded, LastVote, CategoryID, Title,
|
||||
Year, ReleaseType, CatalogueNumber, BitrateList,
|
||||
Year, ReleaseType, CatalogueNumber, RecordLabel, BitrateList,
|
||||
FormatList, MediaList, LogCue, FillerID, TorrentID,
|
||||
TimeFilled, Visible, Votes, Bounty)
|
||||
SELECT
|
||||
ID, r.UserID, UNIX_TIMESTAMP(TimeAdded) AS TimeAdded,
|
||||
UNIX_TIMESTAMP(LastVote) AS LastVote, CategoryID,
|
||||
Title, Year, ReleaseType, CatalogueNumber, BitrateList,
|
||||
UNIX_TIMESTAMP(LastVote) AS LastVote, CategoryID, Title,
|
||||
Year, ReleaseType, CatalogueNumber, RecordLabel, BitrateList,
|
||||
FormatList, MediaList, LogCue, FillerID, TorrentID,
|
||||
UNIX_TIMESTAMP(TimeFilled) AS TimeFilled, Visible,
|
||||
COUNT(rv.UserID) AS Votes, SUM(rv.Bounty) >> 10 AS Bounty
|
||||
|
@ -292,7 +292,7 @@ public static function move_subscriptions($Page, $OldPageID, $NewPageID) {
|
||||
G::$DB->query("DELETE FROM users_subscriptions WHERE TopicID = '$OldPageID'");
|
||||
G::$DB->query("DELETE FROM forums_last_read_topics WHERE TopicID = $OldPageID");
|
||||
} else {
|
||||
if($NewPageID !== null) {
|
||||
if ($NewPageID !== null) {
|
||||
G::$DB->query("UPDATE IGNORE users_subscriptions_comments SET PageID = '$NewPageID' WHERE Page = '$Page' AND PageID = '$OldPageID'");
|
||||
// last read handling
|
||||
// 1) update all rows that have no key collisions (i.e. users that haven't previously read both pages or if there are only comments on one page)
|
||||
|
@ -265,12 +265,10 @@ function music_form($GenreTags) {
|
||||
var useragent = navigator.userAgent;
|
||||
var match = useragent.split('Version/');
|
||||
var version = parseFloat(match[1]);
|
||||
if (version >= 12.00) {
|
||||
show();
|
||||
}
|
||||
}
|
||||
|
||||
else if (navigator.appName != 'Microsoft Internet Explorer') {
|
||||
if (version >= 12.00) {
|
||||
show();
|
||||
}
|
||||
} else if (navigator.appName != 'Microsoft Internet Explorer') {
|
||||
show();
|
||||
}
|
||||
}
|
||||
|
@ -512,38 +512,20 @@ public static function update_hash($GroupID) {
|
||||
G::$DB->query("
|
||||
REPLACE INTO sphinx_delta
|
||||
(ID, GroupID, GroupName, TagList, Year, CategoryID, Time, ReleaseType, RecordLabel,
|
||||
CatalogueNumber, VanityHouse, Size, Snatched, Seeders, Leechers, LogScore, Scene,
|
||||
HasLog, HasCue, FreeTorrent, Media, Format, Encoding, RemasterYear, RemasterTitle,
|
||||
CatalogueNumber, VanityHouse, Size, Snatched, Seeders, Leechers, LogScore, Scene, HasLog,
|
||||
HasCue, FreeTorrent, Media, Format, Encoding, Description, RemasterYear, RemasterTitle,
|
||||
RemasterRecordLabel, RemasterCatalogueNumber, FileList, VoteScore, ArtistName)
|
||||
SELECT
|
||||
t.ID, g.ID, Name, TagList, Year, CategoryID, UNIX_TIMESTAMP(t.Time), ReleaseType,
|
||||
RecordLabel, CatalogueNumber, VanityHouse, Size >> 10 AS Size, Snatched, Seeders,
|
||||
Leechers, LogScore, CAST(Scene AS CHAR), CAST(HasLog AS CHAR), CAST(HasCue AS CHAR),
|
||||
CAST(FreeTorrent AS CHAR), Media, Format, Encoding,
|
||||
CAST(FreeTorrent AS CHAR), Media, Format, Encoding, Description,
|
||||
RemasterYear, RemasterTitle, RemasterRecordLabel, RemasterCatalogueNumber,
|
||||
REPLACE(FileList, '_', ' ') AS FileList, $VoteScore, '".db_string($ArtistName)."'
|
||||
FROM torrents AS t
|
||||
JOIN torrents_group AS g ON g.ID = t.GroupID
|
||||
WHERE g.ID = $GroupID");
|
||||
|
||||
/* G::$DB->query("
|
||||
INSERT INTO sphinx_delta
|
||||
(ID, ArtistName)
|
||||
SELECT torrents.ID, artists.ArtistName
|
||||
FROM (
|
||||
SELECT
|
||||
GroupID,
|
||||
GROUP_CONCAT(aa.Name separator ' ') AS ArtistName
|
||||
FROM torrents_artists AS ta
|
||||
JOIN artists_alias AS aa ON aa.AliasID = ta.AliasID
|
||||
WHERE ta.GroupID = $GroupID
|
||||
AND ta.Importance IN ('1', '4', '5', '6')
|
||||
GROUP BY ta.GroupID
|
||||
) AS artists
|
||||
JOIN torrents USING(GroupID)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
ArtistName = VALUES(ArtistName)");
|
||||
*/
|
||||
G::$Cache->delete_value("torrents_details_$GroupID");
|
||||
G::$Cache->delete_value("torrent_group_$GroupID");
|
||||
|
||||
|
@ -27,6 +27,14 @@ function is_number($Str) {
|
||||
}
|
||||
}
|
||||
|
||||
function is_date($Date) {
|
||||
list($Y, $M, $D) = explode('-', $Date);
|
||||
if (checkdate($M, $D, $Y)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that some given variables (usually in _GET or _POST) are numbers
|
||||
*
|
||||
|
@ -1,5 +1,8 @@
|
||||
CHANGELOG
|
||||
|
||||
2013-09-14 by Ajax
|
||||
Added date constrains to forum search
|
||||
|
||||
2013-09-12 by porkpie
|
||||
Switch to SphinxQL for request searches
|
||||
|
||||
|
@ -814,6 +814,7 @@ CREATE TABLE `sphinx_delta` (
|
||||
`RemasterRecordLabel` varchar(50) DEFAULT NULL,
|
||||
`RemasterCatalogueNumber` varchar(50) DEFAULT NULL,
|
||||
`FileList` mediumtext,
|
||||
`Description` text,
|
||||
`VoteScore` float NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ID`),
|
||||
KEY `GroupID` (`GroupID`)
|
||||
|
@ -165,9 +165,9 @@
|
||||
}
|
||||
if ($Releases[$GroupID]['Importance'] == 1) {
|
||||
$ReleaseTypeName = $ReleaseTypes[$Download['ReleaseType']];
|
||||
} else if ($Releases[$GroupID]['Importance'] == 2) {
|
||||
} elseif ($Releases[$GroupID]['Importance'] == 2) {
|
||||
$ReleaseTypeName = 'Guest Appearance';
|
||||
} else if ($Releases[$GroupID]['Importance'] == 3) {
|
||||
} elseif ($Releases[$GroupID]['Importance'] == 3) {
|
||||
$ReleaseTypeName = 'Remixed By';
|
||||
}
|
||||
$Collector->add_file($TorrentFile, $Download, $ReleaseTypeName);
|
||||
|
@ -19,7 +19,7 @@
|
||||
}
|
||||
|
||||
|
||||
if(!Forums::check_forumperm($ForumID, 'Write') || !Forums::check_forumperm($ForumID, 'Create')) {
|
||||
if (!Forums::check_forumperm($ForumID, 'Write') || !Forums::check_forumperm($ForumID, 'Create')) {
|
||||
error(403);
|
||||
}
|
||||
View::show_header('Forums > '.$Forum['Name'].' > New Topic','comments,bbcode,jquery.validate,form_validate');
|
||||
|
@ -22,6 +22,39 @@
|
||||
$Search = '';
|
||||
}
|
||||
|
||||
$ThreadAfterDate = db_string($_GET['thread_created_after']);
|
||||
$ThreadBeforeDate = db_string($_GET['thread_created_before']);
|
||||
$ThreadAfterDateDisplay = "";
|
||||
$ThreadBeforeDateDisplay = "";
|
||||
|
||||
if (!empty($ThreadAfterDate) && !is_date($ThreadAfterDate)) {
|
||||
error('Incorrect topic after date format');
|
||||
} elseif (!empty($ThreadAfterDate)) {
|
||||
$ThreadAfterDateDisplay = "value='" . date('Y-m-d', strtotime($ThreadAfterDate)) . "'";
|
||||
}
|
||||
if (!empty($ThreadBeforeDate) && !is_date($ThreadBeforeDate)) {
|
||||
error('Incorrect topic before date format');
|
||||
} elseif (!empty($ThreadBeforeDate)) {
|
||||
$ThreadBeforeDateDisplay = "value='" . date('Y-m-d', strtotime($ThreadBeforeDate)) . "'";
|
||||
}
|
||||
|
||||
$PostAfterDate = db_string($_GET['post_created_after']);
|
||||
$PostBeforeDate = db_string($_GET['post_created_before']);
|
||||
$PostAfterDateDisplay = "";
|
||||
$PostBeforeDateDisplay = "";
|
||||
|
||||
if (!empty($PostAfterDate) && !is_date($PostAfterDate)) {
|
||||
error('Incorrect post after date format');
|
||||
} elseif (!empty($PostAfterDate)) {
|
||||
$PostAfterDateDisplay = "value='" . date('Y-m-d', strtotime($PostAfterDate)) . "'";
|
||||
}
|
||||
if (!empty($PostBeforeDate) && !is_date($PostBeforeDate)) {
|
||||
error('Incorrect post before date format');
|
||||
} elseif (!empty($PostBeforeDate)) {
|
||||
$PostBeforeDateDisplay = "value='" . date('Y-m-d', strtotime($PostBeforeDate)) . "'";
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Searching for posts by a specific user
|
||||
if (!empty($_GET['user'])) {
|
||||
@ -90,6 +123,21 @@
|
||||
<input type="text" name="search" size="70" value="<?=display_str($Search)?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Username:</strong></td>
|
||||
<td>
|
||||
<input type="text" name="user" size="70" value="<?=display_str($User)?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Topic created:</strong></td>
|
||||
<td>
|
||||
After:
|
||||
<input type="date" name="thread_created_after" id="thread_created_after" <?=$ThreadAfterDateDisplay?>/>
|
||||
Before:
|
||||
<input type="date" name="thread_created_before" id="thread_created_before" <?=$ThreadBeforeDateDisplay?> />
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
if (empty($ThreadID)) { ?>
|
||||
<tr>
|
||||
@ -101,6 +149,15 @@
|
||||
<label for="type_body">Post bodies</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="post_created_row" <? if ($Type == 'title') { echo "class='hidden'"; } ?>>
|
||||
<td><strong>Post created:</strong></td>
|
||||
<td>
|
||||
After:
|
||||
<input type="date" name="post_created_after" id="post_created_after" <?=$PostAfterDateDisplay?>/>
|
||||
Before:
|
||||
<input type="date" name="post_created_before" id="post_created_before" <?=$PostBeforeDateDisplay?> />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Forums:</strong></td>
|
||||
<td>
|
||||
@ -161,12 +218,6 @@
|
||||
<? } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Username:</strong></td>
|
||||
<td>
|
||||
<input type="text" name="user" size="70" value="<?=display_str($User)?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="center">
|
||||
<input type="submit" value="Search" />
|
||||
@ -182,7 +233,7 @@
|
||||
|
||||
if ($Type == 'body') {
|
||||
|
||||
$sql = "
|
||||
$SQL = "
|
||||
SELECT
|
||||
SQL_CALC_FOUND_ROWS
|
||||
t.ID,
|
||||
@ -198,30 +249,42 @@
|
||||
WHERE " . Forums::user_forums_sql() . ' AND ';
|
||||
|
||||
//In tests, this is significantly faster than LOCATE
|
||||
$sql .= "p.Body LIKE '%";
|
||||
$sql .= implode("%' AND p.Body LIKE '%", $Words);
|
||||
$sql .= "%' ";
|
||||
$SQL .= "p.Body LIKE '%";
|
||||
$SQL .= implode("%' AND p.Body LIKE '%", $Words);
|
||||
$SQL .= "%' ";
|
||||
|
||||
//$sql .= "LOCATE('";
|
||||
//$sql .= implode("', p.Body) AND LOCATE('", $Words);
|
||||
//$sql .= "', p.Body) ";
|
||||
//$SQL .= "LOCATE('";
|
||||
//$SQL .= implode("', p.Body) AND LOCATE('", $Words);
|
||||
//$SQL .= "', p.Body) ";
|
||||
|
||||
if (isset($SearchForums)) {
|
||||
$sql.=" AND f.ID IN ($SearchForums)";
|
||||
$SQL.=" AND f.ID IN ($SearchForums)";
|
||||
}
|
||||
if (isset($AuthorID)) {
|
||||
$sql.=" AND p.AuthorID='$AuthorID' ";
|
||||
$SQL.=" AND p.AuthorID='$AuthorID' ";
|
||||
}
|
||||
if (!empty($ThreadID)) {
|
||||
$sql.=" AND t.ID='$ThreadID' ";
|
||||
$SQL.=" AND t.ID='$ThreadID' ";
|
||||
}
|
||||
if (!empty($ThreadAfterDate)) {
|
||||
$SQL .= " AND t.CreatedTime >= '$ThreadAfterDate'";
|
||||
}
|
||||
if (!empty($ThreadBeforeDate)) {
|
||||
$SQL .= " AND t.CreatedTime <= '$ThreadBeforeDate'";
|
||||
}
|
||||
if (!empty($PostAfterDate)) {
|
||||
$SQL .= " AND p.AddedTime >= '$PostAfterDate'";
|
||||
}
|
||||
if (!empty($PostBeforeDate)) {
|
||||
$SQL .= " AND p.AddedTime <= '$PostBeforeDate'";
|
||||
}
|
||||
|
||||
$sql .= "
|
||||
$SQL .= "
|
||||
ORDER BY p.AddedTime DESC
|
||||
LIMIT $Limit";
|
||||
|
||||
} else {
|
||||
$sql = "
|
||||
$SQL = "
|
||||
SELECT
|
||||
SQL_CALC_FOUND_ROWS
|
||||
t.ID,
|
||||
@ -230,26 +293,33 @@
|
||||
f.Name,
|
||||
t.LastPostTime,
|
||||
'',
|
||||
''
|
||||
'',
|
||||
t.CreatedTime
|
||||
FROM forums_topics AS t
|
||||
JOIN forums AS f ON f.ID=t.ForumID
|
||||
WHERE " . Forums::user_forums_sql() . ' AND ';
|
||||
$sql .= "t.Title LIKE '%";
|
||||
$sql .= implode("%' AND t.Title LIKE '%", $Words);
|
||||
$sql .= "%' ";
|
||||
$SQL .= "t.Title LIKE '%";
|
||||
$SQL .= implode("%' AND t.Title LIKE '%", $Words);
|
||||
$SQL .= "%' ";
|
||||
if (isset($SearchForums)) {
|
||||
$sql .= " AND f.ID IN ($SearchForums)";
|
||||
$SQL .= " AND f.ID IN ($SearchForums)";
|
||||
}
|
||||
if (isset($AuthorID)) {
|
||||
$sql .= " AND t.AuthorID = '$AuthorID' ";
|
||||
$SQL .= " AND t.AuthorID = '$AuthorID' ";
|
||||
}
|
||||
$sql .= "
|
||||
if (!empty($ThreadAfterDate)) {
|
||||
$SQL .= " AND t.CreatedTime >= '$ThreadAfterDate'";
|
||||
}
|
||||
if (!empty($ThreadBeforeDate)) {
|
||||
$SQL .= " AND t.CreatedTime <= '$ThreadBeforeDate'";
|
||||
}
|
||||
$SQL .= "
|
||||
ORDER BY t.LastPostTime DESC
|
||||
LIMIT $Limit";
|
||||
}
|
||||
|
||||
// Perform the query
|
||||
$Records = $DB->query($sql);
|
||||
$Records = $DB->query($SQL);
|
||||
$DB->query('SELECT FOUND_ROWS()');
|
||||
list($Results) = $DB->next_record();
|
||||
$DB->set_query_id($Records);
|
||||
@ -262,14 +332,15 @@
|
||||
<tr class="colhead">
|
||||
<td>Forum</td>
|
||||
<td><?=((!empty($ThreadID)) ? 'Post begins' : 'Topic')?></td>
|
||||
<td>Time</td>
|
||||
<td>Topic creation time</td>
|
||||
<td>Last post time</td>
|
||||
</tr>
|
||||
<? if (!$DB->has_results()) { ?>
|
||||
<tr><td colspan="3">Nothing found<?=((isset($AuthorID) && $AuthorID == 0) ? ' (unknown username)' : '')?>!</td></tr>
|
||||
<? }
|
||||
|
||||
$Row = 'a'; // For the pretty colours
|
||||
while (list($ID, $Title, $ForumID, $ForumName, $LastTime, $PostID, $Body) = $DB->next_record()) {
|
||||
while (list($ID, $Title, $ForumID, $ForumName, $LastTime, $PostID, $Body, $ThreadCreatedTime) = $DB->next_record()) {
|
||||
$Row = $Row === 'a' ? 'b' : 'a';
|
||||
// Print results
|
||||
?>
|
||||
@ -288,6 +359,9 @@
|
||||
<a href="#" onclick="$('#post_<?=$PostID?>_text').gtoggle(); return false;">(Show)</a> <span style="float: right;" class="tooltip last_read" title="Jump to post"><a href="forums.php?action=viewthread&threadid=<?=$ID?><? if (!empty($PostID)) { echo "&postid=$PostID#post$PostID"; } ?>"></a></span>
|
||||
<? } ?>
|
||||
</td>
|
||||
<td>
|
||||
<?=time_diff($ThreadCreatedTime)?>
|
||||
</td>
|
||||
<td>
|
||||
<?=time_diff($LastTime)?>
|
||||
</td>
|
||||
|
@ -20,7 +20,7 @@
|
||||
if ($_GET['id'] && is_number($_GET['id'])) {
|
||||
$View = 'Single report';
|
||||
$Where = 'r.ID = ' . $_GET['id'];
|
||||
} else if (empty($_GET['view'])) {
|
||||
} elseif (empty($_GET['view'])) {
|
||||
$View = 'New';
|
||||
$Where = "Status = 'New'";
|
||||
} else {
|
||||
@ -205,7 +205,7 @@
|
||||
<td colspan="2">
|
||||
<? if ($ClaimerID == $LoggedUser['ID']) { ?>
|
||||
<span id="claimed_<?=$ReportID?>">Claimed by <?=Users::format_username($ClaimerID, false, false, false, false)?> <a href="#" onclick="unClaim(<?=$ReportID?>); return false;" class="brackets">Unclaim</a></span>
|
||||
<? } else if ($ClaimerID) { ?>
|
||||
<? } elseif ($ClaimerID) { ?>
|
||||
<span id="claimed_<?=$ReportID?>">Claimed by <?=Users::format_username($ClaimerID, false, false, false, false)?></span>
|
||||
<? } else { ?>
|
||||
<a href="#" id="claim_<?=$ReportID?>" onclick="claim(<?=$ReportID?>); return false;" class="brackets">Claim</a>
|
||||
|
@ -24,9 +24,9 @@
|
||||
|
||||
if (!isset($_GET['type'])) {
|
||||
error(404);
|
||||
} else if (array_key_exists($_GET['type'], $Types[$CategoryID])) {
|
||||
} elseif (array_key_exists($_GET['type'], $Types[$CategoryID])) {
|
||||
$ReportType = $Types[$CategoryID][$_GET['type']];
|
||||
} else if (array_key_exists($_GET['type'],$Types['master'])) {
|
||||
} elseif (array_key_exists($_GET['type'], $Types['master'])) {
|
||||
$ReportType = $Types['master'][$_GET['type']];
|
||||
} else {
|
||||
//There was a type but it wasn't an option!
|
||||
|
@ -26,8 +26,8 @@
|
||||
$DB->query("
|
||||
SELECT tg.CategoryID
|
||||
FROM torrents_group AS tg
|
||||
JOIN torrents AS t ON t.GroupID=tg.ID
|
||||
WHERE t.ID = ".$TorrentID);
|
||||
JOIN torrents AS t ON t.GroupID = tg.ID
|
||||
WHERE t.ID = $TorrentID");
|
||||
if (!$DB->has_results()) {
|
||||
$Err = 'No torrent with that ID exists!';
|
||||
} else {
|
||||
@ -37,10 +37,10 @@
|
||||
if (!isset($_POST['type'])) {
|
||||
echo 'Missing Type';
|
||||
die();
|
||||
} else if (array_key_exists($_POST['type'], $Types[$CategoryID])) {
|
||||
} elseif (array_key_exists($_POST['type'], $Types[$CategoryID])) {
|
||||
$Type = $_POST['type'];
|
||||
$ReportType = $Types[$CategoryID][$Type];
|
||||
} else if (array_key_exists($_POST['type'],$Types['master'])) {
|
||||
} elseif (array_key_exists($_POST['type'], $Types['master'])) {
|
||||
$Type = $_POST['type'];
|
||||
$ReportType = $Types['master'][$Type];
|
||||
} else {
|
||||
@ -66,8 +66,8 @@
|
||||
$DB->query("
|
||||
SELECT ID
|
||||
FROM reportsv2
|
||||
WHERE TorrentID=$TorrentID
|
||||
AND ReporterID=".db_string($LoggedUser['ID'])."
|
||||
WHERE TorrentID = $TorrentID
|
||||
AND ReporterID = ".db_string($LoggedUser['ID'])."
|
||||
AND ReportedTime > '".time_minus(3)."'");
|
||||
if ($DB->has_results()) {
|
||||
die();
|
||||
@ -81,7 +81,7 @@
|
||||
|
||||
$ReportID = $DB->inserted_id();
|
||||
|
||||
$Cache->delete_value('reports_torrent_'.$TorrentID);
|
||||
$Cache->delete_value("reports_torrent_$TorrentID");
|
||||
$Cache->increment('num_torrent_reportsv2');
|
||||
|
||||
echo $ReportID;
|
||||
|
@ -12,7 +12,13 @@
|
||||
if (!is_number($_GET['id'])) {
|
||||
die();
|
||||
}
|
||||
$DB->query("UPDATE reportsv2 SET Status='InProgress', ResolverID=".$LoggedUser['ID']." WHERE ID=".$_GET['id']);
|
||||
|
||||
$DB->query("
|
||||
UPDATE reportsv2
|
||||
SET Status = 'InProgress',
|
||||
ResolverID = " . $LoggedUser['ID'] . "
|
||||
WHERE ID = " . $_GET['id']);
|
||||
|
||||
if ($DB->affected_rows() == 0) {
|
||||
echo '0';
|
||||
} else {
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
if (array_key_exists($_POST['type'], $Types[$CategoryID])) {
|
||||
$ReportType = $Types[$CategoryID][$_POST['type']];
|
||||
} else if (array_key_exists($_POST['type'],$Types['master'])) {
|
||||
} elseif (array_key_exists($_POST['type'],$Types['master'])) {
|
||||
$ReportType = $Types['master'][$_POST['type']];
|
||||
} else {
|
||||
echo 'HAX IN REPORT TYPE';
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
if (array_key_exists($_POST['type'], $Types[$CategoryID])) {
|
||||
$ReportType = $Types[$CategoryID][$_POST['type']];
|
||||
} else if (array_key_exists($_POST['type'], $Types['master'])) {
|
||||
} elseif (array_key_exists($_POST['type'], $Types['master'])) {
|
||||
$ReportType = $Types['master'][$_POST['type']];
|
||||
} else {
|
||||
//There was a type but it wasn't an option!
|
||||
@ -39,7 +39,7 @@
|
||||
|
||||
if (!isset($_POST['from_delete'])) {
|
||||
$Report = true;
|
||||
} else if (!is_number($_POST['from_delete'])) {
|
||||
} elseif (!is_number($_POST['from_delete'])) {
|
||||
echo 'Hax occured in from_delete';
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
} else {
|
||||
$Message = "I am PMing you as you are the uploader of [url=https://".SSL_SITE_URL."/torrents.php?torrentid=$TorrentID]the above torrent[/url].\n\n$Message";
|
||||
}
|
||||
} else if ($Recipient == 'Reporter') {
|
||||
} elseif ($Recipient == 'Reporter') {
|
||||
$ToID = $_POST['reporterid'];
|
||||
$Message = "You reported [url=https://".SSL_SITE_URL."/torrents.php?torrentid=$TorrentID]the above torrent[/url] for the reason ".$ReportType['title'].":\n[quote]".$_POST['report_reason']."[/quote]\n$Message";
|
||||
} else {
|
||||
|
@ -27,10 +27,10 @@
|
||||
|
||||
if (!isset($_POST['type'])) {
|
||||
error(404);
|
||||
} else if (array_key_exists($_POST['type'], $Types[$CategoryID])) {
|
||||
} elseif (array_key_exists($_POST['type'], $Types[$CategoryID])) {
|
||||
$Type = $_POST['type'];
|
||||
$ReportType = $Types[$CategoryID][$Type];
|
||||
} else if (array_key_exists($_POST['type'],$Types['master'])) {
|
||||
} elseif (array_key_exists($_POST['type'], $Types['master'])) {
|
||||
$Type = $_POST['type'];
|
||||
$ReportType = $Types['master'][$Type];
|
||||
} else {
|
||||
|
@ -840,7 +840,7 @@ function next_hour() {
|
||||
SET um.Enabled = '2',
|
||||
ui.BanDate = '$sqltime',
|
||||
ui.BanReason = '3',
|
||||
ui.AdminComment = CONCAT('$sqltime - Disabled for inactivity (never logged in)', ui.AdminComment)
|
||||
ui.AdminComment = CONCAT('$sqltime - Disabled for inactivity (never logged in)\n\n', ui.AdminComment)
|
||||
WHERE um.LastAccess = '0000-00-00 00:00:00'
|
||||
AND ui.JoinDate < '".time_minus(60 * 60 * 24 * 7)."'
|
||||
AND um.Enabled != '2'
|
||||
|
@ -5,14 +5,14 @@
|
||||
|
||||
authorize();
|
||||
|
||||
if($_POST['submit'] == 'Reorder') { // Reorder
|
||||
if ($_POST['submit'] == 'Reorder') { // Reorder
|
||||
foreach ($_POST['item'] as $Position => $Item) {
|
||||
$Position = db_string($Position);
|
||||
$Item = db_string($Item);
|
||||
$DB->query('UPDATE `do_not_upload` SET `Sequence` = ' . $Position . ' WHERE `id` = '. $Item);
|
||||
}
|
||||
|
||||
} else if ($_POST['submit'] == 'Delete') { //Delete
|
||||
} elseif ($_POST['submit'] == 'Delete') { //Delete
|
||||
if (!is_number($_POST['id']) || $_POST['id'] == '') {
|
||||
error(0);
|
||||
}
|
||||
|
@ -6,8 +6,8 @@
|
||||
if ($_POST['set']) {
|
||||
$Expiration = $_POST['length'] * 60;
|
||||
NotificationsManager::set_global_notification($_POST['message'], $_POST['url'], $_POST['importance'], $Expiration);
|
||||
} elseif($_POST['delete']) {
|
||||
} elseif ($_POST['delete']) {
|
||||
NotificationsManager::delete_global_notification();
|
||||
}
|
||||
|
||||
header("Location: tools.php?action=global_notification");
|
||||
header("Location: tools.php?action=global_notification");
|
||||
|
@ -115,7 +115,7 @@ function get_group_info($GroupID, $Return = true, $RevisionID = 0, $PersonalProp
|
||||
if (count($TorrentList) === 0 && $ApiCall == false) {
|
||||
header('Location: log.php?search='.(empty($_GET['torrentid']) ? "Group+$GroupID" : "Torrent+$_GET[torrentid]"));
|
||||
die();
|
||||
} else if (count($TorrentList) === 0 && $ApiCall == true) {
|
||||
} elseif (count($TorrentList) === 0 && $ApiCall == true) {
|
||||
return NULL;
|
||||
}
|
||||
if (in_array(0, $DB->collect('Seeders'))) {
|
||||
@ -312,7 +312,7 @@ function filelist($Str) {
|
||||
|
||||
if (array_key_exists($ReportType, $Types[$GroupCategoryID])) {
|
||||
$ReportType = $Types[$GroupCategoryID][$ReportType];
|
||||
} else if (array_key_exists($ReportType, $Types['master'])) {
|
||||
} elseif (array_key_exists($ReportType, $Types['master'])) {
|
||||
$ReportType = $Types['master'][$ReportType];
|
||||
} else {
|
||||
//There was a type but it wasn't an option!
|
||||
|
@ -284,7 +284,7 @@ function header_link($SortKey, $DefaultWay = 'desc') {
|
||||
|
||||
// print row
|
||||
?>
|
||||
<tr class="torrent torrent_row<?=($TorrentInfo['IsSnatched'] ? ' snatched_torrent' : '') . ($GroupInfo['Flags']['IsSnatched'] ? ' snatched_group' : '')?>" id="torrent<?=$TorrentID?>"<?=($MatchingArtistsText ? 'title="'.display_str($MatchingArtistsText).'"' : '')?>>
|
||||
<tr class="torrent torrent_row<?=($TorrentInfo['IsSnatched'] ? ' snatched_torrent' : '') . ($GroupInfo['Flags']['IsSnatched'] ? ' snatched_group' : '')?>" id="torrent<?=$TorrentID?>"<?=($MatchingArtistsText ? ' title="'.display_str($MatchingArtistsText).'"' : '')?>>
|
||||
<td style="text-align: center;"><input type="checkbox" class="notify_box notify_box_<?=$FilterID?>" value="<?=$TorrentID?>" id="clear_<?=$TorrentID?>" tabindex="1" /></td>
|
||||
<td class="center cats_col"><div title="<?=$TorrentTags->title()?>"class="<?=Format::css_category($GroupCategoryID)?> <?=$TorrentTags->css_name()?>"></div></td>
|
||||
<td class="big_info">
|
||||
|
@ -224,7 +224,7 @@ function checked($Checked) {
|
||||
<td class="label tooltip" title="Enabling torrent grouping will place multiple formats of the same torrent group together beneath a common header."><strong>Torrent grouping</strong></td>
|
||||
<td>
|
||||
<div class="option_group">
|
||||
<input type="checkbox" name="disablegrouping" id="disablegrouping"<?Format::selected('DisableGrouping2', 0, 'checked', $SiteOptions);?> />
|
||||
<input type="checkbox" name="disablegrouping" id="disablegrouping"<?=$SiteOptions['DisableGrouping2'] == 0 ? ' checked="checked"' : ''?> />
|
||||
<label for="disablegrouping">Enable torrent grouping</label>
|
||||
</div>
|
||||
</td>
|
||||
|
@ -154,7 +154,7 @@
|
||||
|
||||
if (!empty($_POST['donor_points_submit']) && isset($_POST['donation_value']) && isset($_POST['donation_currency'])) {
|
||||
Donations::regular_donate($UserID, $_POST['donation_value'], "Add Points", $_POST['donation_reason'], $_POST['donation_currency']);
|
||||
} elseif(!empty($_POST['donor_values_submit'])) {
|
||||
} elseif (!empty($_POST['donor_values_submit'])) {
|
||||
Donations::update_rank($UserID, $_POST['donor_rank'], $_POST['total_donor_rank'], $_POST['reason']);
|
||||
}
|
||||
|
||||
|
@ -119,9 +119,9 @@
|
||||
$Request = $Requests[$Result['PageID']];
|
||||
$CategoryName = $Categories[$Request['CategoryID'] - 1];
|
||||
$Links = 'Request: ';
|
||||
if($CategoryName == "Music") {
|
||||
if ($CategoryName == 'Music') {
|
||||
$Links .= Artists::display_artists(Requests::get_artists($Result['PageID'])) . '<a href="requests.php?action=view&id=' . $Result['PageID'] . '" dir="ltr">' . $Request['Title'] . " [" . $Request['Year'] . "]</a>";
|
||||
} else if($CategoryName == "Audiobooks" || $CategoryName == "Comedy") {
|
||||
} elseif ($CategoryName == "Audiobooks" || $CategoryName == "Comedy") {
|
||||
$Links .= '<a href="requests.php?action=view&id=' . $Result['PageID'] . '" dir="ltr">' . $Request['Title'] . " [" . $Request['Year'] . "]</a>";
|
||||
} else {
|
||||
$Links .= '<a href="requests.php?action=view&id=' . $Result['PageID'] . '">' . $Request['Title'] . "</a>";
|
||||
@ -135,7 +135,7 @@
|
||||
}
|
||||
$GroupInfo = $TorrentGroups[$Result['PageID']];
|
||||
$Links = 'Torrent: ' . Artists::display_artists($GroupInfo['ExtendedArtists']) . '<a href="torrents.php?id=' . $GroupInfo['ID'] . '" dir="ltr">' . $GroupInfo['Name'] . '</a>';
|
||||
if($GroupInfo['Year'] > 0) {
|
||||
if ($GroupInfo['Year'] > 0) {
|
||||
$Links .= " [" . $GroupInfo['Year'] . "]";
|
||||
}
|
||||
if ($GroupInfo['ReleaseType'] > 0) {
|
||||
|
@ -160,7 +160,7 @@
|
||||
$CategoryName = $Categories[$CategoryID - 1];
|
||||
|
||||
$Links = 'Request: ';
|
||||
if($CategoryName == "Music" || $CategoryName == "Audiobooks" || $CategoryName == "Comedy") {
|
||||
if ($CategoryName == 'Music' || $CategoryName == 'Audiobooks' || $CategoryName == 'Comedy') {
|
||||
$Links .= ($CategoryName == 'Music' ? Artists::display_artists(Requests::get_artists($Result['PageID'])) : '') . '<a href="requests.php?action=view&id=' . $Result['PageID'] . '" dir="ltr">' . $Request['Title'] . " [" . $Request['Year'] . "]</a>";
|
||||
} else {
|
||||
$Links .= '<a href="requests.php?action=view&id=' . $Result['PageID'] . '">' . $Request['Title'] . "</a>";
|
||||
@ -173,7 +173,7 @@
|
||||
}
|
||||
$GroupInfo = $TorrentGroups[$Result['PageID']];
|
||||
$Links = 'Torrent: ' . Artists::display_artists($GroupInfo['ExtendedArtists']) . '<a href="torrents.php?id=' . $GroupInfo['ID'] . '" dir="ltr">' . $GroupInfo['Name'] . '</a>';
|
||||
if($GroupInfo['Year'] > 0) {
|
||||
if ($GroupInfo['Year'] > 0) {
|
||||
$Links .= " [" . $GroupInfo['Year'] . "]";
|
||||
}
|
||||
if ($GroupInfo['ReleaseType'] > 0) {
|
||||
|
@ -386,7 +386,7 @@ source requests_delta : requests {
|
||||
Year AS YearFullText \
|
||||
FROM sphinx_requests_delta
|
||||
|
||||
sql_query_post = SET @nothing = 0
|
||||
sql_query_post_index = SET @nothing = 0
|
||||
sql_query_info = SELECT * FROM sphinx_requests_delta WHERE ID = $id
|
||||
sql_query_killlist = SELECT ID FROM sphinx_requests_delta
|
||||
|
||||
|
@ -6,4 +6,11 @@ $(document).ready(function() {
|
||||
$("input[data-category='" + id + "']").attr("checked", !isChecked);
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$("#type_body").click(function() {
|
||||
$("#post_created_row").gshow();
|
||||
});
|
||||
$("#type_title").click(function() {
|
||||
$("#post_created_row").ghide();
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user