Browse Source

Miscellaneous Changes

* Added a new category
* Add deletion support to batch tag updater
* Bug fixes
spaghetti 5 years ago
parent
commit
46a904d950
60 changed files with 300 additions and 207 deletions
  1. 23
    14
      classes/autoenable.class.php
  2. 1
    3
      classes/cache.class.php
  3. 1
    1
      classes/config.template
  4. 1
    1
      classes/debug.class.php
  5. 6
    6
      classes/torrent_form.class.php
  6. 1
    1
      gazelle.sql
  7. 11
    3
      sections/ajax/autofill/manga.php
  8. 8
    6
      sections/bookmarks/torrents.php
  9. 4
    4
      sections/collages/edit.php
  10. 2
    2
      sections/collages/new.php
  11. 8
    6
      sections/collages/torrent_collage.php
  12. 1
    1
      sections/forums/forum.php
  13. 1
    1
      sections/forums/main.php
  14. 10
    10
      sections/login/disabled.php
  15. 0
    1
      sections/login/login.php
  16. 4
    5
      sections/reports/ajax_add_notes.php
  17. 9
    9
      sections/reports/compose.php
  18. 4
    4
      sections/reportsv2/report.php
  19. 1
    1
      sections/requests/new_edit.php
  20. 2
    2
      sections/requests/take_new_edit.php
  21. 1
    2
      sections/rules/upload.php
  22. 8
    4
      sections/schedule/hourly/bonus_points.php
  23. 1
    1
      sections/schedule/index.php
  24. 5
    2
      sections/store/100k_points.php
  25. 5
    2
      sections/store/10k_points.php
  26. 5
    2
      sections/store/1k_points.php
  27. 3
    2
      sections/store/1m_points.php
  28. 14
    13
      sections/store/store.php
  29. 3
    2
      sections/store/upload_1000GB.php
  30. 3
    2
      sections/store/upload_100GB.php
  31. 3
    2
      sections/store/upload_10GB.php
  32. 3
    2
      sections/store/upload_1GB.php
  33. 1
    1
      sections/tools/development/misc_values.php
  34. 3
    3
      sections/tools/managers/enable_requests.php
  35. 50
    19
      sections/tools/misc/tags.php
  36. 1
    1
      sections/torrents/details.php
  37. 1
    1
      sections/torrents/edit.php
  38. 3
    17
      sections/torrents/editgroup.php
  39. 11
    1
      sections/torrents/functions.php
  40. 2
    1
      sections/torrents/notify.php
  41. 8
    8
      sections/upload/upload_handle.php
  42. 1
    1
      sections/user/invite.php
  43. 4
    4
      sections/user/user.php
  44. 1
    1
      sections/userhistory/email_history_userview.php
  45. 1
    1
      sections/userhistory/ip_history_userview.php
  46. 6
    1
      sections/userhistory/subscribed_collages.php
  47. 1
    1
      sections/userhistory/subscriptions.php
  48. 1
    1
      sections/wiki/article.php
  49. 0
    7
      static/functions/browse.js
  50. 1
    0
      static/functions/comments.js
  51. 11
    1
      static/functions/global.js
  52. 0
    1
      static/functions/reports.js
  53. 4
    0
      static/functions/requests.js
  54. 1
    1
      static/functions/u2f.js
  55. 11
    0
      static/functions/upload.js
  56. 1
    1
      static/functions/validate_upload.js
  57. 13
    9
      static/styles/beluga/style.css
  58. 2
    2
      static/styles/genaviv/style.css
  59. 4
    0
      static/styles/global.css
  60. 5
    6
      static/styles/oppai/style.css

+ 23
- 14
classes/autoenable.class.php View File

11
     const CACHE_KEY_NAME = 'num_enable_requests';
11
     const CACHE_KEY_NAME = 'num_enable_requests';
12
 
12
 
13
     // The default request rejected message
13
     // The default request rejected message
14
-    const REJECTED_MESSAGE = "Your request to re-enable your account has been rejected.<br />This may be because a request is already pending for your username, or because a recent request was denied.<br /><br />You are encouraged to discuss this with staff by visiting %s on %s";
14
+    const REJECTED_MESSAGE = "Your request to re-enable your account has been rejected.<br>This may be because a request is already pending for your username, or because a recent request was denied.<br><br>You are encouraged to discuss this with staff by visiting %s on %s";
15
 
15
 
16
     // The default request received message
16
     // The default request received message
17
-    const RECEIVED_MESSAGE = "Your request to re-enable your account has been received. You can expect a reply message in your email within 48 hours.<br />If you do not receive an email after 48 hours have passed, please visit us on IRC for assistance.";
17
+    const RECEIVED_MESSAGE = "Your request to re-enable your account has been received. Most requests are responded to within minutes. Remember to check your spam.<br>If you do not receive an email after 48 hours have passed, please visit us on IRC for assistance.";
18
 
18
 
19
     /**
19
     /**
20
      * Handle a new enable request
20
      * Handle a new enable request
31
 
31
 
32
         // Get the user's ID
32
         // Get the user's ID
33
         G::$DB->query("
33
         G::$DB->query("
34
-                SELECT um.ID
34
+                SELECT um.ID, ui.BanReason
35
                 FROM users_main AS um
35
                 FROM users_main AS um
36
                 JOIN users_info ui ON ui.UserID = um.ID
36
                 JOIN users_info ui ON ui.UserID = um.ID
37
                 WHERE um.Username = '$Username'
37
                 WHERE um.Username = '$Username'
39
 
39
 
40
         if (G::$DB->has_results()) {
40
         if (G::$DB->has_results()) {
41
             // Make sure the user can make another request
41
             // Make sure the user can make another request
42
-            list($UserID) = G::$DB->next_record();
42
+            list($UserID, $BanReason) = G::$DB->next_record();
43
             G::$DB->query("
43
             G::$DB->query("
44
             SELECT 1 FROM users_enable_requests
44
             SELECT 1 FROM users_enable_requests
45
             WHERE UserID = '$UserID'
45
             WHERE UserID = '$UserID'
51
                     OR
51
                     OR
52
                     (
52
                     (
53
                       Timestamp > NOW() - INTERVAL 2 MONTH
53
                       Timestamp > NOW() - INTERVAL 2 MONTH
54
-                        AND
55
-                          (Outcome = '".self::DENIED."'
56
-                             OR Outcome = '".self::DISCARDED."')
54
+                      AND
55
+                      Outcome = '".self::DENIED."'
57
                     )
56
                     )
58
                   )");
57
                   )");
59
         }
58
         }
75
                 (UserID, Email, IP, UserAgent, Timestamp)
74
                 (UserID, Email, IP, UserAgent, Timestamp)
76
                 VALUES (?, ?, ?, ?, NOW())",
75
                 VALUES (?, ?, ?, ?, NOW())",
77
                 $UserID, Crypto::encrypt($Email), Crypto::encrypt($IP), $UserAgent);
76
                 $UserID, Crypto::encrypt($Email), Crypto::encrypt($IP), $UserAgent);
77
+            $RequestID = G::$DB->inserted_id();
78
 
78
 
79
             // Cache the number of requests for the modbar
79
             // Cache the number of requests for the modbar
80
             G::$Cache->increment_value(self::CACHE_KEY_NAME);
80
             G::$Cache->increment_value(self::CACHE_KEY_NAME);
81
             setcookie('username', '', time() - 60 * 60, '/', '', false);
81
             setcookie('username', '', time() - 60 * 60, '/', '', false);
82
             $Output = self::RECEIVED_MESSAGE;
82
             $Output = self::RECEIVED_MESSAGE;
83
             Tools::update_user_notes($UserID, sqltime() . " - Enable request " . G::$DB->inserted_id() . " received from $IP\n\n");
83
             Tools::update_user_notes($UserID, sqltime() . " - Enable request " . G::$DB->inserted_id() . " received from $IP\n\n");
84
+            if ($BanReason == 3) {
85
+              //self::handle_requests([$RequestID], self::APPROVED, "Automatically approved (inactivity)");
86
+            }
84
         }
87
         }
85
 
88
 
86
         return $Output;
89
         return $Output;
140
                     $Token = db_string(Users::make_secret());
143
                     $Token = db_string(Users::make_secret());
141
                     G::$DB->query("
144
                     G::$DB->query("
142
                         UPDATE users_enable_requests
145
                         UPDATE users_enable_requests
143
-                        SET Token = '$Token'
144
-                        WHERE ID = '$ID'");
146
+                        SET Token = ?
147
+                        WHERE ID = ?", $Token, $ID);
145
                     $TPL->set('TOKEN', $Token);
148
                     $TPL->set('TOKEN', $Token);
146
                 }
149
                 }
147
 
150
 
159
         }
162
         }
160
 
163
 
161
         // User notes stuff
164
         // User notes stuff
165
+        $StaffID = G::$LoggedUser['ID'] ?? 0;
162
         G::$DB->query("
166
         G::$DB->query("
163
             SELECT Username
167
             SELECT Username
164
             FROM users_main
168
             FROM users_main
165
-            WHERE ID = '" . G::$LoggedUser['ID'] . "'");
166
-        list($StaffUser) = G::$DB->next_record();
169
+            WHERE ID = ?", $StaffID);
170
+        if (G::$DB->has_results()) {
171
+          list($StaffUser) = G::$DB->next_record();
172
+        } else {
173
+          $StaffUser = "System";
174
+          $StaffID = 0;
175
+        }
167
 
176
 
168
         foreach ($UserInfo as $User) {
177
         foreach ($UserInfo as $User) {
169
             list($ID, $UserID) = $User;
178
             list($ID, $UserID) = $User;
176
         G::$DB->query("
185
         G::$DB->query("
177
                 UPDATE users_enable_requests
186
                 UPDATE users_enable_requests
178
                 SET HandledTimestamp = NOW(),
187
                 SET HandledTimestamp = NOW(),
179
-                    CheckedBy = '".G::$LoggedUser['ID']."',
180
-                    Outcome = '$Status'
181
-                WHERE ID IN (".implode(',', $IDs).")");
188
+                    CheckedBy = ?,
189
+                    Outcome = ?
190
+                WHERE ID IN (".implode(',', $IDs).")", $StaffID, $Status);
182
         G::$Cache->decrement_value(self::CACHE_KEY_NAME, count($IDs));
191
         G::$Cache->decrement_value(self::CACHE_KEY_NAME, count($IDs));
183
     }
192
     }
184
 
193
 

+ 1
- 3
classes/cache.class.php View File

102
   // Wrapper for Memcache::add, with the zlib option removed and default duration of 30 days
102
   // Wrapper for Memcache::add, with the zlib option removed and default duration of 30 days
103
   public function add_value($Key, $Value, $Duration = 2592000) {
103
   public function add_value($Key, $Value, $Duration = 2592000) {
104
     $StartTime = microtime(true);
104
     $StartTime = microtime(true);
105
-    $AddParams = [$Key, $Value, false, $Duration];
106
-    if (is_subclass_of($this, 'Memcached')) unset($AddParams[2]);
107
-    $Added = $this->add(...$AddParams);
105
+    $Added = $this->add($Key, $Value, 0, $Duration);
108
     $this->Time += (microtime(true) - $StartTime) * 1000;
106
     $this->Time += (microtime(true) - $StartTime) * 1000;
109
     return $Added;
107
     return $Added;
110
   }
108
   }

+ 1
- 1
classes/config.template View File

162
 
162
 
163
 $Media = ['TV', 'DVD', 'Bluray', 'HD DVD', 'VHS', 'VCD', 'LD', 'Web'];
163
 $Media = ['TV', 'DVD', 'Bluray', 'HD DVD', 'VHS', 'VCD', 'LD', 'Web'];
164
 $MediaManga = ['Scan', 'Web'];
164
 $MediaManga = ['Scan', 'Web'];
165
-$Platform = ['Windows', 'OS X', 'Linux', 'Multi-Platform', 'Flash', 'Java', 'Android', 'iOS', '3DS'];
165
+$Platform = ['Windows', 'OS X', 'Linux', 'BSD', 'Flash', 'Java', 'Android', 'iOS', '3DS'];
166
 $Containers = ['AVI', 'MKV', 'MP4', 'OGM', 'WMV', 'ISO', 'VOB IFO', 'TS', 'M2TS'];
166
 $Containers = ['AVI', 'MKV', 'MP4', 'OGM', 'WMV', 'ISO', 'VOB IFO', 'TS', 'M2TS'];
167
 $ContainersGames = ['ISO', 'BIN-CUE', 'Installer', 'Loose'];
167
 $ContainersGames = ['ISO', 'BIN-CUE', 'Installer', 'Loose'];
168
 $Codecs = ['h264', '10-bit h264', 'XviD', 'DivX', 'WMV', 'DVD5', 'DVD9', 'HEVC', 'MPEG-2'];
168
 $Codecs = ['h264', '10-bit h264', 'XviD', 'DivX', 'WMV', 'DVD5', 'DVD9', 'HEVC', 'MPEG-2'];

+ 1
- 1
classes/debug.class.php View File

139
     $Return = [];
139
     $Return = [];
140
     foreach ($Array as $Key => $Val) {
140
     foreach ($Array as $Key => $Val) {
141
       $Return[$Key] = '';
141
       $Return[$Key] = '';
142
-      if (!is_int($Key) || $Key != $LastKey + 1) {
142
+      if (!is_int($Key) || !is_int($LastKey) || $Key != $LastKey + 1) {
143
         $Return[$Key] .= "'$Key' => ";
143
         $Return[$Key] .= "'$Key' => ";
144
       }
144
       }
145
         if ($Val === true) {
145
         if ($Val === true) {

+ 6
- 6
classes/torrent_form.class.php View File

274
         <td><input type="text" id="dlsiteid" name="dlsiteid" size="8" maxlength="8" value="<?=display_str($Torrent['DLsiteID']??'')?>" <?=$this->Disabled?>/></td>
274
         <td><input type="text" id="dlsiteid" name="dlsiteid" size="8" maxlength="8" value="<?=display_str($Torrent['DLsiteID']??'')?>" <?=$this->Disabled?>/></td>
275
       </tr>
275
       </tr>
276
 <? } ?>
276
 <? } ?>
277
+      <tr id="mediainfo_tr">
278
+        <td class="label">Media Info</td>
279
+        <td>
280
+          <textarea name="mediainfo" id="mediainfo" onchange="MediaInfoExtract()"  rows="8" cols="60"><?=display_str($Torrent['MediaInfo']??'')?></textarea>
281
+        </td>
282
+      </tr>
277
       <tr id="media_tr">
283
       <tr id="media_tr">
278
         <td class="label">Media</td>
284
         <td class="label">Media</td>
279
         <td>
285
         <td>
496
           <input type="checkbox" name="censored" value="1" <?=(($Torrent['Censored'] ?? 1) ? 'checked ' : '')?>/>
502
           <input type="checkbox" name="censored" value="1" <?=(($Torrent['Censored'] ?? 1) ? 'checked ' : '')?>/>
497
         </td>
503
         </td>
498
       </tr>
504
       </tr>
499
-      <tr id="mediainfo_tr">
500
-        <td class="label">Media Info</td>
501
-        <td>
502
-          <textarea name="mediainfo" id="mediainfo" onchange="MediaInfoExtract()"  rows="8" cols="60"><?=display_str($Torrent['MediaInfo']??'')?></textarea>
503
-        </td>
504
-      </tr>
505
 <?    if ($this->NewTorrent) { ?>
505
 <?    if ($this->NewTorrent) { ?>
506
       <tr id="tags_tr">
506
       <tr id="tags_tr">
507
         <td class="label tooltip" title="Comma seperated list of tags">Tags</td>
507
         <td class="label tooltip" title="Comma seperated list of tags">Tags</td>

+ 1
- 1
gazelle.sql View File

730
 CREATE TABLE `requests_artists` (
730
 CREATE TABLE `requests_artists` (
731
   `RequestID` int(10) unsigned NOT NULL,
731
   `RequestID` int(10) unsigned NOT NULL,
732
   `ArtistID` int(10) NOT NULL,
732
   `ArtistID` int(10) NOT NULL,
733
-  PRIMARY KEY (`RequestID`)
733
+  PRIMARY KEY (`RequestID`, `ArtistID`)
734
 ) ENGINE=InnoDB CHARSET=utf8mb4;
734
 ) ENGINE=InnoDB CHARSET=utf8mb4;
735
 
735
 
736
 CREATE TABLE `requests_tags` (
736
 CREATE TABLE `requests_tags` (

+ 11
- 3
sections/ajax/autofill/manga.php View File

23
   $data = json_encode(["method" => "gdata", "gidlist" => [[$gid, $token]], "namespace" => 1]);
23
   $data = json_encode(["method" => "gdata", "gidlist" => [[$gid, $token]], "namespace" => 1]);
24
   $curl = curl_init('http://api.e-hentai.org/api.php');
24
   $curl = curl_init('http://api.e-hentai.org/api.php');
25
   curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
25
   curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
26
+  curl_setopt($curl, CURLOPT_TIMEOUT, 10);
26
   curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
27
   curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
27
   curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
28
   curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
28
   curl_setopt($curl, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'Content-Length: '.strlen($data)]);
29
   curl_setopt($curl, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'Content-Length: '.strlen($data)]);
76
     }
77
     }
77
   }
78
   }
78
 
79
 
80
+  $title = html_entity_decode($json['title'], ENT_QUOTES);
81
+  $title = preg_replace("/\(([^()]*+|(?R))*\)/","", $title);
82
+  $title = trim(preg_replace("/\[([^\[\]]*+|(?R))*\]/","", $title));
83
+  $title_jp = html_entity_decode($json['title_jpn'], ENT_QUOTES);
84
+  $title_jp = preg_replace("/\(([^()]*+|(?R))*\)/","", $title_jp);
85
+  $title_jp = trim(preg_replace("/\[([^\[\]]*+|(?R))*\]/","", $title_jp));
86
+
79
   $json_str = [
87
   $json_str = [
80
     'id'          => $gid,
88
     'id'          => $gid,
81
-    'title'       => html_entity_decode($json['title'], ENT_QUOTES),
82
-    'title_jp'    => html_entity_decode($json['title_jpn'], ENT_QUOTES),
89
+    'title'       => $title,
90
+    'title_jp'    => $title_jp,
83
     'artists'     => $artists,
91
     'artists'     => $artists,
84
     'circle'      => $circle,
92
     'circle'      => $circle,
85
     'censored'    => $censored,
93
     'censored'    => $censored,
86
     'year'        => NULL,
94
     'year'        => NULL,
87
     'tags'        => $tags,
95
     'tags'        => $tags,
88
-    'lang'        => $lang??'Japanese',
96
+    'lang'        => $lang ?? 'Japanese',
89
     'pages'       => $json['filecount'],
97
     'pages'       => $json['filecount'],
90
     'description' => '',
98
     'description' => '',
91
     'cover'       => $cover
99
     'cover'       => $cover

+ 8
- 6
sections/bookmarks/torrents.php View File

210
 
210
 
211
 $CollageCovers = isset($LoggedUser['CollageCovers']) ? (int)$LoggedUser['CollageCovers'] : 10;
211
 $CollageCovers = isset($LoggedUser['CollageCovers']) ? (int)$LoggedUser['CollageCovers'] : 10;
212
 $CollagePages = [];
212
 $CollagePages = [];
213
-for ($i = 0; $i < $NumGroups / $CollageCovers; $i++) {
214
-  $Groups = array_slice($Collage, $i * $CollageCovers, $CollageCovers);
215
-  $CollagePage = '';
216
-  foreach ($Groups as $Group) {
217
-    $CollagePage .= $Group;
213
+if ($CollageCovers > 0) {
214
+  for ($i = 0; $i < $NumGroups / $CollageCovers; $i++) {
215
+    $Groups = array_slice($Collage, $i * $CollageCovers, $CollageCovers);
216
+    $CollagePage = '';
217
+    foreach ($Groups as $Group) {
218
+      $CollagePage .= $Group;
219
+    }
220
+    $CollagePages[] = $CollagePage;
218
   }
221
   }
219
-  $CollagePages[] = $CollagePage;
220
 }
222
 }
221
 
223
 
222
 View::show_header($Title, 'browse,collage,wall');
224
 View::show_header($Title, 'browse,collage,wall');

+ 4
- 4
sections/collages/edit.php View File

17
   error(403);
17
   error(403);
18
 }
18
 }
19
 
19
 
20
-View::show_header('Edit collection');
20
+View::show_header('Edit collection', 'bbcode');
21
 
21
 
22
 if (!empty($Err)) {
22
 if (!empty($Err)) {
23
   if (isset($ErrNoEscape)) {
23
   if (isset($ErrNoEscape)) {
24
-    echo '<div class="save_message error">'.$Err.'</div>';
24
+    echo '<div class="box save_message error">'.$Err.'</div>';
25
   } else {
25
   } else {
26
-    echo '<div class="save_message error">'.display_str($Err).'</div>';
26
+    echo '<div class="box save_message error">'.display_str($Err).'</div>';
27
   }
27
   }
28
 }
28
 }
29
 ?>
29
 ?>
65
       <tr>
65
       <tr>
66
         <td class="label">Description</td>
66
         <td class="label">Description</td>
67
         <td>
67
         <td>
68
-          <textarea name="description" id="description" cols="60" rows="10"><?=$Description?></textarea>
68
+          <textarea class="bbcode_editor" name="description" id="description" cols="60" rows="10"><?=$Description?></textarea>
69
         </td>
69
         </td>
70
       </tr>
70
       </tr>
71
       <tr>
71
       <tr>

+ 2
- 2
sections/collages/new.php View File

1
 <?
1
 <?
2
-View::show_header('Create a collection');
2
+View::show_header('Create a collection', 'bbcode');
3
 
3
 
4
 if (!check_perms('site_collages_renamepersonal')) {
4
 if (!check_perms('site_collages_renamepersonal')) {
5
   $ChangeJS = " onchange=\"if ( this.options[this.selectedIndex].value == '0') { $('#namebox').ghide(); $('#personal').gshow(); } else { $('#namebox').gshow(); $('#personal').ghide(); }\"";
5
   $ChangeJS = " onchange=\"if ( this.options[this.selectedIndex].value == '0') { $('#namebox').ghide(); $('#personal').gshow(); } else { $('#namebox').gshow(); $('#personal').ghide(); }\"";
66
       <tr>
66
       <tr>
67
         <td class="label">Description</td>
67
         <td class="label">Description</td>
68
         <td>
68
         <td>
69
-          <textarea name="description" id="description" cols="60" rows="10"><?=display_str($Description)?></textarea>
69
+          <textarea class="bbcode_editor" name="description" id="description" cols="60" rows="10"><?=display_str($Description)?></textarea>
70
         </td>
70
         </td>
71
       </tr>
71
       </tr>
72
       <tr>
72
       <tr>

+ 8
- 6
sections/collages/torrent_collage.php View File

236
 $CollageCovers = isset($LoggedUser['CollageCovers']) ? $LoggedUser['CollageCovers'] : 25 * (abs($LoggedUser['HideCollage'] - 1));
236
 $CollageCovers = isset($LoggedUser['CollageCovers']) ? $LoggedUser['CollageCovers'] : 25 * (abs($LoggedUser['HideCollage'] - 1));
237
 $CollagePages = [];
237
 $CollagePages = [];
238
 
238
 
239
-for ($i = 0; $i < $NumGroups / $CollageCovers; $i++) {
240
-  $Groups = array_slice($Collage, $i * $CollageCovers, $CollageCovers);
241
-  $CollagePage = '';
242
-  foreach ($Groups as $Group) {
243
-    $CollagePage .= $Group;
239
+if ($CollageCovers) {
240
+  for ($i = 0; $i < $NumGroups / $CollageCovers; $i++) {
241
+    $Groups = array_slice($Collage, $i * $CollageCovers, $CollageCovers);
242
+    $CollagePage = '';
243
+    foreach ($Groups as $Group) {
244
+      $CollagePage .= $Group;
245
+    }
246
+    $CollagePages[] = $CollagePage;
244
   }
247
   }
245
-  $CollagePages[] = $CollagePage;
246
 }
248
 }
247
 
249
 
248
 View::show_header($Name, 'browse,collage,bbcode,recommend,wall');
250
 View::show_header($Name, 'browse,collage,bbcode,recommend,wall');

+ 1
- 1
sections/forums/forum.php View File

152
 echo $Pages;
152
 echo $Pages;
153
 ?>
153
 ?>
154
   </div>
154
   </div>
155
-  <table class="forum_index" width="100%">
155
+  <table class="forum_index alternate_rows" width="100%">
156
     <tr class="colhead">
156
     <tr class="colhead">
157
       <td style="width: 2%;"></td>
157
       <td style="width: 2%;"></td>
158
       <td>Latest</td>
158
       <td>Latest</td>

+ 1
- 1
sections/forums/main.php View File

23
   </table>
23
   </table>
24
 <? } ?>
24
 <? } ?>
25
 <h3><?=$ForumCats[$CategoryID]?></h3>
25
 <h3><?=$ForumCats[$CategoryID]?></h3>
26
-  <table class="forum_index">
26
+  <table class="forum_index alternate_rows">
27
     <tr class="colhead">
27
     <tr class="colhead">
28
       <td style="width: 2%;"></td>
28
       <td style="width: 2%;"></td>
29
       <td style="max-width: 25%;">Forum</td>
29
       <td style="max-width: 25%;">Forum</td>

+ 10
- 10
sections/login/disabled.php View File

9
     $Output = "Please enter a valid email address.";
9
     $Output = "Please enter a valid email address.";
10
   }
10
   }
11
 
11
 
12
-  $Output .= "<br /><br /><a href='login.php?action=disabled'>Back</a>";
12
+  $Output .= "<br><br><a href='login.php?action=disabled'>Back</a>";
13
 }
13
 }
14
 
14
 
15
 if ((empty($_POST['submit']) || empty($_POST['username'])) && !isset($Output)) {
15
 if ((empty($_POST['submit']) || empty($_POST['username'])) && !isset($Output)) {
16
 ?>
16
 ?>
17
 <p class="warning">
17
 <p class="warning">
18
-Your account has been disabled.<br />
19
-This is either due to inactivity or rule violation(s).<br /><br /></p>
18
+Your account has been disabled.<br>
19
+This is either due to inactivity or rule violation(s).<br><br></p>
20
 <? if (FEATURE_EMAIL_REENABLE) { ?>
20
 <? if (FEATURE_EMAIL_REENABLE) { ?>
21
-If you believe your account was in good standing and was disabled for inactivity, you may request it be re-enabled via email using the form below.<br />
22
-Please note that you will need access to the email account associated with your account at <?=SITE_NAME?> for this to work;<br />
23
-if you do not, please see the section after this form.<br /><br />
21
+If you believe your account was in good standing and was disabled for inactivity, you may request it be re-enabled via email using the form below.<br>
22
+Please use an email service that actually delivers mail. Outlook/Hotmail is known not to.<br>
23
+Most requests are handled within minutes. If a day or two goes by without a response, try again with a different email or try asking in IRC.<br><br>
24
 <form action="" method="POST">
24
 <form action="" method="POST">
25
   <input type="email" class="inputtext" placeholder="Email Address" name="email" required /> <input type="submit" value="Submit" />
25
   <input type="email" class="inputtext" placeholder="Email Address" name="email" required /> <input type="submit" value="Submit" />
26
   <input type="hidden" name="username" value="<?=$_COOKIE['username']?>" />
26
   <input type="hidden" name="username" value="<?=$_COOKIE['username']?>" />
27
 </form><br /><br />
27
 </form><br /><br />
28
 <? } ?>
28
 <? } ?>
29
-If you are unsure why your account is disabled, or you wish to discuss this with staff, come to our IRC network at: <?=BOT_SERVER?><br />
30
-And join <?=BOT_DISABLED_CHAN?><br /><br />
31
-<strong>Be honest.</strong> At this point, lying will get you nowhere.<br /><br /><br />
29
+If you are unsure why your account is disabled, or you wish to discuss this with staff, come to our IRC network at: <?=BOT_SERVER?><br>
30
+And join <?=BOT_DISABLED_CHAN?><br><br>
31
+<strong>Be honest.</strong> At this point, lying will get you nowhere.<br /><br><br>
32
 </p>
32
 </p>
33
 
33
 
34
-<strong>Before joining the disabled channel, please read our <br /> <span style="color: gold;">Golden Rules</span> which can be found <a style="color: #1464F4;" href="#" onclick="toggle_visibility('golden_rules')">here</a>.</strong> <br /><br />
34
+<strong>Before joining the disabled channel, please read our <br> <span>Golden Rules</span> which can be found <a style="color: #1464F4;" href="#" onclick="toggle_visibility('golden_rules')">here</a>.</strong> <br><br>
35
 
35
 
36
 <script type="text/javascript">
36
 <script type="text/javascript">
37
 function toggle_visibility(id) {
37
 function toggle_visibility(id) {

+ 0
- 1
sections/login/login.php View File

1
 <? View::show_header('Login'); ?>
1
 <? View::show_header('Login'); ?>
2
   <span id="no-cookies" class="hidden warning">You appear to have cookies disabled.<br /><br /></span>
2
   <span id="no-cookies" class="hidden warning">You appear to have cookies disabled.<br /><br /></span>
3
-  <noscript><span class="warning"><?=SITE_NAME?> requires JavaScript to function properly. Please enable JavaScript in your browser.</span><br /><br /></noscript>
4
 <?
3
 <?
5
 if (!$Banned) {
4
 if (!$Banned) {
6
 ?>
5
 ?>

+ 4
- 5
sections/reports/ajax_add_notes.php View File

1
 <?php
1
 <?php
2
 
2
 
3
-if (!check_perms('site_moderate_forums') || empty($_POST['id'])) {
3
+if (!check_perms('admin_reports') || empty($_POST['id'])) {
4
   print
4
   print
5
     json_encode(
5
     json_encode(
6
       array(
6
       array(
12
 
12
 
13
 $ID = (int)$_POST['id'];
13
 $ID = (int)$_POST['id'];
14
 
14
 
15
-$Notes = str_replace("<br />", "\n", $_POST['notes']);
16
-$Notes = db_string($Notes);
15
+$Notes = $_POST['notes'];
17
 
16
 
18
 $DB->query("
17
 $DB->query("
19
   UPDATE reports
18
   UPDATE reports
20
-  SET Notes = '$Notes'
21
-  WHERE ID = '$ID'");
19
+  SET Notes = ?
20
+  WHERE ID = ?", $Notes, $ID);
22
 print
21
 print
23
   json_encode(
22
   json_encode(
24
     array(
23
     array(

+ 9
- 9
sections/reports/compose.php View File

1
 <?
1
 <?
2
-if (!check_perms('site_moderate_forums')) {
2
+if (!check_perms('admin_reports')) {
3
   error(403);
3
   error(403);
4
 }
4
 }
5
 
5
 
30
 $DB->query("
30
 $DB->query("
31
   SELECT Username
31
   SELECT Username
32
   FROM users_main
32
   FROM users_main
33
-  WHERE ID = '$ToID'");
33
+  WHERE ID = ?", $ToID);
34
 list($ComposeToUsername) = $DB->next_record();
34
 list($ComposeToUsername) = $DB->next_record();
35
 if (!$ComposeToUsername) {
35
 if (!$ComposeToUsername) {
36
   error(404);
36
   error(404);
43
     $DB->query("
43
     $DB->query("
44
       SELECT Username
44
       SELECT Username
45
       FROM users_main
45
       FROM users_main
46
-      WHERE ID = $ThingID");
46
+      WHERE ID = ?", $ThingID);
47
     if (!$DB->has_results()) {
47
     if (!$DB->has_results()) {
48
       $Error = 'No user with the reported ID found';
48
       $Error = 'No user with the reported ID found';
49
     } else {
49
     } else {
57
     $DB->query("
57
     $DB->query("
58
       SELECT Title
58
       SELECT Title
59
       FROM requests
59
       FROM requests
60
-      WHERE ID = $ThingID");
60
+      WHERE ID = ?", $ThingID);
61
     if (!$DB->has_results()) {
61
     if (!$DB->has_results()) {
62
       $Error = 'No request with the reported ID found';
62
       $Error = 'No request with the reported ID found';
63
     } else {
63
     } else {
70
     $DB->query("
70
     $DB->query("
71
       SELECT Name
71
       SELECT Name
72
       FROM collages
72
       FROM collages
73
-      WHERE ID = $ThingID");
73
+      WHERE ID = ?", $ThingID);
74
     if (!$DB->has_results()) {
74
     if (!$DB->has_results()) {
75
       $Error = 'No collage with the reported ID found';
75
       $Error = 'No collage with the reported ID found';
76
     } else {
76
     } else {
83
     $DB->query("
83
     $DB->query("
84
       SELECT Title
84
       SELECT Title
85
       FROM forums_topics
85
       FROM forums_topics
86
-      WHERE ID = $ThingID");
86
+      WHERE ID = ?", $ThingID);
87
     if (!$DB->has_results()) {
87
     if (!$DB->has_results()) {
88
       $Error = 'No forum thread with the reported ID found';
88
       $Error = 'No forum thread with the reported ID found';
89
     } else {
89
     } else {
110
             AND p2.ID <= p.ID
110
             AND p2.ID <= p.ID
111
         ) AS PostNum
111
         ) AS PostNum
112
       FROM forums_posts AS p
112
       FROM forums_posts AS p
113
-      WHERE p.ID = $ThingID");
113
+      WHERE p.ID = ?", $ThingID);
114
     if (!$DB->has_results()) {
114
     if (!$DB->has_results()) {
115
       $Error = 'No forum post with the reported ID found';
115
       $Error = 'No forum post with the reported ID found';
116
     } else {
116
     } else {
123
     $DB->query("
123
     $DB->query("
124
       SELECT 1
124
       SELECT 1
125
       FROM comments
125
       FROM comments
126
-      WHERE ID = $ThingID");
126
+      WHERE ID = ?", $ThingID);
127
     if (!$DB->has_results()) {
127
     if (!$DB->has_results()) {
128
       $Error = 'No comment with the reported ID found';
128
       $Error = 'No comment with the reported ID found';
129
     } else {
129
     } else {
142
 $DB->query("
142
 $DB->query("
143
   SELECT Reason
143
   SELECT Reason
144
   FROM reports
144
   FROM reports
145
-  WHERE ID = $ReportID");
145
+  WHERE ID = ?", $ReportID);
146
 list($Reason) = $DB->next_record();
146
 list($Reason) = $DB->next_record();
147
 
147
 
148
 $Body = "You reported $TypeLink for the reason:\n[quote]{$Reason}[/quote]";
148
 $Body = "You reported $TypeLink for the reason:\n[quote]{$Reason}[/quote]";

+ 4
- 4
sections/reportsv2/report.php View File

32
   }
32
   }
33
 
33
 
34
   // Group details
34
   // Group details
35
-  list($WikiBody, $WikiImage, $GroupID, $GroupName, $GroupNameJP, $GroupYear,
36
-    $GroupStudio, $GroupSeries, $GroupCatalogueNumber, $GroupCategoryID,
37
-    $GroupDLSite, $GroupTime, $TorrentTags, $TorrentTagIDs, $TorrentTagUserIDs,
38
-    $Screenshots, $GroupFlags) = array_values($GroupDetails);
35
+  list($WikiBody, $WikiImage, $GroupID, $GroupName, $GroupNameRJ, $GroupNameJP,
36
+    $GroupYear, $GroupStudio, $GroupSeries, $GroupCatalogueNumber,
37
+    $GroupCategoryID, $GroupDLSite, $GroupTime, $TorrentTags, $TorrentTagIDs,
38
+    $TorrentTagUserIDs, $Screenshots, $GroupFlags) = array_values($GroupDetails);
39
 
39
 
40
   $DisplayName = $GroupName;
40
   $DisplayName = $GroupName;
41
   $AltName = $GroupName; // Goes in the alt text of the image
41
   $AltName = $GroupName; // Goes in the alt text of the image

+ 1
- 1
sections/requests/new_edit.php View File

158
 <?
158
 <?
159
       }
159
       }
160
     } else {
160
     } else {
161
-?>            <input type="text" id="artist_0" name="artists[]"<? Users::has_autocomplete_enabled('other'); ?> size="45" onblur="CheckVA();" <?=$Disabled?>/>
161
+?>            <input type="text" id="artist_0" name="artists[]"<? Users::has_autocomplete_enabled('other'); ?> size="45" <?=$Disabled?>/>
162
 <? if (empty($Disabled)) { ?>
162
 <? if (empty($Disabled)) { ?>
163
             <a class="add_artist_button brackets">+</a> <a class="remove_artist_button brackets">&minus;</a>
163
             <a class="add_artist_button brackets">+</a> <a class="remove_artist_button brackets">&minus;</a>
164
 <? } ?>
164
 <? } ?>

+ 2
- 2
sections/requests/take_new_edit.php View File

252
     UPDATE requests
252
     UPDATE requests
253
     SET CategoryID = $CategoryID,
253
     SET CategoryID = $CategoryID,
254
       Title = '".db_string($Title)."',
254
       Title = '".db_string($Title)."',
255
-      TitleRJ = '".db_string($TitleRJ)."',
256
-      TitleJP = '".db_string($TitleJP)."',
255
+      TitleRJ = '".db_string($TitleRJ??"")."',
256
+      TitleJP = '".db_string($TitleJP??"")."',
257
       Image = '".db_string($Image)."',
257
       Image = '".db_string($Image)."',
258
       Description = '".db_string($Description)."',
258
       Description = '".db_string($Description)."',
259
       CatalogueNumber = '".db_string($CatalogueNumber)."',
259
       CatalogueNumber = '".db_string($CatalogueNumber)."',

+ 1
- 2
sections/rules/upload.php View File

394
             <li id="r5.1.2"><a href="#5.1"><strong>&uarr;</strong></a> <a href="#5.1.2">5.1.2.</a>
394
             <li id="r5.1.2"><a href="#5.1"><strong>&uarr;</strong></a> <a href="#5.1.2">5.1.2.</a>
395
               <strong>Some examples of acceptable content are:</strong>
395
               <strong>Some examples of acceptable content are:</strong>
396
               <ul>
396
               <ul>
397
-                <li>Erotic Audio</li>
398
                 <li>Official Image Packs</li>
397
                 <li>Official Image Packs</li>
399
                 <li>Sex Manuals</li>
398
                 <li>Sex Manuals</li>
400
               </ul>
399
               </ul>
405
           </ul>
404
           </ul>
406
         </div>
405
         </div>
407
 
406
 
408
-      <h5 id="h5.3"><a href="#h5.3k"><strong>&uarr;</strong></a> <a href="#h5.3">5.3.</a> Duplicates &amp; Trumping</h5>
407
+      <h5 id="h5.2"><a href="#h5.2k"><strong>&uarr;</strong></a> <a href="#h5.2">5.2.</a> Duplicates &amp; Trumping</h5>
409
         <div class="box pad" style="padding: 10px 10px 10px 20px;">
408
         <div class="box pad" style="padding: 10px 10px 10px 20px;">
410
           <ul>
409
           <ul>
411
             <li id="r5.2.1"><a href="#5.2"><strong>&uarr;</strong></a> <a href="#5.2.1">5.2.1.</a>
410
             <li id="r5.2.1"><a href="#5.2"><strong>&uarr;</strong></a> <a href="#5.2.1">5.2.1.</a>

+ 8
- 4
sections/schedule/hourly/bonus_points.php View File

3
 
3
 
4
 $getUsers = $DB->query("
4
 $getUsers = $DB->query("
5
   SELECT um.ID,
5
   SELECT um.ID,
6
+         um.BonusPoints,
6
          COUNT(DISTINCT x.fid) AS Torrents,
7
          COUNT(DISTINCT x.fid) AS Torrents,
7
          SUM(t.Size) AS Size,
8
          SUM(t.Size) AS Size,
8
          SUM(xs.seedtime) AS Seedtime,
9
          SUM(xs.seedtime) AS Seedtime,
21
   GROUP BY um.ID");
22
   GROUP BY um.ID");
22
 if ($DB->has_results()) {
23
 if ($DB->has_results()) {
23
   $QueryPart = '';
24
   $QueryPart = '';
24
-  while (list($UserID, $NumTorr, $TSize, $TTime, $TSeeds) = $DB->next_record()) {
25
-    $Points = intval((0.5 + (0.55*($NumTorr * (sqrt(($TSize/$NumTorr)/1073741824) * pow(1.5,($TTime/$NumTorr)/(24*365))))) / (max(1, sqrt(($TSeeds/$NumTorr)+4)/3)))**0.95);
25
+  while (list($UserID, $BonusPoints, $NumTorr, $TSize, $TTime, $TSeeds) = $DB->next_record()) {
26
+    $Points = (0.5 + (0.55*($NumTorr * (sqrt(($TSize/$NumTorr)/1073741824) * pow(1.5,($TTime/$NumTorr)/(24*365))))) / (max(1, sqrt(($TSeeds/$NumTorr)+4)/3)))**0.95;
27
+    $Points = intval(max(min($Points, ($Points * 2) - ($BonusPoints/1440)), 0));
26
     if ($Points > 100000) $Points = 0;
28
     if ($Points > 100000) $Points = 0;
27
-    $QueryPart .= "WHEN $UserID THEN BonusPoints+$Points ";
28
-    $Cache->delete_value('user_info_heavy_'.$UserID);
29
+    if ($Points > 0) {
30
+      $QueryPart .= "WHEN $UserID THEN BonusPoints+$Points ";
31
+      $Cache->delete_value('user_info_heavy_'.$UserID);
32
+    }
29
   }
33
   }
30
 
34
 
31
   $DB->query("
35
   $DB->query("

+ 1
- 1
sections/schedule/index.php View File

27
   }
27
   }
28
 }
28
 }
29
 
29
 
30
-if ((!isset($_REQUEST['key']) || $_REQUEST['key'] != SCHEDULE_KEY) && !$AS) {
30
+if ((!isset($_REQUEST['key']) || $_REQUEST['key'] != SCHEDULE_KEY) && (!isset($argv[1]) || $argv[1] != SCHEDULE_KEY) && !$AS) {
31
   error(403);
31
   error(403);
32
 }
32
 }
33
 
33
 

+ 5
- 2
sections/store/100k_points.php View File

2
 $Purchase = "100,000 bonus points";
2
 $Purchase = "100,000 bonus points";
3
 $UserID = $LoggedUser['ID'];
3
 $UserID = $LoggedUser['ID'];
4
 
4
 
5
+$GiB = 1024 * 1024 * 1024;
6
+$Cost = 130 * $GiB;
7
+
5
 $DB->query("
8
 $DB->query("
6
   SELECT Uploaded
9
   SELECT Uploaded
7
   FROM users_main
10
   FROM users_main
9
 if ($DB->has_results()) {
12
 if ($DB->has_results()) {
10
   list($Upload) = $DB->next_record();
13
   list($Upload) = $DB->next_record();
11
 
14
 
12
-  if ($Upload >= 107374182400) {
15
+  if ($Upload >= $Cost) {
13
     $DB->query("
16
     $DB->query("
14
       UPDATE users_main
17
       UPDATE users_main
15
       SET BonusPoints = BonusPoints + 100000,
18
       SET BonusPoints = BonusPoints + 100000,
16
-          Uploaded    = Uploaded - 107374182400
19
+          Uploaded    = Uploaded - $Cost
17
       WHERE ID = $UserID");
20
       WHERE ID = $UserID");
18
     $DB->query("
21
     $DB->query("
19
       UPDATE users_info
22
       UPDATE users_info

+ 5
- 2
sections/store/10k_points.php View File

2
 $Purchase = "10,000 bonus points";
2
 $Purchase = "10,000 bonus points";
3
 $UserID = $LoggedUser['ID'];
3
 $UserID = $LoggedUser['ID'];
4
 
4
 
5
+$GiB = 1024 * 1024 * 1024;
6
+$Cost = 13 * $GiB;
7
+
5
 $DB->query("
8
 $DB->query("
6
   SELECT Uploaded
9
   SELECT Uploaded
7
   FROM users_main
10
   FROM users_main
9
 if ($DB->has_results()) {
12
 if ($DB->has_results()) {
10
   list($Upload) = $DB->next_record();
13
   list($Upload) = $DB->next_record();
11
 
14
 
12
-  if ($Upload >= 10737418240) {
15
+  if ($Upload >= $Cost) {
13
     $DB->query("
16
     $DB->query("
14
       UPDATE users_main
17
       UPDATE users_main
15
       SET BonusPoints = BonusPoints + 10000,
18
       SET BonusPoints = BonusPoints + 10000,
16
-          Uploaded    = Uploaded - 10737418240
19
+          Uploaded    = Uploaded - $Cost
17
       WHERE ID = $UserID");
20
       WHERE ID = $UserID");
18
     $DB->query("
21
     $DB->query("
19
       UPDATE users_info
22
       UPDATE users_info

+ 5
- 2
sections/store/1k_points.php View File

2
 $Purchase = "1,000 bonus points";
2
 $Purchase = "1,000 bonus points";
3
 $UserID = $LoggedUser['ID'];
3
 $UserID = $LoggedUser['ID'];
4
 
4
 
5
+$GiB = 1024 * 1024 * 1024;
6
+$Cost = intval(1.3 * $GiB);
7
+
5
 $DB->query("
8
 $DB->query("
6
   SELECT Uploaded
9
   SELECT Uploaded
7
   FROM users_main
10
   FROM users_main
9
 if ($DB->has_results()) {
12
 if ($DB->has_results()) {
10
   list($Upload) = $DB->next_record();
13
   list($Upload) = $DB->next_record();
11
 
14
 
12
-  if ($Upload >= 1073741824) {
15
+  if ($Upload >= $Cost) {
13
     $DB->query("
16
     $DB->query("
14
       UPDATE users_main
17
       UPDATE users_main
15
       SET BonusPoints = BonusPoints + 1000,
18
       SET BonusPoints = BonusPoints + 1000,
16
-          Uploaded    = Uploaded - 1073741824
19
+          Uploaded    = Uploaded - $Cost
17
       WHERE ID = $UserID");
20
       WHERE ID = $UserID");
18
     $DB->query("
21
     $DB->query("
19
       UPDATE users_info
22
       UPDATE users_info

+ 3
- 2
sections/store/1m_points.php View File

3
 $UserID = $LoggedUser['ID'];
3
 $UserID = $LoggedUser['ID'];
4
 
4
 
5
 $GiB = 1024*1024*1024;
5
 $GiB = 1024*1024*1024;
6
+$Cost = 1300 * $GiB;
6
 
7
 
7
 $DB->query("
8
 $DB->query("
8
   SELECT Uploaded
9
   SELECT Uploaded
11
 if ($DB->has_results()) {
12
 if ($DB->has_results()) {
12
   list($Upload) = $DB->next_record();
13
   list($Upload) = $DB->next_record();
13
 
14
 
14
-  if ($Upload >= 1000*$GiB) {
15
+  if ($Upload >= $Cost) {
15
     $DB->query("
16
     $DB->query("
16
       UPDATE users_main
17
       UPDATE users_main
17
       SET BonusPoints = BonusPoints + 1000000,
18
       SET BonusPoints = BonusPoints + 1000000,
18
-          Uploaded    = Uploaded - ".(1000*$GiB)."
19
+          Uploaded    = Uploaded - $Cost
19
       WHERE ID = $UserID");
20
       WHERE ID = $UserID");
20
     $DB->query("
21
     $DB->query("
21
       UPDATE users_info
22
       UPDATE users_info

+ 14
- 13
sections/store/store.php View File

3
 $PermID = $LoggedUser['PermissionID'];
3
 $PermID = $LoggedUser['PermissionID'];
4
 
4
 
5
 if (!$LoggedUser['DisablePoints']) {
5
 if (!$LoggedUser['DisablePoints']) {
6
-  $PointsRate = 0.5;
6
+  $PointsRate = 0;
7
   $getTorrents = $DB->query("
7
   $getTorrents = $DB->query("
8
-    SELECT COUNT(DISTINCT x.fid) AS Torrents,
8
+    SELECT um.BonusPoints,
9
+           COUNT(DISTINCT x.fid) AS Torrents,
9
            SUM(t.Size) AS Size,
10
            SUM(t.Size) AS Size,
10
            SUM(xs.seedtime) AS Seedtime,
11
            SUM(xs.seedtime) AS Seedtime,
11
            SUM(t.Seeders) AS Seeders
12
            SUM(t.Seeders) AS Seeders
22
       AND x.Remaining = 0
23
       AND x.Remaining = 0
23
     GROUP BY um.ID", $UserID);
24
     GROUP BY um.ID", $UserID);
24
   if ($DB->has_results()) {
25
   if ($DB->has_results()) {
25
-    list($NumTorr, $TSize, $TTime, $TSeeds) = $DB->next_record();
26
-    $PointsRate += (0.55*($NumTorr * (sqrt(($TSize/$NumTorr)/1073741824) * pow(1.5,($TTime/$NumTorr)/(24*365))))) / (max(1, sqrt(($TSeeds/$NumTorr)+4)/3));
26
+    list($BonusPoints, $NumTorr, $TSize, $TTime, $TSeeds) = $DB->next_record();
27
+    $PointsRate = (0.5 + (0.55*($NumTorr * (sqrt(($TSize/$NumTorr)/1073741824) * pow(1.5,($TTime/$NumTorr)/(24*365))))) / (max(1, sqrt(($TSeeds/$NumTorr)+4)/3)))**0.95;
27
   }
28
   }
28
-  $PointsRate = intval($PointsRate**0.95);
29
+  $PointsRate = intval(max(min($PointsRate, ($PointsRate * 2) - ($BonusPoints/1440)), 0));
29
   $PointsPerHour = number_format($PointsRate) . " ".BONUS_POINTS."/hour";
30
   $PointsPerHour = number_format($PointsRate) . " ".BONUS_POINTS."/hour";
30
   $PointsPerDay = number_format($PointsRate*24) . " ".BONUS_POINTS."/day";
31
   $PointsPerDay = number_format($PointsRate*24) . " ".BONUS_POINTS."/day";
31
 } else {
32
 } else {
52
           <a href="store.php?item=upload_1GB">1GiB Upload</a>
53
           <a href="store.php?item=upload_1GB">1GiB Upload</a>
53
         </td>
54
         </td>
54
         <td class="nobr">
55
         <td class="nobr">
55
-          1,000 <?=BONUS_POINTS?>
56
+          1,300 <?=BONUS_POINTS?>
56
         </td>
57
         </td>
57
         <td class="nobr">
58
         <td class="nobr">
58
           Purchase 1GiB of upload
59
           Purchase 1GiB of upload
63
           <a href="store.php?item=upload_10GB">10GiB Upload</a>
64
           <a href="store.php?item=upload_10GB">10GiB Upload</a>
64
         </td>
65
         </td>
65
         <td class="nobr">
66
         <td class="nobr">
66
-          10,000 <?=BONUS_POINTS?>
67
+          13,000 <?=BONUS_POINTS?>
67
         </td>
68
         </td>
68
         <td class="nobr">
69
         <td class="nobr">
69
           Purchase 10GiB of upload
70
           Purchase 10GiB of upload
74
           <a href="store.php?item=upload_100GB">100GiB Upload</a>
75
           <a href="store.php?item=upload_100GB">100GiB Upload</a>
75
         </td>
76
         </td>
76
         <td class="nobr">
77
         <td class="nobr">
77
-          100,000 <?=BONUS_POINTS?>
78
+          130,000 <?=BONUS_POINTS?>
78
         </td>
79
         </td>
79
         <td class="nobr">
80
         <td class="nobr">
80
           Purchase 100GiB of upload
81
           Purchase 100GiB of upload
85
           <a href="store.php?item=upload_1000GB">1,000GiB Upload</a>
86
           <a href="store.php?item=upload_1000GB">1,000GiB Upload</a>
86
         </td>
87
         </td>
87
         <td class="nobr">
88
         <td class="nobr">
88
-          1,000,000 <?=BONUS_POINTS?>
89
+          1,300,000 <?=BONUS_POINTS?>
89
         </td>
90
         </td>
90
         <td class="nobr">
91
         <td class="nobr">
91
           Purchase 1,000GiB of upload
92
           Purchase 1,000GiB of upload
96
           <a href="store.php?item=1k_points">1,000 <?=BONUS_POINTS?></a>
97
           <a href="store.php?item=1k_points">1,000 <?=BONUS_POINTS?></a>
97
         </td>
98
         </td>
98
         <td class="nobr">
99
         <td class="nobr">
99
-          1GiB Upload
100
+          1.3GiB Upload
100
         </td>
101
         </td>
101
         <td class="nobr">
102
         <td class="nobr">
102
           Purchase 1,000 <?=BONUS_POINTS?>
103
           Purchase 1,000 <?=BONUS_POINTS?>
107
           <a href="store.php?item=10k_points">10,000 <?=BONUS_POINTS?></a>
108
           <a href="store.php?item=10k_points">10,000 <?=BONUS_POINTS?></a>
108
         </td>
109
         </td>
109
         <td class="nobr">
110
         <td class="nobr">
110
-          10GiB Upload
111
+          13GiB Upload
111
         </td>
112
         </td>
112
         <td class="nobr">
113
         <td class="nobr">
113
           Purchase 10,000 <?=BONUS_POINTS?>
114
           Purchase 10,000 <?=BONUS_POINTS?>
118
           <a href="store.php?item=100k_points">100,000 <?=BONUS_POINTS?></a>
119
           <a href="store.php?item=100k_points">100,000 <?=BONUS_POINTS?></a>
119
         </td>
120
         </td>
120
         <td class="nobr">
121
         <td class="nobr">
121
-          100GiB Upload
122
+          130GiB Upload
122
         </td>
123
         </td>
123
         <td class="nobr">
124
         <td class="nobr">
124
           Purchase 100,000 <?=BONUS_POINTS?>
125
           Purchase 100,000 <?=BONUS_POINTS?>
129
           <a href="store.php?item=1m_points">1,000,000 <?=BONUS_POINTS?></a>
130
           <a href="store.php?item=1m_points">1,000,000 <?=BONUS_POINTS?></a>
130
         </td>
131
         </td>
131
         <td class="nobr">
132
         <td class="nobr">
132
-          1,000GiB Upload
133
+          1,300GiB Upload
133
         </td>
134
         </td>
134
         <td class="nobr">
135
         <td class="nobr">
135
           Purchase 1,000,000 <?=BONUS_POINTS?>
136
           Purchase 1,000,000 <?=BONUS_POINTS?>

+ 3
- 2
sections/store/upload_1000GB.php View File

1
 <?
1
 <?
2
 $Purchase = "1000GiB of upload";
2
 $Purchase = "1000GiB of upload";
3
 $UserID = $LoggedUser['ID'];
3
 $UserID = $LoggedUser['ID'];
4
+$Cost = 1300000;
4
 
5
 
5
 $DB->query("
6
 $DB->query("
6
   SELECT BonusPoints
7
   SELECT BonusPoints
9
 if ($DB->has_results()) {
10
 if ($DB->has_results()) {
10
   list($Points) = $DB->next_record();
11
   list($Points) = $DB->next_record();
11
 
12
 
12
-  if ($Points >= 1000000) {
13
+  if ($Points >= $Cost) {
13
     $DB->query("
14
     $DB->query("
14
       UPDATE users_main
15
       UPDATE users_main
15
-      SET BonusPoints = BonusPoints - 1000000,
16
+      SET BonusPoints = BonusPoints - $Cost,
16
           Uploaded    = Uploaded + 1073741824000
17
           Uploaded    = Uploaded + 1073741824000
17
       WHERE ID = $UserID");
18
       WHERE ID = $UserID");
18
     $DB->query("
19
     $DB->query("

+ 3
- 2
sections/store/upload_100GB.php View File

1
 <?
1
 <?
2
 $Purchase = "100GiB of upload";
2
 $Purchase = "100GiB of upload";
3
 $UserID = $LoggedUser['ID'];
3
 $UserID = $LoggedUser['ID'];
4
+$Cost = 130000;
4
 
5
 
5
 $DB->query("
6
 $DB->query("
6
   SELECT BonusPoints
7
   SELECT BonusPoints
9
 if ($DB->has_results()) {
10
 if ($DB->has_results()) {
10
   list($Points) = $DB->next_record();
11
   list($Points) = $DB->next_record();
11
 
12
 
12
-  if ($Points >= 100000) {
13
+  if ($Points >= $Cost) {
13
     $DB->query("
14
     $DB->query("
14
       UPDATE users_main
15
       UPDATE users_main
15
-      SET BonusPoints = BonusPoints - 100000,
16
+      SET BonusPoints = BonusPoints - $Cost,
16
           Uploaded    = Uploaded + 107374182400
17
           Uploaded    = Uploaded + 107374182400
17
       WHERE ID = $UserID");
18
       WHERE ID = $UserID");
18
     $DB->query("
19
     $DB->query("

+ 3
- 2
sections/store/upload_10GB.php View File

1
 <?
1
 <?
2
 $Purchase = "10GiB of upload";
2
 $Purchase = "10GiB of upload";
3
 $UserID = $LoggedUser['ID'];
3
 $UserID = $LoggedUser['ID'];
4
+$Cost = 13000;
4
 
5
 
5
 $DB->query("
6
 $DB->query("
6
   SELECT BonusPoints
7
   SELECT BonusPoints
9
 if ($DB->has_results()) {
10
 if ($DB->has_results()) {
10
   list($Points) = $DB->next_record();
11
   list($Points) = $DB->next_record();
11
 
12
 
12
-  if ($Points >= 10000) {
13
+  if ($Points >= $Cost) {
13
     $DB->query("
14
     $DB->query("
14
       UPDATE users_main
15
       UPDATE users_main
15
-      SET BonusPoints = BonusPoints - 10000,
16
+      SET BonusPoints = BonusPoints - $Cost,
16
           Uploaded    = Uploaded + 10737418240
17
           Uploaded    = Uploaded + 10737418240
17
       WHERE ID = $UserID");
18
       WHERE ID = $UserID");
18
     $DB->query("
19
     $DB->query("

+ 3
- 2
sections/store/upload_1GB.php View File

1
 <?
1
 <?
2
 $Purchase = "1GiB of upload";
2
 $Purchase = "1GiB of upload";
3
 $UserID = $LoggedUser['ID'];
3
 $UserID = $LoggedUser['ID'];
4
+$Cost = 1300;
4
 
5
 
5
 $DB->query("
6
 $DB->query("
6
   SELECT BonusPoints
7
   SELECT BonusPoints
9
 if ($DB->has_results()) {
10
 if ($DB->has_results()) {
10
   list($Points) = $DB->next_record();
11
   list($Points) = $DB->next_record();
11
 
12
 
12
-  if ($Points >= 1000) {
13
+  if ($Points >= $Cost) {
13
     $DB->query("
14
     $DB->query("
14
       UPDATE users_main
15
       UPDATE users_main
15
-      SET BonusPoints = BonusPoints - 1000,
16
+      SET BonusPoints = BonusPoints - $Cost,
16
           Uploaded    = Uploaded + 1073741824
17
           Uploaded    = Uploaded + 1073741824
17
       WHERE ID = $UserID");
18
       WHERE ID = $UserID");
18
     $DB->query("
19
     $DB->query("

+ 1
- 1
sections/tools/development/misc_values.php View File

40
   $Name = db_string($_POST['name']);
40
   $Name = db_string($_POST['name']);
41
         $DB->query("DELETE FROM misc WHERE Name = '" . $Name . "'");
41
         $DB->query("DELETE FROM misc WHERE Name = '" . $Name . "'");
42
     } else {
42
     } else {
43
-        $Val->SetFields('name', '1', 'regex', 'The name must be separated by underscores. No spaces are allowed.', array('regex' => '/^[a-z][_a-z0-9]{0,63}$/i'));
43
+        $Val->SetFields('name', '1', 'regex', 'The name must be separated by underscores. No spaces are allowed.', array('regex' => '/^[a-z][:_a-z0-9]{0,63}$/i'));
44
         $Val->SetFields('first', '1', 'string', 'You must specify the first value.');
44
         $Val->SetFields('first', '1', 'string', 'You must specify the first value.');
45
         $Val->SetFields('second', '1', 'string', 'You must specify the second value.');
45
         $Val->SetFields('second', '1', 'string', 'You must specify the second value.');
46
 
46
 

+ 3
- 3
sections/tools/managers/enable_requests.php View File

312
 ?>
312
 ?>
313
     </div>
313
     </div>
314
 <div style="padding-bottom: 11px;">
314
 <div style="padding-bottom: 11px;">
315
-    <input type="submit" id="outcome" value="Approve Selected" />
316
-    <input type="submit" id="outcome" value="Reject Selected" />
317
-    <input type="submit" id="outcome" value="Discard Selected" />
315
+    <input type="submit" id="multi" value="Approve Selected" />
316
+    <input type="submit" id="multi" value="Reject Selected" />
317
+    <input type="submit" id="multi" value="Discard Selected" />
318
 </div>
318
 </div>
319
 <? } else { ?>
319
 <? } else { ?>
320
     <h2 align="center">No new pending auto enable requests<?=($_GET['view'] == 'main') ? '' : ' in this view'?></h2>
320
     <h2 align="center">No new pending auto enable requests<?=($_GET['view'] == 'main') ? '' : ' in this view'?></h2>

+ 50
- 19
sections/tools/misc/tags.php View File

5
 }
5
 }
6
 
6
 
7
 // validation functions
7
 // validation functions
8
-$Val->SetFields('tag', true, 'string', 'Enter a single tag to search for.', array('maxlength'=>'200', 'minlength'=>'2'));
9
-$Val->SetFields('replace', true, 'string', 'Enter a single replacement tag.', array('maxlength'=>'200', 'minlength'=>'2'));
8
+$Val->SetFields('tag', true, 'string', 'Enter a single tag to search for.', ['maxlength'=>'200', 'minlength'=>'2']);
9
+$Val->SetFields('replace', false, 'string', 'Enter a single replacement tag.', ['maxlength'=>'200', 'minlength'=>'2']);
10
 
10
 
11
 echo $Val->GenerateJS('tagform');
11
 echo $Val->GenerateJS('tagform');
12
 
12
 
13
 // some constants to make programmers' lives easier
13
 // some constants to make programmers' lives easier
14
 define('MODE_RENAME', 0);
14
 define('MODE_RENAME', 0);
15
 define('MODE_MERGE', 1);
15
 define('MODE_MERGE', 1);
16
+define('MODE_DELETE', 2);
16
 
17
 
17
 ?>
18
 ?>
18
 <div class="thin">
19
 <div class="thin">
19
-  <h3>Merge/Rename Tags</h3>
20
+  <h3>Merge/Rename/Delete Tags</h3>
20
   <form action="tools.php" method="get" name="tagform" id="tagform" onsubmit="return formVal();">
21
   <form action="tools.php" method="get" name="tagform" id="tagform" onsubmit="return formVal();">
21
     <input type="hidden" name="action" value="edit_tags" />
22
     <input type="hidden" name="action" value="edit_tags" />
22
     <table>
23
     <table>
28
           <input type="text" name="tag" id="tag" />
29
           <input type="text" name="tag" id="tag" />
29
         </td>
30
         </td>
30
         <td class="label">
31
         <td class="label">
31
-          Rename to/merge with tag:
32
+          Rename to/merge with tag (empty to delete):
32
         </td>
33
         </td>
33
         <td>
34
         <td>
34
           <input type="text" name="replace" id="replace" />
35
           <input type="text" name="replace" id="replace" />
39
       </tr>
40
       </tr>
40
       <tr>
41
       <tr>
41
         <td class="center" colspan="5">
42
         <td class="center" colspan="5">
42
-          <input type="submit" value="Rename/Merge Tags" />
43
+          <input type="submit" value="Process Tag" />
43
         </td>
44
         </td>
44
       </tr>
45
       </tr>
45
     </table>
46
     </table>
74
     $DB->query("
75
     $DB->query("
75
       SELECT ID
76
       SELECT ID
76
       FROM tags
77
       FROM tags
77
-      WHERE Name = '$Tag'
78
-      LIMIT 1;");
78
+      WHERE Name = ?
79
+      LIMIT 1", $Tag);
79
     if (!$DB->has_results()) {
80
     if (!$DB->has_results()) {
80
       echo "
81
       echo "
81
         <div class=\"box pad center\">
82
         <div class=\"box pad center\">
88
     list($TagID) = $DB->next_record();
89
     list($TagID) = $DB->next_record();
89
 
90
 
90
     // 2) check if replacement exists
91
     // 2) check if replacement exists
91
-    $DB->query("
92
-      SELECT ID
93
-      FROM tags
94
-      WHERE Name = '$Replacement'
95
-      LIMIT 1;");
96
-    if (!$DB->has_results() ) {
97
-      $Mode = MODE_RENAME;
92
+    $ReplacementID = null;
93
+    if ($Replacement) {
94
+      $DB->query("
95
+        SELECT ID
96
+        FROM tags
97
+        WHERE Name = ?
98
+        LIMIT 1", $Replacement);
99
+      if (!$DB->has_results() ) {
100
+        $Mode = MODE_RENAME;
101
+        list($ReplacementID) = $DB->next_record();
102
+      } else {
103
+        $Mode = MODE_MERGE;
104
+      }
98
     } else {
105
     } else {
99
-      $Mode = MODE_MERGE;
106
+      $Mode = MODE_DELETE;
100
     }
107
     }
101
-    list($ReplacementID) = $DB->next_record();
102
 
108
 
103
     if ($_GET['list']) {
109
     if ($_GET['list']) {
104
       $AffectedTorrents = [];
110
       $AffectedTorrents = [];
113
           LEFT JOIN torrents_artists AS ta ON ta.GroupID = tg.ID
119
           LEFT JOIN torrents_artists AS ta ON ta.GroupID = tg.ID
114
           LEFT JOIN artists_group AS ag ON ag.ArtistID = ta.ArtistID
120
           LEFT JOIN artists_group AS ag ON ag.ArtistID = ta.ArtistID
115
           JOIN torrents_tags AS t ON t.GroupID = tg.ID
121
           JOIN torrents_tags AS t ON t.GroupID = tg.ID
116
-        WHERE t.TagID = $TagID;");
122
+        WHERE t.TagID = ?", $TagID);
117
       while (list($TorrentID, $ArtistID, $ArtistName, $TorrentName) = $DB->next_record()) {
123
       while (list($TorrentID, $ArtistID, $ArtistName, $TorrentName) = $DB->next_record()) {
118
         $Row = ($ArtistName ? "<a href=\"artist.php?id=$ArtistID\">$ArtistName</a> - " : '');
124
         $Row = ($ArtistName ? "<a href=\"artist.php?id=$ArtistID\">$ArtistName</a> - " : '');
119
         $Row.= "<a href=\"torrents.php?id=$TorrentID\">".display_str($TorrentName).'</a>';
125
         $Row.= "<a href=\"torrents.php?id=$TorrentID\">".display_str($TorrentName).'</a>';
131
           LEFT JOIN requests_artists AS ra ON r.ID = ra.RequestID
137
           LEFT JOIN requests_artists AS ra ON r.ID = ra.RequestID
132
           LEFT JOIN artists_group AS ag ON ag.ArtistID = ra.ArtistID
138
           LEFT JOIN artists_group AS ag ON ag.ArtistID = ra.ArtistID
133
           JOIN requests_tags AS t ON t.RequestID = r.ID
139
           JOIN requests_tags AS t ON t.RequestID = r.ID
134
-        WHERE t.TagID = $TagID;");
140
+        WHERE t.TagID = ?", $TagID);
135
       while (list($RequestID, $ArtistID, $ArtistName, $RequestName) = $DB->next_record()) {
141
       while (list($RequestID, $ArtistID, $ArtistName, $RequestName) = $DB->next_record()) {
136
         $Row = ($ArtistName ? "<a href=\"artist.php?id=$ArtistID\">$ArtistName</a> - " : '');
142
         $Row = ($ArtistName ? "<a href=\"artist.php?id=$ArtistID\">$ArtistName</a> - " : '');
137
         $Row.= "<a href=\"requests.php?action=viewrequest&amp;id=$RequestID\">".display_str($RequestName).'</a>';
143
         $Row.= "<a href=\"requests.php?action=viewrequest&amp;id=$RequestID\">".display_str($RequestName).'</a>';
160
           Torrents::update_hash($GroupID);
166
           Torrents::update_hash($GroupID);
161
         }
167
         }
162
       }
168
       }
163
-    } else {
169
+    } elseif ($Mode == MODE_DELETE) {
170
+      // EASY! just delete the tag
171
+      // 5) delete the tag
172
+      $DB->query("
173
+        DELETE FROM tags
174
+        WHERE ID = ?", $TagID);
175
+
176
+      // 6) get a list of the affected groups
177
+      $DB->query("
178
+        SELECT GroupID
179
+        FROM torrents_tags
180
+        WHERE TagID = ?", $TagID);
181
+      $AffectedGroups = $DB->to_array();
182
+
183
+      // 7) remove the tag from the groups
184
+      $DB->query("
185
+        DELETE FROM torrents_tags
186
+        WHERE TagID = ?", $TagID);
187
+      $TotalAffected = $DB->affected_rows();
188
+
189
+      // 8) update the newly tagless groups
190
+      foreach ($AffectedGroups as $AffectedGroup) {
191
+        list($GroupID) = $AffectedGroup;
192
+        Torrents::update_hash($GroupID);
193
+      }
194
+    } elseif ($Mode == MODE_MERGE) {
164
       // HARD! merge two tags together and update usage
195
       // HARD! merge two tags together and update usage
165
       // 5) remove dupe tags from torrents
196
       // 5) remove dupe tags from torrents
166
       //  (torrents that have both "old tag" and "replacement tag" set)
197
       //  (torrents that have both "old tag" and "replacement tag" set)

+ 1
- 1
sections/torrents/details.php View File

506
   if (!empty(G::$LoggedUser) && (G::$LoggedUser['ShowMagnets'] ?? false)) {
506
   if (!empty(G::$LoggedUser) && (G::$LoggedUser['ShowMagnets'] ?? false)) {
507
     if (!($TorrentFileName = $Cache->get_value('torrent_file_name_'.$TorrentID))) {
507
     if (!($TorrentFileName = $Cache->get_value('torrent_file_name_'.$TorrentID))) {
508
       $TorrentFile = file_get_contents(TORRENT_STORE.$TorrentID.'.torrent');
508
       $TorrentFile = file_get_contents(TORRENT_STORE.$TorrentID.'.torrent');
509
-      $Tor = new BencodeTorrent($TorrentFile);
509
+      $Tor = new BencodeTorrent($TorrentFile, false, false);
510
       $TorrentFileName = $Tor->Dec['info']['name'];
510
       $TorrentFileName = $Tor->Dec['info']['name'];
511
       $Cache->cache_value('torrent_file_name_'.$TorrentID, $TorrentFileName);
511
       $Cache->cache_value('torrent_file_name_'.$TorrentID, $TorrentFileName);
512
     }
512
     }

+ 1
- 1
sections/torrents/edit.php View File

65
   error(403);
65
   error(403);
66
 }
66
 }
67
 
67
 
68
-View::show_header('Edit torrent', 'upload,torrent');
68
+View::show_header('Edit torrent', 'upload,torrent,bbcode');
69
 
69
 
70
 $TorrentForm = new TorrentForm($Properties, $Err, false);
70
 $TorrentForm = new TorrentForm($Properties, $Err, false);
71
 
71
 

+ 3
- 17
sections/torrents/editgroup.php View File

64
   $Image = $WikiImage;
64
   $Image = $WikiImage;
65
 }
65
 }
66
 
66
 
67
-View::show_header('Edit torrent group', 'upload');
67
+View::show_header('Edit torrent group', 'upload,bbcode');
68
 
68
 
69
 // Start printing form
69
 // Start printing form
70
 ?>
70
 ?>
71
 <div class="thin">
71
 <div class="thin">
72
   <div class="header">
72
   <div class="header">
73
-    <h2>Edit <a href="torrents.php?id=<?=$GroupID?>"><?=$Name?></a></h2>
73
+    <h2>Edit <a href="torrents.php?id=<?=$GroupID?>"><?=($Name ? $Name : ($NameRJ ? $NameRJ : $NameJP))?></a></h2>
74
   </div>
74
   </div>
75
   <div class="box pad">
75
   <div class="box pad">
76
     <form class="edit_form" name="torrent_group" action="torrents.php" method="post">
76
     <form class="edit_form" name="torrent_group" action="torrents.php" method="post">
81
         <h3>Image:</h3>
81
         <h3>Image:</h3>
82
         <input type="text" name="image" size="92" value="<?=$Image?>" /><br />
82
         <input type="text" name="image" size="92" value="<?=$Image?>" /><br />
83
         <h3>Torrent group description:</h3>
83
         <h3>Torrent group description:</h3>
84
-        <textarea name="body" cols="91" rows="20"><?=$Body?></textarea><br />
85
-<?/*  if ($CategoryID == 1) { ?>
86
-        <h3>Release type:
87
-          <select id="releasetype" name="releasetype">
88
-<?    foreach ($ReleaseTypes as $Key => $Val) { ?>
89
-            <option value="<?=$Key?>"<?=($Key == $ReleaseType ? ' selected="selected"' : '')?>><?=$Val?></option>
90
-<?    } ?>
91
-          </select>
92
-        </h3>
93
-<?    if (check_perms('torrents_edit_vanityhouse')) { ?>
94
-        <h3>
95
-          <label>Vanity House: <input type="checkbox" name="vanity_house" value="1" <?=($VanityHouse ? 'checked="checked" ' : '')?>/></label>
96
-        </h3>
84
+        <textarea class="bbcode_editor" name="body" cols="91" rows="20"><?=$Body?></textarea><br />
97
 <?
85
 <?
98
-    }
99
-  }*/
100
   $DB->query("
86
   $DB->query("
101
     SELECT UserID
87
     SELECT UserID
102
     FROM torrents
88
     FROM torrents

+ 11
- 1
sections/torrents/functions.php View File

413
         <tr class="<?=(isset($ReleaseType)?'releases_'.$ReleaseType:'')?> groupid_<?=($GroupID)?> edition_<?=($EditionID)?> torrentdetails pad<? if (!isset($_GET['torrentid']) || $_GET['torrentid'] != $TorrentID) { ?> hidden<? } ?>" id="torrent_<?=($TorrentID)?>">
413
         <tr class="<?=(isset($ReleaseType)?'releases_'.$ReleaseType:'')?> groupid_<?=($GroupID)?> edition_<?=($EditionID)?> torrentdetails pad<? if (!isset($_GET['torrentid']) || $_GET['torrentid'] != $TorrentID) { ?> hidden<? } ?>" id="torrent_<?=($TorrentID)?>">
414
           <td colspan="5">
414
           <td colspan="5">
415
             <blockquote>
415
             <blockquote>
416
-              Uploaded by <?=(Users::format_username($UserID, false, false, false))?> <?=time_diff($TorrentTime);?>
416
+              Uploaded by <?
417
+  if ($Anonymous) {
418
+    if (check_perms('users_mod')) { ?>
419
+      <em class="tooltip" title="<?=Users::user_info($UserID)['Username']?>">Anonymous</em>
420
+<?  } else {
421
+      ?><em>Anonymous</em><?
422
+    }
423
+  } else {
424
+    print (Users::format_username($UserID, false, false, false));
425
+  }
426
+?> <?=time_diff($TorrentTime);?>
417
 <?  if ($Seeders == 0) {
427
 <?  if ($Seeders == 0) {
418
     if ($LastActive && time() - strtotime($LastActive) >= 1209600) { ?>
428
     if ($LastActive && time() - strtotime($LastActive) >= 1209600) { ?>
419
                 <br /><strong>Last active: <?=time_diff($LastActive);?></strong>
429
                 <br /><strong>Last active: <?=time_diff($LastActive);?></strong>

+ 2
- 1
sections/torrents/notify.php View File

248
         // If $GroupInfo['ID'] is unset, the torrent group associated with the torrent doesn't exist
248
         // If $GroupInfo['ID'] is unset, the torrent group associated with the torrent doesn't exist
249
         continue;
249
         continue;
250
       }
250
       }
251
+      $GroupName = empty($GroupInfo['Name']) ? (empty($GroupInfo['NameRJ']) ? $GroupInfo['NameJP'] : $GroupInfo['NameRJ']) : $GroupInfo['Name'];
251
       $TorrentInfo = $GroupInfo['Torrents'][$TorrentID];
252
       $TorrentInfo = $GroupInfo['Torrents'][$TorrentID];
252
       // generate torrent's title
253
       // generate torrent's title
253
       $DisplayName = '';
254
       $DisplayName = '';
267
       if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
268
       if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
268
          $DisplayName .= 'data-cover="'.ImageTools::process($GroupInfo['WikiImage'], 'thumb').'" ';
269
          $DisplayName .= 'data-cover="'.ImageTools::process($GroupInfo['WikiImage'], 'thumb').'" ';
269
       }
270
       }
270
-      $DisplayName .= "class=\"tooltip\" title=\"View torrent\" dir=\"ltr\">" . $GroupInfo['Name'] . '</a>';
271
+      $DisplayName .= "class=\"tooltip\" title=\"View torrent\" dir=\"ltr\">" . $GroupName . '</a>';
271
 
272
 
272
       $GroupCategoryID = $GroupInfo['CategoryID'];
273
       $GroupCategoryID = $GroupInfo['CategoryID'];
273
 /*
274
 /*

+ 8
- 8
sections/upload/upload_handle.php View File

92
 
92
 
93
 if ($Type == 'Movies' || $Type == 'Manga' || $Type == 'Anime' || $Type == 'Games') {
93
 if ($Type == 'Movies' || $Type == 'Manga' || $Type == 'Anime' || $Type == 'Games') {
94
   if (empty($_POST['idols'])) {
94
   if (empty($_POST['idols'])) {
95
-    $Err = "You didn't enter any goils";
95
+    $Err = "You didn't enter any artists/idols";
96
   } else {
96
   } else {
97
     $Artists = $_POST['idols'];
97
     $Artists = $_POST['idols'];
98
   }
98
   }
99
-} elseif ($Type == 'Other') {
99
+} else {
100
   if (!empty($_POST['idols'])) {
100
   if (!empty($_POST['idols'])) {
101
     $Artists = $_POST['idols'];
101
     $Artists = $_POST['idols'];
102
   }
102
   }
211
     SELECT ta.ArtistID, ag.Name
211
     SELECT ta.ArtistID, ag.Name
212
     FROM torrents_artists AS ta
212
     FROM torrents_artists AS ta
213
       JOIN artists_group AS ag ON ta.ArtistID = ag.ArtistID
213
       JOIN artists_group AS ag ON ta.ArtistID = ag.ArtistID
214
-    WHERE ta.GroupID = ".$Properties['GroupID']."
215
-    ORDER BY ag.Name ASC;");
214
+    WHERE ta.GroupID = ?
215
+    ORDER BY ag.Name ASC", $Properties['GroupID']);
216
   $ArtistForm = [];
216
   $ArtistForm = [];
217
   while (list($ArtistID, $ArtistName) = $DB->next_record(MYSQLI_BOTH, false)) {
217
   while (list($ArtistID, $ArtistName) = $DB->next_record(MYSQLI_BOTH, false)) {
218
     array_push($ArtistForm, array('id' => $ArtistID, 'name' => display_str($ArtistName)));
218
     array_push($ArtistForm, array('id' => $ArtistID, 'name' => display_str($ArtistName)));
468
 
468
 
469
 
469
 
470
 // Use this section to control freeleeches
470
 // Use this section to control freeleeches
471
+$T['FreeTorrent'] = '0';
472
+$T['FreeLeechType'] = '0';
473
+
471
 $DB->query("
474
 $DB->query("
472
   SELECT Name, First, Second
475
   SELECT Name, First, Second
473
   FROM misc
476
   FROM misc
481
       break;
484
       break;
482
     }
485
     }
483
   }
486
   }
484
-} else {
485
-  $T['FreeTorrent'] = '0';
486
-  $T['FreeLeechType'] = '0';
487
 }
487
 }
488
 
488
 
489
 // movie and anime ISOs are neutral leech, and receive a BP bounty
489
 // movie and anime ISOs are neutral leech, and receive a BP bounty
525
 $Cache->cache_value("torrent_{$TorrentID}_lock", true, 600);
525
 $Cache->cache_value("torrent_{$TorrentID}_lock", true, 600);
526
 
526
 
527
 //give BP if necessary
527
 //give BP if necessary
528
-if (($Type == "Movies" || $Type == "Anime") && ($T['Container'] == "'ISO'" || $T['Container'] == "'M2TS'" || $T['Container'] == "'VOB IFO'")) {
528
+if (($Type == "Movies" || $Type == "Anime") && ($T['Container'] == 'ISO' || $T['Container'] == 'M2TS' || $T['Container'] == 'VOB IFO')) {
529
   $BPAmt = (int) 2*($TotalSize / (1024*1024*1024))*1000;
529
   $BPAmt = (int) 2*($TotalSize / (1024*1024*1024))*1000;
530
 
530
 
531
   $DB->query("
531
   $DB->query("

+ 1
- 1
sections/user/invite.php View File

108
       <a href="user.php?action=invitetree<? if ($Sneaky) { echo '&amp;userid='.$UserID; } ?>" class="brackets">Invite tree</a>
108
       <a href="user.php?action=invitetree<? if ($Sneaky) { echo '&amp;userid='.$UserID; } ?>" class="brackets">Invite tree</a>
109
     </div>
109
     </div>
110
   </div>
110
   </div>
111
-<? if ($UserCount >= USER_LIMIT && USER_LIMIT != 0 && !check_perms('site_can_invite_always')) { ?>
111
+<? if ($UserCount >= USER_LIMIT && !check_perms('site_can_invite_always')) { ?>
112
   <div class="box pad notice">
112
   <div class="box pad notice">
113
     <p>Because the user limit has been reached you are unable to send invites at this time.</p>
113
     <p>Because the user limit has been reached you are unable to send invites at this time.</p>
114
   </div>
114
   </div>

+ 4
- 4
sections/user/user.php View File

237
     <a href="user.php?action=permissions&amp;userid=<?=$UserID?>" class="brackets">Permissions</a>
237
     <a href="user.php?action=permissions&amp;userid=<?=$UserID?>" class="brackets">Permissions</a>
238
 <?
238
 <?
239
 }
239
 }
240
-if (check_perms('users_view_ips', $Class)) {
240
+if ($LoggedUser['ID'] == $UserID || check_perms('users_view_ips', $Class)) {
241
 ?>
241
 ?>
242
     <a href="user.php?action=sessions&amp;userid=<?=$UserID?>" class="brackets">Sessions</a>
242
     <a href="user.php?action=sessions&amp;userid=<?=$UserID?>" class="brackets">Sessions</a>
243
 <?
243
 <?
1178
           <input type="text" size="20" name="BonusPoints" value="<?=$BonusPoints?>" />
1178
           <input type="text" size="20" name="BonusPoints" value="<?=$BonusPoints?>" />
1179
 <?
1179
 <?
1180
 if (!$DisablePoints) {
1180
 if (!$DisablePoints) {
1181
-  $PointsRate = 0.5;
1181
+  $PointsRate = 0;
1182
   $getTorrents = $DB->query("
1182
   $getTorrents = $DB->query("
1183
     SELECT COUNT(DISTINCT x.fid) AS Torrents,
1183
     SELECT COUNT(DISTINCT x.fid) AS Torrents,
1184
            SUM(t.Size) AS Size,
1184
            SUM(t.Size) AS Size,
1198
     GROUP BY um.ID");
1198
     GROUP BY um.ID");
1199
   if ($DB->has_results()) {
1199
   if ($DB->has_results()) {
1200
     list($NumTorr, $TSize, $TTime, $TSeeds) = $DB->next_record();
1200
     list($NumTorr, $TSize, $TTime, $TSeeds) = $DB->next_record();
1201
-    $PointsRate += (0.67*($NumTorr * (sqrt(($TSize/$NumTorr)/1073741824) * pow(1.5,($TTime/$NumTorr)/(24*365))))) / (max(1, sqrt(($TSeeds/$NumTorr)+4)/3));
1201
+    $PointsRate = (0.5 + (0.55*($NumTorr * (sqrt(($TSize/$NumTorr)/1073741824) * pow(1.5,($TTime/$NumTorr)/(24*365))))) / (max(1, sqrt(($TSeeds/$NumTorr)+4)/3)))**0.95;
1202
   }
1202
   }
1203
-  $PointsRate = intval($PointsRate**0.95);
1203
+  $PointsRate = intval(max(min($PointsRate, ($PointsRate * 2) - ($BonusPoints/1440)), 0));
1204
   $PointsPerHour = number_format($PointsRate)." ".BONUS_POINTS."/hour";
1204
   $PointsPerHour = number_format($PointsRate)." ".BONUS_POINTS."/hour";
1205
   $PointsPerDay = number_format($PointsRate*24)." ".BONUS_POINTS."/day";
1205
   $PointsPerDay = number_format($PointsRate*24)." ".BONUS_POINTS."/day";
1206
 } else {
1206
 } else {

+ 1
- 1
sections/userhistory/email_history_userview.php View File

55
   <h2>Email history for <a href="user.php?id=<?=$UserID ?>"><?=$Username ?></a></h2>
55
   <h2>Email history for <a href="user.php?id=<?=$UserID ?>"><?=$Username ?></a></h2>
56
 <? } ?>
56
 <? } ?>
57
 </div>
57
 </div>
58
-<table width="100%">
58
+<table class="alternate_rows" width="100%">
59
   <tr class="colhead">
59
   <tr class="colhead">
60
     <td>Email</td>
60
     <td>Email</td>
61
     <td>Expunge</td>
61
     <td>Expunge</td>

+ 1
- 1
sections/userhistory/ip_history_userview.php View File

55
   <h2>IP history for <a href="user.php?id=<?=$UserID?>"><?=$Username?></a></h2>
55
   <h2>IP history for <a href="user.php?id=<?=$UserID?>"><?=$Username?></a></h2>
56
 <? } ?>
56
 <? } ?>
57
 </div>
57
 </div>
58
-<table width="100%">
58
+<table class="alternate_rows" width="100%">
59
   <tr class="colhead">
59
   <tr class="colhead">
60
     <td>IP</td>
60
     <td>IP</td>
61
     <td>Expunge</td>
61
     <td>Expunge</td>

+ 6
- 1
sections/userhistory/subscribed_collages.php View File

167
         $TorrentID = key($Torrents);
167
         $TorrentID = key($Torrents);
168
         $Torrent = current($Torrents);
168
         $Torrent = current($Torrents);
169
 
169
 
170
-        $DisplayName = "<a class=\"torrent_title\" href=\"torrents.php?id=$GroupID\" ";
170
+        $DisplayName = '';
171
+
172
+        if (isset($Artists)) {
173
+          $DisplayName .= '<div class="torrent_artists">'.Artists::display_artists($Artists).'</div> ';
174
+        }
175
+        $DisplayName .= "<a class=\"torrent_title\" href=\"torrents.php?id=$GroupID\" ";
171
         if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
176
         if (!isset($LoggedUser['CoverArt']) || $LoggedUser['CoverArt']) {
172
           $DisplayName .= 'data-cover="'.ImageTools::process($WikiImage).'" ';
177
           $DisplayName .= 'data-cover="'.ImageTools::process($WikiImage).'" ';
173
         }
178
         }

+ 1
- 1
sections/userhistory/subscriptions.php View File

230
     <tr class="row<?=$ShowCollapsed ? ' hidden' : '' ?>">
230
     <tr class="row<?=$ShowCollapsed ? ' hidden' : '' ?>">
231
 <?      if (Users::has_avatars_enabled()) { ?>
231
 <?      if (Users::has_avatars_enabled()) { ?>
232
       <td class="avatar" valign="top">
232
       <td class="avatar" valign="top">
233
-        <?=Users::show_avatar($Result['LastReadAvatar'], $Result['LastReadUsername'], $HeavyInfo['DisableAvatars'])?>
233
+        <?=Users::show_avatar($Result['LastReadAvatar'], $Result['LastReadUserID'], $Result['LastReadUsername'], $HeavyInfo['DisableAvatars'])?>
234
       </td>
234
       </td>
235
 <?      } ?>
235
 <?      } ?>
236
       <td class="body" valign="top">
236
       <td class="body" valign="top">

+ 1
- 1
sections/wiki/article.php View File

48
     <div class="linkbox">
48
     <div class="linkbox">
49
       <a href="wiki.php?action=create" class="brackets">Create</a>
49
       <a href="wiki.php?action=create" class="brackets">Create</a>
50
 <? if ($Edit <= $LoggedUser['EffectiveClass']) { ?>
50
 <? if ($Edit <= $LoggedUser['EffectiveClass']) { ?>
51
-      <a href="wiki.php?action=edit&amp;id=<?=$ArticleID?>" class="brackets">Contribute</a>
51
+      <a href="wiki.php?action=edit&amp;id=<?=$ArticleID?>" class="brackets">Edit</a>
52
       <a href="wiki.php?action=revisions&amp;id=<?=$ArticleID?>" class="brackets">History</a>
52
       <a href="wiki.php?action=revisions&amp;id=<?=$ArticleID?>" class="brackets">History</a>
53
 <? } ?>
53
 <? } ?>
54
 <? if (check_perms('admin_manage_wiki') && $_GET['id'] != INDEX_ARTICLE) { ?>
54
 <? if (check_perms('admin_manage_wiki') && $_GET['id'] != INDEX_ARTICLE) { ?>

+ 0
- 7
static/functions/browse.js View File

274
   $('#edition_label').gtoggle();
274
   $('#edition_label').gtoggle();
275
   $('#edition_catalogue').gtoggle();
275
   $('#edition_catalogue').gtoggle();
276
 }
276
 }
277
-
278
-$(function() {
279
-  if (!$('.group').length) {
280
-    var els = $('#torrent_table.grouping .colhead td:first-child(), #torrent_table.grouping .colhead_dark td:first-child(), #torrent_table.grouping .torrent td:first-child()')
281
-    for (var i = 0; i < els.length; i++) { els[i].style.display = 'none' }
282
-  }
283
-})

+ 1
- 0
static/functions/comments.js View File

401
               par.raw().style.height = par.height()+'px'
401
               par.raw().style.height = par.height()+'px'
402
           }
402
           }
403
       })
403
       })
404
+      if (this.complete) $(this).load()
404
     }
405
     }
405
 
406
 
406
   })
407
   })

+ 11
- 1
static/functions/global.js View File

29
 
29
 
30
 function save_message(message, err = false) {
30
 function save_message(message, err = false) {
31
   var messageDiv = document.createElement("div");
31
   var messageDiv = document.createElement("div");
32
-  messageDiv.className = err ? "error_message" : "save_message";
32
+  messageDiv.className = err ? "error_message box" : "save_message box";
33
   messageDiv.innerHTML = message;
33
   messageDiv.innerHTML = message;
34
   $("#content").raw().insertBefore(messageDiv,$("#content").raw().firstChild);
34
   $("#content").raw().insertBefore(messageDiv,$("#content").raw().firstChild);
35
 }
35
 }
360
     lightbox.init((e.target.attributes['lightbox-img']||[]).value||e.target.src, (e.target.attributes['lightbox-size']||[]).value||e.target.width)
360
     lightbox.init((e.target.attributes['lightbox-img']||[]).value||e.target.src, (e.target.attributes['lightbox-size']||[]).value||e.target.width)
361
   })
361
   })
362
 })
362
 })
363
+
364
+/*
365
+if ('serviceWorker' in navigator) {
366
+  navigator.serviceWorker.register('sw.js').then(reg => {
367
+    reg.update()
368
+  }).catch(err => {
369
+    console.log("Failed to register service worker: ", err)
370
+  })
371
+}
372
+*/

+ 0
- 1
static/functions/reports.js View File

10
 
10
 
11
 function saveNotes(id) {
11
 function saveNotes(id) {
12
   var notes = $('#notes_' + id).raw().value;
12
   var notes = $('#notes_' + id).raw().value;
13
-  notes = notes.replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '<br />');
14
   var post = new Array();
13
   var post = new Array();
15
   post['id'] = id;
14
   post['id'] = id;
16
   post['notes'] = notes;
15
   post['notes'] = notes;

+ 4
- 0
static/functions/requests.js View File

139
     $('#artist_tr').gshow();
139
     $('#artist_tr').gshow();
140
     $('#dlsiteid_tr').gshow();
140
     $('#dlsiteid_tr').gshow();
141
     $('#cataloguenumber_tr').ghide();
141
     $('#cataloguenumber_tr').ghide();
142
+  } else if (cat == "Audio") {
143
+    $('#artist_tr').gshow();
144
+    $('#dlsiteid_tr').ghide();
145
+    $('#cataloguenumber_tr').ghide();
142
   } else {
146
   } else {
143
     $('#artist_tr').ghide();
147
     $('#artist_tr').ghide();
144
     $('#cataloguenumber_tr').ghide();
148
     $('#cataloguenumber_tr').ghide();

+ 1
- 1
static/functions/u2f.js View File

498
     var req = JSON.parse($('[name="u2f-request"]').raw().value);
498
     var req = JSON.parse($('[name="u2f-request"]').raw().value);
499
     var sigs = JSON.parse($('[name="u2f-sigs"]').raw().value);
499
     var sigs = JSON.parse($('[name="u2f-sigs"]').raw().value);
500
     if (req) {
500
     if (req) {
501
-      u2f.register(req.appID, [req], sigs, function(data) {
501
+      u2f.register(req.appId, [req], sigs, function(data) {
502
         if (data.errorCode) {
502
         if (data.errorCode) {
503
           console.log('U2F Register Error: ' + Object.keys(u2f.ErrorCodes).find(k => u2f.ErrorCodes[k] == data.errorCode));
503
           console.log('U2F Register Error: ' + Object.keys(u2f.ErrorCodes).find(k => u2f.ErrorCodes[k] == data.errorCode));
504
           return;
504
           return;

+ 11
- 0
static/functions/upload.js View File

65
     'screenshots': {name: 'Screenshots', notes: '<strong class="important_text">Promotional materials from a game\'s store page are NOT screenshots</strong>'},
65
     'screenshots': {name: 'Screenshots', notes: '<strong class="important_text">Promotional materials from a game\'s store page are NOT screenshots</strong>'},
66
     'group_desc': {notes: 'Contains information such as a description of the game, its mechanics, etc.'},
66
     'group_desc': {notes: 'Contains information such as a description of the game, its mechanics, etc.'},
67
     'release_desc': {notes: 'Contains information such as <strong>version</strong>, install instructions, patching instructions, etc.'}
67
     'release_desc': {notes: 'Contains information such as <strong>version</strong>, install instructions, patching instructions, etc.'}
68
+  }, {
69
+    'idols': {name: 'Voices (Optional)'},
70
+    'studio': {name: 'Publisher (Optional)'},
71
+    'mediainfo': {},
72
+    'audio': {},
73
+    'year': false,
74
+    'lang': false,
75
+    'dlsite': {},
76
+    'screenshots': {name: 'Samples'},
77
+    'group_desc': {notes: 'Contains information such as a description of the audio work.'},
78
+    'release_desc': {notes: 'Contains information specific to the release.'}
68
   }, {
79
   }, {
69
     'idols': {name: 'Creators/Authors (Optional)'},
80
     'idols': {name: 'Creators/Authors (Optional)'},
70
     'studio': {name: 'Publisher (Optional)'},
81
     'studio': {name: 'Publisher (Optional)'},

+ 1
- 1
static/functions/validate_upload.js View File

23
       soft_error('The file selected does not appear to be a .torrent file')
23
       soft_error('The file selected does not appear to be a .torrent file')
24
     }
24
     }
25
     let mi = $('#mediainfo').raw().value
25
     let mi = $('#mediainfo').raw().value
26
-    if (mi && (!mi.includes('General') || !mi.includes('Video'))) {
26
+    if (mi && (!mi.includes('General') || (!mi.includes('Video') && !mi.includes('Audio')))) {
27
       soft_error('Your MediaInfo does not appear to be from a valid MediaInfo utility')
27
       soft_error('Your MediaInfo does not appear to be from a valid MediaInfo utility')
28
     }
28
     }
29
     if (!$('#image').raw().value) {
29
     if (!$('#image').raw().value) {

+ 13
- 9
static/styles/beluga/style.css View File

18
   padding: 0
18
   padding: 0
19
 }
19
 }
20
 
20
 
21
-.cats_anime, .cats_movies, .cats_manga, .cats_games, .cats_other {
21
+.cats_anime, .cats_movies, .cats_manga, .cats_games, .cats_audio, .cats_other {
22
   width: 38px!important;
22
   width: 38px!important;
23
   height: 38px!important;
23
   height: 38px!important;
24
   line-height: 38px;
24
   line-height: 38px;
25
 }
25
 }
26
 .group .cats_anime:after, .group .cats_movies:after,
26
 .group .cats_anime:after, .group .cats_movies:after,
27
 .group .cats_manga:after, .group .cats_games:after,
27
 .group .cats_manga:after, .group .cats_games:after,
28
-.group .cats_other:after {
28
+.group .cats_audio:after, .group .cats_other:after {
29
   color: black!important;
29
   color: black!important;
30
 }
30
 }
31
 .cats_anime:after {
31
 .cats_anime:after {
52
   font-size: 16px;
52
   font-size: 16px;
53
 }
53
 }
54
 .group .cats_games { background-color: #4DC593; }
54
 .group .cats_games { background-color: #4DC593; }
55
+.cats_audio:after {
56
+  content: "AUD";
57
+  color: #77C5D4;
58
+  font-size: 18px;
59
+}
60
+.group .cats_audio { background-color: #77C5D4; }
55
 .cats_other:after {
61
 .cats_other:after {
56
   content: "OTH";
62
   content: "OTH";
57
   color: #0D5968;
63
   color: #0D5968;
861
   padding: 5px
867
   padding: 5px
862
 }
868
 }
863
 
869
 
864
-td:first-child {
870
+#torrents .torrent_table td:first-child, td:first-child {
865
   padding-left: 12px;
871
   padding-left: 12px;
866
 }
872
 }
867
-td:last-child {
873
+#torrents .torrent_table td:last-child, td:last-child {
868
   padding-right: 12px;
874
   padding-right: 12px;
869
 }
875
 }
870
 
876
 
1030
 
1036
 
1031
 .save_message {
1037
 .save_message {
1032
   margin-top: 2px;
1038
   margin-top: 2px;
1033
-  background-color: #93d4a2;
1039
+  background-color: #93d4a2!important;
1034
   text-align: center;
1040
   text-align: center;
1035
   color: #fff;
1041
   color: #fff;
1036
   padding: 10px
1042
   padding: 10px
1192
   white-space: nowrap
1198
   white-space: nowrap
1193
 }
1199
 }
1194
 
1200
 
1195
-#collages .sign,#torrents .sign {
1201
+#collages .sign, #torrents .sign {
1196
   padding: 5px;
1202
   padding: 5px;
1197
-  position: relative;
1198
-  left: -5px
1199
 }
1203
 }
1200
 
1204
 
1201
 .filter_torrents {
1205
 .filter_torrents {
1953
 .forum_index td {
1957
 .forum_index td {
1954
   position: relative;
1958
   position: relative;
1955
 }
1959
 }
1956
-.forum_index .row:nth-child(odd) {
1960
+.alternate_rows .row:nth-child(odd) {
1957
   background: #33363d;
1961
   background: #33363d;
1958
 }
1962
 }
1959
 .forum_index td.read:after, #forums td.unread:after {
1963
 .forum_index td.read:after, #forums td.unread:after {

+ 2
- 2
static/styles/genaviv/style.css View File

101
 .box.filter_torrents .head a:hover,.box.filter_torrents .head a:focus,.forum_post .colhead a:hover,.forum_post .colhead_dark a:focus,#inbox .box .head a:focus,#inbox .box .head a:hover {
101
 .box.filter_torrents .head a:hover,.box.filter_torrents .head a:focus,.forum_post .colhead a:hover,.forum_post .colhead_dark a:focus,#inbox .box .head a:focus,#inbox .box .head a:hover {
102
   color:#32867d
102
   color:#32867d
103
 }
103
 }
104
-#request_table .rowb td:first-of-type>a:nth-child(2n),#request_table .rowa td>a:nth-child(2n) {
104
+#request_table .row td:first-of-type > a:nth-child(2n) {
105
   color:#32867d
105
   color:#32867d
106
 }
106
 }
107
 span.r99,.r09,.r10,.r20,.r30,.r40,.r50 {
107
 span.r99,.r09,.r10,.r20,.r30,.r40,.r50 {
687
 .hidden,div#quickreplytext br {
687
 .hidden,div#quickreplytext br {
688
   display:none
688
   display:none
689
 }
689
 }
690
-#request_table .rowb td:first-of-type>a,#request_table .rowa td>a {
690
+#request_table .rowa td > a {
691
   font-weight:600
691
   font-weight:600
692
 }
692
 }
693
 .big_info .group_info.clear span {
693
 .big_info .group_info.clear span {

+ 4
- 0
static/styles/global.css View File

24
   width: 50%;
24
   width: 50%;
25
 }
25
 }
26
 
26
 
27
+#contest div#content > div.flex > div.grow {
28
+  min-width: 50%;
29
+}
30
+
27
 input, textarea {
31
 input, textarea {
28
   border: 1px solid #c7c7c7;
32
   border: 1px solid #c7c7c7;
29
   background-color: white;
33
   background-color: white;

+ 5
- 6
static/styles/oppai/style.css View File

9
 .cats_movies { width: 28px; height: 28px; background: url('images/movies.png') no-repeat center center; }
9
 .cats_movies { width: 28px; height: 28px; background: url('images/movies.png') no-repeat center center; }
10
 .cats_manga { width: 28px; height: 28px; background: url('images/manga.png') no-repeat center center; }
10
 .cats_manga { width: 28px; height: 28px; background: url('images/manga.png') no-repeat center center; }
11
 .cats_games { width: 28px; height: 28px; background: url('images/games.png') no-repeat center center; }
11
 .cats_games { width: 28px; height: 28px; background: url('images/games.png') no-repeat center center; }
12
+.cats_audio { width: 28px; height: 28px; background: url('images/audiobook.png') no-repeat center center; }
12
 .cats_other { width: 28px; height: 28px; background: url('images/other.png') no-repeat center center; }
13
 .cats_other { width: 28px; height: 28px; background: url('images/other.png') no-repeat center center; }
13
 /* Global */
14
 /* Global */
14
 * {
15
 * {
612
 }
613
 }
613
 
614
 
614
 .error_message {
615
 .error_message {
615
-  border: 1px solid #666;
616
-  padding: 3px 0px 3px 0px;
616
+  padding: 8px 0px;
617
   background-color: #AF2525;
617
   background-color: #AF2525;
618
   text-align: center;
618
   text-align: center;
619
   color: white;
619
   color: white;
621
 }
621
 }
622
 
622
 
623
 .save_message {
623
 .save_message {
624
-  border: 1px solid #666;
625
-  padding: 3px 0px 3px 0px;
626
-  background-color: #F4E649;
624
+  padding: 8px 0px;
625
+  background-color: #F8C2E8;
627
   text-align: center;
626
   text-align: center;
628
-  color: #492802;
627
+  color: #555555;
629
   font-weight: bold;
628
   font-weight: bold;
630
 }
629
 }
631
 
630
 

Loading…
Cancel
Save