mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-10-17 22:03:13 -04:00
16 lines
330 B
PHP
16 lines
330 B
PHP
<?php
|
|
|
|
enforce_login();
|
|
|
|
$DB->query("
|
|
SELECT r1.ID
|
|
FROM torrents_group AS r1 JOIN
|
|
(SELECT (RAND() *
|
|
(SELECT MAX(ID)
|
|
FROM torrents_group)) AS ID)
|
|
AS r2
|
|
WHERE r1.ID >= r2.ID
|
|
ORDER BY r1.ID ASC
|
|
LIMIT 1");
|
|
$torrent = $DB->next_record();
|
|
header("Location: torrents.php?id={$torrent['ID']}"); |