Changeset 27620 for extensions/batch_manager_prefilters_ratio/main.inc.php
- Timestamp:
- Mar 8, 2014, 7:32:46 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/batch_manager_prefilters_ratio/main.inc.php
r27605 r27620 98 98 } 99 99 100 function filter_sets_image_format($ratios) 101 { 102 $res = array(); 103 104 $query = ' 105 SELECT id, width, height 106 FROM '.IMAGES_TABLE.' 107 ;'; 108 109 $result = pwg_query($query); 110 if (pwg_db_num_rows($result)) 111 { 112 while ($row = pwg_db_fetch_assoc($result)) 113 { 114 if ($row['width']>0 && $row['height']>0) 115 { 116 $ratio = floor($row['width'] / $row['height'] * 100) / 100; 117 118 if(($ratio > $ratios[0] && $ratio < $ratios[1]) || ($ratio > $ratios[2] && $ratio < $ratios[3])) 119 { 120 $res[] = $row['id']; 121 } 122 } 123 } 124 } 125 return $res; 126 } 127 100 128 ?>
Note: See TracChangeset
for help on using the changeset viewer.