<div id="gifrshop_category_table_div" name="gifrshop_category_table_div">
{include file="$admingentemplates/admin_top.tpl"}
<div class="back">
    <a href="{$site_url}{$site_root}/admin/admin_modules.php">{$lang.button.back}</a>
</div>
<font class=red_header>{$header.razdel_name}</font>
<div class="cr">&nbsp;</div>
<div class="show_help" style="display: none;">&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>{$help.gs_category}
    </div>
</div>
<font class=red_sub_header style="color: #208B2F;">{$header.category_list}</font>
<div class="cr">&nbsp;</div>
<ul class="tabs">
    <li>
        <a class="current">{$lang.admin_menu.giftshop_catalog}</a>
    </li>
    <li>
        <a href="admin_giftshop.php?sel=orders">{$lang.admin_menu.giftshop_orders}</a>
    </li>
</ul>
		<div class="user_operation_line">
			<div onclick="document.location.href='admin_giftshop.php?sel=catadd&amp;page=1';" class="uol_item">
				<div class="uol_in_item">{$header.category_add}</div>
			</div>
			<div onclick="document.location.href='admin_giftshop.php?sel=itemsnew';" class="uol_item">
				<div class="uol_in_item">{$header.item_add}</div>
			</div>
		</div><br><br><br><br>
<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 style="border:0px;" cellspacing=0 cellpadding=5 width="100%">
			<tr class="table_header" style="background:#29B43D;">
				<td class="main_header_text" align="left" width="20">{$header.number}</td>
				<td class="main_header_text" align="left">&nbsp;</td>
				<td class="main_header_text" align="left" width="150">{$header.name}</td>
				<td class="main_header_text" align="left">{$header.comment}</td>
				<td class="main_header_text" align="left" onclick="PageList('gifrshop_category_table_div','ajax=1&{if $my_sorter}my_sorter={$my_sorter}{else}my_sorter=1{/if}')">{$lang.banners.show_for}</td>
				<td class="main_header_text" align="left" onclick="PageList('gifrshop_category_table_div','ajax=2&{if $my_sorter}my_sorter={$my_sorter}{else}my_sorter=1{/if}')">{$header.status}</td>
				<td class="main_header_text" align="right" width="200">{$lang.button.action}</td>
			</tr>
			{if $category}
			{section name=spr loop=$category}
			<tr {if not $category[spr].number is div by 2}class="odd"{else}class="even"{/if}>
			    <td style="padding:5px 10px;" valign="top" class="main_content_text" align="left">{$category[spr].number}</td>
				<td style="padding:5px 10px;" valign="top" class="main_content_text" align="left">{if $category[spr].thumb_icon_path}<img src="{$category[spr].thumb_icon_path}" border=1>{else}&nbsp;{/if}</td>
				<td valign="top" class="main_content_text" align="left"><a href="./{$form.file_name}?sel=catedit&id={$category[spr].id}&page={$form.page}">{$category[spr].name}</a></td>
				<td style="padding:5px 10px;" valign="top" class="main_content_text" align="left">{$category[spr].comment}</td>
				<td style="padding:5px 10px;" valign="top" class="main_content_text" align="left">{if ($category[spr].id_country==0) && ($category[spr].id_region==0) && ($category[spr].id_city==0)}{$lang.users.allow_1}{/if}{if $category[spr].id_country!=0}{$category[spr].name_country}{/if}{if $category[spr].id_region!=0}, {$category[spr].name_region}{/if}{if $category[spr].id_city!=0}, {$category[spr].name_city}{/if}</td>
				<td style="padding:5px 10px;" valign="top" class="main_content_text" align="left">{$category[spr].status}</td>
				<td style="padding:5px 10px;" valign="top" class="main_content_text" align="right">
					{*<a class="admin_button" href="./{$form.file_name}?sel=items&id_category={$category[spr].id}">{$button.items}<span>&nbsp;</span></a>*}
{*					<a class="admin_button" href='./{$form.file_name}?sel=subcat&id_category={$category[spr].id}'>{$lang.giftshop.subcategories}<span>&nbsp;</span></a>
					<a class="admin_button" href='./{$form.file_name}?sel=catdel&id={$category[spr].id}&page={$form.page}'>{$button.delete}<span>&nbsp;</span></a>*}
					<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="document.location.href='./{$form.file_name}?sel=catdel&id={$category[spr].id}&page={$form.page}'">
						</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='./{$form.file_name}?sel=catedit&id={$category[spr].id}&page={$form.page}'">
						</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/icn_view.png" onmouseout="javascript:hideToolTip();" onmouseover="javascript: showToolTip(event,'{$lang.button.view}');return false" onclick="document.location.href='./{$form.file_name}?sel=subcat&id_category={$category[spr].id}'">
						</div>
					</div>
				</td>
			</tr>
			{/section}
			{else}
			<tr height="40">
				<td class="main_error_text" align="left" colspan="6" bgcolor="#FFFFFF">{$header.category_empty}</td>
			</tr>
			{/if}
                    <tr class="table_header">
                        <td colspan="7">
                            &nbsp;&nbsp;
                            {if $links}
                            {foreach item=item from=$links.pages}
                                &nbsp;<a onclick="PageList('gifrshop_category_table_div', '{$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('gifrshop_category_table_div', '{$links.previous}');">< {$lang.content.previous} {$per_page}</a>
                            {/if}
                            {if $links.next}
                                <a onclick="PageList('gifrshop_category_table_div', '{$links.next}');">{$lang.content.next} {$per_page} ></a>
                            {/if}
                            </div>
                        </td>
                    </tr>
	
	</table>
{literal}
<script language="JavaScript" type="text/javascript" >
	    function PageList(id_div, par) {
			ajaxLoadingImage(1, 'gifrshop_category_table_div');
			$.post("admin_giftshop.php", par, function(data){
				ajaxLoadingImage(0, 'gifrshop_category_table_div');
				$('#gifrshop_category_table_div').html(data);
			});
		}
		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';
		}
</script>
{/literal}
<!-- /main spr row -->
{include file="$admingentemplates/admin_bottom.tpl"}
</div>