{extends file="layout.html"}
{block name=title}LMS: {$layout.pagetitle|striphtml}{/block}
{block name=module_content}
<!--// $Id$ //-->
<H1>{$layout.pagetitle}</H1>
<FORM METHOD="POST" ACTION="?m=accountsearch&amp;search=account" NAME="accountsearch">
<INPUT type="submit" class="hiddenbtn">
<TABLE class="lmsbox">
    <THEAD>
	<TR>
		<TD COLSPAN="2">
			<B>{trans("Find accounts matching the following search criteria:")}</B>
		</TD>
	</TR>
    </THEAD>
    <TBODY>
	<TR>
		<TD WIDTH="1%" NOWRAP>
			<IMG src="img/account.gif" alt=""> <B>{trans("Login:")}</B>
		</TD>
		<TD WIDTH="99%">
			<INPUT TYPE="text" NAME="search[login]" {tip text="Enter login or it's fragment"}>
		</TD>
	</TR>
	<TR>
		<TD WIDTH="1%" NOWRAP>
			<IMG src="img/domain.gif" alt=""> <B>{trans("Domain:")}</B>
		</TD>
		<TD WIDTH="99%">
			<INPUT TYPE="text" NAME="search[domain]" {tip text="Enter domain name or it's fragment"}>
		</TD>
	</TR>
	<TR>
		<TD WIDTH="1%" NOWRAP>
			<IMG src="img/account.gif" alt=""> <B>{trans("Type:")}</B>
		</TD>
		<TD WIDTH="99%">
			<SELECT SIZE="1" NAME="search[type]" {tip text="Select account type"}>
				<OPTION VALUE="0">{trans("— all types —")}</OPTION>
				{foreach $_ACCOUNTTYPES as $typeidx => $type}
				<OPTION VALUE="{$typeidx}">{$type.label}</OPTION>
				{/foreach}
			</SELECT>
		</TD>
	</TR>
	<TR>
		<TD WIDTH="1%" NOWRAP>
			<IMG src="img/customer.gif" alt=""> <B>{trans("Owner:")}</B>
		</TD>
		<TD WIDTH="99%">
			<SELECT SIZE="1" NAME="search[ownerid]" {tip text="Select owner"}>
    				<OPTION VALUE="">{trans("— all owners —")}</OPTION>
				<OPTION VALUE="0">{trans("SYSTEM ACCOUNT")}</OPTION>
				{foreach from=$customerlist item=item}
				<OPTION VALUE="{$item.id}">{$item.customername|truncate:40:"&hellip;":true} ({$item.id|string_format:"%04d"})</OPTION>
				{/foreach}
			</SELECT>
		</TD>
	</TR>
	<TR>
		<TD WIDTH="1%" NOWRAP>
			<IMG src="img/name.gif" alt=""> <B>{trans("First/last or Company name:")}</B>
		</TD>
		<TD WIDTH="99%">
			<INPUT type="text" name="search[realname]" {tip text="Enter optional account name"}>
		</TD>
	</TR>
	<TR>
		<TD WIDTH="1%" NOWRAP>
			<IMG src="img/info.gif" width="16" alt=""> <B>{trans("Description:")}</B>
		</TD>
		<TD WIDTH="99%">
			<INPUT TYPE="text" NAME="search[description]" {tip text="Enter additional information"}>
		</TD>
	</TR>
	<TR>
		<TD WIDTH="1%" NOWRAP>
			<IMG src="img/wait.gif" alt=""> <B>{trans("Status:")}</B>
		</TD>
		<TD WIDTH="99%">
			<SELECT size="1" name="search[kind]">
                        	<OPTION value="0">{trans("— all —")}</OPTION>
			        <OPTION value="1">{trans("expired")}</OPTION>
				<OPTION value="2">{trans("active")}</OPTION>
			</SELECT>
		</TD>
	</TR>
	<TR>
		<TD WIDTH="100%" COLSPAN="2" ALIGN="right">
			<A href="javascript:document.accountsearch.submit()" accesskey="s">{trans("Search")} <IMG SRC="img/search.gif" alt=""></A>
		</TD>
	</TR>
    </TBODY>
</TABLE>
</FORM>
<SCRIPT type="text/javascript">
<!--
$(function() {
	$('forms[name="accountsearch"] [name="search[login]"]').focus();
});
//-->
</SCRIPT>
<BR>
<FORM METHOD="POST" ACTION="?m=aliassearch&amp;search" NAME="aliassearch">
<INPUT type="submit" class="hiddenbtn">
<TABLE class="lmsbox">
    <THEAD>
	<TR>
		<TD COLSPAN="2">
			<B>{trans("Find aliases matching the following search criteria:")}</B>
		</TD>
	</TR>
    </THEAD>
    <TBODY>
	<TR>
		<TD WIDTH="1%" NOWRAP>
			<IMG src="img/alias.gif" alt=""> <B>{trans("Login:")}</B>
		</TD>
		<TD WIDTH="99%">
			<INPUT TYPE="text" NAME="search[login]" {tip text="Enter login or it's fragment"}>
		</TD>
	</TR>
	<TR>
		<TD WIDTH="1%" NOWRAP>
			<IMG src="img/domain.gif" alt=""> <B>{trans("Domain:")}</B>
		</TD>
		<TD WIDTH="99%">
			<INPUT TYPE="text" NAME="search[domain]" {tip text="Enter domain name or it's fragment"}>
		</TD>
	</TR>
	<TR>
		<TD WIDTH="1%" NOWRAP>
			<IMG src="img/customer.gif" alt=""> <B>{trans("Domain's owner:")}</B>
		</TD>
		<TD WIDTH="99%">
			<SELECT SIZE="1" NAME="search[ownerid]" {tip text="Select owner"}>
    				<OPTION VALUE="">{trans("— all owners —")}</OPTION>
				<OPTION VALUE="0">{trans("SYSTEM DOMAIN")}</OPTION>
				{foreach from=$customerlist item=item}
				<OPTION VALUE="{$item.id}">{$item.customername|truncate:40:"&hellip;":true} ({$item.id|string_format:"%04d"})</OPTION>
				{/foreach}
			</SELECT>
		</TD>
	</TR>
	<TR>
		<TD WIDTH="100%" COLSPAN="2" ALIGN="right">
			<A href="javascript:document.aliassearch.submit()" accesskey="s">{trans("Search")} <IMG SRC="img/search.gif" alt=""></A>
		</TD>
	</TR>
    </TBODY>
</TABLE>
</FORM>
<BR>
<FORM METHOD="POST" ACTION="?m=domainsearch&amp;search" NAME="domainsearch">
<INPUT type="submit" class="hiddenbtn">
<TABLE class="lmsbox">
    <THEAD>
	<TR>
		<TD COLSPAN="2">
			<B>{trans("Find domain matching the following search criteria:")}</B>
		</TD>
	</TR>
    </THEAD>
    <TBODY>
	<TR>
		<TD WIDTH="1%" NOWRAP>
			<IMG src="img/domain.gif" alt=""> <B>{trans("Name:")}</B>
		</TD>
		<TD WIDTH="99%">
			<INPUT TYPE="text" NAME="search[domain]" {tip text="Enter domain name or it's fragment"}>
		</TD>
	</TR>
	<TR>
		<TD WIDTH="1%" NOWRAP>
			<IMG src="img/info.gif" width="16" alt=""> <B>{trans("Description:")}</B>
		</TD>
		<TD WIDTH="99%">
			<INPUT TYPE="text" NAME="search[description]" {tip text="Enter additional information"}>
		</TD>
	</TR>
	<TR>
		<TD WIDTH="1%" NOWRAP>
			<IMG src="img/customer.gif" alt=""> <B>{trans("Owner:")}</B>
		</TD>
		<TD WIDTH="99%">
			<SELECT SIZE="1" NAME="search[ownerid]" {tip text="Select owner"}>
    				<OPTION VALUE="">{trans("— all owners —")}</OPTION>
				<OPTION VALUE="0">{trans("SYSTEM ACCOUNT")}</OPTION>
				{foreach from=$customerlist item=item}
				<OPTION VALUE="{$item.id}">{$item.customername|truncate:40:"&hellip;":true} ({$item.id|string_format:"%04d"})</OPTION>
				{/foreach}
			</SELECT>
		</TD>
	</TR>
	<TR>
		<TD WIDTH="100%" COLSPAN="2" ALIGN="right">
			<A href="javascript:document.domainsearch.submit()" accesskey="s">{trans("Search")} <IMG SRC="img/search.gif" alt=""></A>
		</TD>
	</TR>
    </TBODY>
</TABLE>
</FORM>
{/block}
