include_once XOOPS_ROOT_PATH.'/language/english/calendar.php'; } include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; include_once NW_MODULE_PATH . '/include/functions.php'; include_once NW_MODULE_PATH . '/config.php'; $sform = new XoopsThemeForm(_MA_NW_SUBMITNEWS, "storyform", NW_MODULE_URL . '/submit.php'); $sform->setExtra('enctype="multipart/form-data"'); $sform->addElement(new XoopsFormText(_MA_NW_TITLE, 'title', 50, 255, $title), true); // Topic's selection box if (!isset($xt)) { $xt = new nw_NewsTopic(); } if($xt->getAllTopicsCount()==0) { redirect_header("index.php",4,_MA_NW_POST_SORRY); exit(); } include_once XOOPS_ROOT_PATH."/class/tree.php"; $allTopics = $xt->getAllTopics($xoopsModuleConfig['restrictindex'],'nw_submit'); $topic_tree = new XoopsObjectTree($allTopics, 'topic_id', 'topic_pid'); $topic_select = $topic_tree->makeSelBox('topic_id', 'topic_title', '-- ', $topicid, false); $sform->addElement(new XoopsFormLabel(_MA_NW_TOPIC, $topic_select)); //If admin - show admin form //TODO: Change to "If submit privilege" if ($approveprivilege) { //Show topic image? $sform->addElement(new XoopsFormRadioYN(_AM_NW_TOPICDISPLAY, 'topicdisplay', $topicdisplay));