Browse Source

Minor styling and torrent search edits

pjc 5 years ago
parent
commit
569a3f50e8

+ 104
- 94
classes/util.php View File

@@ -1,4 +1,5 @@
1
-<?
1
+<?php
2
+
2 3
 // This is a file of miscellaneous functions that are called so damn often
3 4
 // that it'd just be annoying to stick them in namespaces.
4 5
 
@@ -9,30 +10,33 @@
9 10
  * @return bool
10 11
  */
11 12
 if (PHP_INT_SIZE === 4) {
12
-  function is_number($Str) {
13
-    if ($Str === null || $Str === '') {
14
-      return false;
15
-    }
16
-    if (is_int($Str)) {
17
-      return true;
18
-    }
19
-    if ($Str[0] == '-' || $Str[0] == '+') { // Leading plus/minus signs are ok
20
-      $Str[0] = 0;
13
+    function is_number($Str)
14
+    {
15
+        if ($Str === null || $Str === '') {
16
+            return false;
17
+        }
18
+        if (is_int($Str)) {
19
+            return true;
20
+        }
21
+        if ($Str[0] === '-' || $Str[0] === '+') { // Leading plus/minus signs are ok
22
+            $Str[0] = 0;
23
+        }
24
+        return ltrim($Str, "0..9") === '';
21 25
     }
22
-    return ltrim($Str, "0..9") === '';
23
-  }
24 26
 } else {
25
-  function is_number($Str) {
26
-    return $Str == strval(intval($Str));
27
-  }
27
+    function is_number($Str)
28
+    {
29
+        return $Str == strval(intval($Str));
30
+    }
28 31
 }
29 32
 
30
-function is_date($Date) {
31
-  list($Y, $M, $D) = explode('-', $Date);
32
-  if (checkdate($M, $D, $Y)) {
33
-    return true;
34
-  }
35
-  return false;
33
+function is_date($Date)
34
+{
35
+    list($Y, $M, $D) = explode('-', $Date);
36
+    if (checkdate($M, $D, $Y)) {
37
+        return true;
38
+    }
39
+    return false;
36 40
 }
37 41
 
38 42
 /**
@@ -42,16 +46,17 @@ function is_date($Date) {
42 46
  * @param array $Keys list of keys to check
43 47
  * @param mixed $Error error code or string to pass to the error() function if a key isn't numeric
44 48
  */
45
-function assert_numbers(&$Base, $Keys, $Error = 0) {
46
-  // make sure both arguments are arrays
47
-  if (!is_array($Base) || !is_array($Keys)) {
48
-    return;
49
-  }
50
-  foreach ($Keys as $Key) {
51
-    if (!isset($Base[$Key]) || !is_number($Base[$Key])) {
52
-      error($Error);
49
+function assert_numbers(&$Base, $Keys, $Error = 0)
50
+{
51
+    // Make sure both arguments are arrays
52
+    if (!is_array($Base) || !is_array($Keys)) {
53
+        return;
54
+    }
55
+    foreach ($Keys as $Key) {
56
+        if (!isset($Base[$Key]) || !is_number($Base[$Key])) {
57
+            error($Error);
58
+        }
53 59
     }
54
-  }
55 60
 }
56 61
 
57 62
 /**
@@ -61,12 +66,13 @@ function assert_numbers(&$Base, $Keys, $Error = 0) {
61 66
  * @return true if $Value is "truthy", false if it is "non-truthy" or null if $Value was not
62 67
  *         a bool-like value
63 68
  */
64
-function is_bool_value($Value) {
65
-  if (is_bool($Value)) {
66
-    return $Value;
67
-  }
68
-  if (is_string($Value)) {
69
-    switch (strtolower($Value)) {
69
+function is_bool_value($Value)
70
+{
71
+    if (is_bool($Value)) {
72
+        return $Value;
73
+    }
74
+    if (is_string($Value)) {
75
+        switch (strtolower($Value)) {
70 76
       case 'true':
71 77
       case 'yes':
72 78
       case 'on':
@@ -78,15 +84,15 @@ function is_bool_value($Value) {
78 84
       case '0':
79 85
         return false;
80 86
     }
81
-  }
82
-  if (is_numeric($Value)) {
83
-    if ($Value == 1) {
84
-      return true;
85
-    } elseif ($Value == 0) {
86
-      return false;
87 87
     }
88
-  }
89
-  return null;
88
+    if (is_numeric($Value)) {
89
+        if ($Value === 1) {
90
+            return true;
91
+        } elseif ($Value === 0) {
92
+            return false;
93
+        }
94
+    }
95
+    return null;
90 96
 }
91 97
 
92 98
 /**
@@ -96,16 +102,17 @@ function is_bool_value($Value) {
96 102
  * @param string $Str
97 103
  * @return string escaped string.
98 104
  */
99
-function display_str($Str) {
100
-  if ($Str === null || $Str === false || is_array($Str)) {
101
-    return '';
102
-  }
103
-  if ($Str != '' && !is_number($Str)) {
104
-    $Str = Format::make_utf8($Str);
105
-    $Str = mb_convert_encoding($Str, 'HTML-ENTITIES', 'UTF-8');
106
-    $Str = preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,6};)/m", '&amp;', $Str);
107
-
108
-    $Replace = array(
105
+function display_str($Str)
106
+{
107
+    if ($Str === null || $Str === false || is_array($Str)) {
108
+        return '';
109
+    }
110
+    if ($Str !== '' && !is_number($Str)) {
111
+        $Str = Format::make_utf8($Str);
112
+        $Str = mb_convert_encoding($Str, 'HTML-ENTITIES', 'UTF-8');
113
+        $Str = preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,6};)/m", '&amp;', $Str);
114
+
115
+        $Replace = array(
109 116
       "'",'"',"<",">",
110 117
       '&#128;','&#130;','&#131;','&#132;','&#133;','&#134;','&#135;','&#136;',
111 118
       '&#137;','&#138;','&#139;','&#140;','&#142;','&#145;','&#146;','&#147;',
@@ -113,7 +120,7 @@ function display_str($Str) {
113 120
       '&#156;','&#158;','&#159;'
114 121
     );
115 122
 
116
-    $With = array(
123
+        $With = array(
117 124
       '&#39;','&quot;','&lt;','&gt;',
118 125
       '&#8364;','&#8218;','&#402;','&#8222;','&#8230;','&#8224;','&#8225;','&#710;',
119 126
       '&#8240;','&#352;','&#8249;','&#338;','&#381;','&#8216;','&#8217;','&#8220;',
@@ -121,29 +128,28 @@ function display_str($Str) {
121 128
       '&#339;','&#382;','&#376;'
122 129
     );
123 130
 
124
-    $Str = str_replace($Replace, $With, $Str);
125
-  }
126
-  return $Str;
131
+        $Str = str_replace($Replace, $With, $Str);
132
+    }
133
+    return $Str;
127 134
 }
128 135
 
129
-
130 136
 /**
131 137
  * Send a message to an IRC bot listening on SOCKET_LISTEN_PORT
132 138
  *
133 139
  * @param string $Raw An IRC protocol snippet to send.
134 140
  */
135
-function send_irc($Raw) {
136
-  // check if IRC is enabled
137
-  if (!FEATURE_IRC) {
138
-    return;
139
-  }
140
-
141
-  $IRCSocket = fsockopen(SOCKET_LISTEN_ADDRESS, SOCKET_LISTEN_PORT);
142
-  $Raw = str_replace(array("\n", "\r"), '', $Raw);
143
-  fwrite($IRCSocket, $Raw);
144
-  fclose($IRCSocket);
145
-}
141
+function send_irc($Raw)
142
+{
143
+    // Check if IRC is enabled
144
+    if (!FEATURE_IRC) {
145
+        return;
146
+    }
146 147
 
148
+    $IRCSocket = fsockopen(SOCKET_LISTEN_ADDRESS, SOCKET_LISTEN_PORT);
149
+    $Raw = str_replace(array("\n", "\r"), '', $Raw);
150
+    fwrite($IRCSocket, $Raw);
151
+    fclose($IRCSocket);
152
+}
147 153
 
148 154
 /**
149 155
  * Display a critical error and kills the page.
@@ -154,51 +160,55 @@ function send_irc($Raw) {
154 160
  * @param boolean $NoHTML If true, the header/footer won't be shown, just the description.
155 161
  * @param string $Log If true, the user is given a link to search $Log in the site log.
156 162
  */
157
-function error($Error, $NoHTML = false, $Log = false) {
158
-  global $Debug;
159
-  require(SERVER_ROOT.'/sections/error/index.php');
160
-  $Debug->profile();
161
-  die();
163
+function error($Error, $NoHTML = false, $Log = false)
164
+{
165
+    global $Debug;
166
+    require(SERVER_ROOT.'/sections/error/index.php');
167
+    $Debug->profile();
168
+    die();
162 169
 }
163 170
 
164
-
165 171
 /**
166 172
  * Convenience function. See doc in permissions.class.php
167 173
  */
168
-function check_perms($PermissionName, $MinClass = 0) {
169
-  return Permissions::check_perms($PermissionName, $MinClass);
174
+function check_perms($PermissionName, $MinClass = 0)
175
+{
176
+    return Permissions::check_perms($PermissionName, $MinClass);
170 177
 }
171 178
 
172
-function get_permissions_for_user($UserID, $CustomPermissions = false) {
173
-  return Permissions::get_permissions_for_user($UserID, $CustomPermissions = false);
179
+function get_permissions_for_user($UserID, $CustomPermissions = false)
180
+{
181
+    return Permissions::get_permissions_for_user($UserID, $CustomPermissions = false);
174 182
 }
175 183
 
176 184
 /**
177 185
  * Print JSON status result with an optional message and die.
178 186
  * DO NOT USE THIS FUNCTION!
179 187
  */
180
-function json_die($Status, $Message) {
181
-  json_print($Status, $Message);
182
-  die();
188
+function json_die($Status, $Message)
189
+{
190
+    json_print($Status, $Message);
191
+    die();
183 192
 }
184 193
 
185 194
 /**
186 195
  * Print JSON status result with an optional message.
187 196
  */
188
-function json_print($Status, $Message) {
189
-  if ($Status == 'success' && $Message) {
190
-    print json_encode(array('status' => $Status, 'response' => $Message));
191
-  } elseif ($Message) {
192
-    print json_encode(array('status' => $Status, 'error' => $Message));
193
-  } else {
194
-    print json_encode(array('status' => $Status, 'response' => []));
195
-  }
197
+function json_print($Status, $Message)
198
+{
199
+    if ($Status === 'success' && $Message) {
200
+        print json_encode(array('status' => $Status, 'response' => $Message));
201
+    } elseif ($Message) {
202
+        print json_encode(array('status' => $Status, 'error' => $Message));
203
+    } else {
204
+        print json_encode(array('status' => $Status, 'response' => []));
205
+    }
196 206
 }
197 207
 
198 208
 /**
199 209
  * Print the site's URL including the appropriate URI scheme, including the trailing slash
200 210
  */
201
-function site_url() {
202
-  return 'https://' . SITE_DOMAIN . '/';
211
+function site_url()
212
+{
213
+    return 'https://' . SITE_DOMAIN . '/';
203 214
 }
204
-?>

+ 4
- 0
design/publicheader.php View File

@@ -1,7 +1,9 @@
1 1
 <?php
2
+
2 3
 global $LoggedUser;
3 4
 define('FOOTER_FILE', SERVER_ROOT.'/design/publicfooter.php');
4 5
 ?>
6
+
5 7
 <!DOCTYPE html>
6 8
 <html>
7 9
 <head>
@@ -12,6 +14,7 @@ define('FOOTER_FILE', SERVER_ROOT.'/design/publicfooter.php');
12 14
   <link rel="shortcut icon" href="static/common/icon.png?v=<?=md5_file('static/common/icon.png');?>">
13 15
   <link rel="manifest" href="/manifest.php">
14 16
   <link href="<?=STATIC_SERVER ?>styles/public/style.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/public/style.css')?>" rel="stylesheet" type="text/css">
17
+
15 18
 <?php
16 19
   $Scripts = ['jquery', 'global', 'ajax.class', 'cookie.class', 'storage.class', 'public', 'u2f'];
17 20
   foreach ($Scripts as $Script) {
@@ -27,6 +30,7 @@ define('FOOTER_FILE', SERVER_ROOT.'/design/publicfooter.php');
27 30
   $img = array_diff(scandir(SERVER_ROOT.'/misc/bg', 1), array('.', '..')); ?>
28 31
   <meta name="bg_data" content="<?=$img[rand(0, count($img)-1)]?>">
29 32
 </head>
33
+
30 34
 <body>
31 35
 <div id="head"><span>
32 36
 <a href="login.php">Log In</a>

+ 2
- 2
sections/schedule/daily/disable_inactive_users.php View File

@@ -8,7 +8,7 @@ if (apcu_exists('DBKEY')) {
8 8
     SELECT um.Username, um.Email
9 9
     FROM users_info AS ui
10 10
       JOIN users_main AS um ON um.ID = ui.UserID
11
-      LEFT JOIN users_levels AS ul ON ul.UserID = um.ID AND ul.PermissionID = '".CELEB."'
11
+      LEFT JOIN users_levels AS ul ON ul.UserID = um.ID AND ul.PermissionID = '".VIP."'
12 12
     WHERE um.PermissionID IN ('".USER."', '".MEMBER ."')
13 13
       AND um.LastAccess < (NOW() - INTERVAL 110 DAY)
14 14
       AND um.LastAccess > (NOW() - INTERVAL 111 DAY)
@@ -27,7 +27,7 @@ if (apcu_exists('DBKEY')) {
27 27
     SELECT um.ID
28 28
     FROM users_info AS ui
29 29
       JOIN users_main AS um ON um.ID = ui.UserID
30
-      LEFT JOIN users_levels AS ul ON ul.UserID = um.ID AND ul.PermissionID = '".CELEB."'
30
+      LEFT JOIN users_levels AS ul ON ul.UserID = um.ID AND ul.PermissionID = '".VIP."'
31 31
     WHERE um.PermissionID IN ('".USER."', '".MEMBER ."')
32 32
       AND um.LastAccess < (NOW() - INTERVAL 120 DAY)
33 33
       AND um.LastAccess IS NOT NULL

+ 79
- 47
sections/torrents/browse.php View File

@@ -139,6 +139,7 @@ if ($AdvancedSearch) {
139 139
     $HideAdvanced = ' hidden';
140 140
 }
141 141
 
142
+# Start the search form
142 143
 View::show_header('Browse Torrents', 'browse');
143 144
 
144 145
 ?>
@@ -173,7 +174,7 @@ View::show_header('Browse Torrents', 'browse');
173 174
           <tr id="catalogue_number"
174 175
             class="ftr_advanced<?=$HideAdvanced?>">
175 176
             <td class="label">
176
-              <!--Catalogue number:-->
177
+              <!-- Catalogue Number -->
177 178
             </td>
178 179
             <td class="ft_cataloguenumber">
179 180
               <input type="search" size="19" name="cataloguenumber" class="inputtext smallest fti_advanced"
@@ -185,7 +186,7 @@ View::show_header('Browse Torrents', 'browse');
185 186
           <tr id="album_torrent_name"
186 187
             class="ftr_advanced<?=$HideAdvanced?>">
187 188
             <td class="label">
188
-              <!--Torrent name:-->
189
+              <!-- Torrent Name -->
189 190
             </td>
190 191
             <td class="ft_groupname">
191 192
               <input type="search" spellcheck="false" size="65" name="advgroupname"
@@ -197,7 +198,7 @@ View::show_header('Browse Torrents', 'browse');
197 198
           <tr id="artist_name"
198 199
             class="ftr_advanced<?=$HideAdvanced?>">
199 200
             <td class="label">
200
-              <!--Artist name:-->
201
+              <!-- Artist Name -->
201 202
             </td>
202 203
             <td class="ft_artistname">
203 204
               <input type="search" spellcheck="false" size="65" id="artist" name="artistname"
@@ -209,7 +210,7 @@ View::show_header('Browse Torrents', 'browse');
209 210
 
210 211
           <tr id="year" class="ftr_advanced<?=$HideAdvanced?>">
211 212
             <td class="label">
212
-              <!--Year:-->
213
+              <!-- Year -->
213 214
             </td>
214 215
             <td class="ft_year">
215 216
               <input type="search" name="year" class="inputtext smallest fti_advanced" placeholder="Year"
@@ -221,7 +222,7 @@ View::show_header('Browse Torrents', 'browse');
221 222
           <tr id="torrent_description"
222 223
             class="ftr_advanced<?=$HideAdvanced?>">
223 224
             <td class="label">
224
-              <!--<span title="Search torrent descriptions (not group information)" class="tooltip">Torrent description:</span>-->
225
+              <!-- Torrent Description -->
225 226
             </td>
226 227
             <td class="ft_description">
227 228
               <input type="search" spellcheck="false" size="65" name="description" class="inputtext fti_advanced"
@@ -233,7 +234,7 @@ View::show_header('Browse Torrents', 'browse');
233 234
 
234 235
           <tr id="file_list" class="ftr_advanced<?=$HideAdvanced?>">
235 236
             <td class="label">
236
-              <!--File list:-->
237
+              <!-- File List -->
237 238
             </td>
238 239
             <td class="ft_filelist">
239 240
               <input type="search" spellcheck="false" size="65" name="filelist" class="inputtext fti_advanced"
@@ -242,13 +243,14 @@ View::show_header('Browse Torrents', 'browse');
242 243
             </td>
243 244
           </tr>
244 245
 
246
+          <!-- Platforms -->
245 247
           <tr id="rip_specifics"
246 248
             class="ftr_advanced<?=$HideAdvanced?>">
247
-            <td class="label">Specifics</td>
249
+            <td class="label">Platforms</td>
248 250
             <td class="nobr ft_ripspecifics">
249 251
 
250 252
               <select name="media" class="ft_media fti_advanced">
251
-                <option value="">Seq Platform</option>
253
+                <option value="">DNA/RNA/Proteins</option>
252 254
                 <?php  foreach ($Media as $MediaName) { ?>
253 255
                 <option value="<?=display_str($MediaName); ?>"
254 256
                 <?Format::selected('media', $MediaName)?>><?=display_str($MediaName); ?>
@@ -256,8 +258,25 @@ View::show_header('Browse Torrents', 'browse');
256 258
                 <?php  } ?>
257 259
               </select>
258 260
 
261
+              <select name="media" class="ft_media fti_advanced">
262
+                <option value="">Imaging</option>
263
+                <?php  foreach ($MediaManga as $MediaName) { ?>
264
+                <option value="<?=display_str($MediaName); ?>"
265
+                <?Format::selected('media', $MediaName)?>><?=display_str($MediaName); ?>
266
+                </option>
267
+                <?php  } ?>
268
+              </select>
269
+            </td>
270
+          </tr>
271
+
272
+          <!-- Formats -->
273
+          <tr id="rip_specifics"
274
+            class="ftr_advanced<?=$HideAdvanced?>">
275
+            <td class="label">Formats</td>
276
+            <td class="nobr ft_ripspecifics">
277
+
259 278
               <select id=" container" name="container" class="ft_container fti_advanced">
260
-                <option value="">Seq Format</option>
279
+                <option value="">DNA/RNA</option>
261 280
                 <?php  foreach ($Containers as $Key => $Container) { ?>
262 281
                 <option value="<?=display_str($Key);?>" <?Format::selected('container', $Key)?>><?=display_str($Key);?>
263 282
                 </option>
@@ -265,64 +284,41 @@ View::show_header('Browse Torrents', 'browse');
265 284
               </select>
266 285
 
267 286
               <select id=" container" name="container" class="ft_container fti_advanced">
268
-                <option value="">Prot Format</option>
287
+                <option value="">Proteins</option>
269 288
                 <?php  foreach ($ContainersProt as $Key => $Container) { ?>
270 289
                 <option value="<?=display_str($Key);?>" <?Format::selected('container', $Key)?>><?=display_str($Key);?>
271 290
                 </option>
272 291
                 <?php  } ?>
273 292
               </select>
274 293
 
275
-              <select name="media" class="ft_media fti_advanced">
276
-                <option value="">Img Platform</option>
277
-                <?php  foreach ($MediaManga as $MediaName) { ?>
278
-                <option value="<?=display_str($MediaName); ?>"
279
-                <?Format::selected('media', $MediaName)?>><?=display_str($MediaName); ?>
294
+              <select id=" container" name="container" class="ft_container fti_advanced">
295
+                <option value="">Imaging</option>
296
+                <?php  foreach ($ContainersGames as $Key => $Container) { ?>
297
+                <option value="<?=display_str($Key);?>" <?Format::selected('container', $Key)?>><?=display_str($Key);?>
280 298
                 </option>
281 299
                 <?php  } ?>
282 300
               </select>
283 301
 
284 302
               <select id=" container" name="container" class="ft_container fti_advanced">
285
-                <option value="">Img Format</option>
286
-                <?php  foreach ($ContainersGames as $Key => $Container) { ?>
303
+                <option value="">Extras</option>
304
+                <?php  foreach ($ContainersExtra as $Key => $Container) { ?>
287 305
                 <option value="<?=display_str($Key);?>" <?Format::selected('container', $Key)?>><?=display_str($Key);?>
288 306
                 </option>
289 307
                 <?php  } ?>
290 308
               </select>
291 309
             </td>
292 310
           </tr>
293
-          <tr id="size" class="ftr_advanced<?=$HideAdvanced?>">
294
-            <td class="label">Size</td>
295
-            <td class="ft_size">
296
-              <input type="size_min" spellcheck="false" size="6" name="size_min" class="inputtext smaller fti_advanced"
297
-                placeholder="Min"
298
-                value="<?Format::form('size_min')?>" />
299
-              &ndash;
300
-              <input type="size_max" spellcheck="false" size="6" name="size_max" class="inputtext smaller fti_advanced"
301
-                placeholder="Max"
302
-                value="<?Format::form('size_max')?>" />
303
-              <select name="size_unit" class="ft_size fti_advanced">
304
-                <option value="">Unit</option>
305
-                <option value="0" <?Format::selected('size_unit', 0)?>>B
306
-                </option>
307
-                <option value="1" <?Format::selected('size_unit', 1)?>>KiB
308
-                </option>
309
-                <option value="2" <?Format::selected('size_unit', 2)?>>MiB
310
-                </option>
311
-                <option value="3" <?Format::selected('size_unit', 3)?>>GiB
312
-                </option>
313
-                <option value="4" <?Format::selected('size_unit', 4)?>>TiB
314
-                </option>
315
-              </select>
316
-            </td>
317
-          </tr>
311
+
312
+          <!-- Misc -->
318 313
           <tr id="misc" class="ftr_advanced<?=$HideAdvanced?>">
319 314
             <td class="label">Misc</td>
320 315
             <td class="nobr ft_misc">
316
+
321 317
               <select name="resolution" class="ft_resolution fti_advanced">
322 318
                 <option value="">Assembly Level</option>
323 319
                 <?php  foreach ($Resolutions as $Resolution) { ?>
324 320
                 <option value="<?=display_str($Resolution); ?>"
325
-                <?Format::selected('resolution', $Resolution)?>><?=display_str($Resolution); ?>
321
+                <?Format::selected('resolution', $Resolution)?>><?=display_str($Resolution); ?>"
326 322
                 </option>
327 323
                 <?php  } ?>
328 324
               </select>
@@ -356,9 +352,38 @@ View::show_header('Browse Torrents', 'browse');
356 352
               </select>
357 353
             </td>
358 354
           </tr>
355
+
356
+          <!-- Size -->
357
+          <tr id="size" class="ftr_advanced<?=$HideAdvanced?>">
358
+            <td class="label">Size</td>
359
+            <td class="ft_size">
360
+              <input type="size_min" spellcheck="false" size="6" name="size_min" class="inputtext smaller fti_advanced"
361
+                placeholder="Min"
362
+                value="<?Format::form('size_min')?>" />
363
+              &ndash;
364
+              <input type="size_max" spellcheck="false" size="6" name="size_max" class="inputtext smaller fti_advanced"
365
+                placeholder="Max"
366
+                value="<?Format::form('size_max')?>" />
367
+              <select name="size_unit" class="ft_size fti_advanced">
368
+                <option value="">Unit</option>
369
+                <option value="0" <?Format::selected('size_unit', 0)?>>B
370
+                </option>
371
+                <option value="1" <?Format::selected('size_unit', 1)?>>KiB
372
+                </option>
373
+                <option value="2" <?Format::selected('size_unit', 2)?>>MiB
374
+                </option>
375
+                <option value="3" <?Format::selected('size_unit', 3)?>>GiB
376
+                </option>
377
+                <option value="4" <?Format::selected('size_unit', 4)?>>TiB
378
+                </option>
379
+              </select>
380
+            </td>
381
+          </tr>
382
+
383
+          <!-- Start basic search options -->
359 384
           <tr id="search_terms" class="ftr_basic<?=$HideBasic?>">
360 385
             <td class="label">
361
-              <!--Search terms:-->
386
+              <!-- Search Terms -->
362 387
             </td>
363 388
             <td class="ftb_searchstr">
364 389
               <input type="search" spellcheck="false" size="48" name="searchstr" class="inputtext fti_basic"
@@ -367,9 +392,10 @@ View::show_header('Browse Torrents', 'browse');
367 392
                 aria-label="Terms to search">
368 393
             </td>
369 394
           </tr>
395
+
370 396
           <tr id="tagfilter">
371 397
             <td class="label">
372
-              <!--<span title="Use !tag to exclude tag" class="tooltip">Tags (comma-separated):</span>-->
398
+              <!-- Tags (comma-separated) -->
373 399
             </td>
374 400
             <td class="ft_taglist">
375 401
               <input type="search" size="37" id="tags" name="taglist" class="inputtext smaller"
@@ -384,6 +410,7 @@ View::show_header('Browse Torrents', 'browse');
384 410
               Use !tag to exclude tags
385 411
             </td>
386 412
           </tr>
413
+
387 414
           <tr id="order">
388 415
             <td class="label">Order By</td>
389 416
             <td class="ft_order">
@@ -405,6 +432,7 @@ View::show_header('Browse Torrents', 'browse');
405 432
                 <option value="random" <?Format::selected('order_by', 'random')?>>Random
406 433
                 </option>
407 434
               </select>
435
+
408 436
               <select name="order_way" class="ft_order_way" aria-label="Direction to order">
409 437
                 <option value="desc" <?Format::selected('order_way', 'desc')?>>Descending
410 438
                 </option>
@@ -413,6 +441,7 @@ View::show_header('Browse Torrents', 'browse');
413 441
               </select>
414 442
             </td>
415 443
           </tr>
444
+
416 445
           <tr id="search_group_results">
417 446
             <td class="label">
418 447
               <label for="group_results">Group Torrents</label>
@@ -423,6 +452,7 @@ View::show_header('Browse Torrents', 'browse');
423 452
             </td>
424 453
           </tr>
425 454
         </table>
455
+
426 456
         <table class="layout cat_list ft_cat_list">
427 457
           <?php
428 458
   $x = 0;
@@ -521,7 +551,9 @@ View::show_header('Browse Torrents', 'browse');
521 551
     <p>Make sure all names are spelled correctly, or try making your search less specific.</p>
522 552
   </div>
523 553
 </div>
524
-<?php    View::show_footer();die();
554
+<?php
555
+View::show_footer();
556
+die();
525 557
   }
526 558
 
527 559
   if ($NumResults < ($Page - 1) * TORRENTS_PER_PAGE + 1) {
@@ -712,7 +744,7 @@ $ShowGroups = !(!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGr
712 744
         $Data['CategoryID'] = $CategoryID;
713 745
         // All of the individual torrents in the group
714 746
 
715
-        // Get report info for each torrent, use the cache if available, if not, add to it.
747
+        // Get report info for each torrent, use the cache if available, if not, add to it
716 748
         $Reported = false;
717 749
         $Reports = Torrents::get_reports($TorrentID);
718 750
         if (count($Reports) > 0) {

+ 11
- 8
static/styles/matcha/style.css View File

@@ -25,7 +25,7 @@ html {
25 25
 
26 26
 body {
27 27
   font-family: Bitstream Vera Sans, Tahoma, sans-serif;
28
-  font-size: 11px;
28
+  font-size: 0.7em;
29 29
   color: black;
30 30
   background: url('/static/common/hiware.png') fixed;
31 31
 }
@@ -86,12 +86,14 @@ h1,h2,h3,h4 {
86 86
 
87 87
 h2 {
88 88
   text-align: center;
89
-  font-size: 12pt;
89
+  /* font-size: 12pt; */
90 90
 }
91 91
 
92
+/*
92 93
 h4 {
93 94
   font-size: 8pt;
94 95
 }
96
+*/
95 97
 
96 98
 p {
97 99
   margin: 10px 5px;
@@ -176,6 +178,7 @@ ul.thin li { margin:0px 0px; padding:0px; }
176 178
   width: 100%;
177 179
   text-align: center;
178 180
   background-color: #016670;
181
+  /* todo: Convert to em */
179 182
   font-size: 10pt;
180 183
 }
181 184
 
@@ -274,7 +277,6 @@ ul.thin li { margin:0px 0px; padding:0px; }
274 277
   padding: 0px;
275 278
 }
276 279
 
277
-
278 280
 #userinfo a {
279 281
   color: black;
280 282
   text-decoration: none;
@@ -284,7 +286,6 @@ ul.thin li { margin:0px 0px; padding:0px; }
284 286
   text-decoration: underline;
285 287
 }
286 288
 
287
-
288 289
 #userinfo b a {
289 290
   font-weight: normal;
290 291
   font-size: 0.9em;
@@ -394,7 +395,7 @@ ul.thin li { margin:0px 0px; padding:0px; }
394 395
   text-decoration: underline;
395 396
 }
396 397
 
397
-/* IE doesn't appear to like a simple display:none in our header. Random things start fucking up pretty badly. */
398
+/* IE doesn't appear to like a simple display:none in our header. Random things start fucking up pretty badly */
398 399
 .hidden {
399 400
   position: absolute;
400 401
   left: -10000px;
@@ -413,7 +414,7 @@ input.hidden {
413 414
   margin: 0px auto;
414 415
 }
415 416
 
416
-.widethin { /* overriding the thin class on torrents.php */
417
+.widethin { /* Overriding the thin class on torrents.php */
417 418
   width: 95% !important;
418 419
   margin: 0px auto;
419 420
 }
@@ -479,7 +480,7 @@ p.min_padding {
479 480
 }
480 481
 
481 482
 .box {
482
-  font-size: 8pt;
483
+  /* font-size: 8pt; */
483 484
   background-color: white;
484 485
   /* border: 1px solid #666666; */
485 486
   border: none;
@@ -492,7 +493,7 @@ p.min_padding {
492 493
 
493 494
 .box2 {
494 495
   margin-bottom: 10px;
495
-  font-size: 8pt;
496
+  /* font-size: 8pt; */
496 497
   background-color: white;
497 498
   /* border: 1px solid #666666; */
498 499
   border: none;
@@ -1094,10 +1095,12 @@ input.inputtext:focus {
1094 1095
 #userinfo {
1095 1096
   box-shadow: 0 2px 10px -2px gray;
1096 1097
 
1098
+/*
1097 1099
 .last_edited {
1098 1100
   font-size: 10px;
1099 1101
   opacity: 0.7;
1100 1102
 }
1103
+*/
1101 1104
 
1102 1105
 #comm_badge_tr .badge_icon, #user_badge_edit_tr .badge_icon {
1103 1106
   margin-right: 1em;

+ 1
- 1
static/styles/public/style.css View File

@@ -18,7 +18,7 @@ html, body {
18 18
 
19 19
 body {
20 20
   font-family: Bitstream Vera Sans, Tahoma, sans-serif;
21
-  font-size: 11px;
21
+  font-size: 0.75em;
22 22
   color: black;
23 23
   background: url('/static/common/hiware.png');
24 24
 }

Loading…
Cancel
Save