Browse Source

Minor styling and torrent search edits

pjc 5 years ago
parent
commit
569a3f50e8

+ 104
- 94
classes/util.php View File

1
-<?
1
+<?php
2
+
2
 // This is a file of miscellaneous functions that are called so damn often
3
 // This is a file of miscellaneous functions that are called so damn often
3
 // that it'd just be annoying to stick them in namespaces.
4
 // that it'd just be annoying to stick them in namespaces.
4
 
5
 
9
  * @return bool
10
  * @return bool
10
  */
11
  */
11
 if (PHP_INT_SIZE === 4) {
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
 } else {
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
  * @param array $Keys list of keys to check
46
  * @param array $Keys list of keys to check
43
  * @param mixed $Error error code or string to pass to the error() function if a key isn't numeric
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
  * @return true if $Value is "truthy", false if it is "non-truthy" or null if $Value was not
66
  * @return true if $Value is "truthy", false if it is "non-truthy" or null if $Value was not
62
  *         a bool-like value
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
       case 'true':
76
       case 'true':
71
       case 'yes':
77
       case 'yes':
72
       case 'on':
78
       case 'on':
78
       case '0':
84
       case '0':
79
         return false;
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
  * @param string $Str
102
  * @param string $Str
97
  * @return string escaped string.
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
       '&#128;','&#130;','&#131;','&#132;','&#133;','&#134;','&#135;','&#136;',
117
       '&#128;','&#130;','&#131;','&#132;','&#133;','&#134;','&#135;','&#136;',
111
       '&#137;','&#138;','&#139;','&#140;','&#142;','&#145;','&#146;','&#147;',
118
       '&#137;','&#138;','&#139;','&#140;','&#142;','&#145;','&#146;','&#147;',
113
       '&#156;','&#158;','&#159;'
120
       '&#156;','&#158;','&#159;'
114
     );
121
     );
115
 
122
 
116
-    $With = array(
123
+        $With = array(
117
       '&#39;','&quot;','&lt;','&gt;',
124
       '&#39;','&quot;','&lt;','&gt;',
118
       '&#8364;','&#8218;','&#402;','&#8222;','&#8230;','&#8224;','&#8225;','&#710;',
125
       '&#8364;','&#8218;','&#402;','&#8222;','&#8230;','&#8224;','&#8225;','&#710;',
119
       '&#8240;','&#352;','&#8249;','&#338;','&#381;','&#8216;','&#8217;','&#8220;',
126
       '&#8240;','&#352;','&#8249;','&#338;','&#381;','&#8216;','&#8217;','&#8220;',
121
       '&#339;','&#382;','&#376;'
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
  * Send a message to an IRC bot listening on SOCKET_LISTEN_PORT
137
  * Send a message to an IRC bot listening on SOCKET_LISTEN_PORT
132
  *
138
  *
133
  * @param string $Raw An IRC protocol snippet to send.
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
  * Display a critical error and kills the page.
155
  * Display a critical error and kills the page.
154
  * @param boolean $NoHTML If true, the header/footer won't be shown, just the description.
160
  * @param boolean $NoHTML If true, the header/footer won't be shown, just the description.
155
  * @param string $Log If true, the user is given a link to search $Log in the site log.
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
  * Convenience function. See doc in permissions.class.php
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
  * Print JSON status result with an optional message and die.
185
  * Print JSON status result with an optional message and die.
178
  * DO NOT USE THIS FUNCTION!
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
  * Print JSON status result with an optional message.
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
  * Print the site's URL including the appropriate URI scheme, including the trailing slash
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
 <?php
1
 <?php
2
+
2
 global $LoggedUser;
3
 global $LoggedUser;
3
 define('FOOTER_FILE', SERVER_ROOT.'/design/publicfooter.php');
4
 define('FOOTER_FILE', SERVER_ROOT.'/design/publicfooter.php');
4
 ?>
5
 ?>
6
+
5
 <!DOCTYPE html>
7
 <!DOCTYPE html>
6
 <html>
8
 <html>
7
 <head>
9
 <head>
12
   <link rel="shortcut icon" href="static/common/icon.png?v=<?=md5_file('static/common/icon.png');?>">
14
   <link rel="shortcut icon" href="static/common/icon.png?v=<?=md5_file('static/common/icon.png');?>">
13
   <link rel="manifest" href="/manifest.php">
15
   <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">
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
 <?php
18
 <?php
16
   $Scripts = ['jquery', 'global', 'ajax.class', 'cookie.class', 'storage.class', 'public', 'u2f'];
19
   $Scripts = ['jquery', 'global', 'ajax.class', 'cookie.class', 'storage.class', 'public', 'u2f'];
17
   foreach ($Scripts as $Script) {
20
   foreach ($Scripts as $Script) {
27
   $img = array_diff(scandir(SERVER_ROOT.'/misc/bg', 1), array('.', '..')); ?>
30
   $img = array_diff(scandir(SERVER_ROOT.'/misc/bg', 1), array('.', '..')); ?>
28
   <meta name="bg_data" content="<?=$img[rand(0, count($img)-1)]?>">
31
   <meta name="bg_data" content="<?=$img[rand(0, count($img)-1)]?>">
29
 </head>
32
 </head>
33
+
30
 <body>
34
 <body>
31
 <div id="head"><span>
35
 <div id="head"><span>
32
 <a href="login.php">Log In</a>
36
 <a href="login.php">Log In</a>

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

8
     SELECT um.Username, um.Email
8
     SELECT um.Username, um.Email
9
     FROM users_info AS ui
9
     FROM users_info AS ui
10
       JOIN users_main AS um ON um.ID = ui.UserID
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
     WHERE um.PermissionID IN ('".USER."', '".MEMBER ."')
12
     WHERE um.PermissionID IN ('".USER."', '".MEMBER ."')
13
       AND um.LastAccess < (NOW() - INTERVAL 110 DAY)
13
       AND um.LastAccess < (NOW() - INTERVAL 110 DAY)
14
       AND um.LastAccess > (NOW() - INTERVAL 111 DAY)
14
       AND um.LastAccess > (NOW() - INTERVAL 111 DAY)
27
     SELECT um.ID
27
     SELECT um.ID
28
     FROM users_info AS ui
28
     FROM users_info AS ui
29
       JOIN users_main AS um ON um.ID = ui.UserID
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
     WHERE um.PermissionID IN ('".USER."', '".MEMBER ."')
31
     WHERE um.PermissionID IN ('".USER."', '".MEMBER ."')
32
       AND um.LastAccess < (NOW() - INTERVAL 120 DAY)
32
       AND um.LastAccess < (NOW() - INTERVAL 120 DAY)
33
       AND um.LastAccess IS NOT NULL
33
       AND um.LastAccess IS NOT NULL

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

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

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

25
 
25
 
26
 body {
26
 body {
27
   font-family: Bitstream Vera Sans, Tahoma, sans-serif;
27
   font-family: Bitstream Vera Sans, Tahoma, sans-serif;
28
-  font-size: 11px;
28
+  font-size: 0.7em;
29
   color: black;
29
   color: black;
30
   background: url('/static/common/hiware.png') fixed;
30
   background: url('/static/common/hiware.png') fixed;
31
 }
31
 }
86
 
86
 
87
 h2 {
87
 h2 {
88
   text-align: center;
88
   text-align: center;
89
-  font-size: 12pt;
89
+  /* font-size: 12pt; */
90
 }
90
 }
91
 
91
 
92
+/*
92
 h4 {
93
 h4 {
93
   font-size: 8pt;
94
   font-size: 8pt;
94
 }
95
 }
96
+*/
95
 
97
 
96
 p {
98
 p {
97
   margin: 10px 5px;
99
   margin: 10px 5px;
176
   width: 100%;
178
   width: 100%;
177
   text-align: center;
179
   text-align: center;
178
   background-color: #016670;
180
   background-color: #016670;
181
+  /* todo: Convert to em */
179
   font-size: 10pt;
182
   font-size: 10pt;
180
 }
183
 }
181
 
184
 
274
   padding: 0px;
277
   padding: 0px;
275
 }
278
 }
276
 
279
 
277
-
278
 #userinfo a {
280
 #userinfo a {
279
   color: black;
281
   color: black;
280
   text-decoration: none;
282
   text-decoration: none;
284
   text-decoration: underline;
286
   text-decoration: underline;
285
 }
287
 }
286
 
288
 
287
-
288
 #userinfo b a {
289
 #userinfo b a {
289
   font-weight: normal;
290
   font-weight: normal;
290
   font-size: 0.9em;
291
   font-size: 0.9em;
394
   text-decoration: underline;
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
 .hidden {
399
 .hidden {
399
   position: absolute;
400
   position: absolute;
400
   left: -10000px;
401
   left: -10000px;
413
   margin: 0px auto;
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
   width: 95% !important;
418
   width: 95% !important;
418
   margin: 0px auto;
419
   margin: 0px auto;
419
 }
420
 }
479
 }
480
 }
480
 
481
 
481
 .box {
482
 .box {
482
-  font-size: 8pt;
483
+  /* font-size: 8pt; */
483
   background-color: white;
484
   background-color: white;
484
   /* border: 1px solid #666666; */
485
   /* border: 1px solid #666666; */
485
   border: none;
486
   border: none;
492
 
493
 
493
 .box2 {
494
 .box2 {
494
   margin-bottom: 10px;
495
   margin-bottom: 10px;
495
-  font-size: 8pt;
496
+  /* font-size: 8pt; */
496
   background-color: white;
497
   background-color: white;
497
   /* border: 1px solid #666666; */
498
   /* border: 1px solid #666666; */
498
   border: none;
499
   border: none;
1094
 #userinfo {
1095
 #userinfo {
1095
   box-shadow: 0 2px 10px -2px gray;
1096
   box-shadow: 0 2px 10px -2px gray;
1096
 
1097
 
1098
+/*
1097
 .last_edited {
1099
 .last_edited {
1098
   font-size: 10px;
1100
   font-size: 10px;
1099
   opacity: 0.7;
1101
   opacity: 0.7;
1100
 }
1102
 }
1103
+*/
1101
 
1104
 
1102
 #comm_badge_tr .badge_icon, #user_badge_edit_tr .badge_icon {
1105
 #comm_badge_tr .badge_icon, #user_badge_edit_tr .badge_icon {
1103
   margin-right: 1em;
1106
   margin-right: 1em;

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

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

Loading…
Cancel
Save