Empty commit

This commit is contained in:
Git 2013-10-07 08:01:03 +00:00
parent 608fe98b6a
commit 2462b2d297
10 changed files with 372 additions and 329 deletions

View File

@ -3,11 +3,12 @@
class NotificationsManagerView { class NotificationsManagerView {
private static $Settings; private static $Settings;
public static function load_js() { ?> public static function load_js() {
<script type="text/javascript" src="<?=STATIC_SERVER?>functions/noty/noty.js"></script> ?>
<script type="text/javascript" src="<?=STATIC_SERVER?>functions/noty/layouts/bottomRight.js"></script> <script type="text/javascript" src="<?=STATIC_SERVER?>functions/noty/noty.js"></script>
<script type="text/javascript" src="<?=STATIC_SERVER?>functions/noty/themes/default.js"></script> <script type="text/javascript" src="<?=STATIC_SERVER?>functions/noty/layouts/bottomRight.js"></script>
<script type="text/javascript" src="<?=STATIC_SERVER?>functions/user_notifications.js"></script> <script type="text/javascript" src="<?=STATIC_SERVER?>functions/noty/themes/default.js"></script>
<script type="text/javascript" src="<?=STATIC_SERVER?>functions/user_notifications.js"></script>
<? <?
} }
@ -16,7 +17,7 @@ public static function render_settings($Settings) {
self::$Settings = $Settings; self::$Settings = $Settings;
?> ?>
<tr> <tr>
<td class="label tooltip" title="Enabling this will give you a notification when a new sitewide news announcement is made."> <td class="label">
<strong>News announcements</strong> <strong>News announcements</strong>
</td> </td>
<td> <td>
@ -24,7 +25,7 @@ public static function render_settings($Settings) {
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label tooltip" title="Enabling this will give you a notification when a new sitewide blog post is made."> <td class="label">
<strong>Blog announcements</strong> <strong>Blog announcements</strong>
</td> </td>
<td> <td>
@ -32,7 +33,7 @@ public static function render_settings($Settings) {
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label tooltip" title="Enabling this will give you a notification when you receive a new private message."> <td class="label">
<strong>Inbox messages</strong> <strong>Inbox messages</strong>
</td> </td>
<td> <td>
@ -48,7 +49,7 @@ public static function render_settings($Settings) {
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="label tooltip" title="Enabling this will give you a notification when a thread you have subscribed to receives a new post."> <td class="label">
<strong>Thread subscriptions</strong> <strong>Thread subscriptions</strong>
</td> </td>
<td> <td>
@ -140,7 +141,7 @@ private static function render_checkbox($Name, $Both = false) {
} }
$IsChecked = $Checked == 1 || !isset($Checked) ? ' checked="checked"' : ''; $IsChecked = $Checked == 1 || !isset($Checked) ? ' checked="checked"' : '';
?> ?>
<input <?=$Both ? 'type="radio" value="1"' : 'type="checkbox"'?> name="notifications_<?=$Name?>_popup" id="notifications_<?=$Name?>_popup"<?=$IsChecked?> /> <input<?=$Both ? ' type="radio" value="1"' : ' type="checkbox"'?> name="notifications_<?=$Name?>_popup" id="notifications_<?=$Name?>_popup"<?=$IsChecked?> />
<label for="notifications_<?=$Name?>_popup">Pop-up</label> <label for="notifications_<?=$Name?>_popup">Pop-up</label>
<? <?
} }

View File

@ -730,6 +730,9 @@ public static function has_autocomplete_enabled($Type, $Output = true) {
if ($Enabled && $Output) { if ($Enabled && $Output) {
echo ' data-gazelle-autocomplete="true"'; echo ' data-gazelle-autocomplete="true"';
} }
return $Enabled; if (!$Output) {
// don't return a boolean if you're echoing HTML
return $Enabled;
}
} }
} }

View File

@ -111,10 +111,10 @@ function send_irc($Raw) {
* @param string $Error Error type. Automatically supported: * @param string $Error Error type. Automatically supported:
* 403, 404, 0 (invalid input), -1 (invalid request) * 403, 404, 0 (invalid input), -1 (invalid request)
* If you use your own string for Error, it becomes the error description. * If you use your own string for Error, it becomes the error description.
* @param boolean $Ajax If true, the header/footer won't be shown, just the description. * @param boolean $NoHTML If true, the header/footer won't be shown, just the description.
* @param string $Log If true, the user is given a link to search $Log in the site log. * @param string $Log If true, the user is given a link to search $Log in the site log.
*/ */
function error($Error, $Ajax = false, $Log = false) { function error($Error, $NoHTML = false, $Log = false) {
global $Debug; global $Debug;
require(SERVER_ROOT.'/sections/error/index.php'); require(SERVER_ROOT.'/sections/error/index.php');
$Debug->profile(); $Debug->profile();

View File

@ -4,104 +4,113 @@
?> ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head> <head>
<title><?=display_str($PageTitle)?></title> <title><?=display_str($PageTitle)?></title>
<meta http-equiv="X-UA-Compatible" content="chrome=1;IE=edge" /> <meta http-equiv="X-UA-Compatible" content="chrome=1;IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="favicon.ico" /> <link rel="shortcut icon" href="favicon.ico" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" /> <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<link rel="search" type="application/opensearchdescription+xml" title="<?=SITE_NAME?> Torrents" href="opensearch.php?type=torrents" /> <link rel="search" type="application/opensearchdescription+xml" title="<?=SITE_NAME?> Torrents" href="opensearch.php?type=torrents" />
<link rel="search" type="application/opensearchdescription+xml" title="<?=SITE_NAME?> Artists" href="opensearch.php?type=artists" /> <link rel="search" type="application/opensearchdescription+xml" title="<?=SITE_NAME?> Artists" href="opensearch.php?type=artists" />
<link rel="search" type="application/opensearchdescription+xml" title="<?=SITE_NAME?> Requests" href="opensearch.php?type=requests" /> <link rel="search" type="application/opensearchdescription+xml" title="<?=SITE_NAME?> Requests" href="opensearch.php?type=requests" />
<link rel="search" type="application/opensearchdescription+xml" title="<?=SITE_NAME?> Forums" href="opensearch.php?type=forums" /> <link rel="search" type="application/opensearchdescription+xml" title="<?=SITE_NAME?> Forums" href="opensearch.php?type=forums" />
<link rel="search" type="application/opensearchdescription+xml" title="<?=SITE_NAME?> Log" href="opensearch.php?type=log" /> <link rel="search" type="application/opensearchdescription+xml" title="<?=SITE_NAME?> Log" href="opensearch.php?type=log" />
<link rel="search" type="application/opensearchdescription+xml" title="<?=SITE_NAME?> Users" href="opensearch.php?type=users" /> <link rel="search" type="application/opensearchdescription+xml" title="<?=SITE_NAME?> Users" href="opensearch.php?type=users" />
<link rel="search" type="application/opensearchdescription+xml" title="<?=SITE_NAME?> Wiki" href="opensearch.php?type=wiki" /> <link rel="search" type="application/opensearchdescription+xml" title="<?=SITE_NAME?> Wiki" href="opensearch.php?type=wiki" />
<link rel="alternate" type="application/rss+xml" href="feeds.php?feed=feed_news&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>" title="<?=SITE_NAME?> - News" /> <link rel="alternate" type="application/rss+xml"
<link rel="alternate" type="application/rss+xml" href="feeds.php?feed=feed_blog&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>" title="<?=SITE_NAME?> - Blog" /> href="feeds.php?feed=feed_news&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
<link rel="alternate" type="application/rss+xml" href="feeds.php?feed=feed_changelog&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>" title="<?=SITE_NAME?> - Gazelle Change Log" /> title="<?=SITE_NAME?> - News" />
<link rel="alternate" type="application/rss+xml" href="feeds.php?feed=torrents_notify_<?=G::$LoggedUser['torrent_pass']?>&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>" title="<?=SITE_NAME?> - P.T.N." /> <link rel="alternate" type="application/rss+xml"
href="feeds.php?feed=feed_blog&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
title="<?=SITE_NAME?> - Blog" />
<link rel="alternate" type="application/rss+xml"
href="feeds.php?feed=feed_changelog&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
title="<?=SITE_NAME?> - Gazelle Change Log" />
<link rel="alternate" type="application/rss+xml"
href="feeds.php?feed=torrents_notify_<?=G::$LoggedUser['torrent_pass']?>&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
title="<?=SITE_NAME?> - P.T.N." />
<? <?
if (isset(G::$LoggedUser['Notify'])) { if (isset(G::$LoggedUser['Notify'])) {
foreach (G::$LoggedUser['Notify'] as $Filter) { foreach (G::$LoggedUser['Notify'] as $Filter) {
list($FilterID, $FilterName) = $Filter; list($FilterID, $FilterName) = $Filter;
?> ?>
<link rel="alternate" type="application/rss+xml" href="feeds.php?feed=torrents_notify_<?=$FilterID?>_<?=G::$LoggedUser['torrent_pass']?>&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>&amp;name=<?=urlencode($FilterName)?>" title="<?=SITE_NAME?> - <?=display_str($FilterName)?>" /> <link rel="alternate" type="application/rss+xml"
href="feeds.php?feed=torrents_notify_<?=$FilterID?>_<?=G::$LoggedUser['torrent_pass']?>&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>&amp;name=<?=urlencode($FilterName)?>"
title="<?=SITE_NAME?> - <?=display_str($FilterName)?>" />
<? <?
} }
} }
$UseTooltipster = !isset(G::$LoggedUser['Tooltipster']) || G::$LoggedUser['Tooltipster'];
?> ?>
<link rel="alternate" type="application/rss+xml" <link rel="alternate" type="application/rss+xml"
href="feeds.php?feed=torrents_all&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>" href="feeds.php?feed=torrents_all&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
title="<?=SITE_NAME?> - All Torrents" /> title="<?=SITE_NAME?> - All Torrents" />
<link rel="alternate" type="application/rss+xml" <link rel="alternate" type="application/rss+xml"
href="feeds.php?feed=torrents_music&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>" href="feeds.php?feed=torrents_music&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
title="<?=SITE_NAME?> - Music Torrents" /> title="<?=SITE_NAME?> - Music Torrents" />
<link rel="alternate" type="application/rss+xml" <link rel="alternate" type="application/rss+xml"
href="feeds.php?feed=torrents_apps&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>" href="feeds.php?feed=torrents_apps&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
title="<?=SITE_NAME?> - Application Torrents" /> title="<?=SITE_NAME?> - Application Torrents" />
<link rel="alternate" type="application/rss+xml" <link rel="alternate" type="application/rss+xml"
href="feeds.php?feed=torrents_ebooks&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>" href="feeds.php?feed=torrents_ebooks&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
title="<?=SITE_NAME?> - E-Book Torrents" /> title="<?=SITE_NAME?> - E-Book Torrents" />
<link rel="alternate" type="application/rss+xml" <link rel="alternate" type="application/rss+xml"
href="feeds.php?feed=torrents_abooks&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>" href="feeds.php?feed=torrents_abooks&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
title="<?=SITE_NAME?> - Audiobooks Torrents" /> title="<?=SITE_NAME?> - Audiobooks Torrents" />
<link rel="alternate" type="application/rss+xml" <link rel="alternate" type="application/rss+xml"
href="feeds.php?feed=torrents_evids&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>" href="feeds.php?feed=torrents_evids&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
title="<?=SITE_NAME?> - E-Learning Video Torrents" /> title="<?=SITE_NAME?> - E-Learning Video Torrents" />
<link rel="alternate" type="application/rss+xml" <link rel="alternate" type="application/rss+xml"
href="feeds.php?feed=torrents_comedy&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>" href="feeds.php?feed=torrents_comedy&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
title="<?=SITE_NAME?> - Comedy Torrents" /> title="<?=SITE_NAME?> - Comedy Torrents" />
<link rel="alternate" type="application/rss+xml" <link rel="alternate" type="application/rss+xml"
href="feeds.php?feed=torrents_comics&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>" href="feeds.php?feed=torrents_comics&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
title="<?=SITE_NAME?> - Comic Torrents" /> title="<?=SITE_NAME?> - Comic Torrents" />
<link rel="alternate" type="application/rss+xml" <link rel="alternate" type="application/rss+xml"
href="feeds.php?feed=torrents_mp3&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>" href="feeds.php?feed=torrents_mp3&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
title="<?=SITE_NAME?> - MP3 Torrents" /> title="<?=SITE_NAME?> - MP3 Torrents" />
<link rel="alternate" type="application/rss+xml" <link rel="alternate" type="application/rss+xml"
href="feeds.php?feed=torrents_flac&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>" href="feeds.php?feed=torrents_flac&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
title="<?=SITE_NAME?> - FLAC Torrents" /> title="<?=SITE_NAME?> - FLAC Torrents" />
<link rel="alternate" type="application/rss+xml" <link rel="alternate" type="application/rss+xml"
href="feeds.php?feed=torrents_vinyl&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>" href="feeds.php?feed=torrents_vinyl&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
title="<?=SITE_NAME?> - Vinyl Sourced Torrents" /> title="<?=SITE_NAME?> - Vinyl Sourced Torrents" />
<link rel="alternate" type="application/rss+xml" <link rel="alternate" type="application/rss+xml"
href="feeds.php?feed=torrents_lossless&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>" href="feeds.php?feed=torrents_lossless&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
title="<?=SITE_NAME?> - Lossless Torrents" /> title="<?=SITE_NAME?> - Lossless Torrents" />
<link rel="alternate" type="application/rss+xml" <link rel="alternate" type="application/rss+xml"
href="feeds.php?feed=torrents_lossless24&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>" href="feeds.php?feed=torrents_lossless24&amp;user=<?=G::$LoggedUser['ID']?>&amp;auth=<?=G::$LoggedUser['RSS_Auth']?>&amp;passkey=<?=G::$LoggedUser['torrent_pass']?>&amp;authkey=<?=G::$LoggedUser['AuthKey']?>"
title="<?=SITE_NAME?> - 24bit Lossless Torrents" /> title="<?=SITE_NAME?> - 24bit Lossless Torrents" />
<link <link rel="stylesheet" type="text/css"
href="<?=STATIC_SERVER?>styles/global.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/global.css')?>" href="<?=STATIC_SERVER?>styles/global.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/global.css')?>" />
rel="stylesheet" type="text/css" /> <?
<? if ($UseTooltipster) { ?> $UseTooltipster = !isset(G::$LoggedUser['Tooltipster']) || G::$LoggedUser['Tooltipster'];
<link rel="stylesheet" href="<?=STATIC_SERVER?>styles/tooltipster/style.css" type="text/css" media="screen"/> if ($UseTooltipster) { ?>
<? } <link rel="stylesheet" href="<?=STATIC_SERVER?>styles/tooltipster/style.css" type="text/css" media="screen" />
<?
}
if ($Mobile) { ?> if ($Mobile) { ?>
<meta name="viewport" <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0, user-scalable=no;" />
content="width=device-width; initial-scale=1.0; maximum-scale=1.0, user-scalable=no;" /> <link rel="stylesheet" type="text/css" href="<?=STATIC_SERVER ?>styles/mobile/style.css" />
<link href="<?=STATIC_SERVER ?>styles/mobile/style.css" rel="stylesheet"
type="text/css" />
<? <?
} else { } else {
if (empty(G::$LoggedUser['StyleURL'])) { if (empty(G::$LoggedUser['StyleURL'])) {
?> ?>
<link <link rel="stylesheet" type="text/css" title="<?=G::$LoggedUser['StyleName']?>" media="screen"
href="<?=STATIC_SERVER?>styles/<?=G::$LoggedUser['StyleName']?>/style.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/'.G::$LoggedUser['StyleName'].'/style.css')?>" href="<?=STATIC_SERVER?>styles/<?=G::$LoggedUser['StyleName']?>/style.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/'.G::$LoggedUser['StyleName'].'/style.css')?>" />
title="<?=G::$LoggedUser['StyleName']?>" rel="stylesheet" type="text/css"
media="screen" />
<? } else { ?> <? } else { ?>
<link href="<?=G::$LoggedUser['StyleURL']?>" title="External CSS" <link rel="stylesheet" type="text/css" media="screen" href="<?=G::$LoggedUser['StyleURL']?>" title="External CSS" />
rel="stylesheet" type="text/css" media="screen" />
<? <?
} }
if (!empty(G::$LoggedUser['UseOpenDyslexic'])) { if (!empty(G::$LoggedUser['UseOpenDyslexic'])) {
// load the OpenDyslexic font ?> // load the OpenDyslexic font
<link rel="stylesheet" ?>
href="<?=STATIC_SERVER?>styles/opendyslexic/style.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/opendyslexic/style.css')?>" <link rel="stylesheet" type="text/css" charset="utf-8"
type="text/css" charset="utf-8" /> href="<?=STATIC_SERVER?>styles/opendyslexic/style.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/opendyslexic/style.css')?>" />
<!--<link href="<?=STATIC_SERVER?>styles/opendyslexic/style.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/opendyslexic/style.css')?>" title="OpenDyslexic" rel="stylesheet" type="text/css" media="screen" />--> <!--
<link rel="stylesheet" type="text/css" media="screen" title="OpenDyslexic"
href="<?=STATIC_SERVER?>styles/opendyslexic/style.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/opendyslexic/style.css')?>" />
-->
<? <?
} }
} }
@ -110,35 +119,33 @@
if (empty($CSS)) { if (empty($CSS)) {
continue; continue;
} ?> } ?>
<link rel="stylesheet" href="<?=STATIC_SERVER?>styles/<?=$CSS?>/style.css" type="text/css" media="screen"/> <link rel="stylesheet" type="text/css" media="screen" href="<?=STATIC_SERVER?>styles/<?=$CSS?>/style.css" />
<? <?
} ?> }
?>
<script src="<?=STATIC_SERVER?>functions/jquery.js" <script src="<?=STATIC_SERVER?>functions/jquery.js" type="text/javascript"></script>
type="text/javascript"></script> <script
<script src="<?=STATIC_SERVER?>functions/script_start.js?v=<?=filemtime(SERVER_ROOT.'/static/functions/script_start.js')?>"
src="<?=STATIC_SERVER?>functions/script_start.js?v=<?=filemtime(SERVER_ROOT.'/static/functions/script_start.js')?>" type="text/javascript"></script>
type="text/javascript"></script> <script
<script src="<?=STATIC_SERVER?>functions/ajax.class.js?v=<?=filemtime(SERVER_ROOT.'/static/functions/ajax.class.js')?>"
src="<?=STATIC_SERVER?>functions/ajax.class.js?v=<?=filemtime(SERVER_ROOT.'/static/functions/ajax.class.js')?>" type="text/javascript"></script>
type="text/javascript"></script> <script type="text/javascript">
<script type="text/javascript">//<![CDATA[ //<![CDATA[
var authkey = "<?=G::$LoggedUser['AuthKey']?>"; var authkey = "<?=G::$LoggedUser['AuthKey']?>";
var userid = <?=G::$LoggedUser['ID']?>; var userid = <?=G::$LoggedUser['ID']?>;
//]]></script> //]]>
<script </script>
src="<?=STATIC_SERVER?>functions/global.js?v=<?=filemtime(SERVER_ROOT.'/static/functions/global.js')?>" <script
type="text/javascript"></script> src="<?=STATIC_SERVER?>functions/global.js?v=<?=filemtime(SERVER_ROOT.'/static/functions/global.js')?>"
<script src="<?=STATIC_SERVER?>functions/jquery.autocomplete.js" type="text/javascript"></script>
type="text/javascript"></script> <script src="<?=STATIC_SERVER?>functions/jquery.autocomplete.js" type="text/javascript"></script>
<script src="<?=STATIC_SERVER?>functions/autocomplete.js" <script src="<?=STATIC_SERVER?>functions/autocomplete.js" type="text/javascript"></script>
type="text/javascript"></script>
<? if ($UseTooltipster) { ?> <? if ($UseTooltipster) { ?>
<script src="<?=STATIC_SERVER?>functions/tooltipster.js" <script src="<?=STATIC_SERVER?>functions/tooltipster.js" type="text/javascript"></script>
type="text/javascript"></script>
<? } ?> <? } ?>
<script src="<?=STATIC_SERVER?>functions/tooltipster_settings.js" <script src="<?=STATIC_SERVER?>functions/tooltipster_settings.js" type="text/javascript"></script>
type="text/javascript"></script>
<? <?
NotificationsManagerView::load_js(); NotificationsManagerView::load_js();
@ -149,13 +156,12 @@
} }
?> ?>
<script <script
src="<?=STATIC_SERVER?>functions/<?=$Script?>.js?v=<?=filemtime(SERVER_ROOT.'/static/functions/'.$Script.'.js')?>" src="<?=STATIC_SERVER?>functions/<?=$Script?>.js?v=<?=filemtime(SERVER_ROOT.'/static/functions/'.$Script.'.js')?>"
type="text/javascript"></script> type="text/javascript"></script>
<? <?
} }
if ($Mobile) { ?> if ($Mobile) { ?>
<script src="<?=STATIC_SERVER?>styles/mobile/style.js" <script src="<?=STATIC_SERVER?>styles/mobile/style.js" type="text/javascript"></script>
type="text/javascript"></script>
<? <?
} }
?> ?>
@ -163,26 +169,26 @@
<body id="<?=$Document == 'collages' ? 'collage' : $Document?>"> <body id="<?=$Document == 'collages' ? 'collage' : $Document?>">
<div id="wrapper"> <div id="wrapper">
<h1 class="hidden"><?=SITE_NAME?></h1> <h1 class="hidden"><?=SITE_NAME?></h1>
<div id="header"> <div id="header">
<div id="logo"> <div id="logo">
<a href="index.php"></a> <a href="index.php"></a>
</div> </div>
<div id="userinfo"> <div id="userinfo">
<ul id="userinfo_username"> <ul id="userinfo_username">
<li id="nav_userinfo" <li id="nav_userinfo" <?=Format::add_class($PageID, array('user', false, false), 'active', true, 'id')?>>
<?=Format::add_class($PageID, array('user',false,false), 'active', true, 'id')?>><a <a href="user.php?id=<?=G::$LoggedUser['ID']?>" class="username"><?=G::$LoggedUser['Username']?></a>
href="user.php?id=<?=G::$LoggedUser['ID']?>" class="username"><?=G::$LoggedUser['Username']?></a></li> </li>
<li id="nav_useredit" <li id="nav_useredit" class="brackets<?=Format::add_class($PageID, array('user','edit'), 'active', false)?>">
class="brackets<?=Format::add_class($PageID, array('user','edit'), 'active', false)?>"><a <a href="user.php?action=edit&amp;userid=<?=G::$LoggedUser['ID']?>">Edit</a>
href="user.php?action=edit&amp;userid=<?=G::$LoggedUser['ID']?>">Edit</a></li> </li>
<li id="nav_logout" class="brackets"><a <li id="nav_logout" class="brackets">
href="logout.php?auth=<?=G::$LoggedUser['AuthKey']?>">Logout</a></li> <a href="logout.php?auth=<?=G::$LoggedUser['AuthKey']?>">Logout</a>
</li>
</ul> </ul>
<ul id="userinfo_major"> <ul id="userinfo_major">
<li id="nav_upload" <li id="nav_upload" class="brackets<?=Format::add_class($PageID, array('upload'), 'active', false)?>">
class="brackets<?=Format::add_class($PageID, array('upload'), 'active', false)?>"><a <a href="upload.php">Upload</a>
href="upload.php">Upload</a></li> </li>
<? <?
if (check_perms('site_send_unlimited_invites')) { if (check_perms('site_send_unlimited_invites')) {
$Invites = ' (∞)'; $Invites = ' (∞)';
@ -192,102 +198,120 @@ class="brackets<?=Format::add_class($PageID, array('upload'), 'active', false)?>
$Invites = ''; $Invites = '';
} }
?> ?>
<li id="nav_invite" <li id="nav_invite" class="brackets<?=Format::add_class($PageID, array('user','invite'), 'active', false)?>">
class="brackets<?=Format::add_class($PageID, array('user','invite'), 'active', false)?>"><a <a href="user.php?action=invite">Invite<?=$Invites?></a>
href="user.php?action=invite">Invite<?=$Invites?></a></li> </li>
<li id="nav_donate" <li id="nav_donate" class="brackets<?=Format::add_class($PageID, array('donate'), 'active', false)?>">
class="brackets<?=Format::add_class($PageID, array('donate'), 'active', false)?>"><a <a href="donate.php">Donate</a>
href="donate.php">Donate</a></li> </li>
</ul> </ul>
<ul id="userinfo_stats"> <ul id="userinfo_stats">
<li id="stats_seeding"><a <li id="stats_seeding">
href="torrents.php?type=seeding&amp;userid=<?=G::$LoggedUser['ID']?>">Up</a>: <a href="torrents.php?type=seeding&amp;userid=<?=G::$LoggedUser['ID']?>">Up</a>:
<span class="stat" <span class="stat" title="<?=Format::get_size(G::$LoggedUser['BytesUploaded'], 5)?>"><?=Format::get_size(G::$LoggedUser['BytesUploaded'])?></span>
title="<?=Format::get_size(G::$LoggedUser['BytesUploaded'], 5)?>"><?=Format::get_size(G::$LoggedUser['BytesUploaded'])?></span></li> </li>
<li id="stats_leeching"><a <li id="stats_leeching">
href="torrents.php?type=leeching&amp;userid=<?=G::$LoggedUser['ID']?>">Down</a>: <a href="torrents.php?type=leeching&amp;userid=<?=G::$LoggedUser['ID']?>">Down</a>:
<span class="stat" <span class="stat" title="<?=Format::get_size(G::$LoggedUser['BytesDownloaded'], 5)?>"><?=Format::get_size(G::$LoggedUser['BytesDownloaded'])?></span>
title="<?=Format::get_size(G::$LoggedUser['BytesDownloaded'], 5)?>"><?=Format::get_size(G::$LoggedUser['BytesDownloaded'])?></span></li> </li>
<li id="stats_ratio">Ratio: <span class="stat"><?=Format::get_ratio_html(G::$LoggedUser['BytesUploaded'], G::$LoggedUser['BytesDownloaded'])?></span></li> <li id="stats_ratio">
Ratio: <span class="stat"><?=Format::get_ratio_html(G::$LoggedUser['BytesUploaded'], G::$LoggedUser['BytesDownloaded'])?></span>
</li>
<? if (!empty(G::$LoggedUser['RequiredRatio'])) { ?> <? if (!empty(G::$LoggedUser['RequiredRatio'])) { ?>
<li id="stats_required"><a href="rules.php?p=ratio">Required</a>: <span <li id="stats_required">
class="stat" <a href="rules.php?p=ratio">Required</a>:
title="<?=number_format(G::$LoggedUser['RequiredRatio'], 5)?>"><?=number_format(G::$LoggedUser['RequiredRatio'], 2)?></span></li> <span class="stat" title="<?=number_format(G::$LoggedUser['RequiredRatio'], 5)?>"><?=number_format(G::$LoggedUser['RequiredRatio'], 2)?></span>
</li>
<? } <? }
if (G::$LoggedUser['FLTokens'] > 0) { ?> if (G::$LoggedUser['FLTokens'] > 0) { ?>
<li id="fl_tokens"><a href="wiki.php?action=article&amp;id=754">Tokens</a>: <li id="fl_tokens">
<span class="stat"><a <a href="wiki.php?action=article&amp;id=754">Tokens</a>:
href="userhistory.php?action=token_history&amp;userid=<?=G::$LoggedUser['ID']?>"><?=G::$LoggedUser['FLTokens']?></a></span></li> <span class="stat">
<a href="userhistory.php?action=token_history&amp;userid=<?=G::$LoggedUser['ID']?>"><?=G::$LoggedUser['FLTokens']?></a>
</span>
</li>
<? } ?> <? } ?>
</ul> </ul>
<ul id="userinfo_minor"> <ul id="userinfo_minor">
<li id="nav_inbox" <li id="nav_inbox"<?=
<?=Format::add_class($PageID, array('inbox'), 'active', true)?>><a Format::add_class($PageID, array('inbox'), 'active', true)?>>
onmousedown="Stats('inbox');" <a onmousedown="Stats('inbox');" href="<?=Inbox::get_inbox_link(); ?>">Inbox</a>
href="<?=Inbox::get_inbox_link(); ?>">Inbox</a></li> </li>
<li id="nav_staffinbox" <li id="nav_staffinbox"<?=
<?=Format::add_class($PageID, array('staffpm'), 'active', true)?>><a Format::add_class($PageID, array('staffpm'), 'active', true)?>>
onmousedown="Stats('staffpm');" href="staffpm.php">Staff Inbox</a></li> <a onmousedown="Stats('staffpm');" href="staffpm.php">Staff Inbox</a>
<li id="nav_uploaded" </li>
<?=Format::add_class($PageID, array('torrents',false,'uploaded'), 'active', true, 'userid')?>><a <li id="nav_uploaded"<?=
onmousedown="Stats('uploads');" Format::add_class($PageID, array('torrents', false, 'uploaded'), 'active', true, 'userid')?>>
href="torrents.php?type=uploaded&amp;userid=<?=G::$LoggedUser['ID']?>">Uploads</a></li> <a onmousedown="Stats('uploads');"
<li id="nav_bookmarks" href="torrents.php?type=uploaded&amp;userid=<?=G::$LoggedUser['ID']?>">Uploads</a>
<?=Format::add_class($PageID, array('bookmarks'), 'active', true)?>><a </li>
onmousedown="Stats('bookmarks');" <li id="nav_bookmarks"<?=
href="bookmarks.php?type=torrents">Bookmarks</a></li> Format::add_class($PageID, array('bookmarks'), 'active', true)?>>
<? if (check_perms('site_torrents_notify')) { ?> <a onmousedown="Stats('bookmarks');" href="bookmarks.php?type=torrents">Bookmarks</a>
<li id="nav_notifications" </li>
<?=Format::add_class($PageID, array(array('torrents','notify'),array('user','notify')), 'active', true, 'userid')?>><a <? if (check_perms('site_torrents_notify')) { ?>
onmousedown="Stats('notifications');" <li id="nav_notifications"<?=
href="user.php?action=notify">Notifications</a></li> Format::add_class($PageID, array(array('torrents', 'notify'), array('user', 'notify')), 'active', true, 'userid')?>>
<? } ?> <a onmousedown="Stats('notifications');" href="user.php?action=notify">Notifications</a>
<li id="nav_subscriptions" </li>
<?=Format::add_class($PageID, array('userhistory','subscriptions'), 'active', true)?>><a <? } ?>
onmousedown="Stats('subscriptions');" <li id="nav_subscriptions"<?=
href="userhistory.php?action=subscriptions">Subscriptions</a></li> Format::add_class($PageID, array('userhistory', 'subscriptions'), 'active', true)?>>
<li id="nav_comments" <a onmousedown="Stats('subscriptions');" href="userhistory.php?action=subscriptions">Subscriptions</a>
<?=Format::add_class($PageID, array('comments'), 'active', true, 'userid')?>><a </li>
onmousedown="Stats('comments');" href="comments.php">Comments</a></li> <li id="nav_comments"<?=
<li id="nav_friends" Format::add_class($PageID, array('comments'), 'active', true, 'userid')?>>
<?=Format::add_class($PageID, array('friends'), 'active', true)?>><a <a onmousedown="Stats('comments');" href="comments.php">Comments</a></li>
onmousedown="Stats('friends');" href="friends.php">Friends</a></li> <li id="nav_friends"<?=
Format::add_class($PageID, array('friends'), 'active', true)?>>
<a onmousedown="Stats('friends');" href="friends.php">Friends</a></li>
</ul> </ul>
</div> </div>
<div id="menu"> <div id="menu">
<h4 class="hidden">Site Menu</h4> <h4 class="hidden">Site Menu</h4>
<ul> <ul>
<li id="nav_index" <li id="nav_index"<?=
<?=Format::add_class($PageID, array('index'), 'active', true)?>><a Format::add_class($PageID, array('index'), 'active', true)?>>
href="index.php">Home</a></li> <a href="index.php">Home</a>
<li id="nav_torrents" </li>
<?=Format::add_class($PageID, array('torrents',false,false), 'active', true)?>><a <li id="nav_torrents"<?=
href="torrents.php">Torrents</a></li> Format::add_class($PageID, array('torrents', false, false), 'active', true)?>>
<li id="nav_collages" <a href="torrents.php">Torrents</a>
<?=Format::add_class($PageID, array('collages'), 'active', true)?>><a </li>
href="collages.php">Collages</a></li> <li id="nav_collages"<?=
<li id="nav_requests" Format::add_class($PageID, array('collages'), 'active', true)?>>
<?=Format::add_class($PageID, array('requests'), 'active', true)?>><a <a href="collages.php">Collages</a>
href="requests.php">Requests</a></li> </li>
<li id="nav_forums" <li id="nav_requests"<?=
<?=Format::add_class($PageID, array('forums'), 'active', true)?>><a Format::add_class($PageID, array('requests'), 'active', true)?>>
href="forums.php">Forums</a></li> <a href="requests.php">Requests</a>
<li id="nav_irc" </li>
<?=Format::add_class($PageID, array('chat'), 'active', true)?>><a <li id="nav_forums"<?=
href="chat.php">IRC</a></li> Format::add_class($PageID, array('forums'), 'active', true)?>>
<li id="nav_top10" <a href="forums.php">Forums</a>
<?=Format::add_class($PageID, array('top10'), 'active', true)?>><a </li>
href="top10.php">Top 10</a></li> <li id="nav_irc"<?=
<li id="nav_rules" Format::add_class($PageID, array('chat'), 'active', true)?>>
<?=Format::add_class($PageID, array('rules'), 'active', true)?>><a <a href="chat.php">IRC</a>
href="rules.php">Rules</a></li> </li>
<li id="nav_wiki" <li id="nav_top10"<?=
<?=Format::add_class($PageID, array('wiki'), 'active', true)?>><a Format::add_class($PageID, array('top10'), 'active', true)?>>
href="wiki.php">Wiki</a></li> <a href="top10.php">Top 10</a>
<li id="nav_staff" </li>
<?=Format::add_class($PageID, array('staff'), 'active', true)?>><a <li id="nav_rules"<?=
href="staff.php">Staff</a></li> Format::add_class($PageID, array('rules'), 'active', true)?>>
<a href="rules.php">Rules</a>
</li>
<li id="nav_wiki"<?=
Format::add_class($PageID, array('wiki'), 'active', true)?>>
<a href="wiki.php">Wiki</a>
</li>
<li id="nav_staff"<?=
Format::add_class($PageID, array('staff'), 'active', true)?>>
<a href="staff.php">Staff</a>
</li>
</ul> </ul>
</div> </div>
<? <?
@ -450,94 +474,105 @@ class="stat"
?> ?>
<? <?
if (!empty($Alerts) || !empty($ModBar)) { ?> if (!empty($Alerts) || !empty($ModBar)) { ?>
<div id="alerts"> <div id="alerts">
<? foreach ($Alerts as $Alert) { ?> <? foreach ($Alerts as $Alert) { ?>
<div class="alertbar"><?=$Alert?></div> <div class="alertbar"><?=$Alert?></div>
<? <?
} }
if (!empty($ModBar)) { ?> if (!empty($ModBar)) { ?>
<div class="alertbar blend"><?=implode(' | ', $ModBar)?></div> <div class="alertbar blend">
<? <?=implode(' | ', $ModBar); echo "\n"?>
} ?> </div>
</div> <? } ?>
<? } ?> </div>
<? <?
}
//Done handling alertbars //Done handling alertbars
if (isset(G::$LoggedUser['SearchType']) && G::$LoggedUser['SearchType']) { // Advanced search
$UseAdvancedSearch = true;
} else {
$UseAdvancedSearch = false;
}
?> ?>
<div id="searchbars"> <div id="searchbars">
<ul> <ul>
<li id="searchbar_torrents"><span class="hidden">Torrents: </span> <li id="searchbar_torrents">
<form class="search_form" name="torrents" action="torrents.php" <span class="hidden">Torrents: </span>
method="get"> <form class="search_form" name="torrents" action="torrents.php" method="get">
<? if (isset(G::$LoggedUser['SearchType']) && G::$LoggedUser['SearchType']) { // Advanced search ?> <? if ($UseAdvancedSearch) { ?>
<input type="hidden" name="action" value="advanced" /> <input type="hidden" name="action" value="advanced" />
<? } ?> <? } ?>
<input id="torrentssearch" accesskey="t" spellcheck="false" <input id="torrentssearch" accesskey="t" spellcheck="false"
onfocus="if (this.value == 'Torrents') this.value = '';" onfocus="if (this.value == 'Torrents') { this.value = ''; }"
onblur="if (this.value == '') this.value = 'Torrents';" onblur="if (this.value == '') { this.value = 'Torrents'; }"
<? if (isset(G::$LoggedUser['SearchType']) && G::$LoggedUser['SearchType']) { // Advanced search ?> value="Torrents" type="text" name="<?=$UseAdvancedSearch ? 'groupname' : 'searchstr' ?>" size="17" />
value="Torrents" type="text" name="groupname" size="17"
<? } else { ?> value="Torrents" type="text" name="searchstr"
size="17" <? } ?> />
</form></li>
<li id="searchbar_artists"><span class="hidden">Artist: </span>
<form class="search_form" name="artists" action="artist.php"
method="get">
<input id="artistsearch"<? Users::has_autocomplete_enabled('search');
?> accesskey="a"
spellcheck="false" autocomplete="off"
onfocus="if (this.value == 'Artists') this.value = '';"
onblur="if (this.value == '') this.value = 'Artists';"
value="Artists" type="text" name="artistname" size="17" />
</form> </form>
</li> </li>
<li id="searchbar_requests"><span class="hidden">Requests: </span> <li id="searchbar_artists">
<form class="search_form" name="requests" action="requests.php" <span class="hidden">Artist: </span>
method="get"> <form class="search_form" name="artists" action="artist.php" method="get">
<input id="artistsearch"<?=Users::has_autocomplete_enabled('search');
?> accesskey="a"
spellcheck="false" autocomplete="off"
onfocus="if (this.value == 'Artists') { this.value = ''; }"
onblur="if (this.value == '') { this.value = 'Artists'; }"
value="Artists" type="text" name="artistname" size="17" />
</form>
</li>
<li id="searchbar_requests">
<span class="hidden">Requests: </span>
<form class="search_form" name="requests" action="requests.php" method="get">
<input id="requestssearch" spellcheck="false" <input id="requestssearch" spellcheck="false"
onfocus="if (this.value == 'Requests') this.value = '';" onfocus="if (this.value == 'Requests') { this.value = ''; }"
onblur="if (this.value == '') this.value = 'Requests';" onblur="if (this.value == '') { this.value = 'Requests'; }"
value="Requests" type="text" name="search" size="17" /> value="Requests" type="text" name="search" size="17" />
</form></li> </form>
<li id="searchbar_forums"><span class="hidden">Forums: </span> </li>
<form class="search_form" name="forums" action="forums.php" <li id="searchbar_forums">
method="get"> <span class="hidden">Forums: </span>
<input value="search" type="hidden" name="action" /> <input <form class="search_form" name="forums" action="forums.php" method="get">
id="forumssearch" <input value="search" type="hidden" name="action" />
onfocus="if (this.value == 'Forums') this.value = '';" <input id="forumssearch"
onblur="if (this.value == '') this.value = 'Forums';" onfocus="if (this.value == 'Forums') { this.value = ''; }"
value="Forums" type="text" name="search" size="17" /> onblur="if (this.value == '') { this.value = 'Forums'; }"
</form></li> value="Forums" type="text" name="search" size="17" />
</form>
</li>
<!-- <!--
<li id="searchbar_wiki"><span class="hidden">Wiki: </span> <li id="searchbar_wiki">
<span class="hidden">Wiki: </span>
<form class="search_form" name="wiki" action="wiki.php" method="get"> <form class="search_form" name="wiki" action="wiki.php" method="get">
<input type="hidden" name="action" value="search" /> <input type="hidden" name="action" value="search" />
<input <input
onfocus="if (this.value == 'Wiki') this.value = '';" onfocus="if (this.value == 'Wiki') { this.value = ''; }"
onblur="if (this.value == '') this.value = 'Wiki';" onblur="if (this.value == '') { this.value = 'Wiki'; }"
value="Wiki" type="text" name="search" size="17" value="Wiki" type="text" name="search" size="17" />
/>
</form> </form>
</li> </li>
--> -->
<li id="searchbar_log"><span class="hidden">Log: </span> <li id="searchbar_log">
<span class="hidden">Log: </span>
<form class="search_form" name="log" action="log.php" method="get"> <form class="search_form" name="log" action="log.php" method="get">
<input id="logsearch" <input id="logsearch"
onfocus="if (this.value == 'Log') this.value = '';" onfocus="if (this.value == 'Log') { this.value = ''; }"
onblur="if (this.value == '') this.value = 'Log';" value="Log" onblur="if (this.value == '') { this.value = 'Log'; }"
type="text" name="search" size="17" /> value="Log" type="text" name="search" size="17" />
</form></li> </form>
<li id="searchbar_users"><span class="hidden">Users: </span> </li>
<form class="search_form" name="users" action="user.php" <li id="searchbar_users">
method="get"> <span class="hidden">Users: </span>
<input type="hidden" name="action" value="search" /> <input <form class="search_form" name="users" action="user.php" method="get">
id="userssearch" <input type="hidden" name="action" value="search" />
onfocus="if (this.value == 'Users') this.value = '';" <input
onblur="if (this.value == '') this.value = 'Users';" value="Users" id="userssearch"
type="text" name="search" size="20" /> onfocus="if (this.value == 'Users') { this.value = ''; }"
</form></li> onblur="if (this.value == '') { this.value = 'Users'; }"
value="Users" type="text" name="search" size="20" />
</form>
</li>
</ul> </ul>
</div> </div>
</div> </div>

View File

@ -176,7 +176,7 @@
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" /> <input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
<input type="hidden" name="collageid" value="<?=$CollageID?>" /> <input type="hidden" name="collageid" value="<?=$CollageID?>" />
<div class="field_div"> <div class="field_div">
<input type="text" id="artist" size="20" name="url" <? Users::has_autocomplete_enabled('other'); ?>/> <input type="text" id="artist" size="20" name="url"<? Users::has_autocomplete_enabled('other'); ?> />
</div> </div>
<div class="submit_div"> <div class="submit_div">
<input type="submit" value="Add" /> <input type="submit" value="Add" />

View File

@ -46,7 +46,7 @@ function notify ($Channel, $Message) {
$Description .= ' <a href="log.php?search='.$Log.'">Search Log</a>'; $Description .= ' <a href="log.php?search='.$Log.'">Search Log</a>';
} }
if (empty($Ajax) && $Error != -1) { if (empty($NoHTML) && $Error != -1) {
View::show_header($Title); View::show_header($Title);
?> ?>
<div class="thin"> <div class="thin">

View File

@ -335,24 +335,25 @@
} }
?> <ul style="list-style: none;" id="poll_options"> ?> <ul style="list-style: none;" id="poll_options">
<? <?
foreach ($Answers as $i => $Answer) { foreach ($Answers as $i => $Answer) {
?> ?>
<li> <li>
<a href="forums.php?action=change_vote&amp;threadid=<?=$ThreadID?>&amp;auth=<?=$LoggedUser['AuthKey']?>&amp;vote=<?=(int) $i?>"><?=display_str($Answer == '' ? 'Blank' : $Answer)?></a> <a href="forums.php?action=change_vote&amp;threadid=<?=$ThreadID?>&amp;auth=<?=$LoggedUser['AuthKey']?>&amp;vote=<?=(int)$i?>"><?=display_str($Answer == '' ? 'Blank' : $Answer)?></a>
- <?=$StaffVotes[$i]?>&nbsp;(<?=number_format(((float) $Votes[$i] / $TotalVotes) * 100, 2)?>%) - <?=$StaffVotes[$i]?>&nbsp;(<?=number_format(((float)$Votes[$i] / $TotalVotes) * 100, 2)?>%)
<a href="forums.php?action=delete_poll_option&amp;threadid=<?=$ThreadID?>&amp;auth=<?=$LoggedUser['AuthKey']?>&amp;vote=<?=(int) $i?>" class="brackets">X</a> <a href="forums.php?action=delete_poll_option&amp;threadid=<?=$ThreadID?>&amp;auth=<?=$LoggedUser['AuthKey']?>&amp;vote=<?=(int)$i?>" class="brackets tooltip" title="Delete poll option">X</a>
</li> </li>
<? } ?> <? } ?>
<li><a href="forums.php?action=change_vote&amp;threadid=<?=$ThreadID?>&amp;auth=<?=$LoggedUser['AuthKey']?>&amp;vote=0"><?=($UserResponse == '0' ? '&raquo; ' : '')?>Blank</a> - <?=$StaffVotes[0]?>&nbsp;(<?=number_format(((float) $Votes[0] / $TotalVotes) * 100, 2)?>%)</li> <li>
<a href="forums.php?action=change_vote&amp;threadid=<?=$ThreadID?>&amp;auth=<?=$LoggedUser['AuthKey']?>&amp;vote=0"><?=($UserResponse == '0' ? '&raquo; ' : '')?>Blank</a> - <?=$StaffVotes[0]?>&nbsp;(<?=number_format(((float)$Votes[0] / $TotalVotes) * 100, 2)?>%)
</li>
</ul> </ul>
<? <?
if ($ForumID == STAFF_FORUM) { if ($ForumID == STAFF_FORUM) {
?> ?>
<br /> <br />
<strong>Votes:</strong> <?=number_format($TotalVotes)?> / <?=$StaffCount ?> <strong>Votes:</strong> <?=number_format($TotalVotes)?> / <?="$StaffCount\n"?>
<br /> <br />
<strong>Missing votes:</strong> <?=implode(", ", $StaffNames)?> <strong>Missing votes:</strong> <?=implode(", ", $StaffNames); echo "\n";?>
<br /><br /> <br /><br />
<? <?
} }
@ -451,30 +452,35 @@
<tr class="colhead_dark"> <tr class="colhead_dark">
<td colspan="<?=Users::has_avatars_enabled() ? 2 : 1?>"> <td colspan="<?=Users::has_avatars_enabled() ? 2 : 1?>">
<div style="float: left;"><a class="post_id" href="forums.php?action=viewthread&amp;threadid=<?=$ThreadID?>&amp;postid=<?=$PostID?>#post<?=$PostID?>">#<?=$PostID?></a> <div style="float: left;"><a class="post_id" href="forums.php?action=viewthread&amp;threadid=<?=$ThreadID?>&amp;postid=<?=$PostID?>#post<?=$PostID?>">#<?=$PostID?></a>
<?=Users::format_username($AuthorID, true, true, true, true, true, $IsDonorForum)?> <?=Users::format_username($AuthorID, true, true, true, true, true, $IsDonorForum); echo "\n";?>
<?=time_diff($AddedTime,2)?> <?=time_diff($AddedTime, 2); echo "\n";?>
- <a href="#quickpost" id="quote_<?=$PostID?>" onclick="Quote('<?=$PostID?>','<?=$Username?>', true);" class="brackets">Quote</a> - <a href="#quickpost" id="quote_<?=$PostID?>" onclick="Quote('<?=$PostID?>', '<?=$Username?>', true);" class="brackets">Quote</a>
<? if ((!$ThreadInfo['IsLocked'] && Forums::check_forumperm($ForumID, 'Write') && $AuthorID == $LoggedUser['ID']) || check_perms('site_moderate_forums')) { ?> <? if ((!$ThreadInfo['IsLocked'] && Forums::check_forumperm($ForumID, 'Write') && $AuthorID == $LoggedUser['ID']) || check_perms('site_moderate_forums')) { ?>
- <a href="#post<?=$PostID?>" onclick="Edit_Form('<?=$PostID?>','<?=$Key?>');" class="brackets">Edit</a> - <a href="#post<?=$PostID?>" onclick="Edit_Form('<?=$PostID?>', '<?=$Key?>');" class="brackets">Edit</a>
<? } <?
}
if (check_perms('site_admin_forums') && $ThreadInfo['Posts'] > 1) { ?> if (check_perms('site_admin_forums') && $ThreadInfo['Posts'] > 1) { ?>
- <a href="#post<?=$PostID?>" onclick="Delete('<?=$PostID?>');" class="brackets">Delete</a> - <a href="#post<?=$PostID?>" onclick="Delete('<?=$PostID?>');" class="brackets">Delete</a>
<? } <?
}
if ($PostID == $ThreadInfo['StickyPostID']) { ?> if ($PostID == $ThreadInfo['StickyPostID']) { ?>
<strong><span class="sticky_post_label" class="brackets">Sticky</span></strong> <strong><span class="sticky_post_label" class="brackets">Sticky</span></strong>
<? if (check_perms('site_moderate_forums')) { ?> <? if (check_perms('site_moderate_forums')) { ?>
- <a href="forums.php?action=sticky_post&amp;threadid=<?=$ThreadID?>&amp;postid=<?=$PostID?>&amp;remove=true&amp;auth=<?=$LoggedUser['AuthKey']?>" class="brackets">X</a> - <a href="forums.php?action=sticky_post&amp;threadid=<?=$ThreadID?>&amp;postid=<?=$PostID?>&amp;remove=true&amp;auth=<?=$LoggedUser['AuthKey']?>" class="brackets">X</a>
<? } <?
}
} else { } else {
if (check_perms('site_moderate_forums')) { ?> if (check_perms('site_moderate_forums')) { ?>
- <a href="forums.php?action=sticky_post&amp;threadid=<?=$ThreadID?>&amp;postid=<?=$PostID?>&amp;auth=<?=$LoggedUser['AuthKey']?>" class="brackets">&#x21d5;</a> - <a href="forums.php?action=sticky_post&amp;threadid=<?=$ThreadID?>&amp;postid=<?=$PostID?>&amp;auth=<?=$LoggedUser['AuthKey']?>" class="brackets">&#x21d5;</a>
<? } <?
}
} }
?> ?>
</div> </div>
<div id="bar<?=$PostID?>" style="float: right;"> <div id="bar<?=$PostID?>" style="float: right;">
<a href="reports.php?action=report&amp;type=post&amp;id=<?=$PostID?>" class="brackets">Report</a> <a href="reports.php?action=report&amp;type=post&amp;id=<?=$PostID?>" class="brackets">Report</a>
<? if (check_perms('users_warn') && $AuthorID != $LoggedUser['ID']) { <?
if (check_perms('users_warn') && $AuthorID != $LoggedUser['ID']) {
$AuthorInfo = Users::user_info($AuthorID); $AuthorInfo = Users::user_info($AuthorID);
if ($LoggedUser['Class'] >= $AuthorInfo['Class']) { if ($LoggedUser['Class'] >= $AuthorInfo['Class']) {
?> ?>

View File

@ -156,7 +156,7 @@
Type Type
</td> </td>
<td> <td>
<select id="categories" name="type" onchange="Categories()"> <select id="categories" name="type" onchange="Categories();">
<? foreach (Misc::display_array($Categories) as $Cat) { ?> <? foreach (Misc::display_array($Categories) as $Cat) { ?>
<option value="<?=$Cat?>"<?=(!empty($CategoryName) && ($CategoryName === $Cat) ? ' selected="selected"' : '')?>><?=$Cat?></option> <option value="<?=$Cat?>"<?=(!empty($CategoryName) && ($CategoryName === $Cat) ? ' selected="selected"' : '')?>><?=$Cat?></option>
<? } ?> <? } ?>
@ -168,14 +168,13 @@
<td id="artistfields"> <td id="artistfields">
<p id="vawarning" class="hidden">Please use the multiple artists feature rather than adding "Various Artists" as an artist; read <a href="wiki.php?action=article&amp;id=369">this</a> for more information.</p> <p id="vawarning" class="hidden">Please use the multiple artists feature rather than adding "Various Artists" as an artist; read <a href="wiki.php?action=article&amp;id=369">this</a> for more information.</p>
<? <?
if (!empty($ArtistForm)) { if (!empty($ArtistForm)) {
$First = true; $First = true;
foreach ($ArtistForm as $Importance => $ArtistNames) { foreach ($ArtistForm as $Importance => $ArtistNames) {
foreach ($ArtistNames as $Artist) { foreach ($ArtistNames as $Artist) {
?> ?>
<input type="text" id="artist" name="artists[]" <? Users::has_autocomplete_enabled('other'); ?> size="45" value="<?=display_str($Artist['name']) ?>" /> <input type="text" id="artist" name="artists[]"<? Users::has_autocomplete_enabled('other'); ?> size="45" value="<?=display_str($Artist['name']) ?>" />
<select id="importance" name="importance[]" > <select id="importance" name="importance[]">
<option value="1"<?=($Importance == '1' ? ' selected="selected"' : '')?>>Main</option> <option value="1"<?=($Importance == '1' ? ' selected="selected"' : '')?>>Main</option>
<option value="2"<?=($Importance == '2' ? ' selected="selected"' : '')?>>Guest</option> <option value="2"<?=($Importance == '2' ? ' selected="selected"' : '')?>>Guest</option>
<option value="4"<?=($Importance == '4' ? ' selected="selected"' : '')?>>Composer</option> <option value="4"<?=($Importance == '4' ? ' selected="selected"' : '')?>>Composer</option>
@ -186,11 +185,12 @@
</select> </select>
<? if ($First) { ?><a href="#" onclick="AddArtistField(); return false;" class="brackets">+</a> <a href="#" onclick="RemoveArtistField(); return false;" class="brackets">&minus;</a><? } $First = false; ?> <? if ($First) { ?><a href="#" onclick="AddArtistField(); return false;" class="brackets">+</a> <a href="#" onclick="RemoveArtistField(); return false;" class="brackets">&minus;</a><? } $First = false; ?>
<br /> <br />
<? } <?
}
} }
} else { } else {
?> <input type="text" id="artist" name="artists[]" <? Users::has_autocomplete_enabled('other'); ?>size="45" onblur="CheckVA();" /> ?> <input type="text" id="artist" name="artists[]"<? Users::has_autocomplete_enabled('other'); ?> size="45" onblur="CheckVA();" />
<select id="importance" name="importance[]" > <select id="importance" name="importance[]">
<option value="1">Main</option> <option value="1">Main</option>
<option value="2">Guest</option> <option value="2">Guest</option>
<option value="4">Composer</option> <option value="4">Composer</option>
@ -199,7 +199,7 @@
<option value="3">Remixer</option> <option value="3">Remixer</option>
<option value="7">Producer</option> <option value="7">Producer</option>
</select> </select>
<a href="#" onclick="AddArtistField();return false;" class="brackets">+</a> <a href="#" onclick="RemoveArtistField();return false;" class="brackets">&minus;</a> <a href="#" onclick="AddArtistField(); return false;" class="brackets">+</a> <a href="#" onclick="RemoveArtistField(); return false;" class="brackets">&minus;</a>
<? <?
} }
?> ?>
@ -259,7 +259,7 @@
$Cache->cache_value('genre_tags', $GenreTags, 3600 * 6); $Cache->cache_value('genre_tags', $GenreTags, 3600 * 6);
} }
?> ?>
<select id="genre_tags" name="genre_tags" onchange="add_tag();return false;" > <select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;">
<option>---</option> <option>---</option>
<? foreach (Misc::display_array($GenreTags) as $Genre) { ?> <? foreach (Misc::display_array($GenreTags) as $Genre) { ?>
<option value="<?=$Genre?>"><?=$Genre?></option> <option value="<?=$Genre?>"><?=$Genre?></option>
@ -281,7 +281,7 @@
<? <?
foreach ($ReleaseTypes as $Key => $Val) { foreach ($ReleaseTypes as $Key => $Val) {
//echo '<h1>'.$ReleaseType.'</h1>'; die(); //echo '<h1>'.$ReleaseType.'</h1>'; die();
?> <option value="<?=$Key?>"<?=(!empty($ReleaseType) ? ($Key == $ReleaseType ? ' selected="selected"' : '') : '') ?>><?=$Val?></option> ?> <option value="<?=$Key?>"<?=!empty($ReleaseType) ? ($Key == $ReleaseType ? ' selected="selected"' : '') : '' ?>><?=$Val?></option>
<? <?
} }
?> ?>
@ -291,7 +291,7 @@
<tr id="formats_tr"> <tr id="formats_tr">
<td class="label">Allowed formats</td> <td class="label">Allowed formats</td>
<td> <td>
<input type="checkbox" name="all_formats" id="toggle_formats" onchange="Toggle('formats', <?=($NewRequest ? 1 : 0)?>);"<?=(!empty($FormatArray) && (count($FormatArray) === count($Formats)) ? ' checked="checked"' : '')?> /><label for="toggle_formats"> All</label> <input type="checkbox" name="all_formats" id="toggle_formats" onchange="Toggle('formats', <?=($NewRequest ? 1 : 0)?>);"<?=!empty($FormatArray) && (count($FormatArray) === count($Formats)) ? ' checked="checked"' : ''; ?> /><label for="toggle_formats"> All</label>
<span style="float: right;"><strong>NB: You cannot require a log or cue unless FLAC is an allowed format</strong></span> <span style="float: right;"><strong>NB: You cannot require a log or cue unless FLAC is an allowed format</strong></span>
<? foreach ($Formats as $Key => $Val) { <? foreach ($Formats as $Key => $Val) {
if ($Key % 8 === 0) { if ($Key % 8 === 0) {

View File

@ -34,18 +34,18 @@
error(0); error(0);
} }
/* uTorrent Remote redownloads .torrent files every fifteen minutes. /* uTorrent Remote and various scripts redownload .torrent files periodically.
To prevent this retardation from blowing bandwidth etc., let's block it To prevent this retardation from blowing bandwidth etc., let's block it
if he has downloaded the .torrent file twice before */ if the .torrent file has been downloaded four times before */
if (strpos($_SERVER['HTTP_USER_AGENT'], 'BTWebClient') !== false) { if (strpos($_SERVER['HTTP_USER_AGENT'], 'BTWebClient') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'Python-urllib') !== false) {
$DB->query(" $DB->query("
SELECT 1 SELECT 1
FROM users_downloads FROM users_downloads
WHERE UserID = $UserID WHERE UserID = $UserID
AND TorrentID = $TorrentID AND TorrentID = $TorrentID
LIMIT 3"); LIMIT 4");
if ($DB->record_count() > 2) { if ($DB->record_count() === 4) {
error('You have already downloaded this torrent file three times. If you need to download it again, please do so from your browser, not through μTorrent Remote.'); error('You have already downloaded this torrent file four times. If you need to download it again, please do so from your browser.', true);
die(); die();
} }
} }

View File

@ -150,8 +150,8 @@ function checked($Checked) {
<? foreach ($Stylesheets as $Style) { ?> <? foreach ($Stylesheets as $Style) { ?>
<div class="preview_wrapper"> <div class="preview_wrapper">
<div class="preview_image" name="<?=($Style['Name'])?>"> <div class="preview_image" name="<?=($Style['Name'])?>">
<a href="<?=STATIC_SERVER.'stylespreview/full_'.$Style['Name'].'.png'?>" target="_blank" alt="<?=$Style['Name']?>"> <a href="<?=STATIC_SERVER.'stylespreview/full_'.$Style['Name'].'.png'?>" target="_blank">
<img src="<?=STATIC_SERVER.'stylespreview/thumb_'.$Style['Name'].'.png'?>" /> <img src="<?=STATIC_SERVER.'stylespreview/thumb_'.$Style['Name'].'.png'?>" alt="<?=$Style['Name']?>" />
</a> </a>
</div> </div>
<p class="preview_name"> <p class="preview_name">
@ -809,14 +809,12 @@ function checked($Checked) {
<input type="password" size="40" name="new_pass_2" id="new_pass_2" value="" maxlength="40" /> <strong id="pass_match"></strong></label> <input type="password" size="40" name="new_pass_2" id="new_pass_2" value="" maxlength="40" /> <strong id="pass_match"></strong></label>
</div> </div>
<div class="setting_description"> <div class="setting_description">
<span> A strong password:
A strong password: <ul>
<ul> <li>is between 8 and 40 characters long</li>
<li>is between 8 and 40 characters long</li> <li>contains at least 1 lowercase and uppercase letter</li>
<li>contains at least 1 lowercase and uppercase letter</li> <li>contains at least a number or symbol</li>
<li>contains at least a number or symbol</li> </ul>
</ul>
</span>
</div> </div>
</td> </td>
</tr> </tr>