Gazelle/sections/torrents/masspm.php

76 lines
1.8 KiB
PHP
Raw Normal View History

2011-03-28 14:21:28 +00:00
<?
2013-05-01 08:00:16 +00:00
if (!isset($_GET['id']) || !is_number($_GET['id']) || !isset($_GET['torrentid']) || !is_number($_GET['torrentid'])) {
error(0);
}
2011-03-28 14:21:28 +00:00
$GroupID = $_GET['id'];
$TorrentID = $_GET['torrentid'];
2013-05-01 08:00:16 +00:00
$DB->query("
SELECT
2011-03-28 14:21:28 +00:00
t.Media,
t.Format,
t.Encoding AS Bitrate,
t.RemasterYear,
t.Remastered,
t.RemasterTitle,
t.Scene,
t.FreeTorrent,
t.Description AS TorrentDescription,
tg.CategoryID,
tg.Name AS Title,
tg.Year,
tg.ArtistID,
ag.Name AS ArtistName,
t.GroupID,
t.UserID,
t.FreeTorrent
2013-05-01 08:00:16 +00:00
FROM torrents AS t
2011-03-28 14:21:28 +00:00
JOIN torrents_group AS tg ON tg.ID=t.GroupID
LEFT JOIN artists_group AS ag ON ag.ArtistID=tg.ArtistID
2013-05-01 08:00:16 +00:00
WHERE t.ID='$TorrentID'");
2011-03-28 14:21:28 +00:00
list($Properties) = $DB->to_array(false,MYSQLI_BOTH);
2013-05-01 08:00:16 +00:00
if (!$Properties) {
error(404);
}
2011-03-28 14:21:28 +00:00
2012-10-11 08:00:15 +00:00
View::show_header('Edit torrent', 'upload');
2011-03-28 14:21:28 +00:00
2013-05-01 08:00:16 +00:00
if (!check_perms('site_moderate_requests')) {
2011-03-28 14:21:28 +00:00
error(403);
}
?>
<div class="thin">
2012-08-19 08:00:19 +00:00
<div class="header">
<h2>Send PM To All Snatchers Of "<?=$Properties['ArtistName']?> - <?=$Properties['Title']?>"</h2>
</div>
2012-09-15 08:00:25 +00:00
<form class="send_form" name="mass_message" action="torrents.php" method="post">
2011-03-28 14:21:28 +00:00
<input type="hidden" name="action" value="takemasspm" />
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
<input type="hidden" name="torrentid" value="<?=$TorrentID?>" />
<input type="hidden" name="groupid" value="<?=$GroupID?>" />
2012-09-01 08:00:24 +00:00
<table class="layout">
2011-03-28 14:21:28 +00:00
<tr>
<td class="label">Subject</td>
<td>
2012-09-01 08:00:24 +00:00
<input type="text" name="subject" value="" size="60" />
2011-03-28 14:21:28 +00:00
</td>
</tr>
<tr>
<td class="label">Message</td>
<td>
2012-09-01 08:00:24 +00:00
<textarea name="message" id="message" cols="60" rows="8"></textarea>
2011-03-28 14:21:28 +00:00
</td>
</tr>
<tr>
<td colspan="2" class="center">
2012-09-01 08:00:24 +00:00
<input type="submit" value="Send Mass PM" />
2011-03-28 14:21:28 +00:00
</td>
</tr>
</table>
</form>
</div>
2013-05-01 08:00:16 +00:00
<? View::show_footer(); ?>