Changeset 27743 for extensions/MyPiwiShop/include/functions.inc.php
- Timestamp:
- Mar 12, 2014, 11:28:47 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/MyPiwiShop/include/functions.inc.php
r27568 r27743 1 1 <?php 2 2 defined('MPS_PATH') or die('Hacking attempt!'); 3 4 /**5 *prefilte calcul6 **/7 function filter_sets_image_format($ratios)8 {9 $res = array();10 11 $query = '12 SELECT id, width, height13 FROM '.IMAGES_TABLE.'14 ;';15 16 $result = pwg_query($query);17 if (pwg_db_num_rows($result))18 {19 while ($row = pwg_db_fetch_assoc($result))20 {21 if ($row['width']>0 && $row['height']>0)22 {23 $ratio = floor($row['width'] / $row['height'] * 100) / 100;24 25 if(($ratio > $ratios[0] && $ratio < $ratios[1]) || ($ratio > $ratios[2] && $ratio < $ratios[3]))26 {27 $res[] = $row['id'];28 }29 }30 }31 }32 return $res;33 }34 3 35 4 /**
Note: See TracChangeset
for help on using the changeset viewer.