/* Copyright (c) 2002 - 2006 SystemsManager.Net SystemsManager Technologies oscMall System Version 4 http://www.systemsmanager.net Portions Copyright (c) 2002 osCommerce This source file is subject to version 2.0 of the GPL license, that is bundled with this package in the file LICENSE. If you did not receive a copy of the oscMall System license and are unable to obtain it through the world-wide-web, please send a note to license@systemsmanager.net so we can mail you a copy immediately. */ $boxHeading = ""; $box_base_name = 'search2'; $box_id = $box_base_name . 'Box'; $boxContent = smn_draw_form('quick_find', smn_href_link(FILENAME_ADVANCED_SEARCH_RESULT, 'ID=1', 'NONSSL', false), 'post'); $boxContent .= '<table HEIGHT="40" CELLSPACING="0" CELLPADDING="0" align="left"><tr><td HEIGHT="40" class="search_css">' . 'SEARCH: '; $boxContent .= smn_draw_pull_down_menu('categories_id', smn_get_categories_extended(array(array('id' => '', 'text' => 'All Stores'))), '0', '') . ' '; $boxContent .= smn_draw_hidden_field('search_in_description', '1'); $boxContent .= '<br/>FOR: ' . smn_draw_input_field('keywords', '', 'size="20" maxlength="30" ') . ' ' . smn_hide_session_id() . smn_image_submit('button_quick_find.gif', 'Go Search', 'align="absmiddle"'); $boxContent .= ' <a href="' . smn_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a>'; $boxContent .= '</td></tr></table></form>'; if (file_exists(DIR_WS_BOX_TEMPLATES . $box_base_name . '.php')) { require DIR_WS_BOX_TEMPLATES . $box_base_name . '.php'; } else { require DEFAULT_TEMPLATENAME_BOX; } $boxContent_attributes = '';
<td><?php echo smn_draw_separator('pixel_trans.gif', '100%', '10'); ?> </td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="fieldKey"><?php echo ENTRY_CATEGORIES; ?> </td> <td class="fieldValue"><?php echo smn_draw_pull_down_menu('categories_id', smn_get_categories_extended(array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES)))); ?> </td> </tr> <tr> <td class="fieldKey"> </td> <td class="smallText"><?php echo smn_draw_checkbox_field('inc_subcat', '1', true) . ' ' . ENTRY_INCLUDE_SUBCATEGORIES; ?> </td> </tr> <tr> <td colspan="2"><?php echo smn_draw_separator('pixel_trans.gif', '100%', '10'); ?> </td>
<?php /* Copyright (c) 2002 - 2006 SystemsManager.Net SystemsManager Technologies oscMall System Version 4 http://www.systemsmanager.net Portions Copyright (c) 2002 osCommerce This source file is subject to version 2.0 of the GPL license, that is bundled with this package in the file LICENSE. If you did not receive a copy of the oscMall System license and are unable to obtain it through the world-wide-web, please send a note to license@systemsmanager.net so we can mail you a copy immediately. */ $boxHeading = BOX_ALL_CATEGORIES; $box_base_name = 'categories2'; $box_id = $box_base_name . 'Box'; $boxContent = '<form method="get" action="' . smn_href_link(FILENAME_DEFAULT, 'ID=' . $store_id, 'NONSSL') . '">' . smn_draw_pull_down_menu('cPath', smn_get_categories_extended(array(array('id' => '', 'text' => PULL_DOWN_DEFAULT))), '0', 'onchange="this.form.submit();"') . '</form>'; if (file_exists(DIR_WS_BOX_TEMPLATES . $box_base_name . '.php')) { require DIR_WS_BOX_TEMPLATES . $box_base_name . '.php'; } else { require DEFAULT_TEMPLATENAME_BOX; }
function smn_get_categories_extended($categories_array = '', $parent_id = '0', $indent = '') { global $store_id; global $languages_id; if (!is_array($categories_array)) { $categories_array = array(); } $sql = "select c.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int) $parent_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int) $languages_id . "' and cd.store_id = '1' and c.store_id = '1' order by sort_order, cd.categories_name"; if ($store_id != 1) { $sql = "select c.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int) $parent_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int) $languages_id . "' and (cd.store_id = '1' or cd.store_id = '" . $store_id . "') and (c.store_id = '1' or c.store_id = '" . $store_id . "') order by sort_order, cd.categories_name"; } $categories_query = smn_db_query($sql); while ($categories = smn_db_fetch_array($categories_query)) { if ($categories['categories_id'] != $parent_id) { $categories_array[] = array('id' => $categories['categories_id'], 'text' => $indent . $categories['categories_name']); $categories_array = smn_get_categories_extended($categories_array, $categories['categories_id'], $indent . ' ->'); } } return $categories_array; }
</td> </tr> <tr> <td colspan="2"><?php echo smn_draw_separator('pixel_trans.gif', '1', '10'); ?> </td> </tr> <tr> <td valign="top" class="main"><?php echo TEXT_BANNERS_CATEGORY; ?> </td> <td class="main"><?php echo smn_draw_pull_down_menu('categories_id', smn_get_categories_extended(array(array('id' => '0', 'text' => TEXT_BANNERS_ALL_CATEGORIES))), $bInfo->categories_id); ?> </td> </tr> <tr> <td colspan="2"><?php echo smn_draw_separator('pixel_trans.gif', '1', '10'); ?> </td> </tr> <tr> <td class="main"><?php echo TEXT_BANNERS_SCHEDULED_AT; ?> <br><small>(dd/mm/yyyy)</small></td>