<div class="panel">
    <div class="user_operation_line" style="height:4px;font-size:0px;"></div>
	<div class="cr"></div>
<script type="text/javascript">
{literal}
function Change_news(){
    var num = $("#num_news_index").val();
    $.post("admin_settings.php", 'sel=change_num_news&num_news_index='+num, function(data){});
}

{/literal}
</script>
    <div class="cr" id="cr">&nbsp;
		<form id="settings_form" name="settings_form" class="settings_form" action="{$site_url}{$site_root}/admin/admin_news.php?sel=save" method="POST" style="display:none;">
		<table border=0 cellspacing=0 cellpadding=5>
			<tr bgcolor="#FFFFFF">
				<td align="left" nowrap class="main_header_text" width="auto" style="margin-right:10px;">{$lang.news.use_horoscope_feature}:&nbsp;</td>
				<td class="main_content_text" align="center"><input type="checkbox" name="use_horoscope_feature" id="use_horoscope_feature" value="1" {if $data.use_horoscope_feature}checked{/if}></td>
				<td align="left">
					<div id="error_box" class="error_box_blue"></div>
				</td>
			</tr>
		</table>
		</form>
		<script language="JavaScript" type="text/javascript">
		{literal}
			var options = { 
				success: function(data){
					ShowAjaxError(data, '', 'success');
					return false;
				},
				beforeSubmit: function() { 
					ajaxIndicator(1, 'error_box');
				}
			};
			$(document).ready(function(){
				$("#use_horoscope_feature").change(function (){
					$('.settings_form').ajaxSubmit(options);
					return false;
				});
			});
		{/literal}
		</script>
	</div>
    <div class="user_status_line">
        <div id="tab_news" class="user_status_elem_active" onclick="ShowEditor('news','admin_news.php?ajax=1');form_undisp();">
            {$lang.news.list}
        </div>
        <div id="tab_feeds" class="user_status_elem" onclick="ShowEditor('feeds','admin_news.php?par=feeds&ajax=1');form_undisp();">
            <a>{$lang.news.rss_list}</a>
        </div>
        <div id="tab_horoscope" class="user_status_elem" onclick="ShowEditor('horoscope','admin_news.php?sel=horoscope&ajax=1');form_disp();">
            <a>{$lang.news.rss_horoscope}</a>
        </div>
		<script type="text/javascript">
			{literal}
				function form_disp(){
					$('#settings_form').css('display', '');
				}
				function form_undisp(){
					$('#settings_form').css('display', 'none');
				}
			{/literal}
		</script>

        <div class="cr"></div>
<div class="panel_subtabs">
	<div class="panel_content" style="width:97%;">
	<form id="edit_form" name="edit_form" method="POST" action="{$form.action}"  enctype="multipart/form-data">
		<table border=0 cellspacing=1 cellpadding=5 width="100%">
		{$form.hiddens}
			<tr>
				<td align="left" width="120">{$lang.news.date}:&nbsp;</td>
				<td align="left">
					<select name="n_day" >
					{section name=d loop=$day}
					<option value="{$day[d].value}" {if $day[d].sel}selected{/if}>{$day[d].value}</option>
					{/section}
					</select>&nbsp;
					<select name="n_month" >
					{section name=m loop=$month}
					<option value="{$month[m].value}" {if $month[m].sel}selected{/if}>{$month[m].name}</option>
					{/section}
					</select>&nbsp;
					<select name="n_year" >
					{section name=y loop=$year}
					<option value="{$year[y].value}" {if $year[y].sel}selected{/if}>{$year[y].value}</option>
					{/section}
					</select>&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="status" value="1" {if $data.status}checked{/if} >&nbsp;-&nbsp;{$lang.news.status}&nbsp;
				</td>
			</tr>
			<tr>
				<td align="left">{$lang.news.title}:&nbsp;</td>
				<td align="left"><input {if $data.id_channel}readonly{/if} type="text" value="{$data.title}" name="title" style="width: 420px"></td>
			</tr>
			<tr>
				<td align="left" valign="top">{$lang.news.text}:&nbsp;</td>
				<td align="left">
				{if $data.id_channel}
					<input type="hidden" name="text" value="{$data.text|escape}">
					<div style="border: 1px solid black; width: 646px; height: 248px; padding: 10px;">
						{$data.text}
					</div>
				{else}
					{$redactor}
                                        <textarea name="text" id="description" class="redactor_normal">{*$data.description*}</textarea>
                                        <div id="bad_div_description" class="bad_div_left"></div>
				{/if}

				</td>
			</tr>
			<tr>
				<td align="left">{$lang.news.seo_title}:&nbsp;</td>
				<td align="left">
					<input type="text" value="{$data.seo_title}" name="seo_title" style="width: 420px">
				</td>
			</tr>
			<tr>
				<td align="left">{$lang.news.seo_description}:&nbsp;</td>
				<td align="left">
					<textarea  name="seo_description" style="width: 420px">{$data.seo_description}</textarea>
				</td>
			</tr>
			<tr>
				<td align="left">{$lang.news.seo_keywords}:&nbsp;</td>
				<td align="left">
					<textarea  name="seo_keywords" style="width: 420px">{$data.seo_keywords}</textarea>
				</td>
			</tr>

			</table>
	</form>
	</div>
</div>
			<table cellpadding="5" cellspacing="0" width="100%" style="float:left;">
			<tr>
				{if $form.par eq "edit"}
				<td>
					<a class="admin_button_major" onclick="/*SaveBlock('show_block','edit_form');*/document.edit_form.submit(); return false;">{$lang.button.save}<span>&nbsp;</span></a>
					{*<input type="submit" value="{$lang.button.save}" class="button">*}
					<a class="admin_button_cancel" onclick="ShowBlock('show_block', '{$form.back}');">{$lang.button.vip_cancel}<span>&nbsp;</span></a>
					<a class="admin_button" style="float:right;" onclick="ShowBlock('show_block', '{$form.delete}');">{$lang.button.delete}<span>&nbsp;</span></a>
					{*<input type="button" value="{$lang.button.delete}" class="button" onclick="{literal}javascript: if(confirm({/literal}'{$form.confirm|escape:javascript}'{literal})){location.href={/literal}'{$form.delete}'{literal}}{/literal}">*}
				</td>
				{else}
				<td>
					<a class="admin_button_major" onclick="/*SaveBlock('show_block','edit_form');*/ document.edit_form.submit(); return false;">{$lang.button.add}<span>&nbsp;</span></a>
					<a class="admin_button_cancel" onclick="ShowBlock('show_block', '{$form.back}');">{$lang.button.vip_cancel}<span>&nbsp;</span></a>
					{*<input type="submit" value="{$lang.button.add}" class="button">*}
				</td>
				{/if}
			</tr>
		</table>
<div class="cr">&nbsp;</div>
<script>
tab_link = '{$form.back}';
	//document.body.setAttribute("onbeforeunload", "return (\"{$lang.admin.lang_edit.confirm|replace:'"':"'"}\");");
</script>
	</div>
</div>
			
{*
{include file="$admingentemplates/admin_bottom.tpl"}
*}