This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
1 | <?php |
||
2 | /** |
||
3 | * Newbb module |
||
4 | * |
||
5 | * You may not change or alter any portion of this comment or credits |
||
6 | * of supporting developers from this source code or any supporting source code |
||
7 | * which is considered copyrighted (c) material of the original comment or credit authors. |
||
8 | * This program is distributed in the hope that it will be useful, |
||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||
11 | * |
||
12 | * @copyright XOOPS Project (https://xoops.org) |
||
13 | * @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html) |
||
14 | * @package newbb |
||
15 | * @since 4.0 |
||
16 | * @author Taiwen Jiang <[email protected]> |
||
17 | */ |
||
18 | |||
19 | use Xmf\Request; |
||
20 | use XoopsModules\Newbb; |
||
21 | |||
22 | |||
23 | |||
24 | require_once $GLOBALS['xoops']->path('class/xoopsformloader.php'); |
||
25 | |||
26 | $xoopsTpl->assign('lang_forum_index', sprintf(_MD_NEWBB_FORUMINDEX, htmlspecialchars($GLOBALS['xoopsConfig']['sitename'], ENT_QUOTES))); |
||
27 | |||
28 | $categoryHandler = \XoopsModules\Newbb\Helper::getInstance()->getHandler('Category'); |
||
29 | $categoryObject = $categoryHandler->get($forumObject->getVar('cat_id'), ['cat_title']); |
||
30 | |||
31 | //check banning |
||
32 | $moderated_id = (is_object($GLOBALS['xoopsUser']) |
||
33 | && $GLOBALS['xoopsUser']->uid() > 0) ? $GLOBALS['xoopsUser']->uid() : 0; |
||
34 | $moderated_ip = Request::getString('REMOTE_ADDR', '', 'SERVER'); |
||
35 | $moderated_forum = $forumObject->getVar('forum_id'); |
||
36 | /** @var Newbb\ModerateHandler $moderateHandler */ |
||
37 | $moderateHandler = \XoopsModules\Newbb\Helper::getInstance()->getHandler('Moderate'); |
||
38 | if (!$moderateHandler->verifyUser($moderated_id, '', $moderated_forum)) { |
||
39 | $criteria = new \CriteriaCompo(); |
||
40 | $criteria->add(new \Criteria('uid', $moderated_id, '=')); |
||
41 | $criteria->setSort('mod_end'); |
||
42 | $criteria->setOrder('DESC'); |
||
43 | $mod = $moderateHandler->getObjects($criteria, false, false); |
||
44 | $tage = ($mod[0]['mod_end'] - $mod[0]['mod_start']) / 60 / 60 / 24; |
||
45 | $msg = $myts->displayTarea(sprintf(_MD_NEWBB_SUSPEND_TEXT, newbbGetUnameFromId($moderated_id), (int)$tage, $mod[0]['mod_desc'], formatTimestamp($mod[0]['mod_end'])), 1); |
||
46 | xoops_error($msg, _MD_NEWBB_SUSPEND_NOACCESS); |
||
47 | require_once $GLOBALS['xoops']->path('footer.php'); |
||
48 | exit(); |
||
49 | } |
||
50 | |||
51 | $xoopsTpl->assign('category', ['id' => $forumObject->getVar('cat_id'), 'title' => $categoryObject->getVar('cat_title')]); |
||
52 | $xoopsTpl->assign('parentforum', $forumHandler->getParents($forumObject)); |
||
53 | $xoopsTpl->assign( |
||
54 | [ |
||
55 | 'forum_id' => $forumObject->getVar('forum_id'), |
||
56 | 'forum_name' => $forumObject->getVar('forum_name'), |
||
57 | ] |
||
58 | ); |
||
59 | |||
60 | if (!is_object($topicObject)) { |
||
61 | $topicObject = $topicHandler->create(); |
||
62 | } |
||
63 | |||
64 | $editby = false; |
||
65 | if ($topicObject->isNew()) { |
||
66 | $form_title = _MD_NEWBB_POSTNEW; |
||
67 | } elseif ($postObject->isNew()) { |
||
68 | if (null === $postParentObject) { |
||
69 | $postParentObject = $postHandler->get($pid); |
||
70 | } |
||
71 | $form_title = _MD_NEWBB_REPLY . ': <a href="' . XOOPS_URL . "/modules/newbb/viewtopic.php?topic_id={$topic_id}&post_id={$pid}\" rel=\"external\">" . $postParentObject->getVar('subject') . '</a>'; |
||
72 | } else { |
||
73 | $form_title = _EDIT . ': <a href="' . XOOPS_URL . "/modules/newbb/viewtopic.php?post_id={$post_id}\" rel=\"external\">" . $postObject->getVar('subject') . '</a>'; |
||
74 | $editby = true; |
||
75 | } |
||
76 | $xoopsTpl->assign('form_title', $form_title); |
||
77 | |||
78 | foreach ( |
||
79 | [ |
||
80 | 'start', |
||
81 | 'topic_id', |
||
82 | 'post_id', |
||
83 | 'pid', |
||
84 | 'isreply', |
||
85 | 'isedit', |
||
86 | 'contents_preview', |
||
87 | ] as $getint |
||
88 | ) { |
||
89 | ${$getint} = Request::getInt($getint, (!empty(${$getint}) ? ${$getint} : 0), 'GET'); // isset($_GET[$getint]) ? (int)($_GET[$getint]) : ((!empty(${$getint})) ? ${$getint} : 0); |
||
90 | } |
||
91 | foreach ( |
||
92 | [ |
||
93 | 'order', |
||
94 | 'viewmode', |
||
95 | 'hidden', |
||
96 | 'newbb_form', |
||
97 | 'icon', |
||
98 | 'op', |
||
99 | ] as $getstr |
||
100 | ) { |
||
101 | ${$getstr} = Request::getString($getstr, (!empty(${$getstr}) ? ${$getstr} : ''), 'GET'); //isset($_GET[$getstr]) ? $_GET[$getstr] : ((!empty(${$getstr})) ? ${$getstr} : ''); |
||
102 | } |
||
103 | |||
104 | /** @var Newbb\TopicHandler $topicHandler */ |
||
105 | $topicHandler = \XoopsModules\Newbb\Helper::getInstance()->getHandler('Topic'); |
||
106 | $topic_status = $topicHandler->get(@$topic_id, 'topic_status'); |
||
107 | |||
108 | //$filname = XOOPS_URL.$_SERVER['REQUEST_URI']; |
||
109 | |||
110 | $forum_form = new \XoopsThemeForm(htmlspecialchars(@$form_title, ENT_QUOTES | ENT_HTML5), 'form_post', XOOPS_URL . '/modules/newbb/post.php', 'post', true); |
||
111 | $forum_form->setExtra('enctype="multipart/form-data"'); |
||
112 | |||
113 | if ($editby) { |
||
114 | $forum_form->addElement(new \XoopsFormText(_MD_NEWBB_EDITEDMSG, 'editwhy', 60, 100, '')); |
||
115 | } |
||
116 | |||
117 | $uid = is_object($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getVar('uid') : 0; |
||
118 | if (newbbIsAdmin($forumObject) |
||
119 | || ($topicHandler->getPermission($forumObject, $topic_status, 'type') |
||
120 | && (0 == $topic_id |
||
121 | || $uid == $topicHandler->get(@$topic_id, 'topic_poster')))) { |
||
122 | $type_id = $topicHandler->get(@$topic_id, 'type_id'); |
||
123 | /** @var Newbb\TypeHandler $typeHandler */ |
||
124 | $typeHandler = \XoopsModules\Newbb\Helper::getInstance()->getHandler('Type'); |
||
125 | $types = $typeHandler->getByForum($forumObject->getVar('forum_id')); |
||
126 | if (!empty($types)) { |
||
127 | $type_element = new \XoopsFormSelect(_MD_NEWBB_TYPE, 'type_id', $type_id); |
||
128 | //$type_element = new \XoopsFormRadio(_MD_NEWBB_TYPE, 'type_id', $type_id); |
||
129 | $type_element->addOption(0, _NONE); |
||
130 | foreach ($types as $key => $type) { |
||
131 | //$value = empty($type["type_color"]) ? $type["type_name"] : "<em style=\"font-style: normal; color: " . $type["type_color"] . ";\">" . $type["type_name"] . "</em>"; |
||
132 | $type_element->addOption($key, $type['type_name']); |
||
133 | } |
||
134 | $forum_form->addElement($type_element); |
||
135 | } else { |
||
136 | $forum_form->addElement(new \XoopsFormHidden('type_id', 0)); |
||
137 | } |
||
138 | } |
||
139 | |||
140 | $subject_form = new \XoopsFormText(_MD_NEWBB_SUBJECTC, 'subject', 60, 100, $subject); |
||
141 | $subject_form->setExtra("tabindex='1'"); |
||
142 | $forum_form->addElement($subject_form, true); |
||
143 | |||
144 | if (!is_object($GLOBALS['xoopsUser'])) { |
||
145 | $required = !empty($GLOBALS['xoopsModuleConfig']['require_name']); |
||
146 | $forum_form->addElement(new \XoopsFormText(_MD_NEWBB_NAMEMAIL, 'poster_name', 60, 255, (!empty($isedit) && !empty($poster_name)) ? $poster_name : ''), $required); |
||
147 | } |
||
148 | |||
149 | $icons_radio = new \XoopsFormRadio(_MD_NEWBB_MESSAGEICON, 'icon', $icon); |
||
150 | $subject_icons = \XoopsLists::getSubjectsList(); |
||
151 | foreach ($subject_icons as $iconfile) { |
||
152 | $icons_radio->addOption($iconfile, '<img src="' . XOOPS_URL . '/images/subject/' . $iconfile . '" alt="" >'); |
||
153 | } |
||
154 | $forum_form->addElement($icons_radio); |
||
155 | |||
156 | $nohtml = !$topicHandler->getPermission($forumObject, $topic_status, 'html'); |
||
157 | |||
158 | if (Request::getString('editor', '', 'POST')) { |
||
159 | $editor = trim(Request::getString('editor', '', 'POST')); |
||
160 | newbbSetCookie('editor', $editor); |
||
161 | } elseif (!$editor = newbbGetCookie('editor')) { |
||
162 | if (empty($editor)) { |
||
163 | $editor = @$GLOBALS['xoopsModuleConfig']['editor_default']; |
||
164 | } |
||
165 | } |
||
166 | if (count(@$GLOBALS['xoopsModuleConfig']['editor_allowed']) > 0) { |
||
167 | if (!in_array($editor, $GLOBALS['xoopsModuleConfig']['editor_allowed'])) { |
||
168 | $editor = $GLOBALS['xoopsModuleConfig']['editor_allowed'][0]; |
||
169 | newbbSetCookie('editor', $editor); |
||
170 | } |
||
171 | } |
||
172 | |||
173 | $forum_form->addElement(new \XoopsFormSelectEditor($forum_form, 'editor', $editor, $nohtml, @$GLOBALS['xoopsModuleConfig']['editor_allowed'][0])); |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
174 | |||
175 | $editor_configs = []; |
||
176 | $editor_configs['name'] = 'message'; |
||
177 | $editor_configs['value'] = $message; |
||
178 | $editor_configs['rows'] = empty($GLOBALS['xoopsModuleConfig']['editor_rows']) ? 10 : $GLOBALS['xoopsModuleConfig']['editor_rows']; |
||
179 | $editor_configs['cols'] = empty($GLOBALS['xoopsModuleConfig']['editor_cols']) ? 30 : $GLOBALS['xoopsModuleConfig']['editor_cols']; |
||
180 | $editor_configs['width'] = empty($GLOBALS['xoopsModuleConfig']['editor_width']) ? '100%' : $GLOBALS['xoopsModuleConfig']['editor_width']; |
||
181 | $editor_configs['height'] = empty($GLOBALS['xoopsModuleConfig']['editor_height']) ? '400px' : $GLOBALS['xoopsModuleConfig']['editor_height']; |
||
182 | |||
183 | $_editor = new \XoopsFormEditor(_MD_NEWBB_MESSAGEC, $editor, $editor_configs, $nohtml, $onfailure = null); |
||
184 | $forum_form->addElement($_editor, true); |
||
185 | |||
186 | if (!empty($GLOBALS['xoopsModuleConfig']['do_tag']) && (empty($postObject) || $postObject->isTopic())) { |
||
187 | $topic_tags = ''; |
||
188 | if (Request::getString('topic_tags', '', 'POST')) { |
||
189 | $topic_tags = $myts->htmlSpecialChars(Request::getString('topic_tags', '', 'POST')); |
||
190 | } elseif (!empty($topic_id)) { |
||
191 | $topic_tags = $topicHandler->get($topic_id, 'topic_tags'); |
||
192 | } |
||
193 | if (!empty($newbbConfig['do_tag']) && class_exists('TagFormTag')) { |
||
194 | $forum_form->addElement(new \XoopsModules\Tag\FormTag('topic_tags', 60, 255, $topic_tags)); |
||
195 | } |
||
196 | } |
||
197 | |||
198 | $options_tray = new \XoopsFormElementTray(_MD_NEWBB_OPTIONS, '<br>'); |
||
199 | if (is_object($GLOBALS['xoopsUser']) && 1 == $GLOBALS['xoopsModuleConfig']['allow_user_anonymous']) { |
||
200 | $noname = (!empty($isedit) && is_object($postObject) && 0 == $postObject->getVar('uid')) ? 1 : 0; |
||
201 | $noname_checkbox = new \XoopsFormCheckBox('', 'noname', $noname); |
||
202 | $noname_checkbox->addOption(1, _MD_NEWBB_POSTANONLY); |
||
203 | $options_tray->addElement($noname_checkbox); |
||
204 | } |
||
205 | |||
206 | if (!$nohtml) { |
||
207 | $html_checkbox = new \XoopsFormCheckBox('', 'dohtml', $dohtml); |
||
208 | $html_checkbox->addOption(1, _MD_NEWBB_DOHTML); |
||
209 | $options_tray->addElement($html_checkbox); |
||
210 | } else { |
||
211 | $forum_form->addElement(new \XoopsFormHidden('dohtml', 0)); |
||
212 | } |
||
213 | |||
214 | $smiley_checkbox = new \XoopsFormCheckBox('', 'dosmiley', $dosmiley); |
||
215 | $smiley_checkbox->addOption(1, _MD_NEWBB_DOSMILEY); |
||
216 | $options_tray->addElement($smiley_checkbox); |
||
217 | |||
218 | $xcode_checkbox = new \XoopsFormCheckBox('', 'doxcode', $doxcode); |
||
219 | $xcode_checkbox->addOption(1, _MD_NEWBB_DOXCODE); |
||
220 | $options_tray->addElement($xcode_checkbox); |
||
221 | |||
222 | if (!$nohtml) { |
||
223 | $br_checkbox = new \XoopsFormCheckBox('', 'dobr', $dobr); |
||
224 | $br_checkbox->addOption(1, _MD_NEWBB_DOBR); |
||
225 | $options_tray->addElement($br_checkbox); |
||
226 | } else { |
||
227 | $forum_form->addElement(new \XoopsFormHidden('dobr', 1)); |
||
228 | } |
||
229 | |||
230 | if (is_object($GLOBALS['xoopsUser']) && $topicHandler->getPermission($forumObject, $topic_status, 'signature')) { |
||
231 | $attachsig_checkbox = new \XoopsFormCheckBox('', 'attachsig', $attachsig); |
||
232 | $attachsig_checkbox->addOption(1, _MD_NEWBB_ATTACHSIG); |
||
233 | $options_tray->addElement($attachsig_checkbox); |
||
234 | } |
||
235 | $notify = 0; |
||
236 | if (is_object($GLOBALS['xoopsUser']) && $GLOBALS['xoopsModuleConfig']['notification_enabled']) { |
||
237 | if (!empty($notify)) { |
||
0 ignored issues
–
show
|
|||
238 | // If 'notify' set, use that value (e.g. preview or upload) |
||
239 | //$notify = 1; |
||
240 | } else { |
||
241 | // Otherwise, check previous subscribed status... |
||
242 | /** @var \XoopsNotificationHandler $notificationHandler */ |
||
243 | $notificationHandler = xoops_getHandler('notification'); |
||
244 | if (!empty($topic_id) |
||
245 | && $notificationHandler->isSubscribed('thread', $topic_id, 'new_post', $xoopsModule->getVar('mid'), $GLOBALS['xoopsUser']->getVar('uid'))) { |
||
246 | $notify = 1; |
||
247 | } |
||
248 | } |
||
249 | |||
250 | $notify_checkbox = new \XoopsFormCheckBox('', 'notify', $notify); |
||
251 | $notify_checkbox->addOption(1, _MD_NEWBB_NEWPOSTNOTIFY); |
||
252 | $options_tray->addElement($notify_checkbox); |
||
253 | } |
||
254 | $forum_form->addElement($options_tray); |
||
255 | |||
256 | if ($topicHandler->getPermission($forumObject, $topic_status, 'attach')) { |
||
257 | $upload_tray = new \XoopsFormElementTray(_MD_NEWBB_ATTACHMENT); |
||
258 | $upload_tray->addElement(new \XoopsFormFile('', 'userfile', $forumObject->getVar('attach_maxkb') * 1024)); |
||
259 | $upload_tray->addElement(new \XoopsFormButton('', 'contents_upload', _MD_NEWBB_UPLOAD, 'submit')); |
||
260 | $upload_tray->addElement(new \XoopsFormLabel('<br><br>' . _MD_NEWBB_MAX_FILESIZE . ':', $forumObject->getVar('attach_maxkb') . 'Kb; ')); |
||
261 | $extensions = trim(str_replace('|', ' ', $forumObject->getVar('attach_ext'))); |
||
262 | $extensions = (empty($extensions) || '*' === $extensions) ? _ALL : $extensions; |
||
263 | $upload_tray->addElement(new \XoopsFormLabel(_MD_NEWBB_ALLOWED_EXTENSIONS . ':', $extensions)); |
||
264 | $upload_tray->addElement(new \XoopsFormLabel('<br>' . sprintf(_MD_NEWBB_MAXPIC, $GLOBALS['xoopsModuleConfig']['max_img_height'], $GLOBALS['xoopsModuleConfig']['max_img_width']))); |
||
265 | $forum_form->addElement($upload_tray); |
||
266 | } |
||
267 | |||
268 | if (!empty($attachments) && is_array($attachments) && count($attachments)) { |
||
269 | $delete_attach_checkbox = new \XoopsFormCheckBox(_MD_NEWBB_THIS_FILE_WAS_ATTACHED_TO_THIS_POST, 'delete_attach[]'); |
||
270 | foreach ($attachments as $key => $attachment) { |
||
271 | $attach = ' ' . _DELETE . ' <a href=' . XOOPS_URL . '/' . $GLOBALS['xoopsModuleConfig']['dir_attachments'] . '/' . $attachment['name_saved'] . ' rel="external">' . $attachment['nameDisplay'] . '</a><br>'; |
||
272 | $delete_attach_checkbox->addOption($key, $attach); |
||
273 | } |
||
274 | $forum_form->addElement($delete_attach_checkbox); |
||
275 | unset($delete_attach_checkbox); |
||
276 | } |
||
277 | |||
278 | if (!empty($attachments_tmp) && is_array($attachments_tmp) && count($attachments_tmp)) { |
||
279 | $delete_attach_checkbox = new \XoopsFormCheckBox(_MD_NEWBB_REMOVE, 'delete_tmp[]'); |
||
280 | $url_prefix = str_replace(XOOPS_ROOT_PATH, XOOPS_URL, XOOPS_CACHE_PATH); |
||
281 | foreach ($attachments_tmp as $key => $attachment) { |
||
282 | $attach = ' <a href="' . $url_prefix . '/' . $attachment[0] . '" rel="external">' . $attachment[1] . '</a><br>'; |
||
283 | $delete_attach_checkbox->addOption($key, $attach); |
||
284 | } |
||
285 | $forum_form->addElement($delete_attach_checkbox); |
||
286 | unset($delete_attach_checkbox); |
||
287 | $attachments_tmp = base64_encode(serialize($attachments_tmp)); |
||
288 | $forum_form->addElement(new \XoopsFormHidden('attachments_tmp', $attachments_tmp)); |
||
289 | } |
||
290 | $radiobox = null; |
||
291 | if ($GLOBALS['xoopsModuleConfig']['enable_karma'] || $GLOBALS['xoopsModuleConfig']['allow_require_reply']) { |
||
292 | $view_require = $require_reply ? 'require_reply' : ($post_karma ? 'require_karma' : 'require_null'); |
||
293 | $radiobox = new \XoopsFormRadio(_MD_NEWBB_VIEW_REQUIRE, 'view_require', $view_require); |
||
294 | if ($GLOBALS['xoopsModuleConfig']['allow_require_reply']) { |
||
295 | $radiobox->addOption('require_reply', _MD_NEWBB_REQUIRE_REPLY); |
||
296 | } |
||
297 | if ($GLOBALS['xoopsModuleConfig']['enable_karma']) { |
||
298 | $karmas = array_map('\trim', explode(',', $GLOBALS['xoopsModuleConfig']['karma_options'])); |
||
299 | if (count($karmas) > 1) { |
||
300 | foreach ($karmas as $karma) { |
||
301 | $karma_array[(string)$karma] = (int)$karma; |
||
302 | } |
||
303 | $karma_select = new \XoopsFormSelect('', 'post_karma', $post_karma); |
||
304 | $karma_select->addOptionArray($karma_array); |
||
305 | $radiobox->addOption('require_karma', _MD_NEWBB_REQUIRE_KARMA . $karma_select->render()); |
||
306 | } |
||
307 | } |
||
308 | $radiobox->addOption('require_null', _MD_NEWBB_REQUIRE_NULL); |
||
309 | } |
||
310 | if (null !== $radiobox) { |
||
311 | $forum_form->addElement($radiobox); |
||
312 | } |
||
313 | |||
314 | if (empty($uid)) { |
||
315 | $forum_form->addElement(new \XoopsFormCaptcha()); |
||
316 | } |
||
317 | |||
318 | $forum_form->addElement(new \XoopsFormHidden('pid', @$pid)); |
||
319 | $forum_form->addElement(new \XoopsFormHidden('post_id', @$post_id)); |
||
320 | $forum_form->addElement(new \XoopsFormHidden('topic_id', @$topic_id)); |
||
321 | $forum_form->addElement(new \XoopsFormHidden('forum', $forumObject->getVar('forum_id'))); |
||
322 | $forum_form->addElement(new \XoopsFormHidden('viewmode', @$viewmode)); |
||
323 | $forum_form->addElement(new \XoopsFormHidden('order', @$order)); |
||
324 | $forum_form->addElement(new \XoopsFormHidden('start', @$start)); |
||
325 | $forum_form->addElement(new \XoopsFormHidden('isreply', @$isreply)); |
||
326 | $forum_form->addElement(new \XoopsFormHidden('isedit', @$isedit)); |
||
327 | $forum_form->addElement(new \XoopsFormHidden('op', @$op)); |
||
328 | |||
329 | $buttonTray = new \XoopsFormElementTray(''); |
||
330 | |||
331 | $submit_button = new \XoopsFormButton('', 'contents_submit', _SUBMIT, 'submit'); |
||
332 | $submit_button->setExtra("tabindex='3'"); |
||
333 | |||
334 | $cancel_button = new \XoopsFormButton('', 'cancel', _CANCEL, 'button'); |
||
335 | if (!empty($topic_id)) { |
||
336 | $extra = XOOPS_URL . '/modules/newbb/viewtopic.php?topic_id=' . (int)$topic_id; |
||
337 | } else { |
||
338 | $extra = XOOPS_URL . '/modules/newbb/viewforum.php?forum=' . $forumObject->getVar('forum_id'); |
||
339 | } |
||
340 | $cancel_button->setExtra("onclick='location=\"" . $extra . "\"'"); |
||
341 | $cancel_button->setExtra("tabindex='6'"); |
||
342 | |||
343 | if (!empty($isreply) && !empty($hidden)) { |
||
344 | $forum_form->addElement(new \XoopsFormHidden('hidden', $hidden)); |
||
345 | |||
346 | $quote_button = new \XoopsFormButton('', 'quote', _MD_NEWBB_QUOTE, 'button'); |
||
347 | $quote_button->setExtra("onclick='xoopsGetElementById(\"message\").value=xoopsGetElementById(\"message\").value+ xoopsGetElementById(\"hidden\").value;xoopsGetElementById(\"hidden\").value=\"\";'"); |
||
348 | $quote_button->setExtra("tabindex='4'"); |
||
349 | $buttonTray->addElement($quote_button); |
||
350 | } |
||
351 | |||
352 | $preview_button = new \XoopsFormButton('', 'btn_preview', _PREVIEW, 'button'); |
||
353 | $preview_button->setExtra("tabindex='5'"); |
||
354 | $preview_button->setExtra('onclick="window.document.forms.' . $forum_form->getName() . '.contents_preview.value=1; window.document.forms.' . $forum_form->getName() . '.submit() ;"'); |
||
355 | $forum_form->addElement(new \XoopsFormHidden('contents_preview', 0)); |
||
356 | |||
357 | $buttonTray->addElement($preview_button); |
||
358 | $buttonTray->addElement($submit_button); |
||
359 | $buttonTray->addElement($cancel_button); |
||
360 | $forum_form->addElement($buttonTray); |
||
361 | |||
362 | //$forum_form->display(); |
||
363 | $forum_form->assign($xoopsTpl); |
||
364 |