{if $ajax eq 0}
{include file="$admingentemplates/admin_top.tpl"}
<div class="back">
    <a href="{$site_url}{$site_root}/admin/admin_modules.php">{$lang.button.back}</a>
</div>
<div class="cr"></div>
<div class="show_help" style="display: none;">&nbsp;</div>
<div class="red_header">{$header.razdel_name}</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>{$help.chat_connections}
    </div>
</div>
<div class="cr">&nbsp;</div>
<div style="float:right;"><a href="{$site_url}{$site_root}/flash_chat/flashchat.php" target="_blank">{$lang.admin_menu.chat_login}</a></div>
<div class="cr">&nbsp;</div>
<ul class="tabs">
    <li>
        <a href="msglist.php">{$lang.admin_menu.chat_messages}</a>
    </li>
    <li>
        <a href="roomlist.php">{$lang.admin_menu.settings}</a>
    </li>
    <li>
        <a class="current">{$lang.admin_menu.chat_connections}</a>
    </li>
    <li>
        <a href="banlist.php">{$lang.admin_menu.chat_bans}</a>
    </li>
    <li>
        <a href="ignorelist.php">{$lang.admin_menu.chat_ignoring}</a>
    </li>
    <li>
        <a href="botlist.php">{$lang.admin_menu.chat_bots}</a>
    </li>
    <li>
        <a href="modlist.php">{$lang.admin_menu.chat_moderators}</a>
    </li>
    <li>
        <a href="modules.php">{$lang.admin_menu.chat_modules}</a>
    </li>
{*    <li>
        <a href="{$site_url}{$site_root}/flash_chat/flashchat.php" target="_blank">{$lang.admin_menu.chat_login}</a>
    </li>*}
</ul>{/if}
<div class="user_operation_line" style="height:4px;">
</div>
    <div class="user_status_line" style="margin-bottom:0px;width:100%;">
        <div id="tab_news" class="user_status_elem" onclick="links_load('roomlist.php?');">
            <a>{$lang.admin_menu.chat_rooms}</a>
        </div>
        <div id="tab_feeds" class="user_status_elem_active">
            {$lang.admin_menu.chat_connections}
        </div>
        <div class="user_status_elem" onclick="links_load('banlist.php?');">
            <a>{$lang.admin_menu.chat_bans}</a>
        </div>
        <div class="user_status_elem" onclick="links_load('modules.php?');">
            <a>{$lang.admin_menu.chat_modules}</a>
        </div>
	</div>
<div style="float:left;width:100%;">
<form name="connlist" id="connlist" action="connlist.php" method="post">
	<input type="hidden" id="sort" name="sort" value="none">
</form>
<table border=0 cellspacing=0 cellpadding=0 width="100%">
<tr class="table_header">
	<td align="left"><a href="javascript:my_getbyid('sort').value = 'id'; my_getbyid('connlist').submit()">{$header.id}</a></td>
	<td align="center"><a href="javascript:my_getbyid('sort').value = 'updated'; my_getbyid('connlist').submit()">{$header.updated}</a></td>
	<td align="center"><a href="javascript:my_getbyid('sort').value = 'created'; my_getbyid('connlist').submit()">{$header.created}</a></td>
	<td align="center"><a href="javascript:my_getbyid('sort').value = 'login'; my_getbyid('connlist').submit()">{$header.user}</a></td>
	<td align="center"><a href="javascript:my_getbyid('sort').value = 'roomid'; my_getbyid('connlist').submit()">{$header.roomid}</a></td>
	<td align="center"><a href="javascript:my_getbyid('sort').value = 'state'; my_getbyid('connlist').submit()">{$header.state}</a></td>
	<td align="center"><a href="javascript:my_getbyid('sort').value = 'color'; my_getbyid('connlist').submit()">{$header.color}</a></td>
	<td align="center"><a href="javascript:my_getbyid('sort').value = 'start'; my_getbyid('connlist').submit()">{$header.start}</a></td>
	<td align="center"><a href="javascript:my_getbyid('sort').value = 'lang'; my_getbyid('connlist').submit()">{$header.lang}</a></td>
	<td align="center"><a href="javascript:my_getbyid('sort').value = 'ip'; my_getbyid('connlist').submit()">{$header.ip}</a></td>
	<td align="center"><a href="javascript:my_getbyid('sort').value = 'tzoffset'; my_getbyid('connlist').submit()">{$header.tzoffset}</a></td>
	<td align="center"><a href="javascript:my_getbyid('sort').value = 'host'; my_getbyid('connlist').submit()">{$header.host}</a></td>
</tr>
{foreach from=$connections item=connection name=i}
<tr {if $smarty.foreach.i.iteration mod 2 eq 1}class="table_row even"{else}class="table_row odd"{/if}>
	<td>{$connection.id}</td>
	<td align=center>{$connection.updated}</td>
	<td align=center>{$connection.created}</td>
	<td align=center>
	{if $connection.userid}
		{$connection.login}
	{else}
		-
	{/if}
	</td>
	<td align=center>{$connection.roomid}</td>
	<td align=center>{$connection.state}</td>
	<td>{$connection.color}</td>
	<td>{$connection.start}</td>
	<td align=center>{$connection.lang}</td>
	<td>{$connection.ip}</td>
	<td align=center>{$connection.tzoffset}</td>
	<td align=center>{$connection.host}</td>
</tr>
{foreachelse}
<tr height="40">
	<td class="main_error_text" align="left" colspan="12" bgcolor="#FFFFFF">{$header.err_no_connections_found}</td>
</tr>
{/foreach}
<tr class="table_header"><td colspan="12"></td></tr>
</table>
</div>
{if $ajax eq 0}
{*<p align="right" class="main_header_text">&copy;<a href="http://tufat.com/" target="_blank">TUFaT.com</a> </p>*}
{include file="$admingentemplates/admin_bottom.tpl"}{/if}