<?php
// $Id: contentsform.php,v 1.1 2004/07/11 10:29:06 Farsus Exp $
// -------------------------------------------------------------------------//
//			       RUNCMS                                                   //
//                                                                          //
//	 reliable - Unique - Nocost &  Simplicity & ease off use                //
//                       < http://www.runcms.org >                          //
// -------------------------------------------------------------------------//
// Original Author: Kazumi Ono
// Author Website : http://www.mywebaddons.com/ , http://www.myweb.ne.jp
// License Type   : GPL: See /manual/LICENSES/GPL.txt
// ------------------------------------------------------------------------- //
?>
<form action="index.php" method="post">
<table border="0" cellpadding="0" cellspacing="0" valign="top" width="100%"><tr>
<td class="bg2">
<table width="100%" border="0" cellpadding="4" cellspacing="1"><tr>
<td nowrap="nowrap" class="bg3"><?php echo _XD_QUESTION;?></td>
<td class="bg1"><input type="text" class="text" name="contents_title" value="<?php echo $contents_title;?>" size="31" maxlength="255" /></td>

</tr><tr>
<td nowrap="nowrap" class="bg3"><?php echo _XD_ORDER;?></td>
<td class="bg1"><input type="text" class="text" name="contents_order" value="<?php echo $contents_order;?>" size="4" maxlength="3" /></td>
</tr>

<?php
$checked = ($contents_visible == 1) ? " checked='checked'" : '';
?>

<tr>
<td nowrap="nowrap" class="bg3"><?php echo _XD_DISPLAY;?></td>
<td class="bg1"><input type="checkbox" class="checkbox" name="contents_visible" value="1"<?php echo $checked;?> /></td>
</tr><tr>
<td nowrap="nowrap" class="bg3"><?php echo _XD_ANSWER;?></td>
<td class="bg1">

<?php
include_once(XOOPS_ROOT_PATH."/class/xoopsform/formdhtmltextarea.php");
$desc  = new XoopsFormDhtmlTextArea("", "contents_contents", $contents_contents, 10, 50);
echo $desc->render();

// Enable html?
echo "<br /><br />"._ALLOWEDHTML."<br />";
echo get_allowed_html();
if ($allow_html == '0' || $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 />";

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

</td>

</tr><tr>
<td nowrap="nowrap" class="bg3">&nbsp;</td>
<td class="bg1">
<input type="hidden" name="category_id" value="<?php echo $category_id;?>" />
<input type="hidden" name="contents_id" value="<?php echo $contents_id;?>" />
<input type="hidden" name="op" value="<?php echo $op;?>" />
<input type="submit" class="button" name="contents_preview" value="<?php echo _PREVIEW;?>" />
<input type="submit" class="button" name="contents_submit" value="<?php echo _SUBMIT;?>" />
</td>

</tr></table></td>
</tr></table>
</form>
