Browse Source

Repurpose upload form for sequence data

pjc 5 years ago
parent
commit
17b0ac53ca
1 changed files with 36 additions and 179 deletions
  1. 36
    179
      classes/torrent_form.class.php

+ 36
- 179
classes/torrent_form.class.php View File

6
 class TorrentForm {
6
 class TorrentForm {
7
   var $UploadForm = '';
7
   var $UploadForm = '';
8
   var $Categories = [];
8
   var $Categories = [];
9
-  var $Formats = [];
10
-  var $Bitrates = [];
9
+  #var $Formats = [];
10
+  #var $Bitrates = [];
11
   var $Media = [];
11
   var $Media = [];
12
-  var $MediaManaga = [];
12
+  #var $MediaManga = [];
13
   var $Containers = [];
13
   var $Containers = [];
14
-  var $ContainersGames = [];
14
+  #var $ContainersGames = [];
15
   var $Codecs = [];
15
   var $Codecs = [];
16
   var $Resolutions = [];
16
   var $Resolutions = [];
17
-  var $AudioFormats = [];
18
-  var $Subbing = [];
19
-  var $Languages = [];
20
-  var $Platform = [];
17
+  #var $AudioFormats = [];
18
+  #var $Subbing = [];
19
+  #var $Languages = [];
20
+  #var $Platform = [];
21
   var $NewTorrent = false;
21
   var $NewTorrent = false;
22
   var $Torrent = [];
22
   var $Torrent = [];
23
   var $Error = false;
23
   var $Error = false;
31
     $this->Torrent = $Torrent;
31
     $this->Torrent = $Torrent;
32
     $this->Error = $Error;
32
     $this->Error = $Error;
33
 
33
 
34
-    global $UploadForm, $Categories, $Formats, $Bitrates, $Media, $MediaManga, $TorrentID, $Containers, $ContainersGames, $Codecs, $Resolutions, $AudioFormats, $Subbing, $Languages, $Platform, $Archives, $ArchivesManga;
34
+    global $UploadForm, $Categories, $Media, $TorrentID, $Containers, $Codecs, $Resolutions, $Archives;
35
+    #global $UploadForm, $Categories, $Formats, $Bitrates, $Media, $MediaManga, $TorrentID, $Containers, $ContainersGames, $Codecs, $Resolutions, $AudioFormats, $Subbing, $Languages, $Platform, $Archives, $ArchivesManga;
35
 
36
 
36
     $this->UploadForm = $UploadForm;
37
     $this->UploadForm = $UploadForm;
37
     $this->Categories = $Categories;
38
     $this->Categories = $Categories;
38
-    $this->Formats = $Formats;
39
-    $this->Bitrates = $Bitrates;
39
+    #$this->Formats = $Formats;
40
+    #$this->Bitrates = $Bitrates;
40
     $this->Media = $Media;
41
     $this->Media = $Media;
41
-    $this->MediaManga = $MediaManga;
42
+    #$this->MediaManga = $MediaManga;
42
     $this->Containers = $Containers;
43
     $this->Containers = $Containers;
43
-    $this->ContainersGames = $ContainersGames;
44
+    #$this->ContainersGames = $ContainersGames;
44
     $this->Codecs = $Codecs;
45
     $this->Codecs = $Codecs;
45
     $this->Resolutions = $Resolutions;
46
     $this->Resolutions = $Resolutions;
46
-    $this->AudioFormats = $AudioFormats;
47
-    $this->Subbing = $Subbing;
48
-    $this->Languages = $Languages;
47
+    #$this->AudioFormats = $AudioFormats;
48
+    #$this->Subbing = $Subbing;
49
+    #$this->Languages = $Languages;
49
     $this->TorrentID = $TorrentID;
50
     $this->TorrentID = $TorrentID;
50
-    $this->Platform = $Platform;
51
+    #$this->Platform = $Platform;
51
     $this->Archives = $Archives;
52
     $this->Archives = $Archives;
52
-    $this->ArchivesManga = $ArchivesManga;
53
+    #$this->ArchivesManga = $ArchivesManga;
53
 
54
 
54
     if ($this->Torrent && $this->Torrent['GroupID']) {
55
     if ($this->Torrent && $this->Torrent['GroupID']) {
55
       $this->Disabled = ' readonly="readonly"';
56
       $this->Disabled = ' readonly="readonly"';
114
 <?    if ($this->NewTorrent) { ?>
115
 <?    if ($this->NewTorrent) { ?>
115
     <table cellpadding="3" cellspacing="1" border="0" class="layout" width="100%">
116
     <table cellpadding="3" cellspacing="1" border="0" class="layout" width="100%">
116
       <tr>
117
       <tr>
117
-        <td class="label">Torrent file</td>
118
+        <td class="label">Torrent File</td>
118
         <td><input id="file" type="file" name="file_input" size="50" /></td>
119
         <td><input id="file" type="file" name="file_input" size="50" /></td>
119
       </tr>
120
       </tr>
120
       <tr>
121
       <tr>
199
     <table cellpadding="3" cellspacing="1" border="0" class="layout slice" width="100%">
200
     <table cellpadding="3" cellspacing="1" border="0" class="layout slice" width="100%">
200
 <? if ($this->NewTorrent) { ?>
201
 <? if ($this->NewTorrent) { ?>
201
       <tr id="javdb_tr">
202
       <tr id="javdb_tr">
202
-        <td class="label tooltip" title='Enter a JAV catalogue number, e.g., "CND-060"'>Catalogue Number</td>
203
+        <td class="label tooltip" title='RefSeq accession number, e.g., NM_000202.8'>Accession Number</td>
203
         <td>
204
         <td>
204
           <input type="text" id="catalogue" name="catalogue" size="10" value="<?=display_str($Torrent['CatalogueNumber']) ?>" <?=$this->Disabled?>/>
205
           <input type="text" id="catalogue" name="catalogue" size="10" value="<?=display_str($Torrent['CatalogueNumber']) ?>" <?=$this->Disabled?>/>
205
 <? if (!$this->DisabledFlag) { ?>
206
 <? if (!$this->DisabledFlag) { ?>
226
         </td>
227
         </td>
227
       </tr>
228
       </tr>
228
       <tr id="title_tr">
229
       <tr id="title_tr">
229
-        <td class="label">English Title</td>
230
+        <td class="label">Sequence Name</td>
230
         <td><input type="text" id="title" name="title" size="60" value="<?=display_str($Torrent['Title']) ?>" <?=$this->Disabled?>/></td>
231
         <td><input type="text" id="title" name="title" size="60" value="<?=display_str($Torrent['Title']) ?>" <?=$this->Disabled?>/></td>
231
       </tr>
232
       </tr>
232
       <tr id="title_rj_tr">
233
       <tr id="title_rj_tr">
233
-        <td class="label">Romaji Title</td>
234
+        <td class="label">Organism</td>
234
         <td><input type="text" id="title_rj" name="title_rj" size="60" value="<?=display_str($Torrent['TitleRJ']) ?>" <?=$this->Disabled?>/></td>
235
         <td><input type="text" id="title_rj" name="title_rj" size="60" value="<?=display_str($Torrent['TitleRJ']) ?>" <?=$this->Disabled?>/></td>
235
       </tr>
236
       </tr>
236
       <tr id="title_jp_tr">
237
       <tr id="title_jp_tr">
237
-        <td class="label">Japanese Title</td>
238
+        <td class="label">Strain/Variety</td>
238
         <td><input type="text" id="title_jp" name="title_jp" size="60" value="<?=display_str($Torrent['TitleJP']) ?>" <?=$this->Disabled?>/></td>
239
         <td><input type="text" id="title_jp" name="title_jp" size="60" value="<?=display_str($Torrent['TitleJP']) ?>" <?=$this->Disabled?>/></td>
239
       </tr>
240
       </tr>
240
       <tr id="idols_tr">
241
       <tr id="idols_tr">
241
-        <td class="label">Idol(s)</td>
242
+        <td class="label">Collaborator(s)</td>
242
         <td id="idolfields">
243
         <td id="idolfields">
243
 <?      if (!empty($Torrent['Artists'])) {
244
 <?      if (!empty($Torrent['Artists'])) {
244
           foreach ($Torrent['Artists'] as $Num => $Artist) { ?>
245
           foreach ($Torrent['Artists'] as $Num => $Artist) { ?>
254
         </td>
255
         </td>
255
       </tr>
256
       </tr>
256
       <tr id="studio_tr">
257
       <tr id="studio_tr">
257
-        <td class="label">Studio</td>
258
+        <td class="label">Department/Lab</td>
258
         <td><input type="text" id="studio" name="studio" size="60" value="<?=display_str($Torrent['Studio']) ?>" <?=$this->Disabled?>/></td>
259
         <td><input type="text" id="studio" name="studio" size="60" value="<?=display_str($Torrent['Studio']) ?>" <?=$this->Disabled?>/></td>
259
       </tr>
260
       </tr>
260
       <tr id="series_tr">
261
       <tr id="series_tr">
261
-        <td class="label">Series</td>
262
+        <td class="label">Location</td>
262
         <td><input type="text" id="series" name="series" size="60" value="<?=display_str($Torrent['Series']) ?>" <?=$this->Disabled?>/></td>
263
         <td><input type="text" id="series" name="series" size="60" value="<?=display_str($Torrent['Series']) ?>" <?=$this->Disabled?>/></td>
263
       </tr>
264
       </tr>
264
       <tr id="year_tr">
265
       <tr id="year_tr">
265
         <td class="label">Year</td>
266
         <td class="label">Year</td>
266
         <td><input type="text" id="year" name="year" maxlength="4" size="5" value="<?=display_str($Torrent['Year']) ?>" <?=$this->Disabled?>/></td>
267
         <td><input type="text" id="year" name="year" maxlength="4" size="5" value="<?=display_str($Torrent['Year']) ?>" <?=$this->Disabled?>/></td>
267
       </tr>
268
       </tr>
268
-      <tr id="pages_tr">
269
-        <td class="label">Pages</td>
270
-        <td><input type="text" id="pages" name="pages" maxlength="5" size="5" value="<?=display_str($Torrent['Pages']) ?>" <?=$this->Disabled?> /></td>
271
-      </tr>
272
-      <tr id="dlsite_tr">
273
-        <td class="label">DLsite ID</td>
274
-        <td><input type="text" id="dlsiteid" name="dlsiteid" size="8" maxlength="8" value="<?=display_str($Torrent['DLsiteID']??'')?>" <?=$this->Disabled?>/></td>
275
-      </tr>
276
 <? } ?>
269
 <? } ?>
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>
283
       <tr id="media_tr">
270
       <tr id="media_tr">
284
-        <td class="label">Media</td>
271
+        <td class="label">Platform</td>
285
         <td>
272
         <td>
286
           <select name="media">
273
           <select name="media">
287
             <option>---</option>
274
             <option>---</option>
293
       }
280
       }
294
       echo ">$Media</option>\n";
281
       echo ">$Media</option>\n";
295
     }
282
     }
296
-?>
297
-          </select>
298
-        </td>
299
-      </tr>
300
-      <tr id="media_manga_tr">
301
-        <td class="label">Media</td>
302
-        <td>
303
-          <select name="media">
304
-            <option>---</option>
305
-<?
306
-    foreach($this->MediaManga as $Media) {
307
-      echo "\t\t\t\t\t\t<option value=\"$Media\"";
308
-      if ($Media == ($Torrent['Media'] ?? false)) {
309
-        echo " selected";
310
-      }
311
-      echo ">$Media</option>\n";
312
-    }
313
-?>
314
-          </select>
315
-        </td>
316
-      </tr>
317
-      <tr id="media_games_tr">
318
-        <td class="label">Platform</td>
319
-        <td>
320
-          <select id="platform" name="media">
321
-            <option>---</option>
322
-<?
323
-    foreach($this->Platform as $Platform) {
324
-      echo "\t\t\t\t\t\t<option value=\"$Platform\"";
325
-      if ($Platform == ($Torrent['Media'] ?? false)) {
326
-        echo " selected";
327
-      }
328
-      echo ">$Platform</option>\n";
329
-    }
330
 ?>
283
 ?>
331
           </select>
284
           </select>
332
         </td>
285
         </td>
344
       }
297
       }
345
       echo ">$Archive</option>\n";
298
       echo ">$Archive</option>\n";
346
     }
299
     }
347
-?>
348
-          </select>
349
-        </td>
350
-      </tr>
351
-      <tr id="archive_manga_tr">
352
-        <td class='label'>Archive</td>
353
-        <td>
354
-          <select name='archive'>
355
-            <option>---</option>
356
-<?
357
-    foreach(array_merge($this->Archives, $this->ArchivesManga) as $Archive) {
358
-      echo "\t\t\t\t\t\t<option value=\"$Archive\"";
359
-      if ($Archive == ($Torrent['Archive'] ?? false)) {
360
-        echo ' selected';
361
-      }
362
-      echo ">$Archive</option>\n";
363
-    }
364
 ?>
300
 ?>
365
           </select>
301
           </select>
366
         </td>
302
         </td>
367
       </tr>
303
       </tr>
368
       <tr id="container_tr">
304
       <tr id="container_tr">
369
-        <td class="label">Container</td>
305
+        <td class="label">Format</td>
370
         <td>
306
         <td>
371
           <select name="container">
307
           <select name="container">
372
             <option>---</option>
308
             <option>---</option>
378
       }
314
       }
379
       echo ">$Cont</option>\n";
315
       echo ">$Cont</option>\n";
380
     }
316
     }
381
-?>
382
-          </select>
383
-        </td>
384
-      </tr>
385
-      <tr id="container_games_tr">
386
-        <td class="label">Container</td>
387
-        <td>
388
-          <select id="container" name="container">
389
-            <option>---</option>
390
-<?
391
-    foreach($this->ContainersGames as $Container) {
392
-      echo "\t\t\t\t\t\t<option value=\"$Container\"";
393
-      if ($Container == ($Torrent['Container'] ?? false)) {
394
-        echo " selected";
395
-      }
396
-      echo ">$Container</option>\n";
397
-    }
398
 ?>
317
 ?>
399
           </select>
318
           </select>
400
         </td>
319
         </td>
401
       </tr>
320
       </tr>
402
       <tr id="codec_tr">
321
       <tr id="codec_tr">
403
-        <td class="label">Codecs</td>
322
+        <td class="label">License</td>
404
         <td>
323
         <td>
405
           <select name="codec">
324
           <select name="codec">
406
             <option>---</option>
325
             <option>---</option>
417
         </td>
336
         </td>
418
       </tr>
337
       </tr>
419
       <tr id="resolution_tr">
338
       <tr id="resolution_tr">
420
-        <td class="label">Resolution</td>
339
+        <td class="label">Assembly Level</td>
421
         <td>
340
         <td>
422
           <select id="ressel" name="ressel" onchange="SetResolution()">
341
           <select id="ressel" name="ressel" onchange="SetResolution()">
423
             <option value="">---</option>
342
             <option value="">---</option>
441
           </script>
360
           </script>
442
         </td>
361
         </td>
443
       </tr>
362
       </tr>
444
-      <tr id="audio_tr">
445
-        <td class="label">Audio</td>
446
-        <td>
447
-          <select name="audioformat">
448
-            <option>---</option>
449
-<?
450
-    foreach($this->AudioFormats as $AudioFormat) {
451
-      echo "\t\t\t\t\t\t<option value=\"$AudioFormat\"";
452
-      if  ($AudioFormat == ($Torrent['AudioFormat'] ?? false)) {
453
-        echo " selected";
454
-      }
455
-      echo ">$AudioFormat</option>\n";
456
-    }
457
-?>
458
-          </select>
459
-        </td>
460
-      </tr>
461
-      <tr id="lang_tr">
462
-        <td class="label">Language</td>
463
-        <td>
464
-          <select name="lang">
465
-            <option>---</option>
466
-<?
467
-    foreach($this->Languages as $Language) {
468
-      echo "\t\t\t\t\t\t<option value=\"$Language\"";
469
-      if ($Language == ($Torrent['Language'] ?? false)) {
470
-        echo " selected";
471
-      }
472
-      echo ">$Language</option>\n";
473
-    }
474
-?>
475
-          </select>
476
-        </td>
477
-      </tr>
478
-      <tr id="sub_tr">
479
-        <td class="label">Subbing</td>
480
-        <td>
481
-          <select name="sub">
482
-            <option>---</option>
483
-<?
484
-    foreach($this->Subbing as $Subbing) {
485
-      echo "\t\t\t\t\t\t<option value=\"$Subbing\"";
486
-      if ($Subbing == ($Torrent['Subbing'] ?? false)) {
487
-        echo " selected";
488
-      }
489
-      echo ">$Subbing</option>\n";
490
-    }
491
-?>
492
-          </select>
493
-        </td>
494
-      </tr>
495
-      <tr id="trans_tr">
496
-        <td class="label">Translation Group (optional)</td>
497
-        <td><input type="text" id="subber" name="subber" size="60" value="<?=display_str($Torrent['Subber']??'') ?>" /></td>
498
-      </tr>
499
       <tr id="censored_tr">
363
       <tr id="censored_tr">
500
-        <td class="label">Censored?</td>
364
+        <td class="label">Original?</td>
501
         <td>
365
         <td>
502
           <input type="checkbox" name="censored" value="1" <?=(($Torrent['Censored'] ?? 1) ? 'checked ' : '')?>/>
366
           <input type="checkbox" name="censored" value="1" <?=(($Torrent['Censored'] ?? 1) ? 'checked ' : '')?>/>
503
         </td>
367
         </td>
529
         </td>
393
         </td>
530
       </tr>
394
       </tr>
531
       <tr id="cover_tr">
395
       <tr id="cover_tr">
532
-        <td class="label">Cover Image</td>
396
+        <td class="label">Picture</td>
533
         <td><input type="text" id="image" name="image" size="60" value="<?=display_str($Torrent['Image']) ?>"<?=$this->Disabled?> /></td>
397
         <td><input type="text" id="image" name="image" size="60" value="<?=display_str($Torrent['Image']) ?>"<?=$this->Disabled?> /></td>
534
       </tr>
398
       </tr>
535
 <? if (!$this->DisabledFlag && $this->NewTorrent) { ?>
399
 <? if (!$this->DisabledFlag && $this->NewTorrent) { ?>
536
       <tr id="screenshots_tr">
400
       <tr id="screenshots_tr">
537
-        <td class="label">Screenshots</td>
401
+        <td class="label">Publications</td>
538
         <td>
402
         <td>
539
           <textarea rows="8" cols="60" name="screenshots" id="screenshots"><?=display_str($Torrent['Screenshots'])?></textarea>
403
           <textarea rows="8" cols="60" name="screenshots" id="screenshots"><?=display_str($Torrent['Screenshots'])?></textarea>
540
-          <p>Enter up to 10 links to samples for the torrent, one per line. The system will automatically remove malformed or invalid links, as well as any links after the 10th. Remember to consult the <a href="/rules.php?p=upload#h1.4">rules for adding screenshots</a>.</p>
404
+          <p>Enter up to 10 links to studies for the torrent, one per line. The system will automatically remove malformed or invalid links, as well as any links after the 10th. Remember to consult the <a href="/rules.php?p=upload#h1.4">rules for adding publications</a>.</p>
541
           <p class="min_padding notes"></p>
405
           <p class="min_padding notes"></p>
542
       </tr>
406
       </tr>
543
 <? } ?>
407
 <? } ?>
544
       <tr id="group_desc_tr">
408
       <tr id="group_desc_tr">
545
-        <td class="label">Torrent Group Description</td>
409
+        <td class="label">Sequence Description</td>
546
         <td>
410
         <td>
547
           <p class="min_padding notes"></p>
411
           <p class="min_padding notes"></p>
548
 <?php new TEXTAREA_PREVIEW('album_desc', 'album_desc', display_str($Torrent['GroupDescription']), 60, 8, !$this->DisabledFlag, !$this->DisabledFlag, false, array($this->Disabled)); ?>
412
 <?php new TEXTAREA_PREVIEW('album_desc', 'album_desc', display_str($Torrent['GroupDescription']), 60, 8, !$this->DisabledFlag, !$this->DisabledFlag, false, array($this->Disabled)); ?>
549
         </td>
413
         </td>
550
       </tr>
414
       </tr>
551
 <?    } ?>
415
 <?    } ?>
552
-      <tr id="release_desc_tr">
553
-        <td class="label">Torrent Description (optional)</td>
554
-        <td>
555
-          <p class="min_padding notes"></p>
556
-<?php new TEXTAREA_PREVIEW('release_desc', 'release_desc', display_str($Torrent['TorrentDescription']??''), 60, 8); ?>
557
-        </td>
558
-      </tr>
559
       <tr id="anon_tr">
416
       <tr id="anon_tr">
560
         <td class="label tooltip" title="Checking this will hide your username from other users on the torrent details page. Stats will still be attributed to you.">Upload Anonymously</td>
417
         <td class="label tooltip" title="Checking this will hide your username from other users on the torrent details page. Stats will still be attributed to you.">Upload Anonymously</td>
561
         <td><input type="checkbox" name="anonymous" value="1" <?=(($Torrent['Anonymous'] ?? false) ? 'checked ' : '')?>/></td>
418
         <td><input type="checkbox" name="anonymous" value="1" <?=(($Torrent['Anonymous'] ?? false) ? 'checked ' : '')?>/></td>

Loading…
Cancel
Save