Changeset 25932 for extensions/BatchDownloader/admin/sets.php
- Timestamp:
- Dec 12, 2013, 2:41:53 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/BatchDownloader/admin/sets.php
r23383 r25932 1 1 <?php 2 if (!defined('BATCH_DOWNLOAD_PATH'))die('Hacking attempt!');2 defined('BATCH_DOWNLOAD_PATH') or die('Hacking attempt!'); 3 3 4 4 // actions … … 11 11 if (isset($_GET['cancel'])) 12 12 { 13 $set = new BatchDownloader($_GET['cancel']); 13 $set = new BatchDownloader($_GET['cancel']); 14 14 $set->updateParam('total_size', $set->getEstimatedTotalSize()); 15 15 $set->updateParam('nb_zip', $set->getEstimatedArchiveNumber()); … … 28 28 date_creation < DATE_SUB(NOW(), INTERVAL 1 HOUR) 29 29 ;'; 30 30 31 31 $sets = array_from_query($query, 'id'); 32 32 33 33 foreach ($sets as $set_id) 34 34 { … … 48 48 if (!empty($_POST['username'])) 49 49 { 50 array_push($where_clauses, 'username LIKE "%'.$_POST['username'].'%"');50 $where_clauses[] = 'username LIKE "%'.$_POST['username'].'%"'; 51 51 } 52 52 53 53 if ($_POST['type'] != -1) 54 54 { 55 array_push($where_clauses, 'type = "'.$_POST['type'].'"');55 $where_clauses[] = 'type = "'.$_POST['type'].'"'; 56 56 } 57 57 58 58 if ($_POST['status'] != -1) 59 59 { 60 60 if ($_POST['status'] == 'new') 61 array_push($where_clauses, '(status = "new" OR status = "ready")');61 $where_clauses[] = '(status = "new" OR status = "ready")'; 62 62 else 63 array_push($where_clauses, 'status = "'.$_POST['status'].'"');63 $where_clauses[] = 'status = "'.$_POST['status'].'"'; 64 64 } 65 65 66 66 if ($_POST['size'] != -1) 67 67 { 68 array_push($where_clauses, 'size = "'.$_POST['size'].'"');68 $where_clauses[] = 'size = "'.$_POST['size'].'"'; 69 69 } 70 70 71 71 if ($_POST['order_by'] == 'size') 72 72 { … … 82 82 // get sets 83 83 $query = ' 84 SELECT 84 SELECT 85 85 s.id, 86 86 u.'.$conf['user_fields']['username'].' AS username … … 97 97 { 98 98 $set = new BatchDownloader($set_id); 99 99 100 100 $template->append('sets', array_merge( 101 101 $set->getSetInfo(), … … 106 106 ) 107 107 )); 108 108 109 109 unset($set); 110 110 } … … 173 173 174 174 175 $template->set_filename('batch_download', dirname(__FILE__) . '/template/sets.tpl'); 176 177 ?> 175 $template->set_filename('batch_download', realpath(BATCH_DOWNLOAD_PATH . 'admin/template/sets.tpl'));
Note: See TracChangeset
for help on using the changeset viewer.