{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>

<font style="display:table;" class=red_header>Cometchat</font>
<div class="cr">&nbsp;</div>
<div class="cr">&nbsp;</div>
<div style="display:block;" class="help_text">
	<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.av_module}
	</div>
</div>
<div class="cr">&nbsp;</div>
	<ul class="tabs">
		<li>
			<a {if $par eq '0'}class="current"{else}href="{$site_url}{$site_root}/admin/admin_av_module.php"{/if}>{$lang.admin_menu.settings}</a>
		</li>
		<li>
			<a {if $par eq 1}class="current"{else}href="{$site_url}{$site_root}/topcmm_123flashchat/admin/basicsetting.php"{/if}>{$lang.settings.123flashchat}</a>
		</li>
		<li>
			<a {if $par eq 2}class="current"{else}href="{$site_url}{$site_root}/admin/admin_chat7.php"{/if}>{$lang.settings.flashcoms}</a>
		</li>
		<li>
			<a {if $par eq 4}class="current"{else}href="{$site_url}{$site_root}/admin/webmessenger/connlist.php"{/if}>{$lang.settings.userplane}</a>
		</li>
		<li>
            <a {if $par eq 5}class="current"{else}href="{$site_url}{$site_root}/admin/admin_av_module.php?sel=cometchat"{/if}>Cometchat</a>
         </li>
	</ul>
</div>
<div class="panel_section" style="width:100%;display:table;">
	{if $install==0}
		<div style="margin:10px;">
			<div style="margin:1px;padding:5px;background:#ffffff;">
				<font class="main_content_text">{$lang.cometchat.install_0}</font>
			</div>
		</div>
	{elseif $install==1}
		<div style="margin:10px;">
			<div style="margin:1px;padding:5px;background:#ffffff;">
				<font class="main_content_text">{$lang.cometchat.install_1}</font>
			</div>
			<a class="admin_button_major" href="{$frame_url}">{$lang.button.install}<span>&nbsp;</span></a>
		</div>
	{else}
		<iframe style="width:100%;display:table;border:0px;" id="iframe"></iframe>
	{/if}
</div>

<script type="text/javascript">
var frame_url = "{$frame_url}";
var cometchat_admin_user = "{$cometchat_admin_user}";
var site_root = "{$site_root}";
{literal}
$(document).ready(function(){
	$('#iframe').attr('src', frame_url);
	$("#iframe").load(setHeight);
	$.post(site_root+"/cometchat/admin/",{username:cometchat_admin_user,password:cometchat_admin_user});
});
function setHeight(){
  var iFrame = $(this, parent.document.body);
  iFrame.height($(document.body).height() + 100);
}
{/literal}
</script>

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