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,7 +3,8 @@
class NotificationsManagerView {
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/themes/default.js"></script>
@ -16,7 +17,7 @@ public static function render_settings($Settings) {
self::$Settings = $Settings;
?>
<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>
</td>
<td>
@ -24,7 +25,7 @@ public static function render_settings($Settings) {
</td>
</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>
</td>
<td>
@ -32,7 +33,7 @@ public static function render_settings($Settings) {
</td>
</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>
</td>
<td>
@ -48,7 +49,7 @@ public static function render_settings($Settings) {
</td>
</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>
</td>
<td>
@ -140,7 +141,7 @@ private static function render_checkbox($Name, $Both = false) {
}
$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>
<?
}

View File

@ -730,6 +730,9 @@ public static function has_autocomplete_enabled($Type, $Output = true) {
if ($Enabled && $Output) {
echo ' data-gazelle-autocomplete="true"';
}
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:
* 403, 404, 0 (invalid input), -1 (invalid request)
* 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.
*/
function error($Error, $Ajax = false, $Log = false) {
function error($Error, $NoHTML = false, $Log = false) {
global $Debug;
require(SERVER_ROOT.'/sections/error/index.php');
$Debug->profile();

View File

@ -4,7 +4,7 @@
?>
<!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">
<head>
<head>
<title><?=display_str($PageTitle)?></title>
<meta http-equiv="X-UA-Compatible" content="chrome=1;IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
@ -17,91 +17,100 @@
<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?> 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" 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." />
<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"
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'])) {
foreach (G::$LoggedUser['Notify'] as $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"
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" />
<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']?>"
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']?>"
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']?>"
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']?>"
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']?>"
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']?>"
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']?>"
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']?>"
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']?>"
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']?>"
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']?>"
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']?>"
title="<?=SITE_NAME?> - 24bit Lossless Torrents" />
<link
href="<?=STATIC_SERVER?>styles/global.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/global.css')?>"
rel="stylesheet" type="text/css" />
<? if ($UseTooltipster) { ?>
<link rel="stylesheet" href="<?=STATIC_SERVER?>styles/tooltipster/style.css" type="text/css" media="screen"/>
<? }
<link rel="stylesheet" type="text/css"
href="<?=STATIC_SERVER?>styles/global.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/global.css')?>" />
<?
$UseTooltipster = !isset(G::$LoggedUser['Tooltipster']) || G::$LoggedUser['Tooltipster'];
if ($UseTooltipster) { ?>
<link rel="stylesheet" href="<?=STATIC_SERVER?>styles/tooltipster/style.css" type="text/css" media="screen" />
<?
}
if ($Mobile) { ?>
<meta name="viewport"
content="width=device-width; initial-scale=1.0; maximum-scale=1.0, user-scalable=no;" />
<link href="<?=STATIC_SERVER ?>styles/mobile/style.css" rel="stylesheet"
type="text/css" />
<meta name="viewport" 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" />
<?
} else {
if (empty(G::$LoggedUser['StyleURL'])) {
?>
<link
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" />
<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')?>" />
<? } else { ?>
<link href="<?=G::$LoggedUser['StyleURL']?>" title="External CSS"
rel="stylesheet" type="text/css" media="screen" />
<link rel="stylesheet" type="text/css" media="screen" href="<?=G::$LoggedUser['StyleURL']?>" title="External CSS" />
<?
}
if (!empty(G::$LoggedUser['UseOpenDyslexic'])) {
// load the OpenDyslexic font ?>
<link rel="stylesheet"
href="<?=STATIC_SERVER?>styles/opendyslexic/style.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/opendyslexic/style.css')?>"
type="text/css" charset="utf-8" />
// load the OpenDyslexic font
?>
<link rel="stylesheet" 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)) {
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"
type="text/javascript"></script>
<script
<script src="<?=STATIC_SERVER?>functions/jquery.js" type="text/javascript"></script>
<script
src="<?=STATIC_SERVER?>functions/script_start.js?v=<?=filemtime(SERVER_ROOT.'/static/functions/script_start.js')?>"
type="text/javascript"></script>
<script
<script
src="<?=STATIC_SERVER?>functions/ajax.class.js?v=<?=filemtime(SERVER_ROOT.'/static/functions/ajax.class.js')?>"
type="text/javascript"></script>
<script type="text/javascript">//<![CDATA[
<script type="text/javascript">
//<![CDATA[
var authkey = "<?=G::$LoggedUser['AuthKey']?>";
var userid = <?=G::$LoggedUser['ID']?>;
//]]></script>
<script
//]]>
</script>
<script
src="<?=STATIC_SERVER?>functions/global.js?v=<?=filemtime(SERVER_ROOT.'/static/functions/global.js')?>"
type="text/javascript"></script>
<script src="<?=STATIC_SERVER?>functions/jquery.autocomplete.js"
type="text/javascript"></script>
<script src="<?=STATIC_SERVER?>functions/autocomplete.js"
type="text/javascript"></script>
<script src="<?=STATIC_SERVER?>functions/jquery.autocomplete.js" type="text/javascript"></script>
<script src="<?=STATIC_SERVER?>functions/autocomplete.js" type="text/javascript"></script>
<? if ($UseTooltipster) { ?>
<script src="<?=STATIC_SERVER?>functions/tooltipster.js"
type="text/javascript"></script>
<script src="<?=STATIC_SERVER?>functions/tooltipster.js" type="text/javascript"></script>
<? } ?>
<script src="<?=STATIC_SERVER?>functions/tooltipster_settings.js"
type="text/javascript"></script>
<script src="<?=STATIC_SERVER?>functions/tooltipster_settings.js" type="text/javascript"></script>
<?
NotificationsManagerView::load_js();
@ -154,8 +161,7 @@
<?
}
if ($Mobile) { ?>
<script src="<?=STATIC_SERVER?>styles/mobile/style.js"
type="text/javascript"></script>
<script src="<?=STATIC_SERVER?>styles/mobile/style.js" type="text/javascript"></script>
<?
}
?>
@ -163,26 +169,26 @@
<body id="<?=$Document == 'collages' ? 'collage' : $Document?>">
<div id="wrapper">
<h1 class="hidden"><?=SITE_NAME?></h1>
<div id="header">
<div id="logo">
<a href="index.php"></a>
</div>
<div id="userinfo">
<ul id="userinfo_username">
<li id="nav_userinfo"
<?=Format::add_class($PageID, array('user',false,false), 'active', true, 'id')?>><a
href="user.php?id=<?=G::$LoggedUser['ID']?>" class="username"><?=G::$LoggedUser['Username']?></a></li>
<li id="nav_useredit"
class="brackets<?=Format::add_class($PageID, array('user','edit'), 'active', false)?>"><a
href="user.php?action=edit&amp;userid=<?=G::$LoggedUser['ID']?>">Edit</a></li>
<li id="nav_logout" class="brackets"><a
href="logout.php?auth=<?=G::$LoggedUser['AuthKey']?>">Logout</a></li>
<li id="nav_userinfo" <?=Format::add_class($PageID, array('user', false, false), 'active', true, 'id')?>>
<a href="user.php?id=<?=G::$LoggedUser['ID']?>" class="username"><?=G::$LoggedUser['Username']?></a>
</li>
<li id="nav_useredit" class="brackets<?=Format::add_class($PageID, array('user','edit'), 'active', false)?>">
<a href="user.php?action=edit&amp;userid=<?=G::$LoggedUser['ID']?>">Edit</a>
</li>
<li id="nav_logout" class="brackets">
<a href="logout.php?auth=<?=G::$LoggedUser['AuthKey']?>">Logout</a>
</li>
</ul>
<ul id="userinfo_major">
<li id="nav_upload"
class="brackets<?=Format::add_class($PageID, array('upload'), 'active', false)?>"><a
href="upload.php">Upload</a></li>
<li id="nav_upload" class="brackets<?=Format::add_class($PageID, array('upload'), 'active', false)?>">
<a href="upload.php">Upload</a>
</li>
<?
if (check_perms('site_send_unlimited_invites')) {
$Invites = ' (∞)';
@ -192,102 +198,120 @@ class="brackets<?=Format::add_class($PageID, array('upload'), 'active', false)?>
$Invites = '';
}
?>
<li id="nav_invite"
class="brackets<?=Format::add_class($PageID, array('user','invite'), 'active', false)?>"><a
href="user.php?action=invite">Invite<?=$Invites?></a></li>
<li id="nav_donate"
class="brackets<?=Format::add_class($PageID, array('donate'), 'active', false)?>"><a
href="donate.php">Donate</a></li>
<li id="nav_invite" class="brackets<?=Format::add_class($PageID, array('user','invite'), 'active', false)?>">
<a href="user.php?action=invite">Invite<?=$Invites?></a>
</li>
<li id="nav_donate" class="brackets<?=Format::add_class($PageID, array('donate'), 'active', false)?>">
<a href="donate.php">Donate</a>
</li>
</ul>
<ul id="userinfo_stats">
<li id="stats_seeding"><a
href="torrents.php?type=seeding&amp;userid=<?=G::$LoggedUser['ID']?>">Up</a>:
<span class="stat"
title="<?=Format::get_size(G::$LoggedUser['BytesUploaded'], 5)?>"><?=Format::get_size(G::$LoggedUser['BytesUploaded'])?></span></li>
<li id="stats_leeching"><a
href="torrents.php?type=leeching&amp;userid=<?=G::$LoggedUser['ID']?>">Down</a>:
<span class="stat"
title="<?=Format::get_size(G::$LoggedUser['BytesDownloaded'], 5)?>"><?=Format::get_size(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>
<li id="stats_seeding">
<a href="torrents.php?type=seeding&amp;userid=<?=G::$LoggedUser['ID']?>">Up</a>:
<span class="stat" title="<?=Format::get_size(G::$LoggedUser['BytesUploaded'], 5)?>"><?=Format::get_size(G::$LoggedUser['BytesUploaded'])?></span>
</li>
<li id="stats_leeching">
<a href="torrents.php?type=leeching&amp;userid=<?=G::$LoggedUser['ID']?>">Down</a>:
<span class="stat" title="<?=Format::get_size(G::$LoggedUser['BytesDownloaded'], 5)?>"><?=Format::get_size(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'])) { ?>
<li id="stats_required"><a href="rules.php?p=ratio">Required</a>: <span
class="stat"
title="<?=number_format(G::$LoggedUser['RequiredRatio'], 5)?>"><?=number_format(G::$LoggedUser['RequiredRatio'], 2)?></span></li>
<li id="stats_required">
<a href="rules.php?p=ratio">Required</a>:
<span class="stat" title="<?=number_format(G::$LoggedUser['RequiredRatio'], 5)?>"><?=number_format(G::$LoggedUser['RequiredRatio'], 2)?></span>
</li>
<? }
if (G::$LoggedUser['FLTokens'] > 0) { ?>
<li id="fl_tokens"><a href="wiki.php?action=article&amp;id=754">Tokens</a>:
<span class="stat"><a
href="userhistory.php?action=token_history&amp;userid=<?=G::$LoggedUser['ID']?>"><?=G::$LoggedUser['FLTokens']?></a></span></li>
<li id="fl_tokens">
<a href="wiki.php?action=article&amp;id=754">Tokens</a>:
<span class="stat">
<a href="userhistory.php?action=token_history&amp;userid=<?=G::$LoggedUser['ID']?>"><?=G::$LoggedUser['FLTokens']?></a>
</span>
</li>
<? } ?>
</ul>
<ul id="userinfo_minor">
<li id="nav_inbox"
<?=Format::add_class($PageID, array('inbox'), 'active', true)?>><a
onmousedown="Stats('inbox');"
href="<?=Inbox::get_inbox_link(); ?>">Inbox</a></li>
<li id="nav_staffinbox"
<?=Format::add_class($PageID, array('staffpm'), 'active', true)?>><a
onmousedown="Stats('staffpm');" href="staffpm.php">Staff Inbox</a></li>
<li id="nav_uploaded"
<?=Format::add_class($PageID, array('torrents',false,'uploaded'), 'active', true, 'userid')?>><a
onmousedown="Stats('uploads');"
href="torrents.php?type=uploaded&amp;userid=<?=G::$LoggedUser['ID']?>">Uploads</a></li>
<li id="nav_bookmarks"
<?=Format::add_class($PageID, array('bookmarks'), 'active', true)?>><a
onmousedown="Stats('bookmarks');"
href="bookmarks.php?type=torrents">Bookmarks</a></li>
<li id="nav_inbox"<?=
Format::add_class($PageID, array('inbox'), 'active', true)?>>
<a onmousedown="Stats('inbox');" href="<?=Inbox::get_inbox_link(); ?>">Inbox</a>
</li>
<li id="nav_staffinbox"<?=
Format::add_class($PageID, array('staffpm'), 'active', true)?>>
<a onmousedown="Stats('staffpm');" href="staffpm.php">Staff Inbox</a>
</li>
<li id="nav_uploaded"<?=
Format::add_class($PageID, array('torrents', false, 'uploaded'), 'active', true, 'userid')?>>
<a onmousedown="Stats('uploads');"
href="torrents.php?type=uploaded&amp;userid=<?=G::$LoggedUser['ID']?>">Uploads</a>
</li>
<li id="nav_bookmarks"<?=
Format::add_class($PageID, array('bookmarks'), 'active', true)?>>
<a onmousedown="Stats('bookmarks');" href="bookmarks.php?type=torrents">Bookmarks</a>
</li>
<? if (check_perms('site_torrents_notify')) { ?>
<li id="nav_notifications"
<?=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>
<li id="nav_notifications"<?=
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>
<? } ?>
<li id="nav_subscriptions"
<?=Format::add_class($PageID, array('userhistory','subscriptions'), 'active', true)?>><a
onmousedown="Stats('subscriptions');"
href="userhistory.php?action=subscriptions">Subscriptions</a></li>
<li id="nav_comments"
<?=Format::add_class($PageID, array('comments'), 'active', true, 'userid')?>><a
onmousedown="Stats('comments');" href="comments.php">Comments</a></li>
<li id="nav_friends"
<?=Format::add_class($PageID, array('friends'), 'active', true)?>><a
onmousedown="Stats('friends');" href="friends.php">Friends</a></li>
<li id="nav_subscriptions"<?=
Format::add_class($PageID, array('userhistory', 'subscriptions'), 'active', true)?>>
<a onmousedown="Stats('subscriptions');" href="userhistory.php?action=subscriptions">Subscriptions</a>
</li>
<li id="nav_comments"<?=
Format::add_class($PageID, array('comments'), 'active', true, 'userid')?>>
<a onmousedown="Stats('comments');" href="comments.php">Comments</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>
</div>
<div id="menu">
<h4 class="hidden">Site Menu</h4>
<ul>
<li id="nav_index"
<?=Format::add_class($PageID, array('index'), 'active', true)?>><a
href="index.php">Home</a></li>
<li id="nav_torrents"
<?=Format::add_class($PageID, array('torrents',false,false), 'active', true)?>><a
href="torrents.php">Torrents</a></li>
<li id="nav_collages"
<?=Format::add_class($PageID, array('collages'), 'active', true)?>><a
href="collages.php">Collages</a></li>
<li id="nav_requests"
<?=Format::add_class($PageID, array('requests'), 'active', true)?>><a
href="requests.php">Requests</a></li>
<li id="nav_forums"
<?=Format::add_class($PageID, array('forums'), 'active', true)?>><a
href="forums.php">Forums</a></li>
<li id="nav_irc"
<?=Format::add_class($PageID, array('chat'), 'active', true)?>><a
href="chat.php">IRC</a></li>
<li id="nav_top10"
<?=Format::add_class($PageID, array('top10'), 'active', true)?>><a
href="top10.php">Top 10</a></li>
<li id="nav_rules"
<?=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>
<li id="nav_index"<?=
Format::add_class($PageID, array('index'), 'active', true)?>>
<a href="index.php">Home</a>
</li>
<li id="nav_torrents"<?=
Format::add_class($PageID, array('torrents', false, false), 'active', true)?>>
<a href="torrents.php">Torrents</a>
</li>
<li id="nav_collages"<?=
Format::add_class($PageID, array('collages'), 'active', true)?>>
<a href="collages.php">Collages</a>
</li>
<li id="nav_requests"<?=
Format::add_class($PageID, array('requests'), 'active', true)?>>
<a href="requests.php">Requests</a>
</li>
<li id="nav_forums"<?=
Format::add_class($PageID, array('forums'), 'active', true)?>>
<a href="forums.php">Forums</a>
</li>
<li id="nav_irc"<?=
Format::add_class($PageID, array('chat'), 'active', true)?>>
<a href="chat.php">IRC</a>
</li>
<li id="nav_top10"<?=
Format::add_class($PageID, array('top10'), 'active', true)?>>
<a href="top10.php">Top 10</a>
</li>
<li id="nav_rules"<?=
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>
</div>
<?
@ -456,88 +480,99 @@ class="stat"
<?
}
if (!empty($ModBar)) { ?>
<div class="alertbar blend"><?=implode(' | ', $ModBar)?></div>
<?
} ?>
<div class="alertbar blend">
<?=implode(' | ', $ModBar); echo "\n"?>
</div>
<? } ?>
</div>
<?
}
//Done handling alertbars
if (isset(G::$LoggedUser['SearchType']) && G::$LoggedUser['SearchType']) { // Advanced search
$UseAdvancedSearch = true;
} else {
$UseAdvancedSearch = false;
}
?>
<div id="searchbars">
<ul>
<li id="searchbar_torrents"><span class="hidden">Torrents: </span>
<form class="search_form" name="torrents" action="torrents.php"
method="get">
<? if (isset(G::$LoggedUser['SearchType']) && G::$LoggedUser['SearchType']) { // Advanced search ?>
<li id="searchbar_torrents">
<span class="hidden">Torrents: </span>
<form class="search_form" name="torrents" action="torrents.php" method="get">
<? if ($UseAdvancedSearch) { ?>
<input type="hidden" name="action" value="advanced" />
<? } ?>
<input id="torrentssearch" accesskey="t" spellcheck="false"
onfocus="if (this.value == 'Torrents') this.value = '';"
onblur="if (this.value == '') this.value = 'Torrents';"
<? if (isset(G::$LoggedUser['SearchType']) && G::$LoggedUser['SearchType']) { // Advanced search ?>
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');
onfocus="if (this.value == 'Torrents') { this.value = ''; }"
onblur="if (this.value == '') { this.value = 'Torrents'; }"
value="Torrents" type="text" name="<?=$UseAdvancedSearch ? 'groupname' : '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';"
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">
<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"
onfocus="if (this.value == 'Requests') this.value = '';"
onblur="if (this.value == '') this.value = 'Requests';"
onfocus="if (this.value == 'Requests') { this.value = ''; }"
onblur="if (this.value == '') { this.value = 'Requests'; }"
value="Requests" type="text" name="search" size="17" />
</form></li>
<li id="searchbar_forums"><span class="hidden">Forums: </span>
<form class="search_form" name="forums" action="forums.php"
method="get">
<input value="search" type="hidden" name="action" /> <input
id="forumssearch"
onfocus="if (this.value == 'Forums') this.value = '';"
onblur="if (this.value == '') this.value = 'Forums';"
</form>
</li>
<li id="searchbar_forums">
<span class="hidden">Forums: </span>
<form class="search_form" name="forums" action="forums.php" method="get">
<input value="search" type="hidden" name="action" />
<input id="forumssearch"
onfocus="if (this.value == 'Forums') { this.value = ''; }"
onblur="if (this.value == '') { this.value = 'Forums'; }"
value="Forums" type="text" name="search" size="17" />
</form></li>
</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">
<input type="hidden" name="action" value="search" />
<input
onfocus="if (this.value == 'Wiki') this.value = '';"
onblur="if (this.value == '') this.value = 'Wiki';"
value="Wiki" type="text" name="search" size="17"
/>
onfocus="if (this.value == 'Wiki') { this.value = ''; }"
onblur="if (this.value == '') { this.value = 'Wiki'; }"
value="Wiki" type="text" name="search" size="17" />
</form>
</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">
<input id="logsearch"
onfocus="if (this.value == 'Log') this.value = '';"
onblur="if (this.value == '') this.value = 'Log';" value="Log"
type="text" name="search" size="17" />
</form></li>
<li id="searchbar_users"><span class="hidden">Users: </span>
<form class="search_form" name="users" action="user.php"
method="get">
<input type="hidden" name="action" value="search" /> <input
onfocus="if (this.value == 'Log') { this.value = ''; }"
onblur="if (this.value == '') { this.value = 'Log'; }"
value="Log" type="text" name="search" size="17" />
</form>
</li>
<li id="searchbar_users">
<span class="hidden">Users: </span>
<form class="search_form" name="users" action="user.php" method="get">
<input type="hidden" name="action" value="search" />
<input
id="userssearch"
onfocus="if (this.value == 'Users') this.value = '';"
onblur="if (this.value == '') this.value = 'Users';" value="Users"
type="text" name="search" size="20" />
</form></li>
onfocus="if (this.value == 'Users') { this.value = ''; }"
onblur="if (this.value == '') { this.value = 'Users'; }"
value="Users" type="text" name="search" size="20" />
</form>
</li>
</ul>
</div>
</div>

View File

@ -176,7 +176,7 @@
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
<input type="hidden" name="collageid" value="<?=$CollageID?>" />
<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 class="submit_div">
<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>';
}
if (empty($Ajax) && $Error != -1) {
if (empty($NoHTML) && $Error != -1) {
View::show_header($Title);
?>
<div class="thin">

View File

@ -335,24 +335,25 @@
}
?> <ul style="list-style: none;" id="poll_options">
<?
foreach ($Answers as $i => $Answer) {
?>
<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>
- <?=$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>
</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>
- <?=$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 tooltip" title="Delete poll option">X</a>
</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>
<?
if ($ForumID == STAFF_FORUM) {
?>
<br />
<strong>Votes:</strong> <?=number_format($TotalVotes)?> / <?=$StaffCount ?>
<strong>Votes:</strong> <?=number_format($TotalVotes)?> / <?="$StaffCount\n"?>
<br />
<strong>Missing votes:</strong> <?=implode(", ", $StaffNames)?>
<strong>Missing votes:</strong> <?=implode(", ", $StaffNames); echo "\n";?>
<br /><br />
<?
}
@ -451,30 +452,35 @@
<tr class="colhead_dark">
<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>
<?=Users::format_username($AuthorID, true, true, true, true, true, $IsDonorForum)?>
<?=time_diff($AddedTime,2)?>
- <a href="#quickpost" id="quote_<?=$PostID?>" onclick="Quote('<?=$PostID?>','<?=$Username?>', true);" class="brackets">Quote</a>
<?=Users::format_username($AuthorID, true, true, true, true, true, $IsDonorForum); echo "\n";?>
<?=time_diff($AddedTime, 2); echo "\n";?>
- <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')) { ?>
- <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) { ?>
- <a href="#post<?=$PostID?>" onclick="Delete('<?=$PostID?>');" class="brackets">Delete</a>
<? }
<?
}
if ($PostID == $ThreadInfo['StickyPostID']) { ?>
<strong><span class="sticky_post_label" class="brackets">Sticky</span></strong>
<? 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>
<? }
<?
}
} else {
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>
<? }
<?
}
}
?>
</div>
<div id="bar<?=$PostID?>" style="float: right;">
<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);
if ($LoggedUser['Class'] >= $AuthorInfo['Class']) {
?>

View File

@ -156,7 +156,7 @@
Type
</td>
<td>
<select id="categories" name="type" onchange="Categories()">
<select id="categories" name="type" onchange="Categories();">
<? foreach (Misc::display_array($Categories) as $Cat) { ?>
<option value="<?=$Cat?>"<?=(!empty($CategoryName) && ($CategoryName === $Cat) ? ' selected="selected"' : '')?>><?=$Cat?></option>
<? } ?>
@ -168,14 +168,13 @@
<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>
<?
if (!empty($ArtistForm)) {
$First = true;
foreach ($ArtistForm as $Importance => $ArtistNames) {
foreach ($ArtistNames as $Artist) {
?>
<input type="text" id="artist" name="artists[]" <? Users::has_autocomplete_enabled('other'); ?> size="45" value="<?=display_str($Artist['name']) ?>" />
<select id="importance" name="importance[]" >
<input type="text" id="artist" name="artists[]"<? Users::has_autocomplete_enabled('other'); ?> size="45" value="<?=display_str($Artist['name']) ?>" />
<select id="importance" name="importance[]">
<option value="1"<?=($Importance == '1' ? ' selected="selected"' : '')?>>Main</option>
<option value="2"<?=($Importance == '2' ? ' selected="selected"' : '')?>>Guest</option>
<option value="4"<?=($Importance == '4' ? ' selected="selected"' : '')?>>Composer</option>
@ -186,11 +185,12 @@
</select>
<? if ($First) { ?><a href="#" onclick="AddArtistField(); return false;" class="brackets">+</a> <a href="#" onclick="RemoveArtistField(); return false;" class="brackets">&minus;</a><? } $First = false; ?>
<br />
<? }
<?
}
}
} else {
?> <input type="text" id="artist" name="artists[]" <? Users::has_autocomplete_enabled('other'); ?>size="45" onblur="CheckVA();" />
<select id="importance" name="importance[]" >
?> <input type="text" id="artist" name="artists[]"<? Users::has_autocomplete_enabled('other'); ?> size="45" onblur="CheckVA();" />
<select id="importance" name="importance[]">
<option value="1">Main</option>
<option value="2">Guest</option>
<option value="4">Composer</option>
@ -199,7 +199,7 @@
<option value="3">Remixer</option>
<option value="7">Producer</option>
</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);
}
?>
<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>
<? foreach (Misc::display_array($GenreTags) as $Genre) { ?>
<option value="<?=$Genre?>"><?=$Genre?></option>
@ -281,7 +281,7 @@
<?
foreach ($ReleaseTypes as $Key => $Val) {
//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">
<td class="label">Allowed formats</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>
<? foreach ($Formats as $Key => $Val) {
if ($Key % 8 === 0) {

View File

@ -34,18 +34,18 @@
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
if he has downloaded the .torrent file twice before */
if (strpos($_SERVER['HTTP_USER_AGENT'], 'BTWebClient') !== false) {
if the .torrent file has been downloaded four times before */
if (strpos($_SERVER['HTTP_USER_AGENT'], 'BTWebClient') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'Python-urllib') !== false) {
$DB->query("
SELECT 1
FROM users_downloads
WHERE UserID = $UserID
AND TorrentID = $TorrentID
LIMIT 3");
if ($DB->record_count() > 2) {
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.');
LIMIT 4");
if ($DB->record_count() === 4) {
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();
}
}

View File

@ -150,8 +150,8 @@ function checked($Checked) {
<? foreach ($Stylesheets as $Style) { ?>
<div class="preview_wrapper">
<div class="preview_image" name="<?=($Style['Name'])?>">
<a href="<?=STATIC_SERVER.'stylespreview/full_'.$Style['Name'].'.png'?>" target="_blank" alt="<?=$Style['Name']?>">
<img src="<?=STATIC_SERVER.'stylespreview/thumb_'.$Style['Name'].'.png'?>" />
<a href="<?=STATIC_SERVER.'stylespreview/full_'.$Style['Name'].'.png'?>" target="_blank">
<img src="<?=STATIC_SERVER.'stylespreview/thumb_'.$Style['Name'].'.png'?>" alt="<?=$Style['Name']?>" />
</a>
</div>
<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>
</div>
<div class="setting_description">
<span>
A strong password:
<ul>
<li>is between 8 and 40 characters long</li>
<li>contains at least 1 lowercase and uppercase letter</li>
<li>contains at least a number or symbol</li>
</ul>
</span>
</div>
</td>
</tr>