<div class="panel">
    <div class="user_operation_line">
		<div class="uol_item" onclick="ShowBlock('show_block','{$rss_add_link}');return false;">
            <div class="uol_in_item">{$lang.news.rss_add}</div>
        </div>        
		<div class="uol_item" onclick="ShowBlock('show_block','{$rss_update_current_link}');return false;">
            <div class="uol_in_item">{$lang.news.rss_update_current}</div>
        </div>        
		<div class="uol_item" onclick="ShowBlock('show_block','{$rss_update_link}');return false;">
            <div class="uol_in_item">{$lang.news.rss_update}</div>
        </div>        
    </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.settings.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 id="tooltip" onclick="hideToolTip()" style="text-align:center; background-color: #FFFFFF; border: 1px dotted; text-align: {$default_left}; position:absolute; display:none; padding:5px;"></div>
{literal}
<script type="text/javascript">
$(function() {
$('#tool_tip_4 *').tooltip();
});
</script>
{/literal}
		<table border=0 cellspacing=0 cellpadding=0 width="100%">
			<tr class="table_header">
				<td class="main_header_text" align="center" width="20">{$lang.news.number}</td>
				<td class="main_header_text" align="left">{$lang.news.rss_date}</td>
				<td class="main_header_text" align="left">{$lang.news.rss_link}</td>
				<td class="main_header_text" align="center">{$lang.news.rss_status}</td>
				<td class="main_header_text" align="right" width="100">{$lang.button.action}</td>
			</tr>
			{if $feeds}
			{section name=spr loop=$feeds}
			<tr {if $smarty.section.spr.index mod 2 eq 1}class="table_row even"{else}class="table_row odd"{/if}>
				<td class="main_content_text" align="center" >{$feeds[spr].number}</td>
				<td class="main_content_text" align="left" >{$feeds[spr].date}</td>
				<td class="main_content_text" align="left"><a href="{$feeds[spr].editlink}" onclick="ShowBlock('show_block','{$feeds[spr].editlink}');return false;">{$feeds[spr].link}</a></td>
				<td class="main_content_text" align="center">{$feeds[spr].status}</td>
				<td class="main_content_text" align="right">
					{*<input type="button" value="{$lang.button.delete}" class="button" onclick="{literal}javascript: if(confirm({/literal}'{$form.confirm|escape:javascript}'{literal})){location.href={/literal}'{$feeds[spr].deletelink}'{literal}}{/literal}">*}
					<div style="width:10px;float:right;" class="fl">&nbsp;</div>
					<div class="block_action fr" style="display: none;">
						<div class="action_del" style="display: block;">
							<img width="16" alt="" onmouseout="javascript:hideToolTip();" onmouseover="javascript: showToolTip(event,'{$lang.button.delete}');return false" src="{$site_root}{$template_root}/images/photo_delete.png" onclick="{literal}javascript: if(confirm({/literal}'{$form.confirm|escape:javascript}'{literal})){ ShowBlock('show_block','{/literal}{$feeds[spr].deletelink}{literal}');return false;}{/literal}">
						</div>
					</div>								
				</td>
			</tr>
			{/section}
			{else}
			<tr height="40">
				<td class="main_error_text" align="left" colspan="5" bgcolor="#FFFFFF">{$lang.news.rss_empty}</td>
			</tr>
			{/if}
			<tr class="table_header"><td colspan="5">&nbsp;</td></tr>
		</table>
<script type="text/javascript">
{literal}
		function showToolTip(e,text){
			if(document.all)e = event;
			var obj = document.getElementById('tooltip');
			obj.innerHTML = text;
			obj.style.display = 'block';
			var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
			if(navigator.userAgent.toLowerCase().indexOf('safari')>=0)st=0;
			var leftPos = e.clientX - $('#tooltip').width()-10;
			if(leftPos<0)leftPos = 0;
			obj.style.left = leftPos + 'px';
			obj.style.top = e.clientY - obj.offsetHeight -10 + st + 'px';
		}
		function hideToolTip(){
			document.getElementById('tooltip').style.display = 'none';
		}
{/literal}		
</script>
{*		<table style="padding-top: 15px;"><tr height="40">
			<td>*}
{*				<input type="button" value="{$lang.news.rss_add}" class="button" onclick="javascript: location.href='{$rss_add_link}'">*}
{*				<a class="admin_button_major" onclick="ShowBlock('show_block','{$rss_add_link}');return false;">{$lang.news.rss_add}<span>&nbsp;</span></a>
			</td>
			<td>*}
{*				<input type="button" value="{$lang.news.rss_update_current}" class="button" onclick="javascript: location.href='{$rss_update_current_link}'">*}
{*				<a class="admin_button_major" style="margin-left:20px;" onclick="ShowBlock('show_block','{$rss_update_current_link}');return false;">{$lang.news.rss_update_current}<span>&nbsp;</span></a>
			</td>
			<td>*}
{*				<input type="button" value="{$lang.news.rss_update}" class="button" onclick="javascript: location.href='{$rss_update_link}'">*}
{*				<a class="admin_button_major" style="margin-left:20px;" onclick="ShowBlock('show_block','{$rss_update_link}');return false;">{$lang.news.rss_update}<span>&nbsp;</span></a>
			</td>
		</tr></table>*}
	</div>
</div>
			
<script type="text/javascript">
	tab_link = 'admin_news.php?ajax=1';
</script>
