Browse Source

Overhaul request form and support medical imaging

pjc 5 years ago
parent
commit
c5053dcec0

+ 20
- 18
classes/torrent_form.class.php View File

10
     #var $Formats = [];
10
     #var $Formats = [];
11
     #var $Bitrates = [];
11
     #var $Bitrates = [];
12
     public $Media = [];
12
     public $Media = [];
13
-    #var $MediaManga = [];
13
+    var $MediaManga = [];
14
     public $Containers = [];
14
     public $Containers = [];
15
     #var $ContainersGames = [];
15
     #var $ContainersGames = [];
16
     public $Codecs = [];
16
     public $Codecs = [];
32
         $this->Torrent = $Torrent;
32
         $this->Torrent = $Torrent;
33
         $this->Error = $Error;
33
         $this->Error = $Error;
34
 
34
 
35
-        global $UploadForm, $Categories, $Media, $TorrentID, $Containers, $Codecs, $Resolutions, $Archives;
35
+        global $UploadForm, $Categories, $Media,  $MediaManga, $TorrentID, $Containers, $Codecs, $Resolutions, $Archives;
36
         #global $UploadForm, $Categories, $Formats, $Bitrates, $Media, $MediaManga, $TorrentID, $Containers, $ContainersGames, $Codecs, $Resolutions, $AudioFormats, $Subbing, $Languages, $Platform, $Archives, $ArchivesManga;
36
         #global $UploadForm, $Categories, $Formats, $Bitrates, $Media, $MediaManga, $TorrentID, $Containers, $ContainersGames, $Codecs, $Resolutions, $AudioFormats, $Subbing, $Languages, $Platform, $Archives, $ArchivesManga;
37
 
37
 
38
         $this->UploadForm = $UploadForm;
38
         $this->UploadForm = $UploadForm;
40
         #$this->Formats = $Formats;
40
         #$this->Formats = $Formats;
41
         #$this->Bitrates = $Bitrates;
41
         #$this->Bitrates = $Bitrates;
42
         $this->Media = $Media;
42
         $this->Media = $Media;
43
-        #$this->MediaManga = $MediaManga;
43
+        $this->MediaManga = $MediaManga;
44
         $this->Containers = $Containers;
44
         $this->Containers = $Containers;
45
         #$this->ContainersGames = $ContainersGames;
45
         #$this->ContainersGames = $ContainersGames;
46
         $this->Codecs = $Codecs;
46
         $this->Codecs = $Codecs;
212
         </td>
212
         </td>
213
       </tr>
213
       </tr>
214
       <?php
214
       <?php
215
-            }
216
-        } ?>
215
+          }
216
+        }
217
+      ?>
217
 
218
 
218
       <!-- Rules notice and submit button -->
219
       <!-- Rules notice and submit button -->
219
       <tr>
220
       <tr>
220
         <td colspan="2" style="text-align: center;">
221
         <td colspan="2" style="text-align: center;">
221
-          <p>Be sure that your torrent is approved by the <a href="rules.php?p=upload" target="_blank">rules</a>.
222
-          Not doing this will result in a <strong class="important_text">warning</strong> or <strong class="important_text">worse</strong>.</p>
222
+          <p>
223
+            Be sure that your torrent is approved by the <a href="rules.php?p=upload" target="_blank">rules</a>.
224
+            Not doing this will result in a <strong class="important_text">warning</strong> or <strong class="important_text">worse</strong>.
225
+          </p>
223
           <?php if ($this->NewTorrent) { ?>
226
           <?php if ($this->NewTorrent) { ?>
224
           <p>
227
           <p>
225
             After uploading the torrent, you will have a one hour grace period during which no one other than you can fill requests with this torrent.
228
             After uploading the torrent, you will have a one hour grace period during which no one other than you can fill requests with this torrent.
291
 
294
 
292
   <!-- Three title fields -->
295
   <!-- Three title fields -->
293
   <tr id="title_tr">
296
   <tr id="title_tr">
294
-    <td class="label">Sequence Name</td>
297
+    <td class="label">Torrent Title</td>
295
     <td>
298
     <td>
296
       <input type="text" id="title" name="title" size="60"
299
       <input type="text" id="title" name="title" size="60"
297
         value="<?= display_str($Torrent['Title']) ?>"
300
         value="<?= display_str($Torrent['Title']) ?>"
301
   </tr>
304
   </tr>
302
 
305
 
303
   <tr id="title_rj_tr">
306
   <tr id="title_rj_tr">
304
-    <td class="label tooltip" title="">Organism
305
-    </td>
307
+    <td class="label" title="">Organism</td>
306
     <td>
308
     <td>
307
       <input type="text" id="title_rj" name="title_rj" size="60"
309
       <input type="text" id="title_rj" name="title_rj" size="60"
308
         value="<?= display_str($Torrent['TitleRJ']) ?>"
310
         value="<?= display_str($Torrent['TitleRJ']) ?>"
309
         <?= $this->Disabled ?>/><br />
311
         <?= $this->Disabled ?>/><br />
310
-      Organism line binomial nomenclature, e.g., <em>Saccharomyces cerevisiae</em>
312
+      Organism line binomial, e.g., <em>Saccharomyces cerevisiae</em>
311
     </td>
313
     </td>
312
   </tr>
314
   </tr>
313
 
315
 
317
       <input type="text" id="title_jp" name="title_jp" size="60"
319
       <input type="text" id="title_jp" name="title_jp" size="60"
318
         value="<?= display_str($Torrent['TitleJP']) ?>"
320
         value="<?= display_str($Torrent['TitleJP']) ?>"
319
         <?= $this->Disabled ?>/><br />
321
         <?= $this->Disabled ?>/><br />
320
-      Organism line if applicable, e.g., S288C
322
+      Organism line if any, e.g., S288C
321
     </td>
323
     </td>
322
   </tr>
324
   </tr>
323
 
325
 
325
   <tr id="idols_tr">
327
   <tr id="idols_tr">
326
     <td class="label tooltip" title="">Authors(s)</td>
328
     <td class="label tooltip" title="">Authors(s)</td>
327
     <td id="idolfields">
329
     <td id="idolfields">
328
-      One author per field, e.g., Robert K. Mortimer [+] David Schild<br />
330
+      One per field, e.g., Robert K. Mortimer [+] David Schild<br />
329
       <?php
331
       <?php
330
         if (!empty($Torrent['Artists'])) {
332
         if (!empty($Torrent['Artists'])) {
331
           foreach ($Torrent['Artists'] as $Num => $Artist) {
333
           foreach ($Torrent['Artists'] as $Num => $Artist) {
367
       <input type="text" id="series" name="series" size="60"
369
       <input type="text" id="series" name="series" size="60"
368
         value="<?= display_str($Torrent['Series']) ?>"
370
         value="<?= display_str($Torrent['Series']) ?>"
369
         <?= $this->Disabled ?>/><br />
371
         <?= $this->Disabled ?>/><br />
370
-      Its physical location, e.g., Berkeley, CA
372
+      Physical location, e.g., Berkeley, CA
371
     </td>
373
     </td>
372
   </tr>
374
   </tr>
373
 
375
 
417
               echo ">$Cont</option>\n";
419
               echo ">$Cont</option>\n";
418
           } ?>
420
           } ?>
419
       </select><br />
421
       </select><br />
420
-      The data's file format
422
+      Data file format
421
     </td>
423
     </td>
422
   </tr>
424
   </tr>
423
 
425
 
450
           $('#resolution').gshow()
452
           $('#resolution').gshow()
451
         }
453
         }
452
       </script><br />
454
       </script><br />
453
-      How complete the sequence is
455
+      How complete the data is
454
     </td>
456
     </td>
455
   </tr>
457
   </tr>
456
 
458
 
469
               echo ">$Archive</option>\n";
471
               echo ">$Archive</option>\n";
470
           } ?>
472
           } ?>
471
       </select><br />
473
       </select><br />
472
-      Its compression algorithm
474
+      Compression algorithm
473
     </td>
475
     </td>
474
   </tr>
476
   </tr>
475
 
477
 
530
       <input type="text" id="image" name="image" size="60"
532
       <input type="text" id="image" name="image" size="60"
531
         value="<?= display_str($Torrent['Image']) ?>"
533
         value="<?= display_str($Torrent['Image']) ?>"
532
         <?= $this->Disabled ?> /><br />
534
         <?= $this->Disabled ?> /><br />
533
-      A meaningful picture, e.g., of the specimen
535
+      A meaningful picture, e.g., the specimen or a thumbnail
534
     </td>
536
     </td>
535
   </tr>
537
   </tr>
536
 
538
 

+ 195
- 166
sections/requests/new_edit.php View File

1
 <?php
1
 <?php
2
 
2
 
3
+# @todo Fix multiple authors and bounty preview
4
+
3
 /*
5
 /*
4
  * Yeah, that's right, edit and new are the same place again.
6
  * Yeah, that's right, edit and new are the same place again.
5
  * It makes the page uglier to read but ultimately better as the alternative means
7
  * It makes the page uglier to read but ultimately better as the alternative means
18
 $Disabled = "";
20
 $Disabled = "";
19
 
21
 
20
 if ($NewRequest && ($LoggedUser['BytesUploaded'] < 250 * 1024 * 1024 || !check_perms('site_submit_requests'))) {
22
 if ($NewRequest && ($LoggedUser['BytesUploaded'] < 250 * 1024 * 1024 || !check_perms('site_submit_requests'))) {
21
-    error('You do not have enough uploaded to make a request.');
23
+    error('You do not have enough uploaded to make a request');
22
 }
24
 }
23
 
25
 
24
 if (!$NewRequest) {
26
 if (!$NewRequest) {
52
         }
54
         }
53
 
55
 
54
         $ArtistForm = Requests::get_artists($RequestID);
56
         $ArtistForm = Requests::get_artists($RequestID);
55
-
56
         $Tags = implode(', ', $Request['Tags']);
57
         $Tags = implode(', ', $Request['Tags']);
57
     }
58
     }
58
 }
59
 }
59
 
60
 
60
-if ($NewRequest && !empty($_GET['artistid']) && is_number($_GET['artistid'])) {
61
-    $DB->query("
62
-    SELECT Name
63
-    FROM artists_group
64
-    WHERE artistid = ".$_GET['artistid']."
65
-    LIMIT 1");
66
-    list($ArtistName) = $DB->next_record();
67
-    $ArtistForm = array(
68
-    1 => array(array('name' => trim($ArtistName))),
69
-  );
70
-} elseif ($NewRequest && !empty($_GET['groupid']) && is_number($_GET['groupid'])) {
71
-    $ArtistForm = Artists::get_artist($_GET['groupid']);
72
-    $DB->query("
73
-    SELECT
74
-      tg.Name,
75
-      tg.NameRJ,
76
-      tg.NameJP,
77
-      tg.Year,
78
-      tg.Studio,
79
-      tg.Series,
80
-      tg.CatalogueNumber,
81
-      tg.DLsiteID,
82
-      tg.WikiImage,
83
-      GROUP_CONCAT(t.Name SEPARATOR ', '),
84
-      tg.CategoryID
85
-    FROM torrents_group AS tg
86
-      JOIN torrents_tags AS tt ON tt.GroupID = tg.ID
87
-      JOIN tags AS t ON t.ID = tt.TagID
88
-    WHERE tg.ID = ".$_GET['groupid']);
89
-    if (list($Title, $TitleRJ, $TitleJP, $Year, $Studio, $Series, $CatalogueNumber, $DLsiteID, $Image, $Tags, $CategoryID) = $DB->next_record()) {
90
-        $GroupID = trim($_REQUEST['groupid']);
91
-        $CategoryName = $Categories[$CategoryID - 1];
92
-        $Disabled = 'readonly="readonly"';
93
-    }
94
-}
61
+  if ($NewRequest && !empty($_GET['artistid']) && is_number($_GET['artistid'])) {
62
+      $DB->query("
63
+        SELECT Name
64
+        FROM artists_group
65
+        WHERE artistid = ".$_GET['artistid']."
66
+        LIMIT 1");
67
+      list($ArtistName) = $DB->next_record();
68
+      $ArtistForm = array(
69
+      1 => array(array('name' => trim($ArtistName))),
70
+    );
71
+  } elseif ($NewRequest && !empty($_GET['groupid']) && is_number($_GET['groupid'])) {
72
+      $ArtistForm = Artists::get_artist($_GET['groupid']);
73
+      $DB->query("
74
+        SELECT
75
+        tg.Name,
76
+        tg.NameRJ,
77
+        tg.NameJP,
78
+        tg.Year,
79
+        tg.Studio,
80
+        tg.Series,
81
+        tg.CatalogueNumber,
82
+        tg.DLsiteID,
83
+        tg.WikiImage,
84
+        GROUP_CONCAT(t.Name SEPARATOR ', '),
85
+        tg.CategoryID
86
+        FROM torrents_group AS tg
87
+        JOIN torrents_tags AS tt ON tt.GroupID = tg.ID
88
+        JOIN tags AS t ON t.ID = tt.TagID
89
+        WHERE tg.ID = ".$_GET['groupid']);
90
+      if (list($Title, $TitleRJ, $TitleJP, $Year, $Studio, $Series, $CatalogueNumber, $DLsiteID, $Image, $Tags, $CategoryID) = $DB->next_record()) {
91
+          $GroupID = trim($_REQUEST['groupid']);
92
+          $CategoryName = $Categories[$CategoryID - 1];
93
+          $Disabled = 'readonly="readonly"';
94
+      }
95
+  }
95
 
96
 
96
-View::show_header(($NewRequest ? 'Create a request' : 'Edit a request'), 'bbcode,requests,form_validate');
97
+View::show_header(($NewRequest ? 'Create Request' : 'Edit Request'), 'bbcode,requests,form_validate');
97
 ?>
98
 ?>
99
+
100
+<!-- HTML title -->
98
 <div class="thin">
101
 <div class="thin">
99
   <div class="header">
102
   <div class="header">
100
-    <h2><?=($NewRequest ? 'Create a request' : 'Edit a request')?>
101
-    </h2>
103
+    <h2><?= ($NewRequest ? 'Create Request' : 'Edit Request') ?></h2>
102
   </div>
104
   </div>
103
 
105
 
106
+  <!-- New request hidden fields -->
104
   <div class="box pad">
107
   <div class="box pad">
105
     <form action="" method="post" id="request_form" onsubmit="Calculate();">
108
     <form action="" method="post" id="request_form" onsubmit="Calculate();">
106
       <div>
109
       <div>
107
         <?php  if (!$NewRequest) { ?>
110
         <?php  if (!$NewRequest) { ?>
108
         <input type="hidden" name="requestid"
111
         <input type="hidden" name="requestid"
109
-          value="<?=$RequestID?>" />
112
+          value="<?= $RequestID ?>" />
110
         <?php  } ?>
113
         <?php  } ?>
111
         <input type="hidden" name="auth"
114
         <input type="hidden" name="auth"
112
-          value="<?=$LoggedUser['AuthKey']?>" />
115
+          value="<?= $LoggedUser['AuthKey'] ?>" />
113
         <input type="hidden" name="action"
116
         <input type="hidden" name="action"
114
-          value="<?=($NewRequest ? 'takenew' : 'takeedit')?>" />
117
+          value="<?= ($NewRequest ? 'takenew' : 'takeedit') ?>" />
115
       </div>
118
       </div>
116
 
119
 
120
+      <!-- Main table -->
117
       <table class="layout">
121
       <table class="layout">
118
         <tr>
122
         <tr>
119
-          <td colspan="2" class="center">Please make sure your request follows <a href="rules.php?p=requests">the
120
-              request rules</a>!</td>
123
+          <td colspan="2" class="center">Please make sure your request follows <a href="rules.php?p=requests">the request rules</a>!</td>
121
         </tr>
124
         </tr>
122
         <?php  if ($NewRequest || $CanEdit) { ?>
125
         <?php  if ($NewRequest || $CanEdit) { ?>
126
+
127
+        <!-- Category -->
123
         <tr>
128
         <tr>
124
-          <td class="label tooltip" title="What alphabet the sequence uses, n.b., plasmids fit in the Other category">
125
-            Type</td>
129
+          <td class="label">Type</td>
126
           <td>
130
           <td>
127
             <?php if (!empty($Disabled)) { ?>
131
             <?php if (!empty($Disabled)) { ?>
128
             <input type="hidden" name="type"
132
             <input type="hidden" name="type"
129
-              value="<?=$CategoryName?>" />
133
+              value="<?= $CategoryName ?>" />
130
             <select id="categories" name="type" onchange="Categories();" disabled="disabled">
134
             <select id="categories" name="type" onchange="Categories();" disabled="disabled">
131
               <?php } else { ?>
135
               <?php } else { ?>
132
               <select id="categories" name="type" onchange="Categories();">
136
               <select id="categories" name="type" onchange="Categories();">
133
                 <?php } ?>
137
                 <?php } ?>
134
-                <?php    foreach (Misc::display_array($Categories) as $Cat) { ?>
135
-                <option value="<?=$Cat?>" <?=(!empty($CategoryName) && ($CategoryName === $Cat) ? ' selected="selected"' : '')?>><?=$Cat?>
138
+                <?php foreach (Misc::display_array($Categories) as $Cat) { ?>
139
+                <option value="<?= $Cat ?>" <?= (!empty($CategoryName) && ($CategoryName === $Cat) ? ' selected="selected"' : '') ?>><?=$Cat?>
136
                 </option>
140
                 </option>
137
                 <?php    } ?>
141
                 <?php    } ?>
138
               </select>
142
               </select>
139
           </td>
143
           </td>
140
         </tr>
144
         </tr>
145
+
146
+        <!-- Catalogue number -->
141
         <tr id="cataloguenumber_tr">
147
         <tr id="cataloguenumber_tr">
142
           <td class="label">Accession Number</td>
148
           <td class="label">Accession Number</td>
143
           <td>
149
           <td>
144
             <input type="text" id="catalogue" name="cataloguenumber" size="15"
150
             <input type="text" id="catalogue" name="cataloguenumber" size="15"
145
-              value="<?=(isset($CatalogueNumber)?$CatalogueNumber:'') ?>"
146
-              <?=$Disabled?>/>
151
+              value="<?= (isset($CatalogueNumber)?$CatalogueNumber:'') ?>"
152
+              <?= $Disabled ?>/>
147
             <?php if (empty($Disabled)) { ?>
153
             <?php if (empty($Disabled)) { ?>
148
             <input type="button" autofill="jav" value="Autofill"></input>
154
             <input type="button" autofill="jav" value="Autofill"></input>
149
             <?php } ?>
155
             <?php } ?>
150
           </td>
156
           </td>
151
         </tr>
157
         </tr>
152
-        <tr id="artist_tr">
153
-          <td class="label">Collaborator(s)</td>
154
-          <td id="artistfields">
155
-            <p id="vawarning" class="hidden">Please use the multiple artists feature rather than adding "Various
156
-              Artists" as an artist; read <a href="wiki.php?action=article&amp;id=369">this</a> for more information.
157
-            </p>
158
-            <?php
159
-    if (!empty($ArtistForm)) {
160
-        $First = true;
161
-        foreach ($ArtistForm as $Artist) {
162
-            ?>
163
-            <input type="text" id="artist_0" name="artists[]" <?php Users::has_autocomplete_enabled('other'); ?>
164
-            size="45" value="<?=display_str($Artist['name']) ?>" <?=$Disabled?>/>
165
-            <?php if (empty($Disabled)) {
166
-                if ($First) { ?><a class="add_artist_button brackets">+</a> <a
167
-              class="remove_artist_button brackets">&minus;</a><?php }
168
-                $First = false;
169
-            } ?>
170
-            <br />
171
-            <?php
172
-        }
173
-    } else {
174
-        ?> <input type="text" id="artist_0" name="artists[]" <?php Users::has_autocomplete_enabled('other'); ?>
175
-            size="45" <?=$Disabled?>/>
176
-            <?php if (empty($Disabled)) { ?>
177
-            <a class="add_artist_button brackets">+</a> <a class="remove_artist_button brackets">&minus;</a>
178
-            <?php } ?>
179
-            <?php
180
-    }
181
-?>
182
-          </td>
183
-        </tr>
158
+
159
+        <!-- Three titles -->
184
         <tr>
160
         <tr>
185
-          <td class="label tooltip" title="FASTA definition line, e.g., Alcohol dehydrogenase ADH1">Sequence Name</td>
161
+          <td class="label">Torrent Title</td>
186
           <td>
162
           <td>
187
             <input type="text" id="title" name="title" size="45"
163
             <input type="text" id="title" name="title" size="45"
188
-              value="<?=(!empty($Title) ? $Title : '')?>"
189
-              <?=$Disabled?>/>
164
+              value="<?= (!empty($Title) ? $Title : '') ?>"
165
+              <?= $Disabled ?>/>
190
           </td>
166
           </td>
191
         </tr>
167
         </tr>
168
+
192
         <tr>
169
         <tr>
193
-          <td class="label tooltip" title="FASTA organism line binomial nomenclature, e.g., Saccharomyces cerevisiae">
194
-            Organism</td>
170
+          <td class="label">Organism</td>
195
           <td>
171
           <td>
196
             <input type="text" id="title_rj" name="title_rj" size="45"
172
             <input type="text" id="title_rj" name="title_rj" size="45"
197
-              value="<?=(!empty($TitleRJ) ? $TitleRJ : '')?>"
198
-              <?=$Disabled?>/>
173
+              value="<?= (!empty($TitleRJ) ? $TitleRJ : '') ?>"
174
+              <?= $Disabled ?>/>
199
           </td>
175
           </td>
200
         </tr>
176
         </tr>
177
+
201
         <tr>
178
         <tr>
202
-          <td class="label tooltip" title="FASTA organism line if applicable, e.g., S288C">Strain/Variety</td>
179
+          <td class="label">Strain/Variety</td>
203
           <td>
180
           <td>
204
             <input type="text" id="title_jp" name="title_jp" size="45"
181
             <input type="text" id="title_jp" name="title_jp" size="45"
205
-              value="<?=!empty($TitleJP)?$TitleJP:''?>"
206
-              <?=$Disabled?>/>
182
+              value="<?= !empty($TitleJP)?$TitleJP:'' ?>"
183
+              <?= $Disabled ?>/>
207
           </td>
184
           </td>
208
         </tr>
185
         </tr>
209
-        <?php  } ?>
210
-        <?php  if ($NewRequest || $CanEdit) { ?>
186
+        <?php  } # Ends if NewRequest line 123 ?>
187
+
188
+        <!-- Multiple artists -->
189
+        <tr id="artist_tr">
190
+          <td class="label">Author(s)</td>
191
+          <td id="artistfields">
192
+            <?php
193
+              if (!empty($ArtistForm)) {
194
+                $First = true;
195
+                foreach ($ArtistForm as $Artist) {
196
+                  # Cycle autocomplete
197
+            ?>
198
+            <input type="text" id="artist_0" name="artists[]" <?php Users::has_autocomplete_enabled('other'); ?>
199
+            size="45" value="<?= display_str($Artist['name']) ?>" <?= $Disabled ?>/>
200
+            <?php
201
+              if (empty($Disabled)) {
202
+                if ($First) { ?>
203
+            <a class="add_artist_button brackets">+</a>
204
+            <a class="remove_artist_button brackets">&minus;</a>
205
+            <?php
206
+                }
207
+                $First = false;
208
+              }
209
+            ?>
210
+            <br />
211
+            <?php
212
+                }
213
+              } else {
214
+            ?>
215
+            <input type="text" id="artist_0" name="artists[]" <?php Users::has_autocomplete_enabled('other'); ?>
216
+            size="45" <?= $Disabled ?>/>
217
+            <?php if (empty($Disabled)) { ?>
218
+            <a class="add_artist_button brackets">+</a> <a class="remove_artist_button brackets">&minus;</a>
219
+            <?php
220
+                } 
221
+              }
222
+            ?>
223
+          </td>
224
+        </tr>
225
+
226
+        <!-- Picture -->
227
+        <?php if ($NewRequest || $CanEdit) { ?>
211
         <tr id="image_tr">
228
         <tr id="image_tr">
212
-          <td class="label tooltip" title="A meaningful picture, e.g., of the specimen">Picture</td>
229
+          <td class="label">Picture</td>
213
           <td>
230
           <td>
214
             <input type="text" id="image" name="image" size="45"
231
             <input type="text" id="image" name="image" size="45"
215
-              value="<?=(!empty($Image) ? $Image : '')?>"
216
-              <?=$Disabled?>/>
232
+              value="<?= (!empty($Image) ? $Image : '') ?>"
233
+              <?= $Disabled ?>/>
217
           </td>
234
           </td>
218
         </tr>
235
         </tr>
219
         <?php  } ?>
236
         <?php  } ?>
237
+
238
+        <!-- Tags -->
220
         <tr>
239
         <tr>
221
-          <td class="label tooltip" title="Comma-seperated list of tags, n.b., use vanity.house for data you produced">
222
-            Tags</td>
240
+          <td class="label">Tags</td>
223
           <td>
241
           <td>
224
             <?php
242
             <?php
225
-  $GenreTags = $Cache->get_value('genre_tags');
226
-  if (!$GenreTags) {
227
-      $DB->query('
228
-      SELECT Name
229
-      FROM tags
230
-      WHERE TagType = \'genre\'
231
-      ORDER BY Name');
232
-      $GenreTags = $DB->collect('Name');
233
-      $Cache->cache_value('genre_tags', $GenreTags, 3600 * 6);
234
-  }
243
+              $GenreTags = $Cache->get_value('genre_tags');
244
+                if (!$GenreTags) {
245
+                  $DB->query('
246
+                    SELECT Name
247
+                    FROM tags
248
+                    WHERE TagType = \'genre\'
249
+                    ORDER BY Name');
250
+                  $GenreTags = $DB->collect('Name');
251
+                  $Cache->cache_value('genre_tags', $GenreTags, 3600 * 6);
252
+                }
235
 
253
 
236
-  if (!empty($Disabled)) {
237
-      ?>
254
+                if (!empty($Disabled)) {
255
+            ?>
238
             <select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;" disabled="disabled">
256
             <select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;" disabled="disabled">
239
-              <?php
240
-  } else { ?>
241
-              <select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;">
242
-                <?php } ?>
243
-                <option>---</option>
244
-                <?php  foreach (Misc::display_array($GenreTags) as $Genre) { ?>
245
-                <option value="<?=$Genre?>"><?=$Genre?>
246
-                </option>
247
-                <?php  } ?>
248
-              </select>
249
-              <input type="text" id="tags" name="tags" size="45"
250
-                value="<?=(!empty($Tags) ? display_str($Tags) : '')?>"
251
-                <?php Users::has_autocomplete_enabled('other'); ?>
252
-              <?=$Disabled?>/>
257
+            <?php } else { ?>
258
+            <select id="genre_tags" name="genre_tags" onchange="add_tag(); return false;">
259
+              <?php } ?>
260
+              <option>---</option>
261
+              <?php foreach (Misc::display_array($GenreTags) as $Genre) { ?>
262
+              <option value="<?= $Genre ?>"><?= $Genre ?>
263
+              </option>
264
+              <?php  } ?>
265
+            </select>
266
+            <input type="text" id="tags" name="tags" size="45"
267
+              value="<?= (!empty($Tags) ? display_str($Tags) : '') ?>"
268
+              <?php Users::has_autocomplete_enabled('other'); ?>
269
+              <?= $Disabled ?>/>
253
           </td>
270
           </td>
254
         </tr>
271
         </tr>
255
-        <?php  if ($NewRequest || $CanEdit) { ?>
256
-        <?php  } ?>
272
+
273
+        <!-- Description -->
257
         <tr>
274
         <tr>
258
           <td class="label">Description</td>
275
           <td class="label">Description</td>
259
           <td>
276
           <td>
260
-            <?php          new TEXTAREA_PREVIEW('description', 'req_desc', $Request['Description']??''); ?>
277
+            <?php new TEXTAREA_PREVIEW('description', 'req_desc', $Request['Description']??''); ?>
261
           </td>
278
           </td>
262
         </tr>
279
         </tr>
280
+
281
+        <!-- Existing torrent groups -->
263
         <?php  if (check_perms('site_moderate_requests')) { ?>
282
         <?php  if (check_perms('site_moderate_requests')) { ?>
264
         <tr>
283
         <tr>
265
           <td class="label">Torrent Group</td>
284
           <td class="label">Torrent Group</td>
266
           <td>
285
           <td>
267
-            <?=site_url()?>torrents.php?id=<input type="text"
286
+            If this request matches a torrent group <strong>already existing</strong> on the site, please indicate that here.<br />
287
+            <?= site_url() ?>torrents.php?id=<input type="text"
268
               name="groupid"
288
               name="groupid"
269
-              value="<?=isset($GroupID)?$GroupID:''?>"
270
-              size="15" /><br />
271
-            If this request matches a torrent group <strong>already existing</strong> on the site, please indicate that
272
-            here.
289
+              value="<?= isset($GroupID)?$GroupID:'' ?>"
290
+              size="15" />
273
           </td>
291
           </td>
274
         </tr>
292
         </tr>
275
-        <?php  } elseif (!empty($GroupID) && ($CategoryID !== 5) && ($CategoryID !== 0)) { ?>
293
+        <?php
294
+          } elseif (!empty($GroupID)
295
+            #&& ($CategoryID !== 5) # ?
296
+            #&& ($CategoryID !== 0) # ?
297
+            ) {
298
+        ?>
299
+
300
+        <!-- Torrent group admin -->
276
         <tr>
301
         <tr>
277
           <td class="label">Torrent Group</td>
302
           <td class="label">Torrent Group</td>
278
           <td>
303
           <td>
279
-            <a href="torrents.php?id=<?=$GroupID?>"><?=site_url()?>torrents.php?id=<?=$GroupID?></a><br />
280
-            This request <?=($NewRequest ? 'will be' : 'is')?>
281
-            associated with the above torrent group.
282
-            <?php    if (!$NewRequest) { ?>
283
-            If this is incorrect, please <a
284
-              href="reports.php?action=report&amp;type=request&amp;id=<?=$RequestID?>">report
285
-              this request</a> so that staff can fix it.
286
-            <?php    } ?>
304
+            <a href="torrents.php?id=<?= $GroupID ?>"><?= site_url() ?>torrents.php?id=<?= $GroupID ?></a><br />
305
+            This request <?= ($NewRequest ? 'will be' : 'is') ?> associated with the above torrent group.
306
+            <?php if (!$NewRequest) { ?>
307
+            If this is incorrect, please
308
+            <a href="reports.php?action=report&amp;type=request&amp;id=<?= $RequestID ?>">report this request</a>
309
+            so that staff can fix it.
310
+            <?php } ?>
287
             <input type="hidden" name="groupid"
311
             <input type="hidden" name="groupid"
288
-              value="<?=$GroupID?>" />
312
+              value="<?= $GroupID ?>" />
289
           </td>
313
           </td>
290
         </tr>
314
         </tr>
291
-        <?php  }
292
-  if ($NewRequest) { ?>
315
+
316
+        <!-- Bounty -->
317
+        <?php  } if ($NewRequest) { ?>
293
         <tr id="voting">
318
         <tr id="voting">
294
-          <td class="label tooltip" title="How much upload credit the fulfiller wins">Bounty</td>
319
+          <td class="label">Bounty</td>
295
           <td>
320
           <td>
296
             <input type="text" id="amount_box" size="8"
321
             <input type="text" id="amount_box" size="8"
297
-              value="<?=(!empty($Bounty) ? $Bounty : '100')?>"
322
+              value="<?= (!empty($Bounty) ? $Bounty : '100') ?>"
298
               onchange="Calculate();" />
323
               onchange="Calculate();" />
299
             <select id="unit" name="unit" onchange="Calculate();">
324
             <select id="unit" name="unit" onchange="Calculate();">
300
-              <option value="mb" <?=(!empty($_POST['unit']) && $_POST['unit'] === 'mb' ? ' selected="selected"' : '') ?>>MB
325
+              <option value="mb" <?= (!empty($_POST['unit']) && $_POST['unit'] === 'mb' ? ' selected="selected"' : '') ?>>MB
301
               </option>
326
               </option>
302
-              <option value="gb" <?=(!empty($_POST['unit']) && $_POST['unit'] === 'gb' ? ' selected="selected"' : '') ?>>GB
327
+              <option value="gb" <?= (!empty($_POST['unit']) && $_POST['unit'] === 'gb' ? ' selected="selected"' : '') ?>>GB
303
               </option>
328
               </option>
304
             </select>
329
             </select>
305
             <input type="button" value="Preview" onclick="Calculate();" />
330
             <input type="button" value="Preview" onclick="Calculate();" />
306
-            <strong><?=($RequestTax * 100)?>% of this is deducted as
307
-              tax by the system.</strong>
331
+            <strong>The system deducts <?= ($RequestTax * 100) ?>% as tax</strong>
308
           </td>
332
           </td>
309
         </tr>
333
         </tr>
334
+
335
+        <!-- New stats -->
310
         <tr>
336
         <tr>
311
-          <td class="label">Post-Request Information</td>
337
+          <td class="label">New Stats</td>
312
           <td>
338
           <td>
313
             <input type="hidden" id="amount" name="amount"
339
             <input type="hidden" id="amount" name="amount"
314
-              value="<?=(!empty($Bounty) ? $Bounty : '100')?>" />
340
+              value="<?= (!empty($Bounty) ? $Bounty : '100') ?>" />
315
             <input type="hidden" id="current_uploaded"
341
             <input type="hidden" id="current_uploaded"
316
-              value="<?=$LoggedUser['BytesUploaded']?>" />
342
+              value="<?= $LoggedUser['BytesUploaded'] ?>" />
317
             <input type="hidden" id="current_downloaded"
343
             <input type="hidden" id="current_downloaded"
318
-              value="<?=$LoggedUser['BytesDownloaded']?>" />
319
-            Bounty after tax: <strong><span id="bounty_after_tax">90.00 MB</span></strong><br />
320
-            If you add the entered <strong><span id="new_bounty">100.00 MB</span></strong> of bounty, your new stats
321
-            will be: <br />
322
-            Uploaded: <span id="new_uploaded"><?=Format::get_size($LoggedUser['BytesUploaded'])?></span><br />
323
-            Ratio: <span id="new_ratio"><?=Format::get_ratio_html($LoggedUser['BytesUploaded'], $LoggedUser['BytesDownloaded'])?></span>
344
+              value="<?= $LoggedUser['BytesDownloaded'] ?>" />
345
+            <ul>
346
+              <!-- <li>Bounty: <span id="bounty_after_tax">90.00 MB</span></li> -->
347
+              <li>Uploaded: <span id="new_uploaded"><?= Format::get_size($LoggedUser['BytesUploaded']) ?></span></li>
348
+              <li>Ratio: <span id="new_ratio"><?= Format::get_ratio_html($LoggedUser['BytesUploaded'], $LoggedUser['BytesDownloaded']) ?></span></li>
349
+            </ul>
324
           </td>
350
           </td>
325
         </tr>
351
         </tr>
352
+
353
+        <!-- Submit -->
326
         <tr>
354
         <tr>
327
           <td colspan="2" class="center">
355
           <td colspan="2" class="center">
328
-            <input type="submit" id="button" value="Create request" disabled="disabled" />
356
+            <input type="submit" id="button" value="Create" disabled="disabled" />
329
           </td>
357
           </td>
330
         </tr>
358
         </tr>
331
-        <?php  } else { ?>
359
+        <?php } else { ?>
332
         <tr>
360
         <tr>
333
           <td colspan="2" class="center">
361
           <td colspan="2" class="center">
334
-            <input type="submit" id="button" value="Edit request" />
362
+            <input type="submit" id="button" value="Edit" />
335
           </td>
363
           </td>
336
         </tr>
364
         </tr>
337
-        <?php  } ?>
365
+        <?php } ?>
338
       </table>
366
       </table>
339
     </form>
367
     </form>
340
   </div>
368
   </div>
341
 </div>
369
 </div>
370
+
342
 <?php
371
 <?php
343
 View::show_footer();
372
 View::show_footer();

+ 2
- 2
sections/rules/tag.php View File

1
 <?
1
 <?
2
 //Include the header
2
 //Include the header
3
-View::show_header('Tagging rules');
3
+View::show_header('Tagging Rules');
4
 ?>
4
 ?>
5
 <!-- General Rules -->
5
 <!-- General Rules -->
6
 <div class="thin">
6
 <div class="thin">
7
   <div class="header">
7
   <div class="header">
8
-    <h3 id="general">Tagging rules</h3>
8
+    <h3 id="general">Tagging Rules</h3>
9
   </div>
9
   </div>
10
   <div class="box pad rule_summary" style="padding: 10px 10px 10px 20px;">
10
   <div class="box pad rule_summary" style="padding: 10px 10px 10px 20px;">
11
 <?    Rules::display_site_tag_rules(false) ?>
11
 <?    Rules::display_site_tag_rules(false) ?>

+ 2
- 2
sections/torrents/browse.php View File

166
         <tr id="artist_name" class="ftr_advanced<?=$HideAdvanced?>">
166
         <tr id="artist_name" class="ftr_advanced<?=$HideAdvanced?>">
167
           <td class="label"><!--Artist name:--></td>
167
           <td class="label"><!--Artist name:--></td>
168
           <td class="ft_artistname">
168
           <td class="ft_artistname">
169
-            <input type="search" spellcheck="false" size="65" name="artistname" class="inputtext smaller fti_advanced" placeholder="Collaborator Name" value="<?Format::form('artistname')?>" />
169
+            <input type="search" spellcheck="false" size="65" name="artistname" class="inputtext smaller fti_advanced" placeholder="Author Name" value="<?Format::form('artistname')?>" />
170
           </td>
170
           </td>
171
         </tr>
171
         </tr>
172
         <tr id="album_torrent_name" class="ftr_advanced<?=$HideAdvanced?>">
172
         <tr id="album_torrent_name" class="ftr_advanced<?=$HideAdvanced?>">
173
           <td class="label"><!--Torrent name:--></td>
173
           <td class="label"><!--Torrent name:--></td>
174
           <td class="ft_groupname">
174
           <td class="ft_groupname">
175
-            <input type="search" spellcheck="false" size="65" name="advgroupname" class="inputtext smaller fti_advanced" placeholder="Sequence Name" value="<?Format::form('advgroupname')?>" />
175
+            <input type="search" spellcheck="false" size="65" name="advgroupname" class="inputtext smaller fti_advanced" placeholder="Torrent Title" value="<?Format::form('advgroupname')?>" />
176
           </td>
176
           </td>
177
         </tr>
177
         </tr>
178
         <tr id="catalogue_number" class="ftr_advanced<?=$HideAdvanced?>">
178
         <tr id="catalogue_number" class="ftr_advanced<?=$HideAdvanced?>">

+ 3
- 1
sections/upload/upload_handle.php View File

752
         $ArtistNameList[] = "Artists LIKE '%|".db_string(str_replace('\\', '\\\\', $Artist['name']), true)."|%'";
752
         $ArtistNameList[] = "Artists LIKE '%|".db_string(str_replace('\\', '\\\\', $Artist['name']), true)."|%'";
753
     }
753
     }
754
     // Don't add notification if >2 main artists or if tracked artist isn't a main artist
754
     // Don't add notification if >2 main artists or if tracked artist isn't a main artist
755
+    /*
755
     if (count($ArtistNameList) > 2 || $Artist['name'] === 'Various Artists') {
756
     if (count($ArtistNameList) > 2 || $Artist['name'] === 'Various Artists') {
756
         $SQL .= " AND (ExcludeVA = '0' AND (";
757
         $SQL .= " AND (ExcludeVA = '0' AND (";
757
         $SQL .= implode(' OR ', array_merge($ArtistNameList, $GuestArtistNameList));
758
         $SQL .= implode(' OR ', array_merge($ArtistNameList, $GuestArtistNameList));
758
         $SQL .= " OR Artists = '')) AND (";
759
         $SQL .= " OR Artists = '')) AND (";
759
     } else {
760
     } else {
761
+    */
760
         $SQL .= " AND (";
762
         $SQL .= " AND (";
761
         if (!empty($GuestArtistNameList)) {
763
         if (!empty($GuestArtistNameList)) {
762
             $SQL .= "(ExcludeVA = '0' AND (";
764
             $SQL .= "(ExcludeVA = '0' AND (";
768
             $SQL .= " OR ";
770
             $SQL .= " OR ";
769
         }
771
         }
770
         $SQL .= "Artists = '') AND (";
772
         $SQL .= "Artists = '') AND (";
771
-    }
773
+    #}
772
 } else {
774
 } else {
773
     $SQL .= "AND (Artists = '') AND (";
775
     $SQL .= "AND (Artists = '') AND (";
774
 }
776
 }

static/common/bioicons/med_img.png → static/common/bioicons/imaging.png View File


+ 31
- 19
static/styles/beluga/style.css View File

18
   padding: 0
18
   padding: 0
19
 }
19
 }
20
 
20
 
21
-.cats_dna, .cats_mrna, .cats_rrna, .cats_trna, .cats_protein, .cats_other {
21
+.cats_dna, .cats_rna, .cats_protein, .cats_imaging, .cats_other {
22
   /* width: 36px!important; */
22
   /* width: 36px!important; */
23
   height: 36px!important;
23
   height: 36px!important;
24
   line-height: 36px;
24
   line-height: 36px;
25
 }
25
 }
26
-.group .cats_dna:after, .group .cats_mrna:after,
27
-.group .cats_rrna:after, .group .cats_trna:after,
28
-.group .cats_protein:after, .group .cats_other:after {
26
+.group .cats_dna:after, .group .cats_rna:after, .group .cats_protein:after,
27
+.group .cats_imaging:after, .group .cats_other:after {
29
   color: black!important;
28
   color: black!important;
30
 }
29
 }
30
+
31
+/* DNA */
31
 .cats_dna:after {
32
 .cats_dna:after {
32
   content: "DNA";
33
   content: "DNA";
33
   color: #3EACA7;
34
   color: #3EACA7;
35
   letter-spacing: -2px;
36
   letter-spacing: -2px;
36
 }
37
 }
37
 .group .cats_dna { background-color: #3EACA7; }
38
 .group .cats_dna { background-color: #3EACA7; }
38
-.cats_mrna:after {
39
-  content: "mRNA";
39
+
40
+/* RNA */
41
+.cats_rna:after {
42
+  content: "RNA";
40
   color: #1D818E;
43
   color: #1D818E;
41
   font-size: 18px;
44
   font-size: 18px;
42
   letter-spacing: -2px;
45
   letter-spacing: -2px;
43
 }
46
 }
44
-.group .cats_mrna { background-color: #1D818E; }
45
-.cats_rrna:after {
46
-  content: "rRNA";
47
+.group .cats_rna { background-color: #1D818E; }
48
+
49
+/* Protein */
50
+.cats_protein:after {
51
+  content: "PROT";
47
   color: #88C796;
52
   color: #88C796;
48
   font-size: 18px;
53
   font-size: 18px;
49
   letter-spacing: -2px;
54
   letter-spacing: -2px;
50
 }
55
 }
51
-.group .cats_rrna { background-color: #88C796; }
52
-.cats_trna:after {
53
-  content: "tRNA";
56
+.group .cats_protein { background-color: #88C796; }
57
+
58
+/* Imaging */
59
+.cats_imaging:after {
60
+  content: "IMG";
54
   color: #4DC593;
61
   color: #4DC593;
55
   font-size: 18px;
62
   font-size: 18px;
56
   letter-spacing: -2px;
63
   letter-spacing: -2px;
57
 }
64
 }
58
-.group .cats_trna { background-color: #4DC593; }
59
-.cats_protein:after {
60
-  content: "PROT";
65
+.group .cats_imaging { background-color: #4DC593; }
66
+
67
+/* Other */
68
+.cats_other:after {
69
+  content: "MISC";
61
   color: #77C5D4;
70
   color: #77C5D4;
62
   font-size: 18px;
71
   font-size: 18px;
63
   letter-spacing: -2px;
72
   letter-spacing: -2px;
64
 }
73
 }
65
-.group .cats_protein { background-color: #77C5D4; }
66
-.cats_other:after {
67
-  content: "MISC";
74
+.group .cats_other { background-color: #77C5D4; }
75
+
76
+/* Unused
77
+.cats_unused:after {
78
+  content: "NIL";
68
   color: #0D5968;
79
   color: #0D5968;
69
   font-size: 18px;
80
   font-size: 18px;
70
   letter-spacing: -2px;
81
   letter-spacing: -2px;
71
 }
82
 }
72
-.group .cats_other { background-color: #0D5968; }
83
+.group .cats_unused { background-color: #0D5968; }
84
+*/
73
 
85
 
74
 body {
86
 body {
75
   width: 100%;
87
   width: 100%;

+ 2
- 3
static/styles/oppai/style.css View File

6
 
6
 
7
 /* We're going to opt for the category icon method for now, tags_* is also available */
7
 /* We're going to opt for the category icon method for now, tags_* is also available */
8
 .cats_dna { width: 36px; height: 36px; background: url('/static/common/bioicons/dna.png') no-repeat center center; }
8
 .cats_dna { width: 36px; height: 36px; background: url('/static/common/bioicons/dna.png') no-repeat center center; }
9
-.cats_mrna { width: 36px; height: 36px; background: url('/static/common/bioicons/rna.png') no-repeat center center; }
10
-.cats_rrna { width: 36px; height: 36px; background: url('/static/common/bioicons/rna.png') no-repeat center center; }
11
-.cats_trna { width: 36px; height: 36px; background: url('/static/common/bioicons/rna.png') no-repeat center center; }
9
+.cats_rna { width: 36px; height: 36px; background: url('/static/common/bioicons/rna.png') no-repeat center center; }
12
 .cats_protein { width: 36px; height: 36px; background: url('/static/common/bioicons/protein.png') no-repeat center center; }
10
 .cats_protein { width: 36px; height: 36px; background: url('/static/common/bioicons/protein.png') no-repeat center center; }
11
+.cats_imaging { width: 36px; height: 36px; background: url('/static/common/bioicons/imaging.png') no-repeat center center; }
13
 .cats_other { width: 36px; height: 36px; background: url('/static/common/bioicons/other.png') no-repeat center center; }
12
 .cats_other { width: 36px; height: 36px; background: url('/static/common/bioicons/other.png') no-repeat center center; }
14
 
13
 
15
 /* Global */
14
 /* Global */

Loading…
Cancel
Save