2011-03-28 14:21:28 +00:00
< ?
define ( 'FOOTER_FILE' , SERVER_ROOT . '/design/privatefooter.php' );
$HTTPS = ( $_SERVER [ 'SERVER_PORT' ] == 443 ) ? 'ssl_' : '' ;
?>
<! 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 " >
2013-10-07 08:01:03 +00:00
< 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 " />
< link rel = " shortcut icon " href = " favicon.ico " />
< 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?> 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?> 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?> 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&user=<?=G:: $LoggedUser['ID'] ?>&auth=<?=G:: $LoggedUser['RSS_Auth'] ?>&passkey=<?=G:: $LoggedUser['torrent_pass'] ?>&authkey=<?=G:: $LoggedUser['AuthKey'] ?> "
title = " <?=SITE_NAME?> - News " />
< link rel = " alternate " type = " application/rss+xml "
href = " feeds.php?feed=feed_blog&user=<?=G:: $LoggedUser['ID'] ?>&auth=<?=G:: $LoggedUser['RSS_Auth'] ?>&passkey=<?=G:: $LoggedUser['torrent_pass'] ?>&authkey=<?=G:: $LoggedUser['AuthKey'] ?> "
title = " <?=SITE_NAME?> - Blog " />
< link rel = " alternate " type = " application/rss+xml "
href = " feeds.php?feed=feed_changelog&user=<?=G:: $LoggedUser['ID'] ?>&auth=<?=G:: $LoggedUser['RSS_Auth'] ?>&passkey=<?=G:: $LoggedUser['torrent_pass'] ?>&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'] ?>&user=<?=G:: $LoggedUser['ID'] ?>&auth=<?=G:: $LoggedUser['RSS_Auth'] ?>&passkey=<?=G:: $LoggedUser['torrent_pass'] ?>&authkey=<?=G:: $LoggedUser['AuthKey'] ?> "
title = " <?=SITE_NAME?> - P.T.N. " />
2013-03-23 08:00:43 +00:00
< ?
2013-08-28 23:08:41 +00:00
if ( isset ( G :: $LoggedUser [ 'Notify' ])) {
foreach ( G :: $LoggedUser [ 'Notify' ] as $Filter ) {
2011-03-28 14:21:28 +00:00
list ( $FilterID , $FilterName ) = $Filter ;
?>
2013-10-07 08:01:03 +00:00
< link rel = " alternate " type = " application/rss+xml "
href = " feeds.php?feed=torrents_notify_<?= $FilterID ?>_<?=G:: $LoggedUser['torrent_pass'] ?>&user=<?=G:: $LoggedUser['ID'] ?>&auth=<?=G:: $LoggedUser['RSS_Auth'] ?>&passkey=<?=G:: $LoggedUser['torrent_pass'] ?>&authkey=<?=G:: $LoggedUser['AuthKey'] ?>&name=<?=urlencode( $FilterName )?> "
title = " <?=SITE_NAME?> - <?=display_str( $FilterName )?> " />
2013-03-23 08:00:43 +00:00
< ?
}
}
?>
2013-07-01 08:01:00 +00:00
< link rel = " alternate " type = " application/rss+xml "
2013-10-07 08:01:03 +00:00
href = " feeds.php?feed=torrents_all&user=<?=G:: $LoggedUser['ID'] ?>&auth=<?=G:: $LoggedUser['RSS_Auth'] ?>&passkey=<?=G:: $LoggedUser['torrent_pass'] ?>&authkey=<?=G:: $LoggedUser['AuthKey'] ?> "
title = " <?=SITE_NAME?> - All Torrents " />
< link rel = " alternate " type = " application/rss+xml "
href = " feeds.php?feed=torrents_music&user=<?=G:: $LoggedUser['ID'] ?>&auth=<?=G:: $LoggedUser['RSS_Auth'] ?>&passkey=<?=G:: $LoggedUser['torrent_pass'] ?>&authkey=<?=G:: $LoggedUser['AuthKey'] ?> "
title = " <?=SITE_NAME?> - Music Torrents " />
< link rel = " alternate " type = " application/rss+xml "
href = " feeds.php?feed=torrents_apps&user=<?=G:: $LoggedUser['ID'] ?>&auth=<?=G:: $LoggedUser['RSS_Auth'] ?>&passkey=<?=G:: $LoggedUser['torrent_pass'] ?>&authkey=<?=G:: $LoggedUser['AuthKey'] ?> "
title = " <?=SITE_NAME?> - Application Torrents " />
< link rel = " alternate " type = " application/rss+xml "
href = " feeds.php?feed=torrents_ebooks&user=<?=G:: $LoggedUser['ID'] ?>&auth=<?=G:: $LoggedUser['RSS_Auth'] ?>&passkey=<?=G:: $LoggedUser['torrent_pass'] ?>&authkey=<?=G:: $LoggedUser['AuthKey'] ?> "
title = " <?=SITE_NAME?> - E-Book Torrents " />
< link rel = " alternate " type = " application/rss+xml "
href = " feeds.php?feed=torrents_abooks&user=<?=G:: $LoggedUser['ID'] ?>&auth=<?=G:: $LoggedUser['RSS_Auth'] ?>&passkey=<?=G:: $LoggedUser['torrent_pass'] ?>&authkey=<?=G:: $LoggedUser['AuthKey'] ?> "
title = " <?=SITE_NAME?> - Audiobooks Torrents " />
< link rel = " alternate " type = " application/rss+xml "
href = " feeds.php?feed=torrents_evids&user=<?=G:: $LoggedUser['ID'] ?>&auth=<?=G:: $LoggedUser['RSS_Auth'] ?>&passkey=<?=G:: $LoggedUser['torrent_pass'] ?>&authkey=<?=G:: $LoggedUser['AuthKey'] ?> "
title = " <?=SITE_NAME?> - E-Learning Video Torrents " />
< link rel = " alternate " type = " application/rss+xml "
href = " feeds.php?feed=torrents_comedy&user=<?=G:: $LoggedUser['ID'] ?>&auth=<?=G:: $LoggedUser['RSS_Auth'] ?>&passkey=<?=G:: $LoggedUser['torrent_pass'] ?>&authkey=<?=G:: $LoggedUser['AuthKey'] ?> "
title = " <?=SITE_NAME?> - Comedy Torrents " />
< link rel = " alternate " type = " application/rss+xml "
href = " feeds.php?feed=torrents_comics&user=<?=G:: $LoggedUser['ID'] ?>&auth=<?=G:: $LoggedUser['RSS_Auth'] ?>&passkey=<?=G:: $LoggedUser['torrent_pass'] ?>&authkey=<?=G:: $LoggedUser['AuthKey'] ?> "
title = " <?=SITE_NAME?> - Comic Torrents " />
< link rel = " alternate " type = " application/rss+xml "
href = " feeds.php?feed=torrents_mp3&user=<?=G:: $LoggedUser['ID'] ?>&auth=<?=G:: $LoggedUser['RSS_Auth'] ?>&passkey=<?=G:: $LoggedUser['torrent_pass'] ?>&authkey=<?=G:: $LoggedUser['AuthKey'] ?> "
title = " <?=SITE_NAME?> - MP3 Torrents " />
< link rel = " alternate " type = " application/rss+xml "
href = " feeds.php?feed=torrents_flac&user=<?=G:: $LoggedUser['ID'] ?>&auth=<?=G:: $LoggedUser['RSS_Auth'] ?>&passkey=<?=G:: $LoggedUser['torrent_pass'] ?>&authkey=<?=G:: $LoggedUser['AuthKey'] ?> "
title = " <?=SITE_NAME?> - FLAC Torrents " />
< link rel = " alternate " type = " application/rss+xml "
href = " feeds.php?feed=torrents_vinyl&user=<?=G:: $LoggedUser['ID'] ?>&auth=<?=G:: $LoggedUser['RSS_Auth'] ?>&passkey=<?=G:: $LoggedUser['torrent_pass'] ?>&authkey=<?=G:: $LoggedUser['AuthKey'] ?> "
title = " <?=SITE_NAME?> - Vinyl Sourced Torrents " />
< link rel = " alternate " type = " application/rss+xml "
href = " feeds.php?feed=torrents_lossless&user=<?=G:: $LoggedUser['ID'] ?>&auth=<?=G:: $LoggedUser['RSS_Auth'] ?>&passkey=<?=G:: $LoggedUser['torrent_pass'] ?>&authkey=<?=G:: $LoggedUser['AuthKey'] ?> "
title = " <?=SITE_NAME?> - Lossless Torrents " />
< link rel = " alternate " type = " application/rss+xml "
href = " feeds.php?feed=torrents_lossless24&user=<?=G:: $LoggedUser['ID'] ?>&auth=<?=G:: $LoggedUser['RSS_Auth'] ?>&passkey=<?=G:: $LoggedUser['torrent_pass'] ?>&authkey=<?=G:: $LoggedUser['AuthKey'] ?> "
title = " <?=SITE_NAME?> - 24bit Lossless Torrents " />
< 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 " />
< ?
}
2013-08-28 23:08:41 +00:00
if ( $Mobile ) { ?>
2013-10-07 08:01:03 +00:00
< 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 " />
2013-03-23 08:00:43 +00:00
< ?
} else {
2013-08-28 23:08:41 +00:00
if ( empty ( G :: $LoggedUser [ 'StyleURL' ])) {
2013-03-23 08:00:43 +00:00
?>
2013-10-07 08:01:03 +00:00
< 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')?> " />
2013-03-23 08:00:43 +00:00
< ? } else { ?>
2013-10-07 08:01:03 +00:00
< link rel = " stylesheet " type = " text/css " media = " screen " href = " <?=G:: $LoggedUser['StyleURL'] ?> " title = " External CSS " />
2013-06-02 08:01:02 +00:00
< ?
}
2013-08-28 23:08:41 +00:00
if ( ! empty ( G :: $LoggedUser [ 'UseOpenDyslexic' ])) {
2013-10-07 08:01:03 +00:00
// 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')?> " />
2013-06-02 08:01:02 +00:00
2013-10-07 08:01:03 +00:00
<!--
< 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')?> " />
-->
2013-03-23 08:00:43 +00:00
< ?
}
}
2013-08-28 23:08:41 +00:00
$ExtraCSS = explode ( ',' , $CSSIncludes );
foreach ( $ExtraCSS as $CSS ) {
if ( empty ( $CSS )) {
continue ;
} ?>
2013-10-07 08:01:03 +00:00
< link rel = " stylesheet " type = " text/css " media = " screen " href = " <?=STATIC_SERVER?>styles/<?= $CSS ?>/style.css " />
2013-08-28 23:08:41 +00:00
< ?
2013-10-07 08:01:03 +00:00
}
?>
2011-03-28 14:21:28 +00:00
2013-10-07 08:01:03 +00:00
< 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
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[
2013-08-28 23:08:41 +00:00
var authkey = " <?=G:: $LoggedUser['AuthKey'] ?> " ;
var userid = < ? = G :: $LoggedUser [ 'ID' ] ?> ;
2013-10-07 08:01:03 +00:00
//]]>
</ 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 >
2013-08-28 23:08:41 +00:00
< ? if ( $UseTooltipster ) { ?>
2013-10-07 08:01:03 +00:00
< script src = " <?=STATIC_SERVER?>functions/tooltipster.js " type = " text/javascript " ></ script >
2013-08-28 23:08:41 +00:00
< ? } ?>
2013-10-07 08:01:03 +00:00
< script src = " <?=STATIC_SERVER?>functions/tooltipster_settings.js " type = " text/javascript " ></ script >
2013-03-23 08:00:43 +00:00
< ?
2011-03-28 14:21:28 +00:00
2013-05-28 08:01:02 +00:00
$Scripts = explode ( ',' , $JSIncludes );
2011-03-28 14:21:28 +00:00
foreach ( $Scripts as $Script ) {
2013-03-23 08:00:43 +00:00
if ( empty ( $Script )) {
continue ;
}
2011-03-28 14:21:28 +00:00
?>
2013-07-01 08:01:00 +00:00
< script
2013-10-07 08:01:03 +00:00
src = " <?=STATIC_SERVER?>functions/<?= $Script ?>.js?v=<?=filemtime(SERVER_ROOT.'/static/functions/'. $Script .'.js')?> "
type = " text/javascript " ></ script >
2011-08-09 21:03:28 +00:00
< ?
}
2011-03-28 14:21:28 +00:00
if ( $Mobile ) { ?>
2013-10-07 08:01:03 +00:00
< script src = " <?=STATIC_SERVER?>styles/mobile/style.js " type = " text/javascript " ></ script >
2011-08-09 21:03:28 +00:00
< ?
}
2013-10-17 08:00:50 +00:00
// Get notifications early to change menu items if needed
global $NotificationSpans ;
$NotificationsManager = new NotificationsManager ( G :: $LoggedUser [ 'ID' ]);
$Notifications = $NotificationsManager -> get_notifications ();
$UseNoty = $NotificationsManager -> use_noty ();
$NewSubscriptions = false ;
$NotificationSpans = array ();
foreach ( $Notifications as $Type => $Notification ) {
if ( $Type === NotificationsManager :: SUBSCRIPTIONS ) {
$NewSubscriptions = true ;
}
if ( $UseNoty ) {
$NotificationSpans [] = " <span class= \" noty-notification \" style= \" display: none; \" data-noty-type= \" $Type\ " data - noty - id = \ " $Notification[id] \" data-noty-importance= \" $Notification[importance] \" data-noty-url= \" $Notification[url] \" > $Notification[message] </span> " ;
}
}
if ( $UseNoty && ! empty ( $NotificationSpans )) {
NotificationsManagerView :: load_js ();
}
if ( $NotificationsManager -> is_skipped ( NotificationsManager :: SUBSCRIPTIONS )) {
$NewSubscriptions = Subscriptions :: has_new_subscriptions ();
}
2011-08-09 21:03:28 +00:00
?>
2011-03-28 14:21:28 +00:00
</ head >
2013-03-20 08:00:46 +00:00
< body id = " <?= $Document == 'collages' ? 'collage' : $Document ?> " >
2013-07-01 08:01:00 +00:00
< 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 " >
2013-10-07 08:01:03 +00:00
< 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&userid=<?=G:: $LoggedUser['ID'] ?> " > Edit </ a >
</ li >
< li id = " nav_logout " class = " brackets " >
< a href = " logout.php?auth=<?=G:: $LoggedUser['AuthKey'] ?> " > Logout </ a >
</ li >
2013-07-01 08:01:00 +00:00
</ ul >
< ul id = " userinfo_major " >
2013-10-07 08:01:03 +00:00
< li id = " nav_upload " class = " brackets<?=Format::add_class( $PageID , array('upload'), 'active', false)?> " >
< a href = " upload.php " > Upload </ a >
</ li >
2011-03-28 14:21:28 +00:00
< ?
2013-03-23 08:00:43 +00:00
if ( check_perms ( 'site_send_unlimited_invites' )) {
2011-03-28 14:21:28 +00:00
$Invites = ' (∞)' ;
2013-08-28 23:08:41 +00:00
} elseif ( G :: $LoggedUser [ 'Invites' ] > 0 ) {
$Invites = ' (' . G :: $LoggedUser [ 'Invites' ] . ')' ;
2011-03-28 14:21:28 +00:00
} else {
$Invites = '' ;
}
?>
2013-10-07 08:01:03 +00:00
< 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 >
2013-07-01 08:01:00 +00:00
</ ul >
< ul id = " userinfo_stats " >
2013-10-07 08:01:03 +00:00
< li id = " stats_seeding " >
< a href = " torrents.php?type=seeding&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&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 >
2013-08-28 23:08:41 +00:00
< ? if ( ! empty ( G :: $LoggedUser [ 'RequiredRatio' ])) { ?>
2013-10-07 08:01:03 +00:00
< 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 >
2012-10-27 08:00:09 +00:00
< ? }
2013-08-28 23:08:41 +00:00
if ( G :: $LoggedUser [ 'FLTokens' ] > 0 ) { ?>
2013-10-07 08:01:03 +00:00
< li id = " fl_tokens " >
< a href = " wiki.php?action=article&id=754 " > Tokens </ a >:
< span class = " stat " >
< a href = " userhistory.php?action=token_history&userid=<?=G:: $LoggedUser['ID'] ?> " >< ? = G :: $LoggedUser [ 'FLTokens' ] ?> </a>
</ span >
</ li >
2011-03-28 14:21:28 +00:00
< ? } ?>
2013-10-07 08:01:03 +00:00
</ ul >
2013-10-17 08:00:50 +00:00
< ul id = " userinfo_minor " < ? = $NewSubscriptions ? ' class="highlite"' : '' ?> >
2013-10-07 08:01:03 +00:00
< 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&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 >
2013-10-17 08:00:50 +00:00
< ? }
$ClassNames = $NewSubscriptions ? 'new-subscriptions' : '' ;
$ClassNames = trim ( $ClassNames . Format :: add_class ( $PageID , array ( 'userhistory' , 'subscriptions' ), 'active' , false ));
?>
< li id = " nav_subscriptions " < ? = $ClassNames ? " class= \" $ClassNames\ " " : ''?>>
2013-10-07 08:01:03 +00:00
< 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 >
2013-07-01 08:01:00 +00:00
</ ul >
</ div >
< div id = " menu " >
< h4 class = " hidden " > Site Menu </ h4 >
< ul >
2013-10-07 08:01:03 +00:00
< 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 >
2013-07-01 08:01:00 +00:00
</ ul >
</ div >
2011-03-28 14:21:28 +00:00
< ?
//Start handling alert bars
$Alerts = array ();
$ModBar = array ();
2013-02-15 08:00:35 +00:00
// Staff blog
2013-03-23 08:00:43 +00:00
if ( check_perms ( 'users_mod' )) {
2013-02-15 08:00:35 +00:00
global $SBlogReadTime , $LatestSBlogTime ;
2013-08-28 23:08:41 +00:00
if ( ! $SBlogReadTime && ( $SBlogReadTime = G :: $Cache -> get_value ( 'staff_blog_read_' . G :: $LoggedUser [ 'ID' ])) === false ) {
G :: $DB -> query ( "
2013-06-06 08:01:03 +00:00
SELECT Time
FROM staff_blog_visits
2013-08-28 23:08:41 +00:00
WHERE UserID = " .G:: $LoggedUser['ID'] );
if ( list ( $SBlogReadTime ) = G :: $DB -> next_record ()) {
2013-02-15 08:00:35 +00:00
$SBlogReadTime = strtotime ( $SBlogReadTime );
} else {
$SBlogReadTime = 0 ;
}
2013-08-28 23:08:41 +00:00
G :: $Cache -> cache_value ( 'staff_blog_read_' . G :: $LoggedUser [ 'ID' ], $SBlogReadTime , 1209600 );
2013-02-15 08:00:35 +00:00
}
2013-08-28 23:08:41 +00:00
if ( ! $LatestSBlogTime && ( $LatestSBlogTime = G :: $Cache -> get_value ( 'staff_blog_latest_time' )) === false ) {
G :: $DB -> query ( "
2013-06-06 08:01:03 +00:00
SELECT MAX ( Time )
FROM staff_blog " );
2013-08-28 23:08:41 +00:00
list ( $LatestSBlogTime ) = G :: $DB -> next_record ();
if ( $LatestSBlogTime ) {
2013-02-15 08:00:35 +00:00
$LatestSBlogTime = strtotime ( $LatestSBlogTime );
} else {
$LatestSBlogTime = 0 ;
}
2013-08-28 23:08:41 +00:00
G :: $Cache -> cache_value ( 'staff_blog_latest_time' , $LatestSBlogTime , 1209600 );
2013-02-15 08:00:35 +00:00
}
if ( $SBlogReadTime < $LatestSBlogTime ) {
2013-04-30 18:18:07 +00:00
$Alerts [] = '<a href="staffblog.php">New staff blog post!</a>' ;
2013-02-15 08:00:35 +00:00
}
}
2013-08-28 23:08:41 +00:00
// Inbox
if ( $NotificationsManager -> is_traditional ( NotificationsManager :: INBOX )) {
$NotificationsManager -> load_inbox ();
2013-10-19 08:01:09 +00:00
$NewMessages = $NotificationsManager -> get_notifications ();
if ( isset ( $NewMessages [ NotificationsManager :: INBOX ])) {
$Alerts [] = NotificationsManagerView :: format_traditional ( $NewMessages [ NotificationsManager :: INBOX ]);
2013-08-28 23:08:41 +00:00
}
$NotificationsManager -> clear_notifications_array ();
2011-03-28 14:21:28 +00:00
}
2013-08-28 23:08:41 +00:00
if ( G :: $LoggedUser [ 'RatioWatch' ]) {
$Alerts [] = '<a href="rules.php?p=ratio">Ratio Watch</a>: You have ' . time_diff ( G :: $LoggedUser [ 'RatioWatchEnds' ], 3 ) . ' to get your ratio over your required ratio or your leeching abilities will be disabled.' ;
} elseif ( G :: $LoggedUser [ 'CanLeech' ] != 1 ) {
2013-04-30 18:18:07 +00:00
$Alerts [] = '<a href="rules.php?p=ratio">Ratio Watch</a>: Your downloading privileges are disabled until you meet your required ratio.' ;
2011-03-28 14:21:28 +00:00
}
2013-08-28 23:08:41 +00:00
// Torrents
if ( $NotificationsManager -> is_traditional ( NotificationsManager :: TORRENTS )) {
$NotificationsManager -> load_torrent_notifications ();
2013-10-19 08:01:09 +00:00
$NewTorrents = $NotificationsManager -> get_notifications ();
if ( isset ( $NewTorrents [ NotificationsManager :: TORRENTS ])) {
$Alerts [] = NotificationsManagerView :: format_traditional ( $NewTorrents [ NotificationsManager :: TORRENTS ]);
2011-03-28 14:21:28 +00:00
}
2013-08-28 23:08:41 +00:00
$NotificationsManager -> clear_notifications_array ();
2011-03-28 14:21:28 +00:00
}
2013-03-23 08:00:43 +00:00
if ( check_perms ( 'users_mod' )) {
2013-04-30 18:18:07 +00:00
$ModBar [] = '<a href="tools.php">Toolbox</a>' ;
2012-12-06 08:00:17 +00:00
}
2013-08-28 23:08:41 +00:00
if ( check_perms ( 'users_mod' ) || G :: $LoggedUser [ 'PermissionID' ] == FORUM_MOD ) {
$NumStaffPMs = G :: $Cache -> get_value ( 'num_staff_pms_' . G :: $LoggedUser [ 'ID' ]);
2011-03-28 14:21:28 +00:00
if ( $NumStaffPMs === false ) {
2013-03-23 08:00:43 +00:00
if ( check_perms ( 'users_mod' )) {
2013-08-28 23:08:41 +00:00
G :: $DB -> query ( "
2013-05-27 08:00:58 +00:00
SELECT COUNT ( ID )
FROM staff_pm_conversations
2013-06-30 08:00:49 +00:00
WHERE Status = 'Unanswered'
2013-08-28 23:08:41 +00:00
AND ( AssignedToUser = " .G:: $LoggedUser['ID'] . "
2013-06-30 08:00:49 +00:00
OR ( Level >= " .max(700, $Classes[MOD] ['Level']). "
2013-08-28 23:08:41 +00:00
AND Level <= " .G:: $LoggedUser['Class'] . " )) " );
2012-12-06 08:00:17 +00:00
}
2013-08-28 23:08:41 +00:00
if ( G :: $LoggedUser [ 'PermissionID' ] == FORUM_MOD ) {
G :: $DB -> query ( "
2013-05-27 08:00:58 +00:00
SELECT COUNT ( ID )
FROM staff_pm_conversations
WHERE Status = 'Unanswered'
2013-08-28 23:08:41 +00:00
AND ( AssignedToUser = " .G:: $LoggedUser['ID'] . "
2013-05-27 08:00:58 +00:00
OR Level = '". $Classes[FORUM_MOD][' Level '] . "' ) " );
2012-12-06 08:00:17 +00:00
}
2013-08-28 23:08:41 +00:00
list ( $NumStaffPMs ) = G :: $DB -> next_record ();
G :: $Cache -> cache_value ( 'num_staff_pms_' . G :: $LoggedUser [ 'ID' ], $NumStaffPMs , 1000 );
2011-03-28 14:21:28 +00:00
}
2012-10-27 08:00:09 +00:00
2011-03-28 14:21:28 +00:00
if ( $NumStaffPMs > 0 ) {
$ModBar [] = '<a href="staffpm.php">' . $NumStaffPMs . ' Staff PMs</a>' ;
}
}
2013-03-23 08:00:43 +00:00
if ( check_perms ( 'admin_reports' )) {
2013-04-08 08:00:53 +00:00
// Torrent reports code
2013-08-28 23:08:41 +00:00
$NumTorrentReports = G :: $Cache -> get_value ( 'num_torrent_reportsv2' );
2011-03-28 14:21:28 +00:00
if ( $NumTorrentReports === false ) {
2013-08-28 23:08:41 +00:00
G :: $DB -> query ( "
2013-06-06 08:01:03 +00:00
SELECT COUNT ( ID )
FROM reportsv2
2013-06-30 08:00:49 +00:00
WHERE Status = 'New' " );
2013-08-28 23:08:41 +00:00
list ( $NumTorrentReports ) = G :: $DB -> next_record ();
G :: $Cache -> cache_value ( 'num_torrent_reportsv2' , $NumTorrentReports , 0 );
2011-03-28 14:21:28 +00:00
}
2013-02-22 08:00:24 +00:00
2011-03-28 14:21:28 +00:00
$ModBar [] = '<a href="reportsv2.php">' . $NumTorrentReports . (( $NumTorrentReports == 1 ) ? ' Report' : ' Reports' ) . '</a>' ;
2013-04-08 08:00:53 +00:00
// Other reports code
2013-08-28 23:08:41 +00:00
$NumOtherReports = G :: $Cache -> get_value ( 'num_other_reports' );
2011-03-28 14:21:28 +00:00
if ( $NumOtherReports === false ) {
2013-08-28 23:08:41 +00:00
G :: $DB -> query ( "
2013-06-06 08:01:03 +00:00
SELECT COUNT ( ID )
FROM reports
2013-06-30 08:00:49 +00:00
WHERE Status = 'New' " );
2013-08-28 23:08:41 +00:00
list ( $NumOtherReports ) = G :: $DB -> next_record ();
G :: $Cache -> cache_value ( 'num_other_reports' , $NumOtherReports , 0 );
2011-03-28 14:21:28 +00:00
}
2012-10-27 08:00:09 +00:00
2011-03-28 14:21:28 +00:00
if ( $NumOtherReports > 0 ) {
2013-03-02 08:00:34 +00:00
$ModBar [] = '<a href="reports.php">' . $NumOtherReports . (( $NumTorrentReports == 1 ) ? ' Other report' : ' Other reports' ) . '</a>' ;
2011-03-28 14:21:28 +00:00
}
2013-03-23 08:00:43 +00:00
} elseif ( check_perms ( 'project_team' )) {
2013-08-28 23:08:41 +00:00
$NumUpdateReports = G :: $Cache -> get_value ( 'num_update_reports' );
2011-03-28 14:21:28 +00:00
if ( $NumUpdateReports === false ) {
2013-08-28 23:08:41 +00:00
G :: $DB -> query ( "
2013-05-27 08:00:58 +00:00
SELECT COUNT ( ID )
FROM reports
2013-06-30 08:00:49 +00:00
WHERE Status = 'New'
2013-05-27 08:00:58 +00:00
AND Type = 'request_update' " );
2013-08-28 23:08:41 +00:00
list ( $NumUpdateReports ) = G :: $DB -> next_record ();
G :: $Cache -> cache_value ( 'num_update_reports' , $NumUpdateReports , 0 );
2011-03-28 14:21:28 +00:00
}
2012-10-27 08:00:09 +00:00
2011-03-28 14:21:28 +00:00
if ( $NumUpdateReports > 0 ) {
2013-04-30 18:18:07 +00:00
$ModBar [] = '<a href="reports.php">Request update reports</a>' ;
2011-03-28 14:21:28 +00:00
}
2013-03-23 08:00:43 +00:00
} elseif ( check_perms ( 'site_moderate_forums' )) {
2013-08-28 23:08:41 +00:00
$NumForumReports = G :: $Cache -> get_value ( 'num_forum_reports' );
2011-06-30 08:00:06 +00:00
if ( $NumForumReports === false ) {
2013-08-28 23:08:41 +00:00
G :: $DB -> query ( "
2013-05-27 08:00:58 +00:00
SELECT COUNT ( ID )
FROM reports
2013-06-30 08:00:49 +00:00
WHERE Status = 'New'
2013-05-27 08:00:58 +00:00
AND Type IN ( 'artist_comment' , 'collages_comment' , 'post' , 'requests_comment' , 'thread' , 'torrents_comment' ) " );
2013-08-28 23:08:41 +00:00
list ( $NumForumReports ) = G :: $DB -> next_record ();
G :: $Cache -> cache_value ( 'num_forum_reports' , $NumForumReports , 0 );
2011-06-30 08:00:06 +00:00
}
2012-10-27 08:00:09 +00:00
2011-06-30 08:00:06 +00:00
if ( $NumForumReports > 0 ) {
2013-04-08 08:00:53 +00:00
$ModBar [] = '<a href="reports.php">' . $NumForumReports . (( $NumForumReports == 1 ) ? ' Forum report' : ' Forum reports' ) . '</a>' ;
2011-06-30 08:00:06 +00:00
}
2011-03-28 14:21:28 +00:00
}
?>
2013-08-28 23:08:41 +00:00
< ?
if ( ! empty ( $Alerts ) || ! empty ( $ModBar )) { ?>
2013-10-07 08:01:03 +00:00
< div id = " alerts " >
< ? foreach ( $Alerts as $Alert ) { ?>
< div class = " alertbar " >< ? = $Alert ?> </div>
2013-08-28 23:08:41 +00:00
< ?
2013-10-07 08:01:03 +00:00
}
if ( ! empty ( $ModBar )) { ?>
< div class = " alertbar blend " >
< ? = implode ( ' | ' , $ModBar ); echo " \n " ?>
</ div >
< ? } ?>
</ div >
2011-03-28 14:21:28 +00:00
< ?
2013-10-07 08:01:03 +00:00
}
2011-03-28 14:21:28 +00:00
//Done handling alertbars
2013-04-08 08:00:53 +00:00
2013-10-07 08:01:03 +00:00
if ( isset ( G :: $LoggedUser [ 'SearchType' ]) && G :: $LoggedUser [ 'SearchType' ]) { // Advanced search
$UseAdvancedSearch = true ;
} else {
$UseAdvancedSearch = false ;
}
2011-03-28 14:21:28 +00:00
?>
2013-10-07 08:01:03 +00:00
< div id = " searchbars " >
2013-07-01 08:01:00 +00:00
< ul >
2013-10-07 08:01:03 +00:00
< 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 " />
2013-07-24 08:00:46 +00:00
< ? } ?>
2013-10-07 08:01:03 +00:00
< input id = " torrentssearch " accesskey = " t " spellcheck = " false "
onfocus = " if (this.value == 'Torrents') { this.value = ''; } "
onblur = " if (this.value == '') { this.value = 'Torrents'; } "
2013-10-15 08:01:05 +00:00
value = " Torrents " placeholder = " Torrents " type = " text " name = " <?= $UseAdvancedSearch ? 'groupname' : 'searchstr' ?> " size = " 17 " />
2013-07-01 08:01:00 +00:00
</ form >
2013-10-07 08:01:03 +00:00
</ 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'; } "
2013-10-15 08:01:05 +00:00
value = " Artists " placeholder = " Artists " type = " text " name = " artistname " size = " 17 " />
2013-10-07 08:01:03 +00:00
</ form >
</ li >
< li id = " searchbar_requests " >
< span class = " hidden " > Requests : </ span >
< form class = " search_form " name = " requests " action = " requests.php " method = " get " >
2013-07-01 08:01:00 +00:00
< input id = " requestssearch " spellcheck = " false "
2013-10-07 08:01:03 +00:00
onfocus = " if (this.value == 'Requests') { this.value = ''; } "
onblur = " if (this.value == '') { this.value = 'Requests'; } "
2013-10-15 08:01:05 +00:00
value = " Requests " placeholder = " Requests " type = " text " name = " search " size = " 17 " />
2013-10-07 08:01:03 +00:00
</ 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'; } "
2013-10-15 08:01:05 +00:00
value = " Forums " placeholder = " Forums " type = " text " name = " search " size = " 17 " />
2013-10-07 08:01:03 +00:00
</ form >
</ li >
2013-07-24 08:00:46 +00:00
<!--
2013-10-07 08:01:03 +00:00
< li id = " searchbar_wiki " >
< span class = " hidden " > Wiki : </ span >
2013-07-24 08:00:46 +00:00
< form class = " search_form " name = " wiki " action = " wiki.php " method = " get " >
< input type = " hidden " name = " action " value = " search " />
< input
2013-10-07 08:01:03 +00:00
onfocus = " if (this.value == 'Wiki') { this.value = ''; } "
onblur = " if (this.value == '') { this.value = 'Wiki'; } "
2013-10-15 08:01:05 +00:00
value = " Wiki " placeholder = " Wiki " type = " text " name = " search " size = " 17 " />
2013-07-24 08:00:46 +00:00
</ form >
</ li >
2011-03-28 14:21:28 +00:00
-->
2013-10-07 08:01:03 +00:00
< li id = " searchbar_log " >
< span class = " hidden " > Log : </ span >
2013-07-01 08:01:00 +00:00
< form class = " search_form " name = " log " action = " log.php " method = " get " >
< input id = " logsearch "
2013-10-07 08:01:03 +00:00
onfocus = " if (this.value == 'Log') { this.value = ''; } "
onblur = " if (this.value == '') { this.value = 'Log'; } "
2013-10-15 08:01:05 +00:00
value = " Log " placeholder = " Log " type = " text " name = " search " size = " 17 " />
2013-10-07 08:01:03 +00:00
</ 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'; } "
2013-10-15 08:01:05 +00:00
value = " Users " placeholder = " Users " type = " text " name = " search " size = " 20 " />
2013-10-07 08:01:03 +00:00
</ form >
</ li >
2013-07-01 08:01:00 +00:00
</ ul >
</ div >
</ div >
2013-07-02 08:01:37 +00:00
< div id = " content " >