{extends file="layout.html"}
{block name=title}LMS: {$layout.pagetitle|striphtml}{/block}
{block name=module_content}
<!--// $Id$ //-->
<H1>{$layout.pagetitle}</H1>
<TABLE class="lmsbox">
    <THEAD>
	<TR>
		<TD width="1%">
			<img src="img/domain.gif" alt="">
		</TD>
		<TD width="1%">
			<B>{trans("Name:")}</B>
		</TD>
		<TD width="98%">
			<B>{$domain.name}</B>
		</TD>
	</TR>
    </THEAD>
    <TBODY>
	<TR>
    		<TD width="1%">
            		<img src="img/customer.gif" alt="">
	        </TD>
		<TD width="1%">
			<B>{trans("Owner:")}</B>
		</TD>
		<TD width="98%"class="fright">
			{if !$domain.ownerid}{trans("SYSTEM DOMAIN")}
			{else}<A href="?m=customerinfo&id={$domain.ownerid}">{$domain.customername}</A>{/if}
		</TD>
	</TR>
       <TR>
                <TD width="1%">
                        <img src="img/alias.gif" alt="">
                </TD>
                <TD width="1%" nowrap>
                        <B>{trans("Domain type:")}</B>
                </TD>
                <TD width="98%">
                        {$domain.type|default:0}
                </TD>
        </TR>
	<TR>
		<TD width="1%">
			<img src="img/mail.gif" alt="">
		</TD>
		<TD width="1%" nowrap>
			<B>{trans("Backup MX support:")}</B>
		</TD>
		<TD width="98%">
			{if $domain.mxbackup}{trans("yes")}{else}{trans("no")}{/if}
		</TD>
	</TR>
	<TR>
		<TD width="1%">
			<img src="img/account.gif" alt="">
		</TD>
		<TD width="1%" nowrap>
		        <B>{trans("Accounts number:")}</B>
		</TD>
		<TD width="98%">
			{$domain.accountcnt|default:0}
	        </TD>
	</TR>
	<TR>
		<TD width="1%">
			<img src="img/alias.gif" alt="">
		</TD>
		<TD width="1%" nowrap>
		        <B>{trans("Aliases number:")}</B>
		</TD>
		<TD width="98%">
			{$domain.aliascnt|default:0}
	        </TD>
	</TR>
        <TR>
                <TD width="1%">
                        <img src="img/dns.gif" alt="">
                </TD>
                <TD width="1%" nowrap>
                        <B>{trans("Records number:")}</B>
                </TD>
                <TD width="98%">
                        {$domain.recordscnt|default:0}
                </TD>
        </TR>
{if $domain.description}
	<TR>
		<TD width="1%">
			<img src="img/info.gif" alt="">
		</TD>
		<TD width="1%" nowrap>
		        <B>{trans("Description:")}</B>
		</TD>
		<TD width="98%">
			<TABLE WIDTH="100%" CELLPADDING="5">
                                <TR>
			                <TD CLASS="fall superlight">
			                        {$domain.description|replace:"\n":"<BR>"}
			                </TD>
			        </TR>
			</TABLE>
	        </TD>
	</TR>
{/if}
	<TR>
		<TD align="right" colspan="3">
			<A href="?m=recordlist&d={$domain.id}">{trans("Records")} <IMG src="img/dns.gif" alt="{trans("Records")}"></A>
			<A href="?m=accountlist&d={$domain.id}">{trans("Accounts")} <IMG src="img/account.gif" alt="{trans("Accounts")}"></A>
			<A href="?m=aliaslist&d={$domain.id}">{trans("Aliases")} <IMG src="img/alias.gif" alt="{trans("Aliases")}"></A>
			<A href="?m=domainedit&id={$domain.id}" accesskey="e">{trans("Edit")} <img src="img/save.gif" alt=""></A>
			<A id="delete-domain" href="?m=domaindel&id={$domain.id}">{trans("Delete")} <img src="img/delete.gif" alt=""></A>
		</TD>
	</TR>
    </TBODY>
</TABLE>
	<script>
		$('#delete-domain').click(function() {
			confirmDialog($t("Are you sure, you want to delete that domain and all accounts/aliases in that domain?"), this).done(function() {
				location.href = $(this).attr('href');
			});
			return false;
		});
	</script>
{/block}
