{include file="$gentemplates/$header_tpl"}

	<h2>{$lang.section.blog_new_post}</h2>
	{*if $form.err}
		<font class="error_msg">*&nbsp;{$form.err}</font><br />
	{/if*}
	{include file="$gentemplates/blog_menu.tpl"}
	<div class="blog_post_add">
	<form name="post_form" id="post_form" action="{$site_root}/{$seo.blog}?sel=save_post" method="post" enctype="multipart/form-data">
		<p>
			{$lang.blog.post_title}:<br />
			<input type="text" name="post_title" id="post_title" onkeyup="BadWords('post_title');" value="{$data.post_title}" maxlength="500"/>
			<div id="bad_div_post_title" class="bad_div_left"></div>
            <input type="hidden" name="id_profile" value="{$form.id_profile}"/>
			{if $form.edit eq 1}<input type="hidden" name="edit" value="1"><input type="hidden" name="id_post" value="{$data.id}"/>{/if}
		</p>
		<p>
			{$lang.blog.post_body}:<br />
			{*$editor*}
			{$redactor}
			<textarea id="post_body" name="post_body" class="redactor_normal"></textarea>
			<div id="bad_div_post_body" class="bad_div_left"></div>
		</p>
		<p>
			<input type="checkbox" name="hidden_post" value="1" {if $data.is_hidden}checked=""{/if}/> {$lang.blog.hidden_post}
		</p>
		<p>
			<input type="checkbox" name="can_comment" value="1" {if $data.can_comment}checked=""{/if}/> {$lang.blog.can_comment}
		</p>
		{if $use_tags}
		<p>
			{$lang.blog.tags}:<br />
			<input type="text" name="post_tags" id="post_tags" onkeyup="BadWords('post_tags');" value="{$data.tags}"/>
            <div id="bad_div_post_tags" class="bad_div_left"></div>
		</p>
		{/if}
		<p>				
			<input type="submit" value="{$lang.button.save}"/>&nbsp;
			{if $form.edit eq 1}<input type="button" value="{$lang.button.back}" onclick="document.location.href='{$site_root}/{$seo.blog}'"/>{/if}
		</p>
		</form>
	</div>	
{include file="$gentemplates/$footer_tpl"}