| 1 | <?php |
|---|
| 2 | // $Id: storyform.inc.php,v 1.7 2005/09/04 20:46:11 onokazu Exp $ |
|---|
| 3 | // ------------------------------------------------------------------------ // |
|---|
| 4 | // XOOPS - PHP Content Management System // |
|---|
| 5 | // Copyright (c) 2000 XOOPS.org // |
|---|
| 6 | // <http://www.xoops.org/> // |
|---|
| 7 | // ------------------------------------------------------------------------ // |
|---|
| 8 | // This program is free software; you can redistribute it and/or modify // |
|---|
| 9 | // it under the terms of the GNU General Public License as published by // |
|---|
| 10 | // the Free Software Foundation; either version 2 of the License, or // |
|---|
| 11 | // (at your option) any later version. // |
|---|
| 12 | // // |
|---|
| 13 | // You may not change or alter any portion of this comment or credits // |
|---|
| 14 | // of supporting developers from this source code or any supporting // |
|---|
| 15 | // source code which is considered copyrighted (c) material of the // |
|---|
| 16 | // original comment or credit authors. // |
|---|
| 17 | // // |
|---|
| 18 | // This program is distributed in the hope that it will be useful, // |
|---|
| 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of // |
|---|
| 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // |
|---|
| 21 | // GNU General Public License for more details. // |
|---|
| 22 | // // |
|---|
| 23 | // You should have received a copy of the GNU General Public License // |
|---|
| 24 | // along with this program; if not, write to the Free Software // |
|---|
| 25 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // |
|---|
| 26 | // ------------------------------------------------------------------------ // |
|---|
| 27 | |
|---|
| 28 | if (!defined('XOOPS_ROOT_PATH')) { |
|---|
| 29 | exit(); |
|---|
| 30 | } |
|---|
| 31 | include XOOPS_ROOT_PATH."/class/xoopsformloader.php"; |
|---|
| 32 | $sform = new XoopsThemeForm(_NW_SUBMITNEWS, "storyform", xoops_getenv('PHP_SELF')); |
|---|
| 33 | $sform->addElement(new XoopsFormToken(XoopsMultiTokenHandler::quickCreate('news_submit'))); |
|---|
| 34 | $sform->addElement(new XoopsFormText(_NW_TITLE, 'subject', 50, 80, $subject), true); |
|---|
| 35 | ob_start(); |
|---|
| 36 | $xt->makeTopicSelBox(0); |
|---|
| 37 | $sform->addElement(new XoopsFormLabel(_NW_TOPIC, ob_get_contents())); |
|---|
| 38 | ob_end_clean(); |
|---|
| 39 | $sform->addElement($topic_select); |
|---|
| 40 | $sform->addElement(new XoopsFormDhtmlTextArea(_NW_THESCOOP, 'message', $message, 15, 60), true); |
|---|
| 41 | $option_tray = new XoopsFormElementTray(_OPTIONS,'<br />'); |
|---|
| 42 | if ($xoopsUser) { |
|---|
| 43 | if ($xoopsModuleConfig['anonpost'] == 1) { |
|---|
| 44 | $noname_checkbox = new XoopsFormCheckBox('', 'noname', $noname); |
|---|
| 45 | $noname_checkbox->addOption(1, _POSTANON); |
|---|
| 46 | $option_tray->addElement($noname_checkbox); |
|---|
| 47 | } |
|---|
| 48 | $notify_checkbox = new XoopsFormCheckBox('', 'notifypub', $notifypub); |
|---|
| 49 | $notify_checkbox->addOption(1, _NW_NOTIFYPUBLISH); |
|---|
| 50 | $option_tray->addElement($notify_checkbox); |
|---|
| 51 | if ($xoopsUser->isAdmin($xoopsModule->getVar('mid'))) { |
|---|
| 52 | $nohtml_checkbox = new XoopsFormCheckBox('', 'nohtml', $nohtml); |
|---|
| 53 | $nohtml_checkbox->addOption(1, _DISABLEHTML); |
|---|
| 54 | $option_tray->addElement($nohtml_checkbox); |
|---|
| 55 | } |
|---|
| 56 | } |
|---|
| 57 | $smiley_checkbox = new XoopsFormCheckBox('', 'nosmiley', $nosmiley); |
|---|
| 58 | $smiley_checkbox->addOption(1, _DISABLESMILEY); |
|---|
| 59 | $option_tray->addElement($smiley_checkbox); |
|---|
| 60 | $sform->addElement($option_tray); |
|---|
| 61 | $button_tray = new XoopsFormElementTray('' ,''); |
|---|
| 62 | $button_tray->addElement(new XoopsFormButton('', 'preview', _PREVIEW, 'submit')); |
|---|
| 63 | $button_tray->addElement(new XoopsFormButton('', 'post', _NW_POST, 'submit')); |
|---|
| 64 | $sform->addElement($button_tray); |
|---|
| 65 | $sform->display(); |
|---|
| 66 | ?> |
|---|