mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-31 02:21:36 +00:00
Empty commit
This commit is contained in:
parent
a06c4ea077
commit
b4c8ebb041
@ -133,6 +133,10 @@
|
||||
$AuthorName = $UserInfo['Username'];
|
||||
$UserInfo = Users::user_info($LastAuthorID);
|
||||
$LastAuthorName = $UserInfo['Username'];
|
||||
// Bug fix for no last time available
|
||||
if ($LastTime == '0000-00-00 00:00:00') {
|
||||
$LastTime = '';
|
||||
}
|
||||
|
||||
$JsonTopics[] = array(
|
||||
'topicId' => (int) $TopicID,
|
||||
|
@ -49,6 +49,9 @@
|
||||
|
||||
// Thread information, constant across all pages
|
||||
$ThreadInfo = get_thread_info($ThreadID, true, true, true);
|
||||
if ($ThreadInfo == NULL) {
|
||||
json_die('failure', 'no such thread exists');
|
||||
}
|
||||
$ForumID = $ThreadInfo['ForumID'];
|
||||
|
||||
// Make sure they're allowed to look at the page
|
||||
@ -127,7 +130,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
//Handle subscriptions
|
||||
// Handle subscriptions
|
||||
if (($UserSubscriptions = $Cache->get_value('subscriptions_user_'.$LoggedUser['ID'])) === false) {
|
||||
$DB->query("
|
||||
SELECT TopicID
|
||||
|
@ -9,12 +9,10 @@
|
||||
$UserID = (int) $_POST['userid'];
|
||||
$Key = (int) $_POST['key'];
|
||||
$UserInfo = Users::user_info($UserID);
|
||||
$DB -> query("
|
||||
SELECT
|
||||
ac.Body,
|
||||
ac.AddedTime
|
||||
$DB->query("
|
||||
SELECT ac.Body, ac.AddedTime
|
||||
FROM artist_comments AS ac
|
||||
WHERE ac.ID='" . db_string($PostID) . "'");
|
||||
WHERE ac.ID = '" . db_string($PostID) . "'");
|
||||
list($PostBody) = $DB -> next_record();
|
||||
|
||||
View::show_header('Warn User');
|
||||
|
@ -319,7 +319,7 @@ function compare($X, $Y) {
|
||||
<? if ($NumGroups > $CollageCovers) { ?>
|
||||
<div class="linkbox pager" style="clear: left;" id="pageslinksdiv">
|
||||
<span id="firstpage" class="invisible"><a href="#" class="pageslink" onclick="collageShow.page(0, this); return false;"><< First</a> | </span>
|
||||
<span id="prevpage" class="invisible"><a href="#" id="prevpage" class="pageslink" onclick="collageShow.prevPage(); return false;">< Prev</a> | </span>
|
||||
<span id="prevpage" class="invisible"><a href="#" id="prevpage" class="pageslink" onclick="collageShow.prevPage(); return false;">< Prev</a> | </span>
|
||||
<? for ($i = 0; $i < $NumGroups / $CollageCovers; $i++) { ?>
|
||||
<span id="pagelink<?=$i?>" class="<?=(($i > 4) ? 'hidden' : '')?><?=(($i == 0) ? ' selected' : '')?>"><a href="#" class="pageslink" onclick="collageShow.page(<?=$i?>, this); return false;"><?=($CollageCovers * $i + 1)?>-<?=min($NumGroups, $CollageCovers * ($i + 1))?></a><?=(($i != ceil($NumGroups / $CollageCovers) - 1) ? ' | ' : '')?></span>
|
||||
<? } ?>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?
|
||||
function get_thread_info($ThreadID, $Return = true, $SelectiveCache = false) {
|
||||
function get_thread_info($ThreadID, $Return = true, $SelectiveCache = false, $ApiCall = false) {
|
||||
global $DB, $Cache;
|
||||
if ((!$ThreadInfo = $Cache->get_value('thread_'.$ThreadID.'_info')) || !isset($ThreadInfo['OP'])) {
|
||||
$DB->query("
|
||||
@ -19,7 +19,11 @@ function get_thread_info($ThreadID, $Return = true, $SelectiveCache = false) {
|
||||
WHERE t.ID = '$ThreadID'
|
||||
GROUP BY fp.TopicID");
|
||||
if ($DB->record_count() == 0) {
|
||||
error(404);
|
||||
if (!$ApiCall) {
|
||||
error(404);
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
$ThreadInfo = $DB->next_record(MYSQLI_ASSOC, false);
|
||||
if ($ThreadInfo['StickyPostID']) {
|
||||
|
@ -8,13 +8,11 @@
|
||||
$UserID = (int)$_POST['userid'];
|
||||
$Key = (int)$_POST['key'];
|
||||
$UserInfo = Users::user_info($UserID);
|
||||
$DB -> query("
|
||||
SELECT
|
||||
p.Body,
|
||||
t.ForumID
|
||||
$DB->query("
|
||||
SELECT p.Body, t.ForumID
|
||||
FROM forums_posts as p
|
||||
JOIN forums_topics as t on p.TopicID = t.ID
|
||||
WHERE p.ID='$PostID'");
|
||||
WHERE p.ID = '$PostID'");
|
||||
list($PostBody, $ForumID) = $DB -> next_record();
|
||||
View::show_header('Warn User');
|
||||
?>
|
||||
|
@ -11,9 +11,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (isset($_POST['convid']) && is_number($_POST['convid'])) {
|
||||
$ConvID = $_POST['convid'];
|
||||
$Subject = '';
|
||||
@ -23,7 +20,11 @@
|
||||
$Err = 'A recipient does not exist.';
|
||||
}
|
||||
}
|
||||
$DB->query("SELECT UserID FROM pm_conversations_users WHERE UserID='$LoggedUser[ID]' AND ConvID='$ConvID'");
|
||||
$DB->query("
|
||||
SELECT UserID
|
||||
FROM pm_conversations_users
|
||||
WHERE UserID = '$LoggedUser[ID]'
|
||||
AND ConvID = '$ConvID'");
|
||||
if ($DB->record_count() == 0) {
|
||||
error(403);
|
||||
}
|
||||
@ -36,12 +37,12 @@
|
||||
}
|
||||
$Subject = trim($_POST['subject']);
|
||||
if (empty($Subject)) {
|
||||
$Err = "You can't send a message without a subject.";
|
||||
$Err = 'You cannot send a message without a subject.';
|
||||
}
|
||||
}
|
||||
$Body = trim($_POST['body']);
|
||||
if ($Body === '' || $Body === false) {
|
||||
$Err = "You can't send a message without a body.";
|
||||
$Err = 'You cannot send a message without a body.';
|
||||
}
|
||||
|
||||
if (!empty($Err)) {
|
||||
@ -56,6 +57,5 @@
|
||||
$ConvID = Misc::send_pm($ToID, $LoggedUser['ID'], $Subject, $Body, $ConvID);
|
||||
|
||||
|
||||
|
||||
header('Location: ' . Inbox::get_inbox_link($LoggedUser['ListUnreadPMsFirst']));
|
||||
?>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
if(!check_perms('torrents_edit') || $LoggedUser['DisableWiki']) {
|
||||
if (!check_perms('torrents_edit') || $LoggedUser['DisableWiki']) {
|
||||
error(403);
|
||||
}
|
||||
*/
|
||||
@ -11,14 +11,17 @@
|
||||
|
||||
View::show_header('Label Aliases');
|
||||
|
||||
$OrderBy = ($_GET['order']) == "BadLabels" ? "BadLabel" : "AliasLabel";
|
||||
$OrderBy = (($_GET['order'] == 'BadLabels') ? 'BadLabel' : 'AliasLabel');
|
||||
/*
|
||||
$LabelID = (int) $_GET['id'];
|
||||
$LabelNameSQL = "";
|
||||
$LabelNameSQL = '';
|
||||
//TODO join with labels table to get label name
|
||||
if(!empty($LabelID)) {
|
||||
$DB->query("SELECT name FROM labels WHERE ID = '$LabelID'");
|
||||
if($DB->record_count()) {
|
||||
if (!empty($LabelID)) {
|
||||
$DB->query("
|
||||
SELECT name
|
||||
FROM labels
|
||||
WHERE ID = '$LabelID'");
|
||||
if ($DB->record_count()) {
|
||||
list($LabelName) = $DB->next_record();
|
||||
}
|
||||
$LabelNameSQL = " WHERE AliasLabel = '$LabelName'";
|
||||
@ -26,39 +29,46 @@
|
||||
*/
|
||||
|
||||
if (isset($_POST['newalias'])) {
|
||||
$BadLabel = db_string($_POST['BadLabel']);
|
||||
$AliasLabel = db_string($_POST['AliasLabel']);
|
||||
$BadLabel = db_string($_POST['BadLabel']);
|
||||
$AliasLabel = db_string($_POST['AliasLabel']);
|
||||
|
||||
$DB->query("INSERT INTO label_aliases (BadLabel, AliasLabel) VALUES ('$BadLabel', '$AliasLabel')");
|
||||
$DB->query("
|
||||
INSERT INTO label_aliases (BadLabel, AliasLabel)
|
||||
VALUES ('$BadLabel', '$AliasLabel')");
|
||||
}
|
||||
|
||||
if (isset($_POST['changealias']) && is_number($_POST['aliasid'])) {
|
||||
$AliasID = $_POST['aliasid'];
|
||||
$BadLabel = db_string($_POST['BadLabel']);
|
||||
$AliasLabel = db_string($_POST['AliasLabel']);
|
||||
$AliasID = $_POST['aliasid'];
|
||||
$BadLabel = db_string($_POST['BadLabel']);
|
||||
$AliasLabel = db_string($_POST['AliasLabel']);
|
||||
|
||||
if ($_POST['save']) {
|
||||
$DB->query("UPDATE label_aliases SET BadLabel = '$BadLabel', AliasLabel = '$AliasLabel' WHERE ID = '$AliasID' ");
|
||||
}
|
||||
if ($_POST['delete']) {
|
||||
$DB->query("DELETE FROM label_aliases WHERE ID = '$AliasID'");
|
||||
}
|
||||
if ($_POST['save']) {
|
||||
$DB->query("
|
||||
UPDATE label_aliases
|
||||
SET BadLabel = '$BadLabel', AliasLabel = '$AliasLabel'
|
||||
WHERE ID = '$AliasID' ");
|
||||
}
|
||||
if ($_POST['delete']) {
|
||||
$DB->query("
|
||||
DELETE FROM label_aliases
|
||||
WHERE ID = '$AliasID'");
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="header">
|
||||
<h2>Label Aliases <?=$LabelName ? "for <a href='labels.php?id=$LabelID'>" . $LabelName ."</a>" : ""?></h2>
|
||||
<h2>Label Aliases<?=($LabelName ? " for <a href=\"labels.php?id=$LabelID\">$LabelName</a>" : '')?></h2>
|
||||
<div class="linkbox">
|
||||
[<a href="tools.php?action=label_aliases&order=GoodLabels">Sort by Good Labels</a>]
|
||||
[<a href="tools.php?action=label_aliases&order=BadLabels">Sort by Bad Labels</a>]
|
||||
</div>
|
||||
<a href="tools.php?action=label_aliases&order=GoodLabels" class="brackets">Sort by good labels</a>
|
||||
<a href="tools.php?action=label_aliases&order=BadLabels" class="brackets">Sort by bad labels</a>
|
||||
</div>
|
||||
</div>
|
||||
<table width="100%">
|
||||
<tr class="colhead">
|
||||
<td>Label</td>
|
||||
<td>Renamed From</td>
|
||||
<td>Renamed from</td>
|
||||
<td>Submit</td>
|
||||
</tr>
|
||||
<tr/>
|
||||
<tr />
|
||||
<tr>
|
||||
<form method="post">
|
||||
<input type="hidden" name="newalias" value="1" />
|
||||
@ -69,12 +79,16 @@
|
||||
<input type="text" name="BadLabel" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="submit" value="Add Alias" />
|
||||
<input type="submit" value="Add alias" />
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
<?
|
||||
$DB->query("SELECT ID,BadLabel, AliasLabel FROM label_aliases $LabelNameSQL ORDER BY $OrderBy");
|
||||
<?
|
||||
$DB->query("
|
||||
SELECT ID, BadLabel, AliasLabel
|
||||
FROM label_aliases
|
||||
$LabelNameSQL
|
||||
ORDER BY $OrderBy");
|
||||
while (list($ID, $BadLabel, $AliasLabel) = $DB->next_record()) {
|
||||
?>
|
||||
<tr>
|
||||
@ -88,11 +102,12 @@
|
||||
<input type="text" name="BadLabel" value="<?=$BadLabel?>" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="submit" name="save" value="Save Alias" />
|
||||
<input type="submit" name="delete" value="Delete Alias" />
|
||||
<input type="submit" name="save" value="Save alias" />
|
||||
<input type="submit" name="delete" value="Delete alias" />
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
<? }?>
|
||||
<?
|
||||
} ?>
|
||||
</table>
|
||||
<? View::show_footer(); ?>
|
||||
|
@ -5,14 +5,16 @@
|
||||
|
||||
View::show_header('Tag Aliases');
|
||||
|
||||
$orderby = ($_GET['order']) == 'badtags' ? 'BadTag' : 'AliasTag';
|
||||
$orderby = (($_GET['order'] == 'badtags') ? 'BadTag' : 'AliasTag');
|
||||
|
||||
if (check_perms('users_mod')) {
|
||||
if (isset($_POST['newalias'])) {
|
||||
$badtag = mysql_escape_string($_POST['badtag']);
|
||||
$aliastag = mysql_escape_string($_POST['aliastag']);
|
||||
|
||||
$DB -> query("INSERT INTO tag_aliases (BadTag, AliasTag) VALUES ('$badtag', '$aliastag')");
|
||||
$DB->query("
|
||||
INSERT INTO tag_aliases (BadTag, AliasTag)
|
||||
VALUES ('$badtag', '$aliastag')");
|
||||
}
|
||||
|
||||
if (isset($_POST['changealias']) && is_number($_POST['aliasid'])) {
|
||||
@ -21,10 +23,15 @@
|
||||
$aliastag = mysql_escape_string($_POST['aliastag']);
|
||||
|
||||
if ($_POST['save']) {
|
||||
$DB -> query("UPDATE tag_aliases SET BadTag = '$badtag', AliasTag = '$aliastag' WHERE ID = '$aliasid' ");
|
||||
$DB->query("
|
||||
UPDATE tag_aliases
|
||||
SET BadTag = '$badtag', AliasTag = '$aliastag'
|
||||
WHERE ID = '$aliasid' ");
|
||||
}
|
||||
if ($_POST['delete']) {
|
||||
$DB -> query("DELETE FROM tag_aliases WHERE ID = '$aliasid'");
|
||||
$DB->query("
|
||||
DELETE FROM tag_aliases
|
||||
WHERE ID = '$aliasid'");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -62,7 +69,10 @@
|
||||
</form>
|
||||
</tr>
|
||||
<?
|
||||
$DB->query("SELECT ID,BadTag,AliasTag FROM tag_aliases ORDER BY " . $orderby);
|
||||
$DB->query('
|
||||
SELECT ID, BadTag, AliasTag
|
||||
FROM tag_aliases
|
||||
ORDER BY ' . $orderby);
|
||||
while (list($ID, $BadTag, $AliasTag) = $DB -> next_record()) {
|
||||
?>
|
||||
<tr>
|
||||
|
@ -9,11 +9,10 @@
|
||||
$UserID = (int) $_POST['userid'];
|
||||
$Key = (int) $_POST['key'];
|
||||
$UserInfo = Users::user_info($UserID);
|
||||
$DB -> query("SELECT
|
||||
tc.Body,
|
||||
tc.AddedTime
|
||||
$DB->query("
|
||||
SELECT tc.Body, tc.AddedTime
|
||||
FROM torrents_comments AS tc
|
||||
WHERE tc.ID='" . db_string($PostID) . "'");
|
||||
WHERE tc.ID = '" . db_string($PostID) . "'");
|
||||
list($PostBody) = $DB -> next_record();
|
||||
|
||||
View::show_header('Warn User');
|
||||
|
Loading…
Reference in New Issue
Block a user