function oos_get_categories($aCategories = '', $parent_id = '0', $indent = '') { $parent_id = oos_db_prepare_input($parent_id); $nGroupID = intval($_SESSION['member']->group['id']); if (!is_array($aCategories)) $aCategories = array(); // Get database information $dbconn =& oosDBGetConn(); $oostable =& oosDBGetTables(); $nLanguageID = isset($_SESSION['language_id']) ? $_SESSION['language_id']+0 : 1; $categoriestable = $oostable['categories']; $categories_descriptiontable = $oostable['categories_description']; $query = "SELECT c.categories_id, c.categories_status, cd.categories_name FROM $categoriestable c, $categories_descriptiontable cd WHERE ( c.access = '0' OR c.access = '" . intval($nGroupID) . "' ) AND c.categories_status = '1' AND c.parent_id = '" . oos_db_input($parent_id) . "' AND c.categories_id = cd.categories_id AND cd.categories_languages_id = '" . intval($nLanguageID) . "' ORDER BY sort_order, cd.categories_name"; $result =& $dbconn->Execute($query); while ($categories = $result->fields) { $aCategories[] = array('id' => $categories['categories_id'], 'text' => $indent . $categories['categories_name']); if ($categories['categories_id'] != $parent_id) { $aCategories = oos_get_categories($aCategories, $categories['categories_id'], $indent . ' '); } // Move that ADOdb pointer! $result->MoveNext(); } // Close result set $result->Close(); return $aCategories; }
} if (($_GET['errorno'] & 10000) == 10000) { $info_message = str_replace('\n', '<br />', $aLang['js_price_from_must_be_num']); } if (($_GET['errorno'] & 100000) == 100000) { $info_message = str_replace('\n', '<br />', $aLang['js_price_to_must_be_num']); } if (($_GET['errorno'] & 1000000) == 1000000) { $info_message = str_replace('\n', '<br />', $aLang['js_price_to_less_than_price_from']); } if (($_GET['errorno'] & 10000000) == 10000000) { $info_message = str_replace('\n', '<br />', $aLang['js_invalid_keywords']); } } $pull_down_menu_categories = oos_draw_pull_down_menu('categories_id', oos_get_categories(array(array('id' => '', 'text' => $aLang['text_all_categories']))), '', 'id="categories"'); $pull_down_menu_manufacturers = oos_draw_pull_down_menu('manufacturers_id', oos_get_manufacturers(array(array('id' => '', 'text' => $aLang['text_all_manufacturers']))), '', 'id="manufacturers"'); /* $options_box .= ' <tr>' . "\n" . ' <td class="fieldKey">' . $aLang['entry_date_from'] . '</td>' . "\n" . ' <td class="fieldValue">' . oos_draw_input_field('dfrom', DOB_FORMAT_STRING, 'onFocus="RemoveFormatString(this, \'' . DOB_FORMAT_STRING . '\')"') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td class="fieldKey">' . $aLang['entry_date_to'] . '</td>' . "\n" . ' <td class="fieldValue">' . oos_draw_input_field('dto', DOB_FORMAT_STRING, 'onFocus="RemoveFormatString(this, \'' . DOB_FORMAT_STRING . '\')"') . '</td>' . "\n" . ' </tr>' . "\n"; */ $aOption['template_main'] = $sTheme . '/modules/advanced_search.html'; $aOption['page_heading'] = $sTheme . '/heading/page_heading.html';