{*{include file="$admingentemplates/admin_top.tpl"}
 	<font class=red_header>{$lang.news.razdel_name}</font><font class=red_sub_header>&nbsp;|&nbsp;{$lang.news.rss_editform}</font>
	<div class="help_text">
            <div class="close_help">
                <img src="{$site_root}{$template_root}/images/close_help.png" alt="">
            </div>
            <div class="help_body">
                <span class="help_title">{$lang.help}:</span>{$lang.admin_help.news_rss_edit}
            </div>
        </div>
*}
<div class="panel">
    <div class="user_operation_line" style="height:4px;font-size:0px;"></div>
	<div class="cr"></div>
{*    <div class="cr" id="cr">&nbsp;</div>
    <div id="num_news">
            <input type="hidden" name="sel" value="change_num_news"/>
            <div >
                {$lang.settings.num_news_index}: <input style="margin-left: 10px;" type="text" id="num_news_index" name="num_news_index" size="1" value="{$num_news}" />
                 <a href="#" style="margin-left: 30px;" class="admin_button_major" onclick="Change_news(); return false;">{$lang.button.save}<span>&nbsp;</span></a>
            </div>
    </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" onclick="ShowEditor('news','admin_news.php?ajax=1');form_undisp();">
            <a>{$lang.news.list}</a>
        </div>
        <div id="tab_feeds" class="user_status_elem_active" onclick="ShowEditor('feeds','admin_news.php?par=feeds&ajax=1');form_undisp();">
            {$lang.news.rss_list}
        </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 method="post" action="{$form.action}"  enctype="multipart/form-data" name="news" id="edit_form">
	{$form.hiddens}
		<table border="0" cellspacing="1" cellpadding="5" width="100%">
			<tr valign="top">
				<td align="left" width="17%">{$lang.news.rss_link}:&nbsp;</td>
				<td align="left"><input type="text" name="link" value="{$data.link}" style="width: 400px"></td>
			</tr>
			<tr>
				<td align="left" width="17%">{$lang.news.max_items}:&nbsp;</td>
				<td align="left"><input type="text" name="max_news" id="max_news" value="{$data.max_news}" style="width: 50px">&nbsp;&nbsp;<input type="checkbox" name="all" value="1" onclick="UpdateMaxNews(this);" {if $data.all eq 1}checked{/if}> {$lang.button.all}</td>
			</tr>
			<tr>
				<td align="left" width="17%">{$lang.news.rss_status}:&nbsp;</td>
				<td align="left"><input type="checkbox" name="status" value="1" {if $data.status}checked{/if} ></td>
			</tr>
		</table>
	</form>
	
	<script>
		tab_link = {$form.back};
		{literal}
		function UpdateMaxNews(obj){
			var action = obj.checked;
			var mn_field = document.getElementById('max_news');
			if(action == true){
				mn_field.value=0;
			}
			mn_field.disabled=action;
			return;
		}
		{/literal}
	</script>
	</div>
</div>
		<table style="width:100%;float:left;">
			<tr height="40">
				{if $form.par eq "edit"}
				<td>
					<a class="admin_button_major" onclick="SaveBlock('show_block','edit_form');">{$lang.button.save}<span>&nbsp;</span></a>
					{*<input type="button" value="{$lang.button.save}" class="button" onclick="javascript:document.news.submit();">*}
					<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');">{$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="button" value="{$lang.button.add}" class="button" onclick="javascript:document.news.submit();">*}
				</td>
				{/if}
			</tr>
		</table>
	</div>
</div>

{*
{include file="$admingentemplates/admin_bottom.tpl"}
*}