Browse Source

Upload files to 'design'

Stortebeker 6 years ago
parent
commit
8950164e08
4 changed files with 229 additions and 233 deletions
  1. 27
    27
      design/privatefooter.php
  2. 187
    190
      design/privateheader.php
  3. 0
    0
      design/publicfooter.php
  4. 15
    16
      design/publicheader.php

+ 27
- 27
design/privatefooter.php View File

1
 </div>
1
 </div>
2
 <?php TEXTAREA_PREVIEW::JavaScript(); ?>
2
 <?php TEXTAREA_PREVIEW::JavaScript(); ?>
3
 <div id="footer">
3
 <div id="footer">
4
-<?  if (!empty($Options['disclaimer'])) { ?>
4
+<?php  if (!empty($Options['disclaimer'])) { ?>
5
   <br /><br />
5
   <br /><br />
6
   <div id="disclaimer_container" class="thin" style="text-align: center; margin-bottom: 20px;">
6
   <div id="disclaimer_container" class="thin" style="text-align: center; margin-bottom: 20px;">
7
     None of the files shown here are actually hosted on this server. The links are provided solely by this site's users. These BitTorrent files are meant for the distribution of backup files. By downloading the BitTorrent file, you are claiming that you own the original file. The administrator of this site (<?=site_url()?>) holds NO RESPONSIBILITY if these files are misused in any way and cannot be held responsible for what its users post, or any other actions of it.
7
     None of the files shown here are actually hosted on this server. The links are provided solely by this site's users. These BitTorrent files are meant for the distribution of backup files. By downloading the BitTorrent file, you are claiming that you own the original file. The administrator of this site (<?=site_url()?>) holds NO RESPONSIBILITY if these files are misused in any way and cannot be held responsible for what its users post, or any other actions of it.
8
   </div>
8
   </div>
9
   <div class='thin'><a href='/canary.php'>Warrant Canary</a></div>
9
   <div class='thin'><a href='/canary.php'>Warrant Canary</a></div>
10
-<?
11
-  }
12
-  if (count($UserSessions) > 1) {
10
+    <?php
11
+}
12
+if (count($UserSessions) > 1) {
13
     foreach ($UserSessions as $ThisSessionID => $Session) {
13
     foreach ($UserSessions as $ThisSessionID => $Session) {
14
-      if ($ThisSessionID != $SessionID) {
15
-        $LastActive = $Session;
16
-        break;
17
-      }
14
+        if ($ThisSessionID != $SessionID) {
15
+            $LastActive = $Session;
16
+            break;
17
+        }
18
     }
18
     }
19
-  }
19
+}
20
 
20
 
21
   $Load = sys_getloadavg();
21
   $Load = sys_getloadavg();
22
 ?>
22
 ?>
23
   <p>Site and design &copy; <?=date('Y')?> <?=SITE_NAME?></p>
23
   <p>Site and design &copy; <?=date('Y')?> <?=SITE_NAME?></p>
24
-<?  if (!empty($LastActive)) { ?>
24
+<?php  if (!empty($LastActive)) { ?>
25
   <p>
25
   <p>
26
     <a href="user.php?action=sessions">
26
     <a href="user.php?action=sessions">
27
       <span class="tooltip" title="Manage sessions">Last activity: </span><?=time_diff($LastActive['LastUpdate'])?><span class="tooltip" title="Manage sessions"> from <?=(apcu_exists('DBKEY')?(Crypto::decrypt($LastActive['IP'])):'[Encrypted]') ?></span>
27
       <span class="tooltip" title="Manage sessions">Last activity: </span><?=time_diff($LastActive['LastUpdate'])?><span class="tooltip" title="Manage sessions"> from <?=(apcu_exists('DBKEY')?(Crypto::decrypt($LastActive['IP'])):'[Encrypted]') ?></span>
28
     </a>
28
     </a>
29
   </p>
29
   </p>
30
-<?  } ?>
30
+<?php  } ?>
31
   <p>
31
   <p>
32
     <strong>Time:</strong> <span><?=number_format(((microtime(true) - $ScriptStartTime) * 1000), 5)?> ms</span>
32
     <strong>Time:</strong> <span><?=number_format(((microtime(true) - $ScriptStartTime) * 1000), 5)?> ms</span>
33
     <strong>Used:</strong> <span><?=Format::get_size(memory_get_usage(true))?></span>
33
     <strong>Used:</strong> <span><?=Format::get_size(memory_get_usage(true))?></span>
36
 
36
 
37
   </p>
37
   </p>
38
   </div>
38
   </div>
39
-<? if (DEBUG_MODE || check_perms('site_debug')) { ?>
39
+<?php if (DEBUG_MODE || check_perms('site_debug')) { ?>
40
   <!-- Begin Debugging -->
40
   <!-- Begin Debugging -->
41
   <div id="site_debug">
41
   <div id="site_debug">
42
-<?
43
-$Debug->perf_table();
44
-$Debug->flag_table();
45
-$Debug->error_table();
46
-$Debug->sphinx_table();
47
-$Debug->query_table();
48
-$Debug->cache_table();
49
-$Debug->vars_table();
50
-$Debug->ocelot_table();
51
-?>
42
+    <?php
43
+    $Debug->perf_table();
44
+    $Debug->flag_table();
45
+    $Debug->error_table();
46
+    $Debug->sphinx_table();
47
+    $Debug->query_table();
48
+    $Debug->cache_table();
49
+    $Debug->vars_table();
50
+    $Debug->ocelot_table();
51
+    ?>
52
   </div>
52
   </div>
53
   <!-- End Debugging -->
53
   <!-- End Debugging -->
54
-<? } ?>
54
+<?php } ?>
55
 
55
 
56
 </div>
56
 </div>
57
-<?
57
+<?php
58
 global $NotificationSpans;
58
 global $NotificationSpans;
59
 if (!empty($NotificationSpans)) {
59
 if (!empty($NotificationSpans)) {
60
-  foreach ($NotificationSpans as $Notification) {
61
-    echo "$Notification\n";
62
-  }
60
+    foreach ($NotificationSpans as $Notification) {
61
+        echo "$Notification\n";
62
+    }
63
 }
63
 }
64
 ?>
64
 ?>
65
 </body>
65
 </body>

+ 187
- 190
design/privateheader.php View File

1
-<?
1
+<?php
2
 
2
 
3
 define('FOOTER_FILE', SERVER_ROOT.'/design/privatefooter.php');
3
 define('FOOTER_FILE', SERVER_ROOT.'/design/privatefooter.php');
4
 
4
 
26
   <link rel="alternate" type="application/rss+xml"
26
   <link rel="alternate" type="application/rss+xml"
27
       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']?>"
27
       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']?>"
28
       title="<?=SITE_NAME?> - P.T.N.">
28
       title="<?=SITE_NAME?> - P.T.N.">
29
-<?
29
+<?php
30
 if (isset(G::$LoggedUser['Notify'])) {
30
 if (isset(G::$LoggedUser['Notify'])) {
31
-  foreach (G::$LoggedUser['Notify'] as $Filter) {
32
-    list($FilterID, $FilterName) = $Filter;
33
-?>
31
+    foreach (G::$LoggedUser['Notify'] as $Filter) {
32
+        list($FilterID, $FilterName) = $Filter; ?>
34
   <link rel="alternate" type="application/rss+xml"
33
   <link rel="alternate" type="application/rss+xml"
35
       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)?>"
34
       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)?>"
36
       title="<?=SITE_NAME?> - <?=display_str($FilterName)?>">
35
       title="<?=SITE_NAME?> - <?=display_str($FilterName)?>">
37
-<?
38
-  }
36
+        <?php
37
+    }
39
 }
38
 }
40
 ?>
39
 ?>
41
   <link rel="alternate" type="application/rss+xml"
40
   <link rel="alternate" type="application/rss+xml"
59
   <link rel="stylesheet" type="text/css"
58
   <link rel="stylesheet" type="text/css"
60
       href="<?=STATIC_SERVER?>styles/global.css?v=<?=filemtime(SERVER_ROOT.STATIC_SERVER.'styles/global.css')?>">
59
       href="<?=STATIC_SERVER?>styles/global.css?v=<?=filemtime(SERVER_ROOT.STATIC_SERVER.'styles/global.css')?>">
61
   <link rel="stylesheet" href="<?=STATIC_SERVER?>styles/tooltipster/style.css?v=<?=filemtime(SERVER_ROOT.STATIC_SERVER.'styles/tooltipster/style.css')?>" type="text/css" media="screen">
60
   <link rel="stylesheet" href="<?=STATIC_SERVER?>styles/tooltipster/style.css?v=<?=filemtime(SERVER_ROOT.STATIC_SERVER.'styles/tooltipster/style.css')?>" type="text/css" media="screen">
62
-<?
61
+<?php
63
 if (empty(G::$LoggedUser['StyleURL'])) {
62
 if (empty(G::$LoggedUser['StyleURL'])) {
64
-  if (($StyleColors = G::$Cache->get_value('stylesheet_colors')) === false) {
65
-    G::$DB->query('SELECT LOWER(REPLACE(Name, " ", "_")) AS Name, Color FROM stylesheets WHERE COLOR IS NOT NULL');
66
-    while (list($StyleName, $StyleColor) = G::$DB->next_record()) {
67
-      $StyleColors[$StyleName] = $StyleColor;
63
+    if (($StyleColors = G::$Cache->get_value('stylesheet_colors')) === false) {
64
+        G::$DB->query('SELECT LOWER(REPLACE(Name, " ", "_")) AS Name, Color FROM stylesheets WHERE COLOR IS NOT NULL');
65
+        while (list($StyleName, $StyleColor) = G::$DB->next_record()) {
66
+            $StyleColors[$StyleName] = $StyleColor;
67
+        }
68
+        G::$Cache->cache_value('stylesheet_colors', $StyleColors, 0);
68
     }
69
     }
69
-    G::$Cache->cache_value('stylesheet_colors', $StyleColors, 0);
70
-  }
71
-  if (isset($StyleColors[G::$LoggedUser['StyleName']])) { ?>
70
+    if (isset($StyleColors[G::$LoggedUser['StyleName']])) { ?>
72
 <meta name="theme-color" content="<?=$StyleColors[G::$LoggedUser['StyleName']]?>">
71
 <meta name="theme-color" content="<?=$StyleColors[G::$LoggedUser['StyleName']]?>">
73
-<? } ?>
72
+    <?php } ?>
74
 <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_SERVER.'styles/'.G::$LoggedUser['StyleName'].'/style.css')?>">
73
 <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_SERVER.'styles/'.G::$LoggedUser['StyleName'].'/style.css')?>">
75
-<?
74
+    <?php
76
 } else {
75
 } else {
77
-  $StyleURLInfo = parse_url(G::$LoggedUser['StyleURL']);
78
-  if (substr(G::$LoggedUser['StyleURL'], -4) == '.css'
76
+        $StyleURLInfo = parse_url(G::$LoggedUser['StyleURL']);
77
+    if (substr(G::$LoggedUser['StyleURL'], -4) == '.css'
79
       && empty($StyleURLInfo['query']) && empty($StyleURLInfo['fragment'])
78
       && empty($StyleURLInfo['query']) && empty($StyleURLInfo['fragment'])
80
       && ($StyleURLInfo['host'] == SITE_DOMAIN)
79
       && ($StyleURLInfo['host'] == SITE_DOMAIN)
81
       && file_exists(SERVER_ROOT.$StyleURLInfo['path'])) {
80
       && file_exists(SERVER_ROOT.$StyleURLInfo['path'])) {
82
-    $StyleURL = G::$LoggedUser['StyleURL'].'?v='.filemtime(SERVER_ROOT.$StyleURLInfo['path']);
83
-  } else {
84
-    $StyleURL = G::$LoggedUser['StyleURL'];
85
-  }
86
-?>
81
+        $StyleURL = G::$LoggedUser['StyleURL'].'?v='.filemtime(SERVER_ROOT.$StyleURLInfo['path']);
82
+    } else {
83
+        $StyleURL = G::$LoggedUser['StyleURL'];
84
+    } ?>
87
 <link rel="stylesheet" type="text/css" media="screen" href="<?=$StyleURL?>" title="External CSS">
85
 <link rel="stylesheet" type="text/css" media="screen" href="<?=$StyleURL?>" title="External CSS">
88
-<?
86
+    <?php
89
 }
87
 }
90
 $ExtraCSS = explode(',', $CSSIncludes);
88
 $ExtraCSS = explode(',', $CSSIncludes);
91
 foreach ($ExtraCSS as $CSS) {
89
 foreach ($ExtraCSS as $CSS) {
92
-  if (trim($CSS) == '') {
93
-    continue;
94
-  }
95
-?>
90
+    if (trim($CSS) == '') {
91
+        continue;
92
+    } ?>
96
   <link rel="stylesheet" type="text/css" media="screen" href="<?=STATIC_SERVER."styles/$CSS/style.css?v=".filemtime(SERVER_ROOT.STATIC_SERVER."styles/$CSS/style.css")?>">
93
   <link rel="stylesheet" type="text/css" media="screen" href="<?=STATIC_SERVER."styles/$CSS/style.css?v=".filemtime(SERVER_ROOT.STATIC_SERVER."styles/$CSS/style.css")?>">
97
-<?
94
+    <?php
98
 }
95
 }
99
 
96
 
100
 $Scripts = array_merge(array('jquery', 'global', 'ajax.class', 'jquery.autocomplete', 'autocomplete', 'tooltipster'), explode(',', $JSIncludes));
97
 $Scripts = array_merge(array('jquery', 'global', 'ajax.class', 'jquery.autocomplete', 'autocomplete', 'tooltipster'), explode(',', $JSIncludes));
101
 foreach ($Scripts as $Script) {
98
 foreach ($Scripts as $Script) {
102
-  if (trim($Script) == '') { continue; }
103
-  $Async = (in_array($Script, ['jquery','global','ajax.class'])) ? '' : 'async';
104
-  if (($ScriptStats = G::$Cache->get_value("script_stats_$Script")) === false || $ScriptStats['mtime'] != filemtime(SERVER_ROOT.STATIC_SERVER."functions/$Script.js")) {
105
-    $ScriptStats['mtime'] = filemtime(SERVER_ROOT.STATIC_SERVER."functions/$Script.js");
106
-    $ScriptStats['hash'] = base64_encode(hash_file(INTEGRITY_ALGO, SERVER_ROOT.STATIC_SERVER."functions/$Script.js", true));
107
-    $ScriptStats['algo'] = INTEGRITY_ALGO;
108
-    G::$Cache->cache_value("script_stats_$Script", $ScriptStats);
109
-  }
110
-?>
99
+    if (trim($Script) == '') {
100
+        continue;
101
+    }
102
+    $Async = (in_array($Script, ['jquery','global','ajax.class'])) ? '' : 'async';
103
+    if (($ScriptStats = G::$Cache->get_value("script_stats_$Script")) === false || $ScriptStats['mtime'] != filemtime(SERVER_ROOT.STATIC_SERVER."functions/$Script.js")) {
104
+        $ScriptStats['mtime'] = filemtime(SERVER_ROOT.STATIC_SERVER."functions/$Script.js");
105
+        $ScriptStats['hash'] = base64_encode(hash_file(INTEGRITY_ALGO, SERVER_ROOT.STATIC_SERVER."functions/$Script.js", true));
106
+        $ScriptStats['algo'] = INTEGRITY_ALGO;
107
+        G::$Cache->cache_value("script_stats_$Script", $ScriptStats);
108
+    } ?>
111
   <script src="<?=STATIC_SERVER."functions/$Script.js?v=$ScriptStats[mtime]"?>" type="text/javascript" integrity="<?="$ScriptStats[algo]-$ScriptStats[hash]"?>" <?=$Async?>></script>
109
   <script src="<?=STATIC_SERVER."functions/$Script.js?v=$ScriptStats[mtime]"?>" type="text/javascript" integrity="<?="$ScriptStats[algo]-$ScriptStats[hash]"?>" <?=$Async?>></script>
112
-<?
110
+    <?php
113
 }
111
 }
114
 
112
 
115
 global $ClassLevels;
113
 global $ClassLevels;
121
 $NewSubscriptions = false;
119
 $NewSubscriptions = false;
122
 $NotificationSpans = [];
120
 $NotificationSpans = [];
123
 foreach ($Notifications as $Type => $Notification) {
121
 foreach ($Notifications as $Type => $Notification) {
124
-  if ($Type === NotificationsManager::SUBSCRIPTIONS) {
125
-    $NewSubscriptions = true;
126
-  }
127
-  if ($UseNoty) {
128
-    $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>";
129
-  }
122
+    if ($Type === NotificationsManager::SUBSCRIPTIONS) {
123
+        $NewSubscriptions = true;
124
+    }
125
+    if ($UseNoty) {
126
+        $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>";
127
+    }
130
 }
128
 }
131
 if ($UseNoty && !empty($NotificationSpans)) {
129
 if ($UseNoty && !empty($NotificationSpans)) {
132
-  NotificationsManagerView::load_js();
130
+    NotificationsManagerView::load_js();
133
 }
131
 }
134
 if ($NotificationsManager->is_skipped(NotificationsManager::SUBSCRIPTIONS)) {
132
 if ($NotificationsManager->is_skipped(NotificationsManager::SUBSCRIPTIONS)) {
135
-  $NewSubscriptions = Subscriptions::has_new_subscriptions();
133
+    $NewSubscriptions = Subscriptions::has_new_subscriptions();
136
 }
134
 }
137
 ?>
135
 ?>
138
 </head>
136
 </head>
139
-<?
140
-  if (!empty(G::$LoggedUser['StyleAdditions'])) {
137
+<?php
138
+if (!empty(G::$LoggedUser['StyleAdditions'])) {
141
     $BodyStyles = 'style_'.implode(' style_', G::$LoggedUser['StyleAdditions']);
139
     $BodyStyles = 'style_'.implode(' style_', G::$LoggedUser['StyleAdditions']);
142
-  }
140
+}
143
 ?>
141
 ?>
144
 <body id="<?=$Document == 'collages' ? 'collage' : $Document?>" class="<?=($BodyStyles??'')?>">
142
 <body id="<?=$Document == 'collages' ? 'collage' : $Document?>" class="<?=($BodyStyles??'')?>">
145
   <div id="wrapper">
143
   <div id="wrapper">
196
               <a href="staffpm.php">Staff Inbox</a>
194
               <a href="staffpm.php">Staff Inbox</a>
197
               <a href="torrents.php?type=uploaded&amp;userid=<?=G::$LoggedUser['ID']?>">Uploads</a>
195
               <a href="torrents.php?type=uploaded&amp;userid=<?=G::$LoggedUser['ID']?>">Uploads</a>
198
               <a href="bookmarks.php?type=torrents">Bookmarks</a>
196
               <a href="bookmarks.php?type=torrents">Bookmarks</a>
199
-<?  if (check_perms('site_torrents_notify')) { ?>
197
+<?php  if (check_perms('site_torrents_notify')) { ?>
200
               <a href="user.php?action=notify">Notifications</a>
198
               <a href="user.php?action=notify">Notifications</a>
201
-<?  } ?>
199
+<?php  } ?>
202
               <a href="userhistory.php?action=subscriptions">Subscriptions</a>
200
               <a href="userhistory.php?action=subscriptions">Subscriptions</a>
203
               <a href="comments.php">Comments</a>
201
               <a href="comments.php">Comments</a>
204
               <a href="friends.php">Friends</a>
202
               <a href="friends.php">Friends</a>
207
           </li>
205
           </li>
208
         </ul>
206
         </ul>
209
       </div>
207
       </div>
210
-<?
208
+<?php
211
 if (isset(G::$LoggedUser['SearchType']) && G::$LoggedUser['SearchType']) { // Advanced search
209
 if (isset(G::$LoggedUser['SearchType']) && G::$LoggedUser['SearchType']) { // Advanced search
212
-  $UseAdvancedSearch = true;
210
+                $UseAdvancedSearch = true;
213
 } else {
211
 } else {
214
-  $UseAdvancedSearch = false;
212
+    $UseAdvancedSearch = false;
215
 }
213
 }
216
 ?>
214
 ?>
217
       <div id="searchbars">
215
       <div id="searchbars">
218
         <form class="search_form" name="torrents" action="torrents.php" method="get">
216
         <form class="search_form" name="torrents" action="torrents.php" method="get">
219
-<?  if ($UseAdvancedSearch) { ?>
217
+<?php  if ($UseAdvancedSearch) { ?>
220
           <input type="hidden" name="action" value="advanced">
218
           <input type="hidden" name="action" value="advanced">
221
-<?  } ?>
219
+<?php  } ?>
222
           <input id="torrentssearch" aria-label="Search torrents" accesskey="t" spellcheck="false" autocomplete="off" placeholder="Torrents" type="text" name="<?=$UseAdvancedSearch ? 'advgroupname' : 'searchstr' ?>" size="17">
220
           <input id="torrentssearch" aria-label="Search torrents" accesskey="t" spellcheck="false" autocomplete="off" placeholder="Torrents" type="text" name="<?=$UseAdvancedSearch ? 'advgroupname' : 'searchstr' ?>" size="17">
223
         </form>
221
         </form>
224
         <form class="search_form" name="artists" action="artist.php" method="get">
222
         <form class="search_form" name="artists" action="artist.php" method="get">
250
           <li id="nav_upload" class="brackets<?=Format::add_class($PageID, array('upload'), 'active', false)?>">
248
           <li id="nav_upload" class="brackets<?=Format::add_class($PageID, array('upload'), 'active', false)?>">
251
             <a href="upload.php">Upload</a>
249
             <a href="upload.php">Upload</a>
252
           </li>
250
           </li>
253
-<?
251
+<?php
254
 if (check_perms('site_send_unlimited_invites')) {
252
 if (check_perms('site_send_unlimited_invites')) {
255
-  $Invites = ' (∞)';
253
+    $Invites = ' (∞)';
256
 } elseif (G::$LoggedUser['Invites'] > 0) {
254
 } elseif (G::$LoggedUser['Invites'] > 0) {
257
-  $Invites = ' ('.G::$LoggedUser['Invites'].')';
255
+    $Invites = ' ('.G::$LoggedUser['Invites'].')';
258
 } else {
256
 } else {
259
-  $Invites = '';
257
+    $Invites = '';
260
 }
258
 }
261
 ?>
259
 ?>
262
           <li id="nav_invite" class="brackets<?=Format::add_class($PageID, array('user','invite'), 'active', false)?>">
260
           <li id="nav_invite" class="brackets<?=Format::add_class($PageID, array('user','invite'), 'active', false)?>">
263
             <a href="user.php?action=invite">Invite<?=$Invites?></a>
261
             <a href="user.php?action=invite">Invite<?=$Invites?></a>
264
           </li>
262
           </li>
265
-<? if (FEATURE_DONATE) { ?>
263
+<?php if (FEATURE_DONATE) { ?>
266
           <li id="nav_donate" class="brackets<?=Format::add_class($PageID, array('donate'), 'active', false)?>">
264
           <li id="nav_donate" class="brackets<?=Format::add_class($PageID, array('donate'), 'active', false)?>">
267
             <a href="donate.php">Donate</a>
265
             <a href="donate.php">Donate</a>
268
           </li>
266
           </li>
269
-<? } ?>
267
+<?php } ?>
270
           <li id="nav_staff" class="brackets<?=Format::add_class($PageID, array('staff'), 'active', false)?>">
268
           <li id="nav_staff" class="brackets<?=Format::add_class($PageID, array('staff'), 'active', false)?>">
271
             <a href="staff.php">Staff</a>
269
             <a href="staff.php">Staff</a>
272
           </li>
270
           </li>
283
           <li id="stats_ratio">
281
           <li id="stats_ratio">
284
             Ratio: <span class="stat"><?=Format::get_ratio_html(G::$LoggedUser['BytesUploaded'], G::$LoggedUser['BytesDownloaded'])?></span>
282
             Ratio: <span class="stat"><?=Format::get_ratio_html(G::$LoggedUser['BytesUploaded'], G::$LoggedUser['BytesDownloaded'])?></span>
285
           </li>
283
           </li>
286
-<?  if (!empty(G::$LoggedUser['RequiredRatio']) && G::$LoggedUser['RequiredRatio'] > 0) { ?>
284
+<?php  if (!empty(G::$LoggedUser['RequiredRatio']) && G::$LoggedUser['RequiredRatio'] > 0) { ?>
287
           <li id="stats_required">
285
           <li id="stats_required">
288
             <a href="rules.php?p=ratio">Required</a>:
286
             <a href="rules.php?p=ratio">Required</a>:
289
             <span class="stat tooltip" title="<?=number_format(G::$LoggedUser['RequiredRatio'], 5)?>"><?=number_format(G::$LoggedUser['RequiredRatio'], 2)?></span>
287
             <span class="stat tooltip" title="<?=number_format(G::$LoggedUser['RequiredRatio'], 5)?>"><?=number_format(G::$LoggedUser['RequiredRatio'], 2)?></span>
290
           </li>
288
           </li>
291
-<?  }
289
+<?php  }
292
 
290
 
293
-  if (G::$LoggedUser['FLTokens'] > 0) { ?>
291
+if (G::$LoggedUser['FLTokens'] > 0) { ?>
294
           <li id="fl_tokens">
292
           <li id="fl_tokens">
295
             <a href="wiki.php?action=article&amp;name=tokens">Tokens</a>:
293
             <a href="wiki.php?action=article&amp;name=tokens">Tokens</a>:
296
             <span class="stat">
294
             <span class="stat">
297
               <a href="userhistory.php?action=token_history&amp;userid=<?=G::$LoggedUser['ID']?>"><?=G::$LoggedUser['FLTokens']?></a>
295
               <a href="userhistory.php?action=token_history&amp;userid=<?=G::$LoggedUser['ID']?>"><?=G::$LoggedUser['FLTokens']?></a>
298
             </span>
296
             </span>
299
           </li>
297
           </li>
300
-<?  }
298
+<?php  }
301
 ?>
299
 ?>
302
           <li id="bonus_points">
300
           <li id="bonus_points">
303
             <a href="wiki.php?action=article&amp;name=bonuspoints"><?=BONUS_POINTS?></a>:
301
             <a href="wiki.php?action=article&amp;name=bonuspoints"><?=BONUS_POINTS?></a>:
305
               <a href="store.php"><?=number_format(G::$LoggedUser['BonusPoints'])?></a>
303
               <a href="store.php"><?=number_format(G::$LoggedUser['BonusPoints'])?></a>
306
             </span>
304
             </span>
307
           </li>
305
           </li>
308
-<?  if (G::$LoggedUser['HnR'] > 0) { ?>
306
+<?php  if (G::$LoggedUser['HnR'] > 0) { ?>
309
           <li id="hnr">
307
           <li id="hnr">
310
             <a href="snatchlist.php">HnRs</a>:
308
             <a href="snatchlist.php">HnRs</a>:
311
             <span class="stat">
309
             <span class="stat">
312
               <a><?=G::$LoggedUser['HnR']?></a>
310
               <a><?=G::$LoggedUser['HnR']?></a>
313
             </span>
311
             </span>
314
           </li>
312
           </li>
315
-<?  }
313
+<?php  }
316
 ?>
314
 ?>
317
         </ul>
315
         </ul>
318
       </div>
316
       </div>
319
-<? if (!apcu_exists('DBKEY')) { ?>
317
+<?php if (!apcu_exists('DBKEY')) { ?>
320
       <a id="dbcrypt" class="tooltip" href="wiki.php?action=article&amp;name=databaseencryption" title="Database is not fully decrypted. Site functionality will be reduced until staff can provide the decryption key. Click to learn more."></a>
318
       <a id="dbcrypt" class="tooltip" href="wiki.php?action=article&amp;name=databaseencryption" title="Database is not fully decrypted. Site functionality will be reduced until staff can provide the decryption key. Click to learn more."></a>
321
-<? } ?>
319
+<?php } ?>
322
     </div>
320
     </div>
323
-<?
321
+<?php
324
 //Start handling alert bars
322
 //Start handling alert bars
325
 $Alerts = [];
323
 $Alerts = [];
326
 $ModBar = [];
324
 $ModBar = [];
327
 
325
 
328
 // Staff blog
326
 // Staff blog
329
 if (check_perms('users_mod')) {
327
 if (check_perms('users_mod')) {
330
-  global $SBlogReadTime, $LatestSBlogTime;
331
-  if (!$SBlogReadTime && ($SBlogReadTime = G::$Cache->get_value('staff_blog_read_'.G::$LoggedUser['ID'])) === false) {
332
-    G::$DB->query("
328
+    global $SBlogReadTime, $LatestSBlogTime;
329
+    if (!$SBlogReadTime && ($SBlogReadTime = G::$Cache->get_value('staff_blog_read_'.G::$LoggedUser['ID'])) === false) {
330
+        G::$DB->query("
333
       SELECT Time
331
       SELECT Time
334
       FROM staff_blog_visits
332
       FROM staff_blog_visits
335
       WHERE UserID = ".G::$LoggedUser['ID']);
333
       WHERE UserID = ".G::$LoggedUser['ID']);
336
-    if (list($SBlogReadTime) = G::$DB->next_record()) {
337
-      $SBlogReadTime = strtotime($SBlogReadTime);
338
-    } else {
339
-      $SBlogReadTime = 0;
334
+        if (list($SBlogReadTime) = G::$DB->next_record()) {
335
+            $SBlogReadTime = strtotime($SBlogReadTime);
336
+        } else {
337
+            $SBlogReadTime = 0;
338
+        }
339
+        G::$Cache->cache_value('staff_blog_read_'.G::$LoggedUser['ID'], $SBlogReadTime, 1209600);
340
     }
340
     }
341
-    G::$Cache->cache_value('staff_blog_read_'.G::$LoggedUser['ID'], $SBlogReadTime, 1209600);
342
-  }
343
-  if (!$LatestSBlogTime && ($LatestSBlogTime = G::$Cache->get_value('staff_blog_latest_time')) === false) {
344
-    G::$DB->query("
341
+    if (!$LatestSBlogTime && ($LatestSBlogTime = G::$Cache->get_value('staff_blog_latest_time')) === false) {
342
+        G::$DB->query("
345
       SELECT MAX(Time)
343
       SELECT MAX(Time)
346
       FROM staff_blog");
344
       FROM staff_blog");
347
-    list($LatestSBlogTime) = G::$DB->next_record();
348
-    if ($LatestSBlogTime) {
349
-      $LatestSBlogTime = strtotime($LatestSBlogTime);
350
-    } else {
351
-      $LatestSBlogTime = 0;
345
+        list($LatestSBlogTime) = G::$DB->next_record();
346
+        if ($LatestSBlogTime) {
347
+            $LatestSBlogTime = strtotime($LatestSBlogTime);
348
+        } else {
349
+            $LatestSBlogTime = 0;
350
+        }
351
+        G::$Cache->cache_value('staff_blog_latest_time', $LatestSBlogTime, 1209600);
352
+    }
353
+    if ($SBlogReadTime < $LatestSBlogTime) {
354
+        $Alerts[] = '<a href="staffblog.php">New staff blog post!</a>';
352
     }
355
     }
353
-    G::$Cache->cache_value('staff_blog_latest_time', $LatestSBlogTime, 1209600);
354
-  }
355
-  if ($SBlogReadTime < $LatestSBlogTime) {
356
-    $Alerts[] = '<a href="staffblog.php">New staff blog post!</a>';
357
-  }
358
 }
356
 }
359
 
357
 
360
 // Inbox
358
 // Inbox
361
 if ($NotificationsManager->is_traditional(NotificationsManager::INBOX)) {
359
 if ($NotificationsManager->is_traditional(NotificationsManager::INBOX)) {
362
-  $NotificationsManager->load_inbox();
363
-  $NewMessages = $NotificationsManager->get_notifications();
364
-  if (isset($NewMessages[NotificationsManager::INBOX])) {
365
-    $Alerts[] = NotificationsManagerView::format_traditional($NewMessages[NotificationsManager::INBOX]);
366
-  }
367
-  $NotificationsManager->clear_notifications_array();
360
+    $NotificationsManager->load_inbox();
361
+    $NewMessages = $NotificationsManager->get_notifications();
362
+    if (isset($NewMessages[NotificationsManager::INBOX])) {
363
+        $Alerts[] = NotificationsManagerView::format_traditional($NewMessages[NotificationsManager::INBOX]);
364
+    }
365
+    $NotificationsManager->clear_notifications_array();
368
 }
366
 }
369
 
367
 
370
 if (G::$LoggedUser['RatioWatch']) {
368
 if (G::$LoggedUser['RatioWatch']) {
371
-  $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.';
369
+    $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.';
372
 } elseif (G::$LoggedUser['CanLeech'] != 1) {
370
 } elseif (G::$LoggedUser['CanLeech'] != 1) {
373
-  $Alerts[] = '<a href="rules.php?p=ratio">Ratio Watch</a>: Your downloading privileges are disabled until you meet your required ratio.';
371
+    $Alerts[] = '<a href="rules.php?p=ratio">Ratio Watch</a>: Your downloading privileges are disabled until you meet your required ratio.';
374
 }
372
 }
375
 
373
 
376
 // Torrents
374
 // Torrents
377
 if ($NotificationsManager->is_traditional(NotificationsManager::TORRENTS)) {
375
 if ($NotificationsManager->is_traditional(NotificationsManager::TORRENTS)) {
378
-  $NotificationsManager->load_torrent_notifications();
379
-  $NewTorrents = $NotificationsManager->get_notifications();
380
-  if (isset($NewTorrents[NotificationsManager::TORRENTS])) {
381
-    $Alerts[] = NotificationsManagerView::format_traditional($NewTorrents[NotificationsManager::TORRENTS]);
382
-  }
383
-  $NotificationsManager->clear_notifications_array();
376
+    $NotificationsManager->load_torrent_notifications();
377
+    $NewTorrents = $NotificationsManager->get_notifications();
378
+    if (isset($NewTorrents[NotificationsManager::TORRENTS])) {
379
+        $Alerts[] = NotificationsManagerView::format_traditional($NewTorrents[NotificationsManager::TORRENTS]);
380
+    }
381
+    $NotificationsManager->clear_notifications_array();
384
 }
382
 }
385
 
383
 
386
 // Contests
384
 // Contests
387
 if ($ContestSettings = G::$Cache->get_value('contest_settings')) {
385
 if ($ContestSettings = G::$Cache->get_value('contest_settings')) {
388
-  if (time() > $ContestSettings['start'] && time() < $ContestSettings['end']) {
389
-    $Alerts[] = '<a href="/contest.php">A Contest is Underway!</a>';
390
-  }
386
+    if (time() > $ContestSettings['start'] && time() < $ContestSettings['end']) {
387
+        $Alerts[] = '<a href="/contest.php">A Contest is Underway!</a>';
388
+    }
391
 }
389
 }
392
 
390
 
393
 if (check_perms('users_mod')) {
391
 if (check_perms('users_mod')) {
394
-  $ModBar[] = '<a href="tools.php">Toolbox</a>';
392
+    $ModBar[] = '<a href="tools.php">Toolbox</a>';
395
 }
393
 }
396
 if (check_perms('users_mod')) {
394
 if (check_perms('users_mod')) {
397
-  $NumStaffPMs = G::$Cache->get_value('num_staff_pms_'.G::$LoggedUser['ID']);
398
-  if ($NumStaffPMs === false) {
399
-    if (check_perms('users_mod')) {
395
+    $NumStaffPMs = G::$Cache->get_value('num_staff_pms_'.G::$LoggedUser['ID']);
396
+    if ($NumStaffPMs === false) {
397
+        if (check_perms('users_mod')) {
398
+            $LevelCap = 1000;
400
 
399
 
401
-      $LevelCap = 1000;
402
-
403
-      G::$DB->query("
400
+            G::$DB->query("
404
         SELECT COUNT(ID)
401
         SELECT COUNT(ID)
405
         FROM staff_pm_conversations
402
         FROM staff_pm_conversations
406
         WHERE Status = 'Unanswered'
403
         WHERE Status = 'Unanswered'
407
           AND (AssignedToUser = ".G::$LoggedUser['ID']."
404
           AND (AssignedToUser = ".G::$LoggedUser['ID']."
408
             OR (LEAST('$LevelCap', Level) <= '".G::$LoggedUser['EffectiveClass']."'
405
             OR (LEAST('$LevelCap', Level) <= '".G::$LoggedUser['EffectiveClass']."'
409
               AND Level <= ".G::$LoggedUser['Class']."))");
406
               AND Level <= ".G::$LoggedUser['Class']."))");
410
-    }
411
-    if (G::$LoggedUser['PermissionID'] == FORUM_MOD) {
412
-      G::$DB->query("
407
+        }
408
+        if (G::$LoggedUser['PermissionID'] == FORUM_MOD) {
409
+            G::$DB->query("
413
         SELECT COUNT(ID)
410
         SELECT COUNT(ID)
414
         FROM staff_pm_conversations
411
         FROM staff_pm_conversations
415
         WHERE Status='Unanswered'
412
         WHERE Status='Unanswered'
416
           AND (AssignedToUser = ".G::$LoggedUser['ID']."
413
           AND (AssignedToUser = ".G::$LoggedUser['ID']."
417
             OR Level = '". $Classes[FORUM_MOD]['Level'] . "')");
414
             OR Level = '". $Classes[FORUM_MOD]['Level'] . "')");
415
+        }
416
+        list($NumStaffPMs) = G::$DB->next_record();
417
+        G::$Cache->cache_value('num_staff_pms_'.G::$LoggedUser['ID'], $NumStaffPMs, 1000);
418
     }
418
     }
419
-    list($NumStaffPMs) = G::$DB->next_record();
420
-    G::$Cache->cache_value('num_staff_pms_'.G::$LoggedUser['ID'], $NumStaffPMs , 1000);
421
-  }
422
 
419
 
423
-  if ($NumStaffPMs > 0) {
424
-    $ModBar[] = '<a href="staffpm.php">'.$NumStaffPMs.' Staff PMs</a>';
425
-  }
420
+    if ($NumStaffPMs > 0) {
421
+        $ModBar[] = '<a href="staffpm.php">'.$NumStaffPMs.' Staff PMs</a>';
422
+    }
426
 }
423
 }
427
 if (check_perms('admin_reports')) {
424
 if (check_perms('admin_reports')) {
428
-// Torrent reports code
429
-  $NumTorrentReports = G::$Cache->get_value('num_torrent_reportsv2');
430
-  if ($NumTorrentReports === false) {
431
-    G::$DB->query("
425
+    // Torrent reports code
426
+    $NumTorrentReports = G::$Cache->get_value('num_torrent_reportsv2');
427
+    if ($NumTorrentReports === false) {
428
+        G::$DB->query("
432
       SELECT COUNT(ID)
429
       SELECT COUNT(ID)
433
       FROM reportsv2
430
       FROM reportsv2
434
       WHERE Status = 'New'");
431
       WHERE Status = 'New'");
435
-    list($NumTorrentReports) = G::$DB->next_record();
436
-    G::$Cache->cache_value('num_torrent_reportsv2', $NumTorrentReports, 0);
437
-  }
432
+        list($NumTorrentReports) = G::$DB->next_record();
433
+        G::$Cache->cache_value('num_torrent_reportsv2', $NumTorrentReports, 0);
434
+    }
438
 
435
 
439
-  $ModBar[] = '<a href="reportsv2.php">'.$NumTorrentReports.(($NumTorrentReports == 1) ? ' Report' : ' Reports').'</a>';
436
+    $ModBar[] = '<a href="reportsv2.php">'.$NumTorrentReports.(($NumTorrentReports == 1) ? ' Report' : ' Reports').'</a>';
440
 
437
 
441
-// Other reports code
442
-  $NumOtherReports = G::$Cache->get_value('num_other_reports');
443
-  if ($NumOtherReports === false) {
444
-    G::$DB->query("
438
+    // Other reports code
439
+    $NumOtherReports = G::$Cache->get_value('num_other_reports');
440
+    if ($NumOtherReports === false) {
441
+        G::$DB->query("
445
       SELECT COUNT(ID)
442
       SELECT COUNT(ID)
446
       FROM reports
443
       FROM reports
447
       WHERE Status = 'New'");
444
       WHERE Status = 'New'");
448
-    list($NumOtherReports) = G::$DB->next_record();
449
-    G::$Cache->cache_value('num_other_reports', $NumOtherReports, 0);
450
-  }
445
+        list($NumOtherReports) = G::$DB->next_record();
446
+        G::$Cache->cache_value('num_other_reports', $NumOtherReports, 0);
447
+    }
451
 
448
 
452
-  if ($NumOtherReports > 0) {
453
-    $ModBar[] = '<a href="reports.php">'.$NumOtherReports.(($NumTorrentReports == 1) ? ' Other report' : ' Other reports').'</a>';
454
-  }
449
+    if ($NumOtherReports > 0) {
450
+        $ModBar[] = '<a href="reports.php">'.$NumOtherReports.(($NumTorrentReports == 1) ? ' Other report' : ' Other reports').'</a>';
451
+    }
455
 } elseif (check_perms('project_team')) {
452
 } elseif (check_perms('project_team')) {
456
-  $NumUpdateReports = G::$Cache->get_value('num_update_reports');
457
-  if ($NumUpdateReports === false) {
458
-    G::$DB->query("
453
+    $NumUpdateReports = G::$Cache->get_value('num_update_reports');
454
+    if ($NumUpdateReports === false) {
455
+        G::$DB->query("
459
       SELECT COUNT(ID)
456
       SELECT COUNT(ID)
460
       FROM reports
457
       FROM reports
461
       WHERE Status = 'New'
458
       WHERE Status = 'New'
462
         AND Type = 'request_update'");
459
         AND Type = 'request_update'");
463
-    list($NumUpdateReports) = G::$DB->next_record();
464
-    G::$Cache->cache_value('num_update_reports', $NumUpdateReports, 0);
465
-  }
460
+        list($NumUpdateReports) = G::$DB->next_record();
461
+        G::$Cache->cache_value('num_update_reports', $NumUpdateReports, 0);
462
+    }
466
 
463
 
467
-  if ($NumUpdateReports > 0) {
468
-    $ModBar[] = '<a href="reports.php">Request update reports</a>';
469
-  }
464
+    if ($NumUpdateReports > 0) {
465
+        $ModBar[] = '<a href="reports.php">Request update reports</a>';
466
+    }
470
 } elseif (check_perms('site_moderate_forums')) {
467
 } elseif (check_perms('site_moderate_forums')) {
471
-  $NumForumReports = G::$Cache->get_value('num_forum_reports');
472
-  if ($NumForumReports === false) {
473
-    G::$DB->query("
468
+    $NumForumReports = G::$Cache->get_value('num_forum_reports');
469
+    if ($NumForumReports === false) {
470
+        G::$DB->query("
474
       SELECT COUNT(ID)
471
       SELECT COUNT(ID)
475
       FROM reports
472
       FROM reports
476
       WHERE Status = 'New'
473
       WHERE Status = 'New'
477
         AND Type IN('artist_comment', 'collages_comment', 'post', 'requests_comment', 'thread', 'torrents_comment')");
474
         AND Type IN('artist_comment', 'collages_comment', 'post', 'requests_comment', 'thread', 'torrents_comment')");
478
-    list($NumForumReports) = G::$DB->next_record();
479
-    G::$Cache->cache_value('num_forum_reports', $NumForumReports, 0);
480
-  }
475
+        list($NumForumReports) = G::$DB->next_record();
476
+        G::$Cache->cache_value('num_forum_reports', $NumForumReports, 0);
477
+    }
481
 
478
 
482
-  if ($NumForumReports > 0) {
483
-    $ModBar[] = '<a href="reports.php">'.$NumForumReports.(($NumForumReports == 1) ? ' Forum report' : ' Forum reports').'</a>';
484
-  }
479
+    if ($NumForumReports > 0) {
480
+        $ModBar[] = '<a href="reports.php">'.$NumForumReports.(($NumForumReports == 1) ? ' Forum report' : ' Forum reports').'</a>';
481
+    }
485
 }
482
 }
486
 
483
 
487
 if (check_perms('users_mod')) {
484
 if (check_perms('users_mod')) {
488
-  $NumDeleteRequests = G::$Cache->get_value('num_deletion_requests');
489
-  if ($NumDeleteRequests === false) {
490
-    G::$DB->query("SELECT COUNT(*) FROM deletion_requests");
491
-    list($NumDeleteRequests) = G::$DB->next_record();
492
-    G::$Cache->cache_value('num_deletion_requests', $NumDeleteRequests);
493
-  }
494
-  if ($NumDeleteRequests > 0) {
495
-    $ModBar[] = '<a href="tools.php?action=expunge_requests">' . $NumDeleteRequests . " Expunge request".($NumDeleteRequests > 1 ? 's' : '')."</a>";
496
-  }
485
+    $NumDeleteRequests = G::$Cache->get_value('num_deletion_requests');
486
+    if ($NumDeleteRequests === false) {
487
+        G::$DB->query("SELECT COUNT(*) FROM deletion_requests");
488
+        list($NumDeleteRequests) = G::$DB->next_record();
489
+        G::$Cache->cache_value('num_deletion_requests', $NumDeleteRequests);
490
+    }
491
+    if ($NumDeleteRequests > 0) {
492
+        $ModBar[] = '<a href="tools.php?action=expunge_requests">' . $NumDeleteRequests . " Expunge request".($NumDeleteRequests > 1 ? 's' : '')."</a>";
493
+    }
497
 }
494
 }
498
 
495
 
499
 if (check_perms('users_mod') && FEATURE_EMAIL_REENABLE) {
496
 if (check_perms('users_mod') && FEATURE_EMAIL_REENABLE) {
500
-  $NumEnableRequests = G::$Cache->get_value(AutoEnable::CACHE_KEY_NAME);
501
-  if ($NumEnableRequests === false) {
502
-    G::$DB->query("SELECT COUNT(1) FROM users_enable_requests WHERE Outcome IS NULL");
503
-    list($NumEnableRequests) = G::$DB->next_record();
504
-    G::$Cache->cache_value(AutoEnable::CACHE_KEY_NAME, $NumEnableRequests);
505
-  }
497
+    $NumEnableRequests = G::$Cache->get_value(AutoEnable::CACHE_KEY_NAME);
498
+    if ($NumEnableRequests === false) {
499
+        G::$DB->query("SELECT COUNT(1) FROM users_enable_requests WHERE Outcome IS NULL");
500
+        list($NumEnableRequests) = G::$DB->next_record();
501
+        G::$Cache->cache_value(AutoEnable::CACHE_KEY_NAME, $NumEnableRequests);
502
+    }
506
 
503
 
507
-  if ($NumEnableRequests > 0) {
508
-    $ModBar[] = '<a href="tools.php?action=enable_requests">' . $NumEnableRequests . " Enable requests</a>";
509
-  }
504
+    if ($NumEnableRequests > 0) {
505
+        $ModBar[] = '<a href="tools.php?action=enable_requests">' . $NumEnableRequests . " Enable requests</a>";
506
+    }
510
 }
507
 }
511
 
508
 
512
 if (!empty($Alerts) || !empty($ModBar)) { ?>
509
 if (!empty($Alerts) || !empty($ModBar)) { ?>
513
       <div id="alerts">
510
       <div id="alerts">
514
-<?  foreach ($Alerts as $Alert) { ?>
511
+    <?php  foreach ($Alerts as $Alert) { ?>
515
         <div class="alertbar"><?=$Alert?></div>
512
         <div class="alertbar"><?=$Alert?></div>
516
-<?
517
-  }
518
-  if (!empty($ModBar)) { ?>
513
+        <?php
514
+    }
515
+    if (!empty($ModBar)) { ?>
519
         <div class="alertbar modbar">
516
         <div class="alertbar modbar">
520
-          <?=implode(' ', $ModBar); echo "\n"?>
517
+            <?=implode(' ', $ModBar); echo "\n"?>
521
         </div>
518
         </div>
522
-<?  }
523
-if (check_perms('site_debug') && !apcu_exists('DBKEY')) { ?>
519
+    <?php  }
520
+    if (check_perms('site_debug') && !apcu_exists('DBKEY')) { ?>
524
         <div class="alertbar error">
521
         <div class="alertbar error">
525
           Warning: <a href="tools.php?action=database_key">no DB key</a>
522
           Warning: <a href="tools.php?action=database_key">no DB key</a>
526
         </div>
523
         </div>
527
-<?  } ?>
524
+    <?php  } ?>
528
       </div>
525
       </div>
529
-<?
526
+    <?php
530
 }
527
 }
531
 //Done handling alertbars
528
 //Done handling alertbars
532
 ?>
529
 ?>

+ 0
- 0
design/publicfooter.php View File


+ 15
- 16
design/publicheader.php View File

1
-<?
1
+<?php
2
 global $LoggedUser;
2
 global $LoggedUser;
3
-define('FOOTER_FILE',SERVER_ROOT.'/design/publicfooter.php');
3
+define('FOOTER_FILE', SERVER_ROOT.'/design/publicfooter.php');
4
 ?>
4
 ?>
5
 <!DOCTYPE html>
5
 <!DOCTYPE html>
6
 <html>
6
 <html>
12
   <link rel="shortcut icon" href="favicon.ico?v=<?=md5_file('favicon.ico');?>">
12
   <link rel="shortcut icon" href="favicon.ico?v=<?=md5_file('favicon.ico');?>">
13
   <link rel="manifest" href="/manifest.php">
13
   <link rel="manifest" href="/manifest.php">
14
   <link href="<?=STATIC_SERVER ?>styles/public/style.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/public/style.css')?>" rel="stylesheet" type="text/css">
14
   <link href="<?=STATIC_SERVER ?>styles/public/style.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/public/style.css')?>" rel="stylesheet" type="text/css">
15
-<?
15
+<?php
16
   $Scripts = ['jquery', 'global', 'ajax.class', 'cookie.class', 'storage.class', 'public', 'u2f'];
16
   $Scripts = ['jquery', 'global', 'ajax.class', 'cookie.class', 'storage.class', 'public', 'u2f'];
17
-  foreach($Scripts as $Script) {
17
+foreach ($Scripts as $Script) {
18
     if (($ScriptStats = G::$Cache->get_value("script_stats_$Script")) === false || $ScriptStats['mtime'] != filemtime(SERVER_ROOT.STATIC_SERVER."functions/$Script.js")) {
18
     if (($ScriptStats = G::$Cache->get_value("script_stats_$Script")) === false || $ScriptStats['mtime'] != filemtime(SERVER_ROOT.STATIC_SERVER."functions/$Script.js")) {
19
-      $ScriptStats['mtime'] = filemtime(SERVER_ROOT.STATIC_SERVER."functions/$Script.js");
20
-      $ScriptStats['hash'] = base64_encode(hash_file(INTEGRITY_ALGO, SERVER_ROOT.STATIC_SERVER."functions/$Script.js", true));
21
-      $ScriptStats['algo'] = INTEGRITY_ALGO;
22
-      G::$Cache->cache_value("script_stats_$Script", $ScriptStats);
23
-    }
24
-?>
19
+        $ScriptStats['mtime'] = filemtime(SERVER_ROOT.STATIC_SERVER."functions/$Script.js");
20
+        $ScriptStats['hash'] = base64_encode(hash_file(INTEGRITY_ALGO, SERVER_ROOT.STATIC_SERVER."functions/$Script.js", true));
21
+        $ScriptStats['algo'] = INTEGRITY_ALGO;
22
+        G::$Cache->cache_value("script_stats_$Script", $ScriptStats);
23
+    } ?>
25
     <script src="<?=STATIC_SERVER."functions/$Script.js?v=$ScriptStats[mtime]"?>" type="text/javascript" integrity="<?="$ScriptStats[algo]-$ScriptStats[hash]"?>"></script>
24
     <script src="<?=STATIC_SERVER."functions/$Script.js?v=$ScriptStats[mtime]"?>" type="text/javascript" integrity="<?="$ScriptStats[algo]-$ScriptStats[hash]"?>"></script>
26
-<?
27
-  }
25
+    <?php
26
+}
28
   $img = array_diff(scandir(SERVER_ROOT.'/misc/bg', 1), array('.', '..')); ?>
27
   $img = array_diff(scandir(SERVER_ROOT.'/misc/bg', 1), array('.', '..')); ?>
29
-  <meta name="bg_data" content="<?=$img[rand(0,count($img)-1)]?>">
28
+  <meta name="bg_data" content="<?=$img[rand(0, count($img)-1)]?>">
30
 </head>
29
 </head>
31
 <body>
30
 <body>
32
 <div id="head"><span>
31
 <div id="head"><span>
33
 <a href="login.php">Log in</a>
32
 <a href="login.php">Log in</a>
34
-<? if (OPEN_REGISTRATION) { ?>
33
+<?php if (OPEN_REGISTRATION) { ?>
35
  | <a href="register.php">Register</a>
34
  | <a href="register.php">Register</a>
36
-<? } ?>
35
+<?php } ?>
37
 </span></div>
36
 </span></div>
38
 <div id="content">
37
 <div id="content">
39
   <table class="layout" id="maincontent">
38
   <table class="layout" id="maincontent">
40
     <tr>
39
     <tr>
41
       <td class="centered">
40
       <td class="centered">
42
         <a href="index.php"><div id="logo"></div></a>
41
         <a href="index.php"><div id="logo"></div></a>
43
-<?
42
+<?php

Loading…
Cancel
Save