{if $form.par eq 'songs'}
{if $ajax eq 0}
    {include file="$admingentemplates/admin_top.tpl"}
	
    <div class="show_help" style="display: none;">&nbsp;</div>
    <div class="red_header">{$lang.cards.admin.songs_list}</div>
    <div class="cr">&nbsp;</div>
    <div class="cr">&nbsp;</div>
    <div class="help_text" style="display:block;">
        <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.cards_songs_list}
        </div>
    </div>
<ul class="tabs">
    <li>
        <a {if $info.active == "catalog"} class="current" {else} href="admin_cards.php"  {/if}>{$lang.admin_menu.ecards_catalog} </a>
    </li>
    <li>
        <a {if $info.active == "orders"} class="current" {else} href="admin_cards.php?sel=orders" {/if}>{$lang.admin_menu.ecards_orders}</a>
    </li>
    <li>
        <a {if $info.active == "song"} class="current" {else} href="admin_cards.php?sel=settings_songs" {/if}>{$lang.admin_menu.ecards_songs}</a>
    </li>        
</ul>
<div class="user_operation_line"> 
    <div class="uol_item" >
        <div class="uol_in_item" onclick="javascript: window.location.href='{$form.add_link}'">{$lang.cards.admin.add_song}</div>
    </div>   
</div>    
<div class="cr"></div>
{/if}   	
    	<div id="song" style="padding-top: 10px;">
<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%">
    	{if $songs}		
    		<tr class="table_header">
    			<td >{$lang.cards.admin.song_name}</td>
    			<td width="400"></td>
    			<td width="80" align="center">{$lang.cards.admin.status}</td>
    			<td width="230" align="right">{$lang.button.action}</td>
    		</tr>
    		{foreach item=item from=$songs key=key}
    		<tr {if $key mod 2 eq 1}class="even"{else}class="odd"{/if} height="40">
    			<td class="main_content_text"  valign="top">{$item.name}</td>
    			<td class="main_content_text"  valign="top">
    			{if $item.file}
					{*<div class="audio_row">
						<embed src="{$item.file}" controls="console" autostart="false" loop="false" height="16px" width="200px" />
					</div>*}
					<span id="player{$key}" align=absmiddle>
						<script type="text/javascript">
							var fv = "file={$item.file}&autostart=false&title={$item.name|escape}&lightcolor=0xD12627";
							{literal}
								var FO = {
									movie:"{/literal}{$site_root}{literal}/include/mp3player/mp3player.swf",width:"235",height:"20",majorversion:"7",build:"0",bgcolor:"#FFFFFF", flashvars:fv
								};
							{/literal}
							UFO.create(FO, "player{$key}");
						</script>
					</span>
    			{else}
    				{$lang.cards.admin.no_song}
    			{/if}
    			</td>
    			<td class="main_content_text"  align="center" valign="top">
    			{if $item.status eq 1}+{else}-{/if}
    			</td>
    			<td class="main_content_text"  valign="top">
					<div class="block_action fr" style="display: none;">
						<div class="action_del" style="display: block;cursor:pointer;">
							<img width="16" alt="" src="{$site_root}{$template_root}/images/photo_delete.png" onmouseout="javascript:hideToolTip();" onmouseover="javascript: showToolTip(event,'{$lang.button.delete}');return false" onclick="javascript: if(confirm('{$lang.cards.admin.confirm_song|escape:javascript}')){literal}{{/literal}document.location.href='{$item.deletelink}'{literal}}{/literal} else return false;">
						</div>
					</div>			
					<div style="width:10px;float:right;" class="fl">&nbsp;</div>
					<div class="block_action fr" style="display: none;">
						<div class="action_edit" style="display: block;cursor:pointer;">
							<img width="16" alt="" src="{$site_root}{$template_root}/images/edit.png" onmouseout="javascript:hideToolTip();" onmouseover="javascript: showToolTip(event,'{$lang.button.edit}');return false" onclick="document.location.href='{$item.editlink}'">
						</div>
					</div>			
    			</td>
    		</tr>
		{foreachelse}
			<tr height="40">
				<td class="main_error_text" align="left" colspan="11">{$lang.interests_spr.empty}</td>
			</tr>
    		{/foreach}
    		<tr class="table_header">
                <td colspan="11">
                    &nbsp;&nbsp;
                    {if $links}
                    {foreach item=item from=$links.pages}
                        &nbsp;<a onclick="PageList('', '{$item.link}');" class="page_link" {if $item.selected} style=" font-weight: bold; text-decoration: none;" {/if}>{$item.name}</a>&nbsp;
                    {/foreach}
                    {/if}
                    <div class="page_navigation">
                    {if $links.previous}
                        <a onclick="PageList('', '{$links.previous}');">< {$lang.content.previous} {$per_page}</a>
                    {/if}
                    {if $links.next}
                        <a onclick="PageList('', '{$links.next}');">{$lang.content.next} {$per_page} ></a>
                    {/if}
                    </div>
                </td>
            </tr>
    	{else}
    		<tr height="40">
    			<td class="main_error_text" align="left" colspan="4">{$lang.cards.admin.empty_songs}</td>
    		</tr>
    	{/if}
    	</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>
    	</div>
  
{else}
    {include file="$admingentemplates/admin_top.tpl"}
    <div class="show_help" style="display: none;">&nbsp;</div>
    <div class="red_header">{$lang.cards.admin.ecards_import}</div>
    <div class="cr">&nbsp;</div>
    <div class="cr">&nbsp;</div>
    <div class="help_text" style="display:block;">
        <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.ecards_import}
        </div>
    </div>
    <div>
    <a href="http://pilotgroup.net/support/contact.php" target="_blank">Contact Support Team</a>
    </div>
    <div style="padding-bottom: 20px;">
         <a href="{$form.file_name}" class="admin_button btn_upload" >{$lang.button.back}<span>&nbsp;</span></a>&nbsp;&nbsp;&nbsp;
   	</div>
{/if}
{if $ajax eq 0}
{include file="$admingentemplates/admin_bottom.tpl"}
{/if}
<script type="text/javascript">
{literal}
function PageList(id_div, par) {
        ajaxLoadingImage(1, 'song');
        $.post("admin_cards.php", par, function(data){
            ajaxLoadingImage(0, 'song');
            $('#song').html(data);
        });
    }
{/literal}
</script>