Browse Source

Okay, this is the last superficial commit

pjc 5 years ago
parent
commit
7efa28ec51

+ 4
- 4
classes/rules.class.php View File

7
    */
7
    */
8
   public static function display_golden_rules() {
8
   public static function display_golden_rules() {
9
     ?>
9
     ?>
10
-    <ol>
10
+    <ul>
11
       <li>Staff can do anything to anyone for any reason (or no reason). If you take issue with a decision, you must do so privately with the staff member who issued the decision or with an administrator of the site.</li>
11
       <li>Staff can do anything to anyone for any reason (or no reason). If you take issue with a decision, you must do so privately with the staff member who issued the decision or with an administrator of the site.</li>
12
       <li>One account per person per lifetime.</li>
12
       <li>One account per person per lifetime.</li>
13
       <li>Follow proper private BitTorrent practices. Torrent files you download from this site are unique to you and should not be shared with others. Torrent files from this site should not be modified by adding additional trackers or enabling DHT or PEX under any circumstances.</li>
13
       <li>Follow proper private BitTorrent practices. Torrent files you download from this site are unique to you and should not be shared with others. Torrent files from this site should not be modified by adding additional trackers or enabling DHT or PEX under any circumstances.</li>
15
       <li>Accessing the site from any IP address is permitted, but your account will be linked with other accounts that have accessed the site from the same IP as you. As such, it is <em>recommended</em> that you don't use public networks, proxies, or VPNs to access the site.</li>
15
       <li>Accessing the site from any IP address is permitted, but your account will be linked with other accounts that have accessed the site from the same IP as you. As such, it is <em>recommended</em> that you don't use public networks, proxies, or VPNs to access the site.</li>
16
       <li>Attempting to find a bug in the site code is allowed and sometimes even rewarded. Follow proper disclosure procedures by contacting staff about the issue well before disclosing it publicly. Do not misuse any bugs you may discover. Do not attempt to portray abuse as a bug in the hopes of a reward.</li>
16
       <li>Attempting to find a bug in the site code is allowed and sometimes even rewarded. Follow proper disclosure procedures by contacting staff about the issue well before disclosing it publicly. Do not misuse any bugs you may discover. Do not attempt to portray abuse as a bug in the hopes of a reward.</li>
17
       <li>Don't reveal the criteria for hidden badges or events.</li>
17
       <li>Don't reveal the criteria for hidden badges or events.</li>
18
-    </ol>
18
+    </ul>
19
 <?
19
 <?
20
   }
20
   }
21
 
21
 
72
         <ul>
72
         <ul>
73
       <li>Let's treat the biology boards like how the Shroomery used to be: each thread a set of resourceful diverse wisdom worth using permalinks to. It's okay if the boards are slow, that's why there are only a few of them.</li>
73
       <li>Let's treat the biology boards like how the Shroomery used to be: each thread a set of resourceful diverse wisdom worth using permalinks to. It's okay if the boards are slow, that's why there are only a few of them.</li>
74
       <li>Please discuss site news in the corresponding Announcements thread instead of making a new General thread. Discussing science-related news in General is highly encouraged, but discussing political news is much less so. Thank you.</li>
74
       <li>Please discuss site news in the corresponding Announcements thread instead of making a new General thread. Discussing science-related news in General is highly encouraged, but discussing political news is much less so. Thank you.</li>
75
-      <li>No advertising, referrals, affiliate links, cryptocurrency pumps, or calls to action that involve using a financial instrument. You're banned on the spot. The exceptions: cryptocurrencies that derive their value from work performed on distributed science computation networks, e.g., Curecoin, FoldingCoin, and Gridcoin.</li>
75
+      <li>No advertising, referrals, affiliate links, cryptocurrency pumps, or calls to action that involve using a financial instrument. You'll be banned on the spot. The exceptions: cryptocurrencies that derive their value from work performed on distributed science computation networks, e.g., Curecoin, FoldingCoin, and Gridcoin.</li>
76
       <li>Feel free to post announcements for your own projects, even and especially if they're commercial ones, in the General board. Limit all discussion of trading biomaterials, including bulk giveaways, to the Marketplace forum available to Power Users.</li>
76
       <li>Feel free to post announcements for your own projects, even and especially if they're commercial ones, in the General board. Limit all discussion of trading biomaterials, including bulk giveaways, to the Marketplace forum available to Power Users.</li>
77
       <li>Please be modest when talking about your uploads. It's unnecessary to announce your uploads because Gazelle logs everything (at least one this is encrypted). If someone asks for help on his project and your upload fits the bill, go write a post!</li>
77
       <li>Please be modest when talking about your uploads. It's unnecessary to announce your uploads because Gazelle logs everything (at least one this is encrypted). If someone asks for help on his project and your upload fits the bill, go write a post!</li>
78
       <li>Use descriptive and specific subject lines. This helps others decide whether your particular words of "wisdom" relate to a topic they care about.</li>
78
       <li>Use descriptive and specific subject lines. This helps others decide whether your particular words of "wisdom" relate to a topic they care about.</li>
94
       <li>Don't send mass alerts with <code>@channel</code>, <code>@everyone</code>, or <code>@here</code>. It's obnoxious and you should handle anything genuinely important on the boards.</li>
94
       <li>Don't send mass alerts with <code>@channel</code>, <code>@everyone</code>, or <code>@here</code>. It's obnoxious and you should handle anything genuinely important on the boards.</li>
95
       <li>Flooding is irritating and you'll get kicked for it. This includes "now playing" scripts, large amounts of irrelevant text such as lorem ipsum, and unfunny non sequiturs.</li>
95
       <li>Flooding is irritating and you'll get kicked for it. This includes "now playing" scripts, large amounts of irrelevant text such as lorem ipsum, and unfunny non sequiturs.</li>
96
       <li>Impersonating other members &mdash; particularly staff members &mdash; will not go unpunished. Please remember that the Slack channels are publicly accessible.</li>
96
       <li>Impersonating other members &mdash; particularly staff members &mdash; will not go unpunished. Please remember that the Slack channels are publicly accessible.</li>
97
-      <li>Please use the threaded conversation in Slack and avoid replying to threads with new messages or crossposting replies to the main channel.</li>
97
+      <li>Please use the threaded conversations feature in Slack and avoid replying to threads with new messages or crossposting replies to the main channel.</li>
98
       <li>Announce and bot channels are in development, as standard IRC instead of Slack for obvious reasons. Any IRC bots you have must authenticate with your own username and IRC key, and set the <code>+B</code> usermode on themselves.</li>
98
       <li>Announce and bot channels are in development, as standard IRC instead of Slack for obvious reasons. Any IRC bots you have must authenticate with your own username and IRC key, and set the <code>+B</code> usermode on themselves.</li>
99
 <?
99
 <?
100
   }
100
   }

+ 6
- 5
sections/register/closed.php View File

1
-<?
1
+<?php
2
 View::show_header('Registration Closed');
2
 View::show_header('Registration Closed');
3
 ?>
3
 ?>
4
-<div style="width: 500px;">
5
-  <strong>Sorry, the site is currently invite only.</strong>
4
+
5
+<div style="width: 250px;">
6
+  <p><strong>Sorry, the site is currently invite only.</strong></p>
6
 </div>
7
 </div>
7
-<?
8
+
9
+<?php
8
 View::show_footer();
10
 View::show_footer();
9
-?>

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

12
   <form class="search_form" name="rules" onsubmit="return false" action="">
12
   <form class="search_form" name="rules" onsubmit="return false" action="">
13
     <input type="text" id="search_string" value="Filter (empty to reset)" />
13
     <input type="text" id="search_string" value="Filter (empty to reset)" />
14
     <span id="Index">Searching for <strong>upload</strong> returns all rules containing that term.
14
     <span id="Index">Searching for <strong>upload</strong> returns all rules containing that term.
15
-      Searching for <strong>upload+trump</strong> returns all rules containing both terms</span>
15
+      Searching for <strong>upload+trump</strong> returns all rules containing both terms.</span>
16
   </form>
16
   </form>
17
   <br />
17
   <br />
18
   <div class="before_rules">
18
   <div class="before_rules">

+ 127
- 76
sections/torrents/user.php View File

334
 
334
 
335
 <div class="thin">
335
 <div class="thin">
336
   <div class="header">
336
   <div class="header">
337
-    <h2><a href="user.php?id=<?= $UserID ?>"><?= $User['Username'] ?></a><?= "'s $Action torrents" ?></h2>
337
+    <h2><a href="user.php?id=<?= $UserID ?>"><?= $User['Username'] ?></a><?= "'s $Action torrents" ?>
338
+    </h2>
338
   </div>
339
   </div>
339
   <div class="box pad">
340
   <div class="box pad">
340
     <form class="search_form" name="torrents" action="" method="get">
341
     <form class="search_form" name="torrents" action="" method="get">
344
         <tr>
345
         <tr>
345
           <td class="label"><strong>Search Terms</strong></td>
346
           <td class="label"><strong>Search Terms</strong></td>
346
           <td>
347
           <td>
347
-            <input type="hidden" name="type" value="<?= $_GET['type'] ?>" />
348
-            <input type="hidden" name="userid" value="<?= $UserID ?>" />
349
-            <input type="search" name="search" size="60" value="<?php Format::form('search') ?>" />
348
+            <input type="hidden" name="type"
349
+              value="<?= $_GET['type'] ?>" />
350
+            <input type="hidden" name="userid"
351
+              value="<?= $UserID ?>" />
352
+            <input type="search" name="search" size="60"
353
+              value="<?php Format::form('search') ?>" />
350
           </td>
354
           </td>
351
         </tr>
355
         </tr>
352
 
356
 
353
-        <!-- Specifics -->
357
+        <!--
358
+        Specifics
359
+        todo: Make like the Seq/Img Format fields in browse.php
360
+        -->
354
         <tr>
361
         <tr>
355
           <td class="label"><strong>Specifics</strong></td>
362
           <td class="label"><strong>Specifics</strong></td>
356
           <td class="nobr" colspan="3">
363
           <td class="nobr" colspan="3">
357
             <select id="container" name="container" class="ft_container">
364
             <select id="container" name="container" class="ft_container">
358
               <option value="">Format</option>
365
               <option value="">Format</option>
359
-              <?php foreach ($Containers as $ContainerName) { ?>
360
-              <option value="<?= display_str($ContainerName); ?>"<?php Format::selected('container', $ContainerName) ?>><?= display_str($ContainerName); ?>
366
+              <?php foreach ($Containers as $Key => $ContainerName) { ?>
367
+              <option value="<?= display_str($Key); ?>" <?php Format::selected('container', $Key) ?>><?= display_str($Key); ?>
361
               </option>
368
               </option>
362
               <?php } ?>
369
               <?php } ?>
363
             </select>
370
             </select>
365
             <select id="codec" name="codec" class="ft_codec">
372
             <select id="codec" name="codec" class="ft_codec">
366
               <option value="">License</option>
373
               <option value="">License</option>
367
               <?php foreach ($Codecs as $CodecName) { ?>
374
               <?php foreach ($Codecs as $CodecName) { ?>
368
-              <option value="<?= display_str($CodecName); ?>"<?php Format::selected('codec', $CodecName) ?>><?= display_str($CodecName); ?>
375
+              <option value="<?= display_str($CodecName); ?>" <?php Format::selected('codec', $CodecName) ?>><?= display_str($CodecName); ?>
369
               </option>
376
               </option>
370
               <?php } ?>
377
               <?php } ?>
371
             </select>
378
             </select>
373
             <select id="resolution" name="resolution" class="ft_resolution">
380
             <select id="resolution" name="resolution" class="ft_resolution">
374
               <option value="">Assembly Level</option>
381
               <option value="">Assembly Level</option>
375
               <?php foreach ($Resolutions as $ResolutionName) { ?>
382
               <?php foreach ($Resolutions as $ResolutionName) { ?>
376
-              <option value="<?= display_str($ResolutionName); ?>"<?php Format::selected('resolution', $ResolutionName) ?>><?= display_str($ResolutionName); ?>
383
+              <option value="<?= display_str($ResolutionName); ?>"
384
+                <?php Format::selected('resolution', $ResolutionName) ?>><?= display_str($ResolutionName); ?>
377
               </option>
385
               </option>
378
               <?php } ?>
386
               <?php } ?>
379
             </select>
387
             </select>
381
             <select name="media" class="ft_media">
389
             <select name="media" class="ft_media">
382
               <option value="">Platform</option>
390
               <option value="">Platform</option>
383
               <?php foreach ($Media as $MediaName) { ?>
391
               <?php foreach ($Media as $MediaName) { ?>
384
-              <option value="<?= display_str($MediaName); ?>"<?php Format::selected('media', $MediaName) ?>><?= display_str($MediaName); ?>
392
+              <option value="<?= display_str($MediaName); ?>" <?php Format::selected('media', $MediaName) ?>><?= display_str($MediaName); ?>
385
               </option>
393
               </option>
386
               <?php } ?>
394
               <?php } ?>
387
             </select>
395
             </select>
394
           <td class="nobr" colspan="3">
402
           <td class="nobr" colspan="3">
395
             <select name="censored" class="ft_censored">
403
             <select name="censored" class="ft_censored">
396
               <option value="3">Alignment</option>
404
               <option value="3">Alignment</option>
397
-              <option value="1"<?Format::selected('censored', 1)?>>Aligned</option>
398
-              <option value="0"<?Format::selected('censored', 0)?>>Unaligned</option>
405
+              <option value="1" <?Format::selected('censored', 1)?>>Aligned
406
+              </option>
407
+              <option value="0" <?Format::selected('censored', 0)?>>Unaligned
408
+              </option>
399
             </select>
409
             </select>
400
           </td>
410
           </td>
401
         </tr>
411
         </tr>
404
         <tr>
414
         <tr>
405
           <td class="label"><strong>Tags</strong></td>
415
           <td class="label"><strong>Tags</strong></td>
406
           <td>
416
           <td>
407
-            <input type="search" name="tags" size="60" value="<?php Format::form('tags') ?>" />&nbsp;
408
-            <input type="radio" name="tags_type" id="tags_type0" value="0"<?php Format::selected('tags_type', 0, 'checked') ?> /><label for="tags_type0"> Any</label>&nbsp;&nbsp;
409
-            <input type="radio" name="tags_type" id="tags_type1" value="1"<?php Format::selected('tags_type', 1, 'checked') ?> /><label for="tags_type1"> All</label><br />
417
+            <input type="search" name="tags" size="60"
418
+              value="<?php Format::form('tags') ?>" />&nbsp;
419
+            <input type="radio" name="tags_type" id="tags_type0" value="0" <?php Format::selected('tags_type', 0, 'checked') ?>
420
+            /><label for="tags_type0"> Any</label>&nbsp;&nbsp;
421
+            <input type="radio" name="tags_type" id="tags_type1" value="1" <?php Format::selected('tags_type', 1, 'checked') ?>
422
+            /><label for="tags_type1"> All</label><br />
410
             Use !tag to exclude tags
423
             Use !tag to exclude tags
411
           </td>
424
           </td>
412
         </tr>
425
         </tr>
417
           <td>
430
           <td>
418
             <select name="order" class="ft_order_by">
431
             <select name="order" class="ft_order_by">
419
               <?php foreach ($Orders as $OrderText) { ?>
432
               <?php foreach ($Orders as $OrderText) { ?>
420
-              <option value="<?= $OrderText ?>"<?php Format::selected('order', $OrderText) ?>><?= $OrderText ?>
433
+              <option value="<?= $OrderText ?>" <?php Format::selected('order', $OrderText) ?>><?= $OrderText ?>
421
               </option>
434
               </option>
422
               <?php } ?>
435
               <?php } ?>
423
             </select>
436
             </select>
424
 
437
 
425
             <select name="way" class="ft_order_way">
438
             <select name="way" class="ft_order_way">
426
               <?php foreach ($Ways as $WayKey=>$WayText) { ?>
439
               <?php foreach ($Ways as $WayKey=>$WayText) { ?>
427
-              <option value="<?= $WayKey ?>"<?php Format::selected('way', $WayKey) ?>><?= $WayText ?>
440
+              <option value="<?= $WayKey ?>" <?php Format::selected('way', $WayKey) ?>><?= $WayText ?>
428
               </option>
441
               </option>
429
               <?php } ?>
442
               <?php } ?>
430
             </select>
443
             </select>
434
 
447
 
435
       <!-- Categories -->
448
       <!-- Categories -->
436
       <table class="layout cat_list">
449
       <table class="layout cat_list">
437
-<?php
450
+        <?php
438
 $x = 0;
451
 $x = 0;
439
 reset($Categories);
452
 reset($Categories);
440
 foreach ($Categories as $CatKey => $CatName) {
453
 foreach ($Categories as $CatKey => $CatName) {
442
         if ($x > 0) {
455
         if ($x > 0) {
443
             ?>
456
             ?>
444
         </tr>
457
         </tr>
445
-<?php
458
+        <?php
446
         } ?>
459
         } ?>
447
         <tr>
460
         <tr>
448
-<?php
461
+          <?php
449
     }
462
     }
450
     $x++; ?>
463
     $x++; ?>
451
           <td>
464
           <td>
452
-            <input type="checkbox" name="categories[<?= ($CatKey+1) ?>]" id="cat_<?= ($CatKey+1) ?>" value="1"<?php if (isset($_GET['categories'][$CatKey + 1])) { ?> checked="checked"<?php } ?> />
465
+            <input type="checkbox"
466
+              name="categories[<?= ($CatKey+1) ?>]"
467
+              id="cat_<?= ($CatKey+1) ?>" value="1" <?php if (isset($_GET['categories'][$CatKey + 1])) { ?>
468
+            checked="checked"<?php } ?> />
453
             <label for="cat_<?= ($CatKey + 1) ?>"><?= $CatName ?></label>
469
             <label for="cat_<?= ($CatKey + 1) ?>"><?= $CatName ?></label>
454
           </td>
470
           </td>
455
-<?php
471
+          <?php
456
 }
472
 }
457
 ?>
473
 ?>
458
         </tr>
474
         </tr>
460
 
476
 
461
       <!-- Submit -->
477
       <!-- Submit -->
462
       <div class="submit">
478
       <div class="submit">
463
-        <span class="float_left"><?= number_format($TorrentCount) ?> Results</span>
479
+        <span class="float_left"><?= number_format($TorrentCount) ?>
480
+          Results</span>
464
         <input type="submit" value="Search" />
481
         <input type="submit" value="Search" />
465
       </div>
482
       </div>
466
     </form>
483
     </form>
467
   </div>
484
   </div>
468
 
485
 
469
   <!-- Results table -->
486
   <!-- Results table -->
470
-<?php if (count($GroupIDs) === 0) { ?>
487
+  <?php if (count($GroupIDs) === 0) { ?>
471
   <div class="center">
488
   <div class="center">
472
     Nothing found!
489
     Nothing found!
473
   </div>
490
   </div>
474
-<?php } else { ?>
475
-  <div class="linkbox"><?=$Pages?></div>
491
+  <?php } else { ?>
492
+  <div class="linkbox"><?=$Pages?>
493
+  </div>
476
   <div class="box">
494
   <div class="box">
477
-  <table class="torrent_table cats" width="100%">
478
-    <tr class="colhead">
479
-      <td class="cats_col"></td>
480
-      <td><a href="<?= header_link('Name', 'ASC') ?>">Torrent</a></td>
481
-      <td><a href="<?= header_link('Time') ?>">Time</a></td>
482
-      <td><a href="<?= header_link('Size') ?>">Size</a></td>
483
-      <td class="sign snatches">
484
-        <a href="<?= header_link('Snatched') ?>">
485
-          <svg width="15" height="15" fill="black" class="tooltip" alt="Snatches" title="Snatches" viewBox="3 0 88 98"><path d="M20 20 A43 43,0,1,0,77 23 L90 10 L55 10 L55 45 L68 32 A30.27 30.27,0,1,1,28 29"></path></svg>
486
-        </a>
487
-      </td>
488
-      <td class="sign seeders">
489
-        <a href="<?= header_link('Seeders') ?>">
490
-          <svg width="11" height="15" fill="black" class="tooltip" alt="Seeders" title="Seeders"><polygon points="0,7 5.5,0 11,7 8,7 8,15 3,15 3,7"></polygon></svg>
491
-        </a>
492
-      </td>
493
-      <td class="sign leechers">
494
-        <a href="<?= header_link('Leechers') ?>">
495
-          <svg width="11" height="15" fill="black" class="tooltip" alt="Leechers" title="Leechers"><polygon points="0,8 5.5,15 11,8 8,8 8,0 3,0 3,8"></polygon></svg>
496
-        </a>
497
-      </td>
498
-    </tr>
499
-
500
-    <!-- Results list -->
501
-<?php
495
+    <table class="torrent_table cats" width="100%">
496
+      <tr class="colhead">
497
+        <td class="cats_col"></td>
498
+        <td><a
499
+            href="<?= header_link('Name', 'ASC') ?>">Torrent</a>
500
+        </td>
501
+        <td><a
502
+            href="<?= header_link('Time') ?>">Time</a>
503
+        </td>
504
+        <td><a
505
+            href="<?= header_link('Size') ?>">Size</a>
506
+        </td>
507
+        <td class="sign snatches">
508
+          <a
509
+            href="<?= header_link('Snatched') ?>">
510
+            <svg width="15" height="15" fill="black" class="tooltip" alt="Snatches" title="Snatches"
511
+              viewBox="3 0 88 98">
512
+              <path d="M20 20 A43 43,0,1,0,77 23 L90 10 L55 10 L55 45 L68 32 A30.27 30.27,0,1,1,28 29"></path>
513
+            </svg>
514
+          </a>
515
+        </td>
516
+        <td class="sign seeders">
517
+          <a
518
+            href="<?= header_link('Seeders') ?>">
519
+            <svg width="11" height="15" fill="black" class="tooltip" alt="Seeders" title="Seeders">
520
+              <polygon points="0,7 5.5,0 11,7 8,7 8,15 3,15 3,7"></polygon>
521
+            </svg>
522
+          </a>
523
+        </td>
524
+        <td class="sign leechers">
525
+          <a
526
+            href="<?= header_link('Leechers') ?>">
527
+            <svg width="11" height="15" fill="black" class="tooltip" alt="Leechers" title="Leechers">
528
+              <polygon points="0,8 5.5,15 11,8 8,8 8,0 3,0 3,8"></polygon>
529
+            </svg>
530
+          </a>
531
+        </td>
532
+      </tr>
533
+
534
+      <!-- Results list -->
535
+      <?php
502
   $PageSize = 0;
536
   $PageSize = 0;
503
   foreach ($TorrentsInfo as $TorrentID => $Info) {
537
   foreach ($TorrentsInfo as $TorrentID => $Info) {
504
       list($GroupID, , $Time) = array_values($Info);
538
       list($GroupID, , $Time) = array_values($Info);
532
           $DisplayName .= " - $ExtraInfo";
566
           $DisplayName .= " - $ExtraInfo";
533
       } ?>
567
       } ?>
534
 
568
 
535
-    <tr class="torrent torrent_row<?= ($Torrent['IsSnatched'] ? ' snatched_torrent' : '') . ($GroupFlags['IsSnatched'] ? ' snatched_group' : '') ?>">
536
-      <td class="center cats_col">
537
-        <div title="<?= Format::pretty_category($GroupCategoryID) ?>" class="tooltip <?= Format::css_category($GroupCategoryID) ?>"></div>
538
-      </td>
539
-      <td class="big_info">
540
-        <div class="group_info clear">
541
-          <span class="torrent_links_block">
542
-            [ <a href="torrents.php?action=download&amp;id=<?= $TorrentID ?>&amp;authkey=<?= $LoggedUser['AuthKey'] ?>&amp;torrent_pass=<?= $LoggedUser['torrent_pass'] ?>" class="tooltip" title="Download">DL</a>
543
-            | <a href="reportsv2.php?action=report&amp;id=<?= $TorrentID ?>" class="tooltip" title="Report">RP</a> ]
544
-          </span>
545
-          <?php echo "$DisplayName\n"; ?>
546
-          <div class="tags"><?= $TorrentTags->format('torrents.php?type='.$Action.'&amp;userid='.$UserID.'&amp;tags=') ?></div>
547
-        </div>
548
-      </td>
549
-      <td class="nobr"><?= time_diff($Time, 1) ?></td>
550
-      <td class="number_column nobr"><?= Format::get_size($Torrent['Size']) ?></td>
551
-      <td class="number_column"><?= number_format($Torrent['Snatched']) ?></td>
552
-      <td class="number_column<?= (($Torrent['Seeders'] === 0) ? ' r00' : '') ?>"><?= number_format($Torrent['Seeders']) ?></td>
553
-      <td class="number_column"><?= number_format($Torrent['Leechers']) ?></td>
554
-    </tr>
555
-<?php
569
+      <tr
570
+        class="torrent torrent_row<?= ($Torrent['IsSnatched'] ? ' snatched_torrent' : '') . ($GroupFlags['IsSnatched'] ? ' snatched_group' : '') ?>">
571
+        <td class="center cats_col">
572
+          <div
573
+            title="<?= Format::pretty_category($GroupCategoryID) ?>"
574
+            class="tooltip <?= Format::css_category($GroupCategoryID) ?>">
575
+          </div>
576
+        </td>
577
+        <td class="big_info">
578
+          <div class="group_info clear">
579
+            <span class="torrent_links_block">
580
+              [ <a
581
+                href="torrents.php?action=download&amp;id=<?= $TorrentID ?>&amp;authkey=<?= $LoggedUser['AuthKey'] ?>&amp;torrent_pass=<?= $LoggedUser['torrent_pass'] ?>"
582
+                class="tooltip" title="Download">DL</a>
583
+              | <a
584
+                href="reportsv2.php?action=report&amp;id=<?= $TorrentID ?>"
585
+                class="tooltip" title="Report">RP</a> ]
586
+            </span>
587
+            <?php echo "$DisplayName\n"; ?>
588
+            <div class="tags"><?= $TorrentTags->format('torrents.php?type='.$Action.'&amp;userid='.$UserID.'&amp;tags=') ?>
589
+            </div>
590
+          </div>
591
+        </td>
592
+        <td class="nobr"><?= time_diff($Time, 1) ?>
593
+        </td>
594
+        <td class="number_column nobr"><?= Format::get_size($Torrent['Size']) ?>
595
+        </td>
596
+        <td class="number_column"><?= number_format($Torrent['Snatched']) ?>
597
+        </td>
598
+        <td
599
+          class="number_column<?= (($Torrent['Seeders'] === 0) ? ' r00' : '') ?>">
600
+          <?= number_format($Torrent['Seeders']) ?>
601
+        </td>
602
+        <td class="number_column"><?= number_format($Torrent['Leechers']) ?>
603
+        </td>
604
+      </tr>
605
+      <?php
556
   } ?>
606
   } ?>
557
-  </table>
607
+    </table>
608
+  </div>
609
+  <?php  } ?>
610
+  <div class="linkbox"><?= $Pages ?>
558
   </div>
611
   </div>
559
-<?php  } ?>
560
-  <div class="linkbox"><?= $Pages ?></div>
561
 </div>
612
 </div>
562
-<?php View::show_footer(); ?>
613
+<?php View::show_footer();

+ 142
- 68
sections/user/notify_edit.php View File

1
-<?
1
+<?php
2
 if (!check_perms('site_torrents_notify')) {
2
 if (!check_perms('site_torrents_notify')) {
3
-  error(403);
3
+    error(403);
4
 }
4
 }
5
 View::show_header('Manage notifications', 'jquery.validate,form_validate');
5
 View::show_header('Manage notifications', 'jquery.validate,form_validate');
6
 ?>
6
 ?>
7
 <div class="thin">
7
 <div class="thin">
8
   <div class="header">
8
   <div class="header">
9
-    <h2>Notify me of all new torrents with...</h2>
9
+    <h2>Notify me of all new torrents with&hellip;</h2>
10
     <div class="linkbox">
10
     <div class="linkbox">
11
       <a href="torrents.php?action=notify" class="brackets">View notifications</a>
11
       <a href="torrents.php?action=notify" class="brackets">View notifications</a>
12
     </div>
12
     </div>
13
   </div>
13
   </div>
14
-<?
14
+  <?php
15
 $DB->query("
15
 $DB->query("
16
   SELECT
16
   SELECT
17
     ID,
17
     ID,
55
 
55
 
56
 $i = 0;
56
 $i = 0;
57
 foreach ($Notifications as $N) { // $N stands for Notifications
57
 foreach ($Notifications as $N) { // $N stands for Notifications
58
-  $i++;
59
-  $NewFilter = $N['ID'] === false;
60
-  $N['Artists']      = implode(', ', explode('|', substr($N['Artists'], 1, -1)));
61
-  $N['Tags']         = implode(', ', explode('|', substr($N['Tags'], 1, -1)));
62
-  $N['NotTags']      = implode(', ', explode('|', substr($N['NotTags'], 1, -1)));
63
-  $N['ReleaseTypes'] = explode('|', substr($N['ReleaseTypes'], 1, -1));
64
-  $N['Categories']   = explode('|', substr($N['Categories'], 1, -1));
65
-  $N['Formats']      = explode('|', substr($N['Formats'], 1, -1));
66
-  $N['Encodings']    = explode('|', substr($N['Encodings'], 1, -1));
67
-  $N['Media']        = explode('|', substr($N['Media'], 1, -1));
68
-  $N['Users']        = explode('|', substr($N['Users'], 1, -1));
69
-
70
-  $Usernames = '';
71
-  foreach ($N['Users'] as $UserID) {
72
-    $UserInfo = Users::user_info($UserID);
73
-    $Usernames .= $UserInfo['Username'] . ', ';
74
-  }
75
-  $Usernames = rtrim($Usernames, ', ');
76
-
77
-  if ($N['FromYear'] == 0) {
78
-    $N['FromYear'] = '';
79
-  }
80
-  if ($N['ToYear'] == 0) {
81
-    $N['ToYear'] = '';
82
-  }
83
-  if ($NewFilter && $NumFilters > 0) {
84
-?>
58
+    $i++;
59
+    $NewFilter = $N['ID'] === false;
60
+    $N['Artists']      = implode(', ', explode('|', substr($N['Artists'], 1, -1)));
61
+    $N['Tags']         = implode(', ', explode('|', substr($N['Tags'], 1, -1)));
62
+    $N['NotTags']      = implode(', ', explode('|', substr($N['NotTags'], 1, -1)));
63
+    $N['ReleaseTypes'] = explode('|', substr($N['ReleaseTypes'], 1, -1));
64
+    $N['Categories']   = explode('|', substr($N['Categories'], 1, -1));
65
+    $N['Formats']      = explode('|', substr($N['Formats'], 1, -1));
66
+    $N['Encodings']    = explode('|', substr($N['Encodings'], 1, -1));
67
+    $N['Media']        = explode('|', substr($N['Media'], 1, -1));
68
+    $N['Users']        = explode('|', substr($N['Users'], 1, -1));
69
+
70
+    $Usernames = '';
71
+    foreach ($N['Users'] as $UserID) {
72
+        $UserInfo = Users::user_info($UserID);
73
+        $Usernames .= $UserInfo['Username'] . ', ';
74
+    }
75
+    $Usernames = rtrim($Usernames, ', ');
76
+
77
+    if ($N['FromYear'] === 0) {
78
+        $N['FromYear'] = '';
79
+    }
80
+    if ($N['ToYear'] === 0) {
81
+        $N['ToYear'] = '';
82
+    }
83
+    if ($NewFilter && $NumFilters > 0) {
84
+        ?>
85
   <br><br>
85
   <br><br>
86
   <h3>Create a new notification filter</h3>
86
   <h3>Create a new notification filter</h3>
87
-<?  } elseif ($NumFilters > 0) { ?>
87
+  <?php
88
+    } elseif ($NumFilters > 0) { ?>
88
   <h3>
89
   <h3>
89
-    <a href="feeds.php?feed=torrents_notify_<?=$N['ID']?>_<?=$LoggedUser['torrent_pass']?>&amp;user=<?=$LoggedUser['ID']?>&amp;auth=<?=$LoggedUser['RSS_Auth']?>&amp;passkey=<?=$LoggedUser['torrent_pass']?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;name=<?=urlencode($N['Label'])?>"><img src="<?=STATIC_SERVER?>/common/symbols/rss.png" alt="RSS feed"></a>
90
+    <a
91
+      href="feeds.php?feed=torrents_notify_<?=$N['ID']?>_<?=$LoggedUser['torrent_pass']?>&amp;user=<?=$LoggedUser['ID']?>&amp;auth=<?=$LoggedUser['RSS_Auth']?>&amp;passkey=<?=$LoggedUser['torrent_pass']?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;name=<?=urlencode($N['Label'])?>"><img
92
+        src="<?=STATIC_SERVER?>/common/symbols/rss.png"
93
+        alt="RSS feed"></a>
90
     <?=display_str($N['Label'])?>
94
     <?=display_str($N['Label'])?>
91
-    <a href="user.php?action=notify_delete&amp;id=<?=$N['ID']?>&amp;auth=<?=$LoggedUser['AuthKey']?>" onclick="return confirm('Are you sure you want to delete this notification filter?')" class="brackets">Delete</a>
92
-    <a data-toggle-target="#filter_<?=$N['ID']?>" class="brackets">Show</a>
95
+    <a href="user.php?action=notify_delete&amp;id=<?=$N['ID']?>&amp;auth=<?=$LoggedUser['AuthKey']?>"
96
+      onclick="return confirm('Are you sure you want to delete this notification filter?')" class="brackets">Delete</a>
97
+    <a data-toggle-target="#filter_<?=$N['ID']?>"
98
+      class="brackets">Show</a>
93
   </h3>
99
   </h3>
94
-<?  } ?>
95
-  <form class="box pad slight_margin <?=($NewFilter ? 'create_form' : 'edit_form')?>" id="<?=($NewFilter ? 'filter_form' : '')?>" name="notification" action="user.php" method="post">
100
+  <?php  } ?>
101
+  <form
102
+    class="box pad slight_margin <?=($NewFilter ? 'create_form' : 'edit_form')?>"
103
+    id="<?=($NewFilter ? 'filter_form' : '')?>"
104
+    name="notification" action="user.php" method="post">
96
     <input type="hidden" name="formid" value="<?=$i?>">
105
     <input type="hidden" name="formid" value="<?=$i?>">
97
     <input type="hidden" name="action" value="notify_handle">
106
     <input type="hidden" name="action" value="notify_handle">
98
-    <input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>">
99
-<?  if (!$NewFilter) { ?>
100
-    <input type="hidden" name="id<?=$i?>" value="<?=$N['ID']?>">
101
-<?  } ?>
107
+    <input type="hidden" name="auth"
108
+      value="<?=$LoggedUser['AuthKey']?>">
109
+    <?php  if (!$NewFilter) { ?>
110
+    <input type="hidden" name="id<?=$i?>"
111
+      value="<?=$N['ID']?>">
112
+    <?php  } ?>
102
     <table <?=(!$NewFilter ? 'id="filter_'.$N['ID'].'" class="layout hidden"' : 'class="layout"')?>>
113
     <table <?=(!$NewFilter ? 'id="filter_'.$N['ID'].'" class="layout hidden"' : 'class="layout"')?>>
103
-<?  if ($NewFilter) { ?>
114
+      <?php  if ($NewFilter) { ?>
115
+
104
       <tr>
116
       <tr>
105
-        <td class="label"><strong>Notification filter name</strong></td>
117
+        <td class="label">
118
+          <strong>Notification filter name</strong>
119
+          <strong class="important_text">*</strong>
120
+        </td>
106
         <td>
121
         <td>
107
-          <input type="text" class="required" name="label<?=$i?>" style="width: 100%;">
108
-          <p class="min_padding">A name for the notification filter set to tell different filters apart.</p>
122
+          <input type="text" class="required" name="label<?=$i?>"
123
+            style="width: 100%;">
124
+          <p class="min_padding">A name for the notification filter set to tell different filters apart</p>
109
         </td>
125
         </td>
110
       </tr>
126
       </tr>
127
+
128
+      <!--
111
       <tr>
129
       <tr>
112
         <td colspan="2" class="center">
130
         <td colspan="2" class="center">
113
           <strong>All fields below here are optional</strong>
131
           <strong>All fields below here are optional</strong>
114
         </td>
132
         </td>
115
       </tr>
133
       </tr>
116
-<?  } ?>
134
+      -->
135
+
136
+      <?php  } ?>
137
+
117
       <tr>
138
       <tr>
118
         <td class="label"><strong>One of these artists</strong></td>
139
         <td class="label"><strong>One of these artists</strong></td>
119
         <td>
140
         <td>
120
-          <textarea name="artists<?=$i?>" style="width: 100%;" rows="5"><?=display_str($N['Artists'])?></textarea>
121
-          <p class="min_padding">Comma-separated list&#8202;&mdash;&#8202;e.g. <em>Yumeno Aika, Pink Pineapple, Sayama Ai</em></p>
122
-          <input type="checkbox" name="excludeva<?=$i?>" id="excludeva_<?=$N['ID']?>"<? if ($N['ExcludeVA'] == '1') { echo ' checked="checked"';} ?>>
123
-          <label for="excludeva_<?=$N['ID']?>">Exclude Various Artists releases</label>
141
+          <textarea name="artists<?=$i?>" style="width: 100%;"
142
+            rows="5"><?=display_str($N['Artists'])?></textarea>
143
+          <p class="min_padding">Comma-separated list, e.g., Yumeno Aika, Pink Pineapple</p>
144
+          <!--
145
+          <input type="checkbox" name="excludeva<?=$i?>"
146
+          id="excludeva_<?=$N['ID']?>" <?php if ($N['ExcludeVA'] === '1') {
147
+        echo ' checked="checked"';
148
+    } ?>>
149
+          <label
150
+            for="excludeva_<?=$N['ID']?>">Exclude
151
+            Various Artists releases</label>
152
+          -->
124
         </td>
153
         </td>
125
       </tr>
154
       </tr>
155
+
126
       <tr>
156
       <tr>
127
         <td class="label"><strong>One of these users</strong></td>
157
         <td class="label"><strong>One of these users</strong></td>
128
         <td>
158
         <td>
129
-          <textarea name="users<?=$i?>" style="width: 100%;" rows="5"><?=display_str($Usernames)?></textarea>
159
+          <textarea name="users<?=$i?>" style="width: 100%;"
160
+            rows="5"><?=display_str($Usernames)?></textarea>
130
           <p class="min_padding">Comma-separated list of usernames</p>
161
           <p class="min_padding">Comma-separated list of usernames</p>
131
         </td>
162
         </td>
132
       </tr>
163
       </tr>
164
+
133
       <tr>
165
       <tr>
134
         <td class="label"><strong>At least one of these tags</strong></td>
166
         <td class="label"><strong>At least one of these tags</strong></td>
135
         <td>
167
         <td>
136
-          <textarea name="tags<?=$i?>" style="width: 100%;" rows="2"><?=display_str($N['Tags'])?></textarea>
137
-          <p class="min_padding">Comma-separated list&#8202;&mdash;&#8202;e.g. <em>big.breasts, paizuri, nakadashi</em></p>
168
+          <textarea name="tags<?=$i?>" style="width: 100%;"
169
+            rows="2"><?=display_str($N['Tags'])?></textarea>
170
+          <p class="min_padding">Comma-separated list, e.g., paizuri, nakadashi
171
+          </p>
138
         </td>
172
         </td>
139
       </tr>
173
       </tr>
174
+
140
       <tr>
175
       <tr>
141
         <td class="label"><strong>None of these tags</strong></td>
176
         <td class="label"><strong>None of these tags</strong></td>
142
         <td>
177
         <td>
143
-          <textarea name="nottags<?=$i?>" style="width: 100%;" rows="2"><?=display_str($N['NotTags'])?></textarea>
144
-          <p class="min_padding">Comma-separated list&#8202;&mdash;&#8202;e.g. <em>big.breasts, paizuri, nakadashi</em></p>
178
+          <textarea name="nottags<?=$i?>" style="width: 100%;"
179
+            rows="2"><?=display_str($N['NotTags'])?></textarea>
180
+          <p class="min_padding">Comma-separated list, e.g., paizuri, nakadashi
181
+          </p>
145
         </td>
182
         </td>
146
       </tr>
183
       </tr>
184
+
147
       <tr>
185
       <tr>
148
         <td class="label"><strong>Only these categories</strong></td>
186
         <td class="label"><strong>Only these categories</strong></td>
149
         <td>
187
         <td>
150
-<?  foreach ($Categories as $Category) { ?>
151
-          <input type="checkbox" name="categories<?=$i?>[]" id="<?=$Category?>_<?=$N['ID']?>" value="<?=$Category?>"<? if (in_array($Category, $N['Categories'])) { echo ' checked="checked"';} ?>>
152
-          <label for="<?=$Category?>_<?=$N['ID']?>"><?=$Category?></label>
153
-<?  } ?>
188
+          <?php  foreach ($Categories as $Category) { ?>
189
+          <input type="checkbox" name="categories<?=$i?>[]"
190
+            id="<?=$Category?>_<?=$N['ID']?>"
191
+            value="<?=$Category?>" <?php if (in_array($Category, $N['Categories'])) {
192
+        echo ' checked="checked"';
193
+    } ?>>
194
+          <label
195
+            for="<?=$Category?>_<?=$N['ID']?>"><?=$Category?></label><br />
196
+          <?php  } ?>
197
+        </td>
198
+      </tr>
199
+
200
+      <tr>
201
+        <td class="label"><strong>Only these media</strong></td>
202
+        <td>
203
+          <?php  foreach ($Media as $Medium) { ?>
204
+          <input type="checkbox" name="media<?=$i?>[]"
205
+            id="<?=$Medium?>_<?=$N['ID']?>"
206
+            value="<?=$Medium?>" <?php if (in_array($Medium, $N['Media'])) {
207
+        echo ' checked="checked"';
208
+    } ?>>
209
+          <label
210
+            for="<?=$Medium?>_<?=$N['ID']?>"><?=$Medium?></label><br />
211
+          <?php  } ?>
154
         </td>
212
         </td>
155
       </tr>
213
       </tr>
214
+
156
       <tr>
215
       <tr>
157
         <td class="label"><strong>Only these media</strong></td>
216
         <td class="label"><strong>Only these media</strong></td>
158
         <td>
217
         <td>
159
-<?  foreach ($Media as $Medium) { ?>
160
-          <input type="checkbox" name="media<?=$i?>[]" id="<?=$Medium?>_<?=$N['ID']?>" value="<?=$Medium?>"<? if (in_array($Medium, $N['Media'])) { echo ' checked="checked"';} ?>>
161
-          <label for="<?=$Medium?>_<?=$N['ID']?>"><?=$Medium?></label>
162
-<?  } ?>
218
+          <?php  foreach ($MediaManga as $Medium) { ?>
219
+          <input type="checkbox" name="media<?=$i?>[]"
220
+            id="<?=$Medium?>_<?=$N['ID']?>"
221
+            value="<?=$Medium?>" <?php if (in_array($Medium, $N['Media'])) {
222
+        echo ' checked="checked"';
223
+    } ?>>
224
+          <label
225
+            for="<?=$Medium?>_<?=$N['ID']?>"><?=$Medium?></label><br />
226
+          <?php  } ?>
163
         </td>
227
         </td>
164
       </tr>
228
       </tr>
229
+
165
       <tr>
230
       <tr>
166
         <td class="label"><strong>Only new releases</strong></td>
231
         <td class="label"><strong>Only new releases</strong></td>
167
         <td>
232
         <td>
168
-          <input type="checkbox" name="newgroupsonly<?=$i?>" id="newgroupsonly_<?=$N['ID']?>"<? if ($N['NewGroupsOnly'] == '1') { echo ' checked="checked"';} ?>>
169
-<label for="newgroupsonly_<?=$N['ID']?>">Only notify for new releases, not new formats</label>
233
+          <input type="checkbox" name="newgroupsonly<?=$i?>"
234
+            id="newgroupsonly_<?=$N['ID']?>"
235
+            <?php if ($N['NewGroupsOnly'] == '1') { # todo: Fix strict equality checking
236
+        echo ' checked="checked"';
237
+    } ?>>
238
+          <label
239
+            for="newgroupsonly_<?=$N['ID']?>">Only
240
+            notify for new releases, not new formats</label>
170
         </td>
241
         </td>
171
       </tr>
242
       </tr>
243
+
172
       <tr>
244
       <tr>
173
         <td colspan="2" class="center">
245
         <td colspan="2" class="center">
174
-          <input type="submit" value="<?=($NewFilter ? 'Create filter' : 'Update filter')?>">
246
+          <input type="submit"
247
+            value="<?=($NewFilter ? 'Create' : 'Update')?>">
175
         </td>
248
         </td>
176
       </tr>
249
       </tr>
177
     </table>
250
     </table>
178
   </form>
251
   </form>
179
-<? } ?>
252
+  <?php
253
+} ?>
180
 </div>
254
 </div>
181
-<? View::show_footer(); ?>
255
+<?php View::show_footer();

Loading…
Cancel
Save