  |
5 | 5 | | osCommerce, Open Source E-Commerce Solutions |
| |
6 | 6 | | http://www.oscommerce.com |
| |
7 | 7 | | |
  |
8 | | - | Copyright (c) 2005 osCommerce |
| |
| 8 | + | Copyright (c) 2006 osCommerce |
|
9 | 9 | | |
| |
10 | 10 | | Released under the GNU General Public License |
| |
11 | 11 | | */ |
| |
|
|
 |
… |
|
21 | 21 | | $Qproduct->bindTable(':table_products', TABLE_PRODUCTS); |
| |
22 | 22 | | $Qproduct->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION); |
| |
23 | 23 | | |
  |
24 | | - | if (is_numeric($id) || ereg('[0-9]+[{[0-9]+}[0-9]+]*$', $id)) { |
| |
| 24 | + | if (ereg('^[0-9]+(#?([0-9]+:?[0-9]+)+(;?([0-9]+:?[0-9]+)+)*)*$', $id)) { |
|
25 | 25 | | $Qproduct->appendQuery('p.products_id = :products_id'); |
| |
26 | 26 | | $Qproduct->bindInt(':products_id', osc_get_product_id($id)); |
| |
27 | 27 | | } else { |
| |
|
|
 |
… |
|
235 | 235 | | $Qcheck = $osC_Database->query('select p.products_id from :table_products p'); |
| |
236 | 236 | | $Qcheck->bindTable(':table_products', TABLE_PRODUCTS); |
| |
237 | 237 | | |
  |
238 | | - | if (is_numeric($id) || ereg('[0-9]+[{[0-9]+}[0-9]+]*$', $id)) { |
| |
| 238 | + | if (ereg('^[0-9]+(#?([0-9]+:?[0-9]+)+(;?([0-9]+:?[0-9]+)+)*)*$', $id)) { |
  |
239 | 239 | | $Qcheck->appendQuery('where p.products_id = :products_id'); |
| |
240 | 240 | | $Qcheck->bindInt(':products_id', osc_get_product_id($id)); |
| |
241 | 241 | | } else { |