@@ -1,6 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | class altsysUtils |
3 | 3 | { |
4 | + /** |
|
5 | + * @param string $name |
|
6 | + */ |
|
4 | 7 | public static function getDelegateCallbackClassNames($name, $doRegist = true) |
5 | 8 | { |
6 | 9 | $names = array(); |
@@ -487,6 +487,12 @@ discard block |
||
487 | 487 | } |
488 | 488 | |
489 | 489 | |
490 | + /** |
|
491 | + * @param integer $bside |
|
492 | + * @param integer $bweight |
|
493 | + * @param integer $bvisible |
|
494 | + * @param integer $bcachetime |
|
495 | + */ |
|
490 | 496 | public function update_block($bid, $bside, $bweight, $bvisible, $btitle, $bcontent, $bctype, $bcachetime, $options=array()) |
491 | 497 | { |
492 | 498 | global $xoopsConfig; |
@@ -645,6 +651,9 @@ discard block |
||
645 | 651 | } |
646 | 652 | |
647 | 653 | |
654 | + /** |
|
655 | + * @param integer $bid |
|
656 | + */ |
|
648 | 657 | public function do_delete($bid) |
649 | 658 | { |
650 | 659 | $bid = (int)$bid; |
@@ -670,6 +679,9 @@ discard block |
||
670 | 679 | } |
671 | 680 | |
672 | 681 | //HACK add by domifara |
682 | +/** |
|
683 | + * @param integer $bid |
|
684 | + */ |
|
673 | 685 | public function do_deleteBlockReadGroupPerm($bid) |
674 | 686 | { |
675 | 687 | $bid = (int)$bid; |
@@ -678,6 +690,9 @@ discard block |
||
678 | 690 | $this->db->query($sql) ; |
679 | 691 | } |
680 | 692 | |
693 | + /** |
|
694 | + * @param integer $bid |
|
695 | + */ |
|
681 | 696 | public function form_delete($bid) |
682 | 697 | { |
683 | 698 | $bid = (int)$bid; |
@@ -707,6 +722,9 @@ discard block |
||
707 | 722 | } |
708 | 723 | |
709 | 724 | |
725 | + /** |
|
726 | + * @param integer $bid |
|
727 | + */ |
|
710 | 728 | public function do_clone($bid) |
711 | 729 | { |
712 | 730 | $bid = (int)$bid; |
@@ -785,6 +803,9 @@ discard block |
||
785 | 803 | } |
786 | 804 | |
787 | 805 | |
806 | + /** |
|
807 | + * @param integer $bid |
|
808 | + */ |
|
788 | 809 | public function do_edit($bid) |
789 | 810 | { |
790 | 811 | $bid = (int)$bid; |
@@ -828,6 +849,9 @@ discard block |
||
828 | 849 | } |
829 | 850 | |
830 | 851 | |
852 | + /** |
|
853 | + * @param integer $bid |
|
854 | + */ |
|
831 | 855 | public function form_edit($bid, $mode = 'edit') |
832 | 856 | { |
833 | 857 | $bid = (int)$bid; |
@@ -307,30 +307,30 @@ discard block |
||
307 | 307 | $scoln = 'disabled'; |
308 | 308 | } else { |
309 | 309 | switch ($side) { |
310 | - case XOOPS_SIDEBLOCK_LEFT: |
|
311 | - $ssel0 = " checked='checked'"; |
|
312 | - $scol0 = 'selected'; |
|
313 | - break ; |
|
314 | - case XOOPS_SIDEBLOCK_RIGHT: |
|
315 | - $ssel1 = " checked='checked'"; |
|
316 | - $scol1 = 'selected'; |
|
317 | - break ; |
|
318 | - case XOOPS_CENTERBLOCK_LEFT: |
|
319 | - $ssel2 = " checked='checked'"; |
|
320 | - $scol2 = 'selected'; |
|
321 | - break ; |
|
322 | - case XOOPS_CENTERBLOCK_RIGHT: |
|
323 | - $ssel4 = " checked='checked'"; |
|
324 | - $scol4 = 'selected'; |
|
325 | - break ; |
|
326 | - case XOOPS_CENTERBLOCK_CENTER: |
|
327 | - $ssel3 = " checked='checked'"; |
|
328 | - $scol3 = 'selected'; |
|
329 | - break ; |
|
330 | - default: |
|
331 | - $value4extra_side = $side ; |
|
332 | - $stextbox = 'selected'; |
|
333 | - break ; |
|
310 | + case XOOPS_SIDEBLOCK_LEFT: |
|
311 | + $ssel0 = " checked='checked'"; |
|
312 | + $scol0 = 'selected'; |
|
313 | + break ; |
|
314 | + case XOOPS_SIDEBLOCK_RIGHT: |
|
315 | + $ssel1 = " checked='checked'"; |
|
316 | + $scol1 = 'selected'; |
|
317 | + break ; |
|
318 | + case XOOPS_CENTERBLOCK_LEFT: |
|
319 | + $ssel2 = " checked='checked'"; |
|
320 | + $scol2 = 'selected'; |
|
321 | + break ; |
|
322 | + case XOOPS_CENTERBLOCK_RIGHT: |
|
323 | + $ssel4 = " checked='checked'"; |
|
324 | + $scol4 = 'selected'; |
|
325 | + break ; |
|
326 | + case XOOPS_CENTERBLOCK_CENTER: |
|
327 | + $ssel3 = " checked='checked'"; |
|
328 | + $scol3 = 'selected'; |
|
329 | + break ; |
|
330 | + default: |
|
331 | + $value4extra_side = $side ; |
|
332 | + $stextbox = 'selected'; |
|
333 | + break ; |
|
334 | 334 | } |
335 | 335 | } |
336 | 336 | |
@@ -850,31 +850,31 @@ discard block |
||
850 | 850 | } |
851 | 851 | |
852 | 852 | switch ($mode) { |
853 | - case 'clone': |
|
854 | - $form_title = _MD_A_MYBLOCKSADMIN_CLONEFORM ; |
|
855 | - $button_value = _MD_A_MYBLOCKSADMIN_BTN_CLONE ; |
|
856 | - $next_op = 'clone_ok' ; |
|
857 | - // breadcrumbs |
|
858 | - $breadcrumbsObj = AltsysBreadcrumbs::getInstance() ; |
|
859 | - $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_CLONEFORM) ; |
|
860 | - break ; |
|
861 | - case 'new': |
|
862 | - $form_title = _MD_A_MYBLOCKSADMIN_NEWFORM ; |
|
863 | - $button_value = _MD_A_MYBLOCKSADMIN_BTN_NEW ; |
|
864 | - $next_op = 'new_ok' ; |
|
865 | - // breadcrumbs |
|
866 | - $breadcrumbsObj = AltsysBreadcrumbs::getInstance() ; |
|
867 | - $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_NEWFORM) ; |
|
868 | - break ; |
|
869 | - case 'edit': |
|
870 | - default: |
|
871 | - $form_title = _MD_A_MYBLOCKSADMIN_EDITFORM ; |
|
872 | - $button_value = _MD_A_MYBLOCKSADMIN_BTN_EDIT ; |
|
873 | - $next_op = 'edit_ok' ; |
|
874 | - // breadcrumbs |
|
875 | - $breadcrumbsObj = AltsysBreadcrumbs::getInstance() ; |
|
876 | - $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_EDITFORM) ; |
|
877 | - break ; |
|
853 | + case 'clone': |
|
854 | + $form_title = _MD_A_MYBLOCKSADMIN_CLONEFORM ; |
|
855 | + $button_value = _MD_A_MYBLOCKSADMIN_BTN_CLONE ; |
|
856 | + $next_op = 'clone_ok' ; |
|
857 | + // breadcrumbs |
|
858 | + $breadcrumbsObj = AltsysBreadcrumbs::getInstance() ; |
|
859 | + $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_CLONEFORM) ; |
|
860 | + break ; |
|
861 | + case 'new': |
|
862 | + $form_title = _MD_A_MYBLOCKSADMIN_NEWFORM ; |
|
863 | + $button_value = _MD_A_MYBLOCKSADMIN_BTN_NEW ; |
|
864 | + $next_op = 'new_ok' ; |
|
865 | + // breadcrumbs |
|
866 | + $breadcrumbsObj = AltsysBreadcrumbs::getInstance() ; |
|
867 | + $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_NEWFORM) ; |
|
868 | + break ; |
|
869 | + case 'edit': |
|
870 | + default: |
|
871 | + $form_title = _MD_A_MYBLOCKSADMIN_EDITFORM ; |
|
872 | + $button_value = _MD_A_MYBLOCKSADMIN_BTN_EDIT ; |
|
873 | + $next_op = 'edit_ok' ; |
|
874 | + // breadcrumbs |
|
875 | + $breadcrumbsObj = AltsysBreadcrumbs::getInstance() ; |
|
876 | + $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_EDITFORM) ; |
|
877 | + break ; |
|
878 | 878 | } |
879 | 879 | |
880 | 880 | $is_custom = in_array($block->getVar('block_type'), array( 'C', 'E' )) ? true : false ; |
@@ -1050,23 +1050,23 @@ discard block |
||
1050 | 1050 | { |
1051 | 1051 | $bid = (int)(@$_GET['bid']); |
1052 | 1052 | switch (@$_GET['op']) { |
1053 | - case 'clone': |
|
1054 | - $this->form_edit($bid, 'clone') ; |
|
1055 | - break ; |
|
1056 | - case 'new': |
|
1057 | - case 'edit': |
|
1058 | - $this->form_edit($bid, 'edit') ; |
|
1059 | - break ; |
|
1060 | - case 'delete': |
|
1061 | - $this->form_delete($bid) ; |
|
1062 | - break ; |
|
1063 | - case 'list': |
|
1064 | - default: |
|
1065 | - // the first form (blocks) |
|
1066 | - $this->list_blocks() ; |
|
1067 | - // the second form (groups) |
|
1068 | - $this->list_groups() ; |
|
1069 | - break ; |
|
1053 | + case 'clone': |
|
1054 | + $this->form_edit($bid, 'clone') ; |
|
1055 | + break ; |
|
1056 | + case 'new': |
|
1057 | + case 'edit': |
|
1058 | + $this->form_edit($bid, 'edit') ; |
|
1059 | + break ; |
|
1060 | + case 'delete': |
|
1061 | + $this->form_delete($bid) ; |
|
1062 | + break ; |
|
1063 | + case 'list': |
|
1064 | + default: |
|
1065 | + // the first form (blocks) |
|
1066 | + $this->list_blocks() ; |
|
1067 | + // the second form (groups) |
|
1068 | + $this->list_groups() ; |
|
1069 | + break ; |
|
1070 | 1070 | } |
1071 | 1071 | } |
1072 | 1072 | } |
@@ -91,6 +91,9 @@ |
||
91 | 91 | |
92 | 92 | |
93 | 93 | // private |
94 | +/** |
|
95 | + * @param integer $target_side |
|
96 | + */ |
|
94 | 97 | public function renderRadio4BlockPosition($target_side, $block_data) |
95 | 98 | { |
96 | 99 | $bid = (int)$block_data['bid']; |
@@ -68,6 +68,9 @@ |
||
68 | 68 | |
69 | 69 | |
70 | 70 | // private |
71 | +/** |
|
72 | + * @param integer $target_side |
|
73 | + */ |
|
71 | 74 | public function renderRadio4BlockPosition($target_side, $block_data) |
72 | 75 | { |
73 | 76 | $bid = (int)$block_data['bid']; |
@@ -136,6 +136,9 @@ discard block |
||
136 | 136 | */ |
137 | 137 | //HACK by domifara |
138 | 138 | // function Archive_Zip($p_zipname) |
139 | + /** |
|
140 | + * @param string $p_zipname |
|
141 | + */ |
|
139 | 142 | public function __construct($p_zipname) |
140 | 143 | { |
141 | 144 | |
@@ -176,7 +179,7 @@ discard block |
||
176 | 179 | * @param mixed $p_filelist The list of the files or folders to add. |
177 | 180 | * It can be a string with filenames separated |
178 | 181 | * by a comma, or an array of filenames. |
179 | - * @param mixed $p_params An array of variable parameters and values. |
|
182 | + * @param integer $p_params An array of variable parameters and values. |
|
180 | 183 | * @return mixed An array of file description on success, |
181 | 184 | * an error code on error |
182 | 185 | */ |
@@ -247,7 +250,7 @@ discard block |
||
247 | 250 | * @param mixed $p_filelist The list of the files or folders to add. |
248 | 251 | * It can be a string with filenames separated |
249 | 252 | * by a comma, or an array of filenames. |
250 | - * @param mixed $p_params An array of variable parameters and values. |
|
253 | + * @param integer $p_params An array of variable parameters and values. |
|
251 | 254 | * @return mixed An array of file description on success, |
252 | 255 | * 0 on an unrecoverable failure, an error code is logged. |
253 | 256 | */ |
@@ -397,7 +400,7 @@ discard block |
||
397 | 400 | * each entry extraction. |
398 | 401 | * |
399 | 402 | * @access public |
400 | - * @param mixed $p_params An array of variable parameters and values. |
|
403 | + * @param integer $p_params An array of variable parameters and values. |
|
401 | 404 | * @return mixed An array of file description on success, |
402 | 405 | * 0 on an unrecoverable failure, an error code is logged. |
403 | 406 | */ |
@@ -512,7 +515,6 @@ discard block |
||
512 | 515 | * status : not_exist, ok |
513 | 516 | * |
514 | 517 | * @access public |
515 | - * @param mixed $p_params {Description} |
|
516 | 518 | * @return mixed An array with the global properties or 0 on error. |
517 | 519 | */ |
518 | 520 | public function properties() |
@@ -996,6 +998,7 @@ discard block |
||
996 | 998 | * |
997 | 999 | * { Description } |
998 | 1000 | * |
1001 | + * @param string $p_mode |
|
999 | 1002 | */ |
1000 | 1003 | public function _openFd($p_mode) |
1001 | 1004 | { |
@@ -1565,6 +1568,7 @@ discard block |
||
1565 | 1568 | * |
1566 | 1569 | * { Description } |
1567 | 1570 | * |
1571 | + * @param string $p_comment |
|
1568 | 1572 | */ |
1569 | 1573 | public function _writeCentralHeader($p_nb_entries, $p_size, $p_offset, $p_comment) |
1570 | 1574 | { |
@@ -3140,8 +3144,6 @@ discard block |
||
3140 | 3144 | * |
3141 | 3145 | * { Description } |
3142 | 3146 | * |
3143 | - * @param integer $p_error_code |
|
3144 | - * @param string $p_error_string |
|
3145 | 3147 | */ |
3146 | 3148 | public function _check_parameters(&$p_params, $p_default) |
3147 | 3149 | { |
@@ -3371,6 +3373,8 @@ discard block |
||
3371 | 3373 | * { Description } |
3372 | 3374 | * |
3373 | 3375 | * @param integer $p_mode |
3376 | + * @param integer $p_src |
|
3377 | + * @param integer $p_dest |
|
3374 | 3378 | */ |
3375 | 3379 | public function _tool_CopyBlock($p_src, $p_dest, $p_size, $p_mode=0) |
3376 | 3380 | { |
@@ -3432,6 +3436,8 @@ discard block |
||
3432 | 3436 | * |
3433 | 3437 | * { Description } |
3434 | 3438 | * |
3439 | + * @param string $p_src |
|
3440 | + * @param string $p_dest |
|
3435 | 3441 | */ |
3436 | 3442 | public function _tool_Rename($p_src, $p_dest) |
3437 | 3443 | { |
@@ -70,6 +70,12 @@ discard block |
||
70 | 70 | */ |
71 | 71 | //HACK by domifara |
72 | 72 | // public function MyXoopsGroupPermForm($title, $modid, $permname, $permdesc) |
73 | + /** |
|
74 | + * @param string $title |
|
75 | + * @param integer $modid |
|
76 | + * @param string $permname |
|
77 | + * @param string $permdesc |
|
78 | + */ |
|
73 | 79 | public function __construct($title, $modid, $permname, $permdesc) |
74 | 80 | { |
75 | 81 | // $this->XoopsForm($title, 'groupperm_form', XOOPS_URL.'/modules/system/admin/groupperm.php', 'post'); GIJ |
@@ -100,6 +106,9 @@ discard block |
||
100 | 106 | * Add appendix |
101 | 107 | * |
102 | 108 | * @access public |
109 | + * @param string $permName |
|
110 | + * @param integer $itemId |
|
111 | + * @param string $itemName |
|
103 | 112 | */ |
104 | 113 | public function addAppendix($permName, $itemId, $itemName) |
105 | 114 | { |
@@ -239,6 +248,7 @@ discard block |
||
239 | 248 | |
240 | 249 | /** |
241 | 250 | * Constructor |
251 | + * @param string $name |
|
242 | 252 | */ |
243 | 253 | public function __construct($caption, $name, $groupId, $values = null) |
244 | 254 | { |
@@ -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, '') ; |
@@ -46,42 +46,42 @@ discard block |
||
46 | 46 | $scoln = 'disabled'; |
47 | 47 | } else { |
48 | 48 | switch ($side) { |
49 | - case XOOPS_SIDEBLOCK_LEFT: |
|
50 | - $ssel0 = " checked='checked'"; |
|
51 | - $scol0 = 'selected'; |
|
52 | - break ; |
|
53 | - case XOOPS_SIDEBLOCK_RIGHT: |
|
54 | - $ssel1 = " checked='checked'"; |
|
55 | - $scol1 = 'selected'; |
|
56 | - break ; |
|
57 | - case XOOPS_CENTERBLOCK_LEFT: |
|
58 | - $ssel3 = " checked='checked'"; |
|
59 | - $scol3 = 'selected'; |
|
60 | - break ; |
|
61 | - case XOOPS_CENTERBLOCK_RIGHT: |
|
62 | - $ssel4 = " checked='checked'"; |
|
63 | - $scol4 = 'selected'; |
|
64 | - break ; |
|
65 | - case XOOPS_CENTERBLOCK_CENTER: |
|
66 | - $ssel5 = " checked='checked'"; |
|
67 | - $scol5 = 'selected'; |
|
68 | - break ; |
|
69 | - case XOOPS_CENTERBLOCK_BOTTOMLEFT: |
|
70 | - $ssel7 = " checked='checked'"; |
|
71 | - $scol7 = 'selected'; |
|
72 | - break ; |
|
73 | - case XOOPS_CENTERBLOCK_BOTTOMRIGHT: |
|
74 | - $ssel8 = " checked='checked'"; |
|
75 | - $scol8 = 'selected'; |
|
76 | - break ; |
|
77 | - case XOOPS_CENTERBLOCK_BOTTOM: |
|
78 | - $ssel9 = " checked='checked'"; |
|
79 | - $scol9 = 'selected'; |
|
80 | - break ; |
|
81 | - default: |
|
82 | - $value4extra_side = $side ; |
|
83 | - $stextbox = 'selected'; |
|
84 | - break ; |
|
49 | + case XOOPS_SIDEBLOCK_LEFT: |
|
50 | + $ssel0 = " checked='checked'"; |
|
51 | + $scol0 = 'selected'; |
|
52 | + break ; |
|
53 | + case XOOPS_SIDEBLOCK_RIGHT: |
|
54 | + $ssel1 = " checked='checked'"; |
|
55 | + $scol1 = 'selected'; |
|
56 | + break ; |
|
57 | + case XOOPS_CENTERBLOCK_LEFT: |
|
58 | + $ssel3 = " checked='checked'"; |
|
59 | + $scol3 = 'selected'; |
|
60 | + break ; |
|
61 | + case XOOPS_CENTERBLOCK_RIGHT: |
|
62 | + $ssel4 = " checked='checked'"; |
|
63 | + $scol4 = 'selected'; |
|
64 | + break ; |
|
65 | + case XOOPS_CENTERBLOCK_CENTER: |
|
66 | + $ssel5 = " checked='checked'"; |
|
67 | + $scol5 = 'selected'; |
|
68 | + break ; |
|
69 | + case XOOPS_CENTERBLOCK_BOTTOMLEFT: |
|
70 | + $ssel7 = " checked='checked'"; |
|
71 | + $scol7 = 'selected'; |
|
72 | + break ; |
|
73 | + case XOOPS_CENTERBLOCK_BOTTOMRIGHT: |
|
74 | + $ssel8 = " checked='checked'"; |
|
75 | + $scol8 = 'selected'; |
|
76 | + break ; |
|
77 | + case XOOPS_CENTERBLOCK_BOTTOM: |
|
78 | + $ssel9 = " checked='checked'"; |
|
79 | + $scol9 = 'selected'; |
|
80 | + break ; |
|
81 | + default: |
|
82 | + $value4extra_side = $side ; |
|
83 | + $stextbox = 'selected'; |
|
84 | + break ; |
|
85 | 85 | } |
86 | 86 | } |
87 | 87 | |
@@ -165,31 +165,31 @@ discard block |
||
165 | 165 | } |
166 | 166 | |
167 | 167 | switch ($mode) { |
168 | - case 'clone': |
|
169 | - $form_title = _MD_A_MYBLOCKSADMIN_CLONEFORM ; |
|
170 | - $button_value = _MD_A_MYBLOCKSADMIN_BTN_CLONE ; |
|
171 | - $next_op = 'clone_ok' ; |
|
172 | - // breadcrumbs |
|
173 | - $breadcrumbsObj = AltsysBreadcrumbs::getInstance() ; |
|
174 | - $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_CLONEFORM) ; |
|
175 | - break ; |
|
176 | - case 'new': |
|
177 | - $form_title = _MD_A_MYBLOCKSADMIN_NEWFORM ; |
|
178 | - $button_value = _MD_A_MYBLOCKSADMIN_BTN_NEW ; |
|
179 | - $next_op = 'new_ok' ; |
|
180 | - // breadcrumbs |
|
181 | - $breadcrumbsObj = AltsysBreadcrumbs::getInstance() ; |
|
182 | - $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_NEWFORM) ; |
|
183 | - break ; |
|
184 | - case 'edit': |
|
185 | - default: |
|
186 | - $form_title = _MD_A_MYBLOCKSADMIN_EDITFORM ; |
|
187 | - $button_value = _MD_A_MYBLOCKSADMIN_BTN_EDIT ; |
|
188 | - $next_op = 'edit_ok' ; |
|
189 | - // breadcrumbs |
|
190 | - $breadcrumbsObj = AltsysBreadcrumbs::getInstance() ; |
|
191 | - $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_EDITFORM) ; |
|
192 | - break ; |
|
168 | + case 'clone': |
|
169 | + $form_title = _MD_A_MYBLOCKSADMIN_CLONEFORM ; |
|
170 | + $button_value = _MD_A_MYBLOCKSADMIN_BTN_CLONE ; |
|
171 | + $next_op = 'clone_ok' ; |
|
172 | + // breadcrumbs |
|
173 | + $breadcrumbsObj = AltsysBreadcrumbs::getInstance() ; |
|
174 | + $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_CLONEFORM) ; |
|
175 | + break ; |
|
176 | + case 'new': |
|
177 | + $form_title = _MD_A_MYBLOCKSADMIN_NEWFORM ; |
|
178 | + $button_value = _MD_A_MYBLOCKSADMIN_BTN_NEW ; |
|
179 | + $next_op = 'new_ok' ; |
|
180 | + // breadcrumbs |
|
181 | + $breadcrumbsObj = AltsysBreadcrumbs::getInstance() ; |
|
182 | + $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_NEWFORM) ; |
|
183 | + break ; |
|
184 | + case 'edit': |
|
185 | + default: |
|
186 | + $form_title = _MD_A_MYBLOCKSADMIN_EDITFORM ; |
|
187 | + $button_value = _MD_A_MYBLOCKSADMIN_BTN_EDIT ; |
|
188 | + $next_op = 'edit_ok' ; |
|
189 | + // breadcrumbs |
|
190 | + $breadcrumbsObj = AltsysBreadcrumbs::getInstance() ; |
|
191 | + $breadcrumbsObj->appendPath('', _MD_A_MYBLOCKSADMIN_EDITFORM) ; |
|
192 | + break ; |
|
193 | 193 | } |
194 | 194 | |
195 | 195 | $is_custom = in_array($block->getVar('block_type'), array( 'C', 'E' )) ? true : false ; |