<?php
// $Id: storyform.inc.php,v 1.1 2004/07/11 10:28:43 Farsus Exp $
// -------------------------------------------------------------------------//
//			                 RUNCMS                                         //
//                                                                          //
//	 reliable - Unique - Nocost &  Simplicity & ease off use                //
//                       < http://www.runcms.org >                          //
// -------------------------------------------------------------------------//
// 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'>"._NW_LOGOUT."</a>&nbsp;]";
	} else {
		echo "<b>".$xoopsConfig['anonymous']."</b> [ <a href='".XOOPS_URL."/register.php'>"._NW_REGISTER."</a> ]";
	}
?>

<br /><br />
<b><?php echo _NW_TITLE;?></b>&nbsp;(<?php echo _NW_BECLEAR;?>)<br />
<input type="text" class="text" name="subject" id="subject" value="<?php echo $HTTP_POST_VARS['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($xoopsConfig['allow_html']) ) {
	echo _ALLOWEDHTML."<br />";
	echo get_allowed_html();
	if ($HTTP_POST_VARS['allow_html'] == '0') {
		$option0 = " selected";
		} elseif ($HTTP_POST_VARS['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() || $HTTP_POST_VARS['allow_smileys'] == 1) {
	echo " checked='checked'";
}
echo " /> "._ENABLESMILEY."<br />";

// Enable bbcode?
echo "<input type='checkbox' class='checkbox' name='allow_bbcode' value='1'";
if (!isPost() || $HTTP_POST_VARS['allow_bbcode'] == 1) {
	echo " checked='checked'";
}
echo " />&nbsp;"._ENABLEBBCODE."<br />";

if ( $xoopsUser && $xoopsConfig['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>


