| @@ 56-76 (lines=21) @@ | ||
| 53 | * @param $options |
|
| 54 | * @return string |
|
| 55 | */ |
|
| 56 | function b_oledrion_promotion_edit($options) |
|
| 57 | { |
|
| 58 | // '10|0'; // Voir 10 produits, pour toutes les catégories |
|
| 59 | global $xoopsConfig; |
|
| 60 | include XOOPS_ROOT_PATH . '/modules/oledrion/include/common.php'; |
|
| 61 | require_once OLEDRION_PATH . 'class/tree.php'; |
|
| 62 | $tblCategories = array(); |
|
| 63 | $tblCategories = $h_oledrion_cat->getAllCategories(new Oledrion_parameters()); |
|
| 64 | $mytree = new Oledrion_XoopsObjectTree($tblCategories, 'cat_cid', 'cat_pid'); |
|
| 65 | $form = ''; |
|
| 66 | $checkeds = array('', ''); |
|
| 67 | $checkeds[$options[1]] = 'checked'; |
|
| 68 | $form .= "<table border='0'>"; |
|
| 69 | $form .= '<tr><td>' . _MB_OLEDRION_PRODUCTS_CNT . "</td><td><input type='text' name='options[]' id='options' value='" . $options[0] . "'></td></tr>"; |
|
| 70 | //$form .= '<tr><td>'._MB_OLEDRION_SORT_ORDER."</td><td><input type='radio' name='options[]' id='options[]' value='0' ".$checkeds[0].">"._MB_OLEDRION_SORT_1." <input type='radio' name='options[]' id='options[]' value='1' ".$checkeds[1].">"._MB_OLEDRION_SORT_2.'</td></tr>'; |
|
| 71 | $select = $mytree->makeSelBox('options[]', 'cat_title', '-', $options[1], _MB_OLEDRION_ALL_CATEGORIES); |
|
| 72 | $form .= '<tr><td>' . _MB_OLEDRION_CATEGORY . '</td><td>' . $select . '</td></tr>'; |
|
| 73 | $form .= '</table>'; |
|
| 74 | ||
| 75 | return $form; |
|
| 76 | } |
|
| 77 | ||
| 78 | /** |
|
| 79 | * Bloc à la volée |
|
| @@ 57-77 (lines=21) @@ | ||
| 54 | * @param $options |
|
| 55 | * @return string |
|
| 56 | */ |
|
| 57 | function b_oledrion_rated_edit($options) |
|
| 58 | { |
|
| 59 | // '10|0'; // Voir 10 produits, pour toutes les catégories |
|
| 60 | global $xoopsConfig; |
|
| 61 | include XOOPS_ROOT_PATH . '/modules/oledrion/include/common.php'; |
|
| 62 | require_once OLEDRION_PATH . 'class/tree.php'; |
|
| 63 | $tblCategories = array(); |
|
| 64 | $tblCategories = $h_oledrion_cat->getAllCategories(new Oledrion_parameters()); |
|
| 65 | $mytree = new Oledrion_XoopsObjectTree($tblCategories, 'cat_cid', 'cat_pid'); |
|
| 66 | $form = ''; |
|
| 67 | $checkeds = array('', ''); |
|
| 68 | $checkeds[$options[1]] = 'checked'; |
|
| 69 | $form .= "<table border='0'>"; |
|
| 70 | $form .= '<tr><td>' . _MB_OLEDRION_PRODUCTS_CNT . "</td><td><input type='text' name='options[]' id='options' value='" . $options[0] . "'></td></tr>"; |
|
| 71 | //$form .= '<tr><td>'._MB_OLEDRION_SORT_ORDER."</td><td><input type='radio' name='options[]' id='options[]' value='0' ".$checkeds[0].">"._MB_OLEDRION_SORT_1." <input type='radio' name='options[]' id='options[]' value='1' ".$checkeds[1].">"._MB_OLEDRION_SORT_2.'</td></tr>'; |
|
| 72 | $select = $mytree->makeSelBox('options[]', 'cat_title', '-', $options[1], _MB_OLEDRION_ALL_CATEGORIES); |
|
| 73 | $form .= '<tr><td>' . _MB_OLEDRION_CATEGORY . '</td><td>' . $select . '</td></tr>'; |
|
| 74 | $form .= '</table>'; |
|
| 75 | ||
| 76 | return $form; |
|
| 77 | } |
|
| 78 | ||
| 79 | /** |
|
| 80 | * Bloc à la volée |
|
| @@ 61-80 (lines=20) @@ | ||
| 58 | * @param $options |
|
| 59 | * @return string |
|
| 60 | */ |
|
| 61 | function b_oledrion_recomm_edit($options) |
|
| 62 | { |
|
| 63 | // '10|0'; // Voir 10 produits, pour toutes les catégories |
|
| 64 | global $xoopsConfig; |
|
| 65 | include XOOPS_ROOT_PATH . '/modules/oledrion/include/common.php'; |
|
| 66 | require_once OLEDRION_PATH . 'class/tree.php'; |
|
| 67 | $tblCategories = array(); |
|
| 68 | $tblCategories = $h_oledrion_cat->getAllCategories(new Oledrion_parameters()); |
|
| 69 | $mytree = new Oledrion_XoopsObjectTree($tblCategories, 'cat_cid', 'cat_pid'); |
|
| 70 | $form = ''; |
|
| 71 | $checkeds = array('', ''); |
|
| 72 | $checkeds[$options[1]] = 'checked'; |
|
| 73 | $form .= "<table border='0'>"; |
|
| 74 | $form .= '<tr><td>' . _MB_OLEDRION_PRODUCTS_CNT . "</td><td><input type='text' name='options[]' id='options' value='" . $options[0] . "'></td></tr>"; |
|
| 75 | $select = $mytree->makeSelBox('options[]', 'cat_title', '-', $options[1], _MB_OLEDRION_ALL_CATEGORIES); |
|
| 76 | $form .= '<tr><td>' . _MB_OLEDRION_CATEGORY . '</td><td>' . $select . '</td></tr>'; |
|
| 77 | $form .= '</table>'; |
|
| 78 | ||
| 79 | return $form; |
|
| 80 | } |
|
| 81 | ||
| 82 | /** |
|
| 83 | * Bloc à la volée |
|
| @@ 55-75 (lines=21) @@ | ||
| 52 | * @param $options |
|
| 53 | * @return string |
|
| 54 | */ |
|
| 55 | function b_oledrion_top_edit($options) |
|
| 56 | { |
|
| 57 | // '10|0'; // Voir 10 produits, pour toutes les catégories |
|
| 58 | global $xoopsConfig; |
|
| 59 | include XOOPS_ROOT_PATH . '/modules/oledrion/include/common.php'; |
|
| 60 | require_once OLEDRION_PATH . 'class/tree.php'; |
|
| 61 | $tblCategories = array(); |
|
| 62 | $tblCategories = $h_oledrion_cat->getAllCategories(new Oledrion_parameters()); |
|
| 63 | $mytree = new Oledrion_XoopsObjectTree($tblCategories, 'cat_cid', 'cat_pid'); |
|
| 64 | $form = ''; |
|
| 65 | $checkeds = array('', ''); |
|
| 66 | $checkeds[$options[1]] = 'checked'; |
|
| 67 | $form .= "<table border='0'>"; |
|
| 68 | $form .= '<tr><td>' . _MB_OLEDRION_PRODUCTS_CNT . "</td><td><input type='text' name='options[]' id='options' value='" . $options[0] . "'></td></tr>"; |
|
| 69 | //$form .= '<tr><td>'._MB_OLEDRION_SORT_ORDER."</td><td><input type='radio' name='options[]' id='options[]' value='0' ".$checkeds[0].">"._MB_OLEDRION_SORT_1." <input type='radio' name='options[]' id='options[]' value='1' ".$checkeds[1].">"._MB_OLEDRION_SORT_2.'</td></tr>'; |
|
| 70 | $select = $mytree->makeSelBox('options[]', 'cat_title', '-', $options[1], _MB_OLEDRION_ALL_CATEGORIES); |
|
| 71 | $form .= '<tr><td>' . _MB_OLEDRION_CATEGORY . '</td><td>' . $select . '</td></tr>'; |
|
| 72 | $form .= '</table>'; |
|
| 73 | ||
| 74 | return $form; |
|
| 75 | } |
|
| 76 | ||
| 77 | /** |
|
| 78 | * Bloc à la volée |
|