Browse Source

Draft the About page and use prepared queries on reportsv2

biotorrents 3 years ago
parent
commit
49cffc7ca5

+ 1
- 1
design/publicfooter.php View File

9
 <footer>
9
 <footer>
10
   <a href="/legal.php?p=privacy">Privacy</a>
10
   <a href="/legal.php?p=privacy">Privacy</a>
11
   <a href="/legal.php?p=dmca">DMCA</a>
11
   <a href="/legal.php?p=dmca">DMCA</a>
12
-  <a class="external" href="https://github.com/biotorrents/gazelle" target="_blank">GitHub</a>
12
+  <a class="external" href="https://github.com/biotorrents" target="_blank">GitHub</a>
13
   <a class="external" href="https://patreon.com/biotorrents" target="_blank">Patreon</a>
13
   <a class="external" href="https://patreon.com/biotorrents" target="_blank">Patreon</a>
14
 </footer>
14
 </footer>
15
 
15
 

+ 3
- 3
sections/reportsv2/ajax_create_report.php View File

23
   $TorrentID = $_POST['torrentid'];
23
   $TorrentID = $_POST['torrentid'];
24
 }
24
 }
25
 
25
 
26
-$DB->query("
26
+$DB->prepared_query("
27
   SELECT tg.CategoryID
27
   SELECT tg.CategoryID
28
   FROM torrents_group AS tg
28
   FROM torrents_group AS tg
29
     JOIN torrents AS t ON t.GroupID = tg.ID
29
     JOIN torrents AS t ON t.GroupID = tg.ID
63
   error();
63
   error();
64
 }
64
 }
65
 
65
 
66
-$DB->query("
66
+$DB->prepared_query("
67
   SELECT ID
67
   SELECT ID
68
   FROM reportsv2
68
   FROM reportsv2
69
   WHERE TorrentID = $TorrentID
69
   WHERE TorrentID = $TorrentID
73
   error();
73
   error();
74
 }
74
 }
75
 
75
 
76
-$DB->query("
76
+$DB->prepared_query("
77
   INSERT INTO reportsv2
77
   INSERT INTO reportsv2
78
     (ReporterID, TorrentID, Type, UserComment, Status, ReportedTime, ExtraID)
78
     (ReporterID, TorrentID, Type, UserComment, Status, ReportedTime, ExtraID)
79
   VALUES
79
   VALUES

+ 2
- 2
sections/reportsv2/ajax_giveback_report.php View File

7
   error();
7
   error();
8
 }
8
 }
9
 
9
 
10
-$DB->query("
10
+$DB->prepared_query("
11
   SELECT Status
11
   SELECT Status
12
   FROM reportsv2
12
   FROM reportsv2
13
   WHERE ID = ".$_GET['id']);
13
   WHERE ID = ".$_GET['id']);
14
 list($Status) = $DB->next_record();
14
 list($Status) = $DB->next_record();
15
 if (isset($Status)) {
15
 if (isset($Status)) {
16
-  $DB->query("
16
+  $DB->prepared_query("
17
     UPDATE reportsv2
17
     UPDATE reportsv2
18
     SET Status = 'New', ResolverID = 0
18
     SET Status = 'New', ResolverID = 0
19
     WHERE ID = ".$_GET['id']);
19
     WHERE ID = ".$_GET['id']);

+ 1
- 1
sections/reportsv2/ajax_grab_report.php View File

13
   error();
13
   error();
14
 }
14
 }
15
 
15
 
16
-$DB->query("
16
+$DB->prepared_query("
17
   UPDATE reportsv2
17
   UPDATE reportsv2
18
   SET Status = 'InProgress',
18
   SET Status = 'InProgress',
19
     ResolverID = " . $LoggedUser['ID'] . "
19
     ResolverID = " . $LoggedUser['ID'] . "

+ 7
- 7
sections/reportsv2/ajax_new_report.php View File

10
 }
10
 }
11
 
11
 
12
 
12
 
13
-$DB->query("
13
+$DB->prepared_query("
14
   SELECT
14
   SELECT
15
     r.ID,
15
     r.ID,
16
     r.ReporterID,
16
     r.ReporterID,
79
 
79
 
80
     if (!$GroupID) {
80
     if (!$GroupID) {
81
       //Torrent already deleted
81
       //Torrent already deleted
82
-      $DB->query("
82
+      $DB->prepared_query("
83
         UPDATE reportsv2
83
         UPDATE reportsv2
84
         SET
84
         SET
85
           Status = 'Resolved',
85
           Status = 'Resolved',
94
 <?
94
 <?
95
       error();
95
       error();
96
     }
96
     }
97
-    $DB->query("
97
+    $DB->prepared_query("
98
       UPDATE reportsv2
98
       UPDATE reportsv2
99
       SET Status = 'InProgress',
99
       SET Status = 'InProgress',
100
         ResolverID = ".$LoggedUser['ID']."
100
         ResolverID = ".$LoggedUser['ID']."
155
               uploaded by <a href="user.php?id=<?=$UploaderID?>"><?=$UploaderName?></a> <?=time_diff($Time)?>
155
               uploaded by <a href="user.php?id=<?=$UploaderID?>"><?=$UploaderName?></a> <?=time_diff($Time)?>
156
               <br />
156
               <br />
157
               <div style="text-align: right;">was reported by <a href="user.php?id=<?=$ReporterID?>"><?=$ReporterName?></a> <?=time_diff($ReportedTime)?> for the reason: <strong><?=$ReportType['title']?></strong></div>
157
               <div style="text-align: right;">was reported by <a href="user.php?id=<?=$ReporterID?>"><?=$ReporterName?></a> <?=time_diff($ReportedTime)?> for the reason: <strong><?=$ReportType['title']?></strong></div>
158
-<?php $DB->query("
158
+<?php $DB->prepared_query("
159
             SELECT r.ID
159
             SELECT r.ID
160
             FROM reportsv2 AS r
160
             FROM reportsv2 AS r
161
               LEFT JOIN torrents AS t ON t.ID = r.TorrentID
161
               LEFT JOIN torrents AS t ON t.ID = r.TorrentID
167
               <div style="text-align: right;">
167
               <div style="text-align: right;">
168
                 <a href="reportsv2.php?view=group&amp;id=<?=$GroupID?>">There <?=(($GroupOthers > 1) ? "are $GroupOthers other reports" : "is 1 other report")?> for torrents in this group</a>
168
                 <a href="reportsv2.php?view=group&amp;id=<?=$GroupID?>">There <?=(($GroupOthers > 1) ? "are $GroupOthers other reports" : "is 1 other report")?> for torrents in this group</a>
169
               </div>
169
               </div>
170
-<?php $DB->query("
170
+<?php $DB->prepared_query("
171
             SELECT t.UserID
171
             SELECT t.UserID
172
             FROM reportsv2 AS r
172
             FROM reportsv2 AS r
173
               JOIN torrents AS t ON t.ID = r.TorrentID
173
               JOIN torrents AS t ON t.ID = r.TorrentID
181
               </div>
181
               </div>
182
 <?php }
182
 <?php }
183
 
183
 
184
-        $DB->query("
184
+        $DB->prepared_query("
185
             SELECT DISTINCT req.ID,
185
             SELECT DISTINCT req.ID,
186
               req.FillerID,
186
               req.FillerID,
187
               um.Username,
187
               um.Username,
242
         $First = true;
242
         $First = true;
243
         $Extras = explode(' ', $ExtraIDs);
243
         $Extras = explode(' ', $ExtraIDs);
244
         foreach ($Extras as $ExtraID) {
244
         foreach ($Extras as $ExtraID) {
245
-            $DB->query("
245
+            $DB->prepared_query("
246
                 SELECT
246
                 SELECT
247
                   tg.Name,
247
                   tg.Name,
248
                   tg.ID,
248
                   tg.ID,

+ 2
- 2
sections/reportsv2/ajax_update_comment.php View File

12
 $Message = db_string($_POST['comment']);
12
 $Message = db_string($_POST['comment']);
13
 //Message can be blank!
13
 //Message can be blank!
14
 
14
 
15
-$DB->query("
15
+$DB->prepared_query("
16
   SELECT ModComment
16
   SELECT ModComment
17
   FROM reportsv2
17
   FROM reportsv2
18
   WHERE ID = $ReportID");
18
   WHERE ID = $ReportID");
19
 list($ModComment) = $DB->next_record();
19
 list($ModComment) = $DB->next_record();
20
 if (isset($ModComment)) {
20
 if (isset($ModComment)) {
21
-  $DB->query("
21
+  $DB->prepared_query("
22
     UPDATE reportsv2
22
     UPDATE reportsv2
23
     SET ModComment = '$Message'
23
     SET ModComment = '$Message'
24
     WHERE ID = $ReportID");
24
     WHERE ID = $ReportID");

+ 1
- 1
sections/reportsv2/ajax_update_resolve.php View File

30
   error();
30
   error();
31
 }
31
 }
32
 
32
 
33
-$DB->query("
33
+$DB->prepared_query("
34
   UPDATE reportsv2
34
   UPDATE reportsv2
35
   SET Type = '$NewType'
35
   SET Type = '$NewType'
36
   WHERE ID = $ReportID");
36
   WHERE ID = $ReportID");

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

17
     }
17
     }
18
 } else {
18
 } else {
19
     $TorrentID = $_GET['id'];
19
     $TorrentID = $_GET['id'];
20
-    $DB->query("
20
+    $DB->prepared_query("
21
     SELECT tg.`category_id`, t.`GroupID`, u.`Username`
21
     SELECT tg.`category_id`, t.`GroupID`, u.`Username`
22
     FROM `torrents_group` AS tg
22
     FROM `torrents_group` AS tg
23
       LEFT JOIN `torrents` AS t ON t.`GroupID` = tg.`id`
23
       LEFT JOIN `torrents` AS t ON t.`GroupID` = tg.`id`

+ 11
- 11
sections/reportsv2/static.php View File

62
 } else {
62
 } else {
63
     switch ($View) {
63
     switch ($View) {
64
     case 'staff':
64
     case 'staff':
65
-      $DB->query("
65
+      $DB->prepared_query("
66
         SELECT `Username`
66
         SELECT `Username`
67
         FROM `users_main`
67
         FROM `users_main`
68
         WHERE `ID` = $ID");
68
         WHERE `ID` = $ID");
78
       break;
78
       break;
79
 
79
 
80
     case 'resolver':
80
     case 'resolver':
81
-      $DB->query("
81
+      $DB->prepared_query("
82
         SELECT `Username`
82
         SELECT `Username`
83
         FROM `users_main`
83
         FROM `users_main`
84
         WHERE `ID` = $ID");
84
         WHERE `ID` = $ID");
112
       break;
112
       break;
113
 
113
 
114
     case 'reporter':
114
     case 'reporter':
115
-      $DB->query("
115
+      $DB->prepared_query("
116
         SELECT `Username`
116
         SELECT `Username`
117
         FROM `users_main`
117
         FROM `users_main`
118
         WHERE `ID` = $ID");
118
         WHERE `ID` = $ID");
127
       break;
127
       break;
128
 
128
 
129
     case 'uploader':
129
     case 'uploader':
130
-      $DB->query("
130
+      $DB->prepared_query("
131
         SELECT `Username`
131
         SELECT `Username`
132
         FROM `users_main`
132
         FROM `users_main`
133
         WHERE `ID` = $ID");
133
         WHERE `ID` = $ID");
158
 /**
158
 /**
159
  * The large query
159
  * The large query
160
  */
160
  */
161
-$DB->query("
161
+$DB->prepared_query("
162
   SELECT
162
   SELECT
163
     SQL_CALC_FOUND_ROWS
163
     SQL_CALC_FOUND_ROWS
164
     r.`ID`,
164
     r.`ID`,
211
 
211
 
212
 $Reports = $DB->to_array();
212
 $Reports = $DB->to_array();
213
 
213
 
214
-$DB->query('SELECT FOUND_ROWS()');
214
+$DB->prepared_query('SELECT FOUND_ROWS()');
215
 list($Results) = $DB->next_record();
215
 list($Results) = $DB->next_record();
216
 $PageLinks = Format::get_pages($Page, $Results, REPORTS_PER_PAGE, 11);
216
 $PageLinks = Format::get_pages($Page, $Results, REPORTS_PER_PAGE, 11);
217
 
217
 
253
 
253
 
254
           if (!$GroupID && $Status != 'Resolved') {
254
           if (!$GroupID && $Status != 'Resolved') {
255
               //Torrent already deleted
255
               //Torrent already deleted
256
-              $DB->query("
256
+              $DB->prepared_query("
257
         UPDATE `reportsv2`
257
         UPDATE `reportsv2`
258
         SET
258
         SET
259
           `Status` = 'Resolved',
259
           `Status` = 'Resolved',
338
 } ?>
338
 } ?>
339
             <div style="text-align: right;">was reported by <a href="user.php?id=<?=$ReporterID?>"><?=$ReporterName?></a> <?=time_diff($ReportedTime)?> for the reason: <strong><?=$ReportType['title']?></strong></div>
339
             <div style="text-align: right;">was reported by <a href="user.php?id=<?=$ReporterID?>"><?=$ReporterName?></a> <?=time_diff($ReportedTime)?> for the reason: <strong><?=$ReportType['title']?></strong></div>
340
 <?php if ($Status != 'Resolved') {
340
 <?php if ($Status != 'Resolved') {
341
-    $DB->query("
341
+    $DB->prepared_query("
342
             SELECT r.`ID`
342
             SELECT r.`ID`
343
             FROM `reportsv2` AS r
343
             FROM `reportsv2` AS r
344
               LEFT JOIN `torrents` AS t ON t.`ID` = r.`TorrentID`
344
               LEFT JOIN `torrents` AS t ON t.`ID` = r.`TorrentID`
352
             </div>
352
             </div>
353
 <?php }
353
 <?php }
354
 
354
 
355
-    $DB->query("
355
+    $DB->prepared_query("
356
             SELECT t.`UserID`
356
             SELECT t.`UserID`
357
             FROM `reportsv2` AS r
357
             FROM `reportsv2` AS r
358
               JOIN `torrents` AS t ON t.`ID` = r.`TorrentID`
358
               JOIN `torrents` AS t ON t.`ID` = r.`TorrentID`
366
             </div>
366
             </div>
367
 <?php }
367
 <?php }
368
 
368
 
369
-    $DB->query("
369
+    $DB->prepared_query("
370
             SELECT DISTINCT req.`ID`,
370
             SELECT DISTINCT req.`ID`,
371
               req.`FillerID`,
371
               req.`FillerID`,
372
               um.`Username`,
372
               um.`Username`,
428
         $First = true;
428
         $First = true;
429
         $Extras = explode(' ', $ExtraIDs);
429
         $Extras = explode(' ', $ExtraIDs);
430
         foreach ($Extras as $ExtraID) {
430
         foreach ($Extras as $ExtraID) {
431
-            $DB->query("
431
+            $DB->prepared_query("
432
             SELECT
432
             SELECT
433
               COALESCE(NULLIF(tg.`title`, ''), NULLIF(tg.`subject`, ''), tg.`object`) AS Name,
433
               COALESCE(NULLIF(tg.`title`, ''), NULLIF(tg.`subject`, ''), tg.`object`) AS Name,
434
               tg.`id`,
434
               tg.`id`,

+ 5
- 5
sections/reportsv2/takereport.php View File

88
     $Err = 'As useful as blank reports are, could you be a tiny bit more helpful? (Leave a comment)';
88
     $Err = 'As useful as blank reports are, could you be a tiny bit more helpful? (Leave a comment)';
89
 }
89
 }
90
 
90
 
91
-$DB->query("
91
+$DB->prepared_query("
92
   SELECT `GroupID`
92
   SELECT `GroupID`
93
   FROM `torrents`
93
   FROM `torrents`
94
   WHERE `ID` = '$TorrentID'
94
   WHERE `ID` = '$TorrentID'
104
     error();
104
     error();
105
 }
105
 }
106
 
106
 
107
-$DB->query("
107
+$DB->prepared_query("
108
   SELECT `ID`
108
   SELECT `ID`
109
   FROM `reportsv2`
109
   FROM `reportsv2`
110
   WHERE `TorrentID` = '$TorrentID'
110
   WHERE `TorrentID` = '$TorrentID'
115
     error();
115
     error();
116
 }
116
 }
117
 
117
 
118
-$DB->query("
118
+$DB->prepared_query("
119
   INSERT INTO `reportsv2`
119
   INSERT INTO `reportsv2`
120
     (`ReporterID`, `TorrentID`, `Type`, `UserComment`, `Status`, `ReportedTime`, `Track`, `Image`, `ExtraID`, `Link`)
120
     (`ReporterID`, `TorrentID`, `Type`, `UserComment`, `Status`, `ReportedTime`, `Track`, `Image`, `ExtraID`, `Link`)
121
   VALUES
121
   VALUES
123
 
123
 
124
 $ReportID = $DB->inserted_id();
124
 $ReportID = $DB->inserted_id();
125
 
125
 
126
-$DB->query("
126
+$DB->prepared_query("
127
   SELECT `UserID`
127
   SELECT `UserID`
128
   FROM `torrents`
128
   FROM `torrents`
129
   WHERE `ID` = $TorrentID");
129
   WHERE `ID` = $TorrentID");
130
 list($UploaderID) = $DB->next_record();
130
 list($UploaderID) = $DB->next_record();
131
-$DB->query("
131
+$DB->prepared_query("
132
   SELECT `title`, `subject`, `object`
132
   SELECT `title`, `subject`, `object`
133
   FROM `torrents_group`
133
   FROM `torrents_group`
134
   WHERE `id` = '$GroupID'
134
   WHERE `id` = '$GroupID'

+ 19
- 19
sections/reportsv2/takeresolve.php View File

74
     }
74
     }
75
   }
75
   }
76
 
76
 
77
-  $DB->query("
77
+  $DB->prepared_query("
78
     UPDATE reportsv2
78
     UPDATE reportsv2
79
     SET
79
     SET
80
       Status = 'Resolved',
80
       Status = 'Resolved',
116
   error();
116
   error();
117
 }
117
 }
118
 
118
 
119
-$DB->query("
119
+$DB->prepared_query("
120
   SELECT ID
120
   SELECT ID
121
   FROM torrents
121
   FROM torrents
122
   WHERE ID = $TorrentID");
122
   WHERE ID = $TorrentID");
123
 $TorrentExists = ($DB->has_results());
123
 $TorrentExists = ($DB->has_results());
124
 if (!$TorrentExists) {
124
 if (!$TorrentExists) {
125
-  $DB->query("
125
+  $DB->prepared_query("
126
     UPDATE reportsv2
126
     UPDATE reportsv2
127
     SET Status = 'Resolved',
127
     SET Status = 'Resolved',
128
       LastChangeTime = NOW(),
128
       LastChangeTime = NOW(),
135
 
135
 
136
 if ($Report) {
136
 if ($Report) {
137
   //Resolve with a parallel check
137
   //Resolve with a parallel check
138
-  $DB->query("
138
+  $DB->prepared_query("
139
     UPDATE reportsv2
139
     UPDATE reportsv2
140
     SET Status = 'Resolved',
140
     SET Status = 'Resolved',
141
       LastChangeTime = NOW(),
141
       LastChangeTime = NOW(),
159
   }
159
   }
160
 
160
 
161
   if ($_POST['resolve_type'] == 'tags_lots') {
161
   if ($_POST['resolve_type'] == 'tags_lots') {
162
-    $DB->query("
162
+    $DB->prepared_query("
163
       INSERT IGNORE INTO torrents_bad_tags
163
       INSERT IGNORE INTO torrents_bad_tags
164
         (TorrentID, UserID, TimeAdded)
164
         (TorrentID, UserID, TimeAdded)
165
       VALUES
165
       VALUES
166
         ($TorrentID, ".$LoggedUser['ID']." , NOW())");
166
         ($TorrentID, ".$LoggedUser['ID']." , NOW())");
167
-    $DB->query("
167
+    $DB->prepared_query("
168
       SELECT GroupID
168
       SELECT GroupID
169
       FROM torrents
169
       FROM torrents
170
       WHERE ID = $TorrentID");
170
       WHERE ID = $TorrentID");
174
   }
174
   }
175
 
175
 
176
   if ($_POST['resolve_type'] == 'folders_bad') {
176
   if ($_POST['resolve_type'] == 'folders_bad') {
177
-    $DB->query("
177
+    $DB->prepared_query("
178
       INSERT IGNORE INTO torrents_bad_folders
178
       INSERT IGNORE INTO torrents_bad_folders
179
         (TorrentID, UserID, TimeAdded)
179
         (TorrentID, UserID, TimeAdded)
180
       VALUES
180
       VALUES
181
         ($TorrentID, ".$LoggedUser['ID'].", NOW())");
181
         ($TorrentID, ".$LoggedUser['ID'].", NOW())");
182
-    $DB->query("
182
+    $DB->prepared_query("
183
       SELECT GroupID
183
       SELECT GroupID
184
       FROM torrents
184
       FROM torrents
185
       WHERE ID = $TorrentID");
185
       WHERE ID = $TorrentID");
188
     $SendPM = true;
188
     $SendPM = true;
189
   }
189
   }
190
   if ($_POST['resolve_type'] == 'filename') {
190
   if ($_POST['resolve_type'] == 'filename') {
191
-    $DB->query("
191
+    $DB->prepared_query("
192
       INSERT IGNORE INTO torrents_bad_files
192
       INSERT IGNORE INTO torrents_bad_files
193
         (TorrentID, UserID, TimeAdded)
193
         (TorrentID, UserID, TimeAdded)
194
       VALUES
194
       VALUES
195
         ($TorrentID, ".$LoggedUser['ID'].", NOW())");
195
         ($TorrentID, ".$LoggedUser['ID'].", NOW())");
196
-    $DB->query("
196
+    $DB->prepared_query("
197
       SELECT GroupID
197
       SELECT GroupID
198
       FROM torrents
198
       FROM torrents
199
       WHERE ID = $TorrentID");
199
       WHERE ID = $TorrentID");
202
     $SendPM = true;
202
     $SendPM = true;
203
   }
203
   }
204
   if ($_POST['resolve_type'] == 'trump') {
204
   if ($_POST['resolve_type'] == 'trump') {
205
-    $DB->query("
205
+    $DB->prepared_query("
206
       SELECT
206
       SELECT
207
         r.ExtraID,
207
         r.ExtraID,
208
         HEX(t.info_hash)
208
         HEX(t.info_hash)
214
       $ExtraID = explode(' ', $ExtraID)[0];
214
       $ExtraID = explode(' ', $ExtraID)[0];
215
 
215
 
216
       $AffectedUsers = [];
216
       $AffectedUsers = [];
217
-      $DB->query("
217
+      $DB->prepared_query("
218
         SELECT UserID
218
         SELECT UserID
219
         FROM torrents
219
         FROM torrents
220
         WHERE ID = $TorrentID");
220
         WHERE ID = $TorrentID");
221
       if ($DB->has_results()) {
221
       if ($DB->has_results()) {
222
         list($AffectedUsers[]) = $DB->next_record();
222
         list($AffectedUsers[]) = $DB->next_record();
223
       }
223
       }
224
-      $DB->query("
224
+      $DB->prepared_query("
225
         SELECT uid
225
         SELECT uid
226
         FROM xbt_snatched
226
         FROM xbt_snatched
227
         WHERE fid = $TorrentID");
227
         WHERE fid = $TorrentID");
233
       $AffectedUsers = array_unique($AffectedUsers);
233
       $AffectedUsers = array_unique($AffectedUsers);
234
       foreach ($AffectedUsers as $UserID) {
234
       foreach ($AffectedUsers as $UserID) {
235
         Tracker::update_tracker('add_token', ['info_hash' => substr('%'.chunk_split($InfoHash,2,'%'),0,-1), 'userid' => $UserID]);
235
         Tracker::update_tracker('add_token', ['info_hash' => substr('%'.chunk_split($InfoHash,2,'%'),0,-1), 'userid' => $UserID]);
236
-        $DB->query("
236
+        $DB->prepared_query("
237
           INSERT INTO users_freeleeches (UserID, TorrentID, Time, Uses)
237
           INSERT INTO users_freeleeches (UserID, TorrentID, Time, Uses)
238
           VALUES ($UserID, $ExtraID, NOW(), 0)
238
           VALUES ($UserID, $ExtraID, NOW(), 0)
239
           ON DUPLICATE KEY UPDATE
239
           ON DUPLICATE KEY UPDATE
248
 
248
 
249
   //Log and delete
249
   //Log and delete
250
   if (isset($Escaped['delete']) && check_perms('torrents_delete')) {
250
   if (isset($Escaped['delete']) && check_perms('torrents_delete')) {
251
-    $DB->query("
251
+    $DB->prepared_query("
252
       SELECT Username
252
       SELECT Username
253
       FROM users_main
253
       FROM users_main
254
       WHERE ID = $UploaderID");
254
       WHERE ID = $UploaderID");
258
     if (isset($Escaped['log_message']) && $Escaped['log_message'] != '') {
258
     if (isset($Escaped['log_message']) && $Escaped['log_message'] != '') {
259
       $Log .= ' ( '.$Escaped['log_message'].' )';
259
       $Log .= ' ( '.$Escaped['log_message'].' )';
260
     }
260
     }
261
-    $DB->query("
261
+    $DB->prepared_query("
262
       SELECT GroupID, hex(info_hash)
262
       SELECT GroupID, hex(info_hash)
263
       FROM torrents
263
       FROM torrents
264
       WHERE ID = $TorrentID");
264
       WHERE ID = $TorrentID");
280
     $Cache->update_row(false, array('DisableUpload' => '1'));
280
     $Cache->update_row(false, array('DisableUpload' => '1'));
281
     $Cache->commit_transaction(0);
281
     $Cache->commit_transaction(0);
282
 
282
 
283
-    $DB->query("
283
+    $DB->prepared_query("
284
       UPDATE users_info
284
       UPDATE users_info
285
       SET DisableUpload = '1'
285
       SET DisableUpload = '1'
286
       WHERE UserID = $UploaderID");
286
       WHERE UserID = $UploaderID");
312
     if ($AdminComment) {
312
     if ($AdminComment) {
313
       $AdminComment = date('Y-m-d') . " - $AdminComment\n\n";
313
       $AdminComment = date('Y-m-d') . " - $AdminComment\n\n";
314
 
314
 
315
-      $DB->query("
315
+      $DB->prepared_query("
316
         UPDATE users_info
316
         UPDATE users_info
317
         SET AdminComment = CONCAT('".db_string($AdminComment)."', AdminComment)
317
         SET AdminComment = CONCAT('".db_string($AdminComment)."', AdminComment)
318
         WHERE UserID = '".db_string($UploaderID)."'");
318
         WHERE UserID = '".db_string($UploaderID)."'");
360
 
360
 
361
   // Now we've done everything, update the DB with values
361
   // Now we've done everything, update the DB with values
362
   if ($Report) {
362
   if ($Report) {
363
-    $DB->query("
363
+    $DB->prepared_query("
364
       UPDATE reportsv2
364
       UPDATE reportsv2
365
       SET
365
       SET
366
         Type = '".$Escaped['resolve_type']."',
366
         Type = '".$Escaped['resolve_type']."',

+ 7
- 7
sections/reportsv2/views.php View File

13
 
13
 
14
 
14
 
15
 //Grab owner's ID, just for examples
15
 //Grab owner's ID, just for examples
16
-$DB->query("
16
+$DB->prepared_query("
17
   SELECT ID, Username
17
   SELECT ID, Username
18
   FROM users_main
18
   FROM users_main
19
   ORDER BY ID ASC
19
   ORDER BY ID ASC
29
 <div class="float_clear">
29
 <div class="float_clear">
30
   <div class="two_columns pad">
30
   <div class="two_columns pad">
31
 <?
31
 <?
32
-$DB->query("
32
+$DB->prepared_query("
33
   SELECT
33
   SELECT
34
     um.ID,
34
     um.ID,
35
     um.Username,
35
     um.Username,
65
 ?>
65
 ?>
66
     </table>
66
     </table>
67
 <?
67
 <?
68
-$DB->query("
68
+$DB->prepared_query("
69
   SELECT
69
   SELECT
70
     um.ID,
70
     um.ID,
71
     um.Username,
71
     um.Username,
101
 ?>
101
 ?>
102
     </table>
102
     </table>
103
 <?
103
 <?
104
-$DB->query("
104
+$DB->prepared_query("
105
   SELECT
105
   SELECT
106
     um.ID,
106
     um.ID,
107
     um.Username,
107
     um.Username,
137
 ?>
137
 ?>
138
     </table>
138
     </table>
139
 <?
139
 <?
140
-$DB->query("
140
+$DB->prepared_query("
141
   SELECT
141
   SELECT
142
     um.ID,
142
     um.ID,
143
     um.Username,
143
     um.Username,
232
   </div>
232
   </div>
233
   <div class="two_columns pad">
233
   <div class="two_columns pad">
234
 <?
234
 <?
235
-  $DB->query("
235
+  $DB->prepared_query("
236
     SELECT
236
     SELECT
237
       r.ResolverID,
237
       r.ResolverID,
238
       um.Username,
238
       um.Username,
268
     </table>
268
     </table>
269
     <h3>Different view modes by report type</h3>
269
     <h3>Different view modes by report type</h3>
270
 <?
270
 <?
271
-  $DB->query("
271
+  $DB->prepared_query("
272
     SELECT
272
     SELECT
273
       Type,
273
       Type,
274
       COUNT(ID) AS Count
274
       COUNT(ID) AS Count

+ 2
- 2
static/styles/public/scss/public.scss View File

226
 
226
 
227
 /* Legal */
227
 /* Legal */
228
 .tldr {
228
 .tldr {
229
-    max-width: 1000%;
229
+    width: 200%;
230
     height: 500px;
230
     height: 500px;
231
-    margin: auto;
231
+    margin-left: -50%;
232
     overflow-y: scroll;
232
     overflow-y: scroll;
233
 }
233
 }

+ 21
- 2
templates/legal/about.html View File

2
 
2
 
3
 <section class="tldr">
3
 <section class="tldr">
4
   <p>
4
   <p>
5
-    BioTorrents.de is a functional experiment in convenient data distribution.
5
+    BioTorrents.de is a functional experiment in comfy data distribution.
6
   </p>
6
   </p>
7
 
7
 
8
   <p>
8
   <p>
9
-    <strong> Email </strong>
9
+    It indexes a wide variety of biology data and serves it on a fast BitTorrent network.
10
+    The semantic website promotes organic content discovery and community annotations.
11
+    Other interfaces include a JSON API, RSS feeds, and IRC channels.
12
+  </p>
13
+
14
+  <p>
15
+    BioTorrents.de provides an open platform for disadvantaged researchers to host their data.
16
+    More importantly, it provides the necessary tools for others to find and cite it later.
17
+    It's a place for the Google Drives, FTP folders, and network shares that may not be accepted elsewhere.
18
+  </p>
19
+
20
+  <p>
21
+    A mature software product and draft publication are expected by Easter 2023.
22
+    Thank you for your curiosity, patience, and support as we grow the service.
23
+  </p>
24
+
25
+  <p>
26
+    <strong>
27
+      Email
28
+    </strong>
10
     <br />
29
     <br />
11
     help at biotorrents dot de
30
     help at biotorrents dot de
12
   </p>
31
   </p>

Loading…
Cancel
Save