<?php use_class('element'); use_class('elements_stock'); element::loadDIOHsettings(); $class_es = new elements_stock(); $show_amount = 10; $whid = 1; $sort_options = array('total DESC' => 'MAX Total', 'es.stock DESC' => 'MAX Stock', 'dioh DESC' => 'MAX DIOH', 'total ASC' => 'MIN Total', 'es.stock ASC' => 'MIN Stock', 'dioh ASC' => 'MIN DIOH', 'msws' => 'MIN Stock vs Weekly Sold', 'e.elements_id' => 'Elements ID'); if (isset($_POST['sort_option'])) { $sort_option = tep_db_prepare_input($_POST['sort_option']); } else { $sort_option = 'total DESC'; } if (isset($_POST['elcat-filter'])) { $elcatfiltered = tep_db_prepare_input($_POST['elcat-filter']); if ($elcatfiltered != '') { $_SESSION[$session_page]['elcat-filter'] = $elcatfiltered; } else { unset($_SESSION[$session_page]['elcat-filter']); } } elseif (isset($_SESSION[$session_page]['elcat-filter'])) { $elcatfiltered = $_SESSION[$session_page]['elcat-filter']; } $header = array(); $header['img'] = 'Image'; $header['id'] = 'ID'; $header['name'] = 'Name'; $header['info'] = 'Supplier'; $header['pri'] = 'Price per Piece'; $header['info2'] = 'Stock Available';