/** * Edition des paramètres du bloc * * @param array $options [0] = Nombre maximum de listes à voir, [1] = Type de listes (0 = les 2, 1 = liste cadeaux, 2 = produits recommandés) * @return array */ function b_oledrion_category_lists_edit($options) { include XOOPS_ROOT_PATH . '/modules/oledrion/include/common.php'; $form = ''; $form .= "<table border='0'>"; $form .= '<tr><td>' . _MB_OLEDRION_LISTS_COUNT . "</td><td><input type='text' name='options[]' id='options' value='" . intval($options[0]) . "' /></td></tr>"; $listTypes = oledrion_lists::getTypesArray(); $listTypeSelect = oledrion_utils::htmlSelect('options[]', $listTypes, intval($options[1]), false); $form .= '<tr><td>' . _MB_OLEDRION_LISTS_TYPE . "</td><td>" . $listTypeSelect . "</td></tr>"; $form .= '</table>'; return $form; }
$_SESSION['filter_product_recommended'] = $filter_product_recommended; $_SESSION['filter_product_title'] = $filter_product_title; $_SESSION['filter_product_sku'] = $filter_product_sku; $_SESSION['filter_product_online'] = $filter_product_online; $_SESSION['filter_product_price'] = $filter_product_price; $itemsCount = $h_oledrion_products->getCount($criteria); // Recherche du nombre total de produits répondants aux critères oledrion_utils::htitle(_MI_OLEDRION_ADMENU4 . ' (' . $itemsCount . ')', 4); if ($itemsCount > $limit) { require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; $pagenav = new XoopsPageNav($itemsCount, $limit, $start, 'start', 'op=products'); } $mytree = new XoopsObjectTree($categories, 'cat_cid', 'cat_pid'); $selectCateg = $mytree->makeSelBox('filter_product_cid', 'cat_title', '-', $filter_product_cid, '---', 0, "style='width: 170px; max-width: 170px;'"); $onlineSelect = oledrion_utils::htmlSelect('filter_product_online', array(2 => _YES, 1 => _NO), $filter_product_online); $recommendedSelect = oledrion_utils::htmlSelect('filter_product_recommended', array(1 => _YES, 2 => _NO), $filter_product_recommended); $criteria->setLimit($limit); $criteria->setStart($start); $criteria->setSort('product_id'); $products = $h_oledrion_products->getObjects($criteria); $class = ''; $span = 8; if (isset($pagenav) && is_object($pagenav)) { echo "<div align='left'>" . $pagenav->renderNav() . '</div>'; } echo "<table width='100%' cellspacing='1' cellpadding='3' border='0' class='outer'>"; echo "<tr><th align='center'>" . _AM_OLEDRION_ID . "</th><th align='center'>" . _OLEDRION_TITLE . "</th><th align='center'>" . _OLEDRION_CATEGORY . "</th><th align='center'>" . _OLEDRION_NUMBER . '<br />' . _OLEDRION_EXTRA_ID . "</th><th align='center'>" . _OLEDRION_ONLINE . "</th><th align='center'>" . _AM_OLEDRION_RECOMMENDED . "</th><th align='center'>" . _OLEDRION_DATE . "</th>"; if (oledrion_utils::getModuleOption('use_price')) { echo "<th align='center'>" . _OLEDRION_PRICE . "</th>"; $span = 9; }
$sform->addElement($productsSelect); $sform->addElement(new XoopsFormText(_AM_OLEDRION_WEIGHT, 'attribute_weight', 10, 10, $item->getVar('attribute_weight', 'e')), true); $typeSelect = new XoopsFormSelect(_AM_OLEDRION_TYPE, 'attribute_type', $item->getVar('attribute_type', 'e')); $typeSelect->addOptionArray($item->getTypesList()); $sform->addElement($typeSelect, true); // Paramétrage (pour les boutons radio et cases à cocher, le délimiteur, pour les listes déroulantes, le nombre d'éléments visibles et la sélection multiple) // Les boutons radio et cases à cocher $attributeParameters = "<div name='attributeParameters' id='attributeParameters'>\n"; $defaultValue = OLEDRION_ATTRIBUTE_CHECKBOX_WHITE_SPACE; if ($edit) { if ($item->getVar('attribute_type') == OLEDRION_ATTRIBUTE_RADIO || $item->getVar('attribute_type') == OLEDRION_ATTRIBUTE_CHECKBOX) { $defaultValue = $item->getVar('attribute_option1', 'e'); } } $options = array(OLEDRION_ATTRIBUTE_CHECKBOX_WHITE_SPACE => _AM_OLEDRION_ATTRIBUTE_DELIMITER1, OLEDRION_ATTRIBUTE_CHECKBOX_NEW_LINE => _AM_OLEDRION_ATTRIBUTE_DELIMITER2); $parameterButtonOption = _AM_OLEDRION_ATTRIBUTE_DELIMITER . ' ' . oledrion_utils::htmlSelect('option1', $options, $defaultValue, false); $attributeParameters .= "<div name='attributeParametersCheckbox' id='attributeParametersCheckbox'>\n"; $attributeParameters .= $parameterButtonOption . "\n"; $attributeParameters .= "</div>\n"; // Les listes déroulantes $attributeParameters .= "<div name='attributeParametersSelect' id='attributeParametersSelect'>\n"; $defaultValue1 = OLEDRION_ATTRIBUTE_SELECT_VISIBLE_OPTIONS; $defaultValue2 = OLEDRION_ATTRIBUTE_SELECT_MULTIPLE; if ($edit) { if ($item->getVar('attribute_type') == OLEDRION_ATTRIBUTE_SELECT) { $defaultValue1 = $item->getVar('attribute_option1', 'e'); $defaultValue2 = $item->getVar('attribute_option2', 'e'); } } $checked1 = $checked2 = ''; if ($defaultValue2 == 1) {