query('select distinct id, code, size_height as height, size_width as width from :table_images_groups'); $Qgroups->bindTable(':table_images_groups', TABLE_IMAGES_GROUPS); $Qgroups->setCache('images_groups'); $Qgroups->execute(); while ($Qgroups->next()) { $this->_data[$Qgroups->value('code')] = $Qgroups->toArray(); } $Qgroups->freeResult(); } function getID($code) { return $this->_data[$code]['id']; } function getWidth($code) { return $this->_data[$code]['width']; } function getHeight($code) { return $this->_data[$code]['height']; } function showImage(&$image, &$title = '', $parameters = '', $group = 'default') { if (isset($this->_data[$group]) === false) { $group = 'default'; } return tep_image(DIR_WS_IMAGES . $image, $title, $this->_data[$group]['width'], $this->_data[$group]['height'], $parameters); } } ?>