{include file="$admingentemplates/admin_top.tpl"}

<div class="back">
    <a href="{$site_url}{$site_root}/admin/admin_settings.php">{$lang.button.back}</a>
</div>
<div class="cr"></div>
<div class="show_help" style="display: none;">&nbsp;</div>
<div class="red_header">{$lang.moderators.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.moderators_list}
    </div>
</div>
<div class="cr">&nbsp;</div>

<ul class="tabs">
    <li>
        <a {if $sec eq 1} class="current" {else} href="admin_settings.php?section=1" {/if}>{$lang.settings.section_name.1}</a>
    </li>
    <li>
        <a {if $sec eq 2} class="current" {else} href="admin_settings.php?section=2" {/if}>{$lang.settings.section_name.2}</a>
    </li>
    <li>
        <a {if $sec eq 5} class="current" {else} href="admin_settings.php?section=5" {/if}>{$lang.settings.section_name.5}</a>
    </li>
    <li>
        <a class="current" >{$lang.moderators.name}</a>
    </li>
    <li>
        <a {if $sec eq 20} class="current" {else} href="admin_settings.php?section=20" {/if}>{$lang.settings.section_name.20}</a>
    </li>
</ul>
		<div class="user_operation_line">
			<div class="uol_item" onclick="javascript: location.href='{$form.add_link}'">
				<div class="uol_in_item">{$lang.moderators.add_moderator}</div>
			</div>
			{if $user}
				<div class="uol_item" onclick="document.getElementById('sel').value='status'; document.getElementById('main_form').submit();">
					<div class="uol_in_item">{$lang.moderators.refresh_status}</div>
				</div>
			{/if}
		</div>
<div class="cr">&nbsp;</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}
<div class="panel">
	<div> {*{if $user}class="panel_section"{/if}*}
		<div{* class="panel_content"*} style="width: 100%;">
			<div id="moderators_table_div">
				<form method="post" action="admin_moderators.php" id="main_form" style="margin: 0px; padding: 0px;">
				<input type="hidden" name="sel" id="sel" value="">
				<input type="hidden" name="page" id="page" value="{$page}">
				<table width="100%" id="main_groups_div_1" border="0"  cellspacing="0" cellpadding="0">
					<tr class="table_header">
			            <td width="25">{$header.number}</td>
			            <td>{$header.login}</td>
			            <td>{$header.email}</td>
			            <td width="100" align="center">{$header.status}</td>
			            <td width="100">{$header.date_last_seen}</td>
			            <td width="45">{$lang.button.action}</td>
			        </tr>
				  	{foreach item=item from=$user name=moder}
			        <tr {if $smarty.foreach.moder.iteration mod 2 eq 1}class="table_row even"{else}class="table_row odd"{/if}>
			            <td>{$item.number}</td>
			            <td><a href="admin_moderators.php?sel=edit&id={$item.id}">{$item.login}</a></td>
			            <td>{$item.email}</td>
			            <td align="center">
			            	<input type="checkbox" name="status[]" value="{$item.id}" {if $item.status eq '1'} checked {/if}>
							<input type="hidden" name="id_user[]" value="{$item.id}">
			            </td>
			            <td>{$item.date_last_seen}</td>
			            <td>
							{*<a href="admin_moderators.php?sel=delete&id={$item.id}">{$header.delete}</a>*}
							<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="javascript: location.href='admin_moderators.php?sel=delete&id={$item.id}'">
								</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;">
									<img width="16" alt="" onmouseout="javascript:hideToolTip();" onmouseover="javascript: showToolTip(event,'{$lang.button.edit}');return false" src="{$site_root}{$template_root}/images/edit.png" onclick="document.location.href='admin_moderators.php?sel=edit&id={$item.id}'">
								</div>
							</div>										
						</td>
			        </tr>
					{foreachelse}
			        <tr height="40">
			            <td align="center" colspan="6">{$header.empty}</td>
			        </tr>
					{/foreach}
{*					<tr>
						<td colspan="3" >&nbsp;</td>
						<td align="center" style="padding-top: 5px;">
							<a class="admin_button" onclick="document.getElementById('sel').value='status'; document.getElementById('main_form').submit();">{$lang.moderators.refresh_status}<span>&nbsp;</span></a>
						</td>
						<td></td>
					</tr>*}
					<tr class="table_header">
						<td colspan="6" height="20"  align="left" >
						{if $links}
                            {foreach item=item from=$links.pages}
                                &nbsp;<a onclick="PageList('moderators_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('moderators_table_div', '{$links.previous}');">< {$lang.content.previous} {$per_page}</a>
                            {/if}
                            {if $links.next}
                                <a onclick="PageList('moderators_table_div', '{$links.next}');">{$lang.content.next} {$per_page} ></a>
						{/if}
						</td>
					</tr>
				</table>
{*				<table id="main_groups_div_2">
					<tr height="40">
						<td>
							<a href="#" onclick="javascript: location.href='{$form.add_link}'" class="admin_button_major">{$lang.moderators.add_moderator}<span>&nbsp;</span></a>
						</td>
					</tr>
				</table>*}
				</form>
			</div>
		</div>
	</div>
</div>
<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>
{include file="$admingentemplates/admin_bottom.tpl"}