@@ -488,6 +488,12 @@ discard block |
||
488 | 488 | } |
489 | 489 | |
490 | 490 | |
491 | + /** |
|
492 | + * @param integer $bside |
|
493 | + * @param integer $bweight |
|
494 | + * @param integer $bvisible |
|
495 | + * @param integer $bcachetime |
|
496 | + */ |
|
491 | 497 | public function update_block($bid, $bside, $bweight, $bvisible, $btitle, $bcontent, $bctype, $bcachetime, $options=array()) |
492 | 498 | { |
493 | 499 | global $xoopsConfig; |
@@ -646,6 +652,9 @@ discard block |
||
646 | 652 | } |
647 | 653 | |
648 | 654 | |
655 | + /** |
|
656 | + * @param integer $bid |
|
657 | + */ |
|
649 | 658 | public function do_delete($bid) |
650 | 659 | { |
651 | 660 | $bid = intval($bid) ; |
@@ -671,6 +680,9 @@ discard block |
||
671 | 680 | } |
672 | 681 | |
673 | 682 | //HACK add by domifara |
683 | +/** |
|
684 | + * @param integer $bid |
|
685 | + */ |
|
674 | 686 | public function do_deleteBlockReadGroupPerm($bid) |
675 | 687 | { |
676 | 688 | $bid = intval($bid) ; |
@@ -679,6 +691,9 @@ discard block |
||
679 | 691 | $this->db->query($sql) ; |
680 | 692 | } |
681 | 693 | |
694 | + /** |
|
695 | + * @param integer $bid |
|
696 | + */ |
|
682 | 697 | public function form_delete($bid) |
683 | 698 | { |
684 | 699 | $bid = intval($bid) ; |
@@ -708,6 +723,9 @@ discard block |
||
708 | 723 | } |
709 | 724 | |
710 | 725 | |
726 | + /** |
|
727 | + * @param integer $bid |
|
728 | + */ |
|
711 | 729 | public function do_clone($bid) |
712 | 730 | { |
713 | 731 | $bid = intval($bid) ; |
@@ -786,6 +804,9 @@ discard block |
||
786 | 804 | } |
787 | 805 | |
788 | 806 | |
807 | + /** |
|
808 | + * @param integer $bid |
|
809 | + */ |
|
789 | 810 | public function do_edit($bid) |
790 | 811 | { |
791 | 812 | $bid = intval($bid) ; |
@@ -829,6 +850,9 @@ discard block |
||
829 | 850 | } |
830 | 851 | |
831 | 852 | |
853 | + /** |
|
854 | + * @param integer $bid |
|
855 | + */ |
|
832 | 856 | public function form_edit($bid, $mode = 'edit') |
833 | 857 | { |
834 | 858 | $bid = intval($bid) ; |
@@ -308,30 +308,30 @@ discard block |
||
308 | 308 | $scoln = 'disabled'; |
309 | 309 | } else { |
310 | 310 | switch ($side) { |
311 | - case XOOPS_SIDEBLOCK_LEFT : |
|
312 | - $ssel0 = " checked='checked'"; |
|
313 | - $scol0 = 'selected'; |
|
314 | - break ; |
|
315 | - case XOOPS_SIDEBLOCK_RIGHT : |
|
316 | - $ssel1 = " checked='checked'"; |
|
317 | - $scol1 = 'selected'; |
|
318 | - break ; |
|
319 | - case XOOPS_CENTERBLOCK_LEFT : |
|
320 | - $ssel2 = " checked='checked'"; |
|
321 | - $scol2 = 'selected'; |
|
322 | - break ; |
|
323 | - case XOOPS_CENTERBLOCK_RIGHT : |
|
324 | - $ssel4 = " checked='checked'"; |
|
325 | - $scol4 = 'selected'; |
|
326 | - break ; |
|
327 | - case XOOPS_CENTERBLOCK_CENTER : |
|
328 | - $ssel3 = " checked='checked'"; |
|
329 | - $scol3 = 'selected'; |
|
330 | - break ; |
|
331 | - default : |
|
332 | - $value4extra_side = $side ; |
|
333 | - $stextbox = 'selected'; |
|
334 | - break ; |
|
311 | + case XOOPS_SIDEBLOCK_LEFT : |
|
312 | + $ssel0 = " checked='checked'"; |
|
313 | + $scol0 = 'selected'; |
|
314 | + break ; |
|
315 | + case XOOPS_SIDEBLOCK_RIGHT : |
|
316 | + $ssel1 = " checked='checked'"; |
|
317 | + $scol1 = 'selected'; |
|
318 | + break ; |
|
319 | + case XOOPS_CENTERBLOCK_LEFT : |
|
320 | + $ssel2 = " checked='checked'"; |
|
321 | + $scol2 = 'selected'; |
|
322 | + break ; |
|
323 | + case XOOPS_CENTERBLOCK_RIGHT : |
|
324 | + $ssel4 = " checked='checked'"; |
|
325 | + $scol4 = 'selected'; |
|
326 | + break ; |
|
327 | + case XOOPS_CENTERBLOCK_CENTER : |
|
328 | + $ssel3 = " checked='checked'"; |
|
329 | + $scol3 = 'selected'; |
|
330 | + break ; |
|
331 | + default : |
|
332 | + $value4extra_side = $side ; |
|
333 | + $stextbox = 'selected'; |
|
334 | + break ; |
|
335 | 335 | } |
336 | 336 | } |
337 | 337 | |
@@ -851,31 +851,31 @@ discard block |
||
851 | 851 | } |
852 | 852 | |
853 | 853 | switch ($mode) { |
854 | - case 'clone' : |
|
855 | - $form_title = _MD_A_MYBLOCKSADMIN_CLONEFORM ; |
|
856 | - $button_value = _MD_A_MYBLOCKSADMIN_BTN_CLONE ; |
|
857 | - $next_op = 'clone_ok' ; |
|
858 | - // breadcrumbs |
|
859 | - $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ; |
|
860 | - $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_CLONEFORM) ; |
|
861 | - break ; |
|
862 | - case 'new' : |
|
863 | - $form_title = _MD_A_MYBLOCKSADMIN_NEWFORM ; |
|
864 | - $button_value = _MD_A_MYBLOCKSADMIN_BTN_NEW ; |
|
865 | - $next_op = 'new_ok' ; |
|
866 | - // breadcrumbs |
|
867 | - $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ; |
|
868 | - $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_NEWFORM) ; |
|
869 | - break ; |
|
870 | - case 'edit' : |
|
871 | - default : |
|
872 | - $form_title = _MD_A_MYBLOCKSADMIN_EDITFORM ; |
|
873 | - $button_value = _MD_A_MYBLOCKSADMIN_BTN_EDIT ; |
|
874 | - $next_op = 'edit_ok' ; |
|
875 | - // breadcrumbs |
|
876 | - $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ; |
|
877 | - $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_EDITFORM) ; |
|
878 | - break ; |
|
854 | + case 'clone' : |
|
855 | + $form_title = _MD_A_MYBLOCKSADMIN_CLONEFORM ; |
|
856 | + $button_value = _MD_A_MYBLOCKSADMIN_BTN_CLONE ; |
|
857 | + $next_op = 'clone_ok' ; |
|
858 | + // breadcrumbs |
|
859 | + $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ; |
|
860 | + $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_CLONEFORM) ; |
|
861 | + break ; |
|
862 | + case 'new' : |
|
863 | + $form_title = _MD_A_MYBLOCKSADMIN_NEWFORM ; |
|
864 | + $button_value = _MD_A_MYBLOCKSADMIN_BTN_NEW ; |
|
865 | + $next_op = 'new_ok' ; |
|
866 | + // breadcrumbs |
|
867 | + $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ; |
|
868 | + $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_NEWFORM) ; |
|
869 | + break ; |
|
870 | + case 'edit' : |
|
871 | + default : |
|
872 | + $form_title = _MD_A_MYBLOCKSADMIN_EDITFORM ; |
|
873 | + $button_value = _MD_A_MYBLOCKSADMIN_BTN_EDIT ; |
|
874 | + $next_op = 'edit_ok' ; |
|
875 | + // breadcrumbs |
|
876 | + $breadcrumbsObj =& AltsysBreadcrumbs::getInstance() ; |
|
877 | + $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_EDITFORM) ; |
|
878 | + break ; |
|
879 | 879 | } |
880 | 880 | |
881 | 881 | $is_custom = in_array($block->getVar('block_type'), array( 'C', 'E' )) ? true : false ; |
@@ -1051,23 +1051,23 @@ discard block |
||
1051 | 1051 | { |
1052 | 1052 | $bid = (int)(@$_GET['bid']); |
1053 | 1053 | switch (@$_GET['op']) { |
1054 | - case 'clone' : |
|
1055 | - $this->form_edit($bid, 'clone') ; |
|
1056 | - break ; |
|
1057 | - case 'new' : |
|
1058 | - case 'edit' : |
|
1059 | - $this->form_edit($bid, 'edit') ; |
|
1060 | - break ; |
|
1061 | - case 'delete' : |
|
1062 | - $this->form_delete($bid) ; |
|
1063 | - break ; |
|
1064 | - case 'list' : |
|
1065 | - default : |
|
1066 | - // the first form (blocks) |
|
1067 | - $this->list_blocks() ; |
|
1068 | - // the second form (groups) |
|
1069 | - $this->list_groups() ; |
|
1070 | - break ; |
|
1054 | + case 'clone' : |
|
1055 | + $this->form_edit($bid, 'clone') ; |
|
1056 | + break ; |
|
1057 | + case 'new' : |
|
1058 | + case 'edit' : |
|
1059 | + $this->form_edit($bid, 'edit') ; |
|
1060 | + break ; |
|
1061 | + case 'delete' : |
|
1062 | + $this->form_delete($bid) ; |
|
1063 | + break ; |
|
1064 | + case 'list' : |
|
1065 | + default : |
|
1066 | + // the first form (blocks) |
|
1067 | + $this->list_blocks() ; |
|
1068 | + // the second form (groups) |
|
1069 | + $this->list_groups() ; |
|
1070 | + break ; |
|
1071 | 1071 | } |
1072 | 1072 | } |
1073 | 1073 | } |
@@ -103,6 +103,12 @@ |
||
103 | 103 | } |
104 | 104 | |
105 | 105 | |
106 | +/** |
|
107 | + * @param integer $mid |
|
108 | + * @param integer $coretype |
|
109 | + * |
|
110 | + * @return string |
|
111 | + */ |
|
106 | 112 | function altsys_get_link2modpreferences($mid, $coretype) |
107 | 113 | { |
108 | 114 | switch ($coretype) { |
@@ -82,6 +82,12 @@ discard block |
||
82 | 82 | */ |
83 | 83 | //HACK by domifara |
84 | 84 | // public function MyXoopsGroupPermForm($title, $modid, $permname, $permdesc) |
85 | + /** |
|
86 | + * @param string $title |
|
87 | + * @param integer $modid |
|
88 | + * @param string $permname |
|
89 | + * @param string $permdesc |
|
90 | + */ |
|
85 | 91 | public function __construct($title, $modid, $permname, $permdesc) |
86 | 92 | { |
87 | 93 | // $this->XoopsForm($title, 'groupperm_form', XOOPS_URL.'/modules/system/admin/groupperm.php', 'post'); GIJ |
@@ -112,6 +118,9 @@ discard block |
||
112 | 118 | * Add appendix |
113 | 119 | * |
114 | 120 | * @access public |
121 | + * @param string $permName |
|
122 | + * @param integer $itemId |
|
123 | + * @param string $itemName |
|
115 | 124 | */ |
116 | 125 | public function addAppendix($permName, $itemId, $itemName) |
117 | 126 | { |
@@ -251,6 +260,7 @@ discard block |
||
251 | 260 | |
252 | 261 | /** |
253 | 262 | * Constructor |
263 | + * @param string $name |
|
254 | 264 | */ |
255 | 265 | public function MyXoopsGroupFormCheckBox($caption, $name, $groupId, $values = null) |
256 | 266 | { |
@@ -201,41 +201,41 @@ |
||
201 | 201 | } |
202 | 202 | } |
203 | 203 | switch ($block_arr[$i]->getVar('side')) { |
204 | - case XOOPS_SIDEBLOCK_LEFT: |
|
205 | - if (!isset($show_lblock)) { |
|
206 | - $xoopsTpl->assign('xoops_showlblock', 1); |
|
207 | - $show_lblock = 1; |
|
208 | - } |
|
209 | - $xoopsTpl->append('xoops_lblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent, 'weight' => $block_arr[$i]->getVar('weight'))); |
|
210 | - break; |
|
211 | - case XOOPS_CENTERBLOCK_LEFT: |
|
212 | - if (!isset($show_cblock)) { |
|
213 | - $xoopsTpl->assign('xoops_showcblock', 1); |
|
214 | - $show_cblock = 1; |
|
215 | - } |
|
216 | - $xoopsTpl->append('xoops_clblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent, 'weight' => $block_arr[$i]->getVar('weight'))); |
|
217 | - break; |
|
218 | - case XOOPS_CENTERBLOCK_RIGHT: |
|
219 | - if (!isset($show_cblock)) { |
|
220 | - $xoopsTpl->assign('xoops_showcblock', 1); |
|
221 | - $show_cblock = 1; |
|
222 | - } |
|
223 | - $xoopsTpl->append('xoops_crblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent, 'weight' => $block_arr[$i]->getVar('weight'))); |
|
224 | - break; |
|
225 | - case XOOPS_CENTERBLOCK_CENTER: |
|
226 | - if (!isset($show_cblock)) { |
|
227 | - $xoopsTpl->assign('xoops_showcblock', 1); |
|
228 | - $show_cblock = 1; |
|
229 | - } |
|
230 | - $xoopsTpl->append('xoops_ccblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent, 'weight' => $block_arr[$i]->getVar('weight'))); |
|
231 | - break; |
|
232 | - case XOOPS_SIDEBLOCK_RIGHT: |
|
233 | - if (!isset($show_rblock)) { |
|
234 | - $xoopsTpl->assign('xoops_showrblock', 1); |
|
235 | - $show_rblock = 1; |
|
236 | - } |
|
237 | - $xoopsTpl->append('xoops_rblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent, 'weight' => $block_arr[$i]->getVar('weight'))); |
|
238 | - break; |
|
204 | + case XOOPS_SIDEBLOCK_LEFT: |
|
205 | + if (!isset($show_lblock)) { |
|
206 | + $xoopsTpl->assign('xoops_showlblock', 1); |
|
207 | + $show_lblock = 1; |
|
208 | + } |
|
209 | + $xoopsTpl->append('xoops_lblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent, 'weight' => $block_arr[$i]->getVar('weight'))); |
|
210 | + break; |
|
211 | + case XOOPS_CENTERBLOCK_LEFT: |
|
212 | + if (!isset($show_cblock)) { |
|
213 | + $xoopsTpl->assign('xoops_showcblock', 1); |
|
214 | + $show_cblock = 1; |
|
215 | + } |
|
216 | + $xoopsTpl->append('xoops_clblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent, 'weight' => $block_arr[$i]->getVar('weight'))); |
|
217 | + break; |
|
218 | + case XOOPS_CENTERBLOCK_RIGHT: |
|
219 | + if (!isset($show_cblock)) { |
|
220 | + $xoopsTpl->assign('xoops_showcblock', 1); |
|
221 | + $show_cblock = 1; |
|
222 | + } |
|
223 | + $xoopsTpl->append('xoops_crblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent, 'weight' => $block_arr[$i]->getVar('weight'))); |
|
224 | + break; |
|
225 | + case XOOPS_CENTERBLOCK_CENTER: |
|
226 | + if (!isset($show_cblock)) { |
|
227 | + $xoopsTpl->assign('xoops_showcblock', 1); |
|
228 | + $show_cblock = 1; |
|
229 | + } |
|
230 | + $xoopsTpl->append('xoops_ccblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent, 'weight' => $block_arr[$i]->getVar('weight'))); |
|
231 | + break; |
|
232 | + case XOOPS_SIDEBLOCK_RIGHT: |
|
233 | + if (!isset($show_rblock)) { |
|
234 | + $xoopsTpl->assign('xoops_showrblock', 1); |
|
235 | + $show_rblock = 1; |
|
236 | + } |
|
237 | + $xoopsTpl->append('xoops_rblocks', array('title' => $block_arr[$i]->getVar('title'), 'content' => $bcontent, 'weight' => $block_arr[$i]->getVar('weight'))); |
|
238 | + break; |
|
239 | 239 | } |
240 | 240 | unset($bcontent); |
241 | 241 | } |
@@ -69,6 +69,9 @@ |
||
69 | 69 | |
70 | 70 | |
71 | 71 | // private |
72 | +/** |
|
73 | + * @param integer $target_side |
|
74 | + */ |
|
72 | 75 | public function renderRadio4BlockPosition($target_side, $block_data) |
73 | 76 | { |
74 | 77 | $bid = intval($block_data['bid']) ; |
@@ -76,83 +76,83 @@ |
||
76 | 76 | $title4tray = (!defined($config[$i]->getVar('conf_desc')) || constant($config[$i]->getVar('conf_desc')) == '') ? (constant($config[$i]->getVar('conf_title')).$title_icon) : (constant($config[$i]->getVar('conf_title')).$title_icon.'<br /><br /><span style="font-weight:normal;">'.constant($config[$i]->getVar('conf_desc')).'</span>'); // GIJ |
77 | 77 | $title = '' ; // GIJ |
78 | 78 | switch ($config[$i]->getVar('conf_formtype')) { |
79 | - case 'textarea': |
|
80 | - (method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance(); |
|
81 | - if ($config[$i]->getVar('conf_valuetype') == 'array') { |
|
82 | - // this is exceptional.. only when value type is arrayneed a smarter way for this |
|
83 | - $ele = ($config[$i]->getVar('conf_value') != '') ? new XoopsFormTextArea($title, $config[$i]->getVar('conf_name'), $myts->htmlspecialchars(implode('|', $config[$i]->getConfValueForOutput())), 5, 50) : new XoopsFormTextArea($title, $config[$i]->getVar('conf_name'), '', 5, 50); |
|
84 | - } else { |
|
85 | - $ele = new XoopsFormTextArea($title, $config[$i]->getVar('conf_name'), $myts->htmlspecialchars($config[$i]->getConfValueForOutput()), 5, 50); |
|
86 | - } |
|
87 | - break; |
|
88 | - case 'select': |
|
89 | - case 'radio': |
|
90 | - if ($config[$i]->getVar('conf_formtype') === 'select') { |
|
91 | - $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); |
|
92 | - $addBr = ''; |
|
93 | - } else { |
|
94 | - $ele = new XoopsFormRadio($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); |
|
95 | - $addBr = '<br />'; |
|
96 | - } |
|
97 | - $options = $config_handler->getConfigOptions(new Criteria('conf_id', $config[$i]->getVar('conf_id'))); |
|
98 | - $opcount = count($options); |
|
99 | - for ($j = 0; $j < $opcount; $j++) { |
|
100 | - $optval = defined($options[$j]->getVar('confop_value')) ? constant($options[$j]->getVar('confop_value')) : $options[$j]->getVar('confop_value'); |
|
101 | - $optkey = defined($options[$j]->getVar('confop_name')) ? constant($options[$j]->getVar('confop_name')) : $options[$j]->getVar('confop_name'); |
|
102 | - $ele->addOption($optval, $optkey.$addBr); |
|
103 | - } |
|
104 | - break; |
|
105 | - case 'select_multi': |
|
106 | - case 'checkbox': |
|
107 | - if ($config[$i]->getVar('conf_formtype') === 'select_multi') { |
|
108 | - $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput(), 5, true); |
|
109 | - $addBr = ''; |
|
110 | - } else { |
|
111 | - $ele = new XoopsFormCheckBox($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); |
|
112 | - $addBr = '<br />'; |
|
113 | - } |
|
114 | - $options = $config_handler->getConfigOptions(new Criteria('conf_id', $config[$i]->getVar('conf_id'))); |
|
115 | - $opcount = count($options); |
|
116 | - for ($j = 0; $j < $opcount; $j++) { |
|
117 | - $optval = defined($options[$j]->getVar('confop_value')) ? constant($options[$j]->getVar('confop_value')) : $options[$j]->getVar('confop_value'); |
|
118 | - $optkey = defined($options[$j]->getVar('confop_name')) ? constant($options[$j]->getVar('confop_name')) : $options[$j]->getVar('confop_name'); |
|
79 | + case 'textarea': |
|
80 | + (method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance(); |
|
81 | + if ($config[$i]->getVar('conf_valuetype') == 'array') { |
|
82 | + // this is exceptional.. only when value type is arrayneed a smarter way for this |
|
83 | + $ele = ($config[$i]->getVar('conf_value') != '') ? new XoopsFormTextArea($title, $config[$i]->getVar('conf_name'), $myts->htmlspecialchars(implode('|', $config[$i]->getConfValueForOutput())), 5, 50) : new XoopsFormTextArea($title, $config[$i]->getVar('conf_name'), '', 5, 50); |
|
84 | + } else { |
|
85 | + $ele = new XoopsFormTextArea($title, $config[$i]->getVar('conf_name'), $myts->htmlspecialchars($config[$i]->getConfValueForOutput()), 5, 50); |
|
86 | + } |
|
87 | + break; |
|
88 | + case 'select': |
|
89 | + case 'radio': |
|
90 | + if ($config[$i]->getVar('conf_formtype') === 'select') { |
|
91 | + $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); |
|
92 | + $addBr = ''; |
|
93 | + } else { |
|
94 | + $ele = new XoopsFormRadio($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); |
|
95 | + $addBr = '<br />'; |
|
96 | + } |
|
97 | + $options = $config_handler->getConfigOptions(new Criteria('conf_id', $config[$i]->getVar('conf_id'))); |
|
98 | + $opcount = count($options); |
|
99 | + for ($j = 0; $j < $opcount; $j++) { |
|
100 | + $optval = defined($options[$j]->getVar('confop_value')) ? constant($options[$j]->getVar('confop_value')) : $options[$j]->getVar('confop_value'); |
|
101 | + $optkey = defined($options[$j]->getVar('confop_name')) ? constant($options[$j]->getVar('confop_name')) : $options[$j]->getVar('confop_name'); |
|
102 | + $ele->addOption($optval, $optkey.$addBr); |
|
103 | + } |
|
104 | + break; |
|
105 | + case 'select_multi': |
|
106 | + case 'checkbox': |
|
107 | + if ($config[$i]->getVar('conf_formtype') === 'select_multi') { |
|
108 | + $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput(), 5, true); |
|
109 | + $addBr = ''; |
|
110 | + } else { |
|
111 | + $ele = new XoopsFormCheckBox($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); |
|
112 | + $addBr = '<br />'; |
|
113 | + } |
|
114 | + $options = $config_handler->getConfigOptions(new Criteria('conf_id', $config[$i]->getVar('conf_id'))); |
|
115 | + $opcount = count($options); |
|
116 | + for ($j = 0; $j < $opcount; $j++) { |
|
117 | + $optval = defined($options[$j]->getVar('confop_value')) ? constant($options[$j]->getVar('confop_value')) : $options[$j]->getVar('confop_value'); |
|
118 | + $optkey = defined($options[$j]->getVar('confop_name')) ? constant($options[$j]->getVar('confop_name')) : $options[$j]->getVar('confop_name'); |
|
119 | 119 | |
120 | - $ele->addOption($optval, $optkey.$addBr); |
|
121 | - } |
|
122 | - break; |
|
123 | - case 'yesno': |
|
124 | - $ele = new XoopsFormRadioYN($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput(), _YES, _NO); |
|
125 | - break; |
|
126 | - case 'group': |
|
127 | - include_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
128 | - $ele = new XoopsFormSelectGroup($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput(), 1, false); |
|
129 | - break; |
|
130 | - case 'group_multi': |
|
131 | - include_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
132 | - $ele = new XoopsFormSelectGroup($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput(), 5, true); |
|
133 | - break; |
|
134 | - case 'group_checkbox': |
|
135 | - include_once __DIR__.'/include/formcheckboxgroup.php'; |
|
136 | - $ele = new AltsysFormCheckboxGroup($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput()); |
|
137 | - break; |
|
138 | - // RMV-NOTIFY: added 'user' and 'user_multi' |
|
139 | - case 'user': |
|
140 | - include_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
141 | - $ele = new XoopsFormSelectUser($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput(), 1, false); |
|
142 | - break; |
|
143 | - case 'user_multi': |
|
144 | - include_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
145 | - $ele = new XoopsFormSelectUser($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput(), 5, true); |
|
146 | - break; |
|
147 | - case 'password': |
|
148 | - (method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance(); |
|
149 | - $ele = new XoopsFormPassword($title, $config[$i]->getVar('conf_name'), 50, 255, $myts->htmlspecialchars($config[$i]->getConfValueForOutput())); |
|
150 | - break; |
|
151 | - case 'textbox': |
|
152 | - default: |
|
153 | - (method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance(); |
|
154 | - $ele = new XoopsFormText($title, $config[$i]->getVar('conf_name'), 50, 255, $myts->htmlspecialchars($config[$i]->getConfValueForOutput())); |
|
155 | - break; |
|
120 | + $ele->addOption($optval, $optkey.$addBr); |
|
121 | + } |
|
122 | + break; |
|
123 | + case 'yesno': |
|
124 | + $ele = new XoopsFormRadioYN($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput(), _YES, _NO); |
|
125 | + break; |
|
126 | + case 'group': |
|
127 | + include_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
128 | + $ele = new XoopsFormSelectGroup($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput(), 1, false); |
|
129 | + break; |
|
130 | + case 'group_multi': |
|
131 | + include_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
132 | + $ele = new XoopsFormSelectGroup($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput(), 5, true); |
|
133 | + break; |
|
134 | + case 'group_checkbox': |
|
135 | + include_once __DIR__.'/include/formcheckboxgroup.php'; |
|
136 | + $ele = new AltsysFormCheckboxGroup($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput()); |
|
137 | + break; |
|
138 | + // RMV-NOTIFY: added 'user' and 'user_multi' |
|
139 | + case 'user': |
|
140 | + include_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
141 | + $ele = new XoopsFormSelectUser($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput(), 1, false); |
|
142 | + break; |
|
143 | + case 'user_multi': |
|
144 | + include_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
145 | + $ele = new XoopsFormSelectUser($title, $config[$i]->getVar('conf_name'), false, $config[$i]->getConfValueForOutput(), 5, true); |
|
146 | + break; |
|
147 | + case 'password': |
|
148 | + (method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance(); |
|
149 | + $ele = new XoopsFormPassword($title, $config[$i]->getVar('conf_name'), 50, 255, $myts->htmlspecialchars($config[$i]->getConfValueForOutput())); |
|
150 | + break; |
|
151 | + case 'textbox': |
|
152 | + default: |
|
153 | + (method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || $myts = MyTextSanitizer::getInstance(); |
|
154 | + $ele = new XoopsFormText($title, $config[$i]->getVar('conf_name'), 50, 255, $myts->htmlspecialchars($config[$i]->getConfValueForOutput())); |
|
155 | + break; |
|
156 | 156 | } |
157 | 157 | $hidden = new XoopsFormHidden('conf_ids[]', $config[$i]->getVar('conf_id')); |
158 | 158 | $ele_tray = new XoopsFormElementTray($title4tray, '') ; |