@@ 186-195 (lines=10) @@ | ||
183 | $form = $catObj->getForm(); |
|
184 | $GLOBALS['xoopsTpl']->assign('form', $form->render()); |
|
185 | break; |
|
186 | case 'edit_cat': |
|
187 | $adminObject->displayNavigation($currentFile); |
|
188 | $adminObject->addItemButton(_AM_XNEWSLETTER_NEWCAT, '?op=new_cat', 'add'); |
|
189 | $adminObject->addItemButton(_AM_XNEWSLETTER_CATLIST, '?op=list', 'list'); |
|
190 | $GLOBALS['xoopsTpl']->assign('buttons', $adminObject->renderButton('left')); |
|
191 | ||
192 | $catObj = $helper->getHandler('Cat')->get($cat_id); |
|
193 | $form = $catObj->getForm(); |
|
194 | $GLOBALS['xoopsTpl']->assign('form', $form->render()); |
|
195 | break; |
|
196 | case 'delete_cat': |
|
197 | $catObj = $helper->getHandler('Cat')->get($_REQUEST['cat_id']); |
|
198 | // check whether there are existing sbuscription to this cat |
@@ 172-181 (lines=10) @@ | ||
169 | $form = $catsubscrObj->getForm(); |
|
170 | $GLOBALS['xoopsTpl']->assign('form', $form->render()); |
|
171 | break; |
|
172 | case 'edit_catsubscr': |
|
173 | $adminObject->displayNavigation($currentFile); |
|
174 | $adminObject->addItemButton(_AM_XNEWSLETTER_CATSUBSCRLIST, "?op=list_cat&cat_id={$cat_id}", 'list'); |
|
175 | $adminObject->addItemButton(_AM_XNEWSLETTER_NEWCATSUBSCR, '?op=new_catsubscr', 'add'); |
|
176 | $GLOBALS['xoopsTpl']->assign('buttons', $adminObject->renderButton('left')); |
|
177 | ||
178 | $catsubscrObj = $helper->getHandler('Catsubscr')->get($_REQUEST['catsubscr_id']); |
|
179 | $form = $catsubscrObj->getForm(); |
|
180 | $GLOBALS['xoopsTpl']->assign('form', $form->render()); |
|
181 | break; |
|
182 | case 'delete_catsubscr': |
|
183 | $catsubscrObj = $helper->getHandler('Catsubscr')->get($_REQUEST['catsubscr_id']); |
|
184 | if (true === Request::getBool('ok', false, 'POST')) { |
@@ 86-95 (lines=10) @@ | ||
83 | $GLOBALS['xoopsTpl']->assign('error', _AM_XNEWSLETTER_THEREARENT_MAILINGLIST); |
|
84 | } |
|
85 | break; |
|
86 | case 'new_mailinglist': |
|
87 | $adminObject->displayNavigation($currentFile); |
|
88 | $adminObject->addItemButton(_AM_XNEWSLETTER_MAILINGLISTLIST, '?op=list', 'list'); |
|
89 | $GLOBALS['xoopsTpl']->assign('buttons', $adminObject->renderButton('left')); |
|
90 | ||
91 | $mailinglistObj = $helper->getHandler('Mailinglist')->create(); |
|
92 | $mailinglistObj->setVar('mailinglist_system', 0); |
|
93 | $form = $mailinglistObj->getForm(false, $mailinglist_system); |
|
94 | $GLOBALS['xoopsTpl']->assign('form', $form->render()); |
|
95 | break; |
|
96 | case 'save_mailinglist': |
|
97 | if (!$GLOBALS['xoopsSecurity']->check()) { |
|
98 | redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
|
@@ 125-134 (lines=10) @@ | ||
122 | $form = $mailinglistObj->getForm(); |
|
123 | $GLOBALS['xoopsTpl']->assign('form', $form->render()); |
|
124 | break; |
|
125 | case 'edit_mailinglist': |
|
126 | $adminObject->displayNavigation($currentFile); |
|
127 | $adminObject->addItemButton(_AM_XNEWSLETTER_NEWMAILINGLIST, '?op=new_mailinglist', 'add'); |
|
128 | $adminObject->addItemButton(_AM_XNEWSLETTER_MAILINGLISTLIST, '?op=list', 'list'); |
|
129 | $GLOBALS['xoopsTpl']->assign('buttons', $adminObject->renderButton('left')); |
|
130 | ||
131 | $mailinglistObj = $helper->getHandler('Mailinglist')->get($mailinglistId); |
|
132 | $form = $mailinglistObj->getForm(false, (int)$mailinglistObj->getVar('mailinglist_system')); |
|
133 | $GLOBALS['xoopsTpl']->assign('form', $form->render()); |
|
134 | break; |
|
135 | case 'check_list': |
|
136 | $mailinglistObj = $helper->getHandler('Mailinglist')->get($mailinglistId); |
|
137 | if (_XNEWSLETTER_MAILINGLIST_TYPE_MAILMAN_VAL === (int)$mailinglistObj->getVar('mailinglist_system')) { |
@@ 159-168 (lines=10) @@ | ||
156 | $form = $templateObj->getForm(); |
|
157 | $GLOBALS['xoopsTpl']->assign('form', $form->render()); |
|
158 | break; |
|
159 | case 'edit_template': |
|
160 | $adminObject->displayNavigation($currentFile); |
|
161 | $adminObject->addItemButton(_AM_XNEWSLETTER_NEWTEMPLATE, '?op=new_template', 'add'); |
|
162 | $adminObject->addItemButton(_AM_XNEWSLETTER_TEMPLATELIST, '?op=list', 'list'); |
|
163 | $GLOBALS['xoopsTpl']->assign('buttons', $adminObject->renderButton('left')); |
|
164 | ||
165 | $templateObj = $helper->getHandler('Template')->get($templateId); |
|
166 | $form = $templateObj->getForm(); |
|
167 | $GLOBALS['xoopsTpl']->assign('form', $form->render()); |
|
168 | break; |
|
169 | case 'delete_template': |
|
170 | $templateObj = $helper->getHandler('Template')->get($templateId); |
|
171 | if (true === Request::getBool('ok', false, 'POST')) { |
@@ 219-228 (lines=10) @@ | ||
216 | $form = $protocolObj->getForm(); |
|
217 | $GLOBALS['xoopsTpl']->assign('form', $form->render()); |
|
218 | break; |
|
219 | case 'edit_protocol': |
|
220 | $adminObject->displayNavigation($currentFile); |
|
221 | $adminObject->addItemButton(_AM_XNEWSLETTER_NEWPROTOCOL, '?op=new_protocol', 'add'); |
|
222 | $adminObject->addItemButton(_AM_XNEWSLETTER_PROTOCOLLIST, '?op=list', 'list'); |
|
223 | $GLOBALS['xoopsTpl']->assign('buttons', $adminObject->renderButton('left')); |
|
224 | ||
225 | $protocolObj = $helper->getHandler('Protocol')->get(Request::getInt('protocol_id', 0)); |
|
226 | $form = $protocolObj->getForm(); |
|
227 | $GLOBALS['xoopsTpl']->assign('form', $form->render()); |
|
228 | break; |
|
229 | case 'delete_protocol': |
|
230 | $protocolId = Request::getInt('protocol_id', 0); |
|
231 | $protocolObj = $helper->getHandler('Protocol')->get($protocolId); |