<?php
//v1.0.4 www.bcoos.net 2006/10 GPL
// www.bcoos.net 2006-09 1.0.2 GPL
// $Id: storyform.inc.php,v 1.9 2003/08/17 18:15:41 half-dead Exp $
// ------------------------------------------------------------------------- //
//               E-Xoops: Content Management for the Masses                  //
//                       < http://www.e-xoops.com >                          //
// ------------------------------------------------------------------------- //
// Original Author: The Xoops Project
// Author Website : http://www.xoops.org
// License Type   : GPL: See /manual/LICENSES/GPL.txt
// ------------------------------------------------------------------------- //
include_once(XOOPS_ROOT_PATH.'/class/xoopsform/formdhtmltextarea.php');
?>
<table><tr>
<td>
<form action="./submit.php" method="post" id="storyform" onsubmit="return xoopsValidate('subject', 'hometext', 'news_submit');">
<br /><br /><b><?php echo _NW_YOURNAME;?>:</b>
<?php
if ($xoopsUser) {
	echo "<a href='".XOOPS_URL."/userinfo.php?uid=".$xoopsUser->getVar("uid")."'>".$xoopsUser->getVar("uname")."</a>&nbsp;[&nbsp;<a href='".XOOPS_URL."/user.php?op=logout'>"._LOGOUT."</a>&nbsp;]";
	} else {
		echo "<b>".$bcoosConfig['anonymous']."</b> [ <a href='".XOOPS_URL."/register.php'>"._NW_REGISTER."</a> ]";
	}
?>
<br /><br />
<b><?php echo _TITLE;?></b>&nbsp;(<?php echo _NW_BECLEAR;?>)<br />
<input type="text" class="text" name="subject" id="subject" value="<?php echo $_POST['subject'];?>" size="50" maxlength="80" /><br />(<?php echo _NW_BADTITLES;?>)<br />
<br /><b><?php echo _NW_TOPIC;?></b>&nbsp;
<?php
$xt->makeTopicSelBox(0);
echo "<br /><br /><b>"._NW_THESCOOP."</b><br /><br />";
$desc = new XoopsFormDhtmlTextArea('', 'hometext', $hometext, 10, 50);
echo $desc->render();
echo "<br /><br /><b>"._NW_MORE."...</b><br /><br />";
echo _NW_PAGEBREAK;
echo "<br /><br />";
$desc = new XoopsFormDhtmlTextArea('', 'moretext', $moretext, 10, 50);
echo $desc->render();
echo "<br /><br />";
if ( $xoopsUser && !empty($bcoosConfig['allow_html']) ) {
	echo _ALLOWEDHTML."<br />";
	echo get_allowed_html();
	if ($_POST['allow_html'] == '0') {
		$option0 = " selected";
		} elseif ($_POST['allow_html'] == '2') {
			$option2 = " selected";
			} else {
				$option1 = " selected";
			}
	echo "<br /><br />
	<select class='select' name='allow_html'>
	<option value='0'$option0>"._HTMLOFF."</option>
	<option value='1'$option1>"._HTMLAUTOWRAP."</option>
	<option value='2'$option2>"._HTMLNOAUTOWRAP."</option>
	</select><br />";
	} else {
		echo "<input type='hidden' name='allow_html' value='0'>";
	}
echo "<input type='checkbox' class='checkbox' name='allow_smileys' value='1'";
if (!isPost() || $_POST['allow_smileys'] == 1) {
	echo " checked='checked'";
}
echo " /> "._ENABLESMILEY."<br />";
// Enable bbcode?
echo "<input type='checkbox' class='checkbox' name='allow_bbcode' value='1'";
if (!isPost() || $_POST['allow_bbcode'] == 1) {
	echo " checked='checked'";
}
echo " />&nbsp;"._ENABLEBBCODE."<br />";
if ( $xoopsUser && $bcoosConfig['anonpost'] ) {
	echo "<input type='checkbox' class='checkbox' value='1' name='noname'";
	if ( !empty($noname) ) {
		echo " checked='checked'";
	}
	echo " /> "._NW_POSTANON."<br />";
}
if ($xoopsUser) {
	echo "<input type='checkbox' class='checkbox' name='notifypub' value='1'";
	if ( !empty($notifypub) ) {
		echo " checked='checked'";
	}
	echo " /> "._NW_NOTIFYPUBLISH."<br />";
	} else {
		echo "<input type='hidden' name='notifypub' value='0' /><br />";
	}
?>
<br />
<select class="select" name="op">
<option value="preview" selected="selected"><?php echo _NW_PREVIEW;?></option>
<option value="post"><?php echo _NW_POST;?></option>
</select>
<input type="submit" class="button" value="<?php echo _GO;?>" name="news_submit" id="news_submit" />
</form>
</td></tr></table>
