<?php
// ------------------------------------------------------------------------- //
//                XOOPS - PHP Content Management System                      //
//                       <http://www.xoops.org/>                             //
// ------------------------------------------------------------------------- //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
// ------------------------------------------------------------------------- //
if ( !isset($submit_page) ) {
	$submit_page = $PHP_SELF;
}
include(XOOPS_ROOT_PATH."/include/xoopscodes.php");
?>
<table><tr><td>
<form action='<?php echo $submit_page;?>' method='post' id='storyform' onsubmit='return validate("subject", "message");'>
<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;]\n";
} else {
	echo "<b>".$xoopsConfig['anonymous']."</b> [ <a href='".XOOPS_URL."/register.php'>"._NW_REGISTER."</a> ]\n";	
}
echo "<br /><br />\n";
echo "<b>"._NW_TITLE."</b>&nbsp;("._NW_BECLEAR.")<br />\n";
echo "<input class='textbox' type='text' name='subject' id='subject' value='".$subject."' size='50' maxlength='80' /><br />("._NW_BADTITLES.")<br />\n";
echo "<p><b>"._NW_TOPIC."</b>&nbsp;";
$xt->makeTopicSelBox(0);
echo "</p>\n";
echo "<p><b>"._NW_THESCOOP."</b><br /><br />\n";
xoopsCodeTarea("message");
xoopsSmilies("message");
echo "<br /><br />\n";
if ( !empty($xoopsConfig['allow_html']) ) {
	echo "<br />". _ALLOWEDHTML ."<br />\n";
	echo get_allowed_html();
	echo "<br />";
}
echo "</p>\n";
if ( $xoopsUser && $xoopsConfig['anonpost'] ) { 
	echo "<br /><input type='checkbox' value='1' name='noname'";
	if ( !empty($noname) ) {
		echo " checked='checked'";
	}
	echo " /> "._NW_POSTANON."\n"; 
}

echo "<br /><input type='checkbox' name='nosmiley' value='1'";
if ( !empty($nosmiley) ) {
	echo " checked='checked'";
}
echo " /> "._NW_DISABLESMILEY."<br />\n";
if ( !empty($xoopsConfig['allow_html']) ) {
	echo "<input type='checkbox' name='nohtml' value='1'";
	if ( !empty($nohtml) ) {
		echo " checked='checked'";
	}
	echo " /> "._NW_DISABLEHTML."<br />\n";
}
echo "<input type='checkbox' name='notifypub' value='1'";
if ( !empty($notifypub) ) {
	echo " checked='checked'";
}
echo " /> "._NW_NOTIFYPUBLISH."<br />\n";
echo "<select name='op'>\n";
echo "<option value='preview' selected='selected'>"._NW_PREVIEW."</option>\n";
echo "<option value='post'>"._NW_POST."</option>\n";
echo "</select>\n";
echo "<input type='submit' value='"._NW_GO."' />\n";
echo "</form>\n";
echo "</td></tr></table>\n";

unset($submit_page);

?>